2 * Copyright (C) 2001 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 /* FIXME: This gets defined by some Unix (Linux) header and messes things */
32 * Multicast group information
37 struct WS(in_addr
) imr_multiaddr
;
38 struct WS(in_addr
) imr_interface
;
41 struct WS(ip_mreq_source
) {
42 struct WS(in_addr
) imr_multiaddr
;
43 struct WS(in_addr
) imr_sourceaddr
;
44 struct WS(in_addr
) imr_interface
;
47 struct WS(ip_msfilter
) {
48 struct WS(in_addr
) imsf_multiaddr
;
49 struct WS(in_addr
) imsf_interface
;
52 struct WS(in_addr
) imsf_slist
[1];
55 typedef struct WS(in_addr6
)
57 u_char s6_addr
[16]; /* IPv6 address */
58 } IN6_ADDR
, *PIN6_ADDR
, *LPIN6_ADDR
;
60 typedef struct WS(sockaddr_in6
)
62 short sin6_family
; /* AF_INET6 */
63 u_short sin6_port
; /* Transport level port number */
64 u_long sin6_flowinfo
; /* IPv6 flow information */
65 struct WS(in_addr6
) sin6_addr
; /* IPv6 address */
66 } SOCKADDR_IN6
,*PSOCKADDR_IN6
, *LPSOCKADDR_IN6
;
68 typedef union sockaddr_gen
70 struct WS(sockaddr
) Address
;
71 struct WS(sockaddr_in
) AddressIn
;
72 struct WS(sockaddr_in6
) AddressIn6
;
75 /* Structure to keep interface specific information */
76 typedef struct _INTERFACE_INFO
78 u_long iiFlags
; /* Interface flags */
79 WS(sockaddr_gen
) iiAddress
; /* Interface address */
80 WS(sockaddr_gen
) iiBroadcastAddress
; /* Broadcast address */
81 WS(sockaddr_gen
) iiNetmask
; /* Network mask */
82 } INTERFACE_INFO
, * LPINTERFACE_INFO
;
84 /* Possible flags for the iiFlags - bitmask */
86 #define IFF_UP 0x00000001 /* Interface is up */
87 #define IFF_BROADCAST 0x00000002 /* Broadcast is supported */
88 #define IFF_LOOPBACK 0x00000004 /* this is loopback interface */
89 #define IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
90 #define IFF_MULTICAST 0x00000010 /* multicast is supported */
92 #define WS_IFF_UP 0x00000001 /* Interface is up */
93 #define WS_IFF_BROADCAST 0x00000002 /* Broadcast is supported */
94 #define WS_IFF_LOOPBACK 0x00000004 /* this is loopback interface */
95 #define WS_IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
96 #define WS_IFF_MULTICAST 0x00000010 /* multicast is supported */
97 #endif /* USE_WS_PREFIX */
104 #define IP_MULTICAST_IF 9
105 #define IP_MULTICAST_TTL 10
106 #define IP_MULTICAST_LOOP 11
107 #define IP_ADD_MEMBERSHIP 12
108 #define IP_DROP_MEMBERSHIP 13
109 #define IP_DONTFRAGMENT 14
111 #define WS_IP_OPTIONS 1
112 #define WS_IP_HDRINCL 2
115 #define WS_IP_MULTICAST_IF 9
116 #define WS_IP_MULTICAST_TTL 10
117 #define WS_IP_MULTICAST_LOOP 11
118 #define WS_IP_ADD_MEMBERSHIP 12
119 #define WS_IP_DROP_MEMBERSHIP 13
120 #define WS_IP_DONTFRAGMENT 14
121 #endif /* USE_WS_PREFIX */
123 #endif /* __WS2TCPIP__ */