1
2 /*
3 * Copyright (C) 2012 by Darren Reed.
4 *
5 * See the IPFILTER.LICENCE file for details on licencing.
6 *
7 * $Id$
8 */
9 #include "ipf.h"
10 #include "kmem.h"
11
12
13 void
printfraginfo(char * prefix,struct ipfr * ifr)14 printfraginfo(char *prefix, struct ipfr *ifr)
15 {
16 int family;
17
18 PRINTF("%s", prefix);
19 if (ifr->ipfr_v == 6) {
20 PRINTF("inet6");
21 family = AF_INET6;
22 } else {
23 PRINTF("inet");
24 family = AF_INET;
25 }
26
27 PRINTF(" %s -> ", hostname(family, &ifr->ipfr_src));
28 PRINTF("%s id %x ttl %lu pr %d pkts %u bytes %u seen0 %d ref %d\n",
29 hostname(family, &ifr->ipfr_dst), ifr->ipfr_id,
30 ifr->ipfr_ttl, ifr->ipfr_p, ifr->ipfr_pkts, ifr->ipfr_bytes,
31 ifr->ipfr_seen0, ifr->ipfr_ref);
32 }
33