CNDP  22.08.0
cnet_chnl_opt.h File Reference
#include <stdint.h>
#include <sys/socket.h>

Go to the source code of this file.

Functions

CNDP_API int chnl_set_opt (int cd, int level, int optname, const void *optval, int optlen)
 Set a channel option. More...
 
CNDP_API int chnl_get_opt (int cd, int level, int optname, void *optval, socklen_t *optlen)
 Get a channel option. More...
 

Detailed Description

CNET Channel option routines and constants.

Definition in file cnet_chnl_opt.h.

Function Documentation

◆ chnl_set_opt()

CNDP_API int chnl_set_opt ( int  cd,
int  level,
int  optname,
const void *  optval,
int  optlen 
)

Set a channel option.

Parameters
cdThe channel descriptor to use for the set
levelThe level of the option to set
optnameThe name of the option to set
optvalThe option value to set
optlenThe option length for the set
Returns
0 on success or -1 on error
Examples
examples/cnet-quic/quic-cli.c.

◆ chnl_get_opt()

CNDP_API int chnl_get_opt ( int  cd,
int  level,
int  optname,
void *  optval,
socklen_t *  optlen 
)

Get a channel option.

Parameters
cdThe channel descriptor to use for the get
levelThe level of the option to get
optnameThe name of the option to get
optvalThe option value to get
optlenThe option length for the get
Returns
0 on success or -1 on error