From 877fab32b43e91b0a55b655a7b7d6ac0844918fd Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kaber/emailAddress=kaber@netfilter.org" Date: Thu, 20 Jul 2006 17:00:19 +0000 Subject: [PATCH] reduce service_to_port duplication (Phil Oester ) The service_to_port function is used in a number of places, and could benefit from some centralization instead of being duplicated everywhere. --- extensions/libipt_multiport.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'extensions/libipt_multiport.c') diff --git a/extensions/libipt_multiport.c b/extensions/libipt_multiport.c index 97e1476..f25632f 100644 --- a/extensions/libipt_multiport.c +++ b/extensions/libipt_multiport.c @@ -68,17 +68,6 @@ proto_to_name(u_int8_t proto) } } -static int -service_to_port(const char *name, const char *proto) -{ - struct servent *service; - - if ((service = getservbyname(name, proto)) != NULL) - return ntohs((unsigned short) service->s_port); - - return -1; -} - static u_int16_t parse_port(const char *port, const char *proto) { -- cgit v1.2.3