From c1b56d5861829a23289f42cecd716e681b520cf0 Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Wed, 22 Apr 2020 18:29:52 +0200 Subject: [HICN-602] Added bidirectional udp tunnels - Implemented a udp decapsulation node - Added a hash table to identify the incoming udp tunnel when an interest or data packets are received - Added udp punting through udp_register_dst_port Signed-off-by: Alberto Compagno Change-Id: Iffea4d81c5ea8ce8ccbbfd749113f06a698a2afe --- hicn-plugin/src/faces/face.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hicn-plugin/src/faces/face.h') diff --git a/hicn-plugin/src/faces/face.h b/hicn-plugin/src/faces/face.h index 54f2eab31..a9a565a5a 100644 --- a/hicn-plugin/src/faces/face.h +++ b/hicn-plugin/src/faces/face.h @@ -379,12 +379,14 @@ hicn_face_get_key (const ip46_address_t * addr, * @result Pointer to the face. */ always_inline hicn_face_t * -hicn_face_get (const ip46_address_t * addr, u32 sw_if, mhash_t * hashtb) +hicn_face_get (const ip46_address_t * addr, u32 sw_if, mhash_t * hashtb, index_t adj_index) { hicn_face_key_t key; dpo_id_t dpo = DPO_INVALID; + dpo.dpoi_index = adj_index; + hicn_face_get_key (addr, sw_if, &dpo, &key); hicn_face_id_t *dpoi_index = (hicn_face_id_t *) mhash_get (hashtb, @@ -478,7 +480,8 @@ int hicn_face_add (const dpo_id_t * dpo_nh, */ always_inline void hicn_iface_add (ip46_address_t * nat_address, int sw_if, - hicn_face_id_t * pfaceid, dpo_proto_t proto) + hicn_face_id_t * pfaceid, dpo_proto_t proto, + u32 adj_index) { hicn_face_t *face; pool_get (hicn_dpoi_face_pool, face); @@ -489,7 +492,7 @@ hicn_iface_add (ip46_address_t * nat_address, int sw_if, face->dpo.dpoi_type = DPO_FIRST; face->dpo.dpoi_proto = DPO_PROTO_NONE; - face->dpo.dpoi_index = INDEX_INVALID; + face->dpo.dpoi_index = adj_index; face->dpo.dpoi_next_node = 0; face->pl_id = (u16) 0; face->flags = HICN_FACE_FLAGS_IFACE; -- cgit 1.2.3-korg