Commit Graph

5 Commits

Author SHA1 Message Date
Patrick Rohr
42b58ae836 Add support to attach / replace / detach clsact qdisc to libtcutils
Bug: 202086915
Bug: 157552970
Test: atest LibTcUtilsTest
Change-Id: I2f2e2f66acb7590e8951ac6e178c5893ba635597
2022-01-19 14:20:27 +01:00
Patrick Rohr
27846ff7a2 Add tests for libtcutils
Add tests for isEthernet(). Before I can add tests for the other
functions, I need to move tcQdiscAddDevClsact into libtcutils.

Bug: 202086915
Bug: 157552970
Test: atest LibTcUtilsTest
Change-Id: Id51e87bb76bc42a055f71027c94c51fcb76be209
2022-01-19 14:20:27 +01:00
Patrick Rohr
0c34e9a084 Fix kernelversion.h
Add missing pragma once and static inline all functions.

Bug: 202086915
Bug: 157552970
Test: builds
Change-Id: I8aca683e9e60c33bf5a5ac45cc20c2e59c8eecde
2022-01-19 14:20:27 +01:00
Patrick Rohr
e7f26e2a4d Move BpfUtils -- move kernelVersion code to its own header
Move kernelVersion and isAtLeastKernelVersion to a local kernelversion.h,
since we cannot use bpf_headers' version of BpfUtils.

Bug: 202086915
Bug: 157552970
Test: builds
Change-Id: I83149b76cc5125991bdb52ce6160c497eb52b48b
2022-01-13 22:24:29 +01:00
Patrick Rohr
776c40cf65 Move BpfUtils -- add libtcutils
This CL is copying the "generic" parts of BpfUtils to
frameworks/libs/net/common. "Generic" meaning the parts that will be
used by both TcUtils in frameworks/libs/net/common and netd.

Bug: 202086915
Bug: 157552970
Test: atest TetheringTests
Change-Id: I9e780fc22e30d046f44953a8cac7687cb6c721c7
2022-01-12 21:34:52 +01:00