blob: 96e514427c6774eb757f43a7c6c108ae6fe53b8d [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001/*
2 * Copyright (c) 2015 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef __included_vnet_mcast_h__
16#define __included_vnet_mcast_h__
17
18#include <vnet/vnet.h>
19#include <vlib/buffer.h>
20#include <vlib/buffer_funcs.h>
21
22typedef struct {
23 /* Arrange for both prep and recycle nodes to have identical
24 next indices for a given output interface */
25 u32 prep_and_recycle_node_next_index;
26
27 /* Show command, etc. */
28 u32 tx_sw_if_index;
29} mcast_group_member_t;
30
31typedef struct {
32 /* vector of group members */
33 mcast_group_member_t * members;
34} mcast_group_t;
35
36typedef struct {
37 /* pool of multicast (interface) groups */
38 mcast_group_t * groups;
39
40 /* multicast "free" list, aka recycle list */
41 u32 mcast_recycle_list_index;
42
43 /* convenience */
44 vlib_main_t * vlib_main;
45 vnet_main_t * vnet_main;
46} mcast_main_t;
47
48mcast_main_t mcast_main;
49
50#endif /* __included_vnet_mcast_h__ */