ReactOS 0.4.16-dev-88-ga65b6ae
ip.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
4 * FILE: network/ip.c
5 * PURPOSE: Internet Protocol module
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * REVISIONS:
8 * CSH 01/08-2000 Created
9 */
10
11#include "precomp.h"
12
13#define __LWIP_INET_H__
14#include "lwip/netifapi.h"
15
16
23/* Work around calling timer at Dpc level */
24
26
28
29VOID
31
32VOID
34
37/*
38 * FUNCTION: Frees buffers attached to the packet
39 * ARGUMENTS:
40 * Object = Pointer to an IP packet structure
41 */
42{
43 PIP_PACKET IPPacket = Object;
44
45 TI_DbgPrint(MAX_TRACE, ("Freeing object: 0x%p\n", Object));
46
47 /* Detect double free */
48 ASSERT(IPPacket->Type != 0xFF);
49 IPPacket->Type = 0xFF;
50
51 /* Check if there's a packet to free */
52 if (IPPacket->NdisPacket != NULL)
53 {
54 if (IPPacket->ReturnPacket)
55 {
56 /* Return the packet to the miniport driver */
57 TI_DbgPrint(MAX_TRACE, ("Returning packet 0x%p\n",
58 IPPacket->NdisPacket));
59 NdisReturnPackets(&IPPacket->NdisPacket, 1);
60 }
61 else
62 {
63 /* Free it the conventional way */
64 TI_DbgPrint(MAX_TRACE, ("Freeing packet 0x%p\n",
65 IPPacket->NdisPacket));
66 FreeNdisPacket(IPPacket->NdisPacket);
67 }
68 }
69
70 /* Check if we have a pool-allocated header */
71 if (!IPPacket->MappedHeader && IPPacket->Header)
72 {
73 /* Free it */
74 TI_DbgPrint(MAX_TRACE, ("Freeing header: 0x%p\n",
75 IPPacket->Header));
76 ExFreePoolWithTag(IPPacket->Header,
78 }
79}
80
83/*
84 * FUNCTION: Frees an interface object
85 * ARGUMENTS:
86 * Object = Pointer to an interface structure
87 */
88{
90}
91
93 PIP_PACKET IPPacket,
94 ULONG Type)
95/*
96 * FUNCTION: Creates an IP packet object
97 * ARGUMENTS:
98 * Type = Type of IP packet
99 * RETURNS:
100 * Pointer to the created IP packet. NULL if there was not enough free resources.
101 */
102{
103 RtlZeroMemory(IPPacket, sizeof(IP_PACKET));
104
105 IPPacket->Free = DeinitializePacket;
106 IPPacket->Type = Type;
107
108 return IPPacket;
109}
110
111
116/*
117 * FUNCTION: Timeout DPC
118 * ARGUMENTS:
119 * Dpc = Pointer to our DPC object
120 * DeferredContext = Pointer to context information (unused)
121 * SystemArgument1 = Unused
122 * SystemArgument2 = Unused
123 * NOTES:
124 * This routine is dispatched once in a while to do maintenance jobs
125 */
126{
128
129 if ((IpTimerExpirations % 10) == 0)
130 {
132 }
133
134 /* Check if datagram fragments have taken too long to assemble */
136
137 /* Clean possible outdated cached neighbor addresses */
138 NBTimeout();
139}
140
141
144 PIP_PACKET IPPacket)
145/*
146 * FUNCTION: IP protocol dispatcher
147 * ARGUMENTS:
148 * NTE = Pointer to net table entry which the packet was received on
149 * IPPacket = Pointer to an IP packet that was received
150 * NOTES:
151 * This routine examines the IP header and passes the packet on to the
152 * right upper level protocol receive handler
153 */
154{
156 IP_ADDRESS SrcAddress;
157
158 switch (IPPacket->Type) {
159 case IP_ADDRESS_V4:
160 Protocol = ((PIPv4_HEADER)(IPPacket->Header))->Protocol;
161 AddrInitIPv4(&SrcAddress, ((PIPv4_HEADER)(IPPacket->Header))->SrcAddr);
162 break;
163 case IP_ADDRESS_V6:
164 /* FIXME: IPv6 addresses not supported */
165 TI_DbgPrint(MIN_TRACE, ("IPv6 datagram discarded.\n"));
166 return;
167 default:
168 TI_DbgPrint(MIN_TRACE, ("Unrecognized datagram discarded.\n"));
169 return;
170 }
171
172 NBResetNeighborTimeout(&SrcAddress);
173
175 {
176 /* Call the appropriate protocol handler */
177 (*ProtocolTable[Protocol])(Interface, IPPacket);
178 }
179}
180
181
183 PLLIP_BIND_INFO BindInfo)
184/*
185 * FUNCTION: Creates an IP interface
186 * ARGUMENTS:
187 * BindInfo = Pointer to link layer to IP binding information
188 * RETURNS:
189 * Pointer to IP_INTERFACE structure, NULL if there was
190 * not enough free resources
191 */
192{
193 PIP_INTERFACE IF;
194
195 TI_DbgPrint(DEBUG_IP, ("Called. BindInfo (0x%X).\n", BindInfo));
196
197#if DBG
198 if (BindInfo->Address) {
199 PUCHAR A = BindInfo->Address;
200 TI_DbgPrint(DEBUG_IP, ("Interface address (%02X %02X %02X %02X %02X %02X).\n",
201 A[0], A[1], A[2], A[3], A[4], A[5]));
202 }
203#endif
204
207 if (!IF) {
208 TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
209 return NULL;
210 }
211
212 RtlZeroMemory(IF, sizeof(IP_INTERFACE));
213
214 IF->Free = FreeIF;
215 IF->Context = BindInfo->Context;
216 IF->HeaderSize = BindInfo->HeaderSize;
217 IF->MinFrameSize = BindInfo->MinFrameSize;
218 IF->Address = BindInfo->Address;
219 IF->AddressLength = BindInfo->AddressLength;
220 IF->Transmit = BindInfo->Transmit;
221
226
228
230 ( NonPagedPool, sizeof(struct netif));
231 if (!IF->TCPContext) {
233 return NULL;
234 }
235
237
239
240 return IF;
241}
242
243
245 PIP_INTERFACE IF)
246/*
247 * FUNCTION: Destroys an IP interface
248 * ARGUMENTS:
249 * IF = Pointer to interface to destroy
250 */
251{
252 TI_DbgPrint(DEBUG_IP, ("Called. IF (0x%X).\n", IF));
253
255
257
260}
261
265
266 /* Add a permanent neighbor for this NTE */
267 NCE = NBAddNeighbor(IF, &IF->Unicast,
268 IF->Address, IF->AddressLength,
269 NUD_PERMANENT, 0);
270 if (!NCE) {
271 TI_DbgPrint(MIN_TRACE, ("Could not create NCE.\n"));
272 return;
273 }
274
276
277 if (!RouterAddRoute(&NetworkAddress, &IF->Netmask, NCE, 1)) {
278 TI_DbgPrint(MIN_TRACE, ("Could not add route due to insufficient resources.\n"));
279 }
280
281 /* Send a gratuitous ARP packet to update the route caches of
282 * other computers */
283 if (IF != Loopback)
284 ARPTransmit(NULL, NULL, IF);
285
287}
288
290 PIP_INTERFACE IF)
291/*
292 * FUNCTION: Registers an IP interface with IP layer
293 * ARGUMENTS:
294 * IF = Pointer to interface to register
295 * RETURNS;
296 * TRUE if interface was successfully registered, FALSE if not
297 */
298{
300 UINT ChosenIndex = 0;
301 BOOLEAN IndexHasBeenChosen;
303
304 TI_DbgPrint(MID_TRACE, ("Called. IF (0x%X).\n", IF));
305
307
308 /* Choose an index */
309 do {
310 IndexHasBeenChosen = TRUE;
312 if( Interface->Index == ChosenIndex ) {
313 ChosenIndex++;
314 IndexHasBeenChosen = FALSE;
315 }
316 } EndFor(Interface);
317 } while( !IndexHasBeenChosen );
318
319 IF->Index = ChosenIndex;
320
321 /* Add interface to the global interface list */
323 &IF->ListEntry,
325
327
328 return TRUE;
329}
330
333 IP_ADDRESS GeneralRoute;
334
335 NCE = NBLocateNeighbor(&IF->Unicast, IF);
336 if (NCE)
337 {
338 TI_DbgPrint(DEBUG_IP,("Removing interface Addr %s\n", A2S(&IF->Unicast)));
339 TI_DbgPrint(DEBUG_IP,(" Mask %s\n", A2S(&IF->Netmask)));
340
341 AddrWidenAddress(&GeneralRoute,&IF->Unicast,&IF->Netmask);
342
343 RouterRemoveRoute(&GeneralRoute, &IF->Unicast);
344
345 NBRemoveNeighbor(NCE);
346 }
347}
348
350 PIP_INTERFACE IF)
351/*
352 * FUNCTION: Unregisters an IP interface with IP layer
353 * ARGUMENTS:
354 * IF = Pointer to interface to unregister
355 */
356{
357 KIRQL OldIrql3;
358
359 TI_DbgPrint(DEBUG_IP, ("Called. IF (0x%X).\n", IF));
360
362
366}
367
368
371 PIP_PACKET IPPacket)
372/*
373 * FUNCTION: Default handler for Internet protocols
374 * ARGUMENTS:
375 * NTE = Pointer to net table entry which the packet was received on
376 * IPPacket = Pointer to an IP packet that was received
377 */
378{
379 TI_DbgPrint(MID_TRACE, ("[IF %x] Packet of unknown Internet protocol "
380 "discarded.\n", Interface));
381
382 Interface->Stats.InDiscardedUnknownProto++;
383}
384
385
387 UINT ProtocolNumber,
389/*
390 * FUNCTION: Registers a handler for an IP protocol number
391 * ARGUMENTS:
392 * ProtocolNumber = Internet Protocol number for which to register handler
393 * Handler = Pointer to handler to be called when a packet is received
394 * NOTES:
395 * To unregister a protocol handler, call this function with Handler = NULL
396 */
397{
398 if (ProtocolNumber >= IP_PROTOCOL_TABLE_SIZE) {
399 TI_DbgPrint(MIN_TRACE, ("Protocol number is out of range (%d).\n", ProtocolNumber));
400 return;
401 }
402
404}
405
406
408/*
409 * FUNCTION: Initializes the IP subsystem
410 * ARGUMENTS:
411 * RegistryPath = Our registry node for configuration parameters
412 * RETURNS:
413 * Status of operation
414 */
415{
416 UINT i;
417
418 TI_DbgPrint(MAX_TRACE, ("Called.\n"));
419
420 /* Initialize lookaside lists */
422 &IPDRList, /* Lookaside list */
423 NULL, /* Allocate routine */
424 NULL, /* Free routine */
425 0, /* Flags */
426 sizeof(IPDATAGRAM_REASSEMBLY), /* Size of each entry */
427 DATAGRAM_REASSEMBLY_TAG, /* Tag */
428 0); /* Depth */
429
431 &IPFragmentList, /* Lookaside list */
432 NULL, /* Allocate routine */
433 NULL, /* Free routine */
434 0, /* Flags */
435 sizeof(IP_FRAGMENT), /* Size of each entry */
436 DATAGRAM_FRAGMENT_TAG, /* Tag */
437 0); /* Depth */
438
440 &IPHoleList, /* Lookaside list */
441 NULL, /* Allocate routine */
442 NULL, /* Free routine */
443 0, /* Flags */
444 sizeof(IPDATAGRAM_HOLE), /* Size of each entry */
445 DATAGRAM_HOLE_TAG, /* Tag */
446 0); /* Depth */
447
448 /* Start routing subsystem */
450
451 /* Start neighbor cache subsystem */
452 NBStartup();
453
454 /* Fill the protocol dispatch table with pointers
455 to the default protocol handler */
456 for (i = 0; i < IP_PROTOCOL_TABLE_SIZE; i++)
458
459 /* Initialize NTE list and protecting lock */
462
463 /* Initialize reassembly list and protecting lock */
466
468
469 return STATUS_SUCCESS;
470}
471
472
474 VOID)
475/*
476 * FUNCTION: Shuts down the IP subsystem
477 * RETURNS:
478 * Status of operation
479 */
480{
481 TI_DbgPrint(MAX_TRACE, ("Called.\n"));
482
483 if (!IPInitialized)
484 return STATUS_SUCCESS;
485
486 /* Shutdown neighbor cache subsystem */
487 NBShutdown();
488
489 /* Shutdown routing subsystem */
491
493
494 /* Destroy lookaside lists */
498
500
501 return STATUS_SUCCESS;
502}
503
504/* EOF */
unsigned char BOOLEAN
Type
Definition: Type.h:7
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
Definition: acpixf.h:672
#define AddrInitIPv4(IPAddress, RawAddress)
Definition: address.h:16
VOID AddrWidenAddress(PIP_ADDRESS Network, PIP_ADDRESS Source, PIP_ADDRESS Netmask)
Definition: address.c:86
BOOLEAN ARPTransmit(PIP_ADDRESS Address, PVOID LinkAddress, PIP_INTERFACE Interface)
Definition: arp.c:111
LONG NTSTATUS
Definition: precomp.h:26
#define MIN_TRACE
Definition: debug.h:14
#define MID_TRACE
Definition: debug.h:15
#define MAX_TRACE
Definition: debug.h:16
Definition: ehthrow.cxx:93
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DEBUG_IP
Definition: debug.h:26
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
VOID(* IP_PROTOCOL_HANDLER)(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: ip.h:181
#define IP_ADDRESS_V6
Definition: ip.h:33
#define IP_ADDRESS_V4
Definition: ip.h:32
#define IP_PROTOCOL_TABLE_SIZE
Definition: ip.h:179
VOID TcpipReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL Irql)
Definition: lock.c:26
VOID TcpipInterlockedInsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Item, PKSPIN_LOCK Lock)
Definition: lock.c:34
VOID TcpipInitializeSpinLock(PKSPIN_LOCK SpinLock)
Definition: lock.c:14
VOID TcpipAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL Irql)
Definition: lock.c:18
#define DATAGRAM_REASSEMBLY_TAG
Definition: tags.h:20
#define DATAGRAM_FRAGMENT_TAG
Definition: tags.h:21
#define IP_INTERFACE_TAG
Definition: tags.h:19
#define DATAGRAM_HOLE_TAG
Definition: tags.h:22
#define PACKET_BUFFER_TAG
Definition: tags.h:27
PCHAR A2S(PIP_ADDRESS Address)
Definition: address.c:17
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
UCHAR KIRQL
Definition: env_spec_w32.h:591
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define NonPagedPool
Definition: env_spec_w32.h:307
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
struct IPv4_HEADER * PIPv4_HEADER
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
VOID LogActiveObjects(VOID)
Definition: fileobjs.c:109
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID TCPUpdateInterfaceIPInformation(PIP_INTERFACE IF)
Definition: if.c:144
VOID RemoveTDIInterfaceEntity(PIP_INTERFACE Interface)
Definition: iinfo.c:168
VOID InsertTDIInterfaceEntity(PIP_INTERFACE Interface)
Definition: iinfo.c:158
VOID TCPUnregisterInterface(PIP_INTERFACE IF)
Definition: if.c:138
BOOLEAN IPInitialized
Definition: ip.c:21
NTSTATUS IPStartup(PUNICODE_STRING RegistryPath)
Definition: ip.c:407
VOID IPAddInterfaceRoute(PIP_INTERFACE IF)
Definition: ip.c:262
ULONG IpTimerExpirations
Definition: ip.c:27
LIST_ENTRY NetTableListHead
Definition: ip.c:19
KSPIN_LOCK InterfaceListLock
Definition: ip.c:18
VOID DeinitializePacket(PVOID Object)
Definition: ip.c:35
VOID IPDestroyInterface(PIP_INTERFACE IF)
Definition: ip.c:244
KSPIN_LOCK NetTableListLock
Definition: ip.c:20
VOID IPRemoveInterfaceRoute(PIP_INTERFACE IF)
Definition: ip.c:331
LIST_ENTRY InterfaceListHead
Definition: ip.c:17
VOID IPUnregisterInterface(PIP_INTERFACE IF)
Definition: ip.c:349
VOID IPDispatchProtocol(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: ip.c:142
NTSTATUS IPShutdown(VOID)
Definition: ip.c:473
VOID FreeIF(PVOID Object)
Definition: ip.c:81
BOOLEAN IpWorkItemQueued
Definition: ip.c:22
VOID NTAPI IPTimeoutDpcFn(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2)
Definition: ip.c:112
VOID DefaultProtocolHandler(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: ip.c:369
BOOLEAN IPRegisterInterface(PIP_INTERFACE IF)
Definition: ip.c:289
IP_PROTOCOL_HANDLER ProtocolTable[IP_PROTOCOL_TABLE_SIZE]
Definition: ip.c:25
PIP_INTERFACE IPCreateInterface(PLLIP_BIND_INFO BindInfo)
Definition: ip.c:182
VOID IPRegisterProtocol(UINT ProtocolNumber, IP_PROTOCOL_HANDLER Handler)
Definition: ip.c:386
VOID TCPRegisterInterface(PIP_INTERFACE IF)
Definition: if.c:118
PIP_PACKET IPInitializePacket(PIP_PACKET IPPacket, ULONG Type)
Definition: ip.c:92
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:170
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:218
PIP_INTERFACE Loopback
Definition: loopback.c:13
#define FreeNdisPacket(x)
Definition: memtrack.h:8
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
_Must_inspect_result_ _Out_ PNDIS_STATUS _Outptr_result_bytebuffer_to_ NetworkAddressLength PVOID * NetworkAddress
Definition: ndis.h:3956
unsigned int UINT
Definition: ndis.h:50
VOID NBShutdown(VOID)
Definition: neighbor.c:184
PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(PIP_ADDRESS Address, PIP_INTERFACE Interface)
Definition: neighbor.c:417
PNEIGHBOR_CACHE_ENTRY NBAddNeighbor(PIP_INTERFACE Interface, PIP_ADDRESS Address, PVOID LinkAddress, UINT LinkAddressLength, UCHAR Type, UINT EventTimer)
Definition: neighbor.c:273
VOID NBTimeout(VOID)
Definition: neighbor.c:91
#define NUD_PERMANENT
Definition: neighbor.h:42
VOID NBStartup(VOID)
Definition: neighbor.c:169
VOID NBResetNeighborTimeout(PIP_ADDRESS Address)
Definition: neighbor.c:387
VOID NBRemoveNeighbor(PNEIGHBOR_CACHE_ENTRY NCE)
Definition: neighbor.c:590
VOID EXPORT NdisReturnPackets(IN PNDIS_PACKET *PacketsToReturn, IN UINT NumberOfPackets)
Definition: miniport.c:258
NPAGED_LOOKASIDE_LIST IPHoleList
Definition: receive.c:19
LIST_ENTRY ReassemblyListHead
Definition: receive.c:15
VOID IPFreeReassemblyList(VOID)
Definition: receive.c:485
NPAGED_LOOKASIDE_LIST IPDRList
Definition: receive.c:17
VOID IPDatagramReassemblyTimeout(VOID)
Definition: receive.c:515
KSPIN_LOCK ReassemblyListLock
Definition: receive.c:16
NPAGED_LOOKASIDE_LIST IPFragmentList
Definition: receive.c:18
NTSTATUS RouterShutdown(VOID)
Definition: router.c:500
NTSTATUS RouterStartup(VOID)
Definition: router.c:482
PFIB_ENTRY RouterAddRoute(PIP_ADDRESS NetworkAddress, PIP_ADDRESS Netmask, PNEIGHBOR_CACHE_ENTRY Router, UINT Metric)
Definition: router.c:189
NTSTATUS RouterRemoveRoute(PIP_ADDRESS Target, PIP_ADDRESS Router)
Definition: router.c:364
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: ip.h:23
UCHAR Type
Definition: ip.h:24
Definition: neighbor.h:28
IP_ADDRESS Broadcast
Definition: ip.h:162
PUCHAR Address
Definition: ip.h:165
IP_ADDRESS PointToPoint
Definition: ip.h:160
LL_TRANSMIT_ROUTINE Transmit
Definition: ip.h:168
IP_ADDRESS Unicast
Definition: ip.h:159
IP_ADDRESS Netmask
Definition: ip.h:161
OBJECT_FREE_ROUTINE Free
Definition: ip.h:152
UINT AddressLength
Definition: ip.h:166
UINT Index
Definition: ip.h:167
PVOID TCPContext
Definition: ip.h:169
KSPIN_LOCK Lock
Definition: ip.h:153
UINT MinFrameSize
Definition: ip.h:156
PVOID Context
Definition: ip.h:154
UINT HeaderSize
Definition: ip.h:155
LIST_ENTRY ListEntry
Definition: ip.h:151
Definition: ip.h:77
OBJECT_FREE_ROUTINE Free
Definition: ip.h:78
UCHAR Type
Definition: ip.h:79
BOOLEAN ReturnPacket
Definition: ip.h:82
BOOLEAN MappedHeader
Definition: ip.h:81
PNDIS_PACKET NdisPacket
Definition: ip.h:88
PVOID Header
Definition: ip.h:83
Definition: ketypes.h:699
Definition: typedefs.h:120
PUCHAR Address
Definition: ip.h:130
UINT MinFrameSize
Definition: ip.h:129
PVOID Context
Definition: ip.h:127
UINT HeaderSize
Definition: ip.h:128
UINT AddressLength
Definition: ip.h:131
LL_TRANSMIT_ROUTINE Transmit
Definition: ip.h:132
Definition: netif.h:136
#define ForEachInterface(n)
Definition: tilists.h:9
#define EndFor(n)
Definition: tilists.h:20
#define IF_LIST_ITER(n)
Definition: tilists.h:5
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:688
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:687
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:689