diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-10-04 17:41:36 +0200 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2022-10-05 15:11:45 +0200 |
commit | 1e73c65c7b18ffcd5a8836fbc8384c21638faf48 (patch) | |
tree | 487fc2ecc484f53052ba1d6ca97433bcd9e39aa8 /lib | |
parent | 3476dd9ddecc87d9212c3bf56a5be52079e27def (diff) |
test: new packet format functional test with hiperf/libtransport
Change-Id: Ib6ca26e9ee1a042a72ac81da71493542e8b833e6
Ticket: HICN-774
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/includes/hicn/base.h | 4 | ||||
-rw-r--r-- | lib/src/base.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/includes/hicn/base.h b/lib/includes/hicn/base.h index 2c80d42e6..dcbe47877 100644 --- a/lib/includes/hicn/base.h +++ b/lib/includes/hicn/base.h @@ -137,6 +137,10 @@ int hicn_packet_format_snprintf (char *s, size_t size, #define HICN_PACKET_FORMAT_NONE \ HICN_PACKET_FORMAT (IPPROTO_NONE, IPPROTO_NONE, IPPROTO_NONE, IPPROTO_NONE) +/* Default packet format */ + +#define HICN_PACKET_FORMAT_DEFAULT HICN_PACKET_FORMAT_IPV6_TCP + /** * @brief Return the hICN format with an additional AH header * @param [in] format - hICN packet format diff --git a/lib/src/base.c b/lib/src/base.c index 8c689da50..1852666a6 100644 --- a/lib/src/base.c +++ b/lib/src/base.c @@ -34,9 +34,9 @@ hicn_packet_format_snprintf (char *s, size_t size, hicn_packet_format_t format) int rc; HICN_PACKET_FORMAT_ENUMERATE (format, i, protocol, { - if (i > 1) + if (i > 0) { - rc = snprintf (cur, size - (cur - s), " %s ", "/"); + rc = snprintf (cur, size - (cur - s), "%s", "/"); if (rc < 0 || rc >= size - (cur - s)) return rc; cur += rc; |