ClatCoordinator: dump BPF forwarding rules
This is a preparation for moving clat map dump from netd to
mainline module.
Test: compare dumpsys connectivity and netd
$ adb shell dumpsys connectivity
Nat464Xlat:
ClatCoordinator:
Forwarding rules:
BPF ingress map: iif nat64Prefix v6Addr -> v4Addr oif
47 /64:ff9b::/96 /2a00:79e1:abc:6f02:4aac:17dd:b40e:8bcc -> /192.0.0.4 52
BPF egress map: iif v4Addr -> v6Addr nat64Prefix oif
52 /192.0.0.4 -> /2a00:79e1:abc:6f02:4aac:17dd:b40e:8bcc /64:ff9b::/96 47 ether
$ adb shell dumpsys netd
ClatdController
BPF ingress map: iif(iface) nat64Prefix v6Addr -> v4Addr oif(iface)
47(wlan0) 64:ff9b::/96 2a00:79e1:abc:6f02:4aac:17dd:b40e:8bcc -> 192.0.0.4 52(v4-wlan0)
BPF egress map: iif(iface) v4Addr -> v6Addr nat64Prefix oif(iface)
52(v4-wlan0) 192.0.0.4 -> 2a00:79e1:abc:6f02:4aac:17dd:b40e:8bcc 64:ff9b::/96 47(wlan0) ether
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2017317
Merged-In: I597709663477b62005b0bc5cc1bf0fc22743e10b
Change-Id: I597709663477b62005b0bc5cc1bf0fc22743e10b
Signed-off-by: Nucca Chen <nuccachen@google.com>
(cherry picked from commit 8be50a6d905d1d6810c0c148ba50f8bef614cde9)
4 files changed