netlink_route: implement RTM_{NEW,DEL,GET}CHAIN commands

* xlat/nl_route_types.in (RTM_NEWCHAIN, RTM_DELCHAIN, RTM_GETCHAIN): New
constant, introduced by Linux commit v4.19-rc1~140^2~279^2~9.
* netlink_route.c (route_decoders) <[RTM_NEWCHAIN - RTM_BASE],
[RTM_DELCHAIN - RTM_BASE], [RTM_GETCHAIN - RTM_BASE]>: New decoder,
calls decode_tcmsg.
This commit is contained in:
Eugene Syromyatnikov 2018-08-19 14:47:53 +02:00
parent e6c00226f4
commit f676bc701d
2 changed files with 8 additions and 0 deletions

View File

@ -124,6 +124,10 @@ static const netlink_route_decoder_t route_decoders[] = {
[RTM_GETSTATS - RTM_BASE] = decode_ifstatsmsg,
[RTM_NEWCACHEREPORT - RTM_BASE] = decode_cachereport,
[RTM_NEWCHAIN - RTM_BASE] = decode_tcmsg,
[RTM_DELCHAIN - RTM_BASE] = decode_tcmsg,
[RTM_GETCHAIN - RTM_BASE] = decode_tcmsg,
};
bool

View File

@ -71,3 +71,7 @@ RTM_NEWSTATS 92
RTM_GETSTATS 94
RTM_NEWCACHEREPORT 96
RTM_NEWCHAIN 100
RTM_DELCHAIN 101
RTM_GETCHAIN 102