diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-10-23 10:22:31 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2015-10-23 10:22:31 +0000 |
commit | d0e914952ac6acf71103ad34d6307e60937d99f2 (patch) | |
tree | a0f023eb1cfb52a512cc7fb137d9400433952ef5 /sys/net/if.h | |
parent | 302c8cd7894d4b7403fdab6604cd441749367ed7 (diff) |
Introduce a new sysctl NET_RT_IFNAMES that returns only ifnames to ifindex
mappings. This will be used by if_nameindex(3), if_nametoindex(3) and
if_indextoname(3) soon to fix the issues in pledge because of inet6 link
local addressing.
OK mpi@ benno@ deraadt@
The libc version will follow soon so better start updating your kernels
Diffstat (limited to 'sys/net/if.h')
-rw-r--r-- | sys/net/if.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 82dd41cc06e..760892939c1 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.170 2015/10/23 01:19:04 dlg Exp $ */ +/* $OpenBSD: if.h,v 1.171 2015/10/23 10:22:29 claudio Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -304,6 +304,12 @@ struct if_announcemsghdr { #define IFAN_ARRIVAL 0 /* interface arrival */ #define IFAN_DEPARTURE 1 /* interface departure */ +/* message format used to pass interface name to index mappings */ +struct if_nameindex_msg { + unsigned int if_index; + char if_name[IFNAMSIZ]; +}; + /* * interface groups */ |