return _emul_info.guest_ip;
}
+void set_emul_host_ip(char *kernel_cmdline)
+{
+#ifdef SUPPORT_LEGACY_ARGS
+ char *buf = strstr(kernel_cmdline, HOST_IP_PREFIX);
+#else
+ char *buf = get_variable("host_ip");
+#endif
+ if (buf) {
+ char buf_host_ip[MAXLEN] = {0,};
+ int len = strlen(HOST_IP_PREFIX);
+ int i, j;
+ int max_len = strlen(buf);
+ for(i = len, j = 0; i < max_len; i++) {
+ if (buf[i] == ' ' || buf[i] == '\0')
+ break;
+ buf_host_ip[j++] = buf[i];
+ }
+
+ buf_host_ip[j] = '\0';
+ LOG_INFO("host_ip information=%s\n", buf_host_ip);
+ strncpy(_emul_info.host_ip, buf_host_ip, sizeof(_emul_info.host_ip));
+ }
+}
+
+char* get_emul_host_ip(void)
+{
+ LOG_INFO("host ip: %s\n", _emul_info.guest_ip);
+ return _emul_info.host_ip;
+}
+
/* maximum number of touch point */
void set_emul_max_touch_point(int cnt)
{
bool tap_enable;
char guest_ip[16];
+ char host_ip[16];
int spice_port;
char *vm_name;
void set_emul_vm_base_port(int port);
void set_emul_ecs_port(int port);
void set_emul_guest_ip(char *ip);
+void set_emul_host_ip(char *ip);
void set_emul_vm_name(char *vm_name);
void set_emul_skin_path(char *path);
void set_emul_gpu_accel(bool enable);
int get_emul_caps_lock_state(void);
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);
char* get_emul_http_proxy_addr(void);
char* get_emul_http_proxy_port(void);
#define JAVA_MAX_COMMAND_LENGTH 1024
#define MAXLEN 512
#define HTTP_PROXY_PREFIX "http_proxy="
+#define HOST_IP_PREFIX "host_ip="
#define JAR_SKINFILE "emulator-skin.jar"