hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/linux/inet_diag.h
....@@ -10,11 +10,9 @@
1010 struct inet_diag_handler {
1111 void (*dump)(struct sk_buff *skb,
1212 struct netlink_callback *cb,
13
- const struct inet_diag_req_v2 *r,
14
- struct nlattr *bc);
13
+ const struct inet_diag_req_v2 *r);
1514
16
- int (*dump_one)(struct sk_buff *in_skb,
17
- const struct nlmsghdr *nlh,
15
+ int (*dump_one)(struct netlink_callback *cb,
1816 const struct inet_diag_req_v2 *req);
1917
2018 void (*idiag_get_info)(struct sock *sk,
....@@ -35,18 +33,25 @@
3533 __u16 idiag_info_size;
3634 };
3735
36
+struct bpf_sk_storage_diag;
37
+struct inet_diag_dump_data {
38
+ struct nlattr *req_nlas[__INET_DIAG_REQ_MAX];
39
+#define inet_diag_nla_bc req_nlas[INET_DIAG_REQ_BYTECODE]
40
+#define inet_diag_nla_bpf_stgs req_nlas[INET_DIAG_REQ_SK_BPF_STORAGES]
41
+
42
+ struct bpf_sk_storage_diag *bpf_stg_diag;
43
+};
44
+
3845 struct inet_connection_sock;
3946 int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
40
- struct sk_buff *skb, const struct inet_diag_req_v2 *req,
41
- struct user_namespace *user_ns,
42
- u32 pid, u32 seq, u16 nlmsg_flags,
43
- const struct nlmsghdr *unlh, bool net_admin);
47
+ struct sk_buff *skb, struct netlink_callback *cb,
48
+ const struct inet_diag_req_v2 *req,
49
+ u16 nlmsg_flags, bool net_admin);
4450 void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb,
4551 struct netlink_callback *cb,
46
- const struct inet_diag_req_v2 *r,
47
- struct nlattr *bc);
52
+ const struct inet_diag_req_v2 *r);
4853 int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo,
49
- struct sk_buff *in_skb, const struct nlmsghdr *nlh,
54
+ struct netlink_callback *cb,
5055 const struct inet_diag_req_v2 *req);
5156
5257 struct sock *inet_diag_find_one_icsk(struct net *net,
....@@ -66,7 +71,13 @@
6671 + nla_total_size(1) /* INET_DIAG_SKV6ONLY */
6772 #endif
6873 + nla_total_size(4) /* INET_DIAG_MARK */
69
- + nla_total_size(4); /* INET_DIAG_CLASS_ID */
74
+ + nla_total_size(4) /* INET_DIAG_CLASS_ID */
75
+#ifdef CONFIG_SOCK_CGROUP_DATA
76
+ + nla_total_size_64bit(sizeof(u64)) /* INET_DIAG_CGROUP_ID */
77
+#endif
78
+ + nla_total_size(sizeof(struct inet_diag_sockopt))
79
+ /* INET_DIAG_SOCKOPT */
80
+ ;
7081 }
7182 int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb,
7283 struct inet_diag_msg *r, int ext,