5#define FSCTL_LAN_BASE FILE_DEVICE_NETWORK
6#define _LAN_CONTROL_CODE(Function, Method) \
7 CTL_CODE(FSCTL_LAN_BASE, Function, Method, FILE_WRITE_ACCESS)
9#define LAN_ENUM_ADAPTERS 0
10#define LAN_BUFFERED_MODE 1
11#define LAN_ADAPTER_INFO 2
13#define IOCTL_IF_ENUM_ADAPTERS \
14 _LAN_CONTROL_CODE(LAN_ENUM_ADAPTERS,METHOD_BUFFERED)
15#define IOCTL_IF_BUFFERED_MODE \
16 _LAN_CONTROL_CODE(LAN_BUFFERED_MODE,METHOD_BUFFERED)
17#define IOCTL_IF_ADAPTER_INFO \
18 _LAN_CONTROL_CODE(LAN_ADAPTER_INFO,METHOD_BUFFERED)
53#define LAN_DATA_PTR(PH) \
54 ((PH)->Address + (PH)->Fixed.AddressLen)
55#define LAN_ALLOC_SIZE(AddrLen,PayloadLen) \
56 (sizeof(LAN_PACKET_HEADER_T) + (AddrLen) + (PayloadLen))
57#define LAN_PAYLOAD_SIZE(PH,Size) \
58 (Size - (PH)->Fixed.AddressLen - sizeof(LAN_PACKET_HEADER_T))
60#define LAN_ADDR_SIZE(AddrLen,HWAddrLen) \
61 (sizeof(LAN_ADDRESS) - 1 + (AddrLen) + (HWAddrLen))
62#define LAN_ADDR_PTR(LA) \
64#define LAN_HWADDR_PTR(LA) \
65 ((LA)->Address + (LA)->AddressLen)
67#define LAN_EA_INFO_SIZE(NumTypes) \
68 sizeof(FILE_FULL_EA_INFORMATION) + (6 + sizeof(USHORT) * NumTypes)
69#define LAN_FILL_EA_INFO(Ea,NumTypes,Types) \
71 RtlCopyMemory( (Ea)->EaName, "TYPES", 6 ); \
72 (Ea)->EaNameLength = 6; \
73 (Ea)->EaValueLength = sizeof(USHORT) * (NumTypes); \
74 RtlCopyMemory( (Ea)->EaName + (Ea)->EaNameLength, \
76 sizeof(USHORT) * (NumTypes) ); \
struct _LAN_PACKET_HEADER_T LAN_PACKET_HEADER_T
struct _LAN_ADDRESS * PLAN_ADDRESS
struct _LAN_PACKET_HEADER_T * PLAN_PACKET_HEADER_T
struct _LAN_PACKET_HEADER LAN_PACKET_HEADER
struct _LAN_ADAPTER_INFO_S * PLAN_ADAPTER_INFO_S
struct _LAN_ADDRESS LAN_ADDRESS
struct _LAN_ADAPTER_INFO_S LAN_ADAPTER_INFO_S
struct _LAN_PACKET_HEADER * PLAN_PACKET_HEADER