Reorder new multicast options to conform to BSD. (struct ip_mreq): New type.

This commit is contained in:
Thomas Bushnell, BSG 1995-08-08 16:29:15 +00:00
parent 5dedb8013e
commit 527fbc2a8c
1 changed files with 11 additions and 5 deletions

View File

@ -166,11 +166,11 @@ struct sockaddr_in
#define IP_RECVRETOPTS 6 /* bool; Receive IP options for response. */
#define IP_RECVDSTADDR 7 /* bool; Receive IP dst addr w/datagram. */
#define IP_RETOPTS 8 /* ip_opts; Set/get IP per-packet options. */
#define IP_MULTICAST_TTL 9 /* int; TTL for multicast packets */
#define IP_MULTICAST_LOOP 10 /* bool; Use loopback for multicast */
#define IP_MULTICAST_IF 11 /* not used; intended to specify interface */
#define IP_ADD_MEMBERSHIP 12 /* int; join multicast group */
#define IP_DROP_MEMBERSHIP 13 /* int; leave multicast group */
#define IP_MULTICAST_IF 9 /* in_addr; set/get IP multicast i/f */
#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */
#define IP_MULTICAST_LOOP 11 /* i_char; set/get IP multicast loopback */
#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */
#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
/* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
The `ip_dst' field is used for the first-hop gateway when using a
@ -181,6 +181,12 @@ struct ip_opts
char ip_opts[40]; /* Actually variable in size. */
};
/* Structure used 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 */
};
/* Functions to convert between host and network byte order. */