2 *------------------------------------------------------------------
3 * Copyright (c) 2018 Cisco and/or its affiliates.
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.
15 *------------------------------------------------------------------
18 #ifndef __IGMP_SOURCE_H__
19 #define __IGMP_SOURCE_H__
21 #include <igmp/igmp_types.h>
26 typedef enum igmp_src_timer_t_
29 * On expiry the source has not been refreshed by a query
30 * and can now be reaped
35 #define IGMP_SRC_N_TIMERS (IGMP_SRC_TIMER_EXP + 1)
39 * The representation of a specified source address with in multicast group.
41 typedef struct igmp_src_t_
49 * The liveness timer. Reset with each received report. on expiry
50 * the source is removed from the group.
55 * The group this source is on
60 * the mode that provided this source
67 u32 timers[IGMP_SRC_N_TIMERS];
70 * Tells us which configurations
73 u8 *referance_by_config_index;
76 extern void igmp_src_free (igmp_src_t * src);
78 extern igmp_src_t *igmp_src_alloc (u32 group_index,
79 const igmp_key_t * skey, igmp_mode_t mode);
81 extern u32 igmp_src_index (igmp_src_t * src);
83 extern void igmp_src_refresh (igmp_src_t * src);
84 extern void igmp_src_blocked (igmp_src_t * src);
89 * fd.io coding-style-patch-verification: ON
92 * eval: (c-set-style "gnu")