summaryrefslogtreecommitdiff
path: root/src/xlat/rtnl_tca_root_attrs.in
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2023-05-10 19:58:37 +0200
committerDmitry V. Levin <ldv@strace.io>2023-05-10 18:08:00 +0000
commit206c58a9ab53e47cf85227a7c2ee6c6ef7f0c0d5 (patch)
treea839f64b108707c82186abdbe7770560802252fd /src/xlat/rtnl_tca_root_attrs.in
parent4f1fad56cba89009d8aaf63d24b34279d912b333 (diff)
downloadstrace-206c58a9ab53e47cf85227a7c2ee6c6ef7f0c0d5.tar.gz
rtnl_tc_action: fix tcamsg attribute decoder
It used the wrong attribute table initially. An example of an actual usage: tc actions add action simple sdata "foobar" index 1 * src/xlat/rtnl_tca_root_attrs.in: New file. * src/xlat/rtnl_tca_root_flags.in: Likewise. * src/rtnl_tc_action.c: Include "xlat/rtnl_tca_root_flags.h" and "xlat/rtnl_tca_root_attrs.h". (tcamsg_nla_decoders): Rename to... (tca_act_nla_decoders): ...this. (decode_tca_action, decode_tca_root_act_tab, decode_tca_root_act_flags, decode_tca_msecs): New functions. (tcamsg_nla_decoders): New decoder table. (decode_tcamsg): Use rtnl_tca_root_attrs and "TCA_ROOT_???" as xlat and dflt arguments in the decode_nlattr call. respectively. * tests/.gitignore: Add nlattr_tcamsg-Xabbrev, nlattr_tcamsg-Xraw, and nlattr_tcamsg-Xverbose. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (nlattr_tcamsg-Xabbrev, nlattr_tcamsg-Xraw, nlattr_tcamsg-Xverbose): New tests. * tests/nlattr_tcamsg-Xabbrev.c: New file. * tests/nlattr_tcamsg-Xraw.c: Likewise. * tests/nlattr_tcamsg-Xverbose.c: Likewise. * tests/nlattr_tcamsg.c: Update the expected output.
Diffstat (limited to 'src/xlat/rtnl_tca_root_attrs.in')
-rw-r--r--src/xlat/rtnl_tca_root_attrs.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xlat/rtnl_tca_root_attrs.in b/src/xlat/rtnl_tca_root_attrs.in
new file mode 100644
index 000000000..4daf24e95
--- /dev/null
+++ b/src/xlat/rtnl_tca_root_attrs.in
@@ -0,0 +1,7 @@
+#value_indexed
+TCA_ROOT_UNSPEC 0
+TCA_ROOT_TAB 1
+TCA_ROOT_FLAGS 2
+TCA_ROOT_COUNT 3
+TCA_ROOT_TIME_DELTA 4
+TCA_ROOT_EXT_WARN_MSG 5