]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/ipfilter/lib/printhostmap.c
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / contrib / ipfilter / lib / printhostmap.c
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
11 #include "ipf.h"
12
13 void
14 printhostmap(hmp, hv)
15         hostmap_t *hmp;
16         u_int hv;
17 {
18
19         printactiveaddress(hmp->hm_v, "%s", &hmp->hm_osrcip6, NULL);
20         putchar(',');
21         printactiveaddress(hmp->hm_v, "%s", &hmp->hm_odstip6, NULL);
22         PRINTF(" -> ");
23         printactiveaddress(hmp->hm_v, "%s", &hmp->hm_nsrcip6, NULL);
24         putchar(',');
25         printactiveaddress(hmp->hm_v, "%s", &hmp->hm_ndstip6, NULL);
26         putchar(' ');
27         PRINTF("(use = %d", hmp->hm_ref);
28         if (opts & OPT_VERBOSE)
29                 PRINTF(" hv = %u", hv);
30         printf(")\n");
31 }