Remove framework code that calls SIOCKILLADDR

Bug: 26976388
Change-Id: I652361d9e650a77085070d6c26b28b7638ba2dfe
This commit is contained in:
Lorenzo Colitti
2016-03-22 12:54:32 +09:00
parent 6114f2bbb1
commit d8332d1a1b
2 changed files with 0 additions and 34 deletions

View File

@@ -39,23 +39,6 @@ public class NetworkUtils {
private static final String TAG = "NetworkUtils"; private static final String TAG = "NetworkUtils";
/** Setting bit 0 indicates reseting of IPv4 addresses required */
public static final int RESET_IPV4_ADDRESSES = 0x01;
/** Setting bit 1 indicates reseting of IPv4 addresses required */
public static final int RESET_IPV6_ADDRESSES = 0x02;
/** Reset all addresses */
public static final int RESET_ALL_ADDRESSES = RESET_IPV4_ADDRESSES | RESET_IPV6_ADDRESSES;
/**
* Reset IPv6 or IPv4 sockets that are connected via the named interface.
*
* @param interfaceName is the interface to reset
* @param mask {@see #RESET_IPV4_ADDRESSES} and {@see #RESET_IPV6_ADDRESSES}
*/
public native static int resetConnections(String interfaceName, int mask);
/** /**
* Attaches a socket filter that accepts DHCP packets to the given socket. * Attaches a socket filter that accepts DHCP packets to the given socket.
*/ */

View File

@@ -41,7 +41,6 @@
extern "C" { extern "C" {
int ifc_enable(const char *ifname); int ifc_enable(const char *ifname);
int ifc_disable(const char *ifname); int ifc_disable(const char *ifname);
int ifc_reset_connections(const char *ifname, int reset_mask);
} }
#define NETUTILS_PKG_NAME "android/net/NetworkUtils" #define NETUTILS_PKG_NAME "android/net/NetworkUtils"
@@ -50,21 +49,6 @@ namespace android {
static const uint16_t kDhcpClientPort = 68; static const uint16_t kDhcpClientPort = 68;
static jint android_net_utils_resetConnections(JNIEnv* env, jobject clazz,
jstring ifname, jint mask)
{
int result;
const char *nameStr = env->GetStringUTFChars(ifname, NULL);
ALOGD("android_net_utils_resetConnections in env=%p clazz=%p iface=%s mask=0x%x\n",
env, clazz, nameStr, mask);
result = ::ifc_reset_connections(nameStr, mask);
env->ReleaseStringUTFChars(ifname, nameStr);
return (jint)result;
}
static void android_net_utils_attachDhcpFilter(JNIEnv *env, jobject clazz, jobject javaFd) static void android_net_utils_attachDhcpFilter(JNIEnv *env, jobject clazz, jobject javaFd)
{ {
uint32_t ip_offset = sizeof(ether_header); uint32_t ip_offset = sizeof(ether_header);
@@ -181,7 +165,6 @@ static jboolean android_net_utils_queryUserAccess(JNIEnv *env, jobject thiz, jin
*/ */
static const JNINativeMethod gNetworkUtilMethods[] = { static const JNINativeMethod gNetworkUtilMethods[] = {
/* name, signature, funcPtr */ /* name, signature, funcPtr */
{ "resetConnections", "(Ljava/lang/String;I)I", (void *)android_net_utils_resetConnections },
{ "bindProcessToNetwork", "(I)Z", (void*) android_net_utils_bindProcessToNetwork }, { "bindProcessToNetwork", "(I)Z", (void*) android_net_utils_bindProcessToNetwork },
{ "getBoundNetworkForProcess", "()I", (void*) android_net_utils_getBoundNetworkForProcess }, { "getBoundNetworkForProcess", "()I", (void*) android_net_utils_getBoundNetworkForProcess },
{ "bindProcessToNetworkForHostResolution", "(I)Z", (void*) android_net_utils_bindProcessToNetworkForHostResolution }, { "bindProcessToNetworkForHostResolution", "(I)Z", (void*) android_net_utils_bindProcessToNetworkForHostResolution },