mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-01 22:57:29 -04:00
unix: support vsock for darwin
Change-Id: Id53e2b0d0dc3b83762bb4ccc001d4e40f738de73 Reviewed-on: https://go-review.googlesource.com/c/sys/+/352209 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
b1ebd4e100
commit
2c5d950f24
+5
-2
@@ -54,7 +54,7 @@ includes_AIX='
|
|||||||
|
|
||||||
includes_Darwin='
|
includes_Darwin='
|
||||||
#define _DARWIN_C_SOURCE
|
#define _DARWIN_C_SOURCE
|
||||||
#define KERNEL
|
#define KERNEL 1
|
||||||
#define _DARWIN_USE_64_BIT_INODE
|
#define _DARWIN_USE_64_BIT_INODE
|
||||||
#define __APPLE_USE_RFC_3542
|
#define __APPLE_USE_RFC_3542
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -75,6 +75,7 @@ includes_Darwin='
|
|||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/xattr.h>
|
#include <sys/xattr.h>
|
||||||
|
#include <sys/vsock.h>
|
||||||
#include <net/bpf.h>
|
#include <net/bpf.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <net/if_types.h>
|
#include <net/if_types.h>
|
||||||
@@ -82,6 +83,9 @@ includes_Darwin='
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
|
// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
|
||||||
|
#define TIOCREMOTE 0x80047469
|
||||||
'
|
'
|
||||||
|
|
||||||
includes_DragonFly='
|
includes_DragonFly='
|
||||||
@@ -466,7 +470,6 @@ ccflags="$@"
|
|||||||
$2 !~ /^EQUIV_/ &&
|
$2 !~ /^EQUIV_/ &&
|
||||||
$2 !~ /^EXPR_/ &&
|
$2 !~ /^EXPR_/ &&
|
||||||
$2 !~ /^EVIOC/ &&
|
$2 !~ /^EVIOC/ &&
|
||||||
$2 !~ /^EV_/ &&
|
|
||||||
$2 ~ /^E[A-Z0-9_]+$/ ||
|
$2 ~ /^E[A-Z0-9_]+$/ ||
|
||||||
$2 ~ /^B[0-9_]+$/ ||
|
$2 ~ /^B[0-9_]+$/ ||
|
||||||
$2 ~ /^(OLD|NEW)DEV$/ ||
|
$2 ~ /^(OLD|NEW)DEV$/ ||
|
||||||
|
|||||||
+19
-1
@@ -16,7 +16,7 @@ package unix
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
#define __DARWIN_UNIX03 0
|
#define __DARWIN_UNIX03 0
|
||||||
#define KERNEL
|
#define KERNEL 1
|
||||||
#define _DARWIN_USE_64_BIT_INODE
|
#define _DARWIN_USE_64_BIT_INODE
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -47,6 +47,7 @@ package unix
|
|||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
#include <sys/vsock.h>
|
||||||
#include <net/bpf.h>
|
#include <net/bpf.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <net/if_dl.h>
|
#include <net/if_dl.h>
|
||||||
@@ -153,6 +154,18 @@ type RawSockaddrAny C.struct_sockaddr_any
|
|||||||
|
|
||||||
type RawSockaddrCtl C.struct_sockaddr_ctl
|
type RawSockaddrCtl C.struct_sockaddr_ctl
|
||||||
|
|
||||||
|
type RawSockaddrVM C.struct_sockaddr_vm
|
||||||
|
|
||||||
|
type XVSockPCB C.struct_xvsockpcb
|
||||||
|
|
||||||
|
type XSocket C.struct_xsocket
|
||||||
|
|
||||||
|
type XSocket64 C.struct_xsocket64
|
||||||
|
|
||||||
|
type XSockbuf C.struct_xsockbuf
|
||||||
|
|
||||||
|
type XVSockPgen C.struct_xvsockpgen
|
||||||
|
|
||||||
type _Socklen C.socklen_t
|
type _Socklen C.socklen_t
|
||||||
|
|
||||||
type Xucred C.struct_xucred
|
type Xucred C.struct_xucred
|
||||||
@@ -186,6 +199,11 @@ const (
|
|||||||
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
|
||||||
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
|
||||||
SizeofSockaddrCtl = C.sizeof_struct_sockaddr_ctl
|
SizeofSockaddrCtl = C.sizeof_struct_sockaddr_ctl
|
||||||
|
SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm
|
||||||
|
SizeofXvsockpcb = C.sizeof_struct_xvsockpcb
|
||||||
|
SizeofXSocket = C.sizeof_struct_xsocket
|
||||||
|
SizeofXSockbuf = C.sizeof_struct_xsockbuf
|
||||||
|
SizeofXVSockPgen = C.sizeof_struct_xvsockpgen
|
||||||
SizeofXucred = C.sizeof_struct_xucred
|
SizeofXucred = C.sizeof_struct_xucred
|
||||||
SizeofLinger = C.sizeof_struct_linger
|
SizeofLinger = C.sizeof_struct_linger
|
||||||
SizeofIovec = C.sizeof_struct_iovec
|
SizeofIovec = C.sizeof_struct_iovec
|
||||||
|
|||||||
@@ -130,8 +130,9 @@ const (
|
|||||||
ATTR_VOL_SIZE = 0x4
|
ATTR_VOL_SIZE = 0x4
|
||||||
ATTR_VOL_SPACEAVAIL = 0x10
|
ATTR_VOL_SPACEAVAIL = 0x10
|
||||||
ATTR_VOL_SPACEFREE = 0x8
|
ATTR_VOL_SPACEFREE = 0x8
|
||||||
|
ATTR_VOL_SPACEUSED = 0x800000
|
||||||
ATTR_VOL_UUID = 0x40000
|
ATTR_VOL_UUID = 0x40000
|
||||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
ATTR_VOL_VALIDMASK = 0xf087ffff
|
||||||
B0 = 0x0
|
B0 = 0x0
|
||||||
B110 = 0x6e
|
B110 = 0x6e
|
||||||
B115200 = 0x1c200
|
B115200 = 0x1c200
|
||||||
@@ -661,6 +662,7 @@ const (
|
|||||||
IN_CLASSD_NSHIFT = 0x1c
|
IN_CLASSD_NSHIFT = 0x1c
|
||||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||||
IN_LOOPBACKNET = 0x7f
|
IN_LOOPBACKNET = 0x7f
|
||||||
|
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
||||||
IPPROTO_3PC = 0x22
|
IPPROTO_3PC = 0x22
|
||||||
IPPROTO_ADFS = 0x44
|
IPPROTO_ADFS = 0x44
|
||||||
IPPROTO_AH = 0x33
|
IPPROTO_AH = 0x33
|
||||||
@@ -1384,6 +1386,10 @@ const (
|
|||||||
SO_SNDTIMEO = 0x1005
|
SO_SNDTIMEO = 0x1005
|
||||||
SO_TIMESTAMP = 0x400
|
SO_TIMESTAMP = 0x400
|
||||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
||||||
|
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
SO_UPCALLCLOSEWAIT = 0x1027
|
SO_UPCALLCLOSEWAIT = 0x1027
|
||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
@@ -1429,6 +1435,21 @@ const (
|
|||||||
TCOFLUSH = 0x2
|
TCOFLUSH = 0x2
|
||||||
TCOOFF = 0x1
|
TCOOFF = 0x1
|
||||||
TCOON = 0x2
|
TCOON = 0x2
|
||||||
|
TCPOPT_CC = 0xb
|
||||||
|
TCPOPT_CCECHO = 0xd
|
||||||
|
TCPOPT_CCNEW = 0xc
|
||||||
|
TCPOPT_EOL = 0x0
|
||||||
|
TCPOPT_FASTOPEN = 0x22
|
||||||
|
TCPOPT_MAXSEG = 0x2
|
||||||
|
TCPOPT_NOP = 0x1
|
||||||
|
TCPOPT_SACK = 0x5
|
||||||
|
TCPOPT_SACK_HDR = 0x1010500
|
||||||
|
TCPOPT_SACK_PERMITTED = 0x4
|
||||||
|
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
||||||
|
TCPOPT_SIGNATURE = 0x13
|
||||||
|
TCPOPT_TIMESTAMP = 0x8
|
||||||
|
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||||
|
TCPOPT_WINDOW = 0x3
|
||||||
TCP_CONNECTIONTIMEOUT = 0x20
|
TCP_CONNECTIONTIMEOUT = 0x20
|
||||||
TCP_CONNECTION_INFO = 0x106
|
TCP_CONNECTION_INFO = 0x106
|
||||||
TCP_ENABLE_ECN = 0x104
|
TCP_ENABLE_ECN = 0x104
|
||||||
@@ -1531,6 +1552,11 @@ const (
|
|||||||
VINTR = 0x8
|
VINTR = 0x8
|
||||||
VKILL = 0x5
|
VKILL = 0x5
|
||||||
VLNEXT = 0xe
|
VLNEXT = 0xe
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x10
|
VMIN = 0x10
|
||||||
VM_LOADAVG = 0x2
|
VM_LOADAVG = 0x2
|
||||||
VM_MACHFACTOR = 0x4
|
VM_MACHFACTOR = 0x4
|
||||||
|
|||||||
@@ -130,8 +130,9 @@ const (
|
|||||||
ATTR_VOL_SIZE = 0x4
|
ATTR_VOL_SIZE = 0x4
|
||||||
ATTR_VOL_SPACEAVAIL = 0x10
|
ATTR_VOL_SPACEAVAIL = 0x10
|
||||||
ATTR_VOL_SPACEFREE = 0x8
|
ATTR_VOL_SPACEFREE = 0x8
|
||||||
|
ATTR_VOL_SPACEUSED = 0x800000
|
||||||
ATTR_VOL_UUID = 0x40000
|
ATTR_VOL_UUID = 0x40000
|
||||||
ATTR_VOL_VALIDMASK = 0xf007ffff
|
ATTR_VOL_VALIDMASK = 0xf087ffff
|
||||||
B0 = 0x0
|
B0 = 0x0
|
||||||
B110 = 0x6e
|
B110 = 0x6e
|
||||||
B115200 = 0x1c200
|
B115200 = 0x1c200
|
||||||
@@ -661,6 +662,7 @@ const (
|
|||||||
IN_CLASSD_NSHIFT = 0x1c
|
IN_CLASSD_NSHIFT = 0x1c
|
||||||
IN_LINKLOCALNETNUM = 0xa9fe0000
|
IN_LINKLOCALNETNUM = 0xa9fe0000
|
||||||
IN_LOOPBACKNET = 0x7f
|
IN_LOOPBACKNET = 0x7f
|
||||||
|
IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
|
||||||
IPPROTO_3PC = 0x22
|
IPPROTO_3PC = 0x22
|
||||||
IPPROTO_ADFS = 0x44
|
IPPROTO_ADFS = 0x44
|
||||||
IPPROTO_AH = 0x33
|
IPPROTO_AH = 0x33
|
||||||
@@ -1384,6 +1386,10 @@ const (
|
|||||||
SO_SNDTIMEO = 0x1005
|
SO_SNDTIMEO = 0x1005
|
||||||
SO_TIMESTAMP = 0x400
|
SO_TIMESTAMP = 0x400
|
||||||
SO_TIMESTAMP_MONOTONIC = 0x800
|
SO_TIMESTAMP_MONOTONIC = 0x800
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
|
||||||
|
SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
|
||||||
|
SO_TRACKER_TRANSPARENCY_VERSION = 0x3
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
SO_UPCALLCLOSEWAIT = 0x1027
|
SO_UPCALLCLOSEWAIT = 0x1027
|
||||||
SO_USELOOPBACK = 0x40
|
SO_USELOOPBACK = 0x40
|
||||||
@@ -1429,6 +1435,21 @@ const (
|
|||||||
TCOFLUSH = 0x2
|
TCOFLUSH = 0x2
|
||||||
TCOOFF = 0x1
|
TCOOFF = 0x1
|
||||||
TCOON = 0x2
|
TCOON = 0x2
|
||||||
|
TCPOPT_CC = 0xb
|
||||||
|
TCPOPT_CCECHO = 0xd
|
||||||
|
TCPOPT_CCNEW = 0xc
|
||||||
|
TCPOPT_EOL = 0x0
|
||||||
|
TCPOPT_FASTOPEN = 0x22
|
||||||
|
TCPOPT_MAXSEG = 0x2
|
||||||
|
TCPOPT_NOP = 0x1
|
||||||
|
TCPOPT_SACK = 0x5
|
||||||
|
TCPOPT_SACK_HDR = 0x1010500
|
||||||
|
TCPOPT_SACK_PERMITTED = 0x4
|
||||||
|
TCPOPT_SACK_PERMIT_HDR = 0x1010402
|
||||||
|
TCPOPT_SIGNATURE = 0x13
|
||||||
|
TCPOPT_TIMESTAMP = 0x8
|
||||||
|
TCPOPT_TSTAMP_HDR = 0x101080a
|
||||||
|
TCPOPT_WINDOW = 0x3
|
||||||
TCP_CONNECTIONTIMEOUT = 0x20
|
TCP_CONNECTIONTIMEOUT = 0x20
|
||||||
TCP_CONNECTION_INFO = 0x106
|
TCP_CONNECTION_INFO = 0x106
|
||||||
TCP_ENABLE_ECN = 0x104
|
TCP_ENABLE_ECN = 0x104
|
||||||
@@ -1531,6 +1552,11 @@ const (
|
|||||||
VINTR = 0x8
|
VINTR = 0x8
|
||||||
VKILL = 0x5
|
VKILL = 0x5
|
||||||
VLNEXT = 0xe
|
VLNEXT = 0xe
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x10
|
VMIN = 0x10
|
||||||
VM_LOADAVG = 0x2
|
VM_LOADAVG = 0x2
|
||||||
VM_MACHFACTOR = 0x4
|
VM_MACHFACTOR = 0x4
|
||||||
|
|||||||
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
|
|||||||
Sc_reserved [5]uint32
|
Sc_reserved [5]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XVSockPCB struct {
|
||||||
|
Xv_len uint32
|
||||||
|
Xv_vsockpp uint64
|
||||||
|
Xvp_local_cid uint32
|
||||||
|
Xvp_local_port uint32
|
||||||
|
Xvp_remote_cid uint32
|
||||||
|
Xvp_remote_port uint32
|
||||||
|
Xvp_rxcnt uint32
|
||||||
|
Xvp_txcnt uint32
|
||||||
|
Xvp_peer_rxhiwat uint32
|
||||||
|
Xvp_peer_rxcnt uint32
|
||||||
|
Xvp_last_pid int32
|
||||||
|
Xvp_gencnt uint64
|
||||||
|
Xv_socket XSocket
|
||||||
|
_ [4]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSocket struct {
|
||||||
|
Xso_len uint32
|
||||||
|
Xso_so uint32
|
||||||
|
So_type int16
|
||||||
|
So_options int16
|
||||||
|
So_linger int16
|
||||||
|
So_state int16
|
||||||
|
So_pcb uint32
|
||||||
|
Xso_protocol int32
|
||||||
|
Xso_family int32
|
||||||
|
So_qlen int16
|
||||||
|
So_incqlen int16
|
||||||
|
So_qlimit int16
|
||||||
|
So_timeo int16
|
||||||
|
So_error uint16
|
||||||
|
So_pgid int32
|
||||||
|
So_oobmark uint32
|
||||||
|
So_rcv XSockbuf
|
||||||
|
So_snd XSockbuf
|
||||||
|
So_uid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSocket64 struct {
|
||||||
|
Xso_len uint32
|
||||||
|
_ [8]byte
|
||||||
|
So_type int16
|
||||||
|
So_options int16
|
||||||
|
So_linger int16
|
||||||
|
So_state int16
|
||||||
|
_ [8]byte
|
||||||
|
Xso_protocol int32
|
||||||
|
Xso_family int32
|
||||||
|
So_qlen int16
|
||||||
|
So_incqlen int16
|
||||||
|
So_qlimit int16
|
||||||
|
So_timeo int16
|
||||||
|
So_error uint16
|
||||||
|
So_pgid int32
|
||||||
|
So_oobmark uint32
|
||||||
|
So_rcv XSockbuf
|
||||||
|
So_snd XSockbuf
|
||||||
|
So_uid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSockbuf struct {
|
||||||
|
Cc uint32
|
||||||
|
Hiwat uint32
|
||||||
|
Mbcnt uint32
|
||||||
|
Mbmax uint32
|
||||||
|
Lowat int32
|
||||||
|
Flags int16
|
||||||
|
Timeo int16
|
||||||
|
}
|
||||||
|
|
||||||
|
type XVSockPgen struct {
|
||||||
|
Len uint32
|
||||||
|
Count uint64
|
||||||
|
Gen uint64
|
||||||
|
Sogen uint64
|
||||||
|
}
|
||||||
|
|
||||||
type _Socklen uint32
|
type _Socklen uint32
|
||||||
|
|
||||||
type Xucred struct {
|
type Xucred struct {
|
||||||
@@ -287,6 +373,11 @@ const (
|
|||||||
SizeofSockaddrUnix = 0x6a
|
SizeofSockaddrUnix = 0x6a
|
||||||
SizeofSockaddrDatalink = 0x14
|
SizeofSockaddrDatalink = 0x14
|
||||||
SizeofSockaddrCtl = 0x20
|
SizeofSockaddrCtl = 0x20
|
||||||
|
SizeofSockaddrVM = 0xc
|
||||||
|
SizeofXvsockpcb = 0xa8
|
||||||
|
SizeofXSocket = 0x64
|
||||||
|
SizeofXSockbuf = 0x18
|
||||||
|
SizeofXVSockPgen = 0x20
|
||||||
SizeofXucred = 0x4c
|
SizeofXucred = 0x4c
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIovec = 0x10
|
SizeofIovec = 0x10
|
||||||
|
|||||||
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
|
|||||||
Sc_reserved [5]uint32
|
Sc_reserved [5]uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Len uint8
|
||||||
|
Family uint8
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XVSockPCB struct {
|
||||||
|
Xv_len uint32
|
||||||
|
Xv_vsockpp uint64
|
||||||
|
Xvp_local_cid uint32
|
||||||
|
Xvp_local_port uint32
|
||||||
|
Xvp_remote_cid uint32
|
||||||
|
Xvp_remote_port uint32
|
||||||
|
Xvp_rxcnt uint32
|
||||||
|
Xvp_txcnt uint32
|
||||||
|
Xvp_peer_rxhiwat uint32
|
||||||
|
Xvp_peer_rxcnt uint32
|
||||||
|
Xvp_last_pid int32
|
||||||
|
Xvp_gencnt uint64
|
||||||
|
Xv_socket XSocket
|
||||||
|
_ [4]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSocket struct {
|
||||||
|
Xso_len uint32
|
||||||
|
Xso_so uint32
|
||||||
|
So_type int16
|
||||||
|
So_options int16
|
||||||
|
So_linger int16
|
||||||
|
So_state int16
|
||||||
|
So_pcb uint32
|
||||||
|
Xso_protocol int32
|
||||||
|
Xso_family int32
|
||||||
|
So_qlen int16
|
||||||
|
So_incqlen int16
|
||||||
|
So_qlimit int16
|
||||||
|
So_timeo int16
|
||||||
|
So_error uint16
|
||||||
|
So_pgid int32
|
||||||
|
So_oobmark uint32
|
||||||
|
So_rcv XSockbuf
|
||||||
|
So_snd XSockbuf
|
||||||
|
So_uid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSocket64 struct {
|
||||||
|
Xso_len uint32
|
||||||
|
_ [8]byte
|
||||||
|
So_type int16
|
||||||
|
So_options int16
|
||||||
|
So_linger int16
|
||||||
|
So_state int16
|
||||||
|
_ [8]byte
|
||||||
|
Xso_protocol int32
|
||||||
|
Xso_family int32
|
||||||
|
So_qlen int16
|
||||||
|
So_incqlen int16
|
||||||
|
So_qlimit int16
|
||||||
|
So_timeo int16
|
||||||
|
So_error uint16
|
||||||
|
So_pgid int32
|
||||||
|
So_oobmark uint32
|
||||||
|
So_rcv XSockbuf
|
||||||
|
So_snd XSockbuf
|
||||||
|
So_uid uint32
|
||||||
|
}
|
||||||
|
|
||||||
|
type XSockbuf struct {
|
||||||
|
Cc uint32
|
||||||
|
Hiwat uint32
|
||||||
|
Mbcnt uint32
|
||||||
|
Mbmax uint32
|
||||||
|
Lowat int32
|
||||||
|
Flags int16
|
||||||
|
Timeo int16
|
||||||
|
}
|
||||||
|
|
||||||
|
type XVSockPgen struct {
|
||||||
|
Len uint32
|
||||||
|
Count uint64
|
||||||
|
Gen uint64
|
||||||
|
Sogen uint64
|
||||||
|
}
|
||||||
|
|
||||||
type _Socklen uint32
|
type _Socklen uint32
|
||||||
|
|
||||||
type Xucred struct {
|
type Xucred struct {
|
||||||
@@ -287,6 +373,11 @@ const (
|
|||||||
SizeofSockaddrUnix = 0x6a
|
SizeofSockaddrUnix = 0x6a
|
||||||
SizeofSockaddrDatalink = 0x14
|
SizeofSockaddrDatalink = 0x14
|
||||||
SizeofSockaddrCtl = 0x20
|
SizeofSockaddrCtl = 0x20
|
||||||
|
SizeofSockaddrVM = 0xc
|
||||||
|
SizeofXvsockpcb = 0xa8
|
||||||
|
SizeofXSocket = 0x64
|
||||||
|
SizeofXSockbuf = 0x18
|
||||||
|
SizeofXVSockPgen = 0x20
|
||||||
SizeofXucred = 0x4c
|
SizeofXucred = 0x4c
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIovec = 0x10
|
SizeofIovec = 0x10
|
||||||
|
|||||||
Reference in New Issue
Block a user