API Reference Manual 1.51.0
Loading...
Searching...
No Matches
config_parser.h
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2025 Nokia
3 */
4
7#ifndef CONFIG_PARSER_H_
8#define CONFIG_PARSER_H_
9
10#include <libconfig.h>
11#include <odp_api.h>
12
13#include "helpers.h"
14#include "odp_pipeline_config.h"
15
16typedef odp_bool_t (*conf_init_fn_t)(config_t *config);
17typedef odp_bool_t (*conf_deploy_fn_t)(void);
18typedef void (*conf_undeploy_fn_t)(void);
19typedef void (*conf_destroy_fn_t)(void);
20typedef uintptr_t (*conf_resource_fn_t)(const char *resource);
21
22typedef struct {
23 char **libs;
24 char *path;
25 uint32_t num_libs;
26} opts_t;
27
28odp_bool_t config_parser_init(const opts_t *opts);
29
30odp_bool_t config_parser_deploy(void);
31
32void config_parser_register_parser(const char *domain, conf_init_fn_t init_fn,
33 conf_deploy_fn_t deploy_fn, conf_undeploy_fn_t undeploy_fn,
34 conf_destroy_fn_t destroy_fn, conf_resource_fn_t resource_fn);
35
36void config_parser_undeploy(void);
37
38void config_parser_destroy(void);
39
40#define CONFIG_PARSER_AUTOREGISTER(prio, domain, init, deploy, undeploy, destroy, resource) \
41 __attribute__((constructor(prio))) \
42 static void CONCAT(autoregister, __LINE__)(void) { \
43 config_parser_register_parser(domain, init, deploy, undeploy, destroy, resource); \
44 }
45
46#endif
bool odp_bool_t
Boolean type.
The OpenDataPlane API.