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 */
31 typedef struct WS(in_addr6
)
33 u_char s6_addr
[16]; /* IPv6 address */
34 } IN6_ADDR
, *PIN6_ADDR
, *LPIN6_ADDR
;
36 typedef struct WS(sockaddr_in6
)
38 short sin6_family
; /* AF_INET6 */
39 u_short sin6_port
; /* Transport level port number */
40 u_long sin6_flowinfo
; /* IPv6 flow information */
41 struct WS(in_addr6
) sin6_addr
; /* IPv6 address */
42 } SOCKADDR_IN6
,*PSOCKADDR_IN6
, *LPSOCKADDR_IN6
;
44 typedef union sockaddr_gen
46 struct WS(sockaddr
) Address
;
47 struct WS(sockaddr_in
) AddressIn
;
48 struct WS(sockaddr_in6
) AddressIn6
;
51 /* Structure to keep interface specific information */
52 typedef struct _INTERFACE_INFO
54 u_long iiFlags
; /* Interface flags */
55 WS(sockaddr_gen
) iiAddress
; /* Interface address */
56 WS(sockaddr_gen
) iiBroadcastAddress
; /* Broadcast address */
57 WS(sockaddr_gen
) iiNetmask
; /* Network mask */
58 } INTERFACE_INFO
, * LPINTERFACE_INFO
;
60 /* Possible flags for the iiFlags - bitmask */
62 #define IFF_UP 0x00000001 /* Interface is up */
63 #define IFF_BROADCAST 0x00000002 /* Broadcast is supported */
64 #define IFF_LOOPBACK 0x00000004 /* this is loopback interface */
65 #define IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
66 #define IFF_MULTICAST 0x00000010 /* multicast is supported */
68 #define WS_IFF_UP 0x00000001 /* Interface is up */
69 #define WS_IFF_BROADCAST 0x00000002 /* Broadcast is supported */
70 #define WS_IFF_LOOPBACK 0x00000004 /* this is loopback interface */
71 #define WS_IFF_POINTTOPOINT 0x00000008 /* this is point-to-point interface */
72 #define WS_IFF_MULTICAST 0x00000010 /* multicast is supported */
73 #endif /* USE_WS_PREFIX */
75 #endif /* __WS2TCPIP__ */