diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-04-07 18:27:24 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-05-04 11:25:34 +0200 |
commit | 2fba74798833331fe6312e8a764688a23918c14a (patch) | |
tree | 877e24ea293d55a8c31b939bf2abacccdf9f365f /hicn-plugin/src/faces/face.h | |
parent | c61e2e149421b849888bea0239c50607edce35ac (diff) |
[HICN-591] Created new command "hicn enable <prefix>" that enable hicn on a given prefix
The changes include:
- we use now a different vrf for the hicn routes. The default vrf (fib) contains
every route, we sync the route we marked as hicn on the hicn vrf. In the vrf
we use a custom dpo to implement the forwarding strategy.
Change-Id: I399805eff8a62a5c41bf7b50831986a35bce4f76
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/faces/face.h')
-rw-r--r-- | hicn-plugin/src/faces/face.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/hicn-plugin/src/faces/face.h b/hicn-plugin/src/faces/face.h index 1c829d2c2..665492a84 100644 --- a/hicn-plugin/src/faces/face.h +++ b/hicn-plugin/src/faces/face.h @@ -339,7 +339,7 @@ extern mhash_t hicn_face_vec_hashtb; * interface. The former is used to retrieve the incoming face when an interest * is received, the latter when the arring packet is a data. */ -typedef struct hicn_face_key_s +typedef struct __attribute__ ((packed)) hicn_face_key_s { ip46_address_t addr; union { @@ -396,6 +396,15 @@ hicn_face_get (const ip46_address_t * addr, u32 sw_if, mhash_t * hashtb) return NULL; } +/** + * @brief Get the dpoi from the nat address. Does not add any lock. + * + * @param addr Ip v4 address used to create the key for the hash table. + * @param sw_if Software interface id used to create the key for the hash table. + * @param hashtb Hash table (remote or local) where to perform the lookup. + * + * @result Pointer to the face. + */ always_inline hicn_face_t * hicn_face_get_with_dpo (const ip46_address_t * addr, u32 sw_if, const dpo_id_t * dpo, mhash_t * hashtb) { |