aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet/p2p_ethernet.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-01-03 16:44:47 +0000
committerDave Wallace <dwallacelf@gmail.com>2020-01-03 21:38:11 +0000
commit1aaa891864321f2ded4259c709089f3edd6f2667 (patch)
tree9fb6f9ad6344b5efd07af27a8f07fc3411bcc7d3 /src/vnet/ethernet/p2p_ethernet.c
parent8d0149d74c198f57dc795eb9e99cdb46112bd737 (diff)
hsa: fix coverity warning
Type:fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I38b155f7617d002ac16943c2c031269a17f4ba73
Diffstat (limited to 'src/vnet/ethernet/p2p_ethernet.c')
0 files changed, 0 insertions, 0 deletions
olor: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* 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) 2016 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.
 */

/**
 * @brief Mcast Adjacency
 *
 * The multicast adjacency forwards IP traffic on an interface toward a multicast
 * group address. This is a different type of adjacency to a unicast adjacency
 * since the application of the MAC header is different, and so the VLIB node
 * visited is also different. DPO types have different VLIB nodes.
 */

#ifndef __ADJ_MCAST_H__
#define __ADJ_MCAST_H__

#include <vnet/adj/adj_types.h>
#include <vnet/adj/adj_midchain.h>

/**
 * @brief
 *  Add (and lock) a new or lock an existing mcast adjacency
 *
 * @param proto
 *  The protocol for the neighbours that we wish to mcast
 *
 * @param link_type
 *  A description of the protocol of the packets that will forward
 *  through this adj. On an ethernet interface this is the MAC header's
 *  ether-type
 *
 * @param sw_if_index
 *  The interface on which to mcast
 */
extern adj_index_t adj_mcast_add_or_lock(fib_protocol_t proto,
                                         vnet_link_t link_type,
					 u32 sw_if_index);

/**
 * @brief
 *  Update the rewrite string for an existing adjacecny.
 *
 * @param
 *  The index of the adj to update
 *
 * @param
 *  The new rewrite
 *
 * @param
 *  The offset in the rewrite a which to write in packet's
 *  IP Address
 *
 * @param
 *  The mask to apply to the packet berfore the rewrite.
 */
extern void adj_mcast_update_rewrite(adj_index_t adj_index,
                                     u8 *rewrite,
                                     u8 offset,
                                     u32 mask);

/**
 * @brief
 *  Update the rewrite string for an existing adjacecny and
 *  Convert the adjacency into a midchain
 *
 * @param
 *  The index of the adj to update
 *
 * @param
 *  The new rewrite
 */
extern void adj_mcast_midchain_update_rewrite(adj_index_t adj_index,
                                              adj_midchain_fixup_t fixup,
                                              adj_flags_t flags,
                                              u8 *rewrite,
                                              u8 offset,
                                              u32 mask);
/**
 * @brief Walk the multicast Adjacencies on a given interface
 */
extern void adj_mcast_walk (u32 sw_if_index,
                            fib_protocol_t adj_nh_proto,
                            adj_walk_cb_t cb,
                            void *ctx);

/**
 * @brief Format/display a mcast adjacency.
 */
extern u8* format_adj_mcast(u8* s, va_list *ap);
extern u8* format_adj_mcast_midchain(u8* s, va_list *ap);

/**
 * @brief Get the sze of the mcast adj DB. Test purposes only.
 */
extern u32 adj_mcast_db_size(void);

/**
 * @brief
 *  Module initialisation
 */
extern void adj_mcast_module_init(void);

#endif