FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
igmp_src.h
Go to the documentation of this file.
1 /*
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:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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  *------------------------------------------------------------------
16  */
17 
18 #ifndef __IGMP_SOURCE_H__
19 #define __IGMP_SOURCE_H__
20 
21 #include <igmp/igmp_types.h>
22 
23 /**
24  * IGMP Source timers
25  */
26 typedef enum igmp_src_timer_t_
27 {
28  /**
29  * On expiry the source has not been refreshed by a query
30  * and can now be reaped
31  */
34 
35 #define IGMP_SRC_N_TIMERS (IGMP_SRC_TIMER_EXP + 1)
36 
37 /**
38  * @brief IGMP source
39  * The representation of a specified source address with in multicast group.
40  */
41 typedef struct igmp_src_t_
42 {
43  /**
44  * The source's key
45  */
47 
48  /**
49  * The liveness timer. Reset with each received report. on expiry
50  * the source is removed from the group.
51  */
53 
54  /**
55  * The group this source is on
56  */
58 
59  /**
60  * the mode that provided this source
61  */
63 
64  /**
65  * Timers
66  */
68 
69  /**
70  * Tells us which configurations
71  * have this source.
72  */
74 } igmp_src_t;
75 
76 extern void igmp_src_free (igmp_src_t * src);
77 
78 extern igmp_src_t *igmp_src_alloc (u32 group_index,
79  const igmp_key_t * skey, igmp_mode_t mode);
80 
81 extern u32 igmp_src_index (igmp_src_t * src);
82 
83 extern void igmp_src_refresh (igmp_src_t * src);
84 extern void igmp_src_blocked (igmp_src_t * src);
85 extern u8 *format_igmp_src (u8 * s, va_list * args);
86 
87 #endif
88 
89 /*
90  * fd.io coding-style-patch-verification: ON
91  *
92  * Local Variables:
93  * eval: (c-set-style "gnu")
94  * End:
95  */
igmp_mode_t
enum igmp_mode_t_ igmp_mode_t
igmp_src_t_
IGMP source The representation of a specified source address with in multicast group.
Definition: igmp_src.h:41
IGMP_SRC_TIMER_EXP
@ IGMP_SRC_TIMER_EXP
On expiry the source has not been refreshed by a query and can now be reaped.
Definition: igmp_src.h:32
igmp_src_timer_t
enum igmp_src_timer_t_ igmp_src_timer_t
IGMP Source timers.
mode
vl_api_tunnel_mode_t mode
Definition: gre.api:48
igmp_types.h
igmp_src_index
u32 igmp_src_index(igmp_src_t *src)
Definition: igmp_src.c:141
igmp_src_t_::mode
igmp_mode_t mode
the mode that provided this source
Definition: igmp_src.h:62
igmp_src_t
struct igmp_src_t_ igmp_src_t
IGMP source The representation of a specified source address with in multicast group.
IGMP_SRC_N_TIMERS
#define IGMP_SRC_N_TIMERS
Definition: igmp_src.h:35
igmp_src_timer_t_
igmp_src_timer_t_
IGMP Source timers.
Definition: igmp_src.h:26
igmp_src_free
void igmp_src_free(igmp_src_t *src)
Definition: igmp_src.c:23
igmp_src_t_::group
u32 group
The group this source is on.
Definition: igmp_src.h:57
format_igmp_src
u8 * format_igmp_src(u8 *s, va_list *args)
Definition: igmp_src.c:147
igmp_src_t_::timers
u32 timers[IGMP_SRC_N_TIMERS]
Timers.
Definition: igmp_src.h:67
src
vl_api_address_t src
Definition: gre.api:54
igmp_src_t_::referance_by_config_index
u8 * referance_by_config_index
Tells us which configurations have this source.
Definition: igmp_src.h:73
igmp_src_alloc
igmp_src_t * igmp_src_alloc(u32 group_index, const igmp_key_t *skey, igmp_mode_t mode)
Definition: igmp_src.c:73
igmp_src_blocked
void igmp_src_blocked(igmp_src_t *src)
Definition: igmp_src.c:129
u32
unsigned int u32
Definition: types.h:88
u8
unsigned char u8
Definition: types.h:56
igmp_src_t_::key
igmp_key_t * key
The source's key.
Definition: igmp_src.h:46
igmp_src_refresh
void igmp_src_refresh(igmp_src_t *src)
Definition: igmp_src.c:117
igmp_src_t_::exp_timer
u32 exp_timer
The liveness timer.
Definition: igmp_src.h:52
igmp_key_t
ip46_address_t igmp_key_t
IGMP Key Used to index groups within an interface config and sources within a list.
Definition: igmp_types.h:49