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.

131 lines
3.8 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Copyright (c) 1997-1999 Microsoft Corporation
  4. // All rights reserved.
  5. //
  6. // File Name:
  7. // tcpip.h
  8. //
  9. // Description:
  10. //
  11. //----------------------------------------------------------------------------
  12. #ifndef _TCPIP_H_
  13. #define _TCPIP_H_
  14. #define cIPSettingsColumns 2
  15. #define cTCPIPPropertyPages 3
  16. #define MAX_IP_LENGTH 255
  17. //
  18. // Constants for Edit Boxes
  19. //
  20. // ISSUE-2002/02/28-stelo- change to enum
  21. #define GATEWAY_EDITBOX 1
  22. #define DNS_SERVER_EDITBOX 2
  23. #define DNS_SUFFIX_EDITBOX 3
  24. #define WINS_EDITBOX 4
  25. //
  26. // Function Prototypes
  27. //
  28. UINT CALLBACK TCPIP_IPSettingsPageProc (HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
  29. INT_PTR CALLBACK TCPIP_IPSettingsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  30. UINT CALLBACK TCPIP_DNSPageProc (HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
  31. INT_PTR CALLBACK TCPIP_DNSDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  32. UINT CALLBACK TCPIP_WINSPageProc (HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
  33. INT_PTR CALLBACK TCPIP_WINSDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  34. UINT CALLBACK TCPIP_OptionsPageProc (HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
  35. INT_PTR CALLBACK TCPIP_OptionsDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  36. VOID OnAddButtonPressed(HWND hwnd, WORD ListBoxControlID,
  37. WORD EditButtonControlID, WORD RemoveButtonControlID,
  38. LPCTSTR Dialog, DLGPROC DialogProc);
  39. VOID OnEditButtonPressed(HWND hwnd, WORD ListBoxControlID, LPCTSTR Dialog, DLGPROC DialogProc);
  40. VOID OnRemoveButtonPressed(HWND hwnd, WORD ListBoxControlID, WORD EditButtonControlID, WORD RemoveButtonControlID);
  41. VOID OnUpButtonPressed(HWND hwnd, WORD ListBoxControlID);
  42. VOID OnDownButtonPressed(HWND hwnd, WORD ListBoxControlID);
  43. VOID SetArrows(HWND hwnd, WORD ListBoxControlID, WORD UpButtonControlID, WORD DownButtonControlID);
  44. VOID SetButtons( HWND hListBox, HWND hEditButton, HWND hRemoveButton );
  45. BOOL InsertItemIntoTcpipListView( HWND hListView,
  46. LPARAM lParam,
  47. UINT position );
  48. INT_PTR CALLBACK GenericIPDlgProc(
  49. IN HWND hwnd,
  50. IN UINT uMsg,
  51. IN WPARAM wParam,
  52. IN LPARAM lParam);
  53. INT_PTR CALLBACK ChangeIPDlgProc(
  54. IN HWND hwnd,
  55. IN UINT uMsg,
  56. IN WPARAM wParam,
  57. IN LPARAM lParam);
  58. INT_PTR CALLBACK DhcpClassIdDlgProc(
  59. IN HWND hwnd,
  60. IN UINT uMsg,
  61. IN WPARAM wParam,
  62. IN LPARAM lParam);
  63. INT_PTR CALLBACK IpSecurityDlgProc(
  64. IN HWND hwnd,
  65. IN UINT uMsg,
  66. IN WPARAM wParam,
  67. IN LPARAM lParam);
  68. VOID AddValuesToListBox(HWND hListBox, NAMELIST* pNameList, int iPosition);
  69. // struct used for IP List View
  70. typedef struct {
  71. TCHAR szIPString[IPSTRINGLENGTH+1];
  72. TCHAR szSubnetMask[IPSTRINGLENGTH+1];
  73. } IP_STRUCT;
  74. // ISSUE-2002/02/28-stelo-
  75. // Try and make as many of these static as possible (cut down the scope)
  76. //
  77. PROPSHEETHEADER TCPIPProp_pshead ;
  78. PROPSHEETPAGE TCPIPProp_pspage[cTCPIPPropertyPages] ;
  79. HICON g_hIconUpArrow;
  80. HICON g_hIconDownArrow;
  81. TCHAR *StrSecureInitiator;
  82. TCHAR *StrSecureInitiatorDesc;
  83. TCHAR *StrSecureResponder;
  84. TCHAR *StrSecureResponderDesc;
  85. TCHAR *StrSecureL2TPOnly;
  86. TCHAR *StrSecureL2TPOnlyDesc;
  87. TCHAR *StrLockdown;
  88. TCHAR *StrLockdownDesc;
  89. TCHAR *StrDhcpEnabled;
  90. TCHAR *StrAdvancedTcpipSettings;
  91. TCHAR *StrIpAddress;
  92. TCHAR *StrSubnetMask;
  93. // used to store which edit box to bring up when the user clicks the add button
  94. int g_CurrentEditBox;
  95. // used to pass data IP addresses between dialogs, +1 for the null character
  96. TCHAR szIPString[MAX_IP_LENGTH+1];
  97. // used to pass data for the subnet mask between dialogs,
  98. // +1 for the null character
  99. TCHAR szSubnetMask[IPSTRINGLENGTH+1];
  100. // used for the IP and subnet mask list view
  101. IP_STRUCT *IPStruct;
  102. #endif