mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 14:43:58 +08:00
a36b38aa2a
This patch adds the sock_diag interface for querying sockets from user space. Tools like iproute2 ss(8) can use this interface to list open AF_XDP sockets. The user-space ABI is defined in linux/xdp_diag.h and includes netlink request and response structs. The request can query sockets and the response contains socket information about the rings, umems, inode and more. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
13 lines
225 B
C
13 lines
225 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright(c) 2019 Intel Corporation. */
|
|
|
|
#ifndef XSK_H_
|
|
#define XSK_H_
|
|
|
|
static inline struct xdp_sock *xdp_sk(struct sock *sk)
|
|
{
|
|
return (struct xdp_sock *)sk;
|
|
}
|
|
|
|
#endif /* XSK_H_ */
|