2 * Copyright (C) 2005 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
11 static const char rcsid[] = "@(#)$Id: printproto.c,v 1.1.2.2 2006/06/16 17:21:14 darrenr Exp $";
15 void printproto(pr, p, np)
21 if ((np->in_flags & IPN_TCPUDP) == IPN_TCPUDP)
23 else if (np->in_flags & IPN_TCP)
25 else if (np->in_flags & IPN_UDP)
27 else if (np->in_flags & IPN_ICMPQUERY)
31 * To make up for "ip = 252" and "hopopt = 0" in /etc/protocols
33 else if (np->in_p == 0)
37 printf("%s", pr->p_name);
39 printf("%d", np->in_p);
47 printf("%s", pr->p_name);