]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/lib/printfraginfo.c
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / lib / printfraginfo.c
1 /*      $FreeBSD$       */
2
3 /*
4  * Copyright (C) 2004-2005 by Darren Reed.
5  *
6  * See the IPFILTER.LICENCE file for details on licencing.
7  *
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"
12
13 void printfraginfo(prefix, ifr)
14 char *prefix;
15 struct ipfr *ifr;
16 {
17         frentry_t fr;
18
19         fr.fr_flags = 0xffffffff;
20
21         printf("%s%s -> ", prefix, hostname(4, &ifr->ipfr_src));
22 /*
23         if (kmemcpy((char *)&fr, (u_long)ifr->ipfr_rule,
24                     sizeof(fr)) == -1)
25                 return;
26 */
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);
30 }