diff options
author | 2020-03-16 15:26:41 +0100 | |
---|---|---|
committer | 2020-03-20 16:51:26 +0100 | |
commit | b0d6cebaa0f45735a0c75a6c309aa84b550f12ad (patch) | |
tree | 6d2c6ed4519e18919df3cd3845317958342ba28a /hicn-plugin/src/pg.h | |
parent | 1c15bf737788e31e46efd930d6a2a76253cde29a (diff) |
[HICN-549] Refactored pg to use punting through fib
- interest packet generator uses the fib to forward interests. The entry in the fib matching the interest name can be a regular IP fib entry or an hICN fib entry. It is up to who configure the forwarder to chose how the forwarding should be done
- the hicnpg-data is used to keep track of the number of data received in order to have statistics corresponding to the number of interests sent and data received (interest satisfied). This node punt packet registers himself as a node for satisfying local tcp packets (ip4_register_protocol or ip6_register_protocol), therefore tcp packets carrying a local address will be forwarded to it.
- The hicnpg-server node satisfies interest packets by creating the correspoding data packet. It punts packet by using a feature on the interface that is passed in the configuration. Every packet that arrives on such interface is threated as an hICN interest.
Change-Id: I75ffec4ce0a5afeaf321bcc48dd13fd307dd2925
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/pg.h')
-rw-r--r-- | hicn-plugin/src/pg.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hicn-plugin/src/pg.h b/hicn-plugin/src/pg.h index 083afb6b3..35f570880 100644 --- a/hicn-plugin/src/pg.h +++ b/hicn-plugin/src/pg.h @@ -16,21 +16,18 @@ #ifndef __HICN_PG_H__ #define __HICN_PG_H__ -/* Subnet-mask for punting data in the client node */ -#define SUBNET_MASK4 32 -#define SUBNET_MASK6 128 - typedef struct hicnpg_main_s { u32 index; + fib_prefix_t *pgen_clt_hicn_name; u32 index_ifaces; + u32 n_ifaces; u32 max_seq_number; u32 n_flows; - u32 n_ifaces; - u32 hicn_underneath; ip46_address_t pgen_clt_src_addr; - ip46_address_t pgen_clt_hicn_name; + u16 interest_lifetime; + u32 sw_if; } hicnpg_main_t; extern hicnpg_main_t hicnpg_main; @@ -38,13 +35,16 @@ extern hicnpg_main_t hicnpg_main; typedef struct hicnpg_server_main_s { u32 node_index; - u32 hicn_underneath; /* Arbitrary content */ u32 pgen_svr_buffer_idx; + fib_prefix_t *pgen_srv_hicn_name; } hicnpg_server_main_t; extern hicnpg_server_main_t hicnpg_server_main; +extern vlib_node_registration_t hicn_pg_interest_node; +extern vlib_node_registration_t hicn_pg_data_node; + #endif // __HICN_PG_H__ /* |