CNDP 22.08.0
Loading...
Searching...
No Matches
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
18extern "C" {
19#endif
20
24typedef struct jcfg_client_s {
25 int s;
27 pthread_barrier_t barrier;
28} jcfg_client_t;
29
33struct jcfg {
34 struct jcfg_data data;
35 char *str;
36 struct json_object *root;
37 struct json_tokener *tok;
38};
39
47
51TAILQ_HEAD(queue_list_head, queue_list_entry);
52
56struct queue_list {
57 uint16_t min;
58 uint16_t max;
59 uint16_t num;
60
61 struct queue_list_head head;
62};
63
72static inline char *
73jcfg_get_json_string(struct jcfg *cfg)
74{
75 return (cfg) ? cfg->str : NULL;
76}
77
86static inline struct json_tokener *
87jcfg_get_json_token(struct jcfg *cfg)
88{
89 return (cfg) ? cfg->tok : NULL;
90}
91
99void jcfg_umem_free(jcfg_hdr_t *hdr);
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* _JCFG_PRIVATE_H_ */
struct jcfg_info_s jcfg_info_t
struct jcfg_hdr jcfg_hdr_t
TAILQ_HEAD(pktdev_driver_list, pktdev_driver)
jcfg_info_t * info
pthread_barrier_t barrier
struct jcfg_data data
struct json_tokener * tok
struct json_object * root
char * str
TAILQ_ENTRY(queue_list_entry) next
uint16_t v
uint16_t min
uint16_t num
struct queue_list_head head
uint16_t max