summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vapi
AgeCommit message (Collapse)AuthorFilesLines
2021-09-17build: use GNUInstallDirs install destinationsNick Brown1-1/+1
So as to be compliant with distribution layouts, as recommend by: https://cmake.org/cmake/help/latest/command/install.html#installing-files Type: make Change-Id: Ic46ace4f26aab1aa4902cbd013c40a92c480680d Signed-off-by: Nick Brown <nickbroon@gmail.com>
2021-05-27build: kindly ask python not to polute src/Damjan Marion1-2/+2
Type: make Change-Id: I1ec82e0f3c19dee79f942996339240c73d4e380c Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-26tests: move vapi C/C++ test files into src/Damjan Marion4-0/+1538
Type: improvement Change-Id: Iaad004661db1e9076e6c27227878f1612fa7289f Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-03-05vppapigen: expose the values of per-message "options" in the api.json filesAndrew Yourtchenko1-1/+1
Also fix the vapi parser's assumption about what the container with CRC is supposed to look like.. Change-Id: I3a23ef6c1502232742c03d227eb3654fb757709c Type: improvement Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2020-06-10vapi: memset allocated messages to zeroKlement Sekera1-0/+4
This avoids using dirty data from shared memory by client. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I96eecf655bf344ec29609cedbd8dc891b572e207
2020-05-08build: various improvementsDamjan Marion1-1/+1
- add option to install only host tools - add option to specify lib and runtime dir Type: improvement Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-05-04vapi: add support for defaults in typedefsPaul Vinciguerra2-3/+7
refactored out of Neale's change: https://gerrit.fd.io/r/c/vpp/+/26276 Type: refactor Change-Id: Ibb0c019856dc44640e94d6d80a5d119a6296d95c Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com> (cherry picked from commit a751d8d61fe5880f6d447e63b81e2df30561e9f9)
2020-05-01api: fix include_guard when path contains a plusRuslan Babayev1-1/+1
The path to VPP source might contain a '+' when building it with Yocto/OpenEmbedded. Type: fix Signed-off-by: Ruslan Babayev <ruslan@babayev.com> Change-Id: I205ac0de7d8726724af0e30f5b199391e05dc615
2020-04-24vapi: packed enum type generationNeale Ranns1-1/+14
Type: fix if the ,api/.json specifies that a enum should be u8/u16 that the generated c enum needs to be packed. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ia0497b45e4c510a5c63cd02e966769bf20686838
2019-12-17build: export vapi generation in vpp-devOliver Giles1-48/+11
Adds the higher-level vapi generation to cmake/api.cmake and exposes the necessary python scripts in vpp-dev, so that out-of-tree/downstream plugins can also leverage the more convenient API. Type: feature Signed-off-by: Oliver Giles <oliver_g@radwin.com> Change-Id: I8c40a14d27ba3cb972c6907632e03c0e7b0ce982
2019-12-10api: multiple connections per processDave Barach1-4/+4
Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2272521d6e69edcd385ef684af6dd4eea5eaa953
2019-11-27misc: add address sanitizer heap instrumentationBenoît Ganne1-0/+5
Introduce AddressSanitizer support: https://github.com/google/sanitizers/ This starts with heap instrumentation. vlib_buffer, bihash and stack instrumentation should follow. Type: feature Change-Id: I7f20e235b2f79db72efd0e756f22c75f717a9884 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-10-28vapi: switch to python3Ole Troan3-4/+4
Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I78aac39b697e29bb454e5e95855e79ea3122b4c3
2019-09-19api: split vl_api_prefix into twoOle Troan2-15/+19
One type for address with prefix and one type for prefix. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-03api: enforce vla is last and fixed string typeOle Troan2-4/+13
Enforce that variable length fields are the last element of API messages. Add a 'fixed' version of string type, since dealing with multiple variable length strings turned out too painful for the C language bindings. The string type is now: { string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64] string name[]; // Variable length string with embedded len field (vl_api_string_t) }; The latter notation could be made available to other types as well. e.g. { vl_api_address_t addresses[]; } instead of { u32 n_addr; vl_api_address_t addresses[n_addr]; }; Type: fix Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b Signed-off-by: Ole Troan <ot@cisco.com>
2019-08-27api: revert use string type for strings in memclnt.apiOle Troan2-51/+73
This reverts commit 2959d42feb576c0e00c28c4e27658b25f6c783e9. Lacks client side fixes. Type: fix Change-Id: Ib94b18e74325cede41ed1733e57896f17a952526 Signed-off-by: Ole Troan <ot@cisco.com>
2019-08-27api: use string type for strings in memclnt.apiOle Troan2-73/+51
Explicitly using string type in API allows for autogenerating tools to print strings instead of hex-dumping byte strings. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I573962d6b34d5d10aab9dc6a5fdf101c9b12a6a6 Signed-off-by: Ole Troan <ot@cisco.com>
2019-07-24vapi: add python scripts to vpp-dev packageVratko Polak1-7/+19
As requested in https://lists.fd.io/g/vpp-api-dev/message/18 three vapi scrips are packaged, destination to share/vpp/. Also: + Add "vapi" as a separate component to maintainers file. + Add also vppapigen/generate_json.py to share/vpp/. + Improve CMakeLists.txt indentation. Type: feature Change-Id: Ia06715621aa344e8ee759410b293509a54f81fdd Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-06-07vppapigen: Fold up CRC from dependent types.Ole Troan1-3/+2
Change-Id: Id51f26f225cd567ca19efc2301e94fa88840ae8f Signed-off-by: Ole Troan <ot@cisco.com> Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-29API: Add support for limits to language.Ole Troan1-3/+6
string name [limit = 64]; Meta-data to do argument validation. Change-Id: I1f3e0f09b2d5285224399413d25206f77bd3f4b1 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-24NAT: VPP-1531 api cleanup & updateFilip Varga1-1/+1
Change-Id: I2492400a67b39a3adbc24ab7cf1ba17a409e95a8 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-04-23Revert "NAT: VPP-1531 api cleanup & update"Ole Trøan1-1/+1
This reverts commit bed1421b9f1b3643d93384084972337b596aec73. /vpp/master3/src/plugins/nat/nat_api.c: In function ‘send_nat_worker_details’: /vpp/master3/src/vppinfra/clib.h:62:33: error: division ‘sizeof (u8 * {aka unsigned char *}) / sizeof (u8 {aka unsigned char})’ does not compute the number of array elements [-Werror=sizeof-pointer-div] #define ARRAY_LEN(x) (sizeof (x)/sizeof (x[0])) ^ /vpp/master3/src/plugins/nat/nat_api.c:205:43: note: in expansion of macro ‘ARRAY_LEN’ rmp = vl_msg_api_alloc (sizeof (*rmp) + ARRAY_LEN (w->name) - 1); ^~~~~~~~~ Change-Id: Ie82672c145fb2f6580827f95e535435307bc7a23 Signed-off-by: Ole Troan <ot@cisco.com>
2019-04-23NAT: VPP-1531 api cleanup & updateFilip Varga1-1/+1
Change-Id: I519d7efc8ee3c86381d96be2e2a46017cd948895 Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-03-15Revert "API: Cleanup APIs interface.api"Ole Trøan1-1/+1
This reverts commit e63325e3ca03c847963863446345e6c80a2c0cfd. Allow time for CSIT to accommodate. Change-Id: I59435e4ab5e05e36a2796c3bf44889b5d4823cc2 Signed-off-by: ot@cisco.com
2019-03-15API: Cleanup APIs interface.apiJakub Grajciar1-1/+1
Use of consistent API types for interface.api Change-Id: Ieb54cebb4ac96b432a3f0b41596718aa2f34885b Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-12-18VAPI/VOM: Removing legacy stats tests, add string type.Ole Troan2-0/+2
Fix misc VAPI/VOM generation and test cases. Change-Id: I1abf9ecdb6f8a2129f11e0a9ed1c0fe04cdf5c47 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-13vapi: code cleanupKlement Sekera1-5/+4
Change-Id: If3bdb4369d6055e06a9b29bcba37785dbd32eb71 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-06API: Change ip4_address and ip6_address to use type alias.Ole Troan1-7/+7
Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29API: Add support for type aliasesOle Troan3-20/+65
Previously all types are compound. This adds support for aliases, so one can do things like: typedef u32 interface_index; or typedef u8 ip4_address[4]; Change-Id: I0455cad0123fc88acb491d2a3ea2725426bdb246 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-26vapi: break if parsing progress cannot be madeKlement Sekera1-0/+1
Change-Id: I1b76994f674a045f7fce3d61ef2aa5294ddb53a9 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-07Unresolved symbols in libvapiclientNeale Ranns1-0/+1
Change-Id: I6d6a73ac62f24928fb51e89948b92a1cb9134c40 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-7/+8
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-11vapi: support VLAs in typedefsKlement Sekera2-28/+96
Change-Id: I3af3916b68189c2174020e5ecc29a7bc45b25efa Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-09-07cmake: set packaging component for different filesDamjan Marion1-2/+11
Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-03vapi: init clib mem heap on connect if neededKlement Sekera1-0/+4
Change-Id: Id45a3a37dd77771289622314406dccf50b64f04d Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-09-02Switch to cmakeDamjan Marion1-74/+0
Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30cmake: missing dependenciesDamjan Marion1-2/+2
Change-Id: Iae03deb10d437286989dd3d45f8cc9690d463100 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28VAPI: bugfixesKlement Sekera1-12/+8
Change-Id: I20cfbae8b704ca68fd8dda9c811dc282ce723871 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-08-27VAPI: support enums & unionsKlement Sekera3-154/+283
Change-Id: I76ac7e4eeb6a300538d52a0e355d66937764a4d1 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-08-27cmake: Fix VAPI .hpp generationMohsin Kazmi2-2/+2
Change-Id: I2bec3b2511f00d017f9b3a727809631695222c1a Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-27cmake: fix clang build and few minor fixesDamjan Marion1-1/+2
Change-Id: If5b850c939f7a5383f9a7eff8ac41708c3428a90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27cmake: add vapi buildDamjan Marion4-12/+102
Change-Id: Id939a0cbe35601478ad262f49bb0a1abdb62aa45 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-10Use IP address types on UDP encap APINeale Ranns1-1/+0
Change-Id: I3c714c519b6d0009329b50947ce250c18ee2a85a Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-01Store USE_DLMALLOC in vppinfra/config.hDamjan Marion1-1/+1
Change-Id: Ib596e7f525b83dc7e830bcf6a126cd210216ce86 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach1-1/+1
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk src/vppinfra/dlmalloc.[ch] are slightly modified versions of the well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no inherent size limit. Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-05VPP-1335 vapi crash when memclnt_keepalive receivedKlement Sekera5-14/+58
Change-Id: If33a7cc6c76147fd3ea9d8118370e7a508819b81 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-05-04VAPI: support VLAs in type definitionsKlement Sekera3-59/+57
Change-Id: I8d54415972d6644190857175b0e895c5319ce7b6 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-07VAPI: Ensure type definitions are generated in same order as .api file.Ole Troan2-4/+4
The previous use of a dictionary instead of a list led to typedefs being generated in wrong order. Change-Id: Iee6ff73f920883ce6e599180c1b47fe997c1702e Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-06API: Add service definitions for events and singleton messages (second attempt)Marek Gradzki1-0/+17
Based on https://gerrit.fd.io/r/#/c/10920/ Updates service definition in stats.api with correct reply message names. Change-Id: I3282bee5304e667e23bc1fab3f43d967a50d880d Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-03-05Revert "API: Add service definitions for events and singleton messages."Ole Trøan1-17/+0
This reverts commit f7b7fa53b7eaec81d8c00c1023fb7d01f1f9761f. Change-Id: I87496342943248e94f01ada31459f387c0a3a610 Signed-off-by: Ole Troan <ot@cisco.com>