Sync usage with man page.
[netbsd-mini2440.git] / dist / ipf / lib / printfraginfo.c
blob29d9f6047b4d95ddafff803ad8eb8f94a84e4923
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2004-2005 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: printfraginfo.c,v 1.1.2.5 2006/12/25 15:10:37 darrenr Exp
9 */
10 #include "ipf.h"
11 #include "kmem.h"
13 void printfraginfo(prefix, ifr)
14 char *prefix;
15 struct ipfr *ifr;
17 frentry_t fr;
19 fr.fr_flags = 0xffffffff;
21 printf("%s%s -> ", prefix, hostname(4, &ifr->ipfr_src));
23 if (kmemcpy((char *)&fr, (u_long)ifr->ipfr_rule,
24 sizeof(fr)) == -1)
25 return;
27 printf("%s id %d ttl %ld pr %d seen0 %d ref %d tos %#02x\n",
28 hostname(4, &ifr->ipfr_dst), ifr->ipfr_id, ifr->ipfr_ttl,
29 ifr->ipfr_p, ifr->ipfr_seen0, ifr->ipfr_ref, ifr->ipfr_tos);