summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/printhostmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/lib/printhostmap.c')
-rw-r--r--contrib/ipfilter/lib/printhostmap.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/ipfilter/lib/printhostmap.c b/contrib/ipfilter/lib/printhostmap.c
new file mode 100644
index 0000000..714bc41
--- /dev/null
+++ b/contrib/ipfilter/lib/printhostmap.c
@@ -0,0 +1,31 @@
+/* $FreeBSD$ */
+
+/*
+ * Copyright (C) 2012 by Darren Reed.
+ *
+ * See the IPFILTER.LICENCE file for details on licencing.
+ *
+ * $Id$
+ */
+
+#include "ipf.h"
+
+void
+printhostmap(hmp, hv)
+ hostmap_t *hmp;
+ u_int hv;
+{
+
+ printactiveaddress(hmp->hm_v, "%s", &hmp->hm_osrcip6, NULL);
+ putchar(',');
+ printactiveaddress(hmp->hm_v, "%s", &hmp->hm_odstip6, NULL);
+ PRINTF(" -> ");
+ printactiveaddress(hmp->hm_v, "%s", &hmp->hm_nsrcip6, NULL);
+ putchar(',');
+ printactiveaddress(hmp->hm_v, "%s", &hmp->hm_ndstip6, NULL);
+ putchar(' ');
+ PRINTF("(use = %d", hmp->hm_ref);
+ if (opts & OPT_VERBOSE)
+ PRINTF(" hv = %u", hv);
+ printf(")\n");
+}
OpenPOWER on IntegriCloud