2014-07-11 22:12:11 +02:00
|
|
|
#ifndef __WTP_CONF_H
|
|
|
|
#define __WTP_CONF_H
|
|
|
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
2016-03-03 19:51:42 +01:00
|
|
|
#include "cw/capwap.h"
|
|
|
|
#include "cw/bstr.h"
|
2015-03-14 21:41:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
extern int read_config(const char * filename);
|
|
|
|
extern char * conf_wtpname;
|
|
|
|
extern char * conf_dtls_psk;
|
2014-08-02 10:54:18 +02:00
|
|
|
extern char * conf_sslkeyfilename;
|
|
|
|
extern char * conf_sslcertfilename;
|
|
|
|
extern char * conf_sslkeypass;
|
|
|
|
|
|
|
|
|
2015-02-01 16:55:45 +01:00
|
|
|
extern uint32_t conf_vendor_id;
|
|
|
|
extern uint32_t * conf_bootloader_vendor_id;
|
|
|
|
extern uint8_t * conf_bootloader_version;
|
|
|
|
extern uint32_t * conf_software_vendor_id;
|
|
|
|
extern uint8_t * conf_software_version;
|
|
|
|
extern uint32_t * conf_hardware_vendor_id;
|
|
|
|
extern uint8_t * conf_hardware_version;
|
|
|
|
|
|
|
|
extern uint8_t * conf_model_no;
|
2015-03-12 23:21:57 +01:00
|
|
|
extern uint8_t * conf_serial_no;
|
2014-08-02 10:54:18 +02:00
|
|
|
|
|
|
|
|
2015-03-14 21:41:50 +01:00
|
|
|
extern bstr_t conf_board_id;
|
|
|
|
extern bstr_t conf_board_revision;
|
|
|
|
|
2014-08-02 10:54:18 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
extern struct sockaddr_storage * conf_preffered_ac_sa;
|
|
|
|
extern char * conf_primary_if;
|
2016-03-31 07:52:15 +02:00
|
|
|
extern char * conf_ip;
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
extern char ** conf_ac_list;
|
|
|
|
|
|
|
|
extern int conf_ac_list_len;
|
|
|
|
extern char * conf_control_port;
|
|
|
|
|
|
|
|
extern uint8_t conf_macaddress[12];
|
|
|
|
extern uint8_t conf_macaddress_len;
|
|
|
|
|
|
|
|
|
2015-02-01 16:55:45 +01:00
|
|
|
#ifndef CONF_DEFAULT_VENDOR_ID
|
|
|
|
#define CONF_DEFAULT_VENDOR_ID CW_VENDOR_ID_FSF
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_HARDWARE_VENDOR_ID
|
|
|
|
#define CONF_DEFAULT_HARDWARE_VENDOR_ID CW_VENDOR_ID_FSF
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_SOFTWARE_VENDOR_ID
|
|
|
|
#define CONF_DEFAULT_SOFTWARE_VENDOR_ID CW_VENDOR_ID_FSF
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_BOOTLOADER_VENDOR_ID
|
|
|
|
#define CONF_DEFAULT_BOOTLOADER_VENDOR_ID CW_VENDOR_ID_FSF
|
|
|
|
#endif
|
|
|
|
|
2015-03-17 09:33:49 +01:00
|
|
|
#ifndef CONF_DEFAULT_BOOTLOADER_VERSION
|
|
|
|
#define CONF_DEFAULT_BOOTLOADER_VERSION "W-FAT-BL-0.1"
|
|
|
|
#endif
|
|
|
|
|
2015-02-01 16:55:45 +01:00
|
|
|
#ifndef CONF_DEFAULT_MODEL_NO
|
|
|
|
#define CONF_DEFAULT_MODEL_NO "W-FAT"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_SERIAL_NO
|
|
|
|
#define CONF_DEFAULT_SERIAL_NO "0000"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_SOFTWARE_VERSION
|
|
|
|
#define CONF_DEFAULT_SOFTWARE_VERSION "0.1"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_HARDWARE_VERSION
|
|
|
|
#define CONF_DEFAULT_HARDWARE_VERSION "0.1"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2015-03-14 21:41:50 +01:00
|
|
|
#ifndef CONF_DEFAULT_BOARD_ID
|
|
|
|
#define CONF_DEFAULT_BOARD_ID "00"
|
|
|
|
#endif
|
2015-02-01 16:55:45 +01:00
|
|
|
|
2015-03-14 21:41:50 +01:00
|
|
|
#ifndef CONF_DEFAULT_BOARD_REVISION
|
|
|
|
#define CONF_DEFAULT_BOARD_REVISION "00"
|
|
|
|
#endif
|
2015-02-01 16:55:45 +01:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_MAX_DISCOVERY_INTERVAL
|
2018-03-30 19:45:27 +02:00
|
|
|
#define CONF_DEFAULT_MAX_DISCOVERY_INTERVAL CAPWAP_MAX_DISCOVERY_INTERVAL
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_SILENT_INTERVAL
|
|
|
|
#define CONF_DEFAULT_SILENT_INTERVAL CAPWAP_SILENT_INTERVAL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_DISCOVERY_INTERVAL
|
2018-03-30 19:45:27 +02:00
|
|
|
#define CONF_DEFAULT_DISCOVERY_INTERVAL CAPWAP_DISCOVERY_INTERVAL
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_MAX_DISCOVERIES
|
|
|
|
#define CONF_DEFAULT_MAX_DISCOVERIES CAPWAP_MAX_DISCOVERIES
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef CONF_DEFAULT_DTLS_CIPHER
|
|
|
|
#define CONF_DEFAULT_DTLS_CIPHER CAPWAP_CIPHER
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CONF_DEFAULT_ECHO_INTERVAL CAPWAP_ECHO_INTERVAL
|
|
|
|
#define CONF_DEFAULT_MAX_RETRANSMIT CAPWAP_MAX_RETRANSMIT
|
|
|
|
#define CONF_DEFAULT_RETRANSMIT_INTERVAL CAPWAP_RETRANSMIT_INTERVAL
|
|
|
|
|
2015-02-03 08:19:29 +01:00
|
|
|
#define CONF_DEFAULT_DEBUG_LEVEL 0
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-01-18 21:00:54 +01:00
|
|
|
#define CONF_DEFAULT_MTU_DISCOVERY 1
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
extern long conf_max_discovery_interval;
|
|
|
|
extern long conf_discovery_interval;
|
|
|
|
extern long conf_silent_interval;
|
|
|
|
extern long conf_max_discoveries;
|
|
|
|
extern char * conf_dtls_cipher;
|
|
|
|
extern long conf_echo_interval;
|
|
|
|
extern long conf_max_retransmit;
|
|
|
|
extern long conf_retransmit_interval;
|
|
|
|
|
2018-03-30 11:12:50 +02:00
|
|
|
|
2015-01-18 20:34:47 +01:00
|
|
|
extern int conf_mtu_discovery;
|
|
|
|
extern int conf_mtu;
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-02-08 21:07:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const char *name;
|
|
|
|
long *value;
|
|
|
|
}LONGSTRS;
|
|
|
|
extern LONGSTRS conf_timer_cfgstrs[];
|
|
|
|
|
|
|
|
|
2015-04-07 07:42:36 +02:00
|
|
|
int wtpconf_preinit();
|
|
|
|
int wtpconf_init();
|
2015-02-08 21:07:55 +01:00
|
|
|
|
|
|
|
|
2016-03-05 14:12:49 +01:00
|
|
|
#define WTP_DEFAULT_NAME_PREFIX "WFAT-"
|
|
|
|
#define WTP_DEFAULT_LOCATION_DATA "Superposition"
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
#endif
|