<commit_before>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <sys/socket.h>
//#include <confuse.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <net/if.h>


#include "capwap/capwap.h"
#include "capwap/log.h"
#include "capwap/dbg.h"

#include "capwap/cw_util.h"

#include "wtp_conf.h"


#include "capwap/sock.h"
#include "capwap/log.h"

#include "capwap/bstr.h"


char * conf_primary_if=0;
char * conf_wtpname=0;
char * conf_dtls_psk=0;
char * conf_sslkeyfilename=0;
char * conf_sslcertfilename=0;
char * conf_sslkeypass=0;


char * conf_preferred_ac=0;
char * conf_dtls_cipher=0;


struct sockaddr_storage * conf_preferred_ac_sa=0;


char ** conf_ac_list;
int conf_ac_list_len;
char * conf_control_port=0;

uint8_t conf_macaddress[12];
uint8_t conf_macaddress_len=0;

long conf_max_discovery_interval=CONF_DEFAULT_MAX_DISCOVERY_INTERVAL;
long conf_discovery_interval=CONF_DEFAULT_DISCOVERY_INTERVAL;
long conf_silent_interval=CONF_DEFAULT_SILENT_INTERVAL;
long conf_max_discoveries=CONF_DEFAULT_MAX_DISCOVERIES;
long conf_echo_interval=CONF_DEFAULT_ECHO_INTERVAL;
long conf_max_retransmit=CONF_DEFAULT_MAX_RETRANSMIT;
long conf_retransmit_interval=CONF_DEFAULT_RETRANSMIT_INTERVAL;

//long conf_dbg_level=CONF_DEFAULT_DEBUG_LEVEL;



int conf_mtu_discovery=CONF_DEFAULT_MTU_DISCOVERY;
int conf_mtu=0;


uint32_t conf_vendor_id;
uint32_t * conf_bootloader_vendor_id;
uint8_t * conf_bootloader_version;
uint32_t * conf_software_vendor_id;
uint8_t * conf_software_version;
uint32_t * conf_hardware_vendor_id;
uint8_t * conf_hardware_version;

uint8_t * conf_model_no;
uint8_t * conf_serial_no;



bstr_t conf_board_id;
bstr_t conf_board_revision;




LONGSTRS conf_timer_cfgstrs[] = {
	"max_discovery_interval",&conf_max_discovery_interval,
	"discovery_interval",&conf_discovery_interval,
	"max_discoveries",&conf_max_discoveries,
	"silent_interval",&conf_silent_interval,
	0,0
};


int wtpconf_primary_if()
{
<commit_msg>Cleaning.<commit_after>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <sys/socket.h>
//#include <confuse.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <net/if.h>


#include "capwap/capwap.h"
#include "capwap/log.h"
#include "capwap/dbg.h"

#include "capwap/cw_util.h"

#include "wtp_conf.h"


#include "capwap/sock.h"
#include "capwap/log.h"

#include "capwap/bstr.h"


char * conf_primary_if=0;
char * conf_wtpname=0;
char * conf_dtls_psk=0;
char * conf_sslkeyfilename=0;
char * conf_sslcertfilename=0;
char * conf_sslkeypass=0;


char * conf_preferred_ac=0;
char * conf_dtls_cipher=0;


struct sockaddr_storage * conf_preferred_ac_sa=0;


char ** conf_ac_list;
int conf_ac_list_len;
char * conf_control_port=0;

uint8_t conf_macaddress[12];
uint8_t conf_macaddress_len=0;

long conf_max_discovery_interval=CONF_DEFAULT_MAX_DISCOVERY_INTERVAL;
long conf_discovery_interval=CONF_DEFAULT_DISCOVERY_INTERVAL;
long conf_silent_interval=CONF_DEFAULT_SILENT_INTERVAL;
long conf_max_discoveries=CONF_DEFAULT_MAX_DISCOVERIES;
long conf_echo_interval=CONF_DEFAULT_ECHO_INTERVAL;
long conf_max_retransmit=CONF_DEFAULT_MAX_RETRANSMIT;
long conf_retransmit_interval=CONF_DEFAULT_RETRANSMIT_INTERVAL;

//long conf_dbg_level=CONF_DEFAULT_DEBUG_LEVEL;



int conf_mtu_discovery=CONF_DEFAULT_MTU_DISCOVERY;
int conf_mtu=0;


uint32_t conf_vendor_id;
uint32_t * conf_bootloader_vendor_id;
uint8_t * conf_bootloader_version;
uint32_t * conf_software_vendor_id;
uint8_t * conf_software_version;
uint32_t * conf_hardware_vendor_id;
uint8_t * conf_hardware_version;

uint8_t * conf_model_no;
uint8_t * conf_serial_no;



bstr_t conf_board_id;
bstr_t conf_board_revision;




LONGSTRS conf_timer_cfgstrs[] = {
	{"max_discovery_interval",&conf_max_discovery_interval},
	{"discovery_interval",&conf_discovery_interval},
	{"max_discoveries",&conf_max_discoveries},
	{"silent_interval",&conf_silent_interval},
	{0,0}
};


int wtpconf_primary_if()
{

{'fraction_non_alphanumeric': 0.10091047040971168, 'fraction_numerical': 0.01568032372281234, 'mean_word_length': 8.416666666666666, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '68053', 'n_tokens_mistral': 1690, 'n_tokens_neox': 1627, 'n_words': 230}