2 * Copyright (C) 2009 Robert Shearman
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 /* FIXME: #include <inaddr.h> */
30 #ifndef __CSADDR_DEFINED__
31 #define __CSADDR_DEFINED__
33 typedef struct _SOCKET_ADDRESS
{
34 LPSOCKADDR lpSockaddr
;
36 } SOCKET_ADDRESS
, *PSOCKET_ADDRESS
, *LPSOCKET_ADDRESS
;
38 typedef struct _CSADDR_INFO
{
39 SOCKET_ADDRESS LocalAddr
;
40 SOCKET_ADDRESS RemoteAddr
;
43 } CSADDR_INFO
, *PCSADDR_INFO
, *LPCSADDR_INFO
;
47 #define WS__SS_MAXSIZE 128
48 #define WS__SS_ALIGNSIZE (sizeof(__int64))
49 #define WS__SS_PAD1SIZE (WS__SS_ALIGNSIZE - sizeof(short))
50 #define WS__SS_PAD2SIZE (WS__SS_MAXSIZE - 2 * WS__SS_ALIGNSIZE)
52 #define _SS_MAXSIZE 128
53 #define _SS_ALIGNSIZE (sizeof(__int64))
54 #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(short))
55 #define _SS_PAD2SIZE (_SS_MAXSIZE - 2 * _SS_ALIGNSIZE)
58 typedef struct WS(sockaddr_storage
) {
60 char __ss_pad1
[WS(_SS_PAD1SIZE
)];
61 __int64
DECLSPEC_ALIGN(8) __ss_align
;
62 char __ss_pad2
[WS(_SS_PAD2SIZE
)];
63 } SOCKADDR_STORAGE
, *PSOCKADDR_STORAGE
, *LPSOCKADDR_STORAGE
;
65 /*socket address list */
66 typedef struct _SOCKET_ADDRESS_LIST
{
68 SOCKET_ADDRESS Address
[1];
69 } SOCKET_ADDRESS_LIST
, *LPSOCKET_ADDRESS_LIST
;