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