Blog
Community
Development
Documentation
CNDP
22.08.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cnet_chnl_opt.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright (c) 2016-2022 Intel Corporation
3
*/
4
5
#ifndef __CNET_CHNL_OPT
6
#define __CNET_CHNL_OPT
7
12
13
#include <stdint.h>
// for uint32_t, int32_t
14
#include <sys/socket.h>
// for socklen_t
15
16
struct
chnl;
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
21
/*
22
* chnl_optsw - channel option switch structure
23
*/
24
struct
chnl_optsw {
25
int32_t level;
26
int (*setfunc)(
struct
chnl *ch, int, int,
const
void
*, uint32_t);
27
int (*getfunc)(
struct
chnl *ch, int, int,
void
*, uint32_t *);
28
};
29
39
int
cnet_chnl_opt_add(
struct
chnl_optsw *ps);
40
58
int
cnet_chnl_opt_iterate_set(
struct
chnl *ch,
int
level,
int
optname,
const
void
*optval,
59
uint32_t optlen);
60
78
int
cnet_chnl_opt_iterate_get(
struct
chnl *ch,
int
level,
int
optname,
void
*optval,
79
uint32_t *optlen);
80
92
uint32_t chnl_optval_get(
const
void
*optval, uint32_t optlen);
93
110
CNDP_API
int
chnl_set_opt
(
int
cd,
int
level,
int
optname,
const
void
*optval,
int
optlen);
111
128
CNDP_API
int
chnl_get_opt
(
int
cd,
int
level,
int
optname,
void
*optval, socklen_t *optlen);
129
130
#ifdef __cplusplus
131
}
132
#endif
133
134
#endif
/* __CNET_CHNL_OPT */
chnl_set_opt
CNDP_API int chnl_set_opt(int cd, int level, int optname, const void *optval, int optlen)
Set a channel option.
chnl_get_opt
CNDP_API int chnl_get_opt(int cd, int level, int optname, void *optval, socklen_t *optlen)
Get a channel option.
lib
cnet
chnl
cnet_chnl_opt.h
Generated by
1.18.0