android_packages_modules_Co.../staticlibs/testutils
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Patrick Rohr 328cfb5051 Add packet builder support for UDP packets
UDP packets can be built as:

val p = ether / ipv6 / udp / data
val p2 = ether / ipv4 / udp / data
val p3 = ether / ipv4 / udp / ipv4 / udp / data

This also gets rid of Icmp6Pkt in favor of a function call that
calculates the checksum over an L4 packet.

This does add a bit of duplication: the build() function for RA and NA
packets is identical, and UdpPkt#build() is not far off. However, subtle
differences in L4 packet format (namely the checksum and length
positions) make generalizing this code difficult. This is possible by
passing the checksum position, proto byte, and adding an abstract
function that fills in the L4 length field before performing checksum
calculation. However, this complexity is likely not worth it. If the
repetition becomes obvious once more protocols (such as ICMPv4/6 echo,
etc.) are added, this decision will be revisited.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Ia78792418f29a3be091ebdc9bb2c26e45da9f2b1
2025-04-07 14:22:43 -07:00
..
app/connectivitychecker Wait for default route for wifi check 2025-01-15 16:12:04 +09:00
devicetests Add packet builder support for UDP packets 2025-04-07 14:22:43 -07:00
host Improve stability of APFv{4,6} multi-device tests 2025-04-02 04:31:01 -07:00
hostdevice/com/android Merge "Only report tryTest errors when not caught" into main 2024-12-02 01:48:40 +00:00
Android.bp Use non-extended mockito for net-tests-utils 2025-03-10 17:59:19 +09:00