Add test to verify DHCPREQUEST retransmission in renew/rebind state.

The current DHCPREQUEST retransmission schedules in t=0, t=1, t=3, t=7,
t=16 and allowing for 10% jitter, add a test to verify that multiple
DHCPREQUEST will be received in the renew/rebind state. This test can be
used to verify the retransmission schedule optimization in the follow-up
change.

This Cl introduces NetworkAgent in the IpClient integration test and
registers to ConnectivityService, in order to pass the IPv4 route to
cs and then call netd APIs to configure the IPv4 route on the kernel,
otherwise, unicast DHCPREQUEST cannot be sent out successfuly due to
that no route to the host. Note we also need to reply to the ARP request
for the address resolution with ARP reply, otherwise, unicast packet
still cannot be sent out successfully due to that there is no ARP cache
which maps to the fake DHCP server's IPv4 address.

Bug: 229923479
Test: atest NetworkStackIntegrationTests
Change-Id: I837e9c2a45b4d110399d178a4e81544581782b4b
1 file changed