#ifndef _NTAFD_H
// private
/**
* The AFD_OPEN_PACKET structure describes the parameters used to create (open) an AFD socket endpoint.
* It is passed as the value of the AfdOpenPacket extended attribute when opening the \\Device\\Afd device with NtCreateFile.
*/
typedef struct _AFD_OPEN_PACKET
{
_In_ AFD_ENDPOINT_FLAGS __f;
_In_opt_ GROUP GroupID;
_In_ LONG AddressFamily; // AF_*
_In_ LONG SocketType; // SOCK_*
_In_ LONG Protocol; // IPPROTO_*, BTHPROTO_*, HV_PROTOCOL_*, etc.
_In_opt_ ULONG TransportDeviceNameLength; // Note: specifying a device changes the transport mode
_Field_size_bytes_opt_(TransportDeviceNameLength) WCHAR TransportDeviceName[ANYSIZE_ARRAY];
} AFD_OPEN_PACKET, *PAFD_OPEN_PACKET;
View code on GitHubNo description available.