extern l2input_main_t l2input_main;
+extern vlib_node_registration_t l2input_node;
+
static_always_inline l2_bridge_domain_t *
l2input_bd_config_from_index (l2input_main_t * l2im, u32 bd_index)
{
_(ARP_TERM, "arp-term-l2bd") \
_(UU_FLOOD, "l2-flood") \
_(FWD, "l2-fwd") \
+ _(RW, "l2-rw") \
_(LEARN, "l2-learn") \
_(VTR, "l2-input-vtr") \
_(VPATH, "vpath-input-l2") \
u32 feature_bitmap,
u32 enable);
+//Sets modifies flags from a bridge domain
+u32 l2input_set_bridge_features(u32 bd_index,
+ u32 feat_mask,
+ u32 feat_value);
+
#define MODE_L3 0
#define MODE_L2_BRIDGE 1
{
ethernet_header_t * eth;
u16 ethertype;
+ u8 vlan_count = 0;
/* point at currrent l2 hdr */
eth = vlib_buffer_get_current (b);
(ethertype == ETHERNET_TYPE_VLAN_9200)) {
ethernet_vlan_header_t * vlan;
vnet_buffer(b)->l2.l2_len += sizeof (*vlan);
+ vlan_count = 1;
vlan = (void *) (eth+1);
ethertype = clib_net_to_host_u16 (vlan->type);
if (ethertype == ETHERNET_TYPE_VLAN) {
vnet_buffer(b)->l2.l2_len += sizeof (*vlan);
+ vlan_count = 2;
}
}
+ ethernet_buffer_set_vlan_count(b, vlan_count);
}
/*