aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/face.h
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-04-22 18:29:52 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2020-05-04 11:32:01 +0200
commitc1b56d5861829a23289f42cecd716e681b520cf0 (patch)
tree05a78211549d5581c4f50f6e9647467cbebe548a /hicn-plugin/src/faces/face.h
parent0c7f490009e8633e015b5cba48b78cc243254953 (diff)
[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 <acompagn+fdio@cisco.com> Change-Id: Iffea4d81c5ea8ce8ccbbfd749113f06a698a2afe
Diffstat (limited to 'hicn-plugin/src/faces/face.h')
-rw-r--r--hicn-plugin/src/faces/face.h9
1 files changed, 6 insertions, 3 deletions
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;