Commit Graph

2 Commits

Author SHA1 Message Date
2baaf7302e netlink: implement decoding of INET_DIAG_CLASS_ID attribute
This is a new netlink attribute introduced by linux kernel commit
v4.14-rc1~130^2~207.

* linux/inet_diag.h (INET_DIAG_CLASS_ID): New enum.
* netlink_inet_diag.c (inet_diag_msg_nla_decoders): Add
INET_DIAG_CLASS_ID.
* xlat/inet_diag_attrs.in: Add INET_DIAG_CLASS_ID.
* xlat/inet_diag_extended_flags.in: Add 1<<(INET_DIAG_CLASS_ID-1).
* tests/nlattr_inet_diag_msg.c (main): Check INET_DIAG_CLASS_ID
decoding.
2017-09-17 12:04:11 +00:00
JingPiao Chen
ab17493bb2 netlink: add a basic netlink attribute parser of AF_INET diag
* linux/inet_diag.h (INET_DIAG_REQ_*): New enum.
* netlink_sock_diag.c: Include "xlat/inet_diag_attrs.h"
and "xlat/inet_diag_req_attrs.h".
(decode_inet_diag_req_compat, decode_inet_diag_req_v2,
 decode_inet_diag_msg): Use decode_nlattr.
* xlat/inet_diag_attrs.in: New file.
* xlat/inet_diag_req_attrs.in: Likewise.

Co-authored-by: Fabien Siron <fabien.siron@epita.fr>
2017-06-30 21:38:49 +00:00