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.

70 lines
1.9 KiB

  1. // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil -*- (for GNU Emacs)
  2. //
  3. // Copyright (c) 2000 Microsoft Corporation
  4. //
  5. // This file is part of the Microsoft Research IPv6 Network Protocol Stack.
  6. // You should have received a copy of the Microsoft End-User License Agreement
  7. // for this software along with this release; see the file "license.txt".
  8. // If not, please see http://www.research.microsoft.com/msripv6/license.htm,
  9. // or write to Microsoft Research, One Microsoft Way, Redmond, WA 98052-6399.
  10. //
  11. // Abstract:
  12. //
  13. // Declarations and definitions for source address selection
  14. // and destination address ordering.
  15. //
  16. #ifndef SELECT_INCLUDED
  17. #define SELECT_INCLUDED 1
  18. #include <tdi.h>
  19. extern void InitSelect(void);
  20. extern void UnloadSelect(void);
  21. typedef struct PrefixPolicyEntry {
  22. struct PrefixPolicyEntry *Next;
  23. IPv6Addr Prefix;
  24. uint PrefixLength;
  25. uint Precedence;
  26. uint SrcLabel;
  27. uint DstLabel;
  28. } PrefixPolicyEntry;
  29. //
  30. // SelectLock protects PrefixPolicyTable.
  31. //
  32. extern KSPIN_LOCK SelectLock;
  33. extern PrefixPolicyEntry *PrefixPolicyTable;
  34. extern void
  35. PrefixPolicyReset(void);
  36. extern void
  37. PrefixPolicyUpdate(const IPv6Addr *PolicyPrefix, uint PrefixLength,
  38. uint Precedence, uint SrcLabel, uint DstLabel);
  39. extern void
  40. PrefixPolicyDelete(const IPv6Addr *PolicyPrefix, uint PrefixLength);
  41. extern void
  42. PrefixPolicyLookup(const IPv6Addr *Addr,
  43. uint *Precedence, uint *SrcLabel, uint *DstLabel);
  44. extern NetTableEntry *
  45. FindBestSourceAddress(Interface *IF, const IPv6Addr *Dest);
  46. extern void
  47. ProcessSiteLocalAddresses(TDI_ADDRESS_IP6 *Addrs,
  48. uint *Key,
  49. uint *pNumAddrs);
  50. extern void
  51. SortDestAddresses(const TDI_ADDRESS_IP6 *Addrs,
  52. uint *Key,
  53. uint NumAddrs);
  54. #endif // SELECT_INCLUDED