2007-09-30 05:08:02 +02:00
|
|
|
/** @file
|
|
|
|
|
|
|
|
Copyright (c) 2005 - 2006, Intel Corporation
|
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
|
|
|
|
Module Name:
|
|
|
|
|
|
|
|
Ip4Igmp.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __EFI_IP4_IGMP_H__
|
|
|
|
#define __EFI_IP4_IGMP_H__
|
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
typedef struct {
|
|
|
|
UINT8 Type;
|
|
|
|
UINT8 MaxRespTime;
|
|
|
|
UINT16 Checksum;
|
|
|
|
IP4_ADDR Group;
|
|
|
|
} IGMP_HEAD;
|
|
|
|
#pragma pack()
|
|
|
|
|
2008-11-11 10:23:25 +01:00
|
|
|
///
|
|
|
|
/// The status of multicast group. It isn't necessary to maintain
|
|
|
|
/// explicit state of host state diagram. A group with non-zero
|
|
|
|
/// DelayTime is in "delaying member" state. otherwise, it is in
|
|
|
|
/// "idle member" state.
|
|
|
|
///
|
2007-09-30 05:08:02 +02:00
|
|
|
typedef struct {
|
2008-02-14 10:40:22 +01:00
|
|
|
LIST_ENTRY Link;
|
2007-09-30 05:08:02 +02:00
|
|
|
INTN RefCnt;
|
|
|
|
IP4_ADDR Address;
|
|
|
|
INTN DelayTime;
|
|
|
|
BOOLEAN ReportByUs;
|
|
|
|
EFI_MAC_ADDRESS Mac;
|
|
|
|
} IGMP_GROUP;
|
|
|
|
|
2008-11-11 10:23:25 +01:00
|
|
|
///
|
|
|
|
/// The IGMP status. Each IP4 service instance has a IGMP_SERVICE_DATA
|
|
|
|
/// attached. The Igmpv1QuerySeen remember whether the server on this
|
|
|
|
/// connected network is v1 or v2.
|
|
|
|
///
|
2007-09-30 05:08:02 +02:00
|
|
|
typedef struct {
|
|
|
|
INTN Igmpv1QuerySeen;
|
2008-02-14 10:40:22 +01:00
|
|
|
LIST_ENTRY Groups;
|
2007-09-30 05:08:02 +02:00
|
|
|
} IGMP_SERVICE_DATA;
|
|
|
|
|
2008-11-11 03:44:30 +01:00
|
|
|
typedef enum {
|
2007-09-30 05:08:02 +02:00
|
|
|
//
|
|
|
|
// IGMP message type
|
|
|
|
//
|
|
|
|
IGMP_MEMBERSHIP_QUERY = 0x11,
|
|
|
|
IGMP_V1_MEMBERSHIP_REPORT = 0x12,
|
|
|
|
IGMP_V2_MEMBERSHIP_REPORT = 0x16,
|
|
|
|
IGMP_LEAVE_GROUP = 0x17,
|
|
|
|
|
|
|
|
IGMP_V1ROUTER_PRESENT = 400,
|
|
|
|
IGMP_UNSOLICIATED_REPORT = 10
|
2008-11-11 03:44:30 +01:00
|
|
|
} IGMP_ENUM_TYPES;
|
2007-09-30 05:08:02 +02:00
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
Ip4InitIgmp (
|
|
|
|
IN IP4_SERVICE *IpService
|
|
|
|
);
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
Ip4JoinGroup (
|
|
|
|
IN IP4_PROTOCOL *IpInstance,
|
|
|
|
IN IP4_ADDR Address
|
|
|
|
);
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
Ip4LeaveGroup (
|
|
|
|
IN IP4_PROTOCOL *IpInstance,
|
|
|
|
IN IP4_ADDR Address
|
|
|
|
);
|
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
Ip4IgmpHandle (
|
|
|
|
IN IP4_SERVICE *IpService,
|
|
|
|
IN IP4_HEAD *Head,
|
|
|
|
IN NET_BUF *Packet
|
|
|
|
);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
Ip4IgmpTicking (
|
|
|
|
IN IP4_SERVICE *IpService
|
|
|
|
);
|
|
|
|
|
|
|
|
IP4_ADDR *
|
|
|
|
Ip4CombineGroups (
|
|
|
|
IN IP4_ADDR *SourceGroups,
|
|
|
|
IN UINT32 Count,
|
|
|
|
IN IP4_ADDR Addr
|
|
|
|
);
|
|
|
|
|
|
|
|
INTN
|
|
|
|
Ip4RemoveGroupAddr (
|
|
|
|
IN IP4_ADDR *Group,
|
|
|
|
IN UINT32 GroupCnt,
|
|
|
|
IN IP4_ADDR Addr
|
|
|
|
);
|
|
|
|
|
|
|
|
IGMP_GROUP *
|
|
|
|
Ip4FindGroup (
|
|
|
|
IN IGMP_SERVICE_DATA *IgmpCtrl,
|
|
|
|
IN IP4_ADDR Address
|
|
|
|
);
|
|
|
|
#endif
|