diff options
author | bluhm <bluhm@openbsd.org> | 2017-05-04 15:00:24 +0000 |
---|---|---|
committer | bluhm <bluhm@openbsd.org> | 2017-05-04 15:00:24 +0000 |
commit | 9c681c750c71b1888ae24096ace29acee5c25b57 (patch) | |
tree | 5a71a78d046e6ca5c91ce437e79f0d81adddd1b6 /sys/netinet6/in6.h | |
parent | For TCP sockets netstat -A must print the address of the TCP protocol (diff) | |
download | wireguard-openbsd-9c681c750c71b1888ae24096ace29acee5c25b57.tar.xz wireguard-openbsd-9c681c750c71b1888ae24096ace29acee5c25b57.zip |
Introduce sstosa() for converting sockaddr_storage with a type safe
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@
Diffstat (limited to 'sys/netinet6/in6.h')
-rw-r--r-- | sys/netinet6/in6.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 6f12fe5e3c1..53ac30ddc48 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.h,v 1.93 2017/02/22 13:46:53 renato Exp $ */ +/* $OpenBSD: in6.h,v 1.94 2017/05/04 15:00:24 bluhm Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -438,19 +438,19 @@ struct in6_ifaddr; * casts or defines. */ -static __inline struct sockaddr_in6 * +static inline struct sockaddr_in6 * satosin6(struct sockaddr *sa) { return ((struct sockaddr_in6 *)(sa)); } -static __inline struct sockaddr * +static inline struct sockaddr * sin6tosa(struct sockaddr_in6 *sin6) { return ((struct sockaddr *)(sin6)); } -static __inline struct in6_ifaddr * +static inline struct in6_ifaddr * ifatoia6(struct ifaddr *ifa) { return ((struct in6_ifaddr *)(ifa)); |