mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 17:46:15 +07:00
6f52b16c5b
Many user space API headers are missing licensing information, which makes it hard for compliance tools to determine the correct license. By default are files without license information under the default license of the kernel, which is GPLV2. Marking them GPLV2 would exclude them from being included in non GPLV2 code, which is obviously not intended. The user space API headers fall under the syscall exception which is in the kernels COPYING file: NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work". otherwise syscall usage would not be possible. Update the files which contain no license information with an SPDX license identifier. The chosen identifier is 'GPL-2.0 WITH Linux-syscall-note' which is the officially assigned identifier for the Linux syscall exception. SPDX license identifiers are a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. See the previous patch in this series for the methodology of how this patch was researched. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
62 lines
1.9 KiB
C
62 lines
1.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _UAPI_VSOCKMON_H
|
|
#define _UAPI_VSOCKMON_H
|
|
|
|
#include <linux/virtio_vsock.h>
|
|
|
|
/*
|
|
* vsockmon is the AF_VSOCK packet capture device. Packets captured have the
|
|
* following layout:
|
|
*
|
|
* +-----------------------------------+
|
|
* | vsockmon header |
|
|
* | (struct af_vsockmon_hdr) |
|
|
* +-----------------------------------+
|
|
* | transport header |
|
|
* | (af_vsockmon_hdr->len bytes long) |
|
|
* +-----------------------------------+
|
|
* | payload |
|
|
* | (until end of packet) |
|
|
* +-----------------------------------+
|
|
*
|
|
* The vsockmon header is a transport-independent description of the packet.
|
|
* It duplicates some of the information from the transport header so that
|
|
* no transport-specific knowledge is necessary to process packets.
|
|
*
|
|
* The transport header is useful for low-level transport-specific packet
|
|
* analysis. Transport type is given in af_vsockmon_hdr->transport and
|
|
* transport header length is given in af_vsockmon_hdr->len.
|
|
*
|
|
* If af_vsockmon_hdr->op is AF_VSOCK_OP_PAYLOAD then the payload follows the
|
|
* transport header. Other ops do not have a payload.
|
|
*/
|
|
|
|
struct af_vsockmon_hdr {
|
|
__le64 src_cid;
|
|
__le64 dst_cid;
|
|
__le32 src_port;
|
|
__le32 dst_port;
|
|
__le16 op; /* enum af_vsockmon_op */
|
|
__le16 transport; /* enum af_vsockmon_transport */
|
|
__le16 len; /* Transport header length */
|
|
__u8 reserved[2];
|
|
};
|
|
|
|
enum af_vsockmon_op {
|
|
AF_VSOCK_OP_UNKNOWN = 0,
|
|
AF_VSOCK_OP_CONNECT = 1,
|
|
AF_VSOCK_OP_DISCONNECT = 2,
|
|
AF_VSOCK_OP_CONTROL = 3,
|
|
AF_VSOCK_OP_PAYLOAD = 4,
|
|
};
|
|
|
|
enum af_vsockmon_transport {
|
|
AF_VSOCK_TRANSPORT_UNKNOWN = 0,
|
|
AF_VSOCK_TRANSPORT_NO_INFO = 1, /* No transport information */
|
|
|
|
/* Transport header type: struct virtio_vsock_hdr */
|
|
AF_VSOCK_TRANSPORT_VIRTIO = 2,
|
|
};
|
|
|
|
#endif
|