Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB

  1. /********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1990-1993 **/
  4. /********************************************************************/
  5. /* :ts=4 */
  6. //** UDP. - UDP protocol definitions.
  7. //
  8. // This file contains definitions for the UDP protocol functions.
  9. //
  10. #include "dgram.h"
  11. #define PROTOCOL_UDP 17 // UDP protocol number
  12. //* Structure of a UDP header.
  13. struct UDPHeader {
  14. ushort uh_src; // Source port.
  15. ushort uh_dest; // Destination port.
  16. ushort uh_length; // Length
  17. ushort uh_xsum; // Checksum.
  18. }; /* UDPHeader */
  19. typedef struct UDPHeader UDPHeader;
  20. //* External definition of exported functions.
  21. extern IP_STATUS UDPRcv(void *IPContext, IPAddr Dest, IPAddr Src,
  22. IPAddr LocalAddr, IPAddr SrcAddr,
  23. IPHeader UNALIGNED *IPH, uint IPHLength,
  24. IPRcvBuf *RcvBuf, uint Size, uchar IsBCast,
  25. uchar Protocol, IPOptInfo *OptInfo);
  26. extern void UDPStatus(uchar StatusType, IP_STATUS StatusCode, IPAddr OrigDest,
  27. IPAddr OrigSrc, IPAddr Src, ulong Param, void *Data);
  28. extern void UDPSend(AddrObj *SrcAO, DGSendReq *SendReq);