DHCP: Add a native method for making a DHCP socket.
Bug: 19704592 Change-Id: Iadd60d39c93aaabd2917e76791101a7d313b34be
This commit is contained in:
parent
e82e0f0a8c
commit
c70fbac892
1 changed files with 57 additions and 0 deletions
|
|
@ -16,9 +16,11 @@
|
|||
|
||||
package android.net;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
import java.net.SocketException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Collection;
|
||||
import java.util.Locale;
|
||||
|
|
@ -138,6 +140,11 @@ public class NetworkUtils {
|
|||
*/
|
||||
public native static String getDhcpError();
|
||||
|
||||
/**
|
||||
* Attaches a socket filter that accepts DHCP packets to the given socket.
|
||||
*/
|
||||
public native static void attachDhcpFilter(FileDescriptor fd) throws SocketException;
|
||||
|
||||
/**
|
||||
* Binds the current process to the network designated by {@code netId}. All sockets created
|
||||
* in the future (and not explicitly bound via a bound {@link SocketFactory} (see
|
||||
|
|
|
|||
Loading…
Reference in a new issue