2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
25 *************************************************************************
31 Miniport generic portion header file
35 -------- ---------- ----------------------------------------------
39 #ifndef __RTMP_IGMP_SNOOP_H__
40 #define __RTMP_IGMP_SNOOP_H__
42 #include "link_list.h"
44 #define IGMP_PROTOCOL_DESCRIPTOR 0x02
45 #define IGMP_V1_MEMBERSHIP_REPORT 0x12
46 #define IGMP_V2_MEMBERSHIP_REPORT 0x16
47 #define IGMP_LEAVE_GROUP 0x17
48 #define IGMP_V3_MEMBERSHIP_REPORT 0x22
50 #define MLD_V1_LISTENER_REPORT 131
51 #define MLD_V1_LISTENER_DONE 132
52 #define MLD_V2_LISTERNER_REPORT 143
54 #define IGMPMAC_TB_ENTRY_AGEOUT_TIME 120 * OS_HZ
56 #define MULTICAST_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) % (MAX_LEN_OF_MULTICAST_FILTER_HASH_TABLE))
58 #define IS_MULTICAST_MAC_ADDR(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
59 #define IS_BROADCAST_MAC_ADDR(Addr) ((((Addr[0]) & 0xff) == 0xff))
61 VOID
MulticastFilterTableInit(
62 IN PMULTICAST_FILTER_TABLE
*ppMulticastFilterTable
);
64 VOID
MultiCastFilterTableReset(
65 IN PMULTICAST_FILTER_TABLE
*ppMulticastFilterTable
);
67 BOOLEAN
MulticastFilterTableInsertEntry(
70 IN PUCHAR pMemberAddr
,
72 IN MulticastFilterEntryType type
);
74 BOOLEAN
MulticastFilterTableDeleteEntry(
77 IN PUCHAR pMemberAddr
,
80 PMULTICAST_FILTER_TABLE_ENTRY
MulticastFilterTableLookup(
81 IN PMULTICAST_FILTER_TABLE pMulticastFilterTable
,
86 IN PUCHAR pDstMacAddr
,
91 IN PUCHAR pDstMacAddr
,
92 IN PUCHAR pSrcMacAddr
,
97 IN PUCHAR pDstMacAddr
,
99 OUT UINT8
*pProtoType
,
100 OUT PUCHAR
*pMldHeader
);
103 IN PRTMP_ADAPTER pAd
,
104 IN PUCHAR pDstMacAddr
,
105 IN PUCHAR pSrcMacAddr
,
110 IN PLIST_HEADER pList
);
112 VOID
IgmpGroupDelMembers(
113 IN PRTMP_ADAPTER pAd
,
114 IN PUCHAR pMemberAddr
,
117 INT
Set_IgmpSn_Enable_Proc(
118 IN PRTMP_ADAPTER pAd
,
121 INT
Set_IgmpSn_AddEntry_Proc(
122 IN PRTMP_ADAPTER pAd
,
125 INT
Set_IgmpSn_DelEntry_Proc(
126 IN PRTMP_ADAPTER pAd
,
129 INT
Set_IgmpSn_TabDisplay_Proc(
130 IN PRTMP_ADAPTER pAd
,
133 void rtmp_read_igmp_snoop_from_file(
134 IN PRTMP_ADAPTER pAd
,
138 NDIS_STATUS
IgmpPktInfoQuery(
139 IN PRTMP_ADAPTER pAd
,
141 IN PNDIS_PACKET pPacket
,
143 OUT BOOLEAN
*pInIgmpGroup
,
144 OUT PMULTICAST_FILTER_TABLE_ENTRY
*ppGroupEntry
);
146 NDIS_STATUS
IgmpPktClone(
147 IN PRTMP_ADAPTER pAd
,
148 IN PNDIS_PACKET pPacket
,
150 IN PMULTICAST_FILTER_TABLE_ENTRY pGroupEntry
);
152 #endif /* __RTMP_IGMP_SNOOP_H__ */