Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net Add ifa_addrflags to ifaddrs.
details: https://anonhg.NetBSD.org/src/rev/ff72586533c9
branches: trunk
changeset: 347886:ff72586533c9
user: roy <roy%NetBSD.org@localhost>
date: Wed Sep 21 10:53:24 2016 +0000
description:
Add ifa_addrflags to ifaddrs.
diffstat:
lib/libc/net/getifaddrs.3 | 13 +++++++++++--
lib/libc/net/getifaddrs.c | 5 +++--
2 files changed, 14 insertions(+), 4 deletions(-)
diffs (74 lines):
diff -r 3dd5d35c0b0c -r ff72586533c9 lib/libc/net/getifaddrs.3
--- a/lib/libc/net/getifaddrs.3 Wed Sep 21 10:52:13 2016 +0000
+++ b/lib/libc/net/getifaddrs.3 Wed Sep 21 10:53:24 2016 +0000
@@ -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 @@
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 @@
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 @@
.Nm
implementation first appeared in
.Bsx .
+.Pp
+.Li ifa_addrflags
+was added in
+.Nx 8.0 .
.Sh BUGS
If both
.In net/if.h
diff -r 3dd5d35c0b0c -r ff72586533c9 lib/libc/net/getifaddrs.c
--- a/lib/libc/net/getifaddrs.c Wed Sep 21 10:52:13 2016 +0000
+++ b/lib/libc/net/getifaddrs.c Wed Sep 21 10:53:24 2016 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index