diff options
Diffstat (limited to 'hicn-plugin/src/faces/app/face_prod.h')
-rw-r--r-- | hicn-plugin/src/faces/app/face_prod.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/hicn-plugin/src/faces/app/face_prod.h b/hicn-plugin/src/faces/app/face_prod.h index 4cb2e3fbf..46bdf7c24 100644 --- a/hicn-plugin/src/faces/app/face_prod.h +++ b/hicn-plugin/src/faces/app/face_prod.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Cisco and/or its affiliates. + * Copyright (c) 2021-2023 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -25,12 +25,12 @@ * @brief Producer application face. * * A producer application face is built upon an ip face and identify a local - * producer application (co-located with the forwarder) that acts as a producer. In the - * current design an application face is either a face towards a consumer face - * or towards a producer. The interface used by the producer application face is - * assumed to be reserved only for hICN traffic (e.g., dedicated memif that - * connects the applictation to the forwarder). Only one application face can be - * assigned to an interface. + * producer application (co-located with the forwarder) that acts as a + * producer. In the current design an application face is either a face towards + * a consumer face or towards a producer. The interface used by the producer + * application face is assumed to be reserved only for hICN traffic (e.g., + * dedicated memif that connects the applictation to the forwarder). Only one + * application face can be assigned to an interface. * * To each producer application face it is assigned a portion of the CS. Every * data arriving to a producer application will be stored in the portion of the @@ -38,18 +38,19 @@ * face. Available eviction faces are list in the /cache_policy folder. * * In the vlib graph a producer application face is directly connected to the - * device-input node (with the node hicn-face-prod-input) and passes every packet to - * the hicn-face-ip node. + * device-input node (with the node hicn-face-prod-input) and passes every + * packet to the hicn-face-ip node. */ /** - * @brief Producer application face state that refer to the hICN producer socket - * created by the application. + * @brief Producer application face state that refer to the hICN producer + * socket created by the application. * */ typedef struct { fib_prefix_t prefix; + index_t adj_index; } hicn_face_prod_state_t; extern hicn_face_prod_state_t *face_state_vec; @@ -69,9 +70,8 @@ extern hicn_face_prod_state_t *face_state_vec; * @param prod_addr address to assign to interface used by the appliction to * send data to the producer face */ -int -hicn_face_prod_add (fib_prefix_t * prefix, u32 swif, u32 * cs_reserved, - ip46_address_t * prod_addr, hicn_face_id_t * faceid); +int hicn_face_prod_add (fib_prefix_t *prefix, u32 swif, u32 *cs_reserved, + ip46_address_t *prod_addr, hicn_face_id_t *faceid); /** * @brief Delete an existing application face @@ -85,7 +85,7 @@ int hicn_face_prod_del (hicn_face_id_t faceid); * * @param face_id Id of the producer application face */ -int hicn_face_prod_set_lru_max (hicn_face_id_t face_id, u32 * requested_size); +int hicn_face_prod_set_lru_max (hicn_face_id_t face_id, u32 *requested_size); /** * @brief Format an application producer face @@ -94,8 +94,12 @@ int hicn_face_prod_set_lru_max (hicn_face_id_t face_id, u32 * requested_size); * @param args Array storing input values. Expected u32 face_id and u32 indent * @return String with the formatted face */ -u8 *format_hicn_face_prod (u8 * s, va_list * args); +u8 *format_hicn_face_prod (u8 *s, va_list *args); +/** + * @brief Init the producer face module + */ +void hicn_face_prod_init (); #endif /* _FACE_PROD_H_ */ |