141edb306SCy Schubert /*
241edb306SCy Schubert * Copyright (C) 2012 by Darren Reed.
341edb306SCy Schubert *
441edb306SCy Schubert * See the IPFILTER.LICENCE file for details on licencing.
541edb306SCy Schubert *
641edb306SCy Schubert * Added redirect stuff and a variety of bug fixes. (mcn@EnGarde.com)
741edb306SCy Schubert */
841edb306SCy Schubert
941edb306SCy Schubert #include "ipf.h"
1041edb306SCy Schubert
1141edb306SCy Schubert
1241edb306SCy Schubert
1341edb306SCy Schubert
1441edb306SCy Schubert void
printactiveaddress(int v,char * fmt,i6addr_t * addr,char * ifname)15*efeb8bffSCy Schubert printactiveaddress(int v, char *fmt, i6addr_t *addr, char *ifname)
1641edb306SCy Schubert {
1741edb306SCy Schubert switch (v)
1841edb306SCy Schubert {
1941edb306SCy Schubert case 4 :
2041edb306SCy Schubert PRINTF(fmt, inet_ntoa(addr->in4));
2141edb306SCy Schubert break;
2241edb306SCy Schubert #ifdef USE_INET6
2341edb306SCy Schubert case 6 :
2441edb306SCy Schubert printaddr(AF_INET6, FRI_NORMAL, ifname, 0,
2541edb306SCy Schubert (u_32_t *)&addr->in6, NULL);
2641edb306SCy Schubert break;
2741edb306SCy Schubert #endif
2841edb306SCy Schubert default :
2941edb306SCy Schubert break;
3041edb306SCy Schubert }
3141edb306SCy Schubert }
32