summaryrefslogtreecommitdiffstats
path: root/src/vnet/unix
AgeCommit message (Expand)AuthorFilesLines
2018-10-23c11 safe string handling supportDave Barach4-21/+21
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra2-7/+7
2018-07-26Clean up dpdk plugin rx/tx pcap tracingDave Barach2-0/+6
2018-07-23fix vector index range checksEyal Bari1-1/+1
2018-07-15VPP-1341: fix loopback interface graph arcsDave Barach1-1/+1
2018-07-11avoid using thread local storage for thread indexDamjan Marion2-4/+4
2018-06-11MTU: Software interface / Per-protocol MTU supportOle Troan1-2/+1
2018-05-25Add interface rx pcap tracingDave Barach1-15/+13
2018-05-17Packet generator: preserve pcap file timestampsDave Barach2-0/+10
2018-04-13Revert "MTU: Setting of MTU on software interface (instead of hardware interf...Damjan Marion1-3/+2
2018-04-13MTU: Setting of MTU on software interface (instead of hardware interface)Ole Troan1-2/+3
2018-02-23Convert a pcap file to a set of C initializersDave Barach2-1/+140
2018-01-23VPPAPIGEN: vppapigen replacement in Python PLY.Ole Troan1-1/+1
2018-01-11api: remove transport specific code from handlersFlorin Coras1-21/+21
2018-01-09api: refactor vlibmemoryFlorin Coras1-7/+6
2017-12-11VPP-273 Coding standards cleanup - vnet/vnet/unixsharath reddy8-794/+947
2017-12-04tapcli: change interface nameDamjan Marion1-1/+1
2017-10-19VPP-1024: rewrite buffer trajectory tracerDave Barach1-0/+13
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach1-0/+2
2017-10-06tuntap: Introduce per thread structure to suport multi-threadsSteven2-65/+99
2017-09-28tun/tap: Bad packets sent to kernel via tun/tap interfaceSteven2-22/+29
2017-09-09move unix_file_* code to vppinfraDamjan Marion2-16/+13
2017-08-18Use correct msg ID in the sw-interface-event from TAP and VHOSTNeale Ranns1-1/+1
2017-08-11Dedicated SW Interface EventNeale Ranns1-3/+3
2017-08-11the automatic addition of IP address to the magic TAP interface should only h...Neale Ranns1-0/+21
2017-08-02Fix tcp tx buffer allocationFlorin Coras1-1/+44
2017-05-17VPP-846: tcp perf / scale / hardeningDave Barach1-1/+11
2017-04-25"autoreply" flag: autogenerate standard xxx_reply_t messagesDave Barach1-11/+1
2017-04-06Use thread local storage for thread indexDamjan Marion2-3/+3
2017-03-10VPP-659 TCP improvementsFlorin Coras1-1/+2
2017-03-06features: take device-input buffer advance value directlyDamjan Marion2-3/+2
2017-02-22VPP-635: CLI Memory leak with invalid parameterBilly McFall1-17/+40
2017-01-20Fix coverity warning, VPP-608Dave Barach1-0/+3
2017-01-18Fix coverity warnings, VPP-608Dave Barach1-2/+3
2017-01-14Provision linux stack ip4 and ip6 addresses for tap interfacesDave Barach4-89/+269
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion10-0/+3620
m"> * Table of message reply handlers, must include boilerplate handlers * we just generated */ #define foreach_vpe_api_reply_msg \ _(UDP_PING_ADD_DEL_REPLY, udp_ping_add_del_reply) \ _(UDP_PING_EXPORT_REPLY, udp_ping_export_reply) \ /* M: construct, but don't yet send a message */ #define M(T,t) \ do { \ vam->result_ready = 0; \ mp = vl_msg_api_alloc(sizeof(*mp)); \ memset (mp, 0, sizeof (*mp)); \ mp->_vl_msg_id = ntohs (VL_API_##T + sm->msg_id_base); \ mp->client_index = vam->my_client_index; \ } while(0); /* S: send a message */ #define S (vl_msg_api_send_shmem (vam->vl_input_queue, (u8 *)&mp)) /* W: wait for results, with timeout */ #define W \ do { \ timeout = vat_time_now (vam) + 5.0; \ \ while (vat_time_now (vam) < timeout) { \ if (vam->result_ready == 1) { \ return (vam->retval); \ } \ } \ return -99; \ } while(0); static int api_udp_ping_add_del_req (vat_main_t * vam) { udp_ping_test_main_t *sm = &udp_ping_test_main; unformat_input_t *input = vam->input; vl_api_udp_ping_add_del_req_t *mp; int rv = 0; ip6_address_t dst, src; u32 start_src_port, end_src_port; u32 start_dst_port, end_dst_port; u32 interval; u8 is_disable = 0; f64 timeout; while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "src %U", unformat_ip6_address, &src)) ; else if (unformat (input, "start-src-port %d", &start_src_port)) ; else if (unformat (input, "end-src-port %d", &end_src_port)) ; else if (unformat (input, "start-dst-port %d", &start_dst_port)) ; else if (unformat (input, "end-dst-port %d", &end_dst_port)) ; else if (unformat (input, "dst %U", unformat_ip6_address, &dst)) ; else if (unformat (input, "interval %d", &interval)) ; else if (unformat (input, "disable")) is_disable = 1; else break; } M (UDP_PING_ADD_DEL_REQ, udp_ping_add); clib_memcpy (mp->src_ip_address, &src, 16); clib_memcpy (mp->dst_ip_address, &dst, 16); mp->start_src_port = (u16) start_src_port; mp->end_src_port = (u16) end_src_port; mp->start_dst_port = (u16) start_dst_port; mp->end_dst_port = (u16) end_dst_port; mp->interval = (u16) interval; mp->is_ipv4 = 0; mp->dis = is_disable; S; W; return (rv); } static int api_udp_ping_export_req (vat_main_t * vam) { udp_ping_test_main_t *sm = &udp_ping_test_main; unformat_input_t *input = vam->input; vl_api_udp_ping_export_req_t *mp; int rv = 0; int is_add = 1; f64 timeout; while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) { if (unformat (input, "export")) is_add = 1; else if (unformat (input, "disable")) is_add = 0; else break; } M (UDP_PING_EXPORT_REQ, udp_ping_export); mp->enable = is_add; S; W; return (rv); } /* * List of messages that the api test plugin sends, * and that the data plane plugin processes */ #define foreach_vpe_api_msg \ _(udp_ping_add_del_req, "src <local IPv6 address> start-src-port <first local port> "\ "end-src-port <last local port> " \ "dst <remote IPv6 address> start-dst-port <first destination port> "\ "end-dst-port <last destination port> "\ "interval <time interval in sec for which ping packet will be sent> "\ "[disable]") \ _(udp_ping_export_req, "export [disable]") \ static void udp_ping_test_api_hookup (vat_main_t * vam) { udp_ping_test_main_t *sm = &udp_ping_test_main; /* Hook up handlers for replies from the data plane plug-in */ #define _(N,n) \ vl_msg_api_set_handlers((VL_API_##N + sm->msg_id_base), \ #n, \ vl_api_##n##_t_handler, \ vl_noop_handler, \ vl_api_##n##_t_endian, \ vl_api_##n##_t_print, \ sizeof(vl_api_##n##_t), 1); foreach_vpe_api_reply_msg; #undef _ /* API messages we can send */ #define _(n,h) hash_set_mem (vam->function_by_name, #n, api_##n); foreach_vpe_api_msg; #undef _ /* Help strings */ #define _(n,h) hash_set_mem (vam->help_by_name, #n, h); foreach_vpe_api_msg; #undef _ } clib_error_t * vat_plugin_register (vat_main_t * vam) { udp_ping_test_main_t *sm = &udp_ping_test_main; u8 *name; sm->vat_main = vam; name = format (0, "udp_ping_%08x%c", api_version, 0); sm->msg_id_base = vl_client_get_first_plugin_msg_id ((char *) name); if (sm->msg_id_base != (u16) ~ 0) udp_ping_test_api_hookup (vam); vec_free (name); return 0; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */