Annotation of ntddk/src/network/inc/wsahelp.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1992 Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     WsaHelp.h
                      8: 
                      9: Abstract:
                     10: 
                     11:     This header file contains prototypes required for Windows Sockets
                     12:     Helper DLLs.  The helper DLLs allow the Windows Sockets DLL to be
                     13:     transport independent by suppling the necessary option get/set and
                     14:     address conversion routines for an individual transport or transport
                     15:     family.
                     16: 
                     17: Author:
                     18: 
                     19:     David Treadwell (davidtr)    15-Jul-1992
                     20: 
                     21: Revision History:
                     22: 
                     23: --*/
                     24: 
                     25: //
                     26: // Notification event definitions.  A helper DLL returns a mask of the
                     27: // events for which it wishes to be notified, and the Windows Sockets
                     28: // DLL calls the helper DLL in WSHNotify for each requested event.
                     29: //
                     30: 
                     31: #define WSH_NOTIFY_BIND                 0x01
                     32: #define WSH_NOTIFY_LISTEN               0x02
                     33: #define WSH_NOTIFY_CONNECT              0x04
                     34: #define WSH_NOTIFY_ACCEPT               0x08
                     35: #define WSH_NOTIFY_SHUTDOWN_RECEIVE     0x10
                     36: #define WSH_NOTIFY_SHUTDOWN_SEND        0x20
                     37: #define WSH_NOTIFY_SHUTDOWN_ALL         0x40
                     38: #define WSH_NOTIFY_CLOSE                0x80
                     39: 
                     40: //
                     41: // Definitions for various internal socket options.  These are used
                     42: // by the Windows Sockets DLL to communicate information to the helper
                     43: // DLL via get and set socket information calls.
                     44: //
                     45: 
                     46: #define SOL_INTERNAL 0xFFFE
                     47: #define SO_CONTEXT 1
                     48: 
                     49: //
                     50: // Open, Notify, and Socket Option routine prototypes.
                     51: //
                     52: 
                     53: typedef
                     54: INT
                     55: (* WINAPI PWSH_OPEN_SOCKET) (
                     56:     IN PINT AddressFamily,
                     57:     IN PINT SocketType,
                     58:     IN PINT Protocol,
                     59:     OUT PUNICODE_STRING TransportDeviceName,
                     60:     OUT PVOID *HelperDllSocketContext,
                     61:     OUT PDWORD NotificationEvents
                     62:     );
                     63: 
                     64: INT
                     65: WINAPI
                     66: WSHOpenSocket (
                     67:     IN OUT PINT AddressFamily,
                     68:     IN OUT PINT SocketType,
                     69:     IN OUT PINT Protocol,
                     70:     OUT PUNICODE_STRING TransportDeviceName,
                     71:     OUT PVOID *HelperDllSocketContext,
                     72:     OUT PDWORD NotificationEvents
                     73:     );
                     74: 
                     75: typedef
                     76: INT
                     77: (* WINAPI PWSH_NOTIFY) (
                     78:     IN PVOID HelperDllSocketContext,
                     79:     IN SOCKET SocketHandle,
                     80:     IN HANDLE TdiAddressObjectHandle,
                     81:     IN HANDLE TdiConnectionObjectHandle,
                     82:     IN DWORD NotifyEvent
                     83:     );
                     84: 
                     85: INT
                     86: WINAPI
                     87: WSHNotify (
                     88:     IN PVOID HelperDllSocketContext,
                     89:     IN SOCKET SocketHandle,
                     90:     IN HANDLE TdiAddressObjectHandle,
                     91:     IN HANDLE TdiConnectionObjectHandle,
                     92:     IN DWORD NotifyEvent
                     93:     );
                     94: 
                     95: typedef
                     96: INT
                     97: (* WINAPI PWSH_GET_SOCKET_INFORMATION) (
                     98:     IN PVOID HelperDllSocketContext,
                     99:     IN SOCKET SocketHandle,
                    100:     IN HANDLE TdiAddressObjectHandle,
                    101:     IN HANDLE TdiConnectionObjectHandle,
                    102:     IN INT Level,
                    103:     IN INT OptionName,
                    104:     OUT PCHAR OptionValue,
                    105:     OUT PINT OptionLength
                    106:     );
                    107: 
                    108: INT
                    109: WINAPI
                    110: WSHGetSocketInformation (
                    111:     IN PVOID HelperDllSocketContext,
                    112:     IN SOCKET SocketHandle,
                    113:     IN HANDLE TdiAddressObjectHandle,
                    114:     IN HANDLE TdiConnectionObjectHandle,
                    115:     IN INT Level,
                    116:     IN INT OptionName,
                    117:     OUT PCHAR OptionValue,
                    118:     OUT PINT OptionLength
                    119:     );
                    120: 
                    121: typedef
                    122: INT
                    123: (* WINAPI PWSH_SET_SOCKET_INFORMATION) (
                    124:     IN PVOID HelperDllSocketContext,
                    125:     IN SOCKET SocketHandle,
                    126:     IN HANDLE TdiAddressObjectHandle,
                    127:     IN HANDLE TdiConnectionObjectHandle,
                    128:     IN INT Level,
                    129:     IN INT OptionName,
                    130:     IN PCHAR OptionValue,
                    131:     IN INT OptionLength
                    132:     );
                    133: 
                    134: INT
                    135: WINAPI
                    136: WSHSetSocketInformation (
                    137:     IN PVOID HelperDllSocketContext,
                    138:     IN SOCKET SocketHandle,
                    139:     IN HANDLE TdiAddressObjectHandle,
                    140:     IN HANDLE TdiConnectionObjectHandle,
                    141:     IN INT Level,
                    142:     IN INT OptionName,
                    143:     IN PCHAR OptionValue,
                    144:     IN INT OptionLength
                    145:     );
                    146: 
                    147: //
                    148: // Structure and routine for determining the address family/socket
                    149: // type/protocol triples supported by an individual Windows Sockets
                    150: // Helper DLL.  The Rows field of WINSOCK_MAPPING determines the
                    151: // number of entries in the Mapping[] array; the Columns field is
                    152: // always 3 for Windows/NT product 1.
                    153: //
                    154: 
                    155: typedef struct _WINSOCK_MAPPING {
                    156:     DWORD Rows;
                    157:     DWORD Columns;
                    158:     struct {
                    159:         DWORD AddressFamily;
                    160:         DWORD SocketType;
                    161:         DWORD Protocol;
                    162:     } Mapping[1];
                    163: } WINSOCK_MAPPING, *PWINSOCK_MAPPING;
                    164: 
                    165: typedef
                    166: DWORD
                    167: (* WINAPI PWSH_GET_WINSOCK_MAPPING) (
                    168:     OUT PWINSOCK_MAPPING Mapping,
                    169:     IN DWORD MappingLength
                    170:     );
                    171: 
                    172: DWORD
                    173: WINAPI
                    174: WSHGetWinsockMapping (
                    175:     OUT PWINSOCK_MAPPING Mapping,
                    176:     IN DWORD MappingLength
                    177:     );
                    178: 
                    179: //
                    180: // Address manipulation routine.
                    181: //
                    182: 
                    183: typedef enum _SOCKADDR_ADDRESS_INFO {
                    184:     SockaddrAddressInfoNormal,
                    185:     SockaddrAddressInfoWildcard,
                    186:     SockaddrAddressInfoBroadcast,
                    187:     SockaddrAddressInfoLoopback
                    188: } SOCKADDR_ADDRESS_INFO, *PSOCKADDR_ADDRESS_INFO;
                    189: 
                    190: typedef enum _SOCKADDR_ENDPOINT_INFO {
                    191:     SockaddrEndpointInfoNormal,
                    192:     SockaddrEndpointInfoWildcard,
                    193:     SockaddrEndpointInfoReserved
                    194: } SOCKADDR_ENDPOINT_INFO, *PSOCKADDR_ENDPOINT_INFO;
                    195: 
                    196: typedef struct _SOCKADDR_INFO {
                    197:     SOCKADDR_ADDRESS_INFO AddressInfo;
                    198:     SOCKADDR_ENDPOINT_INFO EndpointInfo;
                    199: } SOCKADDR_INFO, *PSOCKADDR_INFO;
                    200: 
                    201: typedef
                    202: INT
                    203: (* WINAPI PWSH_GET_SOCKADDR_TYPE) (
                    204:     IN PSOCKADDR Sockaddr,
                    205:     IN DWORD SockaddrLength,
                    206:     OUT PSOCKADDR_INFO SockaddrInfo
                    207:     );
                    208: 
                    209: INT
                    210: WINAPI
                    211: WSHGetSockaddrType (
                    212:     IN PSOCKADDR Sockaddr,
                    213:     IN DWORD SockaddrLength,
                    214:     OUT PSOCKADDR_INFO SockaddrInfo
                    215:     );
                    216: 
                    217: typedef
                    218: INT
                    219: (* WINAPI PWSH_GET_WILDCARD_SOCKADDR) (
                    220:     IN PVOID HelperDllSocketContext,
                    221:     OUT PSOCKADDR Sockaddr,
                    222:     OUT PINT SockaddrLength
                    223:     );
                    224: 
                    225: INT
                    226: WINAPI
                    227: WSHGetWildcardSockaddr (
                    228:     IN PVOID HelperDllSocketContext,
                    229:     OUT PSOCKADDR Sockaddr,
                    230:     OUT PINT SockaddrLength
                    231:     );
                    232: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.