Browse Source

This doesn't really belong in the library so removing it now.

Kruger 8 years ago
parent
commit
6898c84320

+ 0 - 7
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel/PsiphonTunnel.h

@@ -348,13 +348,6 @@ Swift: @code func onInternetReachabilityChanged(_ currentReachability: Reachabil
  */
 - (NSString * _Nonnull)getPacketTunnelDNSResolverIPv6Address;
 
-/*!
- Only valid in whole device mode. Provides the IP addresses of the network interfaces that are up.
- @return  The IP addresses of the network interfaces.
- Swift: @code func getPacketTunnelInterfacesIPv4Addresses() -> Array @endcode
- */
-- (NSArray * _Nonnull)getPacketTunnelInterfacesIPv4Addresses;
-
 /*!
  Upload a feedback package to Psiphon Inc. The app collects feedback and diagnostics information in a particular format, then calls this function to upload it for later investigation.
  @note The key, server, path, and headers must be provided by Psiphon Inc.

+ 0 - 29
MobileLibrary/iOS/PsiphonTunnel/PsiphonTunnel/PsiphonTunnel.m

@@ -276,35 +276,6 @@
     return GoPsiGetPacketTunnelDNSResolverIPv6Address();
 }
 
-// See comment in header.
-- (NSArray * _Nonnull)getPacketTunnelInterfacesIPv4Addresses {
-    
-    // Getting list of all interfaces' IPv4 addresses
-    NSMutableArray *upIfIpAddressList = [NSMutableArray new];
-    
-    struct ifaddrs *interfaces;
-    if (getifaddrs(&interfaces) == 0) {
-        struct ifaddrs *interface;
-        for (interface=interfaces; interface; interface=interface->ifa_next) {
-            
-            // Only IFF_UP interfaces. Loopback is ignored.
-            if (interface->ifa_flags & IFF_UP && !(interface->ifa_flags & IFF_LOOPBACK)) {
-                
-                if (interface->ifa_addr && interface->ifa_addr->sa_family==AF_INET) {
-                    struct sockaddr_in *in = (struct sockaddr_in*) interface->ifa_addr;
-                    NSString *interfaceAddress = [NSString stringWithUTF8String:inet_ntoa(in->sin_addr)];
-                    [upIfIpAddressList addObject:interfaceAddress];
-                }
-            }
-        }
-    }
-    
-    // Free getifaddrs data
-    freeifaddrs(interfaces);
-    
-    return upIfIpAddressList;
-}
-
 // See comment in header.
 - (void)sendFeedback:(NSString * _Nonnull)feedbackJson
            publicKey:(NSString * _Nonnull)b64EncodedPublicKey