summaryrefslogtreecommitdiffstats
path: root/src/vlibapi
AgeCommit message (Expand)AuthorFilesLines
2018-10-02PAPI: Use UNIX domain sockets instead of shared memoryOle Troan1-1/+1
2018-10-01API / CLI event-log tracingDave Barach1-45/+38
2018-09-07cmake: set packaging component for different filesDamjan Marion1-0/+2
2018-08-26cmake: add add_vpp_library and add_vpp_executable macrosDamjan Marion1-1/+5
2018-08-25cmake: add more headers to the install listDamjan Marion1-0/+19
2018-08-03svm: add support for eventfd signaling to queueFlorin Coras1-3/+0
2018-07-09IGMP improvementsNeale Ranns1-2/+2
2018-06-21Implement DHCPv6 IA NA client (VPP-1094)Juraj Sloboda1-1/+2
2018-06-14Fix SEGV in generic event sub reaperMatthew Smith1-1/+1
2018-06-13Stat segment / client: show run" works nowDave Barach2-2/+3
2018-06-08Add reaper functions to want events APIs (VPP-1304)Neale Ranns1-1/+19
2018-06-08Implement DHCPv6 PD client (VPP-718, VPP-1050)Juraj Sloboda1-1/+2
2018-06-05VPP API: Memory traceOle Troan2-0/+19
2018-03-16IPv6 ND Router discovery data plane (VPP-1095)Juraj Sloboda1-1/+2
2018-01-25session: add support for memfd segmentsFlorin Coras1-0/+1
2018-01-22svm: queue sub: Add conditional timed waitMohsin Kazmi1-1/+1
2018-01-09api: refactor vlibmemoryFlorin Coras6-303/+38
2018-01-05sock api: add infra for bootstrapping shm clientsFlorin Coras1-44/+20
2017-10-13VPP-1027: DNS name resolverDave Barach1-1/+16
2017-10-10API versioning: Fix coverity errors from strncpy()Ole Troan1-1/+1
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach3-0/+22
2017-10-06Coverity fixes for API socketChris Luke1-5/+7
2017-10-05Clean up "show api ring" debug CLIDave Barach1-1/+4
2017-10-03Repair vlib API socket serverDave Barach3-98/+167
2017-09-28General documentation updatesChris Luke1-37/+40
2017-09-27VPP-990 remove registered handler if control ping failsv18.01-rc0Matej Perina2-0/+13
2017-09-25Add binary API documentationDave Barach2-70/+471
2017-09-22IP-MAC,ND:wildcard events,fix sending multiple eventsEyal Bari1-0/+1
2017-09-20Improve API message handler re-registration checkDave Barach1-3/+5
2017-09-18L2BD,ARP-TERM:fix arp query report mechanism+testEyal Bari1-1/+2
2017-09-13API message table inspection utilitiesDave Barach1-0/+3
2017-09-11Recombine diags and minimum barrier open time changes (VPP-968)Colin Tregenza Dancer2-2/+14
2017-09-09move unix_file_* code to vppinfraDamjan Marion1-1/+1
2017-09-07Allow individual stats API and introduce stats.apiKeith Burns (alagalah)1-1/+0
2017-07-01Refactor API message handling codeKlement Sekera2-255/+293
2017-06-01Improve fifo allocator performanceDave Barach1-0/+3
2017-05-19Enforce Bridge Domain ID range to match 24-bit VNI rangeJohn Lo1-0/+14
2017-05-17Add vl_msg_api_get_message_length[_inline]Dave Barach2-0/+17
2017-05-03A sprinkling of const in vlibmemory/api.h and friendsNeale Ranns2-7/+8
2017-03-30Clean up more Debian packaging symbol warningsDave Barach1-0/+227
2017-03-16API:replaced all REPLY_MACRO's with api_helper_macros.hEyal Bari1-4/+4
2017-03-15API: define optional base_id for REPLY_MACRO'sEyal Bari1-4/+8
2017-03-14API:support hidden sw interfacesEyal Bari1-9/+9
2017-03-14Clean up dead API client reaper callack schemeDave Barach1-0/+44
2017-03-09vlib_mains == 0 special cases be goneDave Barach3-520/+29
2017-03-03Improve api trace replay consistency checkingDave Barach2-0/+9
2017-03-02Clean up binary api message handler registration issuesDave Barach2-0/+19
2017-02-14Fix typo in API warning message.Jon Loeliger1-1/+1
2017-02-07Fix M(), M2() macros in VATFilip Tehlar1-2/+4
2017-02-02Refactor fragile msg macro W and W2 to not burry return control flow.Jon Loeliger1-6/+6
(vl_api_graph_node_get_t * mp) { vl_api_registration_t *rp; rp = vl_api_client_index_to_registration (mp->client_index); if (!rp) return; vlib_main_t *vm = vlib_get_main (); vlib_node_main_t *nm = &vm->node_main; graph_main_t *gmp = &graph_main; vlib_node_t *n; u32 cursor; u32 node_index; bool want_arcs; want_arcs = ! !mp->want_arcs; cursor = ntohl (mp->cursor); n = 0; /* * Return details on a specific node by index? */ node_index = ntohl (mp->index); if (cursor == ~0 && node_index != ~0) { if (node_index < vec_len (nm->nodes)) n = vlib_get_node (vm, node_index); if (!n) { send_graph_node_reply (rp, mp->context, VNET_API_ERROR_NO_SUCH_ENTRY, ~0); return; } send_graph_node_details (nm, rp, mp->context, n, want_arcs); send_graph_node_reply (rp, mp->context, 0, ~0); return; } /* * Return details on a specific node by name? */ if (cursor == ~0 && mp->name[0] != 0) { n = vlib_get_node_by_name (vm, (u8 *) mp->name); if (!n) { send_graph_node_reply (rp, mp->context, VNET_API_ERROR_NO_SUCH_ENTRY, ~0); return; } send_graph_node_details (nm, rp, mp->context, n, want_arcs); send_graph_node_reply (rp, mp->context, 0, ~0); return; } /* * Inspect all nodes, but potentially limit them by flag selection. * As iteration my need to occur over multiple streaming API calls, * determine the API client index and cache a sorted list of nodes. * * First time through, make a sorted node list and cache it. */ vlib_node_t **nodes = gmp->sorted_node_vec; if (!nodes) { nodes = vec_dup (nm->nodes); vec_sort_with_function (nodes, node_cmp); gmp->sorted_node_vec = nodes; } u32 flags = ntohl (mp->flags); u32 first_index = (cursor == ~0) ? 0 : cursor; /* Don't overflow the existing queue space. */ svm_queue_t *q = rp->vl_input_queue; u32 queue_slots_available = q->maxsize - q->cursize; int chunk = (queue_slots_available > 0) ? queue_slots_available - 1 : 0; u32 i; for (i = first_index; i < vec_len (nodes); ++i) { if (chunk-- == 0) { /* * Pick up again at cursor = i. */ send_graph_node_reply (rp, mp->context, VNET_API_ERROR_EAGAIN, i); return; } n = nodes[i]; if (flags == 0 || (n->flags & flags)) { send_graph_node_details (nm, rp, mp->context, n, want_arcs); } } send_graph_node_reply (rp, mp->context, 0, ~0); } #include <vnet/format_fns.h> #include <tracedump/graph.api.c> static clib_error_t * graph_api_hookup (vlib_main_t * vm) { api_main_t *am = vlibapi_get_main (); graph_main_t *gmp = &graph_main; gmp->msg_id_base = setup_message_id_table (); am->is_mp_safe[gmp->msg_id_base + VL_API_GRAPH_NODE_GET] = 1; return 0; } VLIB_INIT_FUNCTION (graph_api_hookup); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */