IGMP: proxy device
[vpp.git] / src / plugins / igmp / igmp_proxy.h
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_PROXY_H_
19 #define _IGMP_PROXY_H_
20
21 #include <igmp/igmp_types.h>
22 #include <igmp/igmp_config.h>
23
24 typedef struct
25 {
26   /* VRF index */
27   u32 vrf_id;
28
29   /* upstrema interface */
30   u32 upstream_if;
31
32   /* downstream interfaces */
33   u32 *downstream_ifs;
34 } igmp_proxy_device_t;
35
36 /**
37  * @brief IGMP proxy device add/del
38  *  @param vrf_id - VRF id
39  *  @param sw_if_index - upstream interface
40  *  @param add - add/del
41  *
42  * Add/del IGMP proxy device. Interface must be IGMP enabled in HOST mode.
43  */
44 int igmp_proxy_device_add_del (u32 vfr_id, u32 sw_if_index, u8 add);
45
46 /**
47  * @brief IGMP proxy device add/del interface
48  *  @param vrf_id - VRF id
49  *  @param sw_if_index - downstream interface
50  *  @param add - add/del
51  *
52  * Add/del IGMP enabled interface in ROUTER mode to proxy device.
53  */
54 int igmp_proxy_device_add_del_interface (u32 vrf_id, u32 sw_if_index, u8 add);
55
56 void igmp_proxy_device_merge_config (igmp_config_t *config, u8 block);
57
58 void igmp_proxy_device_block_src (igmp_config_t *config, igmp_group_t *group, igmp_src_t *src);
59
60 void igmp_proxy_device_mfib_path_add_del (igmp_group_t *group, u8 add);
61
62 #endif /* IGMP_PROXY_H */