From 58179b1d0d1722ea16028aa2ea9d74afc86dd5dc Mon Sep 17 00:00:00 2001 From: Phil Oester Date: Thu, 20 Jul 2006 17:00:19 +0000 Subject: 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/libip6t_multiport.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'extensions/libip6t_multiport.c') diff --git a/extensions/libip6t_multiport.c b/extensions/libip6t_multiport.c index a8a8e08a..d33db9f2 100644 --- a/extensions/libip6t_multiport.c +++ b/extensions/libip6t_multiport.c @@ -50,17 +50,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