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
15typedef odp_bool_t (*conf_init_fn_t)(config_t *config);
16typedef odp_bool_t (*conf_deploy_fn_t)(void);
17typedef void (*conf_undeploy_fn_t)(void);
18typedef void (*conf_destroy_fn_t)(void);
19typedef uintptr_t (*conf_resource_fn_t)(const char *resource);
20
21odp_bool_t config_parser_init(char *path);
22
23odp_bool_t config_parser_deploy(void);
24
25uintptr_t config_parser_get(const char *domain, const char *resource);
26
27void config_parser_register_parser(const char *domain, conf_init_fn_t init_fn,
28 conf_deploy_fn_t deploy_fn, conf_undeploy_fn_t undeploy_fn,
29 conf_destroy_fn_t destroy_fn, conf_resource_fn_t resource_fn);
30
31void config_parser_undeploy(void);
32
33void config_parser_destroy(void);
34
35#define CONFIG_PARSER_AUTOREGISTER(prio, domain, init, deploy, undeploy, destroy, resource) \
36 __attribute__((constructor(prio))) \
37 static void CONCAT(autoregister, __LINE__)(void) { \
38 config_parser_register_parser(domain, init, deploy, undeploy, destroy, resource); \
39 }
40
41#endif
bool odp_bool_t
Boolean type.
The OpenDataPlane API.