aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/includes/hicn/base.h4
-rw-r--r--lib/src/base.c4
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;