ReactOS  0.4.15-dev-509-g96a357b
udp.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/udp.h
5  * PURPOSE: User Datagram Protocol definitions
6  */
7 
8 #pragma once
9 
10 #define UDP_STARTING_PORT 0x8000
11 #define UDP_DYNAMIC_PORTS 0x8000
12 
13 /* UDPv4 header structure */
14 #include <pshpack1.h>
15 typedef struct UDP_HEADER {
16  USHORT SourcePort; /* Source port */
17  USHORT DestPort; /* Destination port */
18  USHORT Length; /* Size of header and data */
19  USHORT Checksum; /* Checksum of datagram */
21 
22 /* UDPv4 pseudo header */
23 typedef struct UDP_PSEUDO_HEADER {
24  ULONG SourceAddress; /* Source address */
25  ULONG DestAddress; /* Destination address */
26  UCHAR Zero; /* Reserved */
27  UCHAR Protocol; /* Protocol */
28  USHORT UDPLength; /* Size of UDP datagram */
30 #include <poppack.h>
31 
32 typedef struct UDP_STATISTICS {
39 
41 
43  PVOID Context,
45 
47  PADDRESS_FILE AddrFile,
49  PCHAR BufferData,
51  PULONG DataUsed );
52 
55  PIP_PACKET IPPacket);
56 
58  VOID);
59 
61  VOID);
62 UINT UDPAllocatePort( UINT HintPort );
64 
65 /* EOF */
signed char * PCHAR
Definition: retypes.h:7
CPPORT Port[4]
Definition: headless.c:34
ULONG InputErrors
Definition: udp.h:35
struct UDP_HEADER UDP_HEADER
UINT UDPAllocatePort(UINT HintPort)
Definition: udp.c:385
USHORT DestPort
Definition: udp.h:17
NTSTATUS UDPShutdown(VOID)
Definition: udp.c:364
LONG NTSTATUS
Definition: precomp.h:26
ULONG OutputDatagrams
Definition: udp.h:36
USHORT SourcePort
Definition: udp.h:16
ULONG NumAddresses
Definition: udp.h:37
struct UDP_PSEUDO_HEADER UDP_PSEUDO_HEADER
struct UDP_PSEUDO_HEADER * PUDP_PSEUDO_HEADER
ULONG DestAddress
Definition: udp.h:25
NTSTATUS UDPStartup(VOID)
Definition: udp.c:337
ULONG InputDatagrams
Definition: udp.h:33
ULONG SourceAddress
Definition: udp.h:24
NTSTATUS UDPSendDatagram(PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR BufferData, ULONG DataSize, PULONG DataUsed)
Definition: udp.c:150
struct UDP_STATISTICS * PUDP_STATISTICS
VOID UDPSend(PVOID Context, PDATAGRAM_SEND_REQUEST SendRequest)
UCHAR Protocol
Definition: udp.h:27
USHORT Checksum
Definition: udp.h:19
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
Definition: udp.h:15
struct UDP_STATISTICS UDP_STATISTICS
UCHAR Zero
Definition: udp.h:26
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID UDPFreePort(UINT Port)
Definition: udp.c:394
UDP_STATISTICS UDPStats
Definition: main.c:26
USHORT Length
Definition: udp.h:18
unsigned short USHORT
Definition: pedump.c:61
struct UDP_HEADER * PUDP_HEADER
unsigned int * PULONG
Definition: retypes.h:1
unsigned int UINT
Definition: ndis.h:50
unsigned int ULONG
Definition: retypes.h:1
USHORT UDPLength
Definition: udp.h:28
ULONG NumPorts
Definition: udp.h:34
Definition: ip.h:77
BOOL SendRequest(PCHAR pInBuffer, ULONG InBufferLength, PCHAR pOutBuffer, PULONG pOutBufferLength)
Definition: utility.c:11
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
VOID UDPReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: udp.c:241