Refactor the ReceiveThread with PacketReader in DhcpClient.
To implement the IP address conflict detection, we need another ReceiveThread to listen ARP packets as well. Ideally, we should listen both of DHCP packets and ARP packets in the same thread with DhcpClient state machine handler. This CL replaces the ReceiveThread with PacketReader to listen DHCP packets. After refactoring, DHCP packets are read from the same handler thread instead of a separate receiving thread. Then we can also leverage the same handler thread to listen the ARP packets simultaneously via another raw socket. Bug: 130775067 Test: atest NetworkStackTests NetworkStackIntegrationTests Change-Id: I23e91a6c2d99cf8053e62f2ae9d78481ece6384d
Loading
Please register or sign in to comment