summaryrefslogtreecommitdiff
path: root/net/mctp/test/utils.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2025-07-10 11:55:57 +0300
committerPaolo Abeni <pabeni@redhat.com>2025-07-15 13:08:39 +0300
commit4ec4b7fc04a7217a6a581ac132bd0fb6abc2f4d5 (patch)
tree481a43913fd8a54caa669584b28bfcd862cf1a4c /net/mctp/test/utils.h
parent5000268c298219396cc01b8c3363a578cd168085 (diff)
downloadlinux-4ec4b7fc04a7217a6a581ac132bd0fb6abc2f4d5.tar.xz
net: mctp: Add test for conflicting bind()s
Test pairwise combinations of bind addresses and types. Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Link: https://patch.msgid.link/20250710-mctp-bind-v4-4-8ec2f6460c56@codeconstruct.com.au Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/mctp/test/utils.h')
-rw-r--r--net/mctp/test/utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/mctp/test/utils.h b/net/mctp/test/utils.h
index f10d1d9066cc..7dd1a92ab770 100644
--- a/net/mctp/test/utils.h
+++ b/net/mctp/test/utils.h
@@ -31,6 +31,12 @@ struct mctp_test_pktqueue {
struct sk_buff_head pkts;
};
+struct mctp_test_bind_setup {
+ mctp_eid_t bind_addr;
+ int bind_net;
+ u8 bind_type;
+};
+
struct mctp_test_dev *mctp_test_create_dev(void);
struct mctp_test_dev *mctp_test_create_dev_lladdr(unsigned short lladdr_len,
const unsigned char *lladdr);
@@ -61,4 +67,8 @@ struct sk_buff *__mctp_test_create_skb_data(const struct mctp_hdr *hdr,
#define mctp_test_create_skb_data(h, d) \
__mctp_test_create_skb_data(h, d, sizeof(*d))
+void mctp_test_bind_run(struct kunit *test,
+ const struct mctp_test_bind_setup *setup,
+ int *ret_bind_errno, struct socket **sock);
+
#endif /* __NET_MCTP_TEST_UTILS_H */