summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/printactiveaddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/lib/printactiveaddr.c')
-rw-r--r--contrib/ipfilter/lib/printactiveaddr.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/contrib/ipfilter/lib/printactiveaddr.c b/contrib/ipfilter/lib/printactiveaddr.c
new file mode 100644
index 0000000..531cdc1
--- /dev/null
+++ b/contrib/ipfilter/lib/printactiveaddr.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2012 by Darren Reed.
+ *
+ * See the IPFILTER.LICENCE file for details on licencing.
+ *
+ * Added redirect stuff and a variety of bug fixes. (mcn@EnGarde.com)
+ */
+
+#include "ipf.h"
+
+
+#if !defined(lint)
+static const char rcsid[] = "@(#)$Id: printactiveaddr.c,v 1.3.2.2 2012/07/22 08:04:24 darren_r Exp $";
+#endif
+
+
+void
+printactiveaddress(v, fmt, addr, ifname)
+ int v;
+ char *fmt, *ifname;
+ i6addr_t *addr;
+{
+ switch (v)
+ {
+ case 4 :
+ PRINTF(fmt, inet_ntoa(addr->in4));
+ break;
+#ifdef USE_INET6
+ case 6 :
+ printaddr(AF_INET6, FRI_NORMAL, ifname, 0,
+ (u_32_t *)&addr->in6, NULL);
+ break;
+#endif
+ default :
+ break;
+ }
+}
OpenPOWER on IntegriCloud