#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
-#include <sys/stat.h>
#include <glib.h>
#include "huaweimodem.h"
-#define TUN_SYSFS_DIR "/sys/devices/virtual/misc/tun"
-
static const char *none_prefix[] = { NULL };
static const char *dhcp_prefix[] = { "^DHCP:", NULL };
struct ofono_gprs_context *gc = user_data;
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
GAtResultIter iter;
+ struct ofono_modem *modem;
const char *interface;
char *ip = NULL;
char *netmask = NULL;
ofono_info("IP: %s Gateway: %s", ip, gateway);
ofono_info("DNS: %s, %s", dns1, dns2);
- interface = "invalid";
+ modem = ofono_gprs_context_get_modem(gc);
+ interface = ofono_modem_get_string(modem, "NetworkInterface");
ofono_gprs_context_set_interface(gc, interface);
ofono_gprs_context_set_ipv4_address(gc, ip, TRUE);
{
GAtChat *chat = data;
struct gprs_context_data *gcd;
- struct stat st;
DBG("");
- if (stat(TUN_SYSFS_DIR, &st) < 0) {
- ofono_error("Missing support for TUN/TAP devices");
- return -ENODEV;
- }
-
gcd = g_try_new0(struct gprs_context_data, 1);
if (gcd == NULL)
return -ENOMEM;