tap = opts->tap;
queues = tap->has_queues ? tap->queues : 1;
vhostfdname = tap->has_vhostfd ? tap->vhostfd : NULL;
-#if defined(CONFIG_MARU)
- set_emul_tap_enable(true);
-#endif
/* QEMU vlans does not support multiqueue tap, in this case peer is set.
* For -netdev, peer is always NULL. */
if (peer && (tap->has_queues || tap->has_fds || tap->has_vhostfds)) {
msgproc_device_req_sensor(ccli, msg, cmd);
} else if (!strcmp(cmd, "Network")) {
if (msg->action == MSG_ACT_NETBRIDGE) {
- make_send_device_ntf(cmd, is_emul_tap_enable(), msg->action, NULL);
+ make_send_device_ntf(cmd, is_netclient_tap_attached(), msg->action, NULL);
} else {
LOG_SEVERE("unsupported action value: %d\n", msg->action);
}
return _emul_info.input_touch_enable;
}
-bool is_emul_tap_enable(void)
-{
- return _emul_info.tap_enable;
-}
-
-void set_emul_tap_enable(bool enable)
-{
- LOG_INFO("%s: %s\n", __func__, enable ? "true" : "false");
- _emul_info.tap_enable = enable;
-}
-
bool is_netclient_tap_attached(void)
{
NetClientState *ncs[MAX_QUEUE_NUM];
void set_emul_vm_base_port(int port)
{
_emul_info.vm_base_port = port;
- if (is_emul_tap_enable()) {
+ if (is_netclient_tap_attached()) {
_emul_info.device_serial_number = 26101;
} else {
_emul_info.device_serial_number = port + 1;
char http_proxy_addr[MAX_ADDR_LEN];
char http_proxy_port[MAX_PORT_LEN];
- bool tap_enable;
char guest_ip[16];
char host_ip[16];
void set_emul_rotation(short rotation_type);
void set_emul_caps_lock_state(int state);
void set_emul_num_lock_state(int state);
-void set_emul_tap_enable(bool enable);
void set_emul_hds_attached(bool attached);
void set_emul_hds_path(const char *path);
void set_emul_hds_guest_path(const char *path);
int get_emul_num_lock_state(void);
char* get_emul_guest_ip(void);
char* get_emul_host_ip(void);
-bool is_emul_tap_enable(void);
bool get_emul_hds_attached(void);
char* get_emul_hds_path(void);
}
g_strfreev(proxy);
}
- gchar const* tap_enabled = g_strdup_printf("%s=%s", OPT_USE_TAP, is_emul_tap_enable() ? "true" : "false");
+ gchar const* tap_enabled = g_strdup_printf("%s=%s", OPT_USE_TAP, is_netclient_tap_attached() ? "true" : "false");
int tap_opt_len = (int)strlen(tap_enabled);
#ifdef CONFIG_WIN32
QString sdbPort = QString::number(get_device_serial_number());
QString sdbSerialName;
- if (is_emul_tap_enable()) {
+ if (is_netclient_tap_attached()) {
sdbSerialName = QString(get_emul_guest_ip());
} else {
sdbSerialName = "emulator-" + sdbPort;
void sdb_setup(void)
{
- if (is_emul_tap_enable()) {
+ if (is_netclient_tap_attached()) {
return;
}