reactos/drivers/network/tcpip/include/udp.h
Cameron Gutman 29fa274d6d - Create another branch for networking fixes
- TSVN choked repeatedly when attempting to merge ~9000 revs into the branch (tried 3 times on 2 different computers)
 - If someone wants to delete aicom-network-fixes, they are welcome to
 - Lesson learned: Letting a branch get thousands of revs out of date is a horrible idea

svn path=/branches/aicom-network-branch/; revision=44353
2009-12-02 03:23:19 +00:00

68 lines
1.6 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS TCP/IP protocol driver
* FILE: include/udp.h
* PURPOSE: User Datagram Protocol definitions
*/
#ifndef __UDP_H
#define __UDP_H
#define UDP_STARTING_PORT 0x8000
#define UDP_DYNAMIC_PORTS 0x8000
/* UDPv4 header structure */
#include <pshpack1.h>
typedef struct UDP_HEADER {
USHORT SourcePort; /* Source port */
USHORT DestPort; /* Destination port */
USHORT Length; /* Size of header and data */
USHORT Checksum; /* Checksum of datagram */
} UDP_HEADER, *PUDP_HEADER;
/* UDPv4 pseudo header */
typedef struct UDP_PSEUDO_HEADER {
ULONG SourceAddress; /* Source address */
ULONG DestAddress; /* Destination address */
UCHAR Zero; /* Reserved */
UCHAR Protocol; /* Protocol */
USHORT UDPLength; /* Size of UDP datagram */
} UDP_PSEUDO_HEADER, *PUDP_PSEUDO_HEADER;
#include <poppack.h>
typedef struct UDP_STATISTICS {
ULONG InputDatagrams;
ULONG NumPorts;
ULONG InputErrors;
ULONG OutputDatagrams;
ULONG NumAddresses;
} UDP_STATISTICS, *PUDP_STATISTICS;
extern UDP_STATISTICS UDPStats;
VOID UDPSend(
PVOID Context,
PDATAGRAM_SEND_REQUEST SendRequest);
NTSTATUS UDPSendDatagram(
PADDRESS_FILE AddrFile,
PTDI_CONNECTION_INFORMATION ConnInfo,
PCHAR BufferData,
ULONG DataSize,
PULONG DataUsed );
VOID UDPReceive(
PIP_INTERFACE Interface,
PIP_PACKET IPPacket);
NTSTATUS UDPStartup(
VOID);
NTSTATUS UDPShutdown(
VOID);
UINT UDPAllocatePort( UINT HintPort );
VOID UDPFreePort( UINT Port );
#endif /* __UDP_H */
/* EOF */