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.

107 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. iphlpapi\lanmap.h
  5. Abstract:
  6. Header for lanmap.c
  7. Revision History:
  8. AmritanR Created
  9. --*/
  10. #pragma once
  11. #define REG_VALUE_CONN_NAME_W L"Name"
  12. #define CONN_KEY_FORMAT_W L"System\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection"
  13. #define LAN_HASH_TABLE_SIZE 29
  14. #define LAN_GUID_HASH(pg) \
  15. (((ULONG)((pg)->Data1 + *((ULONG *)(&((pg)->Data2))))) % LAN_HASH_TABLE_SIZE)
  16. typedef struct _LAN_NODE
  17. {
  18. LIST_ENTRY leGuidLink;
  19. LIST_ENTRY leNameLink;
  20. GUID Guid;
  21. WCHAR rgwcName[MAX_INTERFACE_NAME_LEN + 2];
  22. }LAN_NODE, *PLAN_NODE;
  23. DWORD
  24. NhiGetLanConnectionNameFromGuid(
  25. IN GUID *pGuid,
  26. OUT PWCHAR pwszName,
  27. IN OUT PULONG pulBufferLength,
  28. IN BOOL bRefresh,
  29. IN BOOL bCache
  30. );
  31. DWORD
  32. NhiGetGuidFromLanConnectionName(
  33. IN PWCHAR pwszBuffer,
  34. OUT GUID *pGuid,
  35. IN BOOL bRefresh,
  36. IN BOOL bCache
  37. );
  38. DWORD
  39. NhiGetLanConnectionDescriptionFromGuid(
  40. IN GUID *pGuid,
  41. OUT PWCHAR pwszBuffer,
  42. IN OUT PULONG pulBufferSize,
  43. IN BOOL bCache,
  44. IN BOOL bRefresh
  45. );
  46. DWORD
  47. InitLanNameMapper(
  48. VOID
  49. );
  50. VOID
  51. DeinitLanNameMapper(
  52. VOID
  53. );
  54. DWORD
  55. OpenConnectionKey(
  56. IN GUID *pGuid,
  57. OUT PHKEY phkey
  58. );
  59. PLAN_NODE
  60. LookupLanNodeByGuid(
  61. IN GUID *pGuid
  62. );
  63. PLAN_NODE
  64. LookupLanNodeByName(
  65. IN PWCHAR pwszName
  66. );
  67. DWORD
  68. AddLanNode(
  69. IN GUID *pGuid,
  70. IN PWCHAR pwszName
  71. );
  72. VOID
  73. RemoveLanNode(
  74. IN PLAN_NODE pNode
  75. );
  76. DWORD
  77. UpdateLanLookupTable(
  78. VOID
  79. );