Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
String type: Not include \0 in show_version
[vpp.git]
/
src
/
vlibapi
/
api_types.h
diff --git
a/src/vlibapi/api_types.h
b/src/vlibapi/api_types.h
index
ffcd24d
..
8a86612
100644
(file)
--- a/
src/vlibapi/api_types.h
+++ b/
src/vlibapi/api_types.h
@@
-50,4
+50,10
@@
vl_api_string_len (vl_api_string_t * astr)
return clib_net_to_host_u32 (astr->length);
}
+static inline char *
+vl_api_from_api_string_c (vl_api_string_t *astr)
+{
+ return strndup((char *)astr->buf, clib_net_to_host_u32(astr->length));
+}
+
#endif