2 // Copyright (c) 2019 Intel Corporation
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
20 #define IGMP_MEMBERSHIP_QUERY 0x11
21 #define IGMP_MEMBERSHIP_REPORT_V1 0x12
22 #define IGMP_MEMBERSHIP_REPORT 0x16
23 #define IGMP_LEAVE_GROUP 0x17
26 uint8_t type: 4; /* type */
27 uint8_t version: 4; /* version */
28 uint8_t unused; /* unused */
29 uint16_t checksum; /* checksum */
30 uint32_t group_address; /* group address */
31 } __attribute__((__packed__));
34 uint8_t type; /* type */
35 uint8_t max_resp_time; /* maximum response time */
36 uint16_t checksum; /* checksum */
37 uint32_t group_address; /* group address */
38 } __attribute__((__packed__));
41 uint8_t type; /* type */
42 uint8_t max_resp_time; /* maximum response time */
43 uint16_t checksum; /* checksum */
44 uint32_t group_address; /* group address */
45 uint8_t bits: 4; /* S(suppress router-side processing)QRV(Querier.s Robustness Variable) bits */
46 uint8_t reserved: 4; /* reserved */
47 uint8_t QQIC; /* Querier.s Query Interval Code */
48 uint16_t n_src; /* Number of source addresses */
49 } __attribute__((__packed__));
53 // igmp_join and leave functions are so far implemented within handle_swap.
54 // Only swap task can use them right now, as they use igmp_pool
55 // only defined in swap task.
56 void igmp_join_group(struct task_base *tbase, uint32_t igmp_address);
57 void igmp_leave_group(struct task_base *tbase);