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.

161 lines
3.4 KiB

  1. // Copyright (c) 1998, Microsoft Corporation, all rights reserved
  2. //
  3. // sainfo.h
  4. // Shared Access settings library
  5. // Public header
  6. //
  7. // 10/17/1998 Abolade Gbadegesin
  8. #ifndef _SAINFO_H_
  9. #define _SAINFO_H_
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #define DEFAULT_SCOPE_ADDRESS 0x0100a8c0
  14. #define DEFAULT_SCOPE_MASK 0x00ffffff
  15. //----------------------------------------------------------------------------
  16. // Data types
  17. //----------------------------------------------------------------------------
  18. // Shared access settings block, containing the application- and server-list
  19. // loaded from the shared access settings file.
  20. //
  21. typedef struct
  22. _SAINFO
  23. {
  24. // Unsorted list of 'SAAPPLICATION' entries
  25. //
  26. LIST_ENTRY ApplicationList;
  27. // Unsorted list of 'SASERVER' entries
  28. //
  29. LIST_ENTRY ServerList;
  30. // Information on the address and mask used for automatic addressing.
  31. //
  32. ULONG ScopeAddress;
  33. ULONG ScopeMask;
  34. }
  35. SAINFO;
  36. // Application-entry block, constructed for each [Application.<key>] section.
  37. // All fields in memory are stored in network byte-order (i.e., big-endian).
  38. //
  39. typedef struct
  40. _SAAPPLICATION
  41. {
  42. LIST_ENTRY Link;
  43. ULONG Key;
  44. // Display-name of the 'application', a flag indicating
  45. // whether the application is enabled.
  46. //
  47. TCHAR* Title;
  48. BOOL Enabled;
  49. // Network identification information
  50. //
  51. UCHAR Protocol;
  52. USHORT Port;
  53. // Unsorted list of 'SARESPONSE' entries
  54. //
  55. LIST_ENTRY ResponseList;
  56. // Flag indicating whether the application is predefined.
  57. //
  58. BOOL BuiltIn;
  59. }
  60. SAAPPLICATION;
  61. // Application response-list entry block.
  62. // All fields in memory are stored in network byte-order (i.e., big-endian).
  63. //
  64. typedef struct
  65. _SARESPONSE
  66. {
  67. LIST_ENTRY Link;
  68. UCHAR Protocol;
  69. USHORT StartPort;
  70. USHORT EndPort;
  71. } SARESPONSE;
  72. // Server-entry block, constructed for each [Server.<key>] section.
  73. // All fields in memory are stored in network byte-order (i.e., big-endian).
  74. //
  75. typedef struct
  76. _SASERVER
  77. {
  78. LIST_ENTRY Link;
  79. ULONG Key;
  80. // Display-name of the 'server', a flag indicating
  81. // whether the server is enabled.
  82. //
  83. TCHAR* Title;
  84. BOOL Enabled;
  85. // Network identification information
  86. //
  87. UCHAR Protocol;
  88. USHORT Port;
  89. // Internal server information
  90. //
  91. TCHAR* InternalName;
  92. USHORT InternalPort;
  93. ULONG ReservedAddress;
  94. // Flag indicating whether the server is predefined.
  95. //
  96. BOOL BuiltIn;
  97. }
  98. SASERVER;
  99. //----------------------------------------------------------------------------
  100. // Prototypes
  101. //----------------------------------------------------------------------------
  102. VOID APIENTRY
  103. RasFreeSharedAccessSettings(
  104. IN SAINFO* Info );
  105. SAINFO* APIENTRY
  106. RasLoadSharedAccessSettings(
  107. BOOL EnabledOnly );
  108. BOOL APIENTRY
  109. RasSaveSharedAccessSettings(
  110. IN SAINFO* File );
  111. VOID APIENTRY
  112. FreeSharedAccessApplication(
  113. IN SAAPPLICATION* Application );
  114. VOID APIENTRY
  115. FreeSharedAccessServer(
  116. IN SASERVER* Server );
  117. TCHAR* APIENTRY
  118. SharedAccessResponseListToString(
  119. PLIST_ENTRY ResponseList,
  120. UCHAR Protocol );
  121. BOOL APIENTRY
  122. SharedAccessResponseStringToList(
  123. UCHAR Protocol,
  124. TCHAR* ResponseList,
  125. PLIST_ENTRY ListHead );
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129. #endif // _SAINFO_H_