1 /**********************************************************
2 SixXS - Automatic IPv6 Connectivity Configuration Utility
3 ***********************************************************
4 Copyright 2003-2005 SixXS - http://www.sixxs.net
5 ***********************************************************
6 common/aiccu.h - Abstracted Functions and Configuration
7 All compile-time configurable items are in this file
8 ***********************************************************
10 $Id: aiccu.h,v 1.23 2007-01-15 12:01:43 jeroen Exp $
11 $Date: 2007-01-15 12:01:43 $
12 **********************************************************/
15 #define AICCU_H "H5K7:W3NDY5UU5N1K1N1C0l3"
19 #include "heartbeat.h"
31 #define AICCU_VER "2007.01.15"
32 #define AICCU_VERSION_NUM 2007,01,15,0
33 /* _NUM = required for Windows Resources */
36 #define AICCU_TYPE "win32"
39 /* Append -gui or -console? */
42 #define AICCU_VERSION AICCU_VER "-gui-" AICCU_TYPE
44 #define AICCU_VERSION AICCU_VER "-gui"
48 #define AICCU_VERSION AICCU_VER "-console-" AICCU_TYPE
50 #define AICCU_VERSION AICCU_VER "-console"
55 #define TIC_CLIENT_NAME "AICCU"
56 #define TIC_CLIENT_VERSION AICCU_VERSION
59 #define TSP_CLIENT_NAME TIC_CLIENT_NAME
60 #define TSP_CLIENT_VERSION TIC_CLIENT_VERSION
63 * AICCU configuration Cache
64 * allows reconnects even when we don't update
65 * the data. Could be useful in the event
66 * where we can't make contact to the main server
68 #define AICCU_CACHE "/var/cache/aiccu.cache"
70 /* The PID we are running as when daemonized */
71 #define AICCU_PID "/var/run/aiccu.pid"
73 /* AICCU Configuration file */
75 /* GetWindowsDirectory() is used to figure out the directory to store the config */
76 #define AICCU_CONFIG "aiccu.conf"
78 #define AICCU_CONFIG "/etc/aiccu.conf"
81 /* Inbound listen queue */
82 #define LISTEN_QUEUE 128
88 #define UNUSED __attribute__ ((__unused__))
92 /* AICCU Configuration */
96 char *username
; /* Username */
97 char *password
; /* Password */
98 char *protocol
; /* TIC/TSP/L2TP */
99 char *server
; /* TIC/TSP etc server */
100 char *ipv6_interface
; /* IPv6 interface (tunnel interface: sit0, tun0 etc) */
101 char *tunnel_id
; /* ID of the tunnel to use */
102 char *local_ipv4_override
; /* Local IPv4 override, for behind-NAT scenario's */
103 char *setupscript
; /* Script to run after having set up the tunnel */
104 char *pidfile
; /* File to store the PID */
106 /* used by other parts */
108 struct TIC_conf
*tic
; /* TIC Structure */
110 struct TSP_conf
*tsp
; /* TSP Structure */
114 gnutls_certificate_credentials tls_cred
; /* GNUTLS credentials */
117 bool daemonize
; /* Daemonize? */
118 bool verbose
; /* Verbosity */
119 bool running
; /* Still running? */
120 bool tunrunning
; /* Is the tundev running? */
122 bool automatic
; /* Try to be totally automatic? */
123 bool behindnat
; /* Behind a NAT */
124 bool requiretls
; /* Require TLS for TIC? */
125 bool makebeats
; /* Make heartbeats? */
126 bool noconfigure
; /* No configuration (used to only send heartbeats) */
127 bool defaultroute
; /* Configure a default route */
130 /* Global configuration */
131 extern struct AICCU_conf
*g_aiccu
;
133 /* AICCU Abstracted Functions */
134 bool aiccu_InitConfig(void);
135 bool aiccu_LoadConfig(const char *filename
);
136 bool aiccu_SaveConfig(const char *filename
);
137 void aiccu_FreeConfig(void);
139 void aiccu_install(void);
140 bool aiccu_setup(struct TIC_Tunnel
*hTunnel
, bool firstrun
);
141 void aiccu_beat(struct TIC_Tunnel
*hTunnel
);
142 void aiccu_reconfig(struct TIC_Tunnel
*hTunnel
);
143 void aiccu_delete(struct TIC_Tunnel
*hTunnel
);
144 void aiccu_test(struct TIC_Tunnel
*hTunnel
, bool automatic
);
145 bool aiccu_exec(const char *fmt
, ...);
146 const char *aiccu_license(void);
149 bool aiccu_os_install(void);
150 bool aiccu_os_setup(struct TIC_Tunnel
*hTunnel
);
151 void aiccu_os_reconfig(struct TIC_Tunnel
*hTunnel
);
152 void aiccu_os_delete(struct TIC_Tunnel
*hTunnel
);
153 void aiccu_os_test(struct TIC_Tunnel
*hTunnel
, bool automatic
);
156 void aiccu_win32_rename_adapter(const char *orig
);