+
+#define log_backtrace(count, max) \
+if (count++ < max) { \
+ void *array[20]; \
+ char **strings; \
+ int size, i; \
+ log(0, 0, 0, t, "Backtrace follows"); \
+ size = backtrace(array, 10); \
+ strings = backtrace_symbols(array, size); \
+ if (strings) for (i = 0; i < size; i++) \
+ { \
+ log(0, 0, 0, t, "%s\n", strings[i]); \
+ } \
+ free(strings); \
+}
+
+
+extern struct configt *config;
+extern time_t basetime; // Time when this process started.
+extern time_t time_now; // Seconds since EPOCH.
+extern u32 last_id;
+extern struct Tstats *_statistics;
+extern ipt my_address;
+extern int tun_write(u8 *data, int size);
+
+
+#define TIME (config->current_time)
+
+// macros for handling help in cli commands
+#define CLI_HELP_REQUESTED (argc > 0 && argv[argc-1][strlen(argv[argc-1])-1] == '?')
+#define CLI_HELP_NO_ARGS (argc > 1 || argv[0][1]) ? CLI_OK : cli_arg_help(cli, 1, NULL)
+
+// CVS identifiers (for "show version file")
+extern char const *cvs_id_arp;
+extern char const *cvs_id_cli;
+extern char const *cvs_id_cluster;
+extern char const *cvs_id_constants;
+extern char const *cvs_id_control;
+extern char const *cvs_id_icmp;
+extern char const *cvs_id_l2tpns;
+extern char const *cvs_id_ll;
+extern char const *cvs_id_md5;
+extern char const *cvs_id_ppp;
+extern char const *cvs_id_radius;
+extern char const *cvs_id_tbf;
+extern char const *cvs_id_util;
+
+#endif /* __L2TPNS_H__ */