summaryrefslogtreecommitdiffstats
path: root/src/plugins/map/map.h
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-06-12 14:28:14 +0200
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2019-06-18 11:47:21 +0000
commit283cd2e9afcab1407d5614d79da4354790fa059a (patch)
tree21ff50ec22a5f9989bfdee76fcbb418ada91232f /src/plugins/map/map.h
parenta8c0b62a88494e9a8562c57dfd3fd75818a629a7 (diff)
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 <ot@cisco.com>
Diffstat (limited to 'src/plugins/map/map.h')
-rw-r--r--src/plugins/map/map.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/map/map.h b/src/plugins/map/map.h
index a692b641768..abafb4e21fe 100644
--- a/src/plugins/map/map.h
+++ b/src/plugins/map/map.h
@@ -36,7 +36,7 @@ int map_create_domain (ip4_address_t * ip4_prefix, u8 ip4_prefix_len,
ip6_address_t * ip6_prefix, u8 ip6_prefix_len,
ip6_address_t * ip6_src, u8 ip6_src_len,
u8 ea_bits_len, u8 psid_offset, u8 psid_length,
- u32 * map_domain_index, u16 mtu, u8 flags, char *tag);
+ u32 * map_domain_index, u16 mtu, u8 flags, u8 * tag);
int map_delete_domain (u32 map_domain_index);
int map_add_del_psid (u32 map_domain_index, u16 psid, ip6_address_t * tep,
bool is_add);
@@ -137,7 +137,7 @@ STATIC_ASSERT ((sizeof (map_domain_t) <= CLIB_CACHE_LINE_BYTES),
*/
typedef struct
{
- char *tag; /* Probably a user-assigned domain name. */
+ u8 *tag; /* Probably a user-assigned domain name. */
} map_domain_extra_t;
#define MAP_REASS_INDEX_NONE ((u16)0xffff)