Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
pg.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __HICN_PG_H__
17 #define __HICN_PG_H__
18 
58 typedef struct hicnpg_main_s
59 {
60  u32 index; // used to compute the sequence number
61  fib_prefix_t *pgen_clt_hicn_name; // hICN name to put in the destiantion
62  // addess of an interest
63  u32
64  index_ifaces; /* used to mimic interests coming from different consumer */
65  u32 n_ifaces; /* The source address will change from interest to interest */
66  /* index_ifaces is used to keep a global reference to the iface used */
67  /* and it is incremented when we want to change "consumer" */
68  /* n_ifaces identifies how many consumers to simulate */
69  u32 max_seq_number; // Use to limit the max sequence number
70  u32 n_flows; // Use to simulate multiple flows (a flow always have the same
71  // hICN name)
72  ip46_address_t pgen_clt_src_addr; // Source addess base to use in the
73  // interest
74 
75  u16 interest_lifetime; // Interest lifetime
76  u32 sw_if; // Interface where to send interest and receives data
78 
79 extern hicnpg_main_t hicnpg_main;
80 
86 typedef struct hicnpg_server_main_s
87 {
88  u32 node_index;
89  /* Arbitrary content */
90  u32 pgen_svr_buffer_idx;
91  fib_prefix_t *pgen_srv_hicn_name;
93 
94 extern hicnpg_server_main_t hicnpg_server_main;
95 
96 extern vlib_node_registration_t hicn_pg_interest_node;
97 extern vlib_node_registration_t hicn_pg_data_node;
98 
99 #endif // __HICN_PG_H__
100 
101 /*
102  * fd.io coding-style-patch-verification: ON
103  *
104  * Local Variables:
105  * eval: (c-set-style "gnu")
106  * End:
107  */
hicnpg_main_t
struct hicnpg_main_s hicnpg_main_t
hICN packet generator main for the pg client nodes
hicnpg_main_s
hICN packet generator main for the pg client nodes
Definition: pg.h:58
hicnpg_server_main_s
hICN packet generator main for the pg server node
Definition: pg.h:86
ip46_address_t
Definition: common.h:181
hicnpg_server_main_t
struct hicnpg_server_main_s hicnpg_server_main_t
hICN packet generator main for the pg server node