Line 37... |
Line 37... |
#include <sys/poll.h>
|
#include <sys/poll.h>
|
#include <fcntl.h>
|
#include <fcntl.h>
|
#include <netdb.h>
|
#include <netdb.h>
|
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
|
|
|
#include "config.h"
|
|
|
|
#ifdef HAVE_INTTYPES_H
|
|
#include <inttypes.h>
|
|
#endif
|
|
|
|
#include "port.h"
|
|
#include "arch.h"
|
#include "sim-config.h"
|
#include "sim-config.h"
|
#include "vapi.h"
|
#include "vapi.h"
|
#include "debug.h"
|
#include "debug.h"
|
|
|
static unsigned int serverIP = 0;
|
static unsigned int serverIP = 0;
|
Line 604... |
Line 612... |
usleep(1);
|
usleep(1);
|
}
|
}
|
vapi_done ();
|
vapi_done ();
|
}*/
|
}*/
|
|
|
No newline at end of file
|
No newline at end of file
|
|
/*---------------------------------------------------[ VAPI configuration ]---*/
|
|
void vapi_enabled(union param_val val, void *dat)
|
|
{
|
|
config.vapi.enabled = val.int_val;
|
|
}
|
|
|
|
void vapi_server_port(union param_val val, void *dat)
|
|
{
|
|
config.vapi.server_port = val.int_val;
|
|
}
|
|
|
|
void vapi_log_enabled(union param_val val, void *dat)
|
|
{
|
|
config.vapi.log_enabled = val.int_val;
|
|
}
|
|
|
|
void vapi_hide_device_id(union param_val val, void *dat)
|
|
{
|
|
config.vapi.hide_device_id = val.int_val;
|
|
}
|
|
|
|
void vapi_log_fn(union param_val val, void *dat)
|
|
{
|
|
strcpy(config.vapi.vapi_fn, val.str_val);
|
|
}
|
|
|
|
void reg_vapi_sec(void)
|
|
{
|
|
struct config_section *sec = reg_config_sec("VAPI", NULL, NULL);
|
|
|
|
reg_config_param(sec, "enabled", paramt_int, vapi_enabled);
|
|
reg_config_param(sec, "server_port", paramt_int, vapi_server_port);
|
|
reg_config_param(sec, "log_enabled", paramt_int, vapi_log_enabled);
|
|
reg_config_param(sec, "hide_device_id", paramt_int, vapi_hide_device_id);
|
|
reg_config_param(sec, "vapi_log_fn", paramt_str, vapi_log_fn);
|
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|