diff options
Diffstat (limited to 'contrib/ipfilter/lib/getproto.c')
-rw-r--r-- | contrib/ipfilter/lib/getproto.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/contrib/ipfilter/lib/getproto.c b/contrib/ipfilter/lib/getproto.c deleted file mode 100644 index 9714da2..0000000 --- a/contrib/ipfilter/lib/getproto.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2002-2005 by Darren Reed. - * - * See the IPFILTER.LICENCE file for details on licencing. - * - * $Id: getproto.c,v 1.2.2.3 2006/06/16 17:21:00 darrenr Exp $ - */ - -#include "ipf.h" - -int getproto(name) -char *name; -{ - struct protoent *p; - char *s; - - for (s = name; *s != '\0'; s++) - if (!ISDIGIT(*s)) - break; - if (*s == '\0') - return atoi(name); - -#ifdef _AIX51 - /* - * For some bogus reason, "ip" is 252 in /etc/protocols on AIX 5 - */ - if (!strcasecmp(name, "ip")) - return 0; -#endif - - p = getprotobyname(name); - if (p != NULL) - return p->p_proto; - return -1; -} |