Windows NT 4.0 source code leak
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.

57 lines
970 B

4 years ago
  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. dgudps.h
  5. Abstract:
  6. Additional definitions for the datagram udp server transport.
  7. Author:
  8. Dave Steckler (davidst) 15-Mar-1993
  9. Revision History:
  10. --*/
  11. #ifndef __DGUDPS_H__
  12. #define __DGUDPS_H__
  13. #define NETADDR_LEN 15
  14. #define MAX_HOSTNAME_LEN 32
  15. #define ADDRESS_FAMILY AF_INET
  16. #define PROTOCOL 0
  17. #define ADDRESS_TYPE struct sockaddr_in
  18. //
  19. // an address is of form "nnn.nnn.nnn.nnn"
  20. //
  21. #define ADDRESS_STRING_SIZE 16
  22. //
  23. // an endpoint is of form "nnnnn"
  24. //
  25. #define ENDPOINT_STRING_SIZE 6
  26. #define InitLocalAddress(Address, Socket) \
  27. { \
  28. Address.sin_family = ADDRESS_FAMILY; \
  29. Address.sin_addr.s_addr = INADDR_ANY; \
  30. Address.sin_port = htons((unsigned short) Socket); \
  31. }
  32. #define GetSocket(Address) ntohs(Address.sin_port)
  33. #endif // __DGUDPS_H__