File tree Expand file tree Collapse file tree 4 files changed +39
-8
lines changed Expand file tree Collapse file tree 4 files changed +39
-8
lines changed Original file line number Diff line number Diff line change 46
46
#define IP_MULTICAST_LOOP 11 /* i_char; set/get IP multicast loopback */
47
47
#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */
48
48
#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
49
+
50
+ #define MCAST_JOIN_GROUP 19 /* MCAST_JOIN_GROUP is protocol independent */
51
+ #define MCAST_LEAVE_GROUP 22
52
+
49
53
#if 0 /* not yet supported or defined */
50
54
#define IP_UNBLOCK_SOURCE 14 /* ip_mreq_source: unblock data from source */
51
55
#define IP_BLOCK_SOURCE 15 /* ip_mreq_source: block data from source */
@@ -124,14 +128,6 @@ struct ip_opts
124
128
char ip_opts [40 ]; /* Actually variable in size. */
125
129
};
126
130
127
- /* Like `struct ip_mreq' but including interface specification by index. */
128
- struct ip_mreqn
129
- {
130
- struct in_addr imr_multiaddr ; /* IP multicast address of group */
131
- struct in_addr imr_address ; /* local IP address of interface */
132
- int imr_ifindex ; /* Interface index */
133
- };
134
-
135
131
/* Structure used for IP_PKTINFO. */
136
132
struct in_pktinfo
137
133
{
Original file line number Diff line number Diff line change @@ -174,6 +174,8 @@ struct sockaddr
174
174
char sa_data [14 ]; /* Address data. */
175
175
};
176
176
177
+
178
+ #if 0
177
179
/* Structure large enough to hold any socket address (with the historical
178
180
exception of AF_UNIX). We reserve 128 bytes. */
179
181
#define __ss_aligntype unsigned long int
@@ -186,7 +188,22 @@ struct sockaddr_storage
186
188
__ss_aligntype __ss_align ; /* Force desired alignment. */
187
189
char __ss_padding [_SS_PADSIZE ];
188
190
};
191
+ #endif
192
+
193
+ /*
194
+ * Desired design of maximum size and alignment.
195
+ */
196
+ #define _SS_MAXSIZE 128
197
+ #define _SS_ALIGNSIZE sizeof(unsigned short)
189
198
199
+ #define _SS_PAD1SIZE ((2 * _SS_ALIGNSIZE - sizeof (sa_family_t)) % _SS_ALIGNSIZE)
200
+ #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (sa_family_t) + _SS_PAD1SIZE + _SS_ALIGNSIZE))
201
+
202
+ struct sockaddr_storage {
203
+ sa_family_t ss_family ;
204
+ char __ss_pad1 [_SS_PAD1SIZE ];
205
+ unsigned long __ss_align [_SS_PAD2SIZE / sizeof (unsigned long ) + 1 ];
206
+ };
190
207
191
208
/* Bits in the FLAGS argument to `send', `recv', et al. */
192
209
enum
Original file line number Diff line number Diff line change @@ -295,6 +295,15 @@ struct ip_mreq_source
295
295
/* IP address of source. */
296
296
struct in_addr imr_sourceaddr ;
297
297
};
298
+
299
+ /* Like `struct ip_mreq' but including interface specification by index. */
300
+ struct ip_mreqn
301
+ {
302
+ struct in_addr imr_multiaddr ; /* IP multicast address of group */
303
+ struct in_addr imr_address ; /* local IP address of interface */
304
+ int imr_ifindex ; /* Interface index */
305
+ };
306
+
298
307
#endif
299
308
300
309
#if !__USE_KERNEL_IPV6_DEFS
Original file line number Diff line number Diff line change 56
56
#define SIOCGARP (('S' << 8) | 41) /* get ARP table entry */
57
57
#define SIOCSARP (('S' << 8) | 42) /* set ARP table entry */
58
58
59
+ #ifdef __USE_GNU
60
+
61
+ #ifdef SIOCGIFNAME
62
+ #undef SIOCGIFNAME
63
+ #define SIOCGIFNAME SIOCGIFNAME_ETH
64
+ #endif
65
+
66
+ #endif
67
+
59
68
#endif /* _SOCKIOS_H */
You can’t perform that action at this time.
0 commit comments