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