xref: /freebsd/sbin/ipf/libipf/printhostmap.c (revision 2a63c3be158216222d89a073dcbd6a72ee4aab5a)
141edb306SCy Schubert 
241edb306SCy Schubert /*
341edb306SCy Schubert  * Copyright (C) 2012 by Darren Reed.
441edb306SCy Schubert  *
541edb306SCy Schubert  * See the IPFILTER.LICENCE file for details on licencing.
641edb306SCy Schubert  *
741edb306SCy Schubert  * $Id$
841edb306SCy Schubert  */
941edb306SCy Schubert 
1041edb306SCy Schubert #include "ipf.h"
1141edb306SCy Schubert 
1241edb306SCy Schubert void
printhostmap(hostmap_t * hmp,u_int hv)13*efeb8bffSCy Schubert printhostmap(hostmap_t *hmp, u_int hv)
1441edb306SCy Schubert {
1541edb306SCy Schubert 
1641edb306SCy Schubert 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_osrcip6, NULL);
1741edb306SCy Schubert 	putchar(',');
1841edb306SCy Schubert 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_odstip6, NULL);
1941edb306SCy Schubert 	PRINTF(" -> ");
2041edb306SCy Schubert 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_nsrcip6, NULL);
2141edb306SCy Schubert 	putchar(',');
2241edb306SCy Schubert 	printactiveaddress(hmp->hm_v, "%s", &hmp->hm_ndstip6, NULL);
2341edb306SCy Schubert 	putchar(' ');
2441edb306SCy Schubert 	PRINTF("(use = %d", hmp->hm_ref);
2541edb306SCy Schubert 	if (opts & OPT_VERBOSE)
2641edb306SCy Schubert 		PRINTF(" hv = %u", hv);
2741edb306SCy Schubert 	printf(")\n");
2841edb306SCy Schubert }
29