ReactOS 0.4.15-dev-7934-g1dc8d80
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>
15typedef 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 */
23typedef 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
32typedef struct UDP_STATISTICS {
39
41
45
47 PADDRESS_FILE AddrFile,
49 PCHAR BufferData,
51 PULONG DataUsed );
52
55 PIP_PACKET IPPacket);
56
58 VOID);
59
61 VOID);
62UINT UDPAllocatePort( UINT HintPort );
64
65/* EOF */
LONG NTSTATUS
Definition: precomp.h:26
CPPORT Port[4]
Definition: headless.c:35
VOID UDPSend(PVOID Context, PDATAGRAM_SEND_REQUEST SendRequest)
struct UDP_HEADER * PUDP_HEADER
struct UDP_STATISTICS * PUDP_STATISTICS
UDP_STATISTICS UDPStats
Definition: main.c:30
VOID UDPReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
Definition: udp.c:240
struct UDP_PSEUDO_HEADER * PUDP_PSEUDO_HEADER
VOID UDPFreePort(UINT Port)
Definition: udp.c:391
NTSTATUS UDPStartup(VOID)
Definition: udp.c:336
NTSTATUS UDPSendDatagram(PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR BufferData, ULONG DataSize, PULONG DataUsed)
Definition: udp.c:150
UINT UDPAllocatePort(UINT HintPort)
Definition: udp.c:382
NTSTATUS UDPShutdown(VOID)
Definition: udp.c:361
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4755
unsigned int UINT
Definition: ndis.h:50
BOOL SendRequest(PCHAR pInBuffer, ULONG InBufferLength, PCHAR pOutBuffer, PULONG pOutBufferLength)
Definition: utility.c:11
unsigned short USHORT
Definition: pedump.c:61
Definition: udp.h:15
USHORT Checksum
Definition: udp.h:19
USHORT DestPort
Definition: udp.h:17
USHORT SourcePort
Definition: udp.h:16
USHORT Length
Definition: udp.h:18
ULONG DestAddress
Definition: udp.h:25
UCHAR Zero
Definition: udp.h:26
UCHAR Protocol
Definition: udp.h:27
USHORT UDPLength
Definition: udp.h:28
ULONG SourceAddress
Definition: udp.h:24
ULONG NumAddresses
Definition: udp.h:37
ULONG InputErrors
Definition: udp.h:35
ULONG NumPorts
Definition: udp.h:34
ULONG InputDatagrams
Definition: udp.h:33
ULONG OutputDatagrams
Definition: udp.h:36
Definition: ip.h:77
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
unsigned char UCHAR
Definition: xmlstorage.h:181