2014-07-11 22:12:11 +02:00
|
|
|
/*
|
2014-08-23 22:15:50 +02:00
|
|
|
This file is part of AC-Tube.
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-08-23 22:15:50 +02:00
|
|
|
AC-Tube is free software: you can redistribute it and/or modify
|
2014-07-11 22:12:11 +02:00
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
2014-08-23 22:15:50 +02:00
|
|
|
AC-Tube is distributed in the hope that it will be useful,
|
2014-07-11 22:12:11 +02:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONF_H
|
|
|
|
#define __CONF_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <confuse.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#include <net/if.h>
|
|
|
|
|
|
|
|
|
2016-03-03 20:46:20 +01:00
|
|
|
#include "cw/capwap.h"
|
|
|
|
#include "cw/lwapp.h"
|
|
|
|
#include "cw/bstr.h"
|
|
|
|
#include "cw/mod.h"
|
2016-03-13 02:39:13 +01:00
|
|
|
#include "cw/vendors.h"
|
2016-02-22 18:33:47 +01:00
|
|
|
|
|
|
|
|
2018-02-25 19:12:28 +01:00
|
|
|
extern struct cw_Mod ** conf_mods;
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_ACNAME
|
2016-02-17 16:17:06 +01:00
|
|
|
#define CONF_DEFAULT_ACNAME "AC"
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
#ifndef CONF_DEFAULT_MAXWTPS
|
|
|
|
#define CONF_DEFAULT_MAXWTPS 200
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_LOGFILENAME
|
2016-02-17 16:17:06 +01:00
|
|
|
#define CONF_DEFAULT_LOGFILENAME NULL
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_CONFIGFILENAME
|
2016-02-17 16:17:06 +01:00
|
|
|
#define CONF_DEFAULT_CONFIGFILENAME "ac.conf"
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_VENDOR_ID
|
2016-02-17 16:17:06 +01:00
|
|
|
#define CONF_DEFAULT_VENDOR_ID CW_VENDOR_ID_FSF
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_SOFTWARE_VERSION
|
2016-02-17 16:17:06 +01:00
|
|
|
#define CONF_DEFAULT_SOFTWARE_VERSION "AC-Tube 0.01"
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_HARDWARE_VERSION
|
2016-02-17 16:17:06 +01:00
|
|
|
#define CONF_DEFAULT_HARDWARE_VERSION "Unknown"
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
2015-03-15 20:53:21 +01:00
|
|
|
#define CONF_DEFAULT_CISCO_HARDWARE_VERSION ".x01000001"
|
2015-03-16 21:41:33 +01:00
|
|
|
#define CONF_DEFAULT_CISCO_SOFTWARE_VERSION ".x06006E00"
|
2015-03-17 01:10:08 +01:00
|
|
|
#define CONF_DEFAULT_IMAGE_DIR "/tftpboot"
|
2015-03-15 20:53:21 +01:00
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
#ifndef CONF_DEFAULT_CONTROL_PORT
|
2018-02-23 09:17:26 +01:00
|
|
|
#define CONF_DEFAULT_CONTROL_PORT CAPWAP_CONTROL_PORT
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
2014-07-25 08:44:08 +02:00
|
|
|
#ifndef CONF_DEFAULT_LW_CONTROL_PORT
|
2016-02-17 16:17:06 +01:00
|
|
|
#define CONF_DEFAULT_LW_CONTROL_PORT LWAPP_CONTROL_PORT
|
2014-07-25 08:44:08 +02:00
|
|
|
#endif
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern const char *conf_acname;
|
|
|
|
extern char *conf_acid;
|
2014-07-11 22:12:11 +02:00
|
|
|
extern int conf_acname_len;
|
|
|
|
extern long conf_max_wtps;
|
2016-02-17 16:17:06 +01:00
|
|
|
extern char *conf_logfilename;
|
|
|
|
extern struct sockaddr_storage *conf_salist;
|
2014-07-11 22:12:11 +02:00
|
|
|
extern int conf_salist_len;
|
2014-08-23 22:15:50 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
extern long conf_vendor_id;
|
2015-03-15 20:53:21 +01:00
|
|
|
|
|
|
|
extern bstr_t conf_hardware_version;
|
|
|
|
extern bstr_t conf_software_version;
|
|
|
|
extern bstr_t conf_cisco_hardware_version;
|
|
|
|
extern bstr_t conf_cisco_software_version;
|
2014-08-23 22:15:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern char **conf_listen_addrs;
|
2014-07-11 22:12:11 +02:00
|
|
|
extern int conf_listen_addrs_len;
|
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern struct sockaddr *conf_ac_ips;
|
2014-07-11 22:12:11 +02:00
|
|
|
extern int conf_ac_ips_len;
|
|
|
|
|
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern int read_config(const char *filename);
|
2014-07-25 08:26:06 +02:00
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern char *conf_control_port;
|
2014-07-25 08:26:06 +02:00
|
|
|
#ifdef WITH_LWAPP
|
2016-02-17 16:17:06 +01:00
|
|
|
extern char *conf_lw_control_port;
|
2014-07-25 08:44:08 +02:00
|
|
|
extern int conf_lwapp;
|
2014-07-25 08:26:06 +02:00
|
|
|
#endif
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern char *conf_dtls_psk;
|
|
|
|
extern char *conf_sslcertfilename;
|
|
|
|
extern char *conf_sslkeyfilename;
|
|
|
|
extern char *conf_sslkeypass;
|
|
|
|
extern char *conf_dtls_psk;
|
2015-02-07 02:01:50 +01:00
|
|
|
extern int conf_dtls_verify_peer;
|
2016-02-17 16:17:06 +01:00
|
|
|
char *conf_sslcipher;
|
2014-08-02 07:49:59 +02:00
|
|
|
|
2015-03-17 01:10:08 +01:00
|
|
|
extern char *conf_image_dir;
|
2014-08-02 07:49:59 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern char **conf_mcast_groups;
|
2014-07-11 22:12:11 +02:00
|
|
|
extern int conf_mcast_groups_len;
|
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
extern char **conf_bcast_addrs;
|
2014-07-11 22:12:11 +02:00
|
|
|
extern int conf_bcast_addrs_len;
|
|
|
|
|
|
|
|
extern long conf_debug_level;
|
2014-07-26 20:26:56 +02:00
|
|
|
extern uint8_t conf_macaddress[12];
|
|
|
|
extern uint8_t conf_macaddress_len;
|
2015-02-07 02:01:50 +01:00
|
|
|
|
2015-04-26 15:12:44 +02:00
|
|
|
extern long conf_strict_capwap;
|
|
|
|
extern long conf_strict_headers;
|
|
|
|
extern int conf_capwap_mode;
|
2015-02-07 02:01:50 +01:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
|
|
|
|
extern int conf_parse_listen_addr(const char *addr, char *saddr, char *port, int *proto);
|
|
|
|
|
|
|
|
|
2018-02-18 21:48:42 +01:00
|
|
|
#define CFG_ENTRY_MODS "mods"
|
|
|
|
|
2016-02-17 16:17:06 +01:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|