]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.h
1. Enable Network stack to pass SCT, currently MNP, ARP, IP4, TCP4 and DHCP4 have...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Igmp.h
CommitLineData
772db4bb 1/** @file
2
3Copyright (c) 2005 - 2006, Intel Corporation
4All rights reserved. This program and the accompanying materials
5are licensed and made available under the terms and conditions of the BSD License
6which accompanies this distribution. The full text of the license may be found at
7http://opensource.org/licenses/bsd-license.php
8
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13Module Name:
14
15 Ip4Igmp.h
16
17Abstract:
18
19
20**/
21
22#ifndef __EFI_IP4_IGMP_H__
23#define __EFI_IP4_IGMP_H__
24
25#pragma pack(1)
26typedef struct {
27 UINT8 Type;
28 UINT8 MaxRespTime;
29 UINT16 Checksum;
30 IP4_ADDR Group;
31} IGMP_HEAD;
32#pragma pack()
33
34//
35// The status of multicast group. It isn't necessary to maintain
36// explicit state of host state diagram. A group with non-zero
37// DelayTime is in "delaying member" state. otherwise, it is in
38// "idle member" state.
39//
40typedef struct {
41 NET_LIST_ENTRY Link;
42 INTN RefCnt;
43 IP4_ADDR Address;
44 INTN DelayTime;
45 BOOLEAN ReportByUs;
46 EFI_MAC_ADDRESS Mac;
47} IGMP_GROUP;
48
49//
50// The IGMP status. Each IP4 service instance has a IGMP_SERVICE_DATA
51// attached. The Igmpv1QuerySeen remember whether the server on this
52// connected network is v1 or v2.
53//
54typedef struct {
55 INTN Igmpv1QuerySeen;
56 NET_LIST_ENTRY Groups;
57} IGMP_SERVICE_DATA;
58
59enum {
60 //
61 // IGMP message type
62 //
63 IGMP_MEMBERSHIP_QUERY = 0x11,
64 IGMP_V1_MEMBERSHIP_REPORT = 0x12,
65 IGMP_V2_MEMBERSHIP_REPORT = 0x16,
66 IGMP_LEAVE_GROUP = 0x17,
67
68 IGMP_V1ROUTER_PRESENT = 400,
687a2e5f 69 IGMP_UNSOLICIATED_REPORT = 10
772db4bb 70};
71
72EFI_STATUS
73Ip4InitIgmp (
74 IN IP4_SERVICE *IpService
75 );
76
77EFI_STATUS
78Ip4JoinGroup (
79 IN IP4_PROTOCOL *IpInstance,
80 IN IP4_ADDR Address
81 );
82
83EFI_STATUS
84Ip4LeaveGroup (
85 IN IP4_PROTOCOL *IpInstance,
86 IN IP4_ADDR Address
87 );
88
89EFI_STATUS
90Ip4IgmpHandle (
91 IN IP4_SERVICE *IpService,
92 IN IP4_HEAD *Head,
93 IN NET_BUF *Packet
94 );
95
96VOID
97Ip4IgmpTicking (
98 IN IP4_SERVICE *IpService
99 );
100
101IP4_ADDR *
102Ip4CombineGroups (
103 IN IP4_ADDR *SourceGroups,
104 IN UINT32 Count,
105 IN IP4_ADDR Addr
106 );
107
108INTN
109Ip4RemoveGroupAddr (
110 IN IP4_ADDR *Group,
111 IN UINT32 GroupCnt,
112 IN IP4_ADDR Addr
113 );
114
115IGMP_GROUP *
116Ip4FindGroup (
117 IN IGMP_SERVICE_DATA *IgmpCtrl,
118 IN IP4_ADDR Address
119 );
120#endif