2 * Copyright (C) 1993-2005 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
10 static const char rcsid
[] = "@(#)$Id: printproto.c,v 1.1.2.1 2005/06/12 07:21:53 darrenr Exp $";
13 void printproto(pr
, p
, np
)
19 if ((np
->in_flags
& IPN_TCPUDP
) == IPN_TCPUDP
)
21 else if (np
->in_flags
& IPN_TCP
)
23 else if (np
->in_flags
& IPN_UDP
)
25 else if (np
->in_flags
& IPN_ICMPQUERY
)
29 * To make up for "ip = 252" and "hopopt = 0" in /etc/protocols
31 else if (np
->in_p
== 0)
35 printf("%s", pr
->p_name
);
37 printf("%d", np
->in_p
);
45 printf("%s", pr
->p_name
);