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.

109 lines
3.2 KiB

  1. // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil -*- (for GNU Emacs)
  2. //
  3. // Copyright (c) 1998-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. // Exported Neighbor Discovery definitions and declarations.
  14. //
  15. #ifndef NEIGHBOR_INCLUDED
  16. #define NEIGHBOR_INCLUDED
  17. extern uint NeighborCacheLimit;
  18. extern uint
  19. CalcReachableTime(uint BaseReachableTime);
  20. extern void
  21. NeighborCacheInit(Interface *IF);
  22. extern void
  23. NeighborCacheDestroy(Interface *IF);
  24. extern void
  25. NeighborCacheTimeout(Interface *IF);
  26. extern void
  27. NeighborCacheFlush(Interface *IF, const IPv6Addr *Addr);
  28. extern NeighborCacheEntry *
  29. FindOrCreateNeighbor(Interface *IF, const IPv6Addr *Addr);
  30. extern void
  31. NeighborCacheCleanup(Interface *IF);
  32. extern void
  33. NeighborCacheCompletePackets(Interface *IF, NDIS_PACKET *PacketList);
  34. extern void
  35. ControlNeighborLoopback(NeighborCacheEntry *NCE, int Loopback);
  36. typedef enum {
  37. NeighborRoundRobin = -1, // Time to round-robin.
  38. NeighborInterfaceDisconnected = 0, // Interface is disconnected -
  39. // definitely not reachable.
  40. NeighborUnreachable = 1, // ND failed - probably not reachable.
  41. NeighborMayBeReachable = 2 // ND succeeded, or has not concluded.
  42. } NeighborReachability;
  43. extern NeighborReachability
  44. GetReachability(NeighborCacheEntry *NCE);
  45. extern void
  46. NeighborCacheReachabilityConfirmation(NeighborCacheEntry *NCE);
  47. extern void
  48. NeighborCacheReachabilityInDoubt(NeighborCacheEntry *NCE);
  49. extern void
  50. NeighborCacheProbeUnreachability(NeighborCacheEntry *NCE);
  51. extern void
  52. DADTimeout(NetTableEntry *NTE);
  53. extern void
  54. RouterSolicitSend(Interface *IF);
  55. extern void
  56. RouterSolicitTimeout(Interface *IF);
  57. extern void
  58. RouterAdvertTimeout(Interface *IF, int Force);
  59. extern void
  60. RouterSolicitReceive(IPv6Packet *Packet, ICMPv6Header UNALIGNED *ICMP);
  61. extern void
  62. RouterAdvertReceive(IPv6Packet *Packet, ICMPv6Header UNALIGNED *ICMP);
  63. extern void
  64. NeighborSolicitReceive(IPv6Packet *Packet, ICMPv6Header UNALIGNED *ICMP);
  65. extern void
  66. NeighborAdvertReceive(IPv6Packet *Packet, ICMPv6Header UNALIGNED *ICMP);
  67. extern void
  68. RedirectReceive(IPv6Packet *Packet, ICMPv6Header UNALIGNED *ICMP);
  69. extern void
  70. RedirectSend(
  71. NeighborCacheEntry *NCE, // Neighbor getting the Redirect.
  72. NeighborCacheEntry *TargetNCE, // Better first-hop to use
  73. const IPv6Addr *Destination, // for this Destination address.
  74. NetTableEntryOrInterface *NTEorIF, // Source of the Redirect.
  75. PNDIS_PACKET FwdPacket, // Packet triggering the redirect.
  76. uint FwdOffset,
  77. uint FwdPayloadLength);
  78. extern void
  79. NeighborSolicitSend(NeighborCacheEntry *NCE, const IPv6Addr *Source);
  80. #endif // NEIGHBOR_INCLUDED