extern structstd.os.linux.sockaddr.vm[src]

Address structure for vSockets

Fields

family: sa_family_t = AF.VSOCK
reserved1: u16 = 0
port: u32
cid: u32
flags: u8
zero: [3]u8 = [_]u8{0} ** 3

The total size of this structure should be exactly the same as that of struct sockaddr.

Source Code

Source code
pub const vm = extern struct {
    family: sa_family_t = AF.VSOCK,
    reserved1: u16 = 0,
    port: u32,
    cid: u32,
    flags: u8,

    /// The total size of this structure should be exactly the same as that of struct sockaddr.
    zero: [3]u8 = [_]u8{0} ** 3,
    comptime {
        std.debug.assert(@sizeOf(vm) == @sizeOf(sockaddr));
    }
}