summaryrefslogtreecommitdiff
path: root/src/android/net/dhcp/DhcpPacket.java
AgeCommit message (Collapse)Author
2020-06-12Move Inet[4]AddressUtils to libs/netRemi NGUYEN VAN
The classes should not be picked up from frameworks/base, as they are part of several mainline modules. Bug: 151052811 Test: m; manual: flashed, wifi and telephony working Test: atest NetworkStackCoverageTests Change-Id: I62da3419408b7eb71ea5319e8717fbb22c76a94e
2020-05-15Move common apishim classes to apishim.common pkgRemi NGUYEN VAN
This provides a better separation of the classes based on their role (an actual shim, or an interface or utility common to all shims), and forces the apishim package to import the common classes, which makes it easier at SDK bump time since the imports do not need to be added at that point. Bug: 143586229 Test: atest NetworkStackTests Original-Change: https://android-review.googlesource.com/1310517 Merged-In: Ie77c17a96a67016f35890afa065bea0a07b09504 Change-Id: Ie77c17a96a67016f35890afa065bea0a07b09504
2020-05-07Set clientId when parsing an explicit DHCP_CLIENT_IDENTIFIER option.Xiao Ma
Bug: 130741856 Test: atest NetworkStackTests TetheringTests Test: manually turn on the hotspot and verify the downstream device can attach to the upstream hotspot, then turn it off, repeat multiple times. Merged-In: I9da5fec47a74de36869e795fa9b1d7170d2f91c9 Change-Id: I9da5fec47a74de36869e795fa9b1d7170d2f91c9
2020-04-16Renew previous IP address when roaming happens in certain specific Wi-Fi ↵Xiao Ma
networks. Bug: 131797393 Test: atest NetworkStackTests NetworkStackIntegrationTests Test: atest FrameworksNetTests Merged-In: I65ebdd142a2bb402035c63cd282bc2574ddf3d8d Change-Id: I65ebdd142a2bb402035c63cd282bc2574ddf3d8d
2020-03-25Make all DHCP option numbers public.Automerger Merge Worker
This allows tests that emulate DHCP clients to include options. The values are specified by the RFC and cannot change, so there is no downside to making them public. Test: builds Bug: 150644681 Change-Id: I939bfac5ec14175b74ce3713f5af1362de577839 Merged-In: I939bfac5ec14175b74ce3713f5af1362de577839 (cherry picked from commit f75cd4768124c20c9eda14e21368f83c4963a260)
2020-02-19Add captive portal info to DhcpClient outputRemi NGUYEN VAN
Requesting the captive portal option is flagged off by default. The URL it provides will be used to support the captive portal API; see RFC7710bis. Bug: 139269711 Test: atest NetworkStackTests NetworkStackNextTests Test: atest NetworkStackIntegrationTests NetworkStackNextIntegrationTests Change-Id: I783466e0e60f364e79cd76af3fe43a7862d35cf2
2019-12-27Provide RRO configuration to send DHCP client hostname option.Xiao Ma
Add a configurable option in the RRO which controls whether or not to send the hostname set in the Settings->About phone->Device name. The option in RRO is false by default, that means DHCP Request still not include any hostname by default. Once the option is overlaid and enabled, the device name after transliteration will be wrote into hostname option. Bug: 131783527 Test: atest NetworkStackTests NetworkStackIntegrationTests Test: manual test, create empty APK to overlay the RRO configuration. Change-Id: I9af0b0d9e7bb526d3a3c1003bb99d0a3d69b1e9e
2019-12-11Add Rapid Commit option support in DHCP Server side.Xiao Ma
Bug:136216415 Test: atest FrameworksNetTests NetworkStackTests Test: atest NetworkStackIntegrationTests Test: manual tethering Change-Id: I0f9483c72374bab271eb18549a1a41812f32f2dd
2019-12-09Implement IPv4 address conflict detection and DHCPDECLINE.Xiao Ma
Disable this behavior by default, we can enable it with flag rollout later. Bug: 128639898 Test: atest NetworkStackTests NetworkStackIntegrationTests Test: manual test Change-Id: Ie2133bc5faaba085147519cdb5c8277c563cfbd7
2019-10-30Remove hidden annotation usage from NetworkStackRemi NGUYEN VAN
NetworkStack uses hidden android.annotation.* annotations by pulling the source files from frameworks/base. This should not be necessary, since androidx annotations can be used instead. Remove usage of such annotations and replace with androidx annotations. Test: m NetworkStack NetworkStackApiStable Test: builds, boots, WiFi working Bug: 139105333 Change-Id: I24e147ac4f01feaf53424430b4825b316ec154fe
2019-07-02Add DHCP Rapid Commit option(RFC4039) support in client side.Xiao Ma
Bug: 122710829 Bug: 136216415 Test: atest FrameworksNetTests NetworkStackTests Test: manual test Change-Id: I384282b7efd0df0c4a6de7bdc1957048303ad88b
2019-06-10Add an IpClientIntegrationTestXiao Ma
The test sets up a tap interface and starts IpClient on it. It currently only tests that DhcpClient starts sending discover packets. Test: atest NetworkStackIntegrationTests Test: atest NetworkStackTests Change-Id: I99b135974af758ad5255f06bef6121e85ab62ffe
2019-04-27Additional code for server name in DHCP packets.Lorenzo Colitti
- Add the hostname to DhcpResultsParcelable. - Don't store the server hostname if option overload is in use, as this is not valid. - Add unit tests. Bug: 120584519 Bug: 127423755 Test: atest NetworkStackTests Test: atest FrameworksNetTests Change-Id: I47d9d53d1fb58968322cc8b071a44fbc8f7156e1
2019-04-26Parse the server host name field of the dhcp packageyuanyunli
Some hotspot devices will fill in the server host name field of the DHCP package, such as iphone. Parsing the server host name of the DHCP package can help identify ios hotspots. Bug: 120584519 Test: 127423755 Test: builds, boots, wifi works Change-Id: Idbe10c36332ce421f1bba93eb87e9e1e12463088
2019-01-28Add hidden utils and constants to NetworkStackRemi NGUYEN VAN
Test: atest FrameworksNetTests NetworkStackTests Bug: 112869080 Change-Id: I1a803f7954ab760294436226d6c1cffb934e98f9
2019-01-28Move NetworkUtils used by NetworkStackRemi NGUYEN VAN
Depending on usage move into NetworkStackUtils or shared Inet4AddressUtils. Test: atest FrameworksNetTests NetworkStackTests Bug: 112869080 Merged-In: Ie20dcee375b377236004a7689890729493aca857 Change-Id: Ib8d000529872796022706a35050fdc2c7141f2ab
2019-01-23Move IpClient to NetworkStackRemi NGUYEN VAN
Test: atest FrameworksNetTests NetworkStackTests Bug: b/112869080 Change-Id: I7d00848c052382cd1b6ce458868bed6a1e9e8ec5