2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
5 * PURPOSE: User Datagram Protocol definitions
10 #define UDP_STARTING_PORT 0x8000
11 #define UDP_DYNAMIC_PORTS 0x8000
13 /* UDPv4 header structure */
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 */
20 } UDP_HEADER
, *PUDP_HEADER
;
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 */
29 } UDP_PSEUDO_HEADER
, *PUDP_PSEUDO_HEADER
;
32 typedef struct UDP_STATISTICS
{
36 ULONG OutputDatagrams
;
38 } UDP_STATISTICS
, *PUDP_STATISTICS
;
40 extern UDP_STATISTICS UDPStats
;
44 PDATAGRAM_SEND_REQUEST SendRequest
);
46 NTSTATUS
UDPSendDatagram(
47 PADDRESS_FILE AddrFile
,
48 PTDI_CONNECTION_INFORMATION ConnInfo
,
54 PIP_INTERFACE Interface
,
62 UINT
UDPAllocatePort( UINT HintPort
);
63 VOID
UDPFreePort( UINT Port
);