ONLP
Open Network Linux Platform APIs
onlp_config.h
Go to the documentation of this file.
1 /************************************************************
2  * <bsn.cl fy=2014 v=onl>
3  *
4  * Copyright 2014, 2015 Big Switch Networks, Inc.
5  *
6  * Licensed under the Eclipse Public License, Version 1.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.eclipse.org/legal/epl-v10.html
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific
16  * language governing permissions and limitations under the
17  * License.
18  *
19  * </bsn.cl>
20  ********************************************************/
29 #ifndef __ONLP_CONFIG_H__
30 #define __ONLP_CONFIG_H__
31 
32 #ifdef GLOBAL_INCLUDE_CUSTOM_CONFIG
33 #include <global_custom_config.h>
34 #endif
35 #ifdef ONLP_INCLUDE_CUSTOM_CONFIG
36 #include <onlp_custom_config.h>
37 #endif
38 
39 /* <auto.start.cdefs(ONLP_CONFIG_HEADER).header> */
40 #include <AIM/aim.h>
47 #ifndef ONLP_CONFIG_INCLUDE_LOGGING
48 #define ONLP_CONFIG_INCLUDE_LOGGING 1
49 #endif
50 
57 #ifndef ONLP_CONFIG_LOG_OPTIONS_DEFAULT
58 #define ONLP_CONFIG_LOG_OPTIONS_DEFAULT AIM_LOG_OPTIONS_DEFAULT
59 #endif
60 
67 #ifndef ONLP_CONFIG_LOG_BITS_DEFAULT
68 #define ONLP_CONFIG_LOG_BITS_DEFAULT AIM_LOG_BITS_DEFAULT
69 #endif
70 
77 #ifndef ONLP_CONFIG_LOG_CUSTOM_BITS_DEFAULT
78 #define ONLP_CONFIG_LOG_CUSTOM_BITS_DEFAULT 0
79 #endif
80 
87 #ifndef ONLP_CONFIG_PORTING_STDLIB
88 #define ONLP_CONFIG_PORTING_STDLIB 1
89 #endif
90 
97 #ifndef ONLP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS
98 #define ONLP_CONFIG_PORTING_INCLUDE_STDLIB_HEADERS ONLP_CONFIG_PORTING_STDLIB
99 #endif
100 
107 #ifndef ONLP_CONFIG_INCLUDE_UCLI
108 #define ONLP_CONFIG_INCLUDE_UCLI 0
109 #endif
110 
117 #ifndef ONLP_CONFIG_INCLUDE_PLATFORM_ERROR_CHECK
118 #define ONLP_CONFIG_INCLUDE_PLATFORM_ERROR_CHECK 1
119 #endif
120 
127 #ifndef ONLP_CONFIG_INCLUDE_SHLOCK_GLOBAL_INIT
128 #define ONLP_CONFIG_INCLUDE_SHLOCK_GLOBAL_INIT 0
129 #endif
130 
137 #ifndef ONLP_CONFIG_PLATFORM_NAME
138 #define ONLP_CONFIG_PLATFORM_NAME NULL
139 #endif
140 
147 #ifndef ONLP_CONFIG_PLATFORM_FILENAME
148 #define ONLP_CONFIG_PLATFORM_FILENAME "/etc/onl/platform"
149 #endif
150 
157 #ifndef ONLP_CONFIG_INCLUDE_PLATFORM_OVERRIDES
158 #define ONLP_CONFIG_INCLUDE_PLATFORM_OVERRIDES 1
159 #endif
160 
167 #ifndef ONLP_CONFIG_CONFIGURATION_FILENAME
168 #define ONLP_CONFIG_CONFIGURATION_FILENAME "/etc/onlp.conf"
169 #endif
170 
177 #ifndef ONLP_CONFIG_CONFIGURATION_ENV
178 #define ONLP_CONFIG_CONFIGURATION_ENV "ONLP_CONF"
179 #endif
180 
187 #ifndef ONLP_CONFIG_INCLUDE_API_LOCK
188 #define ONLP_CONFIG_INCLUDE_API_LOCK 1
189 #endif
190 
197 #ifndef ONLP_CONFIG_API_LOCK_GLOBAL_SHARED
198 #define ONLP_CONFIG_API_LOCK_GLOBAL_SHARED 1
199 #endif
200 
207 #ifndef ONLP_CONFIG_API_LOCK_TIMEOUT
208 #define ONLP_CONFIG_API_LOCK_TIMEOUT 60000000
209 #endif
210 
217 #ifndef ONLP_CONFIG_INFO_STR_MAX
218 #define ONLP_CONFIG_INFO_STR_MAX 64
219 #endif
220 
227 #ifndef ONLP_CONFIG_INCLUDE_THERMAL_THRESHOLDS
228 #define ONLP_CONFIG_INCLUDE_THERMAL_THRESHOLDS 0
229 #endif
230 
237 #ifndef ONLP_CONFIG_INCLUDE_API_PROFILING
238 #define ONLP_CONFIG_INCLUDE_API_PROFILING 0
239 #endif
240 
241 
242 
248 typedef struct onlp_config_settings_s {
250  const char* name;
252  const char* value;
254 
258 
263 const char* onlp_config_lookup(const char* setting);
264 
269 int onlp_config_show(struct aim_pvs_s* pvs);
270 
271 /* <auto.end.cdefs(ONLP_CONFIG_HEADER).header> */
272 
273 #include "onlp_porting.h"
274 
275 #endif /* __ONLP_CONFIG_H__ */
276 /* @} */
const char * name
Definition: onlp_config.h:250
struct onlp_config_settings_s onlp_config_settings_t
onlp Porting Macros.
onlp_config_settings_t onlp_config_settings[]
const char * onlp_config_lookup(const char *setting)
Lookup a configuration setting.
Definition: onlp_config.h:248
const char * value
Definition: onlp_config.h:252
int onlp_config_show(struct aim_pvs_s *pvs)
Show the compile-time configuration.