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