Blog
Community
Development
Documentation
CNDP
22.08.0
jcfg_private.h
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright (c) 2019-2022 Intel Corporation.
3
*/
4
5
#ifndef _JCFG_PRIVATE_H_
6
#define _JCFG_PRIVATE_H_
7
8
#include <sys/queue.h>
9
#include <pthread.h>
10
11
#include <json-c/json_object.h>
12
#include <json-c/json_tokener.h>
13
#include <json-c/json_util.h>
14
#include <json-c/json_visit.h>
15
#include <json-c/linkhash.h>
16
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
24
typedef
struct
jcfg_client_s
{
25
int
s
;
26
jcfg_info_t
*
info
;
27
pthread_barrier_t
barrier
;
28
}
jcfg_client_t
;
29
33
struct
jcfg
{
34
struct
jcfg_data
data
;
35
char
*
str
;
36
struct
json_object *
root
;
37
struct
json_tokener *
tok
;
38
};
39
43
struct
queue_list_entry
{
44
uint16_t
v
;
45
TAILQ_ENTRY
(
queue_list_entry
) next;
46
};
47
51
TAILQ_HEAD
(queue_list_head,
queue_list_entry
);
52
56
struct
queue_list
{
57
uint16_t
min
;
58
uint16_t
max
;
59
uint16_t
num
;
61
struct
queue_list_head
head
;
62
};
63
72
static
inline
char
*
73
jcfg_get_json_string(
struct
jcfg
*cfg)
74
{
75
return
(cfg) ? cfg->
str
: NULL;
76
}
77
86
static
inline
struct
json_tokener *
87
jcfg_get_json_token(
struct
jcfg
*cfg)
88
{
89
return
(cfg) ? cfg->
tok
: NULL;
90
}
91
99
void
jcfg_umem_free(
jcfg_hdr_t
*hdr);
100
101
#ifdef __cplusplus
102
}
103
#endif
104
105
#endif
/* _JCFG_PRIVATE_H_ */
TAILQ_HEAD
TAILQ_HEAD(pktdev_driver_list, pktdev_driver)
jcfg_client_s
Definition:
jcfg_private.h:24
jcfg_client_s::s
int s
Definition:
jcfg_private.h:25
jcfg_client_s::info
jcfg_info_t * info
Definition:
jcfg_private.h:26
jcfg_client_s::barrier
pthread_barrier_t barrier
Definition:
jcfg_private.h:27
jcfg_data
Definition:
jcfg.h:272
jcfg_hdr
Definition:
jcfg.h:129
jcfg_info_s
Definition:
jcfg.h:334
jcfg
Definition:
jcfg_private.h:33
jcfg::data
struct jcfg_data data
Definition:
jcfg_private.h:34
jcfg::tok
struct json_tokener * tok
Definition:
jcfg_private.h:37
jcfg::root
struct json_object * root
Definition:
jcfg_private.h:36
jcfg::str
char * str
Definition:
jcfg_private.h:35
queue_list_entry
Definition:
jcfg_private.h:43
queue_list_entry::TAILQ_ENTRY
TAILQ_ENTRY(queue_list_entry) next
queue_list_entry::v
uint16_t v
Definition:
jcfg_private.h:44
queue_list
Definition:
jcfg_private.h:56
queue_list::min
uint16_t min
Definition:
jcfg_private.h:57
queue_list::num
uint16_t num
Definition:
jcfg_private.h:59
queue_list::head
struct queue_list_head head
Definition:
jcfg_private.h:61
queue_list::max
uint16_t max
Definition:
jcfg_private.h:58
lib
usr
app
jcfg
jcfg_private.h
Generated by
1.9.1