aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/http_static
AgeCommit message (Collapse)AuthorFilesLines
2020-08-18misc: fix sonarclound warningsDave Barach1-1/+1
Type: fix Ticket: VPP-1888 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I9c2fb926a5e010658088a74051c8c3462ff61734 (cherry picked from commit 1af730d0dfbb91475c6808ed579494d3d223b724)
2019-11-15http_static: fifo-size is u32Dave Wallace1-0/+5
- Limit cli input to u32 Type: fix Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: Ib1f8ee9764da91a7804cc08901112c3f074130bc (cherry picked from commit b101058890d66c960713fc7c203094fb54643755)
2019-09-30http_static: add dynamic GET / POST method hooksDave Barach2-175/+302
Add .json output to format_vnet_sw_interface_cntrs(...) Type: feature Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ied036ebfaaafbf1dfc2a4e396c00f09f40659400 (cherry picked from commit 5554c56a65cff3ef90844eb5e63d89283fae74df)
2019-09-09api: enforce vla is last and fixed string typeOle Troan2-12/+6
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> (cherry picked from commit e5ff5a36dd126ee57dca4e0b03da2f7704e0a4f5) Signed-off-by: Ole Troan <ot@cisco.com>
2019-08-12http_static: manual cherry-pick 21231,21246Dave Barach1-51/+94
Type: fix Ticket: VPP-1736 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ie34d1b7d7030c160972f3173a4401ef632e38633
2019-08-12http_static: tls supportDave Barach1-100/+356
Type: refactor Ticket: VPP-1736 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I45745e568cd943293d0015a61f67ec799b6804d8 (cherry picked from commit 6b53fd5163de7d1f452b472ec3ad945f4dbd694c)
2019-07-09vat: unload unused vat pluginsDave Barach1-19/+1
If the corresponding vpp plugin is absent, return a non-zero clib_error_t * from vat_plugin_register ("xxx plugin not loaded"). The vat plugin calls dlclose on the vat plugin, and it disappears. Depending on the plugin configuration, this can reduce the vpp virtual size by several gigabytes. Added a VAT_PLUGIN(<plugin-name>) macro to vat_helper_macros, clean up boilerplate vat_plugin_register() implementations. Fixed a number of non-standard vat_plugin_register methods. Type: refactor Change-Id: Iac908e5af7d5497c78d6aa9c3c51cdae08374045 Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-26api: Remove the inlines file and replace with library functionsNeale Ranns2-2/+0
using inlines exposes the users to the internal data types used by VPP, namely vec.h. This file does not compile with a C++ compiler. Type: feature Change-Id: I1544fdd9eae998309f865df61df78571bdb96903 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-18api: string type to convert to vectorOle Troan2-8/+9
Previous use of strndup() required user to remember to call free(). Now return a vector pointing directly to the API message string. Of course user must remember to copy the string out if lifetime is longer than API message lifetime. Change-Id: Ib5e2b3d52d258e1a42ea9ea9a9e04abbe360e2bf Type: fix Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-12static_http: Typo in short_help.Paul Vinciguerra1-1/+1
Type: fix. Change-Id: I48587c5eba6de6de820d348177b6733d0b048013 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-29plugins: http_static. Migrate to use api string type.Paul Vinciguerra3-11/+23
This is not my core competency. Reviews/feedback/suggestions welcomed. ;) Tested with: rv = self.vapi.http_static_enable( fifo_size = 1, cache_size_limit = 1000000, prealloc_fifos = 0, private_segment_size = 0, uri="tcp://0.0.0.0/80", www_root = "/var/tmp/run/vpp/html" ) DBGvpp# show http static server www_root /var/tmp/run/vpp/html, cache size 0 bytes, limit 1000000 bytes, evictions 0 Change-Id: I0f660753317ceedab89da1b65701a24d6f7145de Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-05-17Fix punctuation fails in 2x pluginsDave Barach1-1/+1
More to the point: fix the Python API binding for the plugins. The http_static and ct6 plugin setup_message_id_table calls didn't have "_"'s between message names and CRCs. I would have expected this to originate in the emacs skeleton, but the skeleton is correct. Punctuation saves lives: "Let's eat Grandma..." != "Let's eat, Grandma..." More or less. Change-Id: Icd87813308701d203cf6f147b2bb90d39d51ddeb Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
- Make plugin descriptions more consistent so the output of "show plugin" can be used in the wiki. Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-04-30svm: more fifo refactor/cleanupFlorin Coras1-1/+1
Change-Id: Ie76c69641c8598164d0d00fd498018037258fd86 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-25Clean up redirectsDave Barach1-21/+50
Both firefox and chrome seem happy to browse a hugo-generated site Change-Id: Id216ad9c781643df42ac4fbce598eb2afa600f4d Signed-off-by: Dave Barach <dave@barachs.net>
2019-04-17VPP-1649: Coverity warning in http serverDave Barach1-6/+0
Remove duplicate error check Change-Id: I64463c7f606e198fe8553efea294f0e09bd8dbc3 Signed-off-by: Dave Barach <dave@barachs.net>
2019-04-16Static http serverDave Barach8-0/+1954
Good enough to serve the vpp sphinx and doxygen docs. Knows about html, css, and javascript files. Change-Id: Ib18c19f07f35f91ba935ea26ed7be406dacf2205 Signed-off-by: Dave Barach <dave@barachs.net>