![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 0002 #ifndef _UAPI_VSOCKMON_H 0003 #define _UAPI_VSOCKMON_H 0004 0005 #include <linux/virtio_vsock.h> 0006 0007 /* 0008 * vsockmon is the AF_VSOCK packet capture device. Packets captured have the 0009 * following layout: 0010 * 0011 * +-----------------------------------+ 0012 * | vsockmon header | 0013 * | (struct af_vsockmon_hdr) | 0014 * +-----------------------------------+ 0015 * | transport header | 0016 * | (af_vsockmon_hdr->len bytes long) | 0017 * +-----------------------------------+ 0018 * | payload | 0019 * | (until end of packet) | 0020 * +-----------------------------------+ 0021 * 0022 * The vsockmon header is a transport-independent description of the packet. 0023 * It duplicates some of the information from the transport header so that 0024 * no transport-specific knowledge is necessary to process packets. 0025 * 0026 * The transport header is useful for low-level transport-specific packet 0027 * analysis. Transport type is given in af_vsockmon_hdr->transport and 0028 * transport header length is given in af_vsockmon_hdr->len. 0029 * 0030 * If af_vsockmon_hdr->op is AF_VSOCK_OP_PAYLOAD then the payload follows the 0031 * transport header. Other ops do not have a payload. 0032 */ 0033 0034 struct af_vsockmon_hdr { 0035 __le64 src_cid; 0036 __le64 dst_cid; 0037 __le32 src_port; 0038 __le32 dst_port; 0039 __le16 op; /* enum af_vsockmon_op */ 0040 __le16 transport; /* enum af_vsockmon_transport */ 0041 __le16 len; /* Transport header length */ 0042 __u8 reserved[2]; 0043 }; 0044 0045 enum af_vsockmon_op { 0046 AF_VSOCK_OP_UNKNOWN = 0, 0047 AF_VSOCK_OP_CONNECT = 1, 0048 AF_VSOCK_OP_DISCONNECT = 2, 0049 AF_VSOCK_OP_CONTROL = 3, 0050 AF_VSOCK_OP_PAYLOAD = 4, 0051 }; 0052 0053 enum af_vsockmon_transport { 0054 AF_VSOCK_TRANSPORT_UNKNOWN = 0, 0055 AF_VSOCK_TRANSPORT_NO_INFO = 1, /* No transport information */ 0056 0057 /* Transport header type: struct virtio_vsock_hdr */ 0058 AF_VSOCK_TRANSPORT_VIRTIO = 2, 0059 }; 0060 0061 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |