Source code of Windows XP (NT5)
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.

212 lines
6.0 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Copyright (c) 1997-1999 Microsoft Corporation
  4. // All rights reserved.
  5. //
  6. // File Name:
  7. // netshrd.h
  8. //
  9. // Description:
  10. // Common types, constants, and prototypes for the network pages
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef _NETSHRD_H_
  14. #define _NETSHRD_H_
  15. //
  16. // Constants
  17. //
  18. #define BITMAP_WIDTH 16
  19. #define BITMAP_HEIGHT 16
  20. #define MAX_ITEMLEN 64
  21. #define MAX_STRING_LEN 256
  22. #define MAX_DESCRIPTION_LEN 1024
  23. #define MAX_INTERNAL_NET_NUMBER_LEN 8
  24. #define MAX_FRAMETYPE_LEN 4
  25. #define MAX_NET_NUMBER_LEN 8
  26. #define MAX_DNS_DOMAIN_LENGTH 255
  27. #define MAX_PREFERRED_SERVER_LEN 255 // ISSUE-2002/02/28-stelo- verify this is the max length
  28. #define MAX_DEFAULT_TREE_LEN 255 // ISSUE-2002/02/28-stelo- verify this is the max length
  29. #define MAX_DEFAULT_CONTEXT_LEN 255 // ISSUE-2002/02/28-stelo verify this is the max length
  30. #define MAX_NETRANGE_LEN 64
  31. // IPSTRINGLENGTH = 12 spaces for all the digits plus 3 spaces for the periods
  32. #define IPSTRINGLENGTH 15
  33. #define SELECTED 3
  34. #define NOT_FOUND -1
  35. #define PERSONAL_INSTALL 0x00000001
  36. #define WORKSTATION_INSTALL 0x00000002
  37. #define SERVER_INSTALL 0x00000003
  38. typedef enum MS_CLIENT_TAG {
  39. MS_CLIENT_WINDOWS_LOCATOR,
  40. MS_CLIENT_DCE_CELL_DIR_SERVICE
  41. } MS_CLIENT;
  42. //
  43. // Setup constants to identify components in the Net Components list
  44. //
  45. typedef enum NET_COMPONENT_POSITION_TAG {
  46. MS_CLIENT_POSITION,
  47. NETWARE_CLIENT_POSITION,
  48. FILE_AND_PRINT_SHARING_POSITION,
  49. PACKET_SCHEDULING_POSITION,
  50. APPLETALK_POSITION,
  51. TCPIP_POSITION,
  52. NETWORK_MONITOR_AGENT_POSITION,
  53. IPX_POSITION,
  54. DLC_POSITION,
  55. NETBEUI_POSITION,
  56. SAP_AGENT_POSITION,
  57. GATEWAY_FOR_NETWARE_POSITION
  58. } NET_COMPONENT_POSITION;
  59. typedef enum COMPONENT_TAG {CLIENT, SERVICE, PROTOCOL} COMPONENT_TYPE;
  60. typedef struct network_component {
  61. struct network_component *next;
  62. TCHAR *StrComponentName;
  63. TCHAR *StrComponentDescription;
  64. NET_COMPONENT_POSITION iPosition;
  65. COMPONENT_TYPE ComponentType;
  66. BOOL bHasPropertiesTab;
  67. BOOL bInstalled;
  68. BOOL bSysprepSupport;
  69. DWORD dwPlatforms;
  70. } NETWORK_COMPONENT;
  71. //
  72. // Doubly Linked List
  73. //
  74. // Contains variables that are network card specific
  75. //
  76. typedef struct network_adapter_node {
  77. struct network_adapter_node *next;
  78. struct network_adapter_node *previous;
  79. //
  80. // used only when reading from the registry
  81. // used to match registry settings with the appropriate netword adapter
  82. //
  83. GUID guid;
  84. //
  85. // szPlugAndPlayID only valid if more than 1 network adapter is installed
  86. //
  87. TCHAR szPlugAndPlayID[MAX_STRING_LEN];
  88. //
  89. // TCPIP variables
  90. //
  91. BOOL bObtainIPAddressAutomatically;
  92. TCHAR szDNSDomainName[MAX_DNS_DOMAIN_LENGTH + 1];
  93. INT iNetBiosOption;
  94. NAMELIST Tcpip_IpAddresses;
  95. NAMELIST Tcpip_SubnetMaskAddresses;
  96. NAMELIST Tcpip_GatewayAddresses;
  97. NAMELIST Tcpip_DnsAddresses;
  98. NAMELIST Tcpip_WinsAddresses;
  99. //
  100. // IPX variables
  101. //
  102. TCHAR szFrameType[MAX_FRAMETYPE_LEN + 1];
  103. TCHAR szNetworkNumber[MAX_NET_NUMBER_LEN + 1];
  104. //
  105. // Appletalk variables
  106. //
  107. BOOL bEnableSeedRouting;
  108. TCHAR szNetworkRangeFrom[MAX_NETRANGE_LEN + 1];
  109. TCHAR szNetworkRangeTo[MAX_NETRANGE_LEN + 1];
  110. NAMELIST ZoneList;
  111. } NETWORK_ADAPTER_NODE;
  112. TCHAR *g_StrTcpipTitle;
  113. TCHAR *g_StrIpxProtocolTitle;
  114. TCHAR *g_StrAppletalkProtocolTitle;
  115. TCHAR *g_StrMsClientTitle;
  116. TCHAR *g_StrAdvancedTcpipSettings;
  117. //
  118. // Function Prototypes
  119. //
  120. BOOL Create_MSClient_PropertySheet( IN HWND hwndParent );
  121. BOOL Create_MS_NWIPX_PropertySheet( IN HWND hwndParent );
  122. BOOL Create_TCPIP_PropertySheet( IN HWND hwndParent );
  123. BOOL Create_Appletalk_PropertySheet( IN HWND hwndParent );
  124. INT_PTR CALLBACK
  125. DlgNetwarePage( IN HWND hwnd,
  126. IN UINT uMsg,
  127. IN WPARAM wParam,
  128. IN LPARAM lParam);
  129. BOOL GetSelectedItemFromListView( IN HWND hwndDlg,
  130. IN WORD controlID,
  131. OUT LV_ITEM* lvI );
  132. VOID SetListViewSelection( IN HWND hDlg,
  133. IN WORD controlID,
  134. IN INT position );
  135. BOOL InsertEntryIntoListView( IN HWND hListViewWnd,
  136. IN LPARAM lParam );
  137. INT CALLBACK ListViewCompareFunc( IN LPARAM lParam1,
  138. IN LPARAM lParam2,
  139. IN LPARAM lParamSort );
  140. VOID NamelistToCommaString( IN NAMELIST* pNamelist, OUT TCHAR *szBuffer, IN DWORD cbSize );
  141. INT_PTR CALLBACK AddDeviceDlgProc( IN HWND hDlg,
  142. IN UINT iMsg,
  143. IN WPARAM wParam,
  144. IN LPARAM lParam );
  145. INT_PTR CALLBACK TCPIP_PropertiesDlgProc( IN HWND hwnd,
  146. IN UINT uMsg,
  147. IN WPARAM wParam,
  148. IN LPARAM lParam );
  149. VOID AdjustNetworkCardMemory( IN INT NewNumberOfNetworkCards,
  150. IN INT OldNumberOfNetworkCards );
  151. VOID InstallDefaultNetComponents( VOID );
  152. VOID CreateListWithDefaults( OUT NETWORK_ADAPTER_NODE *pNetworkComponentNode );
  153. INT TcpipNameListInsertIdx( NAMELIST* TcpipNameList,
  154. TCHAR* pString,
  155. UINT idx );
  156. EXTERN_C INT TcpipAddNameToNameList( NAMELIST* TcpipNameList,
  157. TCHAR* pString );
  158. EXTERN_C NETWORK_COMPONENT* FindNode( IN INT iPosition );
  159. EXTERN_C VOID DeleteList( IN OUT NETWORK_ADAPTER_NODE *pNetworkAdapterList );
  160. EXTERN_C VOID ResetNetworkAdapter( OUT NETWORK_ADAPTER_NODE *pNetworkCard );
  161. EXTERN_C VOID ZeroOut( OUT NETWORK_ADAPTER_NODE *pNetworkNode);
  162. #endif