Click
Loading...
Searching...
No Matches
config-userlevel.h
1/* include/click/config-userlevel.h. Generated from config-userlevel.h.in by configure. */
2/* Process this file with configure to produce config-userlevel.h. -*- mode: c -*- */
3#ifndef CLICK_CONFIG_USERLEVEL_H
4#define CLICK_CONFIG_USERLEVEL_H
5
6/* Define if you have the __thread storage class specifier. */
7#define HAVE___THREAD_STORAGE_CLASS 1
8
9/* Define if accept() uses socklen_t. */
10#define HAVE_ACCEPT_SOCKLEN_T 1
11
12/* Define if aligned_alloc is implemented */
13#define HAVE_ALIGNED_ALLOC 1
14
15/* Define if the compiler supports aligned new (C++ 17) */
16#define HAVE_ALIGNED_NEW 1
17
18/* Define if kqueue() may be used to wait for file descriptor events. */
19#define HAVE_ALLOW_KQUEUE 1
20
21/* Define if poll() may be used to wait for file descriptor events. */
22#define HAVE_ALLOW_POLL 1
23
24/* Define if select() may be used to wait for file descriptor events. */
25#define HAVE_ALLOW_SELECT 1
26
27/* Define if you have the <bpf.h> header file and libbpf. */
28/* #undef HAVE_BPF */
29
30/* Define if bpf.h has bpf_stats_type. */
31/* #undef HAVE_BPF_STATS_TYPE */
32
33/* Define if <pcap.h> uses bpf_timeval. */
34/* #undef HAVE_BPF_TIMEVAL */
35
36/* Define if you have the <byteswap.h> header file. */
37#define HAVE_BYTESWAP_H 1
38
39/* Define if you have the CPU load cycles tracking function. */
40/* #undef HAVE_CLICK_LOAD */
41
42/* Define if Click can use a packet pool */
43#define HAVE_ALLOW_CLICK_PACKET_POOL 1
44
45/* Define if context system is enabled. */
46/* #undef HAVE_CTX */
47
48/* Define if curl is present. */
49/* #undef HAVE_CURL */
50
51/* Define if you have the clock_gettime function. */
52#define HAVE_CLOCK_GETTIME 1
53
54/* Define to 1 if you have the declaration
55 of 'clock_gettime', and to 0 if you don't. */
56#define HAVE_DECL_CLOCK_GETTIME 1
57
58/* Define to 1 if you have the declaration
59 of 'madvise', and to 0 if you don't. */
60#define HAVE_DECL_MADVISE 1
61
62/* Define to 1 if you have the declaration
63 of 'pcap_setnonblock', and to 0 if you don't. */
64/* #undef HAVE_DECL_PCAP_SETNONBLOCK */
65
66/* Define if you have the <dlfcn.h> header file. */
67#define HAVE_DLFCN_H 1
68
69/* Define if dynamic linking is possible. */
70#define HAVE_DYNAMIC_LINKING 1
71
72/* Define if you have the <execinfo.h> header file. */
73#define HAVE_EXECINFO_H 1
74
75/* Define if you have the flow subsystem. */
76/* #undef HAVE_FLOW */
77
78/* Define if you have the HW Flow API. */
79/* #undef HAVE_FLOW_API */
80
81/* Define if you have the ffs function. */
82#define HAVE_FFS 1
83
84/* Define if you have the ffsl function. */
85#define HAVE_FFSL 1
86
87/* Define if you have the ffsll function. */
88#define HAVE_FFSLL 1
89
90/* Floating point arithmetic is allowed. */
91#define HAVE_FLOAT_TYPES 1
92
93/* Define if you have the <grp.h> header file. */
94#define HAVE_GRP_H 1
95
96/* Define if the last argument to EV_SET has pointer type. */
97/* #undef HAVE_EV_SET_UDATA_POINTER */
98
99/* Define if 'struct if_data' has an 'ifi_datalen' member. */
100/* #undef HAVE_IF_DATA_IFI_DATALEN */
101
102/* Define if you have the <ifaddrs.h> header file. */
103#define HAVE_IFADDRS_H 1
104
105/* Define if 'int64_t' is typedefed to 'long' at user level. */
106#define HAVE_INT64_IS_LONG_USERLEVEL 1
107
108/* Define if 'int64_t' is typedefed to 'long long' at user level. */
109/* #undef HAVE_INT64_IS_LONG_LONG_USERLEVEL */
110
111/* Define if you have the <inttypes.h> header file. */
112#define HAVE_INTTYPES_H 1
113
114/* Define if you have the kqueue function. */
115/* #undef HAVE_KQUEUE */
116
117/* Define if your C library contains large file support. */
118#define HAVE_LARGE_FILE_SUPPORT 1
119
120/* Define if you have the <linux/ethtool.h> header file. */
121#define HAVE_LINUX_ETHTOOL_H 1
122
123/* Define if you have the <linux/sockios.h> header file. */
124#define HAVE_LINUX_SOCKIOS_H 1
125
126/* Define if you have the <linux/if_tun.h> header file. */
127#define HAVE_LINUX_IF_TUN_H 1
128
129/* Define if you have the <linux/if_packet.h> header file. */
130#define HAVE_LINUX_IF_PACKET_H 1
131
132/* Define if you have the <linux/netlink.h> header file. */
133#define HAVE_LINUX_NETLINK_H 1
134
135/* Define if you have the madvise function. */
136#define HAVE_MADVISE 1
137
138/* Define if you have the mmap function. */
139#define HAVE_MMAP 1
140
141/* Define if you have the <net/bpf.h> header file. */
142/* #undef HAVE_NET_BPF_H */
143
144/* Define if you have the <net/if_dl.h> header file. */
145/* #undef HAVE_NET_IF_DL_H */
146
147/* Define if you have the <net/if_tap.h> header file. */
148/* #undef HAVE_NET_IF_TAP_H */
149
150/* Define if you have the <net/if_tun.h> header file. */
151/* #undef HAVE_NET_IF_TUN_H */
152
153/* Define if you have the <net/if_types.h> header file. */
154/* #undef HAVE_NET_IF_TYPES_H */
155
156/* Define if you have the <netdb.h> header file. */
157#define HAVE_NETDB_H 1
158
159/* Define if you have the <netpacket/packet.h> header file. */
160#define HAVE_NETPACKET_PACKET_H 1
161
162/* Define if <new.h> exists and works. */
163/* #undef HAVE_NEW_H */
164
165/* Define if <new> exists and works. */
166#define HAVE_NEW_HDR 1
167
168/* Define if you have the <numa.h> header file. */
169/* #undef HAVE_NUMA */
170
171/* Define if you have -lpcap and pcap.h. */
172/* #undef HAVE_PCAP */
173
174/* Define if you have the pcap_inject function. */
175/* #undef HAVE_PCAP_INJECT */
176
177/* Define if you have the pcap_sendpacket function. */
178/* #undef HAVE_PCAP_SENDPACKET */
179
180/* Define if you have the pcap_setdirection function. */
181/* #undef HAVE_PCAP_SETDIRECTION */
182
183/* Define if you have the pcap_setnonblock function. */
184/* #undef HAVE_PCAP_SETNONBLOCK */
185
186/* Define if you have the pcap_set_immediate_mode function. */
187/* #undef HAVE_PCAP_SET_IMMEDIATE_MODE */
188
189/* Define if you have -lproper and prop.h, and proper operations should be
190 preferred to their non-proper counterparts. */
191/* #undef HAVE_PROPER */
192
193/* Define if you have a non-emulated <poll.h> header file. */
194#define HAVE_POLL_H 1
195
196/* Define if you have the pselect function. */
197#define HAVE_PSELECT 1
198
199/* Placement new is always provided below. */
200#define HAVE_PLACEMENT_NEW 1
201
202/* Define to 1 if you have the declaration
203 of 'pthread_setaffinity_np', and to 0 if you don't. */
204#define HAVE_DECL_PTHREAD_SETAFFINITY_NP 1
205
206/* Define if you have the <pwd.h> header file. */
207#define HAVE_PWD_H 1
208
209/* Define if you have the random function. */
210#define HAVE_RANDOM 1
211
212/* Define if you have the sigaction function. */
213#define HAVE_SIGACTION 1
214
215/* Define if you have simulated timing enabled. */
216/* #undef HAVE_SIMTIME */
217
218/* Define if you have the snprintf function. */
219#define HAVE_SNPRINTF 1
220
221/* Define if 'struct sockaddr_in' has a 'sin_len' member. */
222/* #undef HAVE_SOCKADDR_IN_SIN_LEN */
223
224/* Define if you have the strerror function. */
225#define HAVE_STRERROR 1
226
227/* Define if you have the <strings.h> header file. */
228#define HAVE_STRINGS_H 1
229
230/* Define if you have the strnlen function. */
231#define HAVE_STRNLEN 1
232
233/* Define if you have the strtof function. */
234#define HAVE_STRTOF 1
235
236/* Define if you have the strtold function. */
237#define HAVE_STRTOLD 1
238
239/* Define if you have the strtoul function. */
240#define HAVE_STRTOUL 1
241
242/* Define if you have the <sys/event.h> header file. */
243/* #undef HAVE_SYS_EVENT_H */
244
245/* Define if you have the <sys/mman.h> header file. */
246#define HAVE_SYS_MMAN_H 1
247
248/* Define if you have the tcgetpgrp function. */
249#define HAVE_TCGETPGRP 1
250
251/* Define if you have the <termio.h> header file. */
252#define HAVE_TERMIO_H 1
253
254/* Define if you have u_intXX_t types but not uintXX_t types. */
255/* #undef HAVE_U_INT_TYPES */
256
257/* Define if you have the <unistd.h> header file. */
258#define HAVE_UNISTD_H 1
259
260/* Define if a Click user-level driver might run multiple threads. */
261#define HAVE_USER_MULTITHREAD 1
262
263/* Define if we are using builtins atomics or Click implementation. */
264/* #undef HAVE_ATOMIC_BUILTINS */
265
266/* Define if Zero-copy is enabled. */
267#define HAVE_ZEROCOPY 1
268
269/* Define if Flow sloppy timeout is enabled. */
270/* #undef HAVE_CTX_GLOBAL_TIMEOUT */
271
272/* Enable dynamic flow system */
273/* #undef HAVE_FLOW_DYNAMIC */
274
275/* Define if use atomic use count */
276#define FLOW_ATOMIC_USE_COUNT 1
277
278/* Define if flow nodes should be released. */
279#define FLOW_KEEP_STRUCTURE 1
280
281/* Define if flow hash mode. */
282#define FLOW_HASH_RELEASE 1
283
284/* Define if Netmap support is enabled. */
285/* #undef HAVE_NETMAP */
286
287/* Define if you use only netmap buffer as data buffer. */
288/* #undef HAVE_NETMAP_PACKET_POOL */
289
290/* Define if a Click user-level driver uses Intel DPDK. */
291/* #undef HAVE_DPDK */
292
293/* Define if you use only DPDK buffer as data buffer. */
294/* #undef HAVE_DPDK_PACKET_POOL */
295
296/* Define if DPDK has the read_clock function. */
297/* #undef HAVE_DPDK_READ_CLOCK */
298
299/* Define if DPDK has the rte_flow_update function. */
300/* #undef HAVE_RTE_FLOW_UPDATE */
301
302/* Define if DPDK have XCHG API. */
303/* #undef HAVE_DPDK_XCHG */
304
305/* Define if LLVM libraries are available. */
306/* #undef HAVE_LLVM */
307
308/* Define if optimizations for pool_prepare_data_burst is not disabled */
309#define POOL_INLINING 1
310
311/* Define if AllAnno struct is inlined within Packet Class */
312/* #undef INLINED_ALLANNO */
313
314/* Define if DPDK software queue for TX is enabled. */
315#define HAVE_IQUEUE 1
316
317/* Define if a Click user-level driver manages Intel DPDK packet pools. */
318/* #undef CLICK_PACKET_USE_DPDK */
319
320/* Define if a Click packet is inside DPDK packet. */
321/* #undef CLICK_PACKET_INSIDE_DPDK */
322
323/* Define if Click should use Valgrind client requests. */
324/* #undef HAVE_VALGRIND */
325
326/* Define if you have the <valgrind/memcheck.h> header file. */
327/* #undef HAVE_VALGRIND_MEMCHECK_H */
328
329/* Define to 1 to enable poisoning of freed HashAllocator blocks. */
330/* #undef HAVE_HASH_ALLOCATOR_POISONING */
331
332/* Define if you have the vsnprintf function. */
333#define HAVE_VSNPRINTF 1
334
335/* The size of a `click_jiffies_t', as computed by sizeof. */
336#define SIZEOF_CLICK_JIFFIES_T SIZEOF_LONG
337
338/* The size of a `off_t', as computed by sizeof. */
339#define SIZEOF_OFF_T 8
340
341
342/* Set feature test macros before anything is included. */
343#if HAVE_LARGE_FILE_SUPPORT && HAVE_INT64_TYPES
344# if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS != 64
345# error "bad _FILE_OFFSET_BITS, did you #include <click/config.h> first?"
346# endif
347# define _LARGEFILE_SOURCE 1
348# define _FILE_OFFSET_BITS 64
349#endif
350#ifdef __APPLE__
351# define _DARWIN_UNLIMITED_SELECT 1
352#endif
353
354/* Include integer type definitions. */
355#ifdef HAVE_INTTYPES_H
356# ifndef __STDC_FORMAT_MACROS
357# define __STDC_FORMAT_MACROS
358# endif
359# include <inttypes.h>
360#endif
361#include <sys/types.h>
362
363/* Define uint types in terms of u_int types, if necessary. */
364#ifdef HAVE_U_INT_TYPES
365typedef u_int8_t uint8_t;
366typedef u_int16_t uint16_t;
367typedef u_int32_t uint32_t;
368# ifdef HAVE_INT64_TYPES
369typedef u_int64_t uint64_t;
370# endif
371typedef long intptr_t; /* XXX? */
372typedef unsigned long uintptr_t;
373#endif
374
375/* Define HAVE_INT64_IS_LONG based on HAVE_INT64_IS_LONG_USERLEVEL. */
376#ifdef HAVE_INT64_IS_LONG_USERLEVEL
377# define HAVE_INT64_IS_LONG HAVE_INT64_IS_LONG_USERLEVEL
378#endif
379
380/* Define HAVE_INT64_IS_LONG_LONG based on HAVE_INT64_IS_LONG_LONG_USERLEVEL. */
381#ifdef HAVE_INT64_IS_LONG_LONG_USERLEVEL
382# define HAVE_INT64_IS_LONG_LONG HAVE_INT64_IS_LONG_LONG_USERLEVEL
383#endif
384
385/* If 64-bit integers exist, then 64-bit divide exists. */
386#ifdef HAVE_INT64_TYPES
387# define HAVE_INT64_DIVIDE 1
388#endif
389
390/* Define HAVE_MULTITHREAD based on HAVE_USER_MULTITHREAD. */
391#ifdef HAVE_USER_MULTITHREAD
392# define HAVE_MULTITHREAD HAVE_USER_MULTITHREAD
393#endif
394
395/* Define HAVE_ATOMIC_BUILTINS based on HAVE_ATOMIC_BUILTINS. */
396#ifdef HAVE_ATOMIC_BUILTINS
397#if __GNUC__ > 4 || \
398 (__GNUC__ == 4 && (__GNUC_MINOR__ > 7 || \
399 (__GNUC_MINOR__ == 7 && \
400 __GNUC_PATCHLEVEL__ > 0)))
401
402 # define HAVE_ATOMIC_BUILTINS 1
403#else
404 # error "Cannot enable atomic builtins! GCC must be >= 4.7.0"
405 # define HAVE_ATOMIC_BUILTINS 0
406#endif
407#endif
408
409
410/* Define HAVE_USE_CLOCK_GETTIME if the clock_gettime function is usable. */
411#ifndef HAVE_USE_CLOCK_GETTIME
412# if HAVE_DECL_CLOCK_GETTIME && HAVE_CLOCK_GETTIME
413# define HAVE_USE_CLOCK_GETTIME 1
414# endif
415#endif
416
417/* Include assert macro. */
418#include <assert.h>
419
420/* Define likely and unlikely macros. */
421#if __GNUC__ >= 3
422# define likely(x) __builtin_expect(!!(x), 1)
423# define unlikely(x) __builtin_expect(!!(x), 0)
424#else
425# define likely(x) (x)
426# define unlikely(x) (x)
427#endif
428
429/* Define if mmap is allowed. */
430#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MMAP) && !CLICK_PACKET_USE_DPDK
431# define ALLOW_MMAP 1
432#endif
433
434/* Prototype strerror if we don't have it. */
435#ifndef HAVE_STRERROR
436char *strerror(int errno);
437#endif
438
439/* Use nanosecond-granularity timestamps if they are enabled. */
440#if HAVE_NANOTIMESTAMP_ENABLED
441# define TIMESTAMP_NANOSEC 1
442# define HAVE_NANOTIMESTAMP 1 /* Deprecated */
443#endif
444
445#ifdef __cplusplus
446
447/* Provide placement new. */
448#if HAVE_NEW_HDR
449# include <new>
450#elif HAVE_NEW_H
451# include <new.h>
452#else
453inline void *operator new(size_t, void *v) { return v; }
454#endif
455
456/* Prototype madvise if we have it, but not the prototype. */
457#if ALLOW_MMAP && HAVE_MADVISE && !HAVE_DECL_MADVISE
458extern "C" int madvise(void *addr, size_t len, int behav);
459#endif
460
461/* Define macros that surround Click declarations. */
462#ifndef CLICK_DECLS
463# define CLICK_DECLS /* */
464# define CLICK_ENDDECLS /* */
465# define CLICK_USING_DECLS /* */
466# define CLICK_NAME(name) ::name
467#endif
468
469#endif /* __cplusplus */
470
471#endif /* CLICK_CONFIG_USERLEVEL_H */