summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2.api
AgeCommit message (Expand)AuthorFilesLines
2021-01-06l2: add per bridge domain learn limitJerome Tollet1-0/+27
2020-11-25api: vat2 and json autogeneration for api messagesOle Troan1-1/+1
2020-04-28tests: move defaults from defaultmapping to .api filesPaul Vinciguerra1-1/+1
2020-03-09l2: API cleanupJakub Grajciar1-75/+86
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns1-1/+39
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra1-2/+2
2019-06-19l2: BD ARP termination entry API updateNeale Ranns1-7/+10
2019-05-09Update API descriptionIgor Mikhailov (imichail)1-3/+2
2019-04-24l2: Add support for arp unicast forwardingMohsin Kazmi1-1/+6
2019-03-21BVI InterfaceNeale Ranns1-0/+38
2019-03-19add default NONE flag for bd_flagsMichal Cmarada1-0/+1
2019-01-07L2 BD API to flush all IP-MAC entries in the specified BDJohn Lo1-1/+12
2018-12-18PAPI: Add MACAddress object wrapper for vl_api_mac_address_tOle Troan1-1/+1
2018-11-07GBP Endpoint LearningNeale Ranns1-1/+0
2018-11-06BD ARP entry use common API typesNeale Ranns1-3/+6
2018-10-01Fix documentation about sw_interface_set_l2_bridgeYichen Wang1-1/+1
2018-09-25L2 BD: introduce a BD interface on which to send UU packetsNeale Ranns1-5/+31
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-4/+4
2018-09-18Fix documentation for SHG in bridge domainYichen Wang1-1/+1
2018-08-17l2: arp termination dumpMohsin Kazmi1-0/+26
2018-07-23L2 EFP: byteswap sw_if_index, enable flag can be u8 on .apiNeale Ranns1-1/+1
2018-03-14Improve l2_macs_events API to provide MAC move informationJohn Lo1-4/+6
2018-03-06API: Add service definitions for events and singleton messages (second attempt)Marek Gradzki1-0/+5
2018-03-05Revert "API: Add service definitions for events and singleton messages."Ole Trøan1-5/+0
2018-03-05API: Add service definitions for events and singleton messages.Ole Troan1-0/+5
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
2017-11-10Break up vpe.apiNeale Ranns1-0/+100
2017-10-31l2fib: MAC: Fix uint64 to u8 byte arrayMohsin Kazmi1-3/+3
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach1-0/+2
2017-09-15Update of free text tag patch for BDJerome Tollet1-0/+1
2017-09-07Support for bridge domain free text tagJerome Tollet1-0/+2
2017-08-22Increase default MAC learn limit and check it in learn-update pathJohn Lo1-1/+0
2017-08-03Add support for API client to receive L2 MAC eventsJohn Lo1-6/+59
2017-05-20API: Cleaning up message naming that does not follow the conventionsOle Troan1-16/+16
2017-05-08L2FIB:CLI/API to flush all non-static entriesEyal Bari1-0/+10
2017-04-25"autoreply" flag: autogenerate standard xxx_reply_t messagesDave Barach1-88/+8
2017-04-05L2FIB:add l2fib_flush_bd l2fib_flush_int apisEyal Bari1-0/+44
2017-04-04BD/API:add bridge_domain_set_mac_age apiEyal Bari1-0/+24
2017-01-27API refactoring : l2 (add)Pavel Kotucek1-0/+65
2017-01-10API refactoring : l2, mpls, srPavel Kotucek1-0/+229
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+38
s="n">vnet_buffer (b)->ip.adj_index[VLIB_TX] = session->value.cs_lbi; } else if (session->value.flags & CNAT_SESSION_FLAG_HAS_SNAT) { /* The return needs DNAT, so we need an additionnal * lookup after translation */ next0 = CNAT_TRANSLATION_NEXT_LOOKUP; } else { /* Translate & follow the fib programming */ next0 = cc->cc_parent.dpoi_next_node; vnet_buffer (b)->ip.adj_index[VLIB_TX] = cc->cc_parent.dpoi_index; } } else { ct = cnat_find_translation (cc->parent_cci, clib_host_to_net_u16 (udp0->dst_port), iproto); if (NULL == ct) { /* Dont translate & Follow the fib programming */ vnet_buffer (b)->ip.adj_index[VLIB_TX] = cc->cc_parent.dpoi_index; next0 = cc->cc_parent.dpoi_next_node; goto trace; } /* New flow, create the sessions */ cnat_ep_trk_t *trk0; u32 rsession_flags = 0; u32 dpoi_index = -1; trk0 = cnat_load_balance (ct, ctx->af, ip4, ip6, &dpoi_index); if (PREDICT_FALSE (NULL == trk0)) { /* Dont translate & Follow the fib programming */ vnet_buffer (b)->ip.adj_index[VLIB_TX] = cc->cc_parent.dpoi_index; next0 = cc->cc_parent.dpoi_next_node; goto trace; } /* add the session */ ip46_address_copy (&session->value.cs_ip[VLIB_TX], &trk0->ct_ep[VLIB_TX].ce_ip.ip); if (ip_address_is_zero (&trk0->ct_ep[VLIB_RX].ce_ip)) { if (AF_IP4 == ctx->af) ip46_address_set_ip4 (&session->value.cs_ip[VLIB_RX], &ip4->src_address); else ip46_address_set_ip6 (&session->value.cs_ip[VLIB_RX], &ip6->src_address); } else { /* We source NAT with the translation */ rsession_flags |= CNAT_SESSION_FLAG_HAS_SNAT; ip46_address_copy (&session->value.cs_ip[VLIB_RX], &trk0->ct_ep[VLIB_RX].ce_ip.ip); } session->value.cs_port[VLIB_TX] = clib_host_to_net_u16 (trk0->ct_ep[VLIB_TX].ce_port); session->value.cs_port[VLIB_RX] = clib_host_to_net_u16 (trk0->ct_ep[VLIB_RX].ce_port); session->value.dpoi_next_node = ct->ct_lb.dpoi_next_node; session->value.cs_lbi = dpoi_index; rv = cspm->vip_policy (vm, b, session, &rsession_flags, ct, ctx); if (CNAT_SOURCE_ERROR_USE_DEFAULT == rv) rv = cspm->default_policy (vm, b, session, &rsession_flags, ct, ctx); if (rv) { if (CNAT_SOURCE_ERROR_EXHAUSTED_PORTS == rv) { vlib_node_registration_t *node = (AF_IP4 == ctx->af) ? &cnat_vip_ip4_node : &cnat_vip_ip6_node; vlib_node_increment_counter (vm, node->index, CNAT_ERROR_EXHAUSTED_PORTS, 1); } next0 = CNAT_TRANSLATION_NEXT_DROP; goto trace; } /* refcnt session in current client */ cnat_client_cnt_session (cc); cnat_session_create (session, ctx, CNAT_LOCATION_FIB, rsession_flags); trace_flags |= CNAT_TRACE_SESSION_CREATED; next0 = ct->ct_lb.dpoi_next_node; vnet_buffer (b)->ip.adj_index[VLIB_TX] = session->value.cs_lbi; } if (AF_IP4 == ctx->af) cnat_translation_ip4 (session, ip4, udp0); else cnat_translation_ip6 (session, ip6, udp0); if (NULL != ct) { cti = ct - cnat_translation_pool; vlib_increment_combined_counter (cntm, ctx->thread_index, cti, 1, vlib_buffer_length_in_chain (vm, b)); } trace: if (PREDICT_FALSE (ctx->do_trace)) { trace_flags |= session_not_found ? 0 : CNAT_TRACE_SESSION_FOUND; cnat_add_trace (vm, node, b, session, ct, trace_flags); } return next0; } VLIB_NODE_FN (cnat_vip_ip4_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE))) return cnat_node_inline (vm, node, frame, cnat_vip_node_fn, AF_IP4, CNAT_LOCATION_FIB, 1 /* do_trace */); return cnat_node_inline (vm, node, frame, cnat_vip_node_fn, AF_IP4, CNAT_LOCATION_FIB, 0 /* do_trace */); } VLIB_NODE_FN (cnat_vip_ip6_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE))) return cnat_node_inline (vm, node, frame, cnat_vip_node_fn, AF_IP6, CNAT_LOCATION_FIB, 1 /* do_trace */); return cnat_node_inline (vm, node, frame, cnat_vip_node_fn, AF_IP6, CNAT_LOCATION_FIB, 0 /* do_trace */); } VLIB_REGISTER_NODE (cnat_vip_ip4_node) = { .name = "ip4-cnat-tx", .vector_size = sizeof (u32), .format_trace = format_cnat_trace, .type = VLIB_NODE_TYPE_INTERNAL, .n_errors = 0, .n_next_nodes = CNAT_TRANSLATION_N_NEXT, .next_nodes = { [CNAT_TRANSLATION_NEXT_DROP] = "ip4-drop", [CNAT_TRANSLATION_NEXT_LOOKUP] = "ip4-lookup", }, }; VLIB_REGISTER_NODE (cnat_vip_ip6_node) = { .name = "ip6-cnat-tx", .vector_size = sizeof (u32), .format_trace = format_cnat_trace, .type = VLIB_NODE_TYPE_INTERNAL, .n_errors = 0, .n_next_nodes = CNAT_TRANSLATION_N_NEXT, .next_nodes = { [CNAT_TRANSLATION_NEXT_DROP] = "ip6-drop", [CNAT_TRANSLATION_NEXT_LOOKUP] = "ip6-lookup", }, }; /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */