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.

46 lines
1.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000.
  5. //
  6. // File: I N T E R F A C E T A B L E . H
  7. //
  8. // Contents: Builds a mapping from IP addresses to interface guids
  9. //
  10. // Notes:
  11. //
  12. // Author: mbend 7 Feb 2001
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #include "array.h"
  17. struct InterfaceMapping
  18. {
  19. GUID m_guidInterface;
  20. DWORD m_dwIpAddress;
  21. DWORD m_dwIndex;
  22. };
  23. typedef CUArray<GUID> InterfaceList;
  24. typedef CUArray<DWORD> IpAddressList;
  25. typedef CUArray<DWORD> IndexList;
  26. typedef CUArray<InterfaceMapping> InterfaceMappingList;
  27. class CInterfaceTable
  28. {
  29. public:
  30. CInterfaceTable();
  31. ~CInterfaceTable();
  32. HRESULT HrInitialize();
  33. HRESULT HrMapIpAddressToGuid(DWORD dwIpAddress, GUID & guidInterface);
  34. HRESULT HrGetMappingList(InterfaceMappingList & interfaceMappingList);
  35. private:
  36. CInterfaceTable(const CInterfaceTable &);
  37. CInterfaceTable & operator=(const CInterfaceTable &);
  38. InterfaceMappingList m_interfaceMappingList;
  39. };