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