History log of /frameworks/base/services/net/java/android/net/dhcp/DhcpAckPacket.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
025f4a5aae1660eda6406703771995010d9de990 17-Sep-2015 Lorenzo Colitti <lorenzo@google.com> Support DHCP replies with multiple default gateways.

Just use the first one for compatibility with the legacy client.

Bug: 23975855
Change-Id: Id6a0b0de32e8947c12c02eb9a3be417e2f82c99a
/frameworks/base/services/net/java/android/net/dhcp/DhcpAckPacket.java
f68edb16116307553059a889ef456227a9697918 02-Jun-2015 Lorenzo Colitti <lorenzo@google.com> Actually fall back from yiaddr to ciaddr.

The initial implementation of toDhcpResults attempted to get the
leased IP address from ciaddr if yiaddr was 0.0.0.0, but it never
actually did so because a) it used == instead of equals(), and b)
the parsing code never populated mClientIp for a DhcpOfferPacket
or DhcpAckPacket.

Fix this and add a test for it.. Technically DHCP does not use
ciaddr (only bootp uses it), but in 5.0 we would use ciaddr if
yiaddr was 0.0.0.0 and a bit more compatibility shouldn't hurt.

Bug: 19704592
Change-Id: I1f58555f0c10b9c576995a6edb759a83d8938ea0
/frameworks/base/services/net/java/android/net/dhcp/DhcpAckPacket.java
3e979321a5d96b9e2688f67ef0f936602c0f7e5a 21-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Set the secs field in the BOOTP header.

We mostly follow RFC 2131, which says that secs is the number of
seconds "since client began address acquisition or renewal
process", and thus set secs to zero on renew. This is different
from our current behaviour, which keeps on counting without
resetting secs to zero on renew.

Bug: 19704592
Change-Id: Ifbb7644094c579be626ffb698eee87047425dbf0
/frameworks/base/services/net/java/android/net/dhcp/DhcpAckPacket.java
c8a0f49feecaf231e3f5972bd247dfbc586ccb34 14-Mar-2015 Lorenzo Colitti <lorenzo@google.com> DHCP: Minor cleanups to the packet code.

1. Delete the DhcpStateMachine, since we don't plan to use it.
2. Make all InetAddresses Inet4Addresses, since that's what they
are. In order to do this, define INADDR_ANY and
INADDR_BROADCAST, constants, since Inet4Address.{ANY,ALL} are
not Inet4Addresses but InetAddresses.

Bug: 19704592
Change-Id: I5a0499be889076992a60aaad0bd8be5ea66bd560
/frameworks/base/services/net/java/android/net/dhcp/DhcpAckPacket.java
c95a87f30d069472302f90a206e229b82bb2316a 09-Mar-2015 Lorenzo Colitti <lorenzo@google.com> DHCP: Move the packet code to frameworks/base/services.

There's no need for it to be in frameworks/base/core, since it
will only be used by services.

Bug: 19704592
Change-Id: I2f5277eca848b7000ca46db575e8602eacb5c8bd
/frameworks/base/services/net/java/android/net/dhcp/DhcpAckPacket.java