[PATCH 3/4] tests: check decoding of MDBA_MDB_ENTRY_INFO netlink attributes

2017-09-09 Thread JingPiao Chen
* tests/nlattr_mdba_mdb_entry.c: New file. * tests/gen_tests.in (nlattr_mdba_mdb_entry): New entry. * tests/pure_executables.list: Add nlattr_mdba_mdb_entry. * tests/.gitignore: Likewise. --- tests/.gitignore | 1 + tests/gen_tests.in| 1 + tests/nlattr_mdba_mdb_entry.

[PATCH 1/4] rtnl_mdb: decode br_port_msg netlink attributes

2017-09-09 Thread JingPiao Chen
* configure.ac (AC_CHECK_TYPES): Check for struct br_mdb_entry in . (AC_CHECK_MEMBERS): Check for state, flags and vid fields in struct br_mdb_entry. * rtnl_mdb.c: Include "xlat/mdb_flags.h", "xlat/mdb_states.h", "xlat/rtnl_mdba_mdb_attrs.h", "xlat/rtnl_mdba_mdb_eattr_attrs.h", "xlat/rtnl_mdba_mdb_

[PATCH 4/4] tests: check decoding of MDBA_ROUTER_PORT netlink attribute

2017-09-09 Thread JingPiao Chen
* tests/nlattr_mdba_router_port.c: New file. * tests/gen_tests.in (nlattr_mdba_router_port): New entry. * tests/pure_executables.list: Add nlattr_mdba_router_port. * tests/.gitignore: Likewise. --- tests/.gitignore| 1 + tests/gen_tests.in | 1 + tests/nlattr_mdba_

[PATCH 2/4] tests: extend TEST_NESTED_NLATTR_OBJECT macro

2017-09-09 Thread JingPiao Chen
Extend TEST_NESTED_NLATTR_OBJECT macro for multi-nested netlink attribute. Such as: [MDBA_MDB] = { [MDBA_MDB_ENTRY] = { [MDBA_MDB_ENTRY_INFO] { struct br_mdb_entry [MDBA_MDB_EATTR attributes] } } } * te