[PATCH 00/26] Implemented basic protocol specific decoding of NETLINK_ROUTE

JingPiao Chen chenjingpiao at gmail.com
Thu Aug 10 01:03:22 UTC 2017


Note:

rule:
Before v2.6.18-284-g14c0b97, rule carry struct rtmsg,
now carry struct fib_rule_hdr.

$ man 7 rtnetlink # or read the old kernel
RTM_NEWRULE, RTM_DELRULE, RTM_GETRULE
	Add, delete or retrieve a routing rule.  Carries a struct rtmsg

Read linux kernel source code
linux/net/core/fib_rules.c: fib_nl_delrule(), fib_nl_delrule();
know rule carry struct fib_rule_hdr.


neigh:
linux/net/core/rtnetlink.c: rtnl_fdb_dump(),
rtnl_register(PF_BRIDGE, RTM_GETNEIGH, NULL, rtnl_fdb_dump, NULL);

read rtnl_fdb_dump can know RTM_GETNEIGH carry struct ifinfomsg
when family = PF_BRIDGE.

JingPiao Chen (26):
  tests: check decoding of NLMSG_DONE messages of NETLINK_ROUTE
  netlink: add a basic rtnetlink parser of addr messages
  tests: check decoding of rtnetlink addr messages
  netlink: add a basic rtnetlink parser of route messages
  tests: check decoding of rtnetlink route messages
  netlink: add a basic rtnetlink parser of rule messages
  tests: check decoding of rtnetlink rule messages
  netlink: add a basic rtnetlink parser of neigh messages
  tests: check decoding of rtnetlink neigh messages
  netlink: add a basic rtnetlink parser of neightbl messages
  tests: check decoding of rtnetlink neightbl messages
  netlink: add a basic rtnetlink parser of tc messages
  tests: check decoding of rtnetlink tc messages
  netlink: add a basic rtnetlink parser of tc action messages
  tests: check decoding of rtnetlink tc action messages
  netlink: add a basic rtnetlink parser of addrlabel messages
  tests: check decoding of rtnetlink addrlabel messages
  netlink: add a basic rtnetlink parser of dcb messages
  tests: check decoding of rtnetlink dcb messages
  netlink: add a basic rtnetlink parser of netconf messages
  tests: check decoding of rtnetlink netconf messages
  netlink: add a basic rtnetlink parser of mdb messages
  tests: check decoding of rtnetlink mdb messages
  netlink: add a basic rtnetlink parser of nsid messages
  tests: check decoding of rtnetlink nsid messages
  Update NEWS

 Makefile.am                         |  12 ++
 NEWS                                |   3 +
 configure.ac                        |  12 ++
 defs.h                              |   1 +
 netlink_route.c                     |  71 ++++++++-
 netlink_route.h                     |  13 ++
 rtnl_addr.c                         |  61 ++++++++
 rtnl_addrlabel.c                    |  61 ++++++++
 rtnl_dcb.c                          |  61 ++++++++
 rtnl_mdb.c                          |  59 ++++++++
 rtnl_neigh.c                        |  76 ++++++++++
 rtnl_neightbl.c                     |  44 ++++++
 rtnl_netconf.c                      |  47 ++++++
 rtnl_nsid.c                         |  43 ++++++
 rtnl_route.c                        |  75 ++++++++++
 rtnl_rule.c                         |  68 +++++++++
 rtnl_tc.c                           |  57 +++++++
 rtnl_tc_action.c                    |  43 ++++++
 tests/netlink_route.c               | 286 ++++++++++++++++++++++++++++++++++++
 xlat/dcb_commands.in                |  28 ++++
 xlat/fib_rule_actions.in            |   9 ++
 xlat/fib_rule_flags.in              |   6 +
 xlat/ifaddrflags.in                 |  12 ++
 xlat/ip_type_of_services.in         |   4 +
 xlat/nda_types.in                   |  11 ++
 xlat/neighbor_cache_entry_flags.in  |   6 +
 xlat/neighbor_cache_entry_states.in |   9 ++
 xlat/rtm_flags.in                   |   5 +
 xlat/rtm_protocol.in                |  16 ++
 xlat/rtm_scope.in                   |   5 +
 xlat/rtm_table.in                   |   5 +
 xlat/rtm_types.in                   |  12 ++
 32 files changed, 1220 insertions(+), 1 deletion(-)
 create mode 100644 rtnl_addr.c
 create mode 100644 rtnl_addrlabel.c
 create mode 100644 rtnl_dcb.c
 create mode 100644 rtnl_mdb.c
 create mode 100644 rtnl_neigh.c
 create mode 100644 rtnl_neightbl.c
 create mode 100644 rtnl_netconf.c
 create mode 100644 rtnl_nsid.c
 create mode 100644 rtnl_route.c
 create mode 100644 rtnl_rule.c
 create mode 100644 rtnl_tc.c
 create mode 100644 rtnl_tc_action.c
 create mode 100644 xlat/dcb_commands.in
 create mode 100644 xlat/fib_rule_actions.in
 create mode 100644 xlat/fib_rule_flags.in
 create mode 100644 xlat/ifaddrflags.in
 create mode 100644 xlat/ip_type_of_services.in
 create mode 100644 xlat/nda_types.in
 create mode 100644 xlat/neighbor_cache_entry_flags.in
 create mode 100644 xlat/neighbor_cache_entry_states.in
 create mode 100644 xlat/rtm_flags.in
 create mode 100644 xlat/rtm_protocol.in
 create mode 100644 xlat/rtm_scope.in
 create mode 100644 xlat/rtm_table.in
 create mode 100644 xlat/rtm_types.in

-- 
2.7.4




More information about the Strace-devel mailing list