From d178b14fd38aa15f7882168cac3b5bdeaafcb942 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 27 Apr 2013 17:52:49 +0200 Subject: [PATCH] miniupnpd/testgetifaddr: display addr and mask --- miniupnpd/testgetifaddr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/miniupnpd/testgetifaddr.c b/miniupnpd/testgetifaddr.c index 7bc9b92..4c31907 100644 --- a/miniupnpd/testgetifaddr.c +++ b/miniupnpd/testgetifaddr.c @@ -1,4 +1,4 @@ -/* $Id: testgetifaddr.c,v 1.6 2013/03/23 10:46:55 nanard Exp $ */ +/* $Id: testgetifaddr.c,v 1.7 2013/04/27 15:38:57 nanard Exp $ */ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2006-2013 Thomas Bernard @@ -6,7 +6,10 @@ * in the LICENCE file provided within the distribution */ #include #include +#include +#include #include +#include #include "getifaddr.h" #if defined(__sun) @@ -29,5 +32,7 @@ int main(int argc, char * * argv) { return 1; } printf("Interface %s has IP address %s.\n", argv[1], str_addr); + printf("addr=%s ", inet_ntoa(addr)); + printf("mask=%s\n", inet_ntoa(mask)); return 0; }