ReactOS 0.4.16-dev-251-ga17b6e9
net_lan.h
Go to the documentation of this file.
1#pragma once
2
3#include "net_wh.h"
4
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)
8
9#define LAN_ENUM_ADAPTERS 0
10#define LAN_BUFFERED_MODE 1
11#define LAN_ADAPTER_INFO 2
12
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)
19
20typedef struct _LAN_PACKET_HEADER_T {
27
28typedef struct _LAN_PACKET_HEADER {
32
33typedef struct _LAN_ADDRESS {
42
43typedef struct _LAN_ADAPTER_INFO_S {
52
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))
59
60#define LAN_ADDR_SIZE(AddrLen,HWAddrLen) \
61 (sizeof(LAN_ADDRESS) - 1 + (AddrLen) + (HWAddrLen))
62#define LAN_ADDR_PTR(LA) \
63 ((LA)->Address)
64#define LAN_HWADDR_PTR(LA) \
65 ((LA)->Address + (LA)->AddressLen)
66
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) \
70 { \
71 RtlCopyMemory( (Ea)->EaName, "TYPES", 6 ); \
72 (Ea)->EaNameLength = 6; \
73 (Ea)->EaValueLength = sizeof(USHORT) * (NumTypes); \
74 RtlCopyMemory( (Ea)->EaName + (Ea)->EaNameLength, \
75 (Types), \
76 sizeof(USHORT) * (NumTypes) ); \
77 }
unsigned int UINT
Definition: ndis.h:50
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
unsigned short USHORT
Definition: pedump.c:61
USHORT RegKeySize
Definition: net_lan.h:50
USHORT AddressLen
Definition: net_lan.h:47
USHORT HWAddressType
Definition: net_lan.h:38
USHORT AddressType
Definition: net_lan.h:36
UINT Flags
Definition: net_lan.h:35
UINT Adapter
Definition: net_lan.h:34
USHORT AddressLen
Definition: net_lan.h:37
CHAR Address[1]
Definition: net_lan.h:40
USHORT HWAddressLen
Definition: net_lan.h:39
CHAR Address[1]
Definition: net_lan.h:30
LAN_PACKET_HEADER_T Fixed
Definition: net_lan.h:29
char CHAR
Definition: xmlstorage.h:175