Merge "Add DHCP Rapid Commit FILS support."
This commit is contained in:
20
core/java/android/net/MacAddress.aidl
Normal file
20
core/java/android/net/MacAddress.aidl
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package android.net;
|
||||||
|
|
||||||
|
@JavaOnlyStableParcelable parcelable MacAddress;
|
||||||
@@ -17,8 +17,11 @@
|
|||||||
package android.net.ip;
|
package android.net.ip;
|
||||||
|
|
||||||
import android.net.DhcpResults;
|
import android.net.DhcpResults;
|
||||||
|
import android.net.Layer2PacketParcelable;
|
||||||
import android.net.LinkProperties;
|
import android.net.LinkProperties;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callbacks for handling IpClient events.
|
* Callbacks for handling IpClient events.
|
||||||
*
|
*
|
||||||
@@ -116,4 +119,9 @@ public class IpClientCallbacks {
|
|||||||
* whenever 464xlat is being started or stopped.
|
* whenever 464xlat is being started or stopped.
|
||||||
*/
|
*/
|
||||||
public void setNeighborDiscoveryOffload(boolean enable) {}
|
public void setNeighborDiscoveryOffload(boolean enable) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked on starting preconnection process.
|
||||||
|
*/
|
||||||
|
public void onPreconnectionStart(List<Layer2PacketParcelable> packets) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ public class IpClientManager {
|
|||||||
slot, KeepalivePacketDataUtil.toStableParcelable(pkt));
|
slot, KeepalivePacketDataUtil.toStableParcelable(pkt));
|
||||||
return true;
|
return true;
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
log("Error adding Keepalive Packet Filter ", e);
|
log("Error adding NAT-T Keepalive Packet Filter ", e);
|
||||||
return false;
|
return false;
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(token);
|
Binder.restoreCallingIdentity(token);
|
||||||
@@ -272,4 +272,22 @@ public class IpClientManager {
|
|||||||
Binder.restoreCallingIdentity(token);
|
Binder.restoreCallingIdentity(token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify IpClient that preconnection is complete and that the link is ready for use.
|
||||||
|
* The success parameter indicates whether the packets passed in by 'onPreconnectionStart'
|
||||||
|
* were successfully sent to the network or not.
|
||||||
|
*/
|
||||||
|
public boolean notifyPreconnectionComplete(boolean success) {
|
||||||
|
final long token = Binder.clearCallingIdentity();
|
||||||
|
try {
|
||||||
|
mIpClient.notifyPreconnectionComplete(success);
|
||||||
|
return true;
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
log("Error notifying IpClient Preconnection completed", e);
|
||||||
|
return false;
|
||||||
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(token);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,12 +20,14 @@ import static android.net.shared.IpConfigurationParcelableUtil.fromStableParcela
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.DhcpResultsParcelable;
|
import android.net.DhcpResultsParcelable;
|
||||||
|
import android.net.Layer2PacketParcelable;
|
||||||
import android.net.LinkProperties;
|
import android.net.LinkProperties;
|
||||||
import android.net.NetworkStackClient;
|
import android.net.NetworkStackClient;
|
||||||
import android.os.ConditionVariable;
|
import android.os.ConditionVariable;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -176,6 +178,12 @@ public class IpClientUtil {
|
|||||||
mCb.setNeighborDiscoveryOffload(enable);
|
mCb.setNeighborDiscoveryOffload(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Invoked on starting preconnection process.
|
||||||
|
@Override
|
||||||
|
public void onPreconnectionStart(List<Layer2PacketParcelable> packets) {
|
||||||
|
mCb.onPreconnectionStart(packets);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInterfaceVersion() {
|
public int getInterfaceVersion() {
|
||||||
return this.VERSION;
|
return this.VERSION;
|
||||||
|
|||||||
Reference in New Issue
Block a user