![]() |
ndn-lite
|
Face Table. More...
![]() |
Data Structures | |
struct | ndn_face_table |
Face Table. More... | |
Macros | |
#define | NDN_FACE_TABLE_RESERVE_SIZE(entry_count) (sizeof(ndn_face_table_t) + sizeof(ndn_face_intf_t*) * (entry_count)) |
The memory reserved for FaceTable. More... | |
Typedefs | |
typedef struct ndn_face_table | ndn_face_table_t |
Face Table. More... | |
Functions | |
void | ndn_facetab_init (void *memory, ndn_table_id_t capacity) |
Initialize FaceTable at specified memory space. More... | |
ndn_table_id_t | ndn_facetab_register (ndn_face_table_t *self, ndn_face_intf_t *face) |
Register a face and assign an ID to it. More... | |
void | ndn_facetab_unregister (ndn_face_table_t *self, ndn_table_id_t id) |
Unregister a face from FaceTable only. More... | |
Face Table.
#define NDN_FACE_TABLE_RESERVE_SIZE | ( | entry_count | ) | (sizeof(ndn_face_table_t) + sizeof(ndn_face_intf_t*) * (entry_count)) |
The memory reserved for FaceTable.
[in] | entry_count | Maximum number of entries. |
typedef struct ndn_face_table ndn_face_table_t |
Face Table.
It assigns an unique ID to all faces.
void ndn_facetab_init | ( | void * | memory, |
ndn_table_id_t | capacity | ||
) |
Initialize FaceTable at specified memory space.
[in,out] | memory | Memory reserved for FaceTable. |
[in] | capacity | Maximum number of entries. |
ndn_table_id_t ndn_facetab_register | ( | ndn_face_table_t * | self, |
ndn_face_intf_t * | face | ||
) |
Register a face and assign an ID to it.
[in,out] | self | FaceTable. |
[in] | face | The face to register. |
face
if succeeded. NDN_INVALID_ID if FaceTable is full. face
should be just created. The constructor should call this function. void ndn_facetab_unregister | ( | ndn_face_table_t * | self, |
ndn_table_id_t | id | ||
) |
Unregister a face from FaceTable only.
[in,out] | self | FaceTable. |
[in] | face | The face to unregister. |
id < self->ndn_face_table_t::capacity