summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2014-09-11 20:21:03 +0000
committerasomers <asomers@FreeBSD.org>2014-09-11 20:21:03 +0000
commit081aa8a15cafb217da990350e158841f186feab9 (patch)
tree71b9208dfb55df9be34d49b1987c426f39a452cb /share
parentae0e93b2247159ea6a1c08de59f85081e10446ce (diff)
downloadFreeBSD-src-081aa8a15cafb217da990350e158841f186feab9.zip
FreeBSD-src-081aa8a15cafb217da990350e158841f186feab9.tar.gz
Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
ifa_ifwithdstaddr. For the sake of backwards compatibility, the new arguments were added to new functions named ifa_ifwithnet_fib and ifa_ifwithdstaddr_fib, while the old functions became wrappers around the new ones that passed RT_ALL_FIBS for the fib argument. However, the backwards compatibility is not desired for FreeBSD 11, because there are numerous other incompatible changes to the ifnet(9) API. We therefore decided to remove it from head but leave it in place for stable/9 and stable/10. In addition, this commit adds the fib argument to ifa_ifwithbroadaddr for consistency's sake. sys/sys/param.h Increment __FreeBSD_version sys/net/if.c sys/net/if_var.h sys/net/route.c Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute. sys/net/route.c sys/net/rtsock.c sys/netinet/in_pcb.c sys/netinet/ip_options.c sys/netinet/ip_output.c sys/netinet6/nd6.c Fixup calls of modified functions. share/man/man9/ifnet.9 Document changed API. CR: https://reviews.freebsd.org/D458 MFC after: Never Sponsored by: Spectra Logic
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/ifnet.920
1 files changed, 16 insertions, 4 deletions
diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9
index ae21072..7aef4de 100644
--- a/share/man/man9/ifnet.9
+++ b/share/man/man9/ifnet.9
@@ -77,9 +77,9 @@
.Ft "struct ifaddr *"
.Fn ifa_ifwithaddr "struct sockaddr *addr"
.Ft "struct ifaddr *"
-.Fn ifa_ifwithdstaddr "struct sockaddr *addr"
+.Fn ifa_ifwithdstaddr "struct sockaddr *addr" "int fib"
.Ft "struct ifaddr *"
-.Fn ifa_ifwithnet "struct sockaddr *addr" "int ignore_ptp"
+.Fn ifa_ifwithnet "struct sockaddr *addr" "int ignore_ptp" "int fib"
.Ft "struct ifaddr *"
.Fn ifaof_ifpforaddr "struct sockaddr *addr" "struct ifnet *ifp"
.Ft void
@@ -1389,7 +1389,16 @@ returns an interface address for a point-to-point interface whose
remote
.Pq Dq destination
address is
-.Fa addr .
+.Fa addr
+and a fib is
+.Fa fib .
+If
+.Fa fib
+is
+.Dv RT_ALL_FIBS ,
+then the first interface address matching
+.Fa addr
+will be returned.
.Pp
.Fn ifa_ifwithnet
returns the most specific interface address which matches the
@@ -1401,7 +1410,10 @@ address whose remote address is
if one is found.
If
.Fa ignore_ptp
-is true, skip point-to-point interface addresses.
+is true, skip point-to-point interface addresses. The
+.Fa fib
+parameter is handled the same way as by
+.Fn ifa_ifwithdstaddr .
.Pp
.Fn ifaof_ifpforaddr
returns the most specific address configured on interface
OpenPOWER on IntegriCloud