* Sync up to trunk head (r65353).
[reactos.git] / drivers / network / tcpip / include / info.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: include/info.h
5 * PURPOSE: TdiQueryInformation definitions
6 */
7
8 #pragma once
9
10 #include <tcpioctl.h>
11
12 #define MAX_PHYSADDR_LEN 8
13 #define MAX_IFDESCR_LEN 256
14
15 typedef struct IPADDR_ENTRY {
16 ULONG Addr;
17 ULONG Index;
18 ULONG Mask;
19 ULONG BcastAddr;
20 ULONG ReasmSize;
21 USHORT Context;
22 USHORT Pad;
23 } IPADDR_ENTRY, *PIPADDR_ENTRY;
24
25 #define ARP_ENTRY_STATIC 4
26 #define ARP_ENTRY_DYNAMIC 3
27 #define ARP_ENTRY_INVALID 2
28 #define ARP_ENTRY_OTHER 1
29
30 typedef struct IPARP_ENTRY {
31 ULONG Index;
32 ULONG AddrSize;
33 UCHAR PhysAddr[8];
34 ULONG LogAddr;
35 ULONG Type;
36 } IPARP_ENTRY, *PIPARP_ENTRY;
37
38 typedef struct IPROUTE_ENTRY {
39 ULONG Dest;
40 ULONG Index; //matches if_index in IFEntry and iae_index in IPAddrEntry
41 ULONG Metric1;
42 ULONG Metric2;
43 ULONG Metric3;
44 ULONG Metric4;
45 ULONG Gw;
46 ULONG Type;
47 ULONG Proto;
48 ULONG Age;
49 ULONG Mask;
50 ULONG Metric5;
51 ULONG Info;
52 } IPROUTE_ENTRY, *PIPROUTE_ENTRY;
53
54 /* Only UDP is supported */
55 #define TDI_SERVICE_FLAGS (TDI_SERVICE_CONNECTIONLESS_MODE | \
56 TDI_SERVICE_BROADCAST_SUPPORTED)
57
58 #define TCP_MIB_STAT_ID 1
59 #define UDP_MIB_STAT_ID 1
60 #define TCP_MIB_TABLE_ID 0x101
61 #define UDP_MIB_TABLE_ID 0x101
62
63 #define TL_INSTANCE 0
64
65
66 typedef struct ADDRESS_INFO {
67 ULONG LocalAddress;
68 ULONG LocalPort;
69 } ADDRESS_INFO, *PADDRESS_INFO;
70
71 typedef union TDI_INFO {
72 TDI_CONNECTION_INFO ConnInfo;
73 TDI_ADDRESS_INFO AddrInfo;
74 TDI_PROVIDER_INFO ProviderInfo;
75 TDI_PROVIDER_STATISTICS ProviderStats;
76 } TDI_INFO, *PTDI_INFO;
77
78 TDI_STATUS InfoCopyOut( PCHAR DataOut, UINT SizeOut,
79 PNDIS_BUFFER ClientBuf, PUINT ClientBufSize );
80
81 TDI_STATUS InfoTdiQueryInformationEx(
82 PTDI_REQUEST Request,
83 TDIObjectID *ID,
84 PNDIS_BUFFER Buffer,
85 PUINT BufferSize,
86 PVOID Context);
87
88 TDI_STATUS InfoTdiSetInformationEx(
89 PTDI_REQUEST Request,
90 TDIObjectID *ID,
91 PVOID Buffer,
92 UINT BufferSize);
93
94 TDI_STATUS InfoTdiQueryGetAddrTable(TDIEntityID ID,
95 PNDIS_BUFFER Buffer,
96 PUINT BufferSize);
97
98 TDI_STATUS InfoTdiQueryGetInterfaceMIB(TDIEntityID ID,
99 PIP_INTERFACE Interface,
100 PNDIS_BUFFER Buffer,
101 PUINT BufferSize);
102
103 TDI_STATUS InfoTdiQueryGetIPSnmpInfo( TDIEntityID ID,
104 PIP_INTERFACE IF,
105 PNDIS_BUFFER Buffer,
106 PUINT BufferSize );
107
108 TDI_STATUS InfoTdiQueryGetRouteTable( PIP_INTERFACE IF,
109 PNDIS_BUFFER Buffer,
110 PUINT BufferSize );
111
112 TDI_STATUS InfoTdiSetRoute(PIP_INTERFACE IF,
113 PVOID Buffer,
114 UINT BufferSize);
115
116 TDI_STATUS InfoTdiSetArptableMIB(PIP_INTERFACE IF,
117 PVOID Buffer,
118 UINT BufferSize);
119
120 TDI_STATUS InfoTdiQueryGetArptableMIB(TDIEntityID ID,
121 PIP_INTERFACE Interface,
122 PNDIS_BUFFER Buffer,
123 PUINT BufferSize);
124
125 TDI_STATUS SetAddressFileInfo(TDIObjectID *ID,
126 PADDRESS_FILE AddrFile,
127 PVOID Buffer,
128 UINT BufferSize);
129
130 TDI_STATUS GetAddressFileInfo(TDIObjectID *ID,
131 PADDRESS_FILE AddrFile,
132 PVOID Buffer,
133 PUINT BufferSize);
134
135 TDI_STATUS SetConnectionInfo(TDIObjectID *ID,
136 PCONNECTION_ENDPOINT Connection,
137 PVOID Buffer,
138 UINT BufferSize);
139
140 /* Insert and remove entities */
141 VOID InsertTDIInterfaceEntity( PIP_INTERFACE Interface );
142
143 VOID RemoveTDIInterfaceEntity( PIP_INTERFACE Interface );
144
145 VOID AddEntity(ULONG EntityType,
146 PVOID Context,
147 ULONG Flags);
148
149 VOID RemoveEntityByContext(PVOID Context);
150
151 /* EOF */