diff --git a/bsd/sys/netinet/in.h b/bsd/sys/netinet/in.h index 8c8915ce57c0d2f96aaaa20d2daa34ecb5f55ad3..ee5fb3412f49767b9508b9a68e95354999268515 100644 --- a/bsd/sys/netinet/in.h +++ b/bsd/sys/netinet/in.h @@ -468,24 +468,7 @@ __END_DECLS #define IP_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ #define IP_MAX_SOCK_MUTE_FILTER 128 /* XXX no longer used */ -/* - * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. - */ -struct ip_mreq { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ -}; - -/* - * Modified argument structure for IP_MULTICAST_IF, obtained from Linux. - * This is used to specify an interface index for multicast sends, as - * the IPv4 legacy APIs do not support this (unless IP_SENDIF is available). - */ -struct ip_mreqn { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index; cast to uint32_t */ -}; +#include <netinet/__in.h> /* * Argument structure for IPv4 Multicast Source Filter APIs. [RFC3678] diff --git a/include/api/netinet/__in.h b/include/api/netinet/__in.h new file mode 100644 index 0000000000000000000000000000000000000000..a2c6f29466ed274f857544d7f0dff22a3bb8c78a --- /dev/null +++ b/include/api/netinet/__in.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2013 Cloudius Systems, Ltd. + * + * This work is open source software, licensed under the terms of the + * BSD license as described in the LICENSE file in the top-level directory. + */ + + +#ifndef OSV__IN_H_ +#define OSV__IN_H_ + +struct ip_mreq { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_interface; /* local IP address of interface */ +}; + +struct ip_mreqn { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_address; /* local IP address of interface */ + int imr_ifindex; /* Interface index; cast to uint32_t */ +}; + +#endif /* OSV__IN_H_ */ diff --git a/include/api/netinet/in.h b/include/api/netinet/in.h index 32f9ff222863473f735228a58f61db21bff72813..4d01afef1eedcf0ea3b99dfdf75353ec6f3f359a 100644 --- a/include/api/netinet/in.h +++ b/include/api/netinet/in.h @@ -242,18 +242,7 @@ struct ip_opts char ip_opts[40]; }; -struct ip_mreq -{ - struct in_addr imr_multiaddr; - struct in_addr imr_interface; -}; - -struct ip_mreqn -{ - struct in_addr imr_multiaddr; - struct in_addr imr_address; - int imr_ifindex; -}; +#include <netinet/__in.h> struct in_pktinfo {