1/* 2 * Copyright (C) 2002-2004 by Darren Reed. 3 * 4 * See the IPFILTER.LICENCE file for details on licencing. 5 * 6 * Added redirect stuff and a variety of bug fixes. (mcn@EnGarde.com) 7 */ 8 9#include "ipf.h" 10 11#pragma ident "%Z%%M% %I% %E% SMI" 12 13#if !defined(lint) 14static const char rcsid[] = "@(#)$Id: printactiveaddr.c,v 1.1 2008/02/12 16:11:49 darren_r Exp $"; 15#endif 16 17void 18printactiveaddress(v, fmt, addr, ifname) 19 int v; 20 char *fmt; 21 i6addr_t *addr; 22 char *ifname; 23{ 24 switch (v) 25 { 26 case 4 : 27 printf(fmt, inet_ntoa(addr->in4)); 28 break; 29#ifdef USE_INET6 30 case 6 : 31 printaddr(v, FRI_NORMAL, ifname, (u_32_t *)&addr->in6, NULL); 32 break; 33#endif 34 default : 35 break; 36 } 37} 38