CNDP  22.08.0
ip4_node_api.h File Reference
#include <cne_common.h>
#include <cne_fib.h>

Go to the source code of this file.

Functions

CNDP_API int cne_node_ip4_add_input (struct cne_fib *fib, uint32_t ip, uint8_t depth, uint32_t idx)
 
CNDP_API struct cne_node_registerip4_forward_node_get (void)
 
CNDP_API int ip4_forward_set_next (uint16_t port_id, uint16_t next_index)
 
CNDP_API struct cne_node_registerip4_output_node_get (void)
 
CNDP_API int ip4_output_set_next (uint16_t port_id, uint16_t next_index)
 

Detailed Description

This API allows to do control path functions of ip4_* nodes like ip4_input, ip4_forward, ip4_proto, ...

Definition in file ip4_node_api.h.

Function Documentation

◆ cne_node_ip4_add_input()

CNDP_API int cne_node_ip4_add_input ( struct cne_fib *  fib,
uint32_t  ip,
uint8_t  depth,
uint32_t  idx 
)

Add an address to FIB table.

Parameters
fibPointer to FIB structure.
ipIPv4 address.
depthIPv4 depth size
idxIndex into the hop2rt table.
Returns
0 on success, negative otherwise.

◆ ip4_forward_node_get()

CNDP_API struct cne_node_register* ip4_forward_node_get ( void  )

Get the ipv4 forward node.

Returns
Pointer to the ipv4 forward node.

◆ ip4_forward_set_next()

CNDP_API int ip4_forward_set_next ( uint16_t  port_id,
uint16_t  next_index 
)

Set the Edge index of a given port_id.

Parameters
port_idEthernet port identifier.
next_indexEdge index of the Given Tx node.

◆ ip4_output_node_get()

CNDP_API struct cne_node_register* ip4_output_node_get ( void  )

Get the ipv4 output node.

Returns
Pointer to the ipv4 output node.

◆ ip4_output_set_next()

CNDP_API int ip4_output_set_next ( uint16_t  port_id,
uint16_t  next_index 
)

Set the Edge index of a given port_id.

Parameters
port_idEthernet port identifier.
next_indexEdge index of the Given Tx node.