FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | adj_delegate_t_ |
Adj delegate. More... | |
struct | adj_delegate_vft_t_ |
An ADJ delegate virtual function table. More... | |
Macros | |
#define | ADJ_DELEGATE_LAST (ADJ_DELEGATE_MIDCHAIN) |
Typedefs | |
typedef enum adj_delegate_type_t_ | adj_delegate_type_t |
A Delagate is a means to implement the Delagation design pattern; the extension of an object's functionality through the composition of, and delgation to, other objects. More... | |
typedef struct adj_delegate_t_ | adj_delegate_t |
Adj delegate. More... | |
typedef void(* | adj_delegate_adj_deleted_t) (adj_delegate_t *aed) |
Indication that the adjacency has been deleted. More... | |
typedef u8 *(* | adj_delegate_format_t) (const adj_delegate_t *aed, u8 *s) |
Format function for the delegate. More... | |
typedef void(* | adj_delegate_adj_created_t) (adj_index_t ai) |
Notification that an adjacency has been created. More... | |
typedef void(* | adj_delegate_adj_modified_t) (adj_delegate_t *aed) |
Indication that the adjacency has been modified. More... | |
typedef struct adj_delegate_vft_t_ | adj_delegate_vft_t |
An ADJ delegate virtual function table. More... | |
Enumerations | |
enum | adj_delegate_type_t_ { ADJ_DELEGATE_BFD, ADJ_DELEGATE_MIDCHAIN } |
A Delagate is a means to implement the Delagation design pattern; the extension of an object's functionality through the composition of, and delgation to, other objects. More... | |
Functions | |
void | adj_delegate_remove (adj_index_t ai, adj_delegate_type_t type) |
Remove a delegate from an adjacency. More... | |
int | adj_delegate_add (ip_adjacency_t *adj, adj_delegate_type_t fdt, index_t adi) |
Add a delegate to an adjacency. More... | |
adj_delegate_t * | adj_delegate_get (const ip_adjacency_t *adj, adj_delegate_type_t type) |
Get a delegate from an adjacency. More... | |
void | adj_delegate_register_type (adj_delegate_type_t type, const adj_delegate_vft_t *vft) |
Register a VFT for one of the built-in types. More... | |
adj_delegate_type_t | adj_delegate_register_new_type (const adj_delegate_vft_t *vft) |
create a new delegate type and register a new VFT More... | |
#define ADJ_DELEGATE_LAST (ADJ_DELEGATE_MIDCHAIN) |
Definition at line 45 of file adj_delegate.h.
typedef void(* adj_delegate_adj_created_t) (adj_index_t ai) |
Notification that an adjacency has been created.
Definition at line 83 of file adj_delegate.h.
typedef void(* adj_delegate_adj_deleted_t) (adj_delegate_t *aed) |
Indication that the adjacency has been deleted.
The delegate provider should free the delegate.
Definition at line 73 of file adj_delegate.h.
typedef void(* adj_delegate_adj_modified_t) (adj_delegate_t *aed) |
Indication that the adjacency has been modified.
the delegate.
Definition at line 89 of file adj_delegate.h.
typedef u8*(* adj_delegate_format_t) (const adj_delegate_t *aed, u8 *s) |
Format function for the delegate.
Definition at line 78 of file adj_delegate.h.
typedef struct adj_delegate_t_ adj_delegate_t |
Adj delegate.
This object is attached to the adjacency.
typedef enum adj_delegate_type_t_ adj_delegate_type_t |
A Delagate is a means to implement the Delagation design pattern; the extension of an object's functionality through the composition of, and delgation to, other objects.
These 'other' objects are delegates. Delagates are thus attached to ADJ objects to extend their functionality. Built-in delegate types. When adding new types, if your code is within the vnet subsystem, then add a new type here. If not then use the adj_delegate_register_new_type API to register a new type.
typedef struct adj_delegate_vft_t_ adj_delegate_vft_t |
An ADJ delegate virtual function table.
enum adj_delegate_type_t_ |
A Delagate is a means to implement the Delagation design pattern; the extension of an object's functionality through the composition of, and delgation to, other objects.
These 'other' objects are delegates. Delagates are thus attached to ADJ objects to extend their functionality. Built-in delegate types. When adding new types, if your code is within the vnet subsystem, then add a new type here. If not then use the adj_delegate_register_new_type API to register a new type.
Enumerator | |
---|---|
ADJ_DELEGATE_BFD | BFD session state. |
ADJ_DELEGATE_MIDCHAIN | Stacking of a midchain's nexthop. |
Definition at line 34 of file adj_delegate.h.
int adj_delegate_add | ( | ip_adjacency_t * | adj, |
adj_delegate_type_t | fdt, | ||
index_t | adi | ||
) |
Add a delegate to an adjacency.
ai | The adjacency to add the delegate to |
type | The type of delegate being added |
adi | The provider's [pool] index of its attached objet |
Definition at line 107 of file adj_delegate.c.
adj_delegate_t* adj_delegate_get | ( | const ip_adjacency_t * | adj, |
adj_delegate_type_t | type | ||
) |
Get a delegate from an adjacency.
ai | The adjacency to get the delegate from |
type | The type of delegate being sought |
Definition at line 58 of file adj_delegate.c.
adj_delegate_type_t adj_delegate_register_new_type | ( | const adj_delegate_vft_t * | vft | ) |
create a new delegate type and register a new VFT
create a new delegate type and register a new VFT
Register the function table for a new type
Definition at line 218 of file adj_delegate.c.
void adj_delegate_register_type | ( | adj_delegate_type_t | type, |
const adj_delegate_vft_t * | vft | ||
) |
Register a VFT for one of the built-in types.
Register a VFT for one of the built-in types.
Register the function table for a given type
Definition at line 199 of file adj_delegate.c.
void adj_delegate_remove | ( | adj_index_t | ai, |
adj_delegate_type_t | type | ||
) |
Remove a delegate from an adjacency.
ai | The adjacency to remove the delegate from |
type | The type of delegate being removed |
Definition at line 65 of file adj_delegate.c.