FD.io VPP  v18.07.1-19-g511ce25
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 recieved 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 } igmp_src_t;
69 
70 extern void igmp_src_free (igmp_src_t * src);
71 
72 extern igmp_src_t *igmp_src_alloc (u32 group_index,
73  const igmp_key_t * skey, igmp_mode_t mode);
74 
75 extern u32 igmp_src_index (igmp_src_t * src);
76 
77 extern void igmp_src_refresh (igmp_src_t * src);
78 extern void igmp_src_blocked (igmp_src_t * src);
79 
80 #endif
81 
82 /*
83  * fd.io coding-style-patch-verification: ON
84  *
85  * Local Variables:
86  * eval: (c-set-style "gnu")
87  * End:
88  */
u32 group
The group this source is on.
Definition: igmp_src.h:57
u32 igmp_src_index(igmp_src_t *src)
Definition: igmp_src.c:139
u32 timers[IGMP_SRC_N_TIMERS]
Timers.
Definition: igmp_src.h:67
igmp_src_timer_t_
IGMP Source timers.
Definition: igmp_src.h:26
void igmp_src_free(igmp_src_t *src)
Definition: igmp_src.c:23
void igmp_src_refresh(igmp_src_t *src)
Definition: igmp_src.c:115
unsigned int u32
Definition: types.h:88
igmp_src_t * igmp_src_alloc(u32 group_index, const igmp_key_t *skey, igmp_mode_t mode)
Definition: igmp_src.c:71
enum igmp_src_timer_t_ igmp_src_timer_t
IGMP Source timers.
struct igmp_src_t_ igmp_src_t
IGMP source The representation of a specified source address with in multicast group.
On expiry the source has not been refreshed by a query and can now be reaped.
Definition: igmp_src.h:32
igmp_mode_t mode
the mode that provided this source
Definition: igmp_src.h:62
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
#define IGMP_SRC_N_TIMERS
Definition: igmp_src.h:35
u32 exp_timer
The liveness timer.
Definition: igmp_src.h:52
igmp_key_t * key
The source&#39;s key.
Definition: igmp_src.h:46
enum igmp_mode_t_ igmp_mode_t
IGMP source The representation of a specified source address with in multicast group.
Definition: igmp_src.h:41
void igmp_src_blocked(igmp_src_t *src)
Definition: igmp_src.c:127