FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
adj_delegate.h File Reference
+ Include dependency graph for adj_delegate.h:
+ This graph shows which files directly or indirectly include this file:

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...
 

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 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 }
 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_tadj_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...
 

Typedef Documentation

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 67 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 72 of file adj_delegate.h.

Adj delegate.

This object is attached to the adjacency.

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.

An ADJ delegate virtual function table.

Enumeration Type Documentation

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.

Definition at line 34 of file adj_delegate.h.

Function Documentation

int adj_delegate_add ( ip_adjacency_t adj,
adj_delegate_type_t  fdt,
index_t  adi 
)

Add a delegate to an adjacency.

Parameters
aiThe adjacency to add the delegate to
typeThe type of delegate being added
adiThe provider's [pool] index of its attached objet

Definition at line 107 of file adj_delegate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

adj_delegate_t* adj_delegate_get ( const ip_adjacency_t adj,
adj_delegate_type_t  type 
)

Get a delegate from an adjacency.

Parameters
aiThe adjacency to get the delegate from
typeThe type of delegate being sought

Definition at line 58 of file adj_delegate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 190 of file adj_delegate.c.

+ Here is the caller graph for this function:

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 171 of file adj_delegate.c.

+ Here is the caller graph for this function:

void adj_delegate_remove ( adj_index_t  ai,
adj_delegate_type_t  type 
)

Remove a delegate from an adjacency.

Parameters
aiThe adjacency to remove the delegate from
typeThe type of delegate being removed

Definition at line 65 of file adj_delegate.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: