feature. See also
. The project being documented here (as the example) is the Zig library itself.
windows.TDI
pub const TDI = struct
File
Code
pub const TDI = struct {
pub const STATUS = NTSTATUS;
pub const CONNECTION = struct {
pub const CONTEXT = PVOID;
pub const INFORMATION = extern struct {
UserDataLength: LONG,
UserData: PVOID,
OptionsLength: LONG,
Options: PVOID,
RemoteAddressLength: LONG,
RemoteAddress: PVOID,
};
};
pub const ADDRESS = struct {
pub const TYPE = enum(USHORT) {
UNSPEC = 0,
UNIX = 1,
IP = 2,
IMPLINK = 3,
PUP = 4,
CHAOS = 5,
NS = 6,
IPX = 6,
NBS = 7,
ECMA = 8,
DATAKIT = 9,
CCITT = 10,
SNA = 11,
DECnet = 12,
DLI = 13,
LAT = 14,
HYLINK = 15,
APPLETALK = 16,
NETBIOS = 17,
@"8022" = 18,
OSI_TSAP = 19,
NETONE = 20,
VNS = 21,
NETBIOS_EX = 22,
IP6 = 23,
NETBIOS_UNICODE_EX = 24,
_,
};
pub const IP = extern struct {
sin_port: USHORT,
in_addr: ULONG,
sin_zero: [8]UCHAR,
};
pub const IP6 = extern struct {
sin_port: USHORT,
flowinfo: ULONG,
addr: [8]USHORT,
scope_id: ULONG,
};
};
pub const REQUEST = extern struct {
Handle: extern union {
AddressHandle: HANDLE,
ConnectionContext: CONNECTION.CONTEXT,
ControlChannel: HANDLE,
},
RequestNotifyObject: PVOID,
RequestContext: PVOID,
TdiStatus: TDI.STATUS,
pub const STATUS = extern struct {
Status: TDI.STATUS,
RequestContext: PVOID,
BytesTransferred: ULONG,
};
pub const ASSOCIATE = extern struct {
Request: REQUEST,
AddressHandle: HANDLE,
};
pub const CONNECT = extern struct {
Request: REQUEST,
RequestConnectionInformation: *CONNECTION.INFORMATION,
ReturnConnectionInformation: *CONNECTION.INFORMATION,
Timeout: LARGE_INTEGER,
};
pub const ACCEPT = extern struct {
Request: REQUEST,
RequestConnectionInformation: *CONNECTION.INFORMATION,
ReturnConnectionInformation: *CONNECTION.INFORMATION,
};
pub const LISTEN = extern struct {
Request: REQUEST,
RequestConnectionInformation: *CONNECTION.INFORMATION,
ReturnConnectionInformation: *CONNECTION.INFORMATION,
ListenFlags: USHORT,
};
pub const DISCONNECT = extern struct {
Request: REQUEST,
Timeout: LARGE_INTEGER,
};
pub const SEND = extern struct {
Request: REQUEST,
SendFlags: USHORT,
};
pub const RECEIVE = extern struct {
Request: REQUEST,
ReceiveFlags: USHORT,
};
pub const SEND_DATAGRAM = extern struct {
Request: REQUEST,
SendDatagramInformation: *CONNECTION.INFORMATION,
};
};
pub const RECEIVE = packed struct(ULONG) {
Reserved0: u2 = 0,
BROADCAST: bool = false,
MULTICAST: bool = false,
PARTIAL: bool = false,
NORMAL: bool = false,
EXPEDITED: bool = false,
PEEK: bool = false,
NO_RESPONSE_EXP: bool = false,
COPY_LOOKAHEAD: bool = false,
ENTIRE_MESSAGE: bool = false,
AT_DISPATCH_LEVEL: bool = false,
CONTROL_INFO: bool = false,
FORCE_INDICATION: bool = false,
NO_PUSH: bool = false,
Reserved12: u17 = 0,
};
pub const SEND = packed struct(ULONG) {
Reserved0: u5 = 0,
EXPEDITED: bool = false,
PARTIAL: bool = false,
NO_RESPONSE_EXPECTED: bool = false,
NON_BLOCKING: bool = false,
AND_DISCONNECT: bool = false,
Reserved10: u22 = 0,
};
}