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.

131 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1989-1993 Microsoft Corporation
  3. Module Name:
  4. reconfig.h
  5. Abstract:
  6. Private include file for the ISN IPX module.
  7. file defines all constants and structures necessary for support of
  8. the dynamic configuration of ST.
  9. Revision History:
  10. --*/
  11. //
  12. // These are used to index into the Parameters array in CONFIG.
  13. //
  14. #define CONFIG_DEDICATED_ROUTER 0
  15. #define CONFIG_INIT_DATAGRAMS 1
  16. #define CONFIG_MAX_DATAGRAMS 2
  17. #define CONFIG_RIP_AGE_TIME 3
  18. #define CONFIG_RIP_COUNT 4
  19. #define CONFIG_RIP_TIMEOUT 5
  20. #define CONFIG_RIP_USAGE_TIME 6
  21. #define CONFIG_ROUTE_USAGE_TIME 7
  22. #define CONFIG_SOCKET_UNIQUENESS 8
  23. #define CONFIG_SOCKET_START 9
  24. #define CONFIG_SOCKET_END 10
  25. #define CONFIG_VIRTUAL_NETWORK 11
  26. #define CONFIG_MAX_MEMORY_USAGE 12
  27. #define CONFIG_RIP_TABLE_SIZE 13
  28. #define CONFIG_VIRTUAL_OPTIONAL 14
  29. #define CONFIG_ETHERNET_PAD 15
  30. #define CONFIG_ETHERNET_LENGTH 16
  31. #define CONFIG_SINGLE_NETWORK 17
  32. #define CONFIG_DISABLE_DIALOUT_SAP 18
  33. #define CONFIG_DISABLE_DIALIN_NB 19
  34. #define CONFIG_VERIFY_SOURCE_ADDRESS 20
  35. #define CONFIG_PARAMETERS 21
  36. //
  37. // Main configuration structure.
  38. //
  39. typedef struct _CONFIG {
  40. ULONG Parameters[CONFIG_PARAMETERS]; // index defined above
  41. NDIS_STRING DeviceName; // device name exported
  42. PWSTR RegistryPathBuffer; // path to config info
  43. ULONG BindCount; // entries in BindingList
  44. LIST_ENTRY BindingList; // one per binding
  45. PDRIVER_OBJECT DriverObject; // used for logging errors
  46. } CONFIG, * PCONFIG;
  47. //
  48. // These are used to index into the Parameters array in BINDING_CONFIG.
  49. //
  50. #define BINDING_MAX_PKT_SIZE 0
  51. #define BINDING_BIND_SAP 1
  52. #define BINDING_DEFAULT_AUTO_DETECT 2
  53. #define BINDING_SOURCE_ROUTE 3
  54. #define BINDING_ALL_ROUTE_DEF 4
  55. #define BINDING_ALL_ROUTE_BC 5
  56. #define BINDING_ALL_ROUTE_MC 6
  57. #define BINDING_ENABLE_FUNC_ADDR 7
  58. #define BINDING_ENABLE_WAN 8
  59. #define BINDING_PARAMETERS 9
  60. //
  61. // One of these is allocated per adapter we are to bind to.
  62. //
  63. typedef struct _BINDING_CONFIG {
  64. LIST_ENTRY Linkage; // for chaining on BindingList
  65. NDIS_STRING AdapterName; // NDIS adapter to bind to
  66. ULONG FrameTypeCount; // number of frame types defined (max. 4)
  67. // == number of valid entries in arrays:
  68. ULONG FrameType[ISN_FRAME_TYPE_MAX]; // ISN_FRAME_TYPE_XXX
  69. ULONG NetworkNumber[ISN_FRAME_TYPE_MAX]; // may be 0
  70. BOOLEAN AutoDetect[ISN_FRAME_TYPE_MAX]; // remove if net number can't be found
  71. BOOLEAN DefaultAutoDetect[ISN_FRAME_TYPE_MAX]; // use this if multiple or none found
  72. ULONG Parameters[BINDING_PARAMETERS]; // index defined above
  73. PDRIVER_OBJECT DriverObject; // used for logging errors
  74. } BINDING_CONFIG, * PBINDING_CONFIG;
  75. NTSTATUS
  76. IpxGetConfiguration (
  77. IN PDRIVER_OBJECT DriverObject,
  78. IN PUNICODE_STRING RegistryPath,
  79. OUT PCONFIG * ConfigPtr
  80. );
  81. VOID
  82. IpxFreeConfiguration (
  83. IN PCONFIG Config
  84. );
  85. VOID
  86. IpxWriteDefaultAutoDetectType(
  87. IN PUNICODE_STRING RegistryPath,
  88. IN struct _ADAPTER * Adapter,
  89. IN ULONG FrameType
  90. );
  91. NTSTATUS
  92. IpxPnPGetVirtualNetworkNumber (
  93. IN PCONFIG Config
  94. );
  95. NTSTATUS
  96. IpxPnPGetAdapterParameters(
  97. IN PCONFIG Config,
  98. IN PNDIS_STRING DeviceName,
  99. IN OUT PBINDING_CONFIG Binding
  100. );