xref: /freebsd/sbin/ipf/libipf/printhostmap.c (revision 18054d0220cfc8df9c9568c437bd6fbb59d53c3c)
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(hostmap_t *hmp, u_int hv)
15 {
16 
17 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_osrcip6, NULL);
18 	putchar(',');
19 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_odstip6, NULL);
20 	PRINTF(" -> ");
21 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_nsrcip6, NULL);
22 	putchar(',');
23 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_ndstip6, NULL);
24 	putchar(' ');
25 	PRINTF("(use = %d", hmp->hm_ref);
26 	if (opts & OPT_VERBOSE)
27 		PRINTF(" hv = %u", hv);
28 	printf(")\n");
29 }
30