1/* Process this file with configure to produce config-userlevel.h. -*- mode: c -*- */
2#ifndef CLICK_CONFIG_USERLEVEL_H
3#define CLICK_CONFIG_USERLEVEL_H
4
5/* Define if you have the __thread storage class specifier. */
6#undef HAVE___THREAD_STORAGE_CLASS
7
8/* Define if accept() uses socklen_t. */
9#undef HAVE_ACCEPT_SOCKLEN_T
10
11/* Define if kqueue() may be used to wait for file descriptor events. */
12#undef HAVE_ALLOW_KQUEUE
13
14/* Define if poll() may be used to wait for file descriptor events. */
15#undef HAVE_ALLOW_POLL
16
17/* Define if select() may be used to wait for file descriptor events. */
18#undef HAVE_ALLOW_SELECT
19
20/* Define if <pcap.h> uses bpf_timeval. */
21#undef HAVE_BPF_TIMEVAL
22
23/* Define if you have the <byteswap.h> header file. */
24#undef HAVE_BYTESWAP_H
25
26/* Define if you have the clock_gettime function. */
27#undef HAVE_CLOCK_GETTIME
28
29/* Define to 1 if you have the declaration
30   of 'clock_gettime', and to 0 if you don't. */
31#undef HAVE_DECL_CLOCK_GETTIME
32
33/* Define to 1 if you have the declaration
34   of 'madvise', and to 0 if you don't. */
35#undef HAVE_DECL_MADVISE
36
37/* Define to 1 if you have the declaration
38   of 'pcap_setnonblock', and to 0 if you don't. */
39#undef HAVE_DECL_PCAP_SETNONBLOCK
40
41/* Define if you have the <dlfcn.h> header file. */
42#undef HAVE_DLFCN_H
43
44/* Define if dynamic linking is possible. */
45#undef HAVE_DYNAMIC_LINKING
46
47/* Define if you have the <execinfo.h> header file. */
48#undef HAVE_EXECINFO_H
49
50/* Define if you have the ffs function. */
51#undef HAVE_FFS
52
53/* Define if you have the ffsl function. */
54#undef HAVE_FFSL
55
56/* Define if you have the ffsll function. */
57#undef HAVE_FFSLL
58
59/* Floating point arithmetic is allowed. */
60#define HAVE_FLOAT_TYPES 1
61
62/* Define if you have the <grp.h> header file. */
63#undef HAVE_GRP_H
64
65/* Define if the last argument to EV_SET has pointer type. */
66#undef HAVE_EV_SET_UDATA_POINTER
67
68/* Define if 'struct if_data' has an 'ifi_datalen' member. */
69#undef HAVE_IF_DATA_IFI_DATALEN
70
71/* Define if you have the <ifaddrs.h> header file. */
72#undef HAVE_IFADDRS_H
73
74/* Define if 'int64_t' is typedefed to 'long' at user level. */
75#undef HAVE_INT64_IS_LONG_USERLEVEL
76
77/* Define if 'int64_t' is typedefed to 'long long' at user level. */
78#undef HAVE_INT64_IS_LONG_LONG_USERLEVEL
79
80/* Define if you have the <inttypes.h> header file. */
81#undef HAVE_INTTYPES_H
82
83/* Define if you have the kqueue function. */
84#undef HAVE_KQUEUE
85
86/* Define if your C library contains large file support. */
87#undef HAVE_LARGE_FILE_SUPPORT
88
89/* Define if you have the <linux/if_tun.h> header file. */
90#undef HAVE_LINUX_IF_TUN_H
91
92/* Define if you have the madvise function. */
93#undef HAVE_MADVISE
94
95/* Define if you have the mmap function. */
96#undef HAVE_MMAP
97
98/* Define if you have the <net/bpf.h> header file. */
99#undef HAVE_NET_BPF_H
100
101/* Define if you have the <net/if_dl.h> header file. */
102#undef HAVE_NET_IF_DL_H
103
104/* Define if you have the <net/if_tap.h> header file. */
105#undef HAVE_NET_IF_TAP_H
106
107/* Define if you have the <net/if_tun.h> header file. */
108#undef HAVE_NET_IF_TUN_H
109
110/* Define if you have the <net/if_types.h> header file. */
111#undef HAVE_NET_IF_TYPES_H
112
113/* Define if you have the <netdb.h> header file. */
114#undef HAVE_NETDB_H
115
116/* Define if you have the <net/netmap.h> header file. */
117#undef HAVE_NET_NETMAP_H
118
119/* Define if you have the <netpacket/packet.h> header file. */
120#undef HAVE_NETPACKET_PACKET_H
121
122/* Define if <new.h> exists and works. */
123#undef HAVE_NEW_H
124
125/* Define if <new> exists and works. */
126#undef HAVE_NEW_HDR
127
128/* Define if you have -lpcap and pcap.h. */
129#undef HAVE_PCAP
130
131/* Define if you have the pcap_inject function. */
132#undef HAVE_PCAP_INJECT
133
134/* Define if you have the pcap_sendpacket function. */
135#undef HAVE_PCAP_SENDPACKET
136
137/* Define if you have the pcap_setdirection function. */
138#undef HAVE_PCAP_SETDIRECTION
139
140/* Define if you have the pcap_setnonblock function. */
141#undef HAVE_PCAP_SETNONBLOCK
142
143/* Define if you have the pcap_set_immediate_mode function. */
144#undef HAVE_PCAP_SET_IMMEDIATE_MODE
145
146/* Define if you have -lproper and prop.h, and proper operations should be
147   preferred to their non-proper counterparts. */
148#undef HAVE_PROPER
149
150/* Define if you have a non-emulated <poll.h> header file. */
151#undef HAVE_POLL_H
152
153/* Define if you have the pselect function. */
154#undef HAVE_PSELECT
155
156/* Placement new is always provided below. */
157#define HAVE_PLACEMENT_NEW 1
158
159/* Define to 1 if you have the declaration
160   of 'pthread_setaffinity_np', and to 0 if you don't. */
161#undef HAVE_DECL_PTHREAD_SETAFFINITY_NP
162
163/* Define if you have the <pwd.h> header file. */
164#undef HAVE_PWD_H
165
166/* Define if you have the random function. */
167#undef HAVE_RANDOM
168
169/* Define if you have the sigaction function. */
170#undef HAVE_SIGACTION
171
172/* Define if you have the snprintf function. */
173#undef HAVE_SNPRINTF
174
175/* Define if 'struct sockaddr_in' has a 'sin_len' member. */
176#undef HAVE_SOCKADDR_IN_SIN_LEN
177
178/* Define if you have the strerror function. */
179#undef HAVE_STRERROR
180
181/* Define if you have the <strings.h> header file. */
182#undef HAVE_STRINGS_H
183
184/* Define if you have the strnlen function. */
185#undef HAVE_STRNLEN
186
187/* Define if you have the strtof function. */
188#undef HAVE_STRTOF
189
190/* Define if you have the strtold function. */
191#undef HAVE_STRTOLD
192
193/* Define if you have the strtoul function. */
194#undef HAVE_STRTOUL
195
196/* Define if you have the <sys/event.h> header file. */
197#undef HAVE_SYS_EVENT_H
198
199/* Define if you have the <sys/mman.h> header file. */
200#undef HAVE_SYS_MMAN_H
201
202/* Define if you have the tcgetpgrp function. */
203#undef HAVE_TCGETPGRP
204
205/* Define if you have the <termio.h> header file. */
206#undef HAVE_TERMIO_H
207
208/* Define if you have u_intXX_t types but not uintXX_t types. */
209#undef HAVE_U_INT_TYPES
210
211/* Define if you have the <unistd.h> header file. */
212#undef HAVE_UNISTD_H
213
214/* Define if a Click user-level driver might run multiple threads. */
215#undef HAVE_USER_MULTITHREAD
216
217/* Define if a Click user-level driver uses Intel DPDK. */
218#undef HAVE_DPDK
219
220/* Define if Click should use Valgrind client requests. */
221#undef HAVE_VALGRIND
222
223/* Define if you have the <valgrind/memcheck.h> header file. */
224#undef HAVE_VALGRIND_MEMCHECK_H
225
226/* Define if you have the vsnprintf function. */
227#undef HAVE_VSNPRINTF
228
229/* The size of a `click_jiffies_t', as computed by sizeof. */
230#define SIZEOF_CLICK_JIFFIES_T SIZEOF_INT
231
232/* The size of a `off_t', as computed by sizeof. */
233#undef SIZEOF_OFF_T
234
235
236/* Set feature test macros before anything is included. */
237#if HAVE_LARGE_FILE_SUPPORT && HAVE_INT64_TYPES
238# if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS != 64
239#  error "bad _FILE_OFFSET_BITS, did you #include <click/config.h> first?"
240# endif
241# define _LARGEFILE_SOURCE 1
242# define _FILE_OFFSET_BITS 64
243#endif
244#ifdef __APPLE__
245# define _DARWIN_UNLIMITED_SELECT 1
246#endif
247
248/* Include integer type definitions. */
249#ifdef HAVE_INTTYPES_H
250# include <inttypes.h>
251#endif
252#include <sys/types.h>
253
254/* Define uint types in terms of u_int types, if necessary. */
255#ifdef HAVE_U_INT_TYPES
256typedef u_int8_t uint8_t;
257typedef u_int16_t uint16_t;
258typedef u_int32_t uint32_t;
259# ifdef HAVE_INT64_TYPES
260typedef u_int64_t uint64_t;
261# endif
262typedef long intptr_t;		/* XXX? */
263typedef unsigned long uintptr_t;
264#endif
265
266/* Define HAVE_INT64_IS_LONG based on HAVE_INT64_IS_LONG_USERLEVEL. */
267#ifdef HAVE_INT64_IS_LONG_USERLEVEL
268# define HAVE_INT64_IS_LONG HAVE_INT64_IS_LONG_USERLEVEL
269#endif
270
271/* Define HAVE_INT64_IS_LONG_LONG based on HAVE_INT64_IS_LONG_LONG_USERLEVEL. */
272#ifdef HAVE_INT64_IS_LONG_LONG_USERLEVEL
273# define HAVE_INT64_IS_LONG_LONG HAVE_INT64_IS_LONG_LONG_USERLEVEL
274#endif
275
276/* If 64-bit integers exist, then 64-bit divide exists. */
277#ifdef HAVE_INT64_TYPES
278# define HAVE_INT64_DIVIDE 1
279#endif
280
281/* Define HAVE_MULTITHREAD based on HAVE_USER_MULTITHREAD. */
282#ifdef HAVE_USER_MULTITHREAD
283# define HAVE_MULTITHREAD HAVE_USER_MULTITHREAD
284#endif
285
286/* Define HAVE_USE_CLOCK_GETTIME if the clock_gettime function is usable. */
287#ifndef HAVE_USE_CLOCK_GETTIME
288# if HAVE_DECL_CLOCK_GETTIME && HAVE_CLOCK_GETTIME
289#  define HAVE_USE_CLOCK_GETTIME 1
290# endif
291#endif
292
293/* Include assert macro. */
294#include <assert.h>
295
296/* Define likely and unlikely macros. */
297#if __GNUC__ >= 3
298# define likely(x)	__builtin_expect(!!(x), 1)
299# define unlikely(x)	__builtin_expect(!!(x), 0)
300#else
301# define likely(x)	(x)
302# define unlikely(x)	(x)
303#endif
304
305/* Define if mmap is allowed. */
306#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MMAP)
307# define ALLOW_MMAP 1
308#endif
309
310/* Prototype strerror if we don't have it. */
311#ifndef HAVE_STRERROR
312char *strerror(int errno);
313#endif
314
315/* Use nanosecond-granularity timestamps if they are enabled. */
316#if HAVE_NANOTIMESTAMP_ENABLED
317# define TIMESTAMP_NANOSEC 1
318# define HAVE_NANOTIMESTAMP 1	/* Deprecated */
319#endif
320
321#ifdef __cplusplus
322
323/* Provide placement new. */
324#if HAVE_NEW_HDR
325# include <new>
326#elif HAVE_NEW_H
327# include <new.h>
328#else
329inline void *operator new(size_t, void *v) { return v; }
330#endif
331
332/* Prototype madvise if we have it, but not the prototype. */
333#if ALLOW_MMAP && HAVE_MADVISE && !HAVE_DECL_MADVISE
334extern "C" int madvise(void *addr, size_t len, int behav);
335#endif
336
337/* Define macros that surround Click declarations. */
338#ifndef CLICK_DECLS
339# define CLICK_DECLS		/* */
340# define CLICK_ENDDECLS		/* */
341# define CLICK_USING_DECLS	/* */
342# define CLICK_NAME(name)	::name
343#endif
344
345#endif /* __cplusplus */
346
347#endif /* CLICK_CONFIG_USERLEVEL_H */
348