2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
5 * PURPOSE: User Datagram Protocol definitions
11 /* UDPv4 header structure */
12 typedef struct UDP_HEADER {
13 USHORT SourcePort; /* Source port */
14 USHORT DestPort; /* Destination port */
15 USHORT Length; /* Size of header and data */
16 USHORT Checksum; /* Checksum of datagram */
17 } __attribute__((packed)) UDP_HEADER, *PUDP_HEADER;
19 /* UDPv4 pseudo header */
20 typedef struct UDP_PSEUDO_HEADER {
21 ULONG SourceAddress; /* Source address */
22 ULONG DestAddress; /* Destination address */
23 UCHAR Zero; /* Reserved */
24 UCHAR Protocol; /* Protocol */
25 USHORT UDPLength; /* Size of UDP datagram */
26 } __attribute__((packed)) UDP_PSEUDO_HEADER, *PUDP_PSEUDO_HEADER;
29 typedef struct UDP_STATISTICS {
33 ULONG OutputDatagrams;
35 } UDP_STATISTICS, *PUDP_STATISTICS;
39 PDATAGRAM_SEND_REQUEST SendRequest);
41 NTSTATUS UDPSendDatagram(
43 PTDI_CONNECTION_INFORMATION ConnInfo,
47 NTSTATUS UDPReceiveDatagram(
49 PTDI_CONNECTION_INFORMATION ConnInfo,
53 PTDI_CONNECTION_INFORMATION ReturnInfo,
54 PULONG BytesReceived);