1*13885a66Sdarrenr /* $NetBSD: printhostmap.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
2bc4097aaSchristos
3bc4097aaSchristos /*
4c9d5dc6cSdarrenr * Copyright (C) 2012 by Darren Reed.
5bc4097aaSchristos *
6bc4097aaSchristos * See the IPFILTER.LICENCE file for details on licencing.
7bc4097aaSchristos *
8*13885a66Sdarrenr * Id: printhostmap.c,v 1.1.1.2 2012/07/22 13:44:40 darrenr Exp $
9bc4097aaSchristos */
10bc4097aaSchristos
11bc4097aaSchristos #include "ipf.h"
12bc4097aaSchristos
13bc4097aaSchristos void
printhostmap(hmp,hv)14bc4097aaSchristos printhostmap(hmp, hv)
15bc4097aaSchristos hostmap_t *hmp;
16bc4097aaSchristos u_int hv;
17bc4097aaSchristos {
18bc4097aaSchristos
19bc4097aaSchristos printactiveaddress(hmp->hm_v, "%s", &hmp->hm_osrcip6, NULL);
20bc4097aaSchristos putchar(',');
21bc4097aaSchristos printactiveaddress(hmp->hm_v, "%s", &hmp->hm_odstip6, NULL);
22bc4097aaSchristos PRINTF(" -> ");
23bc4097aaSchristos printactiveaddress(hmp->hm_v, "%s", &hmp->hm_nsrcip6, NULL);
24bc4097aaSchristos putchar(',');
25bc4097aaSchristos printactiveaddress(hmp->hm_v, "%s", &hmp->hm_ndstip6, NULL);
26bc4097aaSchristos putchar(' ');
27bc4097aaSchristos PRINTF("(use = %d", hmp->hm_ref);
28bc4097aaSchristos if (opts & OPT_VERBOSE)
29bc4097aaSchristos PRINTF(" hv = %u", hv);
30bc4097aaSchristos printf(")\n");
31bc4097aaSchristos }
32