aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/protocol/ipv6.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-04-20 12:55:28 +0200
committerMauro Sardara <msardara@cisco.com>2020-09-14 17:29:46 +0000
commit1fc9a18f95fd2ff491679e4c8de519afe49d8c47 (patch)
tree15a6cbe5fd92745ab9859ad701f9fc3e44737aaa /lib/src/protocol/ipv6.c
parent9c1aa190114dcd0be16dd4ce49459955fc4f7434 (diff)
[HICN-598] [HICN-599] Fix hicn_name_t definition conflicts.
Change-Id: Ica8db44e27c3a4911ea869e91f96b781809373d8 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'lib/src/protocol/ipv6.c')
-rw-r--r--lib/src/protocol/ipv6.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/src/protocol/ipv6.c b/lib/src/protocol/ipv6.c
index f23b01cd8..9db3e3a17 100644
--- a/lib/src/protocol/ipv6.c
+++ b/lib/src/protocol/ipv6.c
@@ -68,20 +68,16 @@ int
ipv6_get_interest_name (hicn_type_t type, const hicn_protocol_t * h,
hicn_name_t * name)
{
- name->ip6.prefix_as_ip6 = h->ipv6.daddr;
-#ifndef HICN_VPP_PLUGIN
- name->type = HNT_CONTIGUOUS_V6;
- name->len = HICN_V6_NAME_LEN;
-#endif /* HICN_VPP_PLUGIN */
- return CHILD_OPS (get_interest_name_suffix, type, h, &(name->ip6.suffix));
+ name->prefix.ip6 = h->ipv6.daddr;
+ return CHILD_OPS (get_interest_name_suffix, type, h, &(name->suffix));
}
int
ipv6_set_interest_name (hicn_type_t type, hicn_protocol_t * h,
const hicn_name_t * name)
{
- h->ipv6.daddr = name->ip6.prefix_as_ip6;
- return CHILD_OPS (set_interest_name_suffix, type, h, &(name->ip6.suffix));
+ h->ipv6.daddr = name->prefix.ip6;
+ return CHILD_OPS (set_interest_name_suffix, type, h, &(name->suffix));
}
int
@@ -139,20 +135,16 @@ int
ipv6_get_data_name (hicn_type_t type, const hicn_protocol_t * h,
hicn_name_t * name)
{
- name->ip6.prefix_as_ip6 = h->ipv6.saddr;
-#ifndef HICN_VPP_PLUGIN
- name->type = HNT_CONTIGUOUS_V6;
- name->len = HICN_V6_NAME_LEN;
-#endif /* HICN_VPP_PLUGIN */
- return CHILD_OPS (get_data_name_suffix, type, h, &(name->ip6.suffix));
+ name->prefix.ip6 = h->ipv6.saddr;
+ return CHILD_OPS (get_data_name_suffix, type, h, &(name->suffix));
}
int
ipv6_set_data_name (hicn_type_t type, hicn_protocol_t * h,
const hicn_name_t * name)
{
- h->ipv6.saddr = name->ip6.prefix_as_ip6;
- return CHILD_OPS (set_data_name_suffix, type, h, &(name->ip6.suffix));
+ h->ipv6.saddr = name->prefix.ip6;
+ return CHILD_OPS (set_data_name_suffix, type, h, &(name->suffix));
}
int