ReactOS  0.4.14-dev-49-gfb4591c
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 
29 VOID
31 
32 VOID
34 
36  PVOID Object)
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 
82  PVOID Object)
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 {
155  UINT Protocol;
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 adresses 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 
222  IF->Unicast.Type = IP_ADDRESS_V4;
224  IF->Netmask.Type = IP_ADDRESS_V4;
226 
228 
230  ( NonPagedPool, sizeof(struct netif));
231  if (!IF->TCPContext) {
233  return NULL;
234  }
235 
237 
238 #ifdef __NTDRIVER__
240 #endif
241 
242  return IF;
243 }
244 
245 
247  PIP_INTERFACE IF)
248 /*
249  * FUNCTION: Destroys an IP interface
250  * ARGUMENTS:
251  * IF = Pointer to interface to destroy
252  */
253 {
254  TI_DbgPrint(DEBUG_IP, ("Called. IF (0x%X).\n", IF));
255 
256 #ifdef __NTDRIVER__
258 #endif
259 
261 
262  ExFreePool(IF->TCPContext);
264 }
265 
269 
270  /* Add a permanent neighbor for this NTE */
271  NCE = NBAddNeighbor(IF, &IF->Unicast,
272  IF->Address, IF->AddressLength,
273  NUD_PERMANENT, 0);
274  if (!NCE) {
275  TI_DbgPrint(MIN_TRACE, ("Could not create NCE.\n"));
276  return;
277  }
278 
280 
281  if (!RouterAddRoute(&NetworkAddress, &IF->Netmask, NCE, 1)) {
282  TI_DbgPrint(MIN_TRACE, ("Could not add route due to insufficient resources.\n"));
283  }
284 
285  /* Send a gratuitous ARP packet to update the route caches of
286  * other computers */
287  if (IF != Loopback)
288  ARPTransmit(NULL, NULL, IF);
289 
291 }
292 
294  PIP_INTERFACE IF)
295 /*
296  * FUNCTION: Registers an IP interface with IP layer
297  * ARGUMENTS:
298  * IF = Pointer to interface to register
299  * RETURNS;
300  * TRUE if interface was successfully registered, FALSE if not
301  */
302 {
303  KIRQL OldIrql;
304  UINT ChosenIndex = 0;
305  BOOLEAN IndexHasBeenChosen;
307 
308  TI_DbgPrint(MID_TRACE, ("Called. IF (0x%X).\n", IF));
309 
311 
312  /* Choose an index */
313  do {
314  IndexHasBeenChosen = TRUE;
316  if( Interface->Index == ChosenIndex ) {
317  ChosenIndex++;
318  IndexHasBeenChosen = FALSE;
319  }
320  } EndFor(Interface);
321  } while( !IndexHasBeenChosen );
322 
323  IF->Index = ChosenIndex;
324 
325  /* Add interface to the global interface list */
327  &IF->ListEntry,
329 
331 
332  return TRUE;
333 }
334 
337  IP_ADDRESS GeneralRoute;
338 
339  NCE = NBLocateNeighbor(&IF->Unicast, IF);
340  if (NCE)
341  {
342  TI_DbgPrint(DEBUG_IP,("Removing interface Addr %s\n", A2S(&IF->Unicast)));
343  TI_DbgPrint(DEBUG_IP,(" Mask %s\n", A2S(&IF->Netmask)));
344 
345  AddrWidenAddress(&GeneralRoute,&IF->Unicast,&IF->Netmask);
346 
347  RouterRemoveRoute(&GeneralRoute, &IF->Unicast);
348 
349  NBRemoveNeighbor(NCE);
350  }
351 }
352 
354  PIP_INTERFACE IF)
355 /*
356  * FUNCTION: Unregisters an IP interface with IP layer
357  * ARGUMENTS:
358  * IF = Pointer to interface to unregister
359  */
360 {
361  KIRQL OldIrql3;
362 
363  TI_DbgPrint(DEBUG_IP, ("Called. IF (0x%X).\n", IF));
364 
366 
370 }
371 
372 
375  PIP_PACKET IPPacket)
376 /*
377  * FUNCTION: Default handler for Internet protocols
378  * ARGUMENTS:
379  * NTE = Pointer to net table entry which the packet was received on
380  * IPPacket = Pointer to an IP packet that was received
381  */
382 {
383  TI_DbgPrint(MID_TRACE, ("[IF %x] Packet of unknown Internet protocol "
384  "discarded.\n", Interface));
385 
386  Interface->Stats.InDiscardedUnknownProto++;
387 }
388 
389 
391  UINT ProtocolNumber,
393 /*
394  * FUNCTION: Registers a handler for an IP protocol number
395  * ARGUMENTS:
396  * ProtocolNumber = Internet Protocol number for which to register handler
397  * Handler = Pointer to handler to be called when a packet is received
398  * NOTES:
399  * To unregister a protocol handler, call this function with Handler = NULL
400  */
401 {
402  if (ProtocolNumber >= IP_PROTOCOL_TABLE_SIZE) {
403  TI_DbgPrint(MIN_TRACE, ("Protocol number is out of range (%d).\n", ProtocolNumber));
404  return;
405  }
406 
407  ProtocolTable[ProtocolNumber] = Handler ? Handler : DefaultProtocolHandler;
408 }
409 
410 
412 /*
413  * FUNCTION: Initializes the IP subsystem
414  * ARGUMENTS:
415  * RegistryPath = Our registry node for configuration parameters
416  * RETURNS:
417  * Status of operation
418  */
419 {
420  UINT i;
421 
422  TI_DbgPrint(MAX_TRACE, ("Called.\n"));
423 
424  /* Initialize lookaside lists */
426  &IPDRList, /* Lookaside list */
427  NULL, /* Allocate routine */
428  NULL, /* Free routine */
429  0, /* Flags */
430  sizeof(IPDATAGRAM_REASSEMBLY), /* Size of each entry */
431  DATAGRAM_REASSEMBLY_TAG, /* Tag */
432  0); /* Depth */
433 
435  &IPFragmentList, /* Lookaside list */
436  NULL, /* Allocate routine */
437  NULL, /* Free routine */
438  0, /* Flags */
439  sizeof(IP_FRAGMENT), /* Size of each entry */
440  DATAGRAM_FRAGMENT_TAG, /* Tag */
441  0); /* Depth */
442 
444  &IPHoleList, /* Lookaside list */
445  NULL, /* Allocate routine */
446  NULL, /* Free routine */
447  0, /* Flags */
448  sizeof(IPDATAGRAM_HOLE), /* Size of each entry */
449  DATAGRAM_HOLE_TAG, /* Tag */
450  0); /* Depth */
451 
452  /* Start routing subsystem */
453  RouterStartup();
454 
455  /* Start neighbor cache subsystem */
456  NBStartup();
457 
458  /* Fill the protocol dispatch table with pointers
459  to the default protocol handler */
460  for (i = 0; i < IP_PROTOCOL_TABLE_SIZE; i++)
462 
463  /* Initialize NTE list and protecting lock */
466 
467  /* Initialize reassembly list and protecting lock */
470 
472 
473  return STATUS_SUCCESS;
474 }
475 
476 
478  VOID)
479 /*
480  * FUNCTION: Shuts down the IP subsystem
481  * RETURNS:
482  * Status of operation
483  */
484 {
485  TI_DbgPrint(MAX_TRACE, ("Called.\n"));
486 
487  if (!IPInitialized)
488  return STATUS_SUCCESS;
489 
490  /* Shutdown neighbor cache subsystem */
491  NBShutdown();
492 
493  /* Shutdown routing subsystem */
494  RouterShutdown();
495 
497 
498  /* Destroy lookaside lists */
502 
504 
505  return STATUS_SUCCESS;
506 }
507 
508 /* EOF */
KSPIN_LOCK ReassemblyListLock
Definition: receive.c:16
VOID IPDatagramReassemblyTimeout(VOID)
Definition: receive.c:515
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
IP_ADDRESS Broadcast
Definition: ip.h:162
UINT AddressLength
Definition: ip.h:131
VOID IPDispatchProtocol(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: ip.c:142
#define TRUE
Definition: types.h:120
#define MID_TRACE
Definition: debug.h:15
VOID DefaultProtocolHandler(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: ip.c:373
Type
Definition: Type.h:6
ULONG IpTimerExpirations
Definition: ip.c:27
#define IP_INTERFACE_TAG
Definition: tags.h:19
#define DATAGRAM_REASSEMBLY_TAG
Definition: tags.h:20
Definition: neighbor.h:28
UINT MinFrameSize
Definition: ip.h:129
NTSTATUS RouterShutdown(VOID)
Definition: router.c:500
unsigned char * PUCHAR
Definition: retypes.h:3
NTSTATUS IPStartup(PUNICODE_STRING RegistryPath)
Definition: ip.c:411
VOID TCPUnregisterInterface(PIP_INTERFACE IF)
Definition: if.c:139
#define IP_PROTOCOL_TABLE_SIZE
Definition: ip.h:179
PVOID Context
Definition: ip.h:127
LONG NTSTATUS
Definition: precomp.h:26
_In_ USHORT _In_ ULONG Protocol
Definition: wsk.h:182
PVOID TCPContext
Definition: ip.h:169
#define FreeNdisPacket(x)
Definition: memtrack.h:8
#define IF_LIST_ITER(n)
Definition: tilists.h:5
BOOLEAN IpWorkItemQueued
Definition: ip.c:22
PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(PIP_ADDRESS Address, PIP_INTERFACE Interface)
Definition: neighbor.c:417
#define NUD_PERMANENT
Definition: neighbor.h:42
OBJECT_FREE_ROUTINE Free
Definition: ip.h:78
VOID IPRegisterProtocol(UINT ProtocolNumber, IP_PROTOCOL_HANDLER Handler)
Definition: ip.c:390
VOID TcpipReleaseSpinLock(PKSPIN_LOCK SpinLock, KIRQL Irql)
Definition: lock.c:26
UINT MinFrameSize
Definition: ip.h:156
PUCHAR Address
Definition: ip.h:130
UINT AddressLength
Definition: ip.h:166
VOID TcpipAcquireSpinLock(PKSPIN_LOCK SpinLock, PKIRQL Irql)
Definition: lock.c:18
VOID FreeIF(PVOID Object)
Definition: ip.c:81
VOID NBResetNeighborTimeout(PIP_ADDRESS Address)
Definition: neighbor.c:387
LL_TRANSMIT_ROUTINE Transmit
Definition: ip.h:132
KSPIN_LOCK NetTableListLock
Definition: ip.c:20
PIP_INTERFACE Loopback
Definition: loopback.c:13
PIP_INTERFACE IPCreateInterface(PLLIP_BIND_INFO BindInfo)
Definition: ip.c:182
Definition: ip.h:23
FORCEINLINE BOOLEAN RemoveEntryList(_In_ PLIST_ENTRY Entry)
Definition: rtlfuncs.h:105
UCHAR KIRQL
Definition: env_spec_w32.h:591
OBJECT_FREE_ROUTINE Free
Definition: ip.h:152
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(* IP_PROTOCOL_HANDLER)(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: ip.h:181
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOLEAN IPInitialized
Definition: ip.c:21
#define IP_ADDRESS_V4
Definition: ip.h:32
VOID DeinitializePacket(PVOID Object)
Definition: ip.c:35
VOID TCPRegisterInterface(PIP_INTERFACE IF)
Definition: if.c:119
BOOLEAN ARPTransmit(PIP_ADDRESS Address, PVOID LinkAddress, PIP_INTERFACE Interface)
Definition: arp.c:111
LIST_ENTRY ListEntry
Definition: ip.h:151
PVOID Header
Definition: ip.h:83
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define ForEachInterface(n)
Definition: tilists.h:9
IP_ADDRESS Unicast
Definition: ip.h:159
LIST_ENTRY InterfaceListHead
Definition: ip.c:17
#define DEBUG_IP
Definition: debug.h:26
#define IP_ADDRESS_V6
Definition: ip.h:33
NTSTATUS IPShutdown(VOID)
Definition: ip.c:477
NTSTATUS RouterStartup(VOID)
Definition: router.c:482
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
VOID NBRemoveNeighbor(PNEIGHBOR_CACHE_ENTRY NCE)
Definition: neighbor.c:590
BOOLEAN IPRegisterInterface(PIP_INTERFACE IF)
Definition: ip.c:293
PIP_PACKET IPInitializePacket(PIP_PACKET IPPacket, ULONG Type)
Definition: ip.c:92
_In_ LARGE_INTEGER _In_opt_ PKDPC Dpc
Definition: kefuncs.h:524
PUCHAR Address
Definition: ip.h:165
LL_TRANSMIT_ROUTINE Transmit
Definition: ip.h:168
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:222
UINT Index
Definition: ip.h:167
VOID IPDestroyInterface(PIP_INTERFACE IF)
Definition: ip.c:246
VOID IPUnregisterInterface(PIP_INTERFACE IF)
Definition: ip.c:353
UINT HeaderSize
Definition: ip.h:128
#define AddrInitIPv4(IPAddress, RawAddress)
Definition: address.h:16
UCHAR Type
Definition: ip.h:79
VOID IPFreeReassemblyList(VOID)
Definition: receive.c:485
VOID AddrWidenAddress(PIP_ADDRESS Network, PIP_ADDRESS Source, PIP_ADDRESS Netmask)
Definition: address.c:86
Definition: netif.h:136
_Must_inspect_result_ _Out_ PNDIS_STATUS _Outptr_result_bytebuffer_to_ NetworkAddressLength PVOID * NetworkAddress
Definition: ndis.h:3956
VOID EXPORT NdisReturnPackets(IN PNDIS_PACKET *PacketsToReturn, IN UINT NumberOfPackets)
Definition: miniport.c:258
static IUnknown Object
Definition: main.c:512
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define DATAGRAM_FRAGMENT_TAG
Definition: tags.h:21
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
IP_PROTOCOL_HANDLER ProtocolTable[IP_PROTOCOL_TABLE_SIZE]
Definition: ip.c:25
Definition: ttei1.cpp:12
NPAGED_LOOKASIDE_LIST IPHoleList
Definition: receive.c:19
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
Definition: ketypes.h:687
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
VOID TcpipInterlockedInsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Item, PKSPIN_LOCK Lock)
Definition: lock.c:34
Definition: typedefs.h:117
NTSTATUS RouterRemoveRoute(PIP_ADDRESS Target, PIP_ADDRESS Router)
Definition: router.c:364
VOID IPRemoveInterfaceRoute(PIP_INTERFACE IF)
Definition: ip.c:335
NPAGED_LOOKASIDE_LIST IPDRList
Definition: receive.c:17
PNEIGHBOR_CACHE_ENTRY NBAddNeighbor(PIP_INTERFACE Interface, PIP_ADDRESS Address, PVOID LinkAddress, UINT LinkAddressLength, UCHAR Type, UINT EventTimer)
Definition: neighbor.c:273
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical 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:662
PVOID Context
Definition: ip.h:154
VOID NBShutdown(VOID)
Definition: neighbor.c:184
KSPIN_LOCK InterfaceListLock
Definition: ip.c:18
IP_ADDRESS Netmask
Definition: ip.h:161
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
KSPIN_LOCK Lock
Definition: ip.h:153
VOID RemoveTDIInterfaceEntity(PIP_INTERFACE Interface)
Definition: iinfo.c:168
#define DATAGRAM_HOLE_TAG
Definition: tags.h:22
UCHAR Type
Definition: ip.h:24
#define EndFor(n)
Definition: tilists.h:20
#define MAX_TRACE
Definition: debug.h:16
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
VOID InsertTDIInterfaceEntity(PIP_INTERFACE Interface)
Definition: iinfo.c:158
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
UINT HeaderSize
Definition: ip.h:155
VOID TcpipInitializeSpinLock(PKSPIN_LOCK SpinLock)
Definition: lock.c:14
BOOLEAN ReturnPacket
Definition: ip.h:82
unsigned int UINT
Definition: ndis.h:50
PNDIS_PACKET NdisPacket
Definition: ip.h:88
LIST_ENTRY NetTableListHead
Definition: ip.c:19
Definition: ip.h:37
BOOLEAN MappedHeader
Definition: ip.h:81
unsigned int ULONG
Definition: retypes.h:1
VOID LogActiveObjects(VOID)
Definition: fileobjs.c:109
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define MIN_TRACE
Definition: debug.h:14
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
IP_ADDRESS PointToPoint
Definition: ip.h:160
Definition: ip.h:77
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
NPAGED_LOOKASIDE_LIST IPFragmentList
Definition: receive.c:18
return STATUS_SUCCESS
Definition: btrfs.c:2966
VOID NBStartup(VOID)
Definition: neighbor.c:169
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:174
PFIB_ENTRY RouterAddRoute(PIP_ADDRESS NetworkAddress, PIP_ADDRESS Netmask, PNEIGHBOR_CACHE_ENTRY Router, UINT Metric)
Definition: router.c:189
struct IPv4_HEADER * PIPv4_HEADER
VOID TCPUpdateInterfaceIPInformation(PIP_INTERFACE IF)
Definition: if.c:145
VOID NBTimeout(VOID)
Definition: neighbor.c:91
VOID NTAPI IPTimeoutDpcFn(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2)
Definition: ip.c:112
#define PACKET_BUFFER_TAG
Definition: tags.h:27
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
VOID IPAddInterfaceRoute(PIP_INTERFACE IF)
Definition: ip.c:266
LIST_ENTRY ReassemblyListHead
Definition: receive.c:15
PCHAR A2S(PIP_ADDRESS Address)
Definition: address.c:17
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:675