.. | .. |
---|
10 | 10 | struct inet_diag_handler { |
---|
11 | 11 | void (*dump)(struct sk_buff *skb, |
---|
12 | 12 | struct netlink_callback *cb, |
---|
13 | | - const struct inet_diag_req_v2 *r, |
---|
14 | | - struct nlattr *bc); |
---|
| 13 | + const struct inet_diag_req_v2 *r); |
---|
15 | 14 | |
---|
16 | | - int (*dump_one)(struct sk_buff *in_skb, |
---|
17 | | - const struct nlmsghdr *nlh, |
---|
| 15 | + int (*dump_one)(struct netlink_callback *cb, |
---|
18 | 16 | const struct inet_diag_req_v2 *req); |
---|
19 | 17 | |
---|
20 | 18 | void (*idiag_get_info)(struct sock *sk, |
---|
.. | .. |
---|
35 | 33 | __u16 idiag_info_size; |
---|
36 | 34 | }; |
---|
37 | 35 | |
---|
| 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 | + |
---|
38 | 45 | struct inet_connection_sock; |
---|
39 | 46 | 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); |
---|
44 | 50 | void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb, |
---|
45 | 51 | struct netlink_callback *cb, |
---|
46 | | - const struct inet_diag_req_v2 *r, |
---|
47 | | - struct nlattr *bc); |
---|
| 52 | + const struct inet_diag_req_v2 *r); |
---|
48 | 53 | 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, |
---|
50 | 55 | const struct inet_diag_req_v2 *req); |
---|
51 | 56 | |
---|
52 | 57 | struct sock *inet_diag_find_one_icsk(struct net *net, |
---|
.. | .. |
---|
66 | 71 | + nla_total_size(1) /* INET_DIAG_SKV6ONLY */ |
---|
67 | 72 | #endif |
---|
68 | 73 | + 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 | + ; |
---|
70 | 81 | } |
---|
71 | 82 | int inet_diag_msg_attrs_fill(struct sock *sk, struct sk_buff *skb, |
---|
72 | 83 | struct inet_diag_msg *r, int ext, |
---|