|
|
dd89bb |
#ifndef _NT_SOCKET_H_
|
|
|
dd89bb |
#define _NT_SOCKET_H_
|
|
|
dd89bb |
|
|
|
dd89bb |
/**
|
|
|
dd89bb |
* socket api:
|
|
|
dd89bb |
* -----------
|
|
|
dd89bb |
* here we provide native libraries and applications
|
|
|
dd89bb |
* with a minimal socket abstraction layer;
|
|
|
dd89bb |
* if you are interested in posix socket semantics
|
|
|
dd89bb |
* then this header is REALLY NOT what you
|
|
|
dd89bb |
* are looking for, as the most portable scenario
|
|
|
dd89bb |
* (psxscl+libc) neither requires nor allows for
|
|
|
dd89bb |
* direct interaction with the below interfaces.
|
|
|
dd89bb |
*
|
|
|
dd89bb |
* (additional information for the yet curious...)
|
|
|
dd89bb |
*
|
|
|
dd89bb |
* client libraries and applications are responsible
|
|
|
dd89bb |
* for the entire bookkeeping, which should be
|
|
|
dd89bb |
* easy using the nt_socket structure.
|
|
|
dd89bb |
*
|
|
|
dd89bb |
* kernel sockets are created using ZwCreateFile,
|
|
|
dd89bb |
* and are then manipulated (bind, connect, send,
|
|
|
dd89bb |
* recv, listen, accept, getsockname, etc.) using
|
|
|
dd89bb |
* ZwDeviceIoControlFile. accordingly, the main
|
|
|
dd89bb |
* objective of the below interfaces is to provide
|
|
|
dd89bb |
* thin wrappers around the above NT system calls,
|
|
|
dd89bb |
* thereby releasing you from the tedious task
|
|
|
dd89bb |
* of formatting control messages according to
|
|
|
dd89bb |
* individual IOCTL codes, protocol types, or
|
|
|
dd89bb |
* different versions of the operating system.
|
|
|
dd89bb |
*
|
|
|
dd89bb |
* another noteworthy objective is the direct
|
|
|
dd89bb |
* translation between posix socket semantics on the
|
|
|
dd89bb |
* one hand, and the interfaces that this module
|
|
|
dd89bb |
* provides on the other. functions in this module
|
|
|
dd89bb |
* normally take the same arguments as their
|
|
|
dd89bb |
* posix equivalents, yet require a pointer
|
|
|
dd89bb |
* to an nt_socket structure in place of an integer
|
|
|
dd89bb |
* file descriptor (in the posix library, the task
|
|
|
dd89bb |
* of converting an integer file descriptor to the
|
|
|
dd89bb |
* above pointer is a trivial one). for functions
|
|
|
dd89bb |
* such as send() and recv(), the return value is
|
|
|
dd89bb |
* the system's native NTSTATUS; the number of bytes
|
|
|
dd89bb |
* sent or received is then returned in a separate
|
|
|
dd89bb |
* argument, and can also be obtained, along with
|
|
|
dd89bb |
* extended status, from the info member of the iosb
|
|
|
dd89bb |
* argument. last but not least, each function in
|
|
|
dd89bb |
* this module accepts one or more optional arguments
|
|
|
dd89bb |
* of questionable relevance:-)
|
|
|
dd89bb |
**/
|
|
|
dd89bb |
|
|
|
414ad3 |
#include "nt_abi.h"
|
|
|
dd89bb |
#include "nt_status.h"
|
|
|
dd89bb |
#include "nt_object.h"
|
|
|
dd89bb |
#include "nt_tty.h"
|
|
|
dd89bb |
|
|
|
807f38 |
/* afd tcp state */
|
|
|
807f38 |
typedef enum _nt_afd_tcp_state {
|
|
|
807f38 |
NT_AFD_TCP_STATE_CLOSED,
|
|
|
807f38 |
NT_AFD_TCP_STATE_LISTEN,
|
|
|
807f38 |
NT_AFD_TCP_STATE_SYN_SENT,
|
|
|
807f38 |
NT_AFD_TCP_STATE_SYN_RCVD,
|
|
|
807f38 |
NT_AFD_TCP_STATE_ESTABLISHED,
|
|
|
807f38 |
NT_AFD_TCP_STATE_FIN_WAIT_1,
|
|
|
807f38 |
NT_AFD_TCP_STATE_FIN_WAIT_2,
|
|
|
807f38 |
NT_AFD_TCP_STATE_CLOSE_WAIT,
|
|
|
807f38 |
NT_AFD_TCP_STATE_CLOSING,
|
|
|
807f38 |
NT_AFD_TCP_STATE_LAST_ACK,
|
|
|
807f38 |
NT_AFD_TCP_STATE_TIME_WAIT,
|
|
|
807f38 |
NT_AFD_TCP_STATE_MAX,
|
|
|
807f38 |
} nt_afd_tcp_state;
|
|
|
807f38 |
|
|
|
dd89bb |
/* afd socket domains */
|
|
|
dd89bb |
#define NT_AF_UNSPEC (0x0000u)
|
|
|
dd89bb |
#define NT_AF_UNIX (0x0001u)
|
|
|
dd89bb |
#define NT_AF_INET (0x0002u)
|
|
|
dd89bb |
#define NT_AF_IMPLINK (0x0003u)
|
|
|
dd89bb |
#define NT_AF_PUP (0x0004u)
|
|
|
dd89bb |
#define NT_AF_CHAOS (0x0005u)
|
|
|
dd89bb |
#define NT_AF_NS (0x0006u)
|
|
|
dd89bb |
#define NT_AF_IPX (0x0006u) /* synonym */
|
|
|
dd89bb |
#define NT_AF_ISO (0x0007u)
|
|
|
dd89bb |
#define NT_AF_OSI (0x0007u) /* synonym */
|
|
|
dd89bb |
#define NT_AF_ECMA (0x0008u)
|
|
|
dd89bb |
#define NT_AF_DATAKIT (0x0009u)
|
|
|
dd89bb |
#define NT_AF_CCITT (0x000Au)
|
|
|
dd89bb |
#define NT_AF_SNA (0x000Bu)
|
|
|
3a6666 |
#define NT_AF_DECNET (0x000Cu)
|
|
|
dd89bb |
#define NT_AF_DLI (0x000Du)
|
|
|
dd89bb |
#define NT_AF_LAT (0x000Eu)
|
|
|
dd89bb |
#define NT_AF_HYLINK (0x000Fu)
|
|
|
dd89bb |
#define NT_AF_APPLETALK (0x0010u)
|
|
|
dd89bb |
#define NT_AF_NETBIOS (0x0011u)
|
|
|
dd89bb |
#define NT_AF_VOICEVIEW (0x0012u)
|
|
|
dd89bb |
#define NT_AF_FIREFOX (0x0013u)
|
|
|
dd89bb |
#define NT_AF_UNKNOWN_1ST (0x0014u)
|
|
|
dd89bb |
#define NT_AF_BAN (0x0015u)
|
|
|
dd89bb |
#define NT_AF_ATM (0x0016u)
|
|
|
dd89bb |
#define NT_AF_INET6 (0x0017u)
|
|
|
dd89bb |
#define NT_AF_CLUSTER (0x0018u)
|
|
|
dd89bb |
#define NT_AF_12844 (0x0019u)
|
|
|
dd89bb |
#define NT_AF_IRDA (0x001Au)
|
|
|
dd89bb |
#define NT_AF_NETDES (0x001Cu)
|
|
|
dd89bb |
#define NT_AF_TCNPROCESS (0x001Du)
|
|
|
dd89bb |
#define NT_AF_TCNMESSAGE (0x001Eu)
|
|
|
dd89bb |
#define NT_AF_ICLFXBM (0x001Fu)
|
|
|
dd89bb |
#define NT_AF_BTH (0x0020u)
|
|
|
dd89bb |
#define NT_AF_LINK (0x0021u)
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* afd socket types */
|
|
|
dd89bb |
#define NT_SOCK_STREAM (0x0001u)
|
|
|
dd89bb |
#define NT_SOCK_DGRAM (0x0002u)
|
|
|
dd89bb |
#define NT_SOCK_RAW (0x0003u)
|
|
|
dd89bb |
#define NT_SOCK_RDM (0x0004u)
|
|
|
dd89bb |
#define NT_SOCK_SEQPACKET (0x0005u)
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* afd socket protocols */
|
|
|
dd89bb |
#define NT_IPPROTO_IP 0
|
|
|
dd89bb |
#define NT_IPPROTO_HOPOPTS 0
|
|
|
dd89bb |
#define NT_IPPROTO_ICMP 1
|
|
|
dd89bb |
#define NT_IPPROTO_IGMP 2
|
|
|
dd89bb |
#define NT_IPPROTO_GGP 3
|
|
|
dd89bb |
#define NT_IPPROTO_IPV4 4
|
|
|
dd89bb |
#define NT_IPPROTO_ST 5
|
|
|
dd89bb |
#define NT_IPPROTO_TCP 6
|
|
|
dd89bb |
#define NT_IPPROTO_CBT 7
|
|
|
dd89bb |
#define NT_IPPROTO_EGP 8
|
|
|
dd89bb |
#define NT_IPPROTO_IGP 9
|
|
|
dd89bb |
#define NT_IPPROTO_PUP 12
|
|
|
dd89bb |
#define NT_IPPROTO_UDP 17
|
|
|
dd89bb |
#define NT_IPPROTO_IDP 22
|
|
|
dd89bb |
#define NT_IPPROTO_RDP 27
|
|
|
dd89bb |
#define NT_IPPROTO_IPV6 41
|
|
|
dd89bb |
#define NT_IPPROTO_ROUTING 43
|
|
|
dd89bb |
#define NT_IPPROTO_FRAGMENT 44
|
|
|
dd89bb |
#define NT_IPPROTO_ESP 50
|
|
|
dd89bb |
#define NT_IPPROTO_AH 51
|
|
|
dd89bb |
#define NT_IPPROTO_ICMPV6 58
|
|
|
dd89bb |
#define NT_IPPROTO_NONE 59
|
|
|
dd89bb |
#define NT_IPPROTO_DSTOPTS 60
|
|
|
dd89bb |
#define NT_IPPROTO_ND 77
|
|
|
dd89bb |
#define NT_IPPROTO_ICLFXBM 78
|
|
|
dd89bb |
#define NT_IPPROTO_PIM 103
|
|
|
dd89bb |
#define NT_IPPROTO_PGM 113
|
|
|
dd89bb |
#define NT_IPPROTO_L2TP 115
|
|
|
dd89bb |
#define NT_IPPROTO_SCTP 132
|
|
|
dd89bb |
#define NT_IPPROTO_RAW 255
|
|
|
dd89bb |
#define NT_IPPROTO_MAX 256
|
|
|
dd89bb |
#define NT_IPPROTO_RESERVED_RAW 257
|
|
|
dd89bb |
#define NT_IPPROTO_RESERVED_IPSEC 258
|
|
|
dd89bb |
#define NT_IPPROTO_RESERVED_IPSECOFFLOAD 259
|
|
|
dd89bb |
#define NT_IPPROTO_RESERVED_WNV 260
|
|
|
dd89bb |
#define NT_IPPROTO_RESERVED_MAX 261
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
d1bfa7 |
/* afd socket option levels */
|
|
|
d1bfa7 |
#define NT_SOL_IPV6 41
|
|
|
d1bfa7 |
#define NT_SOL_SOCKET 0xffff
|
|
|
d1bfa7 |
|
|
|
d1bfa7 |
|
|
|
807f38 |
/* afd socket ioctl primitives */
|
|
|
807f38 |
#define NT_SO_IOCTL_IN (1 << 31)
|
|
|
807f38 |
#define NT_SO_IOCTL_OUT (1 << 30)
|
|
|
807f38 |
#define NT_SO_IOCTL_VOID (1 << 29)
|
|
|
807f38 |
|
|
|
807f38 |
#define NT_SO_IOCTL_TYPE_UNIX ((0 << 28) | (0 << 27))
|
|
|
807f38 |
#define NT_SO_IOCTL_TYPE_WS2 ((0 << 28) | (1 << 27))
|
|
|
807f38 |
#define NT_SO_IOCTL_TYPE_PROTOCOL ((1 << 28) | (0 << 27))
|
|
|
807f38 |
#define NT_SO_IOCTL_TYPE_VENDOR ((1 << 28) | (1 << 27))
|
|
|
807f38 |
|
|
|
807f38 |
#define NT_SO_IOCTL_UNIX_VOID(x) (x | NT_SO_IOCTL_TYPE_UNIX | NT_SO_IOCTL_VOID)
|
|
|
807f38 |
#define NT_SO_IOCTL_UNIX_GET(x) (x | NT_SO_IOCTL_TYPE_UNIX | NT_SO_IOCTL_OUT)
|
|
|
807f38 |
#define NT_SO_IOCTL_UNIX_SET(x) (x | NT_SO_IOCTL_TYPE_UNIX | NT_SO_IOCTL_IN)
|
|
|
807f38 |
#define NT_SO_IOCTL_UNIX_EX(x) (x | NT_SO_IOCTL_TYPE_UNIX | NT_SO_IOCTL_IN|NT_SO_IOCTL_OUT)
|
|
|
807f38 |
|
|
|
807f38 |
#define NT_SO_IOCTL_WS2_VOID(x) (x | NT_SO_IOCTL_TYPE_WS2 | NT_SO_IOCTL_VOID)
|
|
|
807f38 |
#define NT_SO_IOCTL_WS2_GET(x) (x | NT_SO_IOCTL_TYPE_WS2 | NT_SO_IOCTL_OUT)
|
|
|
807f38 |
#define NT_SO_IOCTL_WS2_SET(x) (x | NT_SO_IOCTL_TYPE_WS2 | NT_SO_IOCTL_IN)
|
|
|
807f38 |
#define NT_SO_IOCTL_WS2_EX(x) (x | NT_SO_IOCTL_TYPE_WS2 | NT_SO_IOCTL_IN|NT_SO_IOCTL_OUT)
|
|
|
807f38 |
|
|
|
807f38 |
#define NT_SO_IOCTL_PROTOCOL_VOID(x) (x | NT_SO_IOCTL_TYPE_PROTOCOL | NT_SO_IOCTL_VOID)
|
|
|
807f38 |
#define NT_SO_IOCTL_PROTOCOL_GET(x) (x | NT_SO_IOCTL_TYPE_PROTOCOL | NT_SO_IOCTL_OUT)
|
|
|
807f38 |
#define NT_SO_IOCTL_PROTOCOL_SET(x) (x | NT_SO_IOCTL_TYPE_PROTOCOL | NT_SO_IOCTL_IN)
|
|
|
807f38 |
#define NT_SO_IOCTL_PROTOCOL_EX(x) (x | NT_SO_IOCTL_TYPE_PROTOCOL | NT_SO_IOCTL_IN|NT_SO_IOCTL_OUT)
|
|
|
807f38 |
|
|
|
807f38 |
#define NT_SO_IOCTL_VENDOR_VOID(x) (x | NT_SO_IOCTL_TYPE_VENDOR | NT_SO_IOCTL_VOID)
|
|
|
807f38 |
#define NT_SO_IOCTL_VENDOR_GET(x) (x | NT_SO_IOCTL_TYPE_VENDOR | NT_SO_IOCTL_OUT)
|
|
|
807f38 |
#define NT_SO_IOCTL_VENDOR_SET(x) (x | NT_SO_IOCTL_TYPE_VENDOR | NT_SO_IOCTL_IN)
|
|
|
807f38 |
#define NT_SO_IOCTL_VENDOR_EX(x) (x | NT_SO_IOCTL_TYPE_VENDOR | NT_SO_IOCTL_IN|NT_SO_IOCTL_OUT)
|
|
|
807f38 |
|
|
|
807f38 |
|
|
|
807f38 |
/* afd socket ws2 ioctl codes */
|
|
|
807f38 |
#define NT_SO_IOCTL_ASSOCIATE_HANDLE NT_SO_IOCTL_WS2_SET(1)
|
|
|
807f38 |
#define NT_SO_IOCTL_ENABLE_CIRCULAR_QUEUEING NT_SO_IOCTL_WS2_VOID(2)
|
|
|
807f38 |
#define NT_SO_IOCTL_FIND_ROUTE NT_SO_IOCTL_WS2_GET(3)
|
|
|
807f38 |
#define NT_SO_IOCTL_FLUSH NT_SO_IOCTL_WS2_VOID(4)
|
|
|
807f38 |
#define NT_SO_IOCTL_GET_BROADCAST_ADDRESS NT_SO_IOCTL_WS2_GET(5)
|
|
|
807f38 |
#define NT_SO_IOCTL_GET_EXTENSION_FUNC_PTR NT_SO_IOCTL_WS2_EX((6)
|
|
|
807f38 |
#define NT_SO_IOCTL_GET_QOS NT_SO_IOCTL_WS2_EX((7)
|
|
|
807f38 |
#define NT_SO_IOCTL_GET_GROUP_QOS NT_SO_IOCTL_WS2_EX((8)
|
|
|
807f38 |
#define NT_SO_IOCTL_MULTIPOINT_LOOPBACK NT_SO_IOCTL_WS2_SET(9)
|
|
|
807f38 |
#define NT_SO_IOCTL_MULTICAST_SCOPE NT_SO_IOCTL_WS2_SET(10)
|
|
|
807f38 |
#define NT_SO_IOCTL_SET_QOS NT_SO_IOCTL_WS2_SET(11)
|
|
|
807f38 |
#define NT_SO_IOCTL_SET_GROUP_QOS NT_SO_IOCTL_WS2_SET(12)
|
|
|
807f38 |
#define NT_SO_IOCTL_TRANSLATE_HANDLE NT_SO_IOCTL_WS2_EX((13)
|
|
|
807f38 |
#define NT_SO_IOCTL_ROUTING_INTERFACE_QUERY NT_SO_IOCTL_WS2_EX((20)
|
|
|
807f38 |
#define NT_SO_IOCTL_ROUTING_INTERFACE_CHANGE NT_SO_IOCTL_WS2_SET(21)
|
|
|
807f38 |
#define NT_SO_IOCTL_ADDRESS_LIST_QUERY NT_SO_IOCTL_WS2_GET(22)
|
|
|
807f38 |
#define NT_SO_IOCTL_ADDRESS_LIST_CHANGE NT_SO_IOCTL_WS2_VOID(23)
|
|
|
807f38 |
#define NT_SO_IOCTL_QUERY_TARGET_PNP_HANDLE NT_SO_IOCTL_WS2_GET(24)
|
|
|
807f38 |
#define SIO_ADDRESS_LIST_SORT NT_SO_IOCTL_WS2_EX((25)
|
|
|
807f38 |
|
|
|
807f38 |
/* afd socket vendor ioctl codes */
|
|
|
807f38 |
#define NT_SO_IOCTL_RCVALL NT_SO_IOCTL_VENDOR_GET(1)
|
|
|
807f38 |
#define NT_SO_IOCTL_RCVALL_MCAST NT_SO_IOCTL_VENDOR_GET(2)
|
|
|
807f38 |
#define NT_SO_IOCTL_RCVALL_IGMPMCAST NT_SO_IOCTL_VENDOR_GET(3)
|
|
|
807f38 |
#define NT_SO_IOCTL_KEEPALIVE_VALS NT_SO_IOCTL_VENDOR_GET(4)
|
|
|
807f38 |
#define NT_SO_IOCTL_ABSORB_RTRALERT NT_SO_IOCTL_VENDOR_GET(5)
|
|
|
807f38 |
#define NT_SO_IOCTL_UCAST_IF NT_SO_IOCTL_VENDOR_GET(6)
|
|
|
807f38 |
#define NT_SO_IOCTL_LIMIT_BROADCASTS NT_SO_IOCTL_VENDOR_GET(7)
|
|
|
807f38 |
#define NT_SO_IOCTL_INDEX_BIND NT_SO_IOCTL_VENDOR_GET(8)
|
|
|
807f38 |
#define NT_SO_IOCTL_INDEX_MCASTIF NT_SO_IOCTL_VENDOR_GET(9)
|
|
|
807f38 |
#define NT_SO_IOCTL_INDEX_ADD_MCAST NT_SO_IOCTL_VENDOR_GET(10)
|
|
|
807f38 |
#define NT_SO_IOCTL_INDEX_DEL_MCAST NT_SO_IOCTL_VENDOR_GET(11)
|
|
|
807f38 |
#define NT_SO_IOCTL_RCVALL_MCAST_IF NT_SO_IOCTL_VENDOR_GET(13)
|
|
|
807f38 |
#define NT_SO_IOCTL_RCVALL_IF NT_SO_IOCTL_VENDOR_GET(14)
|
|
|
807f38 |
#define NT_SO_IOCTL_GET_TCP_INFO NT_SO_IOCTL_VENDOR_EX(39)
|
|
|
d1bfa7 |
|
|
|
064d5f |
/* afd socket-level socket options */
|
|
|
064d5f |
#define NT_SO_DEBUG (0x0001)
|
|
|
064d5f |
#define NT_SO_ACCEPTCONN (0x0002)
|
|
|
064d5f |
#define NT_SO_REUSEADDR (0x0004)
|
|
|
064d5f |
#define NT_SO_KEEPALIVE (0x0008)
|
|
|
064d5f |
#define NT_SO_DONTROUTE (0x0010)
|
|
|
064d5f |
#define NT_SO_BROADCAST (0x0020)
|
|
|
064d5f |
#define NT_SO_USELOOPBACK (0x0040)
|
|
|
064d5f |
#define NT_SO_LINGER (0x0080)
|
|
|
064d5f |
#define NT_SO_OOBINLINE (0x0100)
|
|
|
064d5f |
|
|
|
064d5f |
#define NT_SO_SNDBUF (0x1001)
|
|
|
064d5f |
#define NT_SO_RCVBUF (0x1002)
|
|
|
064d5f |
#define NT_SO_SNDLOWAT (0x1003)
|
|
|
064d5f |
#define NT_SO_RCVLOWAT (0x1004)
|
|
|
064d5f |
#define NT_SO_SNDTIMEO (0x1005)
|
|
|
064d5f |
#define NT_SO_RCVTIMEO (0x1006)
|
|
|
064d5f |
#define NT_SO_ERROR (0x1007)
|
|
|
064d5f |
#define NT_SO_TYPE (0x1008)
|
|
|
064d5f |
|
|
|
064d5f |
#define NT_SO_GROUP_ID (0x2001)
|
|
|
064d5f |
#define NT_SO_GROUP_PRIORITY (0x2002)
|
|
|
064d5f |
#define NT_SO_MAX_MSG_SIZE (0x2003)
|
|
|
064d5f |
|
|
|
064d5f |
|
|
|
064d5f |
|
|
|
1af137 |
/* afd ipv6 socket options */
|
|
|
1af137 |
#define NT_IPV6_HOPOPTS 1
|
|
|
1af137 |
#define NT_IPV6_HDRINCL 2
|
|
|
1af137 |
#define NT_IPV6_UNICAST_HOPS 4
|
|
|
1af137 |
#define NT_IPV6_MULTICAST_IF 9
|
|
|
1af137 |
#define NT_IPV6_MULTICAST_HOPS 10
|
|
|
1af137 |
#define NT_IPV6_MULTICAST_LOOP 11
|
|
|
1af137 |
#define NT_IPV6_ADD_MEMBERSHIP 12
|
|
|
1af137 |
#define NT_IPV6_DROP_MEMBERSHIP 13
|
|
|
1af137 |
#define NT_IPV6_DONTFRAG 14
|
|
|
1af137 |
#define NT_IPV6_PKTINFO 19
|
|
|
1af137 |
#define NT_IPV6_HOPLIMIT 21
|
|
|
1af137 |
#define NT_IPV6_PROTECTION_LEVEL 23
|
|
|
1af137 |
#define NT_IPV6_RECVIF 24
|
|
|
1af137 |
#define NT_IPV6_RECVDSTADDR 25
|
|
|
1af137 |
#define NT_IPV6_CHECKSUM 26
|
|
|
1af137 |
#define NT_IPV6_V6ONLY 27
|
|
|
1af137 |
#define NT_IPV6_IFLIST 28
|
|
|
1af137 |
#define NT_IPV6_ADD_IFLIST 29
|
|
|
1af137 |
#define NT_IPV6_DEL_IFLIST 30
|
|
|
1af137 |
#define NT_IPV6_UNICAST_IF 31
|
|
|
1af137 |
#define NT_IPV6_RTHDR 32
|
|
|
1af137 |
#define NT_IPV6_RECVRTHDR 38
|
|
|
1af137 |
#define NT_IPV6_TCLASS 39
|
|
|
1af137 |
#define NT_IPV6_RECVTCLASS 40
|
|
|
1af137 |
|
|
|
1af137 |
#define NT_IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
|
|
|
1af137 |
#define NT_IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
|
|
|
1af137 |
|
|
|
1af137 |
|
|
|
1af137 |
|
|
|
6ebb48 |
/* afd tcp socket options */
|
|
|
6ebb48 |
#define NT_TCP_OFFLOAD_NO_PREFERENCE (0)
|
|
|
6ebb48 |
#define NT_TCP_OFFLOAD_NOT_PREFERRED (1)
|
|
|
6ebb48 |
#define NT_TCP_OFFLOAD_PREFERRED (2)
|
|
|
6ebb48 |
|
|
|
6ebb48 |
#define NT_TCP_NODELAY (1)
|
|
|
6ebb48 |
#define NT_TCP_EXPEDITED_1122 (2)
|
|
|
6ebb48 |
#define NT_TCP_KEEPALIVE (3)
|
|
|
6ebb48 |
#define NT_TCP_MAXSEG (4)
|
|
|
6ebb48 |
#define NT_TCP_MAXRT (5)
|
|
|
6ebb48 |
#define NT_TCP_STDURG (6)
|
|
|
6ebb48 |
#define NT_TCP_NOURG (7)
|
|
|
6ebb48 |
#define NT_TCP_ATMARK (8)
|
|
|
6ebb48 |
#define NT_TCP_NOSYNRETRIES (9)
|
|
|
6ebb48 |
#define NT_TCP_TIMESTAMPS (10)
|
|
|
6ebb48 |
#define NT_TCP_OFFLOAD_PREFERENCE (11)
|
|
|
6ebb48 |
#define NT_TCP_CONGESTION_ALGORITHM (12)
|
|
|
6ebb48 |
#define NT_TCP_DELAY_FIN_ACK (13)
|
|
|
6ebb48 |
#define NT_TCP_MAXRTMS (14)
|
|
|
6ebb48 |
#define NT_TCP_FASTOPEN (15)
|
|
|
6ebb48 |
#define NT_TCP_KEEPCNT (16)
|
|
|
6ebb48 |
#define NT_TCP_KEEPINTVL (17)
|
|
|
6ebb48 |
#define NT_TCP_FAIL_CONNECT_ON_ICMP_ERROR (18)
|
|
|
6ebb48 |
#define NT_TCP_ICMP_ERROR_INFO (19)
|
|
|
6ebb48 |
|
|
|
6ebb48 |
#define NT_TCP_KEEPIDLE NT_TCP_KEEPALIVE
|
|
|
6ebb48 |
|
|
|
6ebb48 |
|
|
|
6ebb48 |
|
|
|
dd89bb |
/* tdi receive modes */
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_BROADCAST (0x0004u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_MULTICAST (0x0008u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_PARTIAL (0x0010u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_NORMAL (0x0020u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_EXPEDITED (0x0040u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_PEEK (0x0080u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_NO_RESPONSE_EXP (0x0100u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_COPY_LOOKAHEAD (0x0200u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_ENTIRE_MESSAGE (0x0400u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_AT_DISPATCH_LEVEL (0x0800u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_CONTROL_INFO (0x1000u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_FORCE_INDICATION (0x2000u)
|
|
|
dd89bb |
#define NT_TDI_RECEIVE_NO_PUSH (0x4000u)
|
|
|
dd89bb |
|
|
|
dd89bb |
/* tdi send modes */
|
|
|
dd89bb |
#define NT_TDI_SEND_EXPEDITED (0x0020u)
|
|
|
dd89bb |
#define NT_TDI_SEND_PARTIAL (0x0040u)
|
|
|
dd89bb |
#define NT_TDI_SEND_NO_RESPONSE_EXPECTED (0x0080u)
|
|
|
dd89bb |
#define NT_TDI_SEND_NON_BLOCKING (0x0100u)
|
|
|
dd89bb |
#define NT_TDI_SEND_AND_DISCONNECT (0x0200u)
|
|
|
dd89bb |
|
|
|
dd89bb |
/* tdi listen modes */
|
|
|
dd89bb |
#define NT_TDI_QUERY_ACCEPT (0x0001u)
|
|
|
dd89bb |
|
|
|
dd89bb |
/* tdi disconnect modes */
|
|
|
dd89bb |
#define NT_TDI_DISCONNECT_WAIT (0x0001u)
|
|
|
dd89bb |
#define NT_TDI_DISCONNECT_ABORT (0x0002u)
|
|
|
dd89bb |
#define NT_TDI_DISCONNECT_RELEASE (0x0004u)
|
|
|
dd89bb |
|
|
|
dd89bb |
/* afd ioctl codes */
|
|
|
dd89bb |
#define NT_AFD_IOCTL_BIND (0x12003u)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_CONNECT (0x12007u)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_LISTEN (0x1200Bu)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_ACCEPT (0x1200Cu)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_DUPLICATE (0x12010u)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_SEND (0x1201Fu)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_UDP_SEND (0x12023u)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_RECV (0x12017u)
|
|
|
f6c77a |
#define NT_AFD_IOCTL_UDP_RECV (0x1201bu)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_DISCONNECT (0x1202Bu)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_SELECT (0x12024u)
|
|
|
dd89bb |
#define NT_AFD_IOCTL_GET_SOCK_NAME (0x1202Fu)
|
|
|
f5a78b |
#define NT_AFD_IOCTL_GET_PEER_NAME (0x12033u)
|
|
|
f5a78b |
#define NT_AFD_IOCTL_SET_CONTEXT (0x12047u)
|
|
|
f5a78b |
#define NT_AFD_IOCTL_GET_CONTEXT (0x12043u)
|
|
|
f5a78b |
#define NT_AFD_IOCTL_SET_INFO (0x1203bu)
|
|
|
f5a78b |
#define NT_AFD_IOCTL_GET_INFO (0x1207bu)
|
|
|
a867b0 |
#define NT_AFD_IOCTL_SOCKOPT (0x120bfu)
|
|
|
a867b0 |
|
|
|
262e3b |
/* afd listen/accept bits */
|
|
|
262e3b |
#define NT_AFD_DEFER_ACCEPT (0x01u)
|
|
|
262e3b |
|
|
|
a867b0 |
/* afd sockopt mode bits */
|
|
|
a867b0 |
#define NT_AFD_SOCKOPT_SET (0x01u)
|
|
|
a867b0 |
#define NT_AFD_SOCKOPT_GET (0x02u)
|
|
|
dd89bb |
|
|
|
072ce8 |
/* afd poll socket info bits */
|
|
|
072ce8 |
#define NT_AFD_POLL_RECEIVE (0x01u)
|
|
|
072ce8 |
#define NT_AFD_POLL_RECEIVE_EXPEDITED (0x02u)
|
|
|
072ce8 |
#define NT_AFD_POLL_SEND (0x04u)
|
|
|
072ce8 |
#define NT_AFD_POLL_DISCONNECT (0x08u)
|
|
|
072ce8 |
#define NT_AFD_POLL_ABORT (0x10u)
|
|
|
072ce8 |
#define NT_AFD_POLL_LOCAL_CLOSE (0x20u)
|
|
|
072ce8 |
#define NT_AFD_POLL_CONNECT (0x40u)
|
|
|
072ce8 |
#define NT_AFD_POLL_ACCEPT (0x80u)
|
|
|
31d413 |
#define NT_AFD_POLL_CONNECT_FAIL (0x100u)
|
|
|
072ce8 |
|
|
|
dd89bb |
/* afd socket shutdown bits */
|
|
|
dd89bb |
#define NT_AFD_DISCONNECT_WR (0x01u)
|
|
|
dd89bb |
#define NT_AFD_DISCONNECT_RD (0x02u)
|
|
|
dd89bb |
|
|
|
3c4d6f |
/* afd socket share bits */
|
|
|
3c4d6f |
#define NT_AFD_SHARE_UNIQUE (0x00u)
|
|
|
3c4d6f |
#define NT_AFD_SHARE_REUSE (0x01u)
|
|
|
3c4d6f |
#define NT_AFD_SHARE_WILDCARD (0x02u)
|
|
|
3c4d6f |
#define NT_AFD_SHARE_EXCLUSIVE (0x03u)
|
|
|
3c4d6f |
|
|
|
dd89bb |
/* socket structures */
|
|
|
dd89bb |
typedef struct _nt_socket {
|
|
|
dd89bb |
union {
|
|
|
dd89bb |
void * hsocket;
|
|
|
dd89bb |
void * hfile;
|
|
|
dd89bb |
void * hpipe;
|
|
|
79728b |
void * hdir;
|
|
|
ab26b8 |
void * hobj;
|
|
|
dd89bb |
nt_pty * hpty;
|
|
|
dd89bb |
};
|
|
|
dd89bb |
|
|
|
dd89bb |
void * hevent;
|
|
|
dd89bb |
int32_t refcnt; /* reserved for client */
|
|
|
dd89bb |
uint16_t fdtype; /* reserved for client */
|
|
|
dd89bb |
uint16_t sctype; /* reserved for client */
|
|
|
f6998c |
uint16_t state; /* reserved for client */
|
|
|
f6998c |
uint16_t iomode; /* reserved for client */
|
|
|
dd89bb |
uint32_t ctxid; /* reserved for client */
|
|
|
dd89bb |
uint32_t psxflags; /* reserved for client */
|
|
|
dd89bb |
uint32_t ntflags; /* sc_wait alert flags */
|
|
|
dd89bb |
nt_large_integer timeout;
|
|
|
dd89bb |
int32_t iostatus;
|
|
|
dd89bb |
int32_t waitstatus;
|
|
|
dd89bb |
|
|
|
dd89bb |
union {
|
|
|
dd89bb |
struct {
|
|
|
dd89bb |
uint16_t domain;
|
|
|
dd89bb |
uint16_t type;
|
|
|
dd89bb |
uint32_t protocol;
|
|
|
dd89bb |
};
|
|
|
dd89bb |
|
|
|
401db8 |
struct {
|
|
|
401db8 |
uint16_t vfdtype;
|
|
|
401db8 |
uint16_t vfdflags;
|
|
|
401db8 |
uint32_t vfdpid;
|
|
|
401db8 |
};
|
|
|
401db8 |
|
|
|
b15269 |
void * hkey;
|
|
|
dd89bb |
void * hpair;
|
|
|
213fd9 |
void * hasync;
|
|
|
d260ac |
void * hobject;
|
|
|
213fd9 |
void * hsection;
|
|
|
dd89bb |
void * dirctx;
|
|
|
79728b |
void * dbgctx;
|
|
|
dd89bb |
};
|
|
|
dd89bb |
} nt_socket;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_scope_id{
|
|
|
dd89bb |
union {
|
|
|
dd89bb |
struct {
|
|
|
dd89bb |
uint32_t zone : 28;
|
|
|
dd89bb |
uint32_t level : 4;
|
|
|
dd89bb |
};
|
|
|
dd89bb |
|
|
|
dd89bb |
uint32_t value;
|
|
|
dd89bb |
};
|
|
|
dd89bb |
} nt_scope_id;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_sockaddr_in4 {
|
|
|
dd89bb |
uint16_t sa_family;
|
|
|
dd89bb |
char sa_data[14];
|
|
|
dd89bb |
} nt_sockaddr_in4;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_sockaddr_in6 {
|
|
|
dd89bb |
uint16_t sa_family;
|
|
|
dd89bb |
uint16_t sa_port;
|
|
|
dd89bb |
uint32_t sa_flow;
|
|
|
dd89bb |
unsigned char sa_data[16];
|
|
|
dd89bb |
nt_scope_id sa_scope;
|
|
|
dd89bb |
} nt_sockaddr_in6;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef union _nt_sockaddr {
|
|
|
dd89bb |
nt_sockaddr_in4 sa_addr_in4;
|
|
|
dd89bb |
nt_sockaddr_in6 sa_addr_in6;
|
|
|
dd89bb |
} nt_sockaddr;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
f6c77a |
typedef struct _nt_sockaddr_reply {
|
|
|
f6c77a |
uint32_t addrlen;
|
|
|
f6c77a |
nt_sockaddr addr;
|
|
|
f6c77a |
} nt_sockaddr_reply;
|
|
|
f6c77a |
|
|
|
f6c77a |
|
|
|
dd89bb |
typedef struct _nt_afd_buffer {
|
|
|
dd89bb |
size_t length;
|
|
|
dd89bb |
char * buffer;
|
|
|
dd89bb |
} nt_afd_buffer;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_afd_listen_info {
|
|
|
0dbb40 |
uint32_t unknown;
|
|
|
dd89bb |
uint32_t backlog;
|
|
|
0dbb40 |
uint32_t flags;
|
|
|
dd89bb |
} nt_afd_listen_info;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_afd_accept_info {
|
|
|
dd89bb |
uint32_t sequence;
|
|
|
dd89bb |
nt_sockaddr addr;
|
|
|
dd89bb |
uint32_t legacy[2];
|
|
|
dd89bb |
} nt_afd_accept_info;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_afd_duplicate_info {
|
|
|
dd89bb |
uint32_t unknown;
|
|
|
dd89bb |
uint32_t sequence;
|
|
|
dd89bb |
void * hsocket_dedicated;
|
|
|
dd89bb |
} nt_afd_duplicate_info;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_afd_send_info {
|
|
|
dd89bb |
nt_afd_buffer * afd_buffer_array;
|
|
|
dd89bb |
uint32_t buffer_count;
|
|
|
dd89bb |
uint32_t afd_flags;
|
|
|
dd89bb |
uint32_t tdi_flags;
|
|
|
dd89bb |
} nt_afd_send_info;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_afd_recv_info {
|
|
|
dd89bb |
nt_afd_buffer * afd_buffer_array;
|
|
|
dd89bb |
uint32_t buffer_count;
|
|
|
dd89bb |
uint32_t afd_flags;
|
|
|
dd89bb |
uint32_t tdi_flags;
|
|
|
dd89bb |
} nt_afd_recv_info;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
a867b0 |
typedef struct _nt_afd_sockopt_info {
|
|
|
a867b0 |
uint32_t mode;
|
|
|
a867b0 |
uint32_t level;
|
|
|
a867b0 |
uint32_t optname;
|
|
|
a867b0 |
uint32_t ding;
|
|
|
a867b0 |
const void * optval;
|
|
|
a867b0 |
size_t optlen;
|
|
|
a867b0 |
} nt_afd_sockopt_info;
|
|
|
a867b0 |
|
|
|
a867b0 |
|
|
|
072ce8 |
typedef struct _nt_afd_poll_socket_info {
|
|
|
072ce8 |
void * hsocket;
|
|
|
072ce8 |
uint32_t events;
|
|
|
072ce8 |
int32_t status;
|
|
|
072ce8 |
} nt_afd_poll_socket_info;
|
|
|
072ce8 |
|
|
|
072ce8 |
|
|
|
072ce8 |
typedef struct _nt_afd_poll_info {
|
|
|
072ce8 |
nt_timeout timeout;
|
|
|
072ce8 |
uint32_t nfds;
|
|
|
072ce8 |
uint32_t options;
|
|
|
072ce8 |
nt_afd_poll_socket_info pollfds[];
|
|
|
072ce8 |
} nt_afd_poll_info;
|
|
|
072ce8 |
|
|
|
072ce8 |
|
|
|
dd89bb |
typedef struct _nt_afd_disconnect_info {
|
|
|
dd89bb |
uint32_t shutdown_flags;
|
|
|
dd89bb |
uint32_t unknown[3];
|
|
|
dd89bb |
} nt_afd_disconnect_info;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
807f38 |
typedef struct _nt_afd_tcp_info_v0 {
|
|
|
807f38 |
nt_afd_tcp_state state;
|
|
|
807f38 |
uint32_t mss;
|
|
|
807f38 |
uint64_t conn_time_ms;
|
|
|
807f38 |
int time_stamp_enabled;
|
|
|
807f38 |
uint32_t rtt_us;
|
|
|
807f38 |
uint32_t min_rtt_us;
|
|
|
807f38 |
uint32_t bytes_in_flight;
|
|
|
807f38 |
uint32_t c_wnd;
|
|
|
807f38 |
uint32_t snd_wnd;
|
|
|
807f38 |
uint32_t rcv_wnd;
|
|
|
807f38 |
uint32_t rcv_buf;
|
|
|
807f38 |
uint64_t bytes_out;
|
|
|
807f38 |
uint64_t bytes_in;
|
|
|
807f38 |
uint32_t bytes_reordered;
|
|
|
807f38 |
uint32_t bytes_retrans;
|
|
|
807f38 |
uint32_t dup_acks_in;
|
|
|
807f38 |
uint32_t timeout_episodes;
|
|
|
807f38 |
uint8_t syn_retrans;
|
|
|
807f38 |
uint32_t __pad;
|
|
|
807f38 |
} nt_afd_tcp_info_v0;
|
|
|
807f38 |
|
|
|
807f38 |
|
|
|
dd89bb |
/* socket functions */
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_socket(
|
|
|
dd89bb |
__out nt_socket * hssocket,
|
|
|
9c3b7e |
__in int32_t domain,
|
|
|
9c3b7e |
__in int32_t type,
|
|
|
dd89bb |
__in uint32_t protocol,
|
|
|
dd89bb |
__in uint32_t desired_access __optional,
|
|
|
dd89bb |
__in nt_sqos * sqos __optional,
|
|
|
2e04e9 |
__out nt_iosb * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_bind(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
dd89bb |
__in const nt_sockaddr * addr,
|
|
|
dd89bb |
__in uintptr_t addrlen,
|
|
|
3260d1 |
__in uint32_t afdflags __optional,
|
|
|
3260d1 |
__in uint32_t srvflags __optional,
|
|
|
dd89bb |
__out nt_sockaddr * sockaddr __optional,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_listen(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
87511e |
__in uint32_t backlog,
|
|
|
87511e |
__in uint32_t afdflags __optional,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_accept(
|
|
|
dd89bb |
__in nt_socket * hssock_listen,
|
|
|
dd89bb |
__in nt_sockaddr * addr,
|
|
|
dd89bb |
__in uint16_t * addrlen,
|
|
|
dd89bb |
__out nt_socket * hssock_dedicated,
|
|
|
dd89bb |
__in uintptr_t afdflags __optional,
|
|
|
dd89bb |
__in uintptr_t tdiflags __optional,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_connect(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
dd89bb |
__in nt_sockaddr * addr,
|
|
|
dd89bb |
__in uintptr_t addrlen,
|
|
|
dd89bb |
__in uintptr_t service_flags __optional,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_send(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
dd89bb |
__in const void * buffer,
|
|
|
dd89bb |
__in size_t len,
|
|
|
dd89bb |
__out ssize_t * bytes_sent __optional,
|
|
|
eb53e6 |
__in const nt_sockaddr * addr __optional,
|
|
|
eb53e6 |
__in size_t addrlen __optional,
|
|
|
dd89bb |
__in uintptr_t afdflags __optional,
|
|
|
dd89bb |
__in uintptr_t tdiflags __optional,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_recv(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
dd89bb |
__in const void * buffer,
|
|
|
dd89bb |
__in size_t len,
|
|
|
dd89bb |
__out ssize_t * bytes_received __optional,
|
|
|
f6c77a |
__in nt_sockaddr_reply * raddr __optional,
|
|
|
dd89bb |
__in uintptr_t afdflags __optional,
|
|
|
dd89bb |
__in uintptr_t tdiflags __optional,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_shutdown(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
20ee45 |
__in uint32_t afdhow,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_getsockname(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
dd89bb |
__in nt_sockaddr * addr,
|
|
|
dd89bb |
__in uint16_t * addrlen,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
5d8625 |
typedef int32_t __cdecl ntapi_sc_getpeername(
|
|
|
5d8625 |
__in nt_socket * hssocket,
|
|
|
5d8625 |
__in nt_sockaddr * addr,
|
|
|
5d8625 |
__in uint16_t * addrlen,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_server_accept_connection(
|
|
|
dd89bb |
__in nt_socket * hssocket,
|
|
|
dd89bb |
__out nt_afd_accept_info * accept_info,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __cdecl ntapi_sc_server_duplicate_socket(
|
|
|
dd89bb |
__in nt_socket * hssock_listen,
|
|
|
dd89bb |
__in nt_socket * hssock_dedicated,
|
|
|
dd89bb |
__in nt_afd_accept_info * accept_info,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
830346 |
typedef int32_t __cdecl ntapi_sc_setsockopt(
|
|
|
830346 |
__in nt_socket * hssocket,
|
|
|
830346 |
__in int32_t level,
|
|
|
830346 |
__in int32_t optname,
|
|
|
830346 |
__in const void * optval,
|
|
|
830346 |
__in uint32_t optlen,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb __optional);
|
|
|
830346 |
|
|
|
830346 |
|
|
|
419228 |
typedef int32_t __cdecl ntapi_sc_getsockopt(
|
|
|
419228 |
__in nt_socket * hssocket,
|
|
|
419228 |
__in int32_t level,
|
|
|
419228 |
__in int32_t optname,
|
|
|
419228 |
__out void * optval,
|
|
|
419228 |
__in uint32_t optlen,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb);
|
|
|
419228 |
|
|
|
419228 |
|
|
|
2e04e9 |
typedef int32_t __cdecl ntapi_sc_wait(
|
|
|
2e04e9 |
__in nt_socket * hssocket,
|
|
|
2e04e9 |
__out nt_iosb volatile * iosb,
|
|
|
2e04e9 |
__in nt_timeout * timeout);
|
|
|
dd89bb |
|
|
|
dd89bb |
#endif
|