CNDP  22.08.0
cnet_reg.h File Reference
#include <stdint.h>
#include "cnet_const.h"
#include "cne_common.h"

Go to the source code of this file.

Functions

CNDP_API void cnet_add_instance (const char *name, int pri, cfunc_t create, cfunc_t destroy)
 
CNDP_API int cnet_do_instance_calls (struct stk_s *stk, int type)
 
CNDP_API void cne_register_dump (void)
 

Detailed Description

CNET Registration routines.

Definition in file cnet_reg.h.

Function Documentation

◆ cnet_add_instance()

CNDP_API void cnet_add_instance ( const char *  name,
int  pri,
cfunc_t  create,
cfunc_t  destroy 
)

Add a stack instance function call for each stack instance created.

Parameters
nameThe name for the function to call
priThe priority of this function call. The lower 16 bits is split up into two 8 bit values to define the priority level and subpriority level.
createThe stack instance create function to call prototype int (*func)(stk_t *stk)
destroyThe stack instance destroy function to call prototype int (*func)(stk_t *stk)
Returns
0 on success or -1 on error

◆ cnet_do_instance_calls()

CNDP_API int cnet_do_instance_calls ( struct stk_s *  stk,
int  type 
)

Call all of the singleton instance functions

Parameters
stkThe stack instance pointer
typeThe type of call INIT or STOP
Returns
0 on success or -1 on error

◆ cne_register_dump()

CNDP_API void cne_register_dump ( void  )

Dump the stack instance information