summaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp/igmp_ssm_range.h
blob: 30180ec1acdc8b16d15488e79ef9bbe51ce6b773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 *------------------------------------------------------------------
 * Copyright (c) 2017 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *------------------------------------------------------------------
 */

#ifndef __IGMP_SSM_RANGE_H__
#define __IGMP_SSM_RANGE_H__

#include <igmp/igmp.h>

/**
 * Make sure this remains in-sync with the .api enum definition
 */
#define foreach_igmp_group_prefix_type                  \
  _ (0x0, ASM)                                          \
  _ (0x1, SSM)

typedef enum igmp_group_prefix_type_t_
{
#define _(n,f) IGMP_GROUP_PREFIX_TYPE_##f = n,
  foreach_igmp_group_prefix_type
#undef _
} igmp_group_prefix_type_t;

extern igmp_group_prefix_type_t igmp_group_prefix_get_type (const
							    ip46_address_t *
							    gaddr);

extern void igmp_group_prefix_set (const fib_prefix_t * pfx,
				   igmp_group_prefix_type_t type);

typedef walk_rc_t (*igmp_ssm_range_walk_t) (const fib_prefix_t * pfx,
					    igmp_group_prefix_type_t type,
					    void *ctx);

extern void igmp_ssm_range_walk (igmp_ssm_range_walk_t fn, void *ctx);

#endif

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
f0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright (c) 2020 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Keywords used in suite teardowns."""

*** Settings ***
| Library | resources.libraries.python.DPDK.DPDKTools
| Library | resources.libraries.python.TrafficGenerator
| Library | resources.libraries.python.DUTSetup
|
| Documentation | Suite teardown keywords.

*** Keywords ***
| Tear down suite
| | [Documentation]
| | ... | Common suite teardown for tests.
| |
| | ... | *Arguments:*
| | ... | - ${actions} - Additional teardown action. Type: list
| |
| | [Arguments] | @{actions}
| |
| | FOR | ${action} | IN | @{actions}
| | | Run Keyword | Additional Suite Tear Down Action For ${action}
| | END
| | Remove All Added VIF Ports On All DUTs From Topology | ${nodes}

| Additional Suite Tear Down Action For performance
| | [Documentation]
| | ... | Additional teardown for suites which uses performance measurement.
| |
| | Run Keyword And Ignore Error | Teardown traffic generator | ${tg}

| Additional Suite Tear Down Action For dpdk
| | [Documentation]
| | ... | Additional teardown for suites which uses dpdk.
| |
| | FOR | ${dut} | IN | @{duts}
| | | Cleanup DPDK Environment
| | | ... | ${nodes['${dut}']} | ${${dut}_if1} | ${${dut}_if2}
| | END

| Additional Suite Tear Down Action For wrk
| | [Documentation]
| | ... | Additional teardown for suites which uses wrk.
| |
| | ${intf_name}= | Get Linux interface name | ${tg}
| | ... | ${tg['interfaces']['${tg_if1}']['pci_address']}
| | FOR | ${ip_addr} | IN | @{wrk_ip_addrs}
| | | ${ip_addr_on_intf}= | Linux Interface Has IP | ${tg} | ${intf_name}
| | | ... | ${ip_addr} | ${wrk_ip_prefix}
| | | Run Keyword If | ${ip_addr_on_intf}==${True} | Delete Linux Interface IP
| | | ... | ${tg} | ${intf_name} | ${ip_addr} | ${wrk_ip_prefix}
| | END
| | Run Keyword And Ignore Error | PCI Driver Unbind
| | ... | ${tg} | ${tg['interfaces']['${tg_if1}']['pci_address']}
| | Run Keyword And Ignore Error | PCI Driver Unbind
| | ... | ${tg} | ${tg['interfaces']['${tg_if2}']['pci_address']}

| Additional Suite Tear Down Action For hoststack
| | [Documentation]
| | ... | Additional teardown for suites which uses hoststack test programs.
| | ... | Ensure all hoststack test programs are no longer running on all DUTS.
| |
| | FOR | ${dut} | IN | @{duts}
| | | Kill Program | ${nodes['${dut}']} | iperf3
| | | Kill Program | ${nodes['${dut}']} | vpp_echo