1 /* $NetBSD: getproto.c,v 1.4 2007/04/14 20:34:24 martin Exp $ */
4 * Copyright (C) 2002-2005 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: getproto.c,v 1.2.2.4 2007/10/27 16:03:38 darrenr Exp
19 for (s
= name
; *s
!= '\0'; s
++)
27 * For some bogus reason, "ip" is 252 in /etc/protocols on AIX 5
28 * The IANA has doubled up on the definition of 0 - it is now also
29 * used for IPv6 hop-opts, so we can no longer rely on /etc/protocols
30 * providing the correct name->number mapping
33 if (!strcasecmp(name
, "ip"))
36 p
= getprotobyname(name
);