ReactOS  0.4.14-dev-77-gd9e7c48
receive.h
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: include/receive.h
5  * PURPOSE: Internet Protocol receive prototypes
6  */
7 
8 #pragma once
9 
10 #include <ip.h>
11 
12 /* Number of seconds before destroying the IPDR */
13 #define MAX_TIMEOUT_COUNT 3
14 
15 /* IP datagram fragment descriptor. Used to store IP datagram fragments */
16 typedef struct IP_FRAGMENT {
17  LIST_ENTRY ListEntry; /* Entry on list */
18  PNDIS_PACKET Packet; /* NDIS packet containing fragment data */
19  BOOLEAN ReturnPacket; /* States whether to call NdisReturnPackets */
20  UINT PacketOffset; /* Offset into NDIS packet where data is */
21  UINT Offset; /* Offset into datagram where this fragment is */
22  UINT Size; /* Size of this fragment */
24 
25 /* IP datagram hole descriptor. Used to reassemble IP datagrams */
26 typedef struct IPDATAGRAM_HOLE {
27  LIST_ENTRY ListEntry; /* Entry on list */
28  UINT First; /* Offset of first octet of the hole */
29  UINT Last; /* Offset of last octet of the hole */
31 
32 /* IP datagram reassembly information */
33 typedef struct IPDATAGRAM_REASSEMBLY {
34  LIST_ENTRY ListEntry; /* Entry on list */
35  KSPIN_LOCK Lock; /* Protecting spin lock */
36  UINT DataSize; /* Size of datagram data area */
37  IP_ADDRESS SrcAddr; /* Source address */
38  IP_ADDRESS DstAddr; /* Destination address */
39  UCHAR Protocol; /* Internet Protocol number */
40  USHORT Id; /* Identification number */
41  PIP_HEADER IPv4Header; /* Pointer to IP header */
42  UINT HeaderSize; /* Length of IP header */
43  LIST_ENTRY FragmentListHead; /* IP fragment list */
44  LIST_ENTRY HoleListHead; /* IP datagram hole list */
45  UINT TimeoutCount; /* Timeout counter */
47 
48 
54 
55 
57  VOID);
58 
60  VOID);
61 
63  PIP_INTERFACE IF,
64  PIP_PACKET IPPacket);
65 
66 /* EOF */
KSPIN_LOCK ReassemblyListLock
Definition: receive.c:16
VOID IPDatagramReassemblyTimeout(VOID)
Definition: receive.c:515
PIP_HEADER IPv4Header
Definition: receive.h:41
UINT Offset
Definition: receive.h:21
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
UINT Size
Definition: receive.h:22
PNDIS_PACKET Packet
Definition: receive.h:18
struct IPDATAGRAM_REASSEMBLY IPDATAGRAM_REASSEMBLY
LIST_ENTRY HoleListHead
Definition: receive.h:44
IP_ADDRESS SrcAddr
Definition: receive.h:37
UINT PacketOffset
Definition: receive.h:20
struct IPDATAGRAM_HOLE * PIPDATAGRAM_HOLE
LIST_ENTRY ListEntry
Definition: receive.h:34
Definition: ip.h:23
IP_ADDRESS DstAddr
Definition: receive.h:38
unsigned char BOOLEAN
struct IPDATAGRAM_HOLE IPDATAGRAM_HOLE
LIST_ENTRY ListEntry
Definition: receive.h:27
struct IP_FRAGMENT IP_FRAGMENT
struct IPDATAGRAM_REASSEMBLY * PIPDATAGRAM_REASSEMBLY
VOID IPFreeReassemblyList(VOID)
Definition: receive.c:485
unsigned char UCHAR
Definition: xmlstorage.h:181
NPAGED_LOOKASIDE_LIST IPHoleList
Definition: receive.c:19
Definition: typedefs.h:117
NPAGED_LOOKASIDE_LIST IPDRList
Definition: receive.c:17
Definition: ip.h:60
unsigned short USHORT
Definition: pedump.c:61
VOID IPReceive(PIP_INTERFACE IF, PIP_PACKET IPPacket)
Definition: receive.c:638
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
unsigned int UINT
Definition: ndis.h:50
BOOLEAN ReturnPacket
Definition: receive.h:19
LIST_ENTRY FragmentListHead
Definition: receive.h:43
Definition: ip.h:77
KSPIN_LOCK Lock
Definition: receive.h:35
LIST_ENTRY ListEntry
Definition: receive.h:17
NPAGED_LOOKASIDE_LIST IPFragmentList
Definition: receive.c:18
struct IP_FRAGMENT * PIP_FRAGMENT
LIST_ENTRY ReassemblyListHead
Definition: receive.c:15