On 12/25 06:12, Harsha Sharma wrote:
> Hello everyone,
Hi.
> I'm Harsha Sharma, a sophomore student at Indian Institute of
> Technology, Roorkee, India.
> I have knowledge of C, git, shell programming, kernel programming, gdb
> and parsers and currently working as outreachy intern in Linux-kerne
* tests/nfnetlink_ctnetlink_exp.c (test_nlmsg_flags): New function.
(main): Use it.
---
tests/nfnetlink_ctnetlink_exp.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/nfnetlink_ctnetlink_exp.c b/tests/nfnetlink_ctnetlink_exp.c
index 3be5d54..aa17cd
* tests/nfnetlink_cttimeout.c (test_nlmsg_flags): New function.
(main): Use it.
---
tests/nfnetlink_cttimeout.c | 40
1 file changed, 40 insertions(+)
diff --git a/tests/nfnetlink_cttimeout.c b/tests/nfnetlink_cttimeout.c
index 404d590..e66dc24 100644
---
* tests/nfnetlink_ctnetlink.c (test_nlmsg_flags): New function.
(main): Use it.
---
tests/nfnetlink_ctnetlink.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/nfnetlink_ctnetlink.c b/tests/nfnetlink_ctnetlink.c
index c3a4d32..a227f38 100644
--- a/t
* tests/nfnetlink_nftables.c (test_nlmsg_flags): New function.
(main): Use it.
---
tests/nfnetlink_nftables.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/nfnetlink_nftables.c b/tests/nfnetlink_nftables.c
index 95c3849..66e5fe9 100644
--- a/tests
* tests/nfnetlink_acct.c (test_nlmsg_flags): New function.
(main): Use it.
---
tests/nfnetlink_acct.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/nfnetlink_acct.c b/tests/nfnetlink_acct.c
index 4faed10..52cff99 100644
--- a/tests/nfnetlink_acct.
* tests/nfnetlink_nft_compat.c (test_nlmsg_flags): New function.
(main): Use it.
---
tests/nfnetlink_nft_compat.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tests/nfnetlink_nft_compat.c b/tests/nfnetlink_nft_compat.c
index ca46470..072ee57 100644
--- a/tests/nfnetlink
* tests/nfnetlink_cthelper.c (test_nlmsg_flags): New function.
(main): Use it.
---
tests/nfnetlink_cthelper.c | 37 +
1 file changed, 37 insertions(+)
diff --git a/tests/nfnetlink_cthelper.c b/tests/nfnetlink_cthelper.c
index 7347e10..47fab76 100644
--- a/tests
On Fri, Oct 27, 2017 at 5:50 AM, Dmitry V. Levin wrote:
> On Thu, Sep 28, 2017 at 01:13:07PM +0800, JingPiao Chen wrote:
> > [RFC 2/3]: The reason why this patch mark as RFC is that now only
netfilter
> > use delete flags. If this should not be merged, please tell me. I will
de
Header older then linux kernel commit v4.4-rc1-167-g1ffad83
("netfilter: fix include files for compilation") should include
and before .
* configure.ac (AC_CHECK_HEADERS): Check linux/netfilter/xt_osf.h
using the fourth argument.
* tests/nfnetlink_osf.c: Include and .
---
configure.ac
* netlink.c: Include "xlat/netlink_delete_flags.h".
(decode_nlmsg_flags_crypto): Decode delete flags.
(decode_nlmsg_flags_route): Likewise.
(decode_nlmsg_flags_xfrm): Likewise.
* netlink.h (NLM_F_NONREC): New macro.
* xlat/netlink_delete_flags.in: New file.
* tests/netlink_crypto.c (test_nlmsg_flag
* netlink.c (decode_nlmsg_flags_netfilter): New function.
(nlmsg_flags): Add NETLINK_NETFILTER.
* NEWS: Mention this.
---
NEWS | 2 +-
netlink.c | 104 ++
2 files changed, 105 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
fprintf(fp, "Deleted action ");
}
}
...
}
[RFC 3/3]: This patch I want the reviewer know what I do after refactor
decode_nlmsg_flags. No need to merge.
JingPiao Chen (3):
netlink: refactor decode_nlmsg_flags
netlink: decode netlink message d
Refactor decode_nlmsg_flags make it family-specific, just like
decode_nlmsg_type and decode_payload.
* netlink.c (decode_nlmsg_flags_crypto, decode_nlmsg_flags_route,
decode_nlmsg_flags_sock_diag, decode_nlmsg_flags_xfrm): New functions.
(nlmsg_flags_decoder_t): New typedef.
(nlmsg_flags): New arr
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1
+netlink_sock_diag.test
nfnetlink_ulog +netlink_sock_diag.test
diff --git a/tests/nfnetlink_nftables.c b/tests/nfnetlink_nftables.c
new file mode 100644
index 000..95c3849
--- /dev/null
+++ b/tests/nfnetlink_nftables.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the
+netlink_sock_diag.test
diff --git a/tests/nfnetlink_acct.c b/tests/nfnetlink_acct.c
new file mode 100644
index 000..4faed10
--- /dev/null
+++ b/tests/nfnetlink_acct.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All
+netlink_sock_diag.test
diff --git a/tests/nfnetlink_ulog.c b/tests/nfnetlink_ulog.c
new file mode 100644
index 000..31eb30f
--- /dev/null
+++ b/tests/nfnetlink_ulog.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All
/nfnetlink_ctnetlink_exp.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following
+netlink_sock_diag.test
diff --git a/tests/nfnetlink_ipset.c b/tests/nfnetlink_ipset.c
new file mode 100644
index 000..1f1f10a
--- /dev/null
+++ b/tests/nfnetlink_ipset.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights
--git a/tests/nfnetlink_osf.c b/tests/nfnetlink_osf.c
new file mode 100644
index 000..59cf5fb
--- /dev/null
+++ b/tests/nfnetlink_osf.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use
@@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of
/nfnetlink_ctnetlink.c b/tests/nfnetlink_ctnetlink.c
new file mode 100644
index 000..c3a4d32
--- /dev/null
+++ b/tests/nfnetlink_ctnetlink.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source
v2:
[PATCH 03/12] Remove useless fallback define of IPCTNL_MSG_EXP_NEW.
v3:
NEWS, commit message: s/message/netlink message/
tests: rename nf_* to nfnetlink_*
JingPiao Chen (12):
netlink: decode NETLINK_NETFILTER netlink message types
tests: check decoding of NFNL_SUBSYS_CTNETLINK netlink
+netlink_sock_diag.test
diff --git a/tests/nfnetlink_queue.c b/tests/nfnetlink_queue.c
new file mode 100644
index 000..73ebd9a
--- /dev/null
+++ b/tests/nfnetlink_queue.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved
* netlink.c: Include "xlat/nf_acct_msg_types.h",
"xlat/nf_cthelper_msg_types.h", "xlat/nf_ctnetlink_exp_msg_types.h",
"xlat/nf_ctnetlink_msg_types.h", "xlat/nf_cttimeout_msg_types.h",
"xlat/nf_ipset_msg_types.h", "xlat/nf_nft_compat_msg_types.h",
"xlat/nf_nftables_msg_types.h", "xlat/nf_osf_msg_typ
/nf_ctnetlink_exp.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1
b/tests/nf_acct.c
new file mode 100644
index 000..4faed10
--- /dev/null
+++ b/tests/nf_acct.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+netlink_sock_diag.test
diff --git a/tests/nf_cttimeout.c b/tests/nf_cttimeout.c
new file mode 100644
index 000..404d590
--- /dev/null
+++ b/tests/nf_cttimeout.c
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved
a/tests/nf_nftables.c b/tests/nf_nftables.c
new file mode 100644
index 000..95c3849
--- /dev/null
+++ b/tests/nf_nftables.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source
+netlink_sock_diag.test
diff --git a/tests/nf_cthelper.c b/tests/nf_cthelper.c
new file mode 100644
index 000..7347e10
--- /dev/null
+++ b/tests/nf_cthelper.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved
+netlink_sock_diag.test
diff --git a/tests/nf_nft_compat.c b/tests/nf_nft_compat.c
new file mode 100644
index 000..ca46470
--- /dev/null
+++ b/tests/nf_nft_compat.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved
/nf_ulog.c b/tests/nf_ulog.c
new file mode 100644
index 000..31eb30f
--- /dev/null
+++ b/tests/nf_ulog.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+netlink_sock_diag.test
nlattr_dcbmsg +netlink_sock_diag.test
diff --git a/tests/nf_ctnetlink_exp.c b/tests/nf_ctnetlink_exp.c
new file mode 100644
index 000..337e90b
--- /dev/null
+++ b/tests/nf_ctnetlink_exp.c
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2017 JingPiao
000..59cf5fb
--- /dev/null
+++ b/tests/nf_osf.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that
mode 100644
index 000..1f1f10a
--- /dev/null
+++ b/tests/nf_ipset.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are
file mode 100644
index 000..73ebd9a
--- /dev/null
+++ b/tests/nf_queue.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification
mode 100644
index 000..c3a4d32
--- /dev/null
+++ b/tests/nf_ctnetlink.c
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are
* netlink.c: Include "xlat/nf_acct_msg_types.h",
"xlat/nf_cthelper_msg_types.h", "xlat/nf_ctnetlink_exp_msg_types.h",
"xlat/nf_ctnetlink_msg_types.h", "xlat/nf_cttimeout_msg_types.h",
"xlat/nf_ipset_msg_types.h", "xlat/nf_nft_compat_msg_types.h",
"xlat/nf_nftables_msg_types.h", "xlat/nf_osf_msg_typ
* configure.ac (AC_CHECK_TYPES): Check for struct br_mdb_entry
in .
(AC_CHECK_MEMBERS): Check for 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_entry_a
/nlattr_mdba_router_port.c
new file mode 100644
index 000..af908cd
--- /dev/null
+++ b/tests/nlattr_mdba_router_port.c
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with
000..0b6d928
--- /dev/null
+++ b/tests/nlattr_mdba_mdb_entry.c
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are
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
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
* 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_
/nlattr_mdba_router_port.c
new file mode 100644
index 000..4f546ef
--- /dev/null
+++ b/tests/nlattr_mdba_router_port.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with
000..e333fa9
--- /dev/null
+++ b/tests/nlattr_mdba_mdb_entry.c
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are
* rtnl_tc_action.c (tcamsg_nla_decoders): New array.
(decode_tcamsg): Use it.
---
rtnl_tc_action.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/rtnl_tc_action.c b/rtnl_tc_action.c
index ca0b72b..499c69a 100644
--- a/rtnl_tc_action.c
+++ b/rtnl_tc_action.c
@@ -37
* tests/nlattr_tcmsg.c: Include and .
(main): Check decoding of TCA_STATS and TCA_RATE.
---
tests/nlattr_tcmsg.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/tests/nlattr_tcmsg.c b/tests/nlattr_tcmsg.c
index 00b7ae4..32ce479 100644
--- a/tests/nlattr
/nlattr_tca_stab.c b/tests/nlattr_tca_stab.c
new file mode 100644
index 000..e4524d3
--- /dev/null
+++ b/tests/nlattr_tca_stab.c
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and
/nlattr_tc_stats.c
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met
* configure.ac (AC_CHECK_TYPES): Check for gnet_stats_basic,
gnet_stats_queue, gnet_stats_rate_est,
and gnet_stats_rate_est64 structures in .
And check for struct tc_sizespec in .
* nlattr.h (tc_stats): New prototype.
* rtnl_tc.c: Include , ,
"xlat/rtnl_tca_stab_attrs.h" and "xlat/rtnl_tca_stats_at
/tests/nlattr_ifla_xdp.c
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
/tests/nlattr_ifla_port.c
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following
* configure.ac (AC_CHECK_TYPES): Check for struct ifla_port_vsi
in .
* rtnl_link.c: Include "xlat/rtnl_ifla_info_attrs.h",
"xlat/rtnl_ifla_port_attrs.h", "xlat/rtnl_ifla_port_attrs.h",
"xlat/rtnl_ifla_xdp_attrs.h" and "xlat/xdp_flags.h".
(decode_ifla_linkinfo, decode_ifla_port_vsi,
decode_ifla_port
* tests/nlattr_ifinfomsg.c (IFLA_LINKINFO, IFLA_VF_PORTS,
IFLA_INFO_KIND, IFLA_VF_PORT): New macros.
(main): Check decoding of IFLA_LINKINFO and IFLA_VF_PORTS.
---
tests/nlattr_ifinfomsg.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/tests/nlattr_ifinfomsg.c
--git a/tests/nlattr_ifla_brport.c b/tests/nlattr_ifla_brport.c
new file mode 100644
index 000..258d86e
--- /dev/null
+++ b/tests/nlattr_ifla_brport.c
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved
* tests/nlattr_ndtmsg.c (NDTA_PARMS, NDTPA_IFINDEX): New macros.
(main): Check decoding of NDTA_CONFIG, NDTA_PARMS and NDTA_STATS.
---
tests/nlattr_ndtmsg.c | 75 +++
1 file changed, 75 insertions(+)
diff --git a/tests/nlattr_ndtmsg.c b/tests/nlattr
* tests/nlattr_ifaddrlblmsg.c (main): Check decoding of IFAL_ADDRESS.
---
tests/nlattr_ifaddrlblmsg.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/tests/nlattr_ifaddrlblmsg.c b/tests/nlattr_ifaddrlblmsg.c
index 66ff2a1..6003634 100644
--- a/tests/nlattr_ifaddrlblmsg.c
+++ b/tests/nlatt
* configure.ac (AC_CHECK_TYPES): Check for ndt_config
and ndt_stats structures in .
(AC_CHECK_MEMBERS): Check for ndts_table_fulls field in struct ndt_stats.
* rtnl_neightbl.c: Include "xlat/rtnl_neightbl_parms_attrs.h".
(decode_ndt_config, decode_ndta_parms, decode_ndta_parms): New functions.
(ndt
* configure.ac (AC_CHECK_TYPES): Check for
struct ifla_bridge_id in
* rtnl_link.c: Include "xlat/rtnl_ifla_brport_attrs.h".
(decode_ifla_bridge_id, decode_ifla_protinfo): New functions.
(ifla_brport_nla_decoders): New array.
(ifinfomsg_nla_decoders) : Use decode_ifla_protinfo.
* xlat/rtnl_ifla_brp
* rtnl_addrlabel.c (decode_ifal_address): New function.
(ifaddrlblmsg_nla_decoders): New array.
(decode_ifaddrlblmsg): Use it.
---
rtnl_addrlabel.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/rtnl_addrlabel.c b/rtnl_addrlabel.c
index 53cfb2c..7fc4875
* tests/.gitignore: Add is_linux_mips_n64.
---
tests/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/.gitignore b/tests/.gitignore
index 45f08fc..1d69662 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -148,6 +148,7 @@ ipc_msg
ipc_msgbuf
ipc_sem
ipc_shm
+is_linux_mi
* tests/nlattr_fib_rule_hdr.c: Include .
(FRA_TUN_ID, FRA_UID_RANGE): New macros.
(main): Check decoding of FRA_DST, FRA_UID_RANGE and FRA_TUN_ID.
---
tests/nlattr_fib_rule_hdr.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/tests/nlattr_fib_rule_hdr.c b/tests/
* configure.ac (AC_CHECK_FUNCS): Add be64toh.
(AC_CHECK_TYPES): Check for struct fib_rule_uid_range
in .
* nlattr.c: Include .
(decode_nla_be64): New function.
* nlattr.h (decode_nla_be64): New prototype.
* rtnl_rule.c (decode_rule_addr,
decode_fib_rule_uid_range): New functions.
(fib_rule_hdr_nla_
* rtnl_nsid.c (rtgenmsg_nla_decoders): New array.
(decode_rtgenmsg): Use it.
---
rtnl_nsid.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/rtnl_nsid.c b/rtnl_nsid.c
index e3fe18b..51ce37b 100644
--- a/rtnl_nsid.c
+++ b/rtnl_nsid.c
@@ -37,6 +37,12 @@
#include "xla
* nlattr.c: Include and .
(decode_nla_be16): New function.
* nlattr.h (decode_nla_be16): New prototype.
* rtnl_neigh.c (decode_neigh_addr,
decode_nda_cacheinfo): New functions.
(ndmsg_nla_decoders): New array.
(decode_ndmsg): Use it.
---
nlattr.c | 18 ++
nlattr.h | 1 +
* tests/nlattr_ndmsg.c: Include and .
(NDA_PORT): New macro.
(main): Check decoding of NDA_DST, NDA_CACHEINFO and NDA_PORT.
---
tests/nlattr_ndmsg.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/tests/nlattr_ndmsg.c b/tests/nlattr_ndmsg.c
index 67aee88..8538
* rtnl_netconf.c (netconfmsg_nla_decoders): New array.
(decode_netconfmsg): Use it.
---
rtnl_netconf.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/rtnl_netconf.c b/rtnl_netconf.c
index 7e9b173..f01c543 100644
--- a/rtnl_netconf.c
+++ b/rtnl_netconf.c
@@ -40,6
* defs.h (routing_types): New xlat prototype.
* rtnl_neigh.c (decode_ndmsg): Fix ndm_type decode.
* xlat/nda_types.in: Remove it.
* tests/netlink_route.c (test_rtnl_neigh): Update the test.
* tests/nlattr_ndmsg.c (init_ndmsg, print_ndmsg): Likewise.
---
defs.h| 1 +
rtnl_neigh.c
[1]
https://ppiao.github.io/2017/08/22/strace-gsoc-2017-netlink-socket-parser.html
--
JingPiao Chen
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sd
On Sun, Aug 27, 2017 at 05:28:12PM +0300, Dmitry V. Levin wrote:
> On Sun, Aug 27, 2017 at 09:27:43PM +0800, JingPiao Chen wrote:
> > On Wed, Aug 23, 2017 at 04:09:03AM +0300, Dmitry V. Levin wrote:
> > > On Fri, Aug 18, 2017 at 04:43:56PM +0800, JingPiao Chen wrote:
> > &g
* rtnl_netconf.c (netconfmsg_nla_decoders): New array.
(decode_netconfmsg): Use it.
---
rtnl_netconf.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/rtnl_netconf.c b/rtnl_netconf.c
index 7e9b173..f01c543 100644
--- a/rtnl_netconf.c
+++ b/rtnl_netconf.c
@@ -40,6
* rtnl_nsid.c (rtgenmsg_nla_decoders): New array.
(decode_rtgenmsg): Use it.
---
rtnl_nsid.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/rtnl_nsid.c b/rtnl_nsid.c
index e3fe18b..51ce37b 100644
--- a/rtnl_nsid.c
+++ b/rtnl_nsid.c
@@ -37,6 +37,12 @@
#include "xla
* nlattr.c (decode_nla_be16): New function.
* nlattr.h (decode_nla_be16): New prototype.
* rtnl_neigh.c (decode_neigh_addr,
decode_nda_cacheinfo): New functions.
(ndmsg_nla_decoders): New array.
(decode_ndmsg): Use it.
---
nlattr.c | 16
nlattr.h | 1 +
rtnl_neigh.c | 52
* tests/nlattr_fib_rule_hdr.c: Include .
(FRA_TUN_ID, FRA_UID_RANGE): New macros.
(main): Check decoding of FRA_DST, FRA_UID_RANGE and FRA_TUN_ID.
---
tests/nlattr_fib_rule_hdr.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/tests/nlattr_fib_rule_hdr.c b/tests/nl
* tests/nlattr_ndmsg.c (NDA_PORT): New macro.
(main): Check decoding of NDA_DST, NDA_CACHEINFO and NDA_PORT.
---
tests/nlattr_ndmsg.c | 29 +
1 file changed, 29 insertions(+)
diff --git a/tests/nlattr_ndmsg.c b/tests/nlattr_ndmsg.c
index adf5147..d96 100644
--- a/t
* configure.ac (AC_CHECK_HEADERS): Add linux/if_link.h.
(AC_CHECK_TYPES): Check for
struct rtnl_link_stats64 in .
(AC_CHECK_MEMBERS): Check for
rx_nohandler field in struct rtnl_link_stats/rtnl_link_stats64.
* rtnl_link.c: Include .
(decode_rtnl_link_stats, decode_rtnl_link_ifmap,
decode_rtnl_link_
* tests/nlattr_ifinfomsg.c: Include and .
(IFLA_LINK_NETNSID): New macro.
(main): Check decoding of IFLA_LINK_NETNSID,
IFLA_STATS, IFLA_MAP and IFLA_STATS64.
---
tests/nlattr_ifinfomsg.c | 227 +++
1 file changed, 227 insertions(+)
diff --git a/tests/n
* configure.ac (AC_CHECK_TYPES): Check for
struct fib_rule_uid_range in .
* nlattr.c: Include .
(decode_nla_be64): New function.
* nlattr.h (decode_nla_be64): New prototype.
* rtnl_rule.c (decode_rule_addr,
decode_fib_rule_uid_range): New functions.
(fib_rule_hdr_nla_decoders): New array.
(decode_f
On Wed, Aug 23, 2017 at 04:09:03AM +0300, Dmitry V. Levin wrote:
> On Fri, Aug 18, 2017 at 04:43:56PM +0800, JingPiao Chen wrote:
> > The place where should review stricter:
> >
> > * decode_ifla_address(): AF_INET and AF_INET6 address print format.
> > * decode_rtnl_li
On Wed, Aug 23, 2017 at 04:30:28AM +0300, Dmitry V. Levin wrote:
> On Wed, Aug 23, 2017 at 08:45:18AM +0800, JingPiao Chen wrote:
> > * configure.ac (AC_CHECK_TYPES): Check for
> > rta_mfc_stats and rtvia structures in .
> > * nlattr.c (decode_nla_ifindex): New fun
* tests/nlattr_rtmsg.c (LWTUNNEL_ENCAP_NONE,
RTA_ENCAP_TYPE): New macros.
(main): Check decoding of RTA_DST, RTA_OIF, RTA_METRICS,
RTA_MULTIPATH, RTA_CACHEINFO, RTA_MFC_STATS,
RTA_VIA and RTA_ENCAP_TYPE.
---
tests/nlattr_rtmsg.c | 112 +++
1 file cha
* configure.ac (AC_CHECK_TYPES): Check for
rta_mfc_stats and rtvia structures in .
* nlattr.c (decode_nla_ifindex): New function.
* nlattr.h (decode_nla_ifindex): New prototype.
* rtnl_route.c (decode_route_addr, decode_rta_metrics,
decode_rta_multipath, decode_rta_cacheinfo,
decode_rta_mfc_stats,
-gsoc-2017-netlink-socket-parser.html
--
JingPiao Chen
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/sla
* tests/nlattr_ifaddrmsg.c: Include .
(IFA_FLAGS, SET_IFA_FAMILY): New macros.
(init_ifaddrmsg): Set ifaddrmsg.ifa_family field.
(print_ifaddrmsg): Print ifaddrmsg.ifa_family field use %s format.
(main): Check decoding of IFA_ADDRESS, IFA_CACHEINFO and IFA_FLAGS.
---
tests/nlattr_ifaddrmsg.c | 70
/address.c
new file mode 100644
index 000..44b26f5
--- /dev/null
+++ b/address.c
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017 JingPiao Chen
+ * Copyright (c) 2017 The strace developers.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
decode_inet_addr only use to decode inet_diag_hostcond.addr,
rename to decode_inet_diag_hostcond_addr.
* netlink_inet_diag.c (decode_inet_addr): Rename to
decode_inet_diag_hostcond_addr.
(decode_inet_diag_hostcond): Replace decode_inet_addr with
decode_inet_diag_hostcond_addr.
---
netlink_inet_di
* tests/nlattr_ifaddrmsg.c: Include .
(IFA_FLAGS, SET_IFA_FAMILY): New macros.
(init_ifaddrmsg): Set ifaddrmsg.ifa_family field.
(print_ifaddrmsg): Print ifaddrmsg.ifa_family field use %s format.
(main): Check decoding of IFA_ADDRESS, IFA_CACHEINFO and IFA_FLAGS.
---
tests/nlattr_ifaddrmsg.c | 65
* rtnl_addr.c: Include and .
(decode_ifa_address, decode_ifa_cacheinfo,
decode_ifa_flags): New functions.
(ifaddrmsg_nla_decoders): New array.
(decode_ifaddrmsg): Use it.
---
rtnl_addr.c | 94 -
1 file changed, 93 insertions(+), 1 deleti
On Sun, Aug 20, 2017 at 12:47:56PM +0300, Dmitry V. Levin wrote:
> On Sun, Aug 20, 2017 at 04:06:25PM +0800, JingPiao Chen wrote:
> > On Sun, Aug 20, 2017 at 01:33:53AM +0300, Dmitry V. Levin wrote:
> > > On Sat, Aug 19, 2017 at 09:50:10AM +0800, JingPiao Chen wrote:
>
On Sun, Aug 20, 2017 at 01:35:58AM +0300, Dmitry V. Levin wrote:
> On Sat, Aug 19, 2017 at 09:50:11AM +0800, JingPiao Chen wrote:
> > * gen_tests.in (nlattr_ifinfomsg): Replace netlink_sock_diag.test
> > with netlink_sock_diag-v.sh, using verbose to check decoding of arr
On Sun, Aug 20, 2017 at 01:33:53AM +0300, Dmitry V. Levin wrote:
> On Sat, Aug 19, 2017 at 09:50:10AM +0800, JingPiao Chen wrote:
> > * configure.ac (AC_CHECK_HEADERS): Add linux/if_link.h.
> > (AC_CHECK_TYPES): Check for struct rtnl_link_stats64 in linux/if_link.h.
> > (AC_
* configure.ac (AC_CHECK_HEADERS): Add linux/if_link.h.
(AC_CHECK_TYPES): Check for struct rtnl_link_stats64 in linux/if_link.h.
(AC_CHECK_MEMBERS): Check for rx_nohandler field
in struct rtnl_link_stats and struct rtnl_link_stats64.
* rtnl_link.c: Include , ,
and .
(min_ifla_address_len, ifla_add
* gen_tests.in (nlattr_ifinfomsg): Replace netlink_sock_diag.test
with netlink_sock_diag-v.sh, using verbose to check decoding of array.
* tests/nlattr_ifinfomsg.c: Include , ,
and .
(SET_IFI_TYPE, IFLA_PHYS_PORT_ID, IFLA_LINK_NETNSID): New macros.
(init_ifinfomsg): Set ifinfomsg.ifi_type field.
(
* gen_tests.in (nlattr_ifinfomsg): Replace netlink_sock_diag.test
with netlink_sock_diag.test, using verbose to check decoding of array.
* tests/nlattr_ifinfomsg.c: Include and .
(SET_IFI_TYPE, IFLA_PHYS_PORT_ID, IFLA_LINK_NETNSID): New macros.
(init_ifinfomsg): Set ifinfomsg.ifi_type field.
(prin
g)
{
struct ifinfomsg ifinfo = { .ifi_family = family };
@@ -66,6 +321,8 @@ DECL_NETLINK_ROUTE_DECODER(decode_ifinfomsg)
if (decode_nla && len > offset) {
tprints(", ");
decode_nlattr(tcp, addr + offset, len - offset,
The place where should review stricter:
* decode_ifla_address(): AF_INET and AF_INET6 address print format.
* decode_rtnl_link_ifmap(): mpersify struct rtnl_link_ifmap.
* tests: test address should change the header message, I use two global
variable to achieve this goal.
JingPiao Chen (2
On Wed, Aug 16, 2017 at 08:55:13AM +0300, Dmitry V. Levin wrote:
> On Tue, Aug 15, 2017 at 12:41:23PM +0800, JingPiao Chen wrote:
> > * tests/nlattr_ifinfomsg.c: New file.
> > * tests/gen_tests.in (nlattr_ifinfomsg): New entry.
> > * tests/pure_executables.list: Add nlattr_i
1 - 100 of 549 matches
Mail list logo