Module Name:    src
Committed By:   roy
Date:           Wed Sep 21 10:53:24 UTC 2016

Modified Files:
        src/lib/libc/net: getifaddrs.3 getifaddrs.c

Log Message:
Add ifa_addrflags to ifaddrs.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/net/getifaddrs.3
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/net/getifaddrs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/net/getifaddrs.3
diff -u src/lib/libc/net/getifaddrs.3:1.16 src/lib/libc/net/getifaddrs.3:1.17
--- src/lib/libc/net/getifaddrs.3:1.16	Sat Jan 23 07:21:18 2016
+++ src/lib/libc/net/getifaddrs.3	Wed Sep 21 10:53:24 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: getifaddrs.3,v 1.16 2016/01/23 07:21:18 wiz Exp $
+.\"	$NetBSD: getifaddrs.3,v 1.17 2016/09/21 10:53:24 roy Exp $
 .\"	BSDI	getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp
 .\"
 .\" Copyright (c) 1995, 1999
@@ -21,7 +21,7 @@
 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
-.Dd April 7, 2013
+.Dd September 15, 2016
 .Dt GETIFADDRS 3
 .Os
 .Sh NAME
@@ -57,6 +57,7 @@ structure contains at least the followin
     struct sockaddr  *ifa_broadaddr;    /* Interface broadcast address */
     struct sockaddr  *ifa_dstaddr;      /* P2P interface destination */
     void             *ifa_data;		/* Address specific data */
+    unsigned int      ifa_addrflags;    /* Address flags */
 .Ed
 .Pp
 The
@@ -123,6 +124,10 @@ which contains various interface attribu
 For all other address families, it is
 .Dv NULL .
 .Pp
+The
+.Li ifa_addrflags
+field contains the address flags, which are specific to the address family.
+.Pp
 The data returned by
 .Fn getifaddrs
 is dynamically allocated and should be freed using
@@ -185,6 +190,10 @@ The
 .Nm
 implementation first appeared in
 .Bsx .
+.Pp
+.Li ifa_addrflags
+was added in
+.Nx 8.0 .
 .Sh BUGS
 If both
 .In net/if.h

Index: src/lib/libc/net/getifaddrs.c
diff -u src/lib/libc/net/getifaddrs.c:1.15 src/lib/libc/net/getifaddrs.c:1.16
--- src/lib/libc/net/getifaddrs.c:1.15	Tue Mar 13 21:13:40 2012
+++ src/lib/libc/net/getifaddrs.c	Wed Sep 21 10:53:24 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: getifaddrs.c,v 1.15 2012/03/13 21:13:40 christos Exp $	*/
+/*	$NetBSD: getifaddrs.c,v 1.16 2016/09/21 10:53:24 roy Exp $	*/
 
 /*
  * Copyright (c) 1995, 1999
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getifaddrs.c,v 1.15 2012/03/13 21:13:40 christos Exp $");
+__RCSID("$NetBSD: getifaddrs.c,v 1.16 2016/09/21 10:53:24 roy Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #ifndef RUMP_ACTION
@@ -225,6 +225,7 @@ getifaddrs(struct ifaddrs **pif)
 			ift->ifa_name = cif.ifa_name;
 			ift->ifa_flags = cif.ifa_flags;
 			ift->ifa_data = NULL;
+			ift->ifa_addrflags = ifam->ifam_addrflags;
 			p = (char *)(void *)(ifam + 1);
 			/* Scan to look for length of address */
 			alen = 0;

Reply via email to