#include "net/tap.h"
#include "net/vhost_net.h"
+#if defined(CONFIG_MARU)
+#include "tizen/src/emul_state.h"
+#endif
typedef struct TAPState {
NetClientState nc;
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)) {
MSG_ACT_PRESSURE = 116,
MSG_ACT_UV = 117,
MSG_ACT_HRM = 118,
- MSG_ACT_LOCATION = 120
+ MSG_ACT_LOCATION = 120,
+ MSG_ACT_NETBRIDGE = 123
};
#define TIMER_ALIVE_S 60
if (!strcmp(cmd, MSG_TYPE_SENSOR)) {
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);
+ } else {
+ LOG_SEVERE("unsupported action value: %d\n", msg->action);
+ }
msgproc_device_req_network(ccli, msg);
} else if (!strcmp(cmd, "TGesture")) {
msgproc_device_req_tgesture(ccli, msg);
}
QString sdbPort = QString::number(get_device_serial_number());
- QString sdbSerialName = "emulator-" + sdbPort;
+ QString sdbSerialName;
+ if (is_emul_tap_enable()) {
+ sdbSerialName = QString(get_emul_guest_ip());
+ } else {
+ sdbSerialName = "emulator-" + sdbPort;
+ }
QString sdbPath = QCoreApplication::applicationDirPath();
#ifdef CONFIG_WIN32
arguments << "-XstartOnFirstThread";
#endif
arguments << "-jar" << ecpPath << vmNameOpt << basePortOpt;
-
qDebug() << command << arguments;
try {