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.

76 lines
1.8 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. // Internet Group Message Protocol for Internet Protocol Version 6.
  14. // See RFC 1885 and RFC 2236 for details.
  15. //
  16. #ifndef MLD_INCLUDED
  17. #define MLD_INCLUDED 1
  18. //
  19. // MLD values defined by the spec.
  20. //
  21. #define MLD_ROUTER_ALERT_OPTION_TYPE 0
  22. //
  23. // Combined structure used for inserting router alert into MLD messages.
  24. //
  25. typedef struct MLDRouterAlertOption {
  26. IPv6OptionsHeader Header;
  27. IPv6RouterAlertOption Option;
  28. OptionHeader Pad;
  29. // No pad data is needed since with the PadN option the sizeof
  30. // this struct = 8.
  31. } MLDRouterAlertOption;
  32. //
  33. // MLD external functions.
  34. //
  35. extern KSPIN_LOCK QueryListLock;
  36. extern MulticastAddressEntry *QueryList;
  37. extern void
  38. AddToQueryList(MulticastAddressEntry *MAE);
  39. extern void
  40. RemoveFromQueryList(MulticastAddressEntry *MAE);
  41. extern void
  42. MLDQueryReceive(IPv6Packet *Packet);
  43. extern void
  44. MLDReportReceive(IPv6Packet *Packet);
  45. extern void
  46. MLDInit(void);
  47. extern void
  48. MLDTimeout(void);
  49. extern IP_STATUS
  50. MLDAddMCastAddr(uint *pInterfaceNo, const IPv6Addr *Addr);
  51. extern IP_STATUS
  52. MLDDropMCastAddr(uint InterfaceNo, const IPv6Addr *Addr);
  53. __inline int
  54. IsMLDReportable(MulticastAddressEntry *MAE)
  55. {
  56. return ((MAE->Scope >= ADE_LINK_LOCAL) &&
  57. !IP6_ADDR_EQUAL(&MAE->Address, &AllNodesOnLinkAddr));
  58. }
  59. #endif // MLD_INCLUDED