summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-10-29 03:03:47 (GMT)
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-10-29 03:03:47 (GMT)
commitbcae74da8fa2958b3fec9153fc33e41f0e0317bf (patch)
tree06a00f6457307467fee4f6580dce4a1a857751c1 /src/inet.c
parent1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (diff)
downloadconnman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.zip
connman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.tar.gz
connman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.tar.bz2
Imported Upstream version 1.26upstream/1.26
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c63
1 files changed, 2 insertions, 61 deletions
diff --git a/src/inet.c b/src/inet.c
index 6111629..cd220ff 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -240,36 +240,6 @@ char *connman_inet_ifname(int index)
return g_strdup(ifr.ifr_name);
}
-short int connman_inet_ifflags(int index)
-{
- struct ifreq ifr;
- int sk, err;
-
- sk = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
- if (sk < 0)
- return -errno;
-
- memset(&ifr, 0, sizeof(ifr));
- ifr.ifr_ifindex = index;
-
- if (ioctl(sk, SIOCGIFNAME, &ifr) < 0) {
- err = -errno;
- goto done;
- }
-
- if (ioctl(sk, SIOCGIFFLAGS, &ifr) < 0) {
- err = -errno;
- goto done;
- }
-
- err = ifr.ifr_flags;
-
-done:
- close(sk);
-
- return err;
-}
-
int connman_inet_ifup(int index)
{
struct ifreq ifr;
@@ -360,36 +330,6 @@ done:
return err;
}
-bool connman_inet_is_cfg80211(int index)
-{
- bool result = false;
- char phy80211_path[PATH_MAX];
- struct stat st;
- struct ifreq ifr;
- int sk;
-
- sk = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
- if (sk < 0)
- return false;
-
- memset(&ifr, 0, sizeof(ifr));
- ifr.ifr_ifindex = index;
-
- if (ioctl(sk, SIOCGIFNAME, &ifr) < 0)
- goto done;
-
- snprintf(phy80211_path, PATH_MAX,
- "/sys/class/net/%s/phy80211", ifr.ifr_name);
-
- if (stat(phy80211_path, &st) == 0 && (st.st_mode & S_IFDIR))
- result = true;
-
-done:
- close(sk);
-
- return result;
-}
-
struct in6_ifreq {
struct in6_addr ifr6_addr;
__u32 ifr6_prefixlen;
@@ -480,7 +420,8 @@ int connman_inet_clear_address(int index, struct connman_ipaddress *ipaddress)
broadcast = ipaddress->broadcast;
peer = ipaddress->peer;
- DBG("index %d address %s prefix_len %d", index, address, prefix_len);
+ DBG("index %d address %s prefix_len %d peer %s broadcast %s", index,
+ address, prefix_len, peer, broadcast);
if (!address)
return -EINVAL;