Click
Loading...
Searching...
No Matches
config.h
1/* include/click/config.h. Generated from config.h.in by configure. */
2/* Process this file with configure to produce config.h. -*- mode: c -*- */
3#ifndef CLICK_CONFIG_H
4#define CLICK_CONFIG_H
5
6/* Define to 1 if type `char' is unsigned and you are not using gcc. */
7#ifndef __CHAR_UNSIGNED__
8/* # undef __CHAR_UNSIGNED__ */
9#endif
10
11#define CLICK_BIG_ENDIAN 4321
12#define CLICK_LITTLE_ENDIAN 1234
13#define CLICK_NO_ENDIAN 0
14
15/* Define to byte order of target machine. */
16#define CLICK_BYTE_ORDER CLICK_LITTLE_ENDIAN
17
18/* Define to enable debugging support for Click scheduling. */
19/* #undef CLICK_DEBUG_SCHEDULING */
20
21/* Define for Click memory allocation debugging. */
22/* #undef CLICK_DMALLOC */
23
24/* Define to add epoch tracking to hash iterators. */
25/* #undef CLICK_HASH_ITERATOR_EPOCHS */
26
27/* Define for forcing expensive packet operations. */
28/* #undef CLICK_FORCE_EXPENSIVE */
29
30/* Define if indirect packets are not allowed. */
31/* #undef CLICK_NOINDIRECT */
32
33/* Define to generate smaller object files. */
34/* #undef CLICK_OPTIMIZE_SIZE */
35
36/* Version number of package */
37#define CLICK_VERSION "2.1"
38
39/* Version number of package, in CLICK_MAKE_VERSION_CODE format */
40#define CLICK_VERSION_CODE CLICK_MAKE_VERSION_CODE(2,1,0)
41
42/* Define to desired statistics level. */
43#define CLICK_STATS 0
44
45/* Define if PollDevice should run fast to get good benchmark numbers */
46/* #undef CLICK_WARP9 */
47
48/* Define if you have the __builtin_ctz function. */
49#define HAVE___BUILTIN_CTZ 1
50
51/* Define if you have the __builtin_clz function. */
52#define HAVE___BUILTIN_CLZ 1
53
54/* Define if you have the __builtin_clzl function. */
55#define HAVE___BUILTIN_CLZL 1
56
57/* Define if you have the __builtin_clzll function. */
58#define HAVE___BUILTIN_CLZLL 1
59
60/* Define if you have the __builtin_ffs function. */
61#define HAVE___BUILTIN_FFS 1
62
63/* Define if you have the __builtin_ffsl function. */
64#define HAVE___BUILTIN_FFSL 1
65
66/* Define if you have the __builtin_ffsll function. */
67#define HAVE___BUILTIN_FFSLL 1
68
69/* Define if you have the __builtin_popcount function. */
70#define HAVE___BUILTIN_POPCOUNT 1
71
72/* Define if you have the __has_trivial_copy compiler intrinsic. */
73#define HAVE___HAS_TRIVIAL_COPY 1
74
75/* Define if you have the __is_trivially_copyable compiler intrinsic. */
76#define HAVE___IS_TRIVIALLY_COPYABLE 1
77
78/* Define if you have the __sync_synchronize function. */
79#define HAVE___SYNC_SYNCHRONIZE 1
80
81/* Define if the __sync_synchronize function supports arguments. */
82/* #undef HAVE___SYNC_SYNCHRONIZE_ARGUMENTS */
83
84/* Define if the va_list type is addressable. */
85/* #undef HAVE_ADDRESSABLE_VA_LIST */
86
87/* Define if right shift of signed integers acts by sign extension. */
88#define HAVE_ARITHMETIC_RIGHT_SHIFT 1
89
90/* Define if AVX2 instruction is available. */
91#define HAVE_AVX2 1
92
93/* Define if Batching support is enabled. */
94#define HAVE_BATCH 1
95
96/* Define if Port::push/Port::pull should use bound function pointers. */
97/* #undef HAVE_BOUND_PORT_TRANSFER */
98
99/* Define if compiled with heuristic for CPU load. */
100/* #undef HAVE_CLICK_LOAD */
101
102/* Define if the C++ compiler understands constexpr. */
103#define HAVE_CXX_CONSTEXPR 1
104
105/* Define if the C++ compiler understands #pragma interface. */
106#define HAVE_CXX_PRAGMA_INTERFACE 1
107
108/* Define if the C++ compiler understands rvalue references. */
109#define HAVE_CXX_RVALUE_REFERENCES 1
110
111/* Define if the C++ compiler understands static_assert. */
112#define HAVE_CXX_STATIC_ASSERT 1
113
114/* Define if the C++ compiler understands template alias. */
115#define HAVE_CXX_TEMPLATE_ALIAS 1
116
117/* Define if Flow support is enabled. */
118/* #undef HAVE_FLOW */
119
120/* Define if the machine is indifferent to alignment. */
121#define HAVE_INDIFFERENT_ALIGNMENT 1
122
123/* Define if you want to use Intel-specific instructions. */
124/* #undef HAVE_INTEL_CPU */
125
126/* Define if 64-bit integer types are enabled. */
127#define HAVE_INT64_TYPES 1
128
129/* Define if Nonatomic access to packets when single-threaded fullpush is detected is enabled. */
130#define HAVE_FULLPUSH_NONATOMIC 1
131
132/* Define if warnings and information about batching are enabled. */
133#define HAVE_VERBOSE_BATCH 1
134
135#define AUTO_BATCH_PORT 1
136#define AUTO_BATCH_LIST 2
137#define AUTO_BATCH_JUMP 3
138
139/* Define if make vanilla elements batch-compatible automatically */
140/* #undef HAVE_AUTO_BATCH */
141
142/* Define if IPv6 support is enabled. */
143/* #undef HAVE_IP6 */
144
145/* Define if IPsec support is enabled. */
146/* #undef HAVE_IPSEC */
147
148/* Define if Json support is enabled. */
149#define HAVE_JSON 1
150
151/* Define to 1 if the system has the type `long long'. */
152#define HAVE_LONG_LONG 1
153
154/* Define if nanosecond-granularity timestamps are enabled. */
155#define HAVE_NANOTIMESTAMP_ENABLED 1
156
157/* Define if the RE2 library is present. */
158/* #undef HAVE_RE2 */
159
160/* Define if elements have random alignment. */
161/* #undef HAVE_RAND_ALIGN */
162
163/* Define if you want to use the stride scheduler. */
164#define HAVE_STRIDE_SCHED 1
165
166/* Define to 1 since we have Strings. */
167#define HAVE_STRING 1
168
169/* Define to 1 if the system has the type `struct timespec'. */
170#define HAVE_STRUCT_TIMESPEC 1
171
172#ifdef HAVE_STRIDE_SCHED
173/* Define if you want task scheduling to use a heap, not a linked list. */
174/* #undef HAVE_TASK_HEAP */
175#endif
176
177/* Define if compiled with task statistics. */
178/* #undef HAVE_TASK_STATS */
179
180/* Define if user-provided clock system is supported. */
181/* #undef HAVE_USER_TIMING */
182
183/* The size of a `int', as computed by sizeof. */
184#define SIZEOF_INT 4
185
186/* The size of a `long', as computed by sizeof. */
187#define SIZEOF_LONG 8
188
189/* The size of a `long long', as computed by sizeof. */
190#define SIZEOF_LONG_LONG 8
191
192/* The size of a `size_t', as computed by sizeof. */
193#define SIZEOF_SIZE_T 8
194
195/* The size of a `struct timespec', as computed by sizeof. */
196#define SIZEOF_STRUCT_TIMESPEC 16
197
198/* The size of a `struct timeval', as computed by sizeof. */
199#define SIZEOF_STRUCT_TIMEVAL 16
200
201/* The size of a `ptrdiff_t', as computed by sizeof. */
202#define SIZEOF_PTRDIFF_T 8
203
204/* The size of a `void *', as computed by sizeof. */
205#define SIZEOF_VOID_P 8
206
207/* Define if SSE2 instruction is available. */
208#define HAVE_SSE2 1
209
210/* Define if SSE4.2 instruction is available. */
211#define HAVE_SSE42 1
212
213/* Define if you want to run multithreaded Click. */
214/* #undef __MTCLICK__ */
215
216/* Define inline, if necessary. C only. */
217#ifndef __cplusplus
218/* #undef inline */
219#endif
220
221/* Define constexpr to const under C or old C++. */
222#if !defined(__cplusplus) || !HAVE_CXX_CONSTEXPR
223# define constexpr const
224#endif
225
226/* Define CLICK_DEBUG_SCHEDULING to 0 if disabled. */
227#ifndef CLICK_DEBUG_SCHEDULING
228# define CLICK_DEBUG_SCHEDULING 0
229#endif
230
231/* Define macro for creating Click version codes (a la Linux version codes). */
232#define CLICK_MAKE_VERSION_CODE(major, minor, patch) \
233 (((major) << 16) | ((minor) << 8) | (patch))
234
235/* Define macro for aligning variables. */
236#if __GNUC__
237# define CLICK_ALIGNED(x) __attribute__((aligned(x)))
238#else
239# define CLICK_ALIGNED(x) /* nothing */
240#endif
241
242/* Define macro for size of a cache line. */
243#define CLICK_CACHE_LINE_SIZE 64
244
245/* Define macro for the difference between 'x' and the next higher multiple
246 of CLICK_CACHE_LINE_SIZE (between 0 and CLICK_CACHE_LINE_SIZE - 1). */
247#define CLICK_CACHE_LINE_PAD_BYTES(x) \
248 ((((x) + CLICK_CACHE_LINE_SIZE - 1) / CLICK_CACHE_LINE_SIZE) * CLICK_CACHE_LINE_SIZE - (x))
249
250/* Define macro for deprecated functions. */
251#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ == 0)
252# define CLICK_DEPRECATED /* nothing */
253#else
254# define CLICK_DEPRECATED __attribute__((deprecated))
255#endif
256
257/* Define macro for deprecated functions with message. */
258#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ == 0)
259# define CLICK_DEPRECATED_MSG(m) /* nothing */
260#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4)
261# define CLICK_DEPRECATED_MSG(m) __attribute__((deprecated))
262#else
263# define CLICK_DEPRECATED_MSG(m) __attribute__((deprecated(m)))
264#endif
265
266/* Define macro for deprecated enumerations. */
267#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
268# define CLICK_DEPRECATED_ENUM /* nothing */
269#else
270# define CLICK_DEPRECATED_ENUM __attribute__((deprecated))
271#endif
272
273/* Define macros for marking types as may-alias. */
274#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
275# define CLICK_MAY_ALIAS /* nothing */
276#else
277# define CLICK_MAY_ALIAS __attribute__((__may_alias__))
278#endif
279
280/* Define macro for marking functions noninlinable. */
281#ifdef CLICK_LINUXMODULE
282# define CLICK_NOINLINE noinline
283#elif __GNUC__
284# define CLICK_NOINLINE __attribute__((noinline))
285#else
286# define CLICK_NOINLINE /* nothing */
287#endif
288
289/* Define macro for funtions that should be inline-able even if compiling without optimization. */
290#if __GNUC__
291# define CLICK_ALWAYS_INLINE __attribute__((always_inline))
292#else
293# define CLICK_ALWAYS_INLINE /* nothing */
294#endif
295
296/* Define macro for funtions that should not be optimized. */
297#if __GNUC__
298# define CLICK_OPTNONE __attribute__((optnone))
299#else
300# define CLICK_OPTNONE /* nothing */
301#endif
302
303
304
305#if CLICK_LINUXMODULE
306# define CLICK_CACHE_ALIGN ____cacheline_aligned;
307#elif CLICK_USERLEVEL
308# define CLICK_CACHE_ALIGN __attribute__((aligned(CLICK_CACHE_LINE_SIZE)))
309#else
310# define CLICK_CACHE_ALIGN
311#endif
312
313/* Define macros for declaring packed structures. */
314#ifdef __GNUC__
315# define CLICK_PACKED_STRUCTURE(open, close) open close __attribute__((packed))
316# define CLICK_SIZE_PACKED_STRUCTURE(open, close) open close __attribute__((packed)) /* deprecated */
317# define CLICK_SIZE_PACKED_ATTRIBUTE __attribute__((packed))
318#else
319# define CLICK_PACKED_STRUCTURE(open, close) _Cannot_pack_structure__Use_GCC
320# define CLICK_SIZE_PACKED_STRUCTURE(open, close) open close /* deprecated */
321# define CLICK_SIZE_PACKED_ATTRIBUTE
322#endif
323
324/* Define macro for functions whose results should not be ignored. */
325#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
326# define CLICK_WARN_UNUSED_RESULT /* nothing */
327#else
328# define CLICK_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
329#endif
330
331/* Define macro for cold (rarely used) functions. */
332#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
333# define CLICK_COLD /* nothing */
334#else
335# define CLICK_COLD __attribute__((cold))
336#endif
337
338/* Define ARCH_IS_BIG_ENDIAN based on CLICK_BYTE_ORDER. */
339#if CLICK_BYTE_ORDER == CLICK_BIG_ENDIAN
340# define ARCH_IS_BIG_ENDIAN 1
341#elif CLICK_BYTE_ORDER == CLICK_LITTLE_ENDIAN
342# define ARCH_IS_BIG_ENDIAN 0
343#endif
344
345/* Define macro for htons() on constants (allows htons() in switch cases). */
346#if CLICK_BYTE_ORDER == CLICK_BIG_ENDIAN
347# define click_constant_htons(x) (x)
348#elif CLICK_BYTE_ORDER == CLICK_LITTLE_ENDIAN
349# define click_constant_htons(x) ((((x) >> 8) & 255) | (((x) & 255) << 8))
350#endif
351
352/* EXPORT_ELEMENT, ELEMENT_REQUIRES, ELEMENT_PROVIDES, ELEMENT_HEADER,
353 ELEMENT_LIBS, and ELEMENT_MT_SAFE are noops. */
354#define EXPORT_ELEMENT(x)
355#define ELEMENT_REQUIRES(x)
356#define ELEMENT_PROVIDES(x)
357#define ELEMENT_HEADER(x)
358#define ELEMENT_FEATURES(x)
359#define ELEMENT_LIBS(x)
360#define ELEMENT_MT_SAFE(x)
361
362
363#define CLICK_NEVER_REPLACE(x) x
364
365/* Assume CLICK_USERLEVEL unless otherwise defined. */
366#if !defined(CLICK_USERLEVEL) && !defined(CLICK_TOOL) && !defined(CLICK_LINUXMODULE) && !defined(CLICK_BSDMODULE) && !defined(CLICK_MINIOS)
367# define CLICK_USERLEVEL 1
368#endif
369
370/* Define stuff under a Linux module. */
371#ifdef CLICK_LINUXMODULE
372# include <click/config-linuxmodule.h>
373#endif
374
375/* Define stuff under a FreeBSD module. */
376#ifdef CLICK_BSDMODULE
377# include <click/config-bsdmodule.h>
378#endif
379
380/* Define stuff under nsclick. */
381#ifdef CLICK_NS
382# include <click/config-ns.h>
383#endif
384
385/* Define stuff under tools or a user-level driver. */
386#if defined(CLICK_USERLEVEL) || defined(CLICK_TOOL)
387# include <click/config-userlevel.h>
388#endif
389
390/* Define stuff under a MiniOS application. */
391#ifdef CLICK_MINIOS
392# include <click/config-minios.h>
393#endif
394
395/* Ensure declaration of DefaultArg template. */
396#ifdef __cplusplus
397CLICK_DECLS
398template <typename T> struct DefaultArg;
399
402struct uninitialized_type {
403};
404CLICK_ENDDECLS
405#endif
406
407/* Define aliasing versions of integer and pointer types. */
408typedef uint16_t click_aliasable_uint16_t CLICK_MAY_ALIAS;
409typedef int16_t click_aliasable_int16_t CLICK_MAY_ALIAS;
410typedef uint32_t click_aliasable_uint32_t CLICK_MAY_ALIAS;
411typedef int32_t click_aliasable_int32_t CLICK_MAY_ALIAS;
412#if HAVE_INT64_TYPES
413typedef uint64_t click_aliasable_uint64_t CLICK_MAY_ALIAS;
414typedef int64_t click_aliasable_int64_t CLICK_MAY_ALIAS;
415#endif
416typedef void *click_aliasable_void_pointer_t CLICK_MAY_ALIAS;
417
418#endif /* CLICK_CONFIG_H */