diff options
Diffstat (limited to 'src/inet.c')
-rw-r--r-- | src/inet.c | 63 |
1 files changed, 2 insertions, 61 deletions
@@ -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; |