mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 09:56:55 +07:00
3fd22af808
Previously, there was no clear distinction between the inet protocols that used struct tcp_info to report information and those that didn't. This change adds a specific size attribute to the inet_diag_handler struct which defines these interfaces. This will make dispatching sock_diag get_info requests identical for all inet protocols in a following patch. Tested: ss -au Tested: ss -at Signed-off-by: Craig Gallek <kraig@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
49 lines
1.4 KiB
C
49 lines
1.4 KiB
C
#ifndef _INET_DIAG_H_
|
|
#define _INET_DIAG_H_ 1
|
|
|
|
#include <uapi/linux/inet_diag.h>
|
|
|
|
struct sock;
|
|
struct inet_hashinfo;
|
|
struct nlattr;
|
|
struct nlmsghdr;
|
|
struct sk_buff;
|
|
struct netlink_callback;
|
|
|
|
struct inet_diag_handler {
|
|
void (*dump)(struct sk_buff *skb,
|
|
struct netlink_callback *cb,
|
|
const struct inet_diag_req_v2 *r,
|
|
struct nlattr *bc);
|
|
|
|
int (*dump_one)(struct sk_buff *in_skb,
|
|
const struct nlmsghdr *nlh,
|
|
const struct inet_diag_req_v2 *req);
|
|
|
|
void (*idiag_get_info)(struct sock *sk,
|
|
struct inet_diag_msg *r,
|
|
void *info);
|
|
__u16 idiag_type;
|
|
__u16 idiag_info_size;
|
|
};
|
|
|
|
struct inet_connection_sock;
|
|
int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
|
|
struct sk_buff *skb, const struct inet_diag_req_v2 *req,
|
|
struct user_namespace *user_ns,
|
|
u32 pid, u32 seq, u16 nlmsg_flags,
|
|
const struct nlmsghdr *unlh);
|
|
void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb,
|
|
struct netlink_callback *cb,
|
|
const struct inet_diag_req_v2 *r,
|
|
struct nlattr *bc);
|
|
int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo,
|
|
struct sk_buff *in_skb, const struct nlmsghdr *nlh,
|
|
const struct inet_diag_req_v2 *req);
|
|
|
|
int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk);
|
|
|
|
extern int inet_diag_register(const struct inet_diag_handler *handler);
|
|
extern void inet_diag_unregister(const struct inet_diag_handler *handler);
|
|
#endif /* _INET_DIAG_H_ */
|