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.

197 lines
5.0 KiB

  1. /*++
  2. Copyright (c) 1992-1996 Microsoft Corporation
  3. Module Name:
  4. wshatalk.h
  5. Abstract:
  6. This is the header file for application using Windows Sockets for
  7. Appletalk.
  8. Revision History:
  9. 10 Jul 1992 Initial Version
  10. --*/
  11. #ifndef _ATALKWSH_
  12. #define _ATALKWSH_
  13. //
  14. // All protocol types should be specified in the Decimal base
  15. //
  16. #define DECIMAL_BASE 10
  17. //
  18. // Protocol number 0 is invalid in the Appletalk case
  19. //
  20. #define ATPROTO_BASE (1000 * AF_APPLETALK)
  21. #define SOL_APPLETALK (ATPROTO_BASE)
  22. #define DDPPROTO_RTMP (ATPROTO_BASE + 1)
  23. #define DDPPROTO_NBP (ATPROTO_BASE + 2)
  24. #define DDPPROTO_ATP (ATPROTO_BASE + 3)
  25. #define DDPPROTO_AEP (ATPROTO_BASE + 4)
  26. #define DDPPROTO_RTMPRQ (ATPROTO_BASE + 5)
  27. #define DDPPROTO_ZIP (ATPROTO_BASE + 6)
  28. #define DDPPROTO_ADSP (ATPROTO_BASE + 7)
  29. #define DDPPROTO_MAX (ATPROTO_BASE + 255)
  30. //
  31. // Define the higher layer appletalk protocol types
  32. //
  33. #define ATPROTO_ADSP (DDPPROTO_MAX + 1)
  34. #define ATPROTO_ATP (DDPPROTO_MAX + 2)
  35. #define ATPROTO_ASP (DDPPROTO_MAX + 3)
  36. #define ATPROTO_PAP (DDPPROTO_MAX + 4)
  37. #define SO_REGISTER_NAME 0xA000
  38. #define SO_DEREGISTER_NAME 0xA001
  39. #define SO_REMOVE_NAME SO_DEREGISTER_NAME
  40. #define SO_LOOKUP_NAME 0xA002
  41. #define SO_CONFIRM_NAME 0xA003
  42. #define SO_LOOKUP_MYZONE 0xA004
  43. #define SO_GETMYZONE SO_LOOKUP_MYZONE
  44. #define SO_LOOKUP_ZONES 0xA005
  45. #define SO_GETZONELIST SO_LOOKUP_ZONES
  46. #define SO_LOOKUP_ZONES_ON_ADAPTER 0xA006
  47. #define SO_GETLOCALZONES SO_LOOKUP_ZONES_ON_ADAPTER
  48. #define SO_LOOKUP_NETDEF_ON_ADAPTER 0xA007
  49. #define SO_GETNETINFO SO_LOOKUP_NETDEF_ON_ADAPTER
  50. //
  51. // PAP-specific options
  52. //
  53. #define SO_PAP_SET_SERVER_STATUS 0xA007
  54. #define SO_PAP_GET_SERVER_STATUS 0xA008
  55. #define SO_PAP_PRIME_READ 0xA009
  56. #define ATADDR_ANY 0 // Dynamic socket (=0)
  57. #define ATADDR_BROADCAST 0xFF // Broadcast node id (=ff)
  58. //
  59. // Define flags/error codes peculiar to Appletalk
  60. //
  61. #define WSAEMSGPARTIAL (WSABASEERR+100)
  62. // Maximum pap status size
  63. #define MAX_PAP_STATUS_SIZE 255
  64. #define MIN_PAP_READ_BUF_SIZE 4096
  65. // These are the unused 4 bytes returned in the PAP status packet. If ever
  66. // they are to be interpreted, they will be available.
  67. #define PAP_UNUSED_STATUS_BYTES 4
  68. //
  69. // SOCKADDR_AT structure
  70. //
  71. typedef struct sockaddr_at
  72. {
  73. USHORT sat_family;
  74. USHORT sat_net;
  75. UCHAR sat_node;
  76. UCHAR sat_socket;
  77. } SOCKADDR_AT, *PSOCKADDR_AT;
  78. //
  79. // ***WARNING***
  80. // This is defined to be the same as the ATALK ADDRESS defined in atalktdi.h
  81. // Change this if the other changes.
  82. //
  83. typedef union
  84. {
  85. struct
  86. {
  87. USHORT Network;
  88. UCHAR Node;
  89. UCHAR Socket;
  90. };
  91. ULONG Address;
  92. } WSH_ATALK_ADDRESS, *PWSH_ATALK_ADDRESS;
  93. //
  94. // Typedefs for the various options
  95. //
  96. //
  97. // ***WARNING***:
  98. // This should be exactly the same as NBP_NAME defined in atalktdi.h
  99. //
  100. #define MAX_ENTITY 32
  101. typedef struct
  102. {
  103. CHAR ObjectNameLen;
  104. CHAR ObjectName[MAX_ENTITY];
  105. CHAR TypeNameLen;
  106. CHAR TypeName[MAX_ENTITY];
  107. CHAR ZoneNameLen;
  108. CHAR ZoneName[MAX_ENTITY];
  109. } WSH_NBP_NAME, *PWSH_NBP_NAME;
  110. typedef struct
  111. {
  112. WSH_ATALK_ADDRESS Address;
  113. USHORT Enumerator;
  114. WSH_NBP_NAME NbpName;
  115. } WSH_NBP_TUPLE, *PWSH_NBP_TUPLE;
  116. typedef WSH_NBP_NAME WSH_REGISTER_NAME, *PWSH_REGISTER_NAME;
  117. typedef WSH_NBP_NAME WSH_DEREGISTER_NAME, *PWSH_DEREGISTER_NAME;
  118. typedef WSH_NBP_NAME WSH_REMOVE_NAME, *PWSH_REMOVE_NAME;
  119. typedef struct _WSH_LOOKUP_ZONES
  120. {
  121. ULONG NoZones;
  122. //
  123. // CHAR Zones[] - null separated zones
  124. //
  125. } WSH_LOOKUP_ZONES, *PWSH_LOOKUP_ZONES;
  126. typedef struct _WSH_LOOKUP_NETDEF_ON_ADAPTER
  127. {
  128. USHORT NetworkRangeLowerEnd;
  129. USHORT NetworkRangeUpperEnd;
  130. // This will be followed by a null terminated ansi default zone.
  131. // PUCHAR DefaultZone[]
  132. } WSH_LOOKUP_NETDEF_ON_ADAPTER , *PWSH_LOOKUP_NETDEF_ON_ADAPTER;
  133. typedef struct _WSH_LOOKUP_NAME
  134. {
  135. WSH_NBP_TUPLE LookupTuple;
  136. ULONG NoTuples;
  137. //
  138. // Array of NoTuple WSH_NBP_TUPLEs
  139. //
  140. } WSH_LOOKUP_NAME, *PWSH_LOOKUP_NAME;
  141. typedef struct _WSH_PAP_GET_SERVER_STATUS
  142. {
  143. SOCKADDR_AT ServerAddr;
  144. UCHAR Reserved[PAP_UNUSED_STATUS_BYTES];
  145. UCHAR ServerStatus[MAX_PAP_STATUS_SIZE+1];
  146. } WSH_PAP_GET_SERVER_STATUS, *PWSH_PAP_GET_SERVER_STATUS;
  147. #endif // _ATALKWSH_