api: string type to convert to vector 87/20087/6
authorOle Troan <[email protected]>
Wed, 12 Jun 2019 12:28:14 +0000 (14:28 +0200)
committerPaul Vinciguerra <[email protected]>
Tue, 18 Jun 2019 11:47:21 +0000 (11:47 +0000)
commit283cd2e9afcab1407d5614d79da4354790fa059a
tree21ff50ec22a5f9989bfdee76fcbb418ada91232f
parenta8c0b62a88494e9a8562c57dfd3fd75818a629a7
api: string type to convert to vector

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 <[email protected]>
12 files changed:
src/plugins/http_static/http_static.c
src/plugins/http_static/http_static_test.c
src/plugins/map/map.c
src/plugins/map/map.h
src/plugins/map/map_api.c
src/plugins/nat/nat_api.c
src/vat/api_format.c
src/vlibapi/api_types.h
src/vlibapi/api_types_inlines.h [new file with mode: 0644]
src/vnet/ip/punt_api.c
src/vpp/api/api.c
src/vpp/api/custom_dump.c