diff options
Diffstat (limited to 'contrib/ipfilter/lib/printproto.c')
-rw-r--r-- | contrib/ipfilter/lib/printproto.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/contrib/ipfilter/lib/printproto.c b/contrib/ipfilter/lib/printproto.c deleted file mode 100644 index 879da12d7857..000000000000 --- a/contrib/ipfilter/lib/printproto.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2012 by Darren Reed. - * - * See the IPFILTER.LICENCE file for details on licencing. - */ - -#include "ipf.h" - - -#if !defined(lint) -static const char rcsid[] = "@(#)$Id$"; -#endif - - -void -printproto(pr, p, np) - struct protoent *pr; - int p; - ipnat_t *np; -{ - if (np != NULL) { - if ((np->in_flags & IPN_TCPUDP) == IPN_TCPUDP) - PRINTF("tcp/udp"); - else if (np->in_flags & IPN_TCP) - PRINTF("tcp"); - else if (np->in_flags & IPN_UDP) - PRINTF("udp"); - else if (np->in_flags & IPN_ICMPQUERY) - PRINTF("icmp"); - else if (np->in_pr[0] == 0) - PRINTF("ip"); - else if (pr != NULL) - PRINTF("%s", pr->p_name); - else - PRINTF("%d", np->in_pr[0]); - } else { - if (pr != NULL) - PRINTF("%s", pr->p_name); - else - PRINTF("%d", p); - } -} |