diff --git a/include/bits/in.h b/include/bits/in.h index f6b71f5..233a329 100644 --- a/include/bits/in.h +++ b/include/bits/in.h @@ -46,6 +46,10 @@ #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 */ + +#define MCAST_JOIN_GROUP 19 /* MCAST_JOIN_GROUP is protocol independent */ +#define MCAST_LEAVE_GROUP 22 + #if 0 /* not yet supported or defined */ #define IP_UNBLOCK_SOURCE 14 /* ip_mreq_source: unblock data from source */ #define IP_BLOCK_SOURCE 15 /* ip_mreq_source: block data from source */ @@ -124,14 +128,6 @@ struct ip_opts char ip_opts[40]; /* Actually variable in size. */ }; -/* Like `struct ip_mreq' but including interface specification by index. */ -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 */ - }; - /* Structure used for IP_PKTINFO. */ struct in_pktinfo { diff --git a/include/bits/socket.h b/include/bits/socket.h index ba6bc63..58016dd 100644 --- a/include/bits/socket.h +++ b/include/bits/socket.h @@ -174,6 +174,8 @@ struct sockaddr char sa_data[14]; /* Address data. */ }; + +#if 0 /* Structure large enough to hold any socket address (with the historical exception of AF_UNIX). We reserve 128 bytes. */ #define __ss_aligntype unsigned long int @@ -186,7 +188,22 @@ struct sockaddr_storage __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; +#endif + +/* + * Desired design of maximum size and alignment. + */ +#define _SS_MAXSIZE 128 +#define _SS_ALIGNSIZE sizeof(unsigned short) +#define _SS_PAD1SIZE ((2 * _SS_ALIGNSIZE - sizeof (sa_family_t)) % _SS_ALIGNSIZE) +#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (sa_family_t) + _SS_PAD1SIZE + _SS_ALIGNSIZE)) + +struct sockaddr_storage { + sa_family_t ss_family; + char __ss_pad1[_SS_PAD1SIZE]; + unsigned long __ss_align[_SS_PAD2SIZE / sizeof(unsigned long) + 1]; +}; /* Bits in the FLAGS argument to `send', `recv', et al. */ enum diff --git a/include/netinet/in.h b/include/netinet/in.h index 571a2a3..5d02c10 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -295,6 +295,15 @@ struct ip_mreq_source /* IP address of source. */ struct in_addr imr_sourceaddr; }; + +/* Like `struct ip_mreq' but including interface specification by index. */ +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 */ + }; + #endif #if !__USE_KERNEL_IPV6_DEFS diff --git a/include/sockios.h b/include/sockios.h index 19e600b..4f3b1ea 100644 --- a/include/sockios.h +++ b/include/sockios.h @@ -56,4 +56,13 @@ #define SIOCGARP (('S' << 8) | 41) /* get ARP table entry */ #define SIOCSARP (('S' << 8) | 42) /* set ARP table entry */ +#ifdef __USE_GNU + +#ifdef SIOCGIFNAME +#undef SIOCGIFNAME +#define SIOCGIFNAME SIOCGIFNAME_ETH +#endif + +#endif + #endif /* _SOCKIOS_H */