#include <sys/vsock.h>

sys/vsock.h

6 macros · 3 structs · 1 typedef

macroVMADDR_CID_ANY

#define VMADDR_CID_ANY (-1U)

macroVMADDR_CID_HYPERVISOR

#define VMADDR_CID_HYPERVISOR 0

macroVMADDR_CID_RESERVED

#define VMADDR_CID_RESERVED 1

macroVMADDR_CID_HOST

#define VMADDR_CID_HOST 2

macroVMADDR_PORT_ANY

#define VMADDR_PORT_ANY (-1U)

macroIOCTL_VM_SOCKETS_GET_LOCAL_CID

#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IOR('s',  209, uint32_t)

structsockaddr_vm

size 12, align 1 · packed
__uint8_tsvm_lentotal length
sa_family_tsvm_familyAddress family: AF_VSOCK
__uint16_tsvm_reserved1
__uint32_tsvm_portPort # in host byte order
__uint32_tsvm_cidAddress in host byte order

typedefvsock_gen_t

typedef u_quad_t vsock_gen_t

structxvsockpcb

size 168, align 8
u_int32_txv_lenlength of this structure
u_int64_txv_vsockpp
u_int32_txvp_local_cidlocal address cid
u_int32_txvp_local_portlocal address port
u_int32_txvp_remote_cidremote address cid
u_int32_txvp_remote_portremote address port
u_int32_txvp_rxcntbytes received
u_int32_txvp_txcntbytes transmitted
u_int32_txvp_peer_rxhiwatpeer's receive buffer
u_int32_txvp_peer_rxcntbytes received by peer
pid_txvp_last_pidlast pid
vsock_gen_txvp_gencntvsock generation count
struct xsocketxv_socket

structxvsockpgen

size 32, align 8
u_int32_txvg_lenlength of this structure
u_int64_txvg_countnumber of PCBs at this time
vsock_gen_txvg_gengeneration count at this time
so_gen_txvg_sogencurrent socket generation count