Add various defines/macros required by IGMPv3:
* MCAST_UNDEFINED state. * in_allhosts() macro (group is 224.0.0.1). This uses a const endian comparison. * IP_MAX_GROUP_SRC_FILTER, IP_MAX_SOCK_SRC_FILTER default resource limits.
This commit is contained in:
parent
a96a4bbcf0
commit
b554b6ca91
@ -501,7 +501,14 @@ __END_DECLS
|
||||
*/
|
||||
#define IP_MIN_MEMBERSHIPS 31
|
||||
#define IP_MAX_MEMBERSHIPS 4095
|
||||
#define IP_MAX_SOURCE_FILTER 1024 /* # of filters per socket, per group */
|
||||
#define IP_MAX_SOURCE_FILTER 1024 /* XXX to be unused */
|
||||
|
||||
/*
|
||||
* Default resource limits for IPv4 multicast source filtering.
|
||||
* These may be modified by sysctl.
|
||||
*/
|
||||
#define IP_MAX_GROUP_SRC_FILTER 512 /* sources per group */
|
||||
#define IP_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */
|
||||
|
||||
/*
|
||||
* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
|
||||
@ -584,6 +591,7 @@ int getsourcefilter(int, uint32_t, struct sockaddr *, socklen_t,
|
||||
/*
|
||||
* Filter modes; also used to represent per-socket filter mode internally.
|
||||
*/
|
||||
#define MCAST_UNDEFINED 0 /* fmode: not yet defined */
|
||||
#define MCAST_INCLUDE 1 /* fmode: include these source(s) */
|
||||
#define MCAST_EXCLUDE 2 /* fmode: exclude these source(s) */
|
||||
|
||||
@ -731,6 +739,7 @@ void in_ifdetach(struct ifnet *);
|
||||
|
||||
#define in_hosteq(s, t) ((s).s_addr == (t).s_addr)
|
||||
#define in_nullhost(x) ((x).s_addr == INADDR_ANY)
|
||||
#define in_allhosts(x) ((x).s_addr == htonl(INADDR_ALLHOSTS_GROUP))
|
||||
|
||||
#define satosin(sa) ((struct sockaddr_in *)(sa))
|
||||
#define sintosa(sin) ((struct sockaddr *)(sin))
|
||||
|
Loading…
x
Reference in New Issue
Block a user