1 /* 2 * Copyright (C) 2012 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 12 #if !defined(lint) 13 static const char rcsid[] = "@(#)$Id: printactiveaddr.c,v 1.3.2.2 2012/07/22 08:04:24 darren_r Exp $"; 14 #endif 15 16 17 void 18 printactiveaddress(int v, char *fmt, i6addr_t *addr, char *ifname) 19 { 20 switch (v) 21 { 22 case 4 : 23 PRINTF(fmt, inet_ntoa(addr->in4)); 24 break; 25 #ifdef USE_INET6 26 case 6 : 27 printaddr(AF_INET6, FRI_NORMAL, ifname, 0, 28 (u_32_t *)&addr->in6, NULL); 29 break; 30 #endif 31 default : 32 break; 33 } 34 } 35