aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
AgeCommit message (Expand)AuthorFilesLines
2020-05-15misc: removed executable bits from source filesRay Kinsella1-0/+0
2019-10-07docs: change VPP_WITH_SAMPLE_PLUGIN to SAMPLE_PLUGIN in sample plugin documen...Haggai Eran1-4/+4
2019-09-25ip: respect buffer boundary when searching for ipv6 headersKlement Sekera1-2/+1
2019-09-25api: split api generated filesOle Troan4-200/+9
2019-09-16api: autogenerate api trace print/endianOle Troan1-1/+1
2019-08-01docs: Small fixes and orderingNathan Skrzypczak1-1/+1
2019-07-29misc: add vnet/pipeline.h exampleDave Barach1-1/+89
2019-07-09vat: unload unused vat pluginsDave Barach1-27/+11
2019-06-24vlib: packet tracer support for pkt thread handoffsDave Barach5-0/+536
2019-05-30sample-plugin: refactor .api to use explicit typesOle Troan1-8/+9
2019-05-16init / exit function orderingDave Barach1-8/+7
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-28/+28
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-2/+2
2018-10-23c11 safe string handling supportDave Barach2-2/+2
2018-09-14cpack: add deb/rpm packaging to VPP moduleDamjan Marion2-0/+8
2018-09-12cmake: create cmake VPP module, update sample-plugin so it uses itDamjan Marion5-126/+32
2018-08-22Consolidate the [un]format_mac_address implementationsNeale Ranns1-7/+1
2018-08-01Store USE_DLMALLOC in vppinfra/config.hDamjan Marion2-4/+1
2018-07-26Improve the sample plugin node dispatch functionDave Barach1-128/+473
2018-07-20fix issue with missing sample_main in sample pluginDamjan Marion1-0/+2
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach2-1/+14
2018-04-25Fix sample-plugin build with newer clang versionsDamjan Marion1-0/+20
2018-03-14Clean up vpp build bootstrap stepDave Barach1-3/+4
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan2-5/+3
2017-12-06Remove unused, uninteresting codeDave Barach2-527/+122
2017-10-24Add extern to *_main global variable declarations in header files.Dave Wallace2-2/+2
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach1-0/+2
2017-10-03Repair vlib API socket serverDave Barach3-3/+0
2017-09-07vlib physmem reworkDamjan Marion1-2/+1
2017-08-23NAT: Rename snat plugin to nat (VPP-955)Matus Fabian1-1/+1
2017-06-09Sample plugin: Add sample plugin documentationRay Kinsella2-7/+89
2017-06-07VPP-872 and End.T function for SRv6Pablo Camarillo1-21/+82
2017-05-05First commit SR MPLSPablo Camarillo2-3/+3
2017-04-25"autoreply" flag: autogenerate standard xxx_reply_t messagesDave Barach1-9/+1
2017-04-20Extend ebuild to specify "configure" subdir, enable verify for sample-pluginDamjan Marion1-2/+0
2017-04-06Use thread local storage for thread indexDamjan Marion1-2/+2
2017-03-29Bugfixing and documentation for SRv6Pablo Camarillo4-0/+470
2017-03-22vlib: add description field in plugin registrationDamjan Marion1-0/+1
2017-03-16API:replaced all REPLY_MACRO's with api_helper_macros.hEyal Bari1-23/+2
2017-03-04Fix duplicate binary API registration messages / bugsDave Barach1-2/+2
2017-02-22Support multiple plugin build in the sample-pluginAnlu Yan3-18/+52
2017-02-16Fix sample plugin breakage.Anlu Yan2-22/+9
2017-02-02Refactor fragile msg macro W and W2 to not burry return control flow.Jon Loeliger1-1/+3
2017-02-02Convert message macro S to accept a message pointer parameter;Jon Loeliger1-1/+1
2017-02-02Ensure all M() and M2() second parameters are the message pointer.Jon Loeliger1-1/+1
2017-01-28Add files to CLEANFILES for robust make clean.Burt Silverman1-0/+2
2017-01-25Repair plugin binary API message numberingDave Barach1-0/+2
2017-01-23binary-api debug CLI works with pluginsDave Barach1-36/+1
2017-01-17sample-plugin: fix buildDamjan Marion2-2/+2
2017-01-01Move java,lua api and remaining plugins to src/Damjan Marion9-0/+951
n class="p">(b) + sizeof (*ip6); if (PREDICT_FALSE (l2tp->session_id != session->local_session_id)) { /* Key matched but session id does not. Assume packet is not for us. */ em->counters[node_counter_base_index + L2T_DECAP_ERROR_SESSION_ID_MISMATCH] += 1; next_index = L2T_DECAP_NEXT_NO_INTERCEPT; goto done; } if (PREDICT_FALSE (l2tp->cookie != session->local_cookie[0])) { if (l2tp->cookie != session->local_cookie[1]) { /* Key and session ID matched, but cookie doesn't. Drop this packet. */ b->error = node->errors[L2T_DECAP_ERROR_COOKIE_MISMATCH]; next_index = L2T_DECAP_NEXT_DROP; goto done; } } vnet_buffer (b)->sw_if_index[VLIB_RX] = session->sw_if_index; if (PREDICT_FALSE (!(session->admin_up))) { b->error = node->errors[L2T_DECAP_ERROR_ADMIN_DOWN]; next_index = L2T_DECAP_NEXT_DROP; goto done; } /* strip the ip6 and L2TP header */ vlib_buffer_advance (b, sizeof (*ip6) + session->l2tp_hdr_size); /* Required to make the l2 tag push / pop code work on l2 subifs */ vnet_update_l2_len (b); if (PREDICT_FALSE (b->flags & VLIB_BUFFER_IS_TRACED)) { l2t_trace_t *t = vlib_add_trace (vm, node, b, sizeof (*t)); t->is_user_to_network = 1; t->our_address.as_u64[0] = ip6->dst_address.as_u64[0]; t->our_address.as_u64[1] = ip6->dst_address.as_u64[1]; t->client_address.as_u64[0] = ip6->src_address.as_u64[0]; t->client_address.as_u64[1] = ip6->src_address.as_u64[1]; t->session_index = session_index; } return L2T_DECAP_NEXT_L2_INPUT; done: if (next_index == L2T_DECAP_NEXT_NO_INTERCEPT) { /* Small behavioral change between l2tp-decap and l2tp-decap-local */ if (l2tp_decap_local) { b->error = node->errors[L2T_DECAP_ERROR_NO_SESSION]; next_index = L2T_DECAP_NEXT_DROP; } else { /* Go to next node on the ip6 configuration chain */ if (PREDICT_TRUE (session != 0)) vnet_feature_next (&next_index, b); } } if (PREDICT_FALSE (b->flags & VLIB_BUFFER_IS_TRACED)) { l2t_trace_t *t = vlib_add_trace (vm, node, b, sizeof (*t)); t->is_user_to_network = 1; t->our_address.as_u64[0] = ip6->dst_address.as_u64[0]; t->our_address.as_u64[1] = ip6->dst_address.as_u64[1]; t->client_address.as_u64[0] = ip6->src_address.as_u64[0]; t->client_address.as_u64[1] = ip6->src_address.as_u64[1]; t->session_index = ~0; } return next_index; } #include <vnet/pipeline.h> static uword l2t_decap_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return dispatch_pipeline (vm, node, frame); } /* * l2tp-decap and l2tp-decap-local have very slightly different behavior. * When a packet has no associated session l2tp-decap let it go to ip6 forward, * while l2tp-decap-local drops it. */ /* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2t_decap_node) = { .function = l2t_decap_node_fn, .name = "l2tp-decap", .vector_size = sizeof (u32), .format_trace = format_l2t_trace, .type = VLIB_NODE_TYPE_INTERNAL, .n_errors = ARRAY_LEN(l2t_decap_error_strings), .error_strings = l2t_decap_error_strings, .n_next_nodes = L2T_DECAP_N_NEXT, /* edit / add dispositions here */ .next_nodes = { [L2T_DECAP_NEXT_L2_INPUT] = "l2-input", [L2T_DECAP_NEXT_DROP] = "error-drop", }, }; /* *INDENT-ON* */ VLIB_NODE_FUNCTION_MULTIARCH (l2t_decap_node, l2t_decap_node_fn); /* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2t_decap_local_node) = { .function = l2t_decap_node_fn, .name = "l2tp-decap-local", .vector_size = sizeof (u32), .format_trace = format_l2t_trace, .type = VLIB_NODE_TYPE_INTERNAL, .n_errors = ARRAY_LEN(l2t_decap_error_strings), .error_strings = l2t_decap_error_strings, .n_next_nodes = L2T_DECAP_N_NEXT, /* edit / add dispositions here */ .next_nodes = { [L2T_DECAP_NEXT_L2_INPUT] = "l2-input", [L2T_DECAP_NEXT_DROP] = "error-drop", }, }; /* *INDENT-ON* */ void l2tp_decap_init (void) { ip6_register_protocol (IP_PROTOCOL_L2TP, l2t_decap_local_node.index); } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */