From 9b8a97db9ec4b795e29e72289005fbc58484ebeb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 9 Apr 2024 15:14:35 +0200 Subject: Adding upstream version 6.8.0. Signed-off-by: Daniel Baumann --- misc/ss_util.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 misc/ss_util.h (limited to 'misc/ss_util.h') diff --git a/misc/ss_util.h b/misc/ss_util.h new file mode 100644 index 0000000..37936c6 --- /dev/null +++ b/misc/ss_util.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef __SS_UTIL_H__ +#define __SS_UTIL_H__ + +#include +#include + +#define MAGIC_SEQ 123456 + +#define DIAG_REQUEST(_req, _r) \ + struct { \ + struct nlmsghdr nlh; \ + _r; \ + } _req = { \ + .nlh = { \ + .nlmsg_type = SOCK_DIAG_BY_FAMILY, \ + .nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST,\ + .nlmsg_seq = MAGIC_SEQ, \ + .nlmsg_len = sizeof(_req), \ + }, \ + } + +#endif /* __SS_UTIL_H__ */ -- cgit v1.2.3