diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-06-22 10:59:34 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-06-22 10:59:34 +0000 |
commit | 3c02410d55d9cfe0cb4dcbfad5eef376463d8e08 (patch) | |
tree | 45a4f946feeb75c5ed5e8dcc028809c6966e1ba1 /sys/net/if_var.h | |
parent | 0b01d8c2101aa4512c45bd77f2c3fee5137b4595 (diff) | |
download | FreeBSD-src-3c02410d55d9cfe0cb4dcbfad5eef376463d8e08.zip FreeBSD-src-3c02410d55d9cfe0cb4dcbfad5eef376463d8e08.tar.gz |
Add a new function, ifa_ifwithaddr_check(), which rather than returning
a pointer to an ifaddr matching the passed socket address, returns a
boolean indicating whether one was present. In the (near) future,
ifa_ifwithaddr() will return a referenced ifaddr rather than a raw
ifaddr pointer, and the new wrapper will allow callers that care only
about the boolean condition to avoid having to free that reference.
MFC after: 3 weeks
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r-- | sys/net/if_var.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index cbd274a..35e4232 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -820,6 +820,7 @@ void ifq_init(struct ifaltq *, struct ifnet *ifp); void ifq_delete(struct ifaltq *); struct ifaddr *ifa_ifwithaddr(struct sockaddr *); +int ifa_ifwithaddr_check(struct sockaddr *); struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *); struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); struct ifaddr *ifa_ifwithnet(struct sockaddr *); |