-
Notifications
You must be signed in to change notification settings - Fork 63
/
sockets.pb.netconn.go
103 lines (94 loc) · 3.11 KB
/
sockets.pb.netconn.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Code generated by kraftkit.sh/tools/protoc-gen-go-netconn. DO NOT EDIT.
// source: machine/qemu/qmp/v7alpha2/sockets.proto
package qmpv7alpha2
// Available SocketAddress types
//
// Since: 2.9
type SocketAddressType string
const (
// Internet address
SOCKET_ADDRESS_TYPE_INET = SocketAddressType("inet")
// Unix domain socket
SOCKET_ADDRESS_TYPE_UNIX = SocketAddressType("unix")
// VMCI address
SOCKET_ADDRESS_TYPE_VSOCK = SocketAddressType("vsock")
// decimal is for file descriptor number, otherwise a file descriptor name.
// Named file descriptors are permitted in monitor commands, in combination
// with the 'getfd' command. Decimal file descriptors are permitted at startup
// or other contexts where no monitor context is active.
SOCKET_ADDRESS_TYPE_FD = SocketAddressType("fd")
)
func (e SocketAddressType) String() string {
return string(e)
}
func SocketAddressTypes() []SocketAddressType {
return []SocketAddressType{
SOCKET_ADDRESS_TYPE_INET,
SOCKET_ADDRESS_TYPE_UNIX,
SOCKET_ADDRESS_TYPE_VSOCK,
SOCKET_ADDRESS_TYPE_FD,
}
}
// Captures a socket address or address range in the Internet
// namespace.
//
// Since: 1.3
type InetSocketAddress struct {
// host part of the address
Host string `json:"host"`
// port part of the address
Port string `json:"port"`
// true if the host/port are guaranteed to be numeric, false if name
// resolution should be attempted. Defaults to false. (Since 2.9)
Numeric bool `json:"numeric"`
// If present, this is range of possible addresses, with port between `port`
// and `to`.
To int32 `json:"to"`
// whether to accept IPv4 addresses, default try both IPv4 and IPv6
Ipv4 bool `json:"ipv4"`
// whether to accept IPv6 addresses, default try both IPv4 and IPv6
Ipv6 bool `json:"ipv6"`
// enable keep-alive when connecting to this socket. Not supported for
// passive sockets. (Since 4.2)
KeepAlive bool `json:"keep-alive"`
// enable multi-path TCP. (Since 6.1)
Mptcp bool `json:"mptcp"`
}
// Captures a socket address in the local ("Unix socket") namespace.
//
// Since: 1.3
type UnixSocketAddress struct {
// filesystem path to use
Path string `json:"path"`
// if true, this is a Linux abstract socket address. `path` will be prefixed
// by a null byte, and optionally padded with null bytes. Defaults to false.
// (Since 5.1)
Abstract bool `json:"abstract"`
// if false, pad an abstract socket address with enough null bytes to make it
// fill struct sockaddr_un member sun_path. Defaults to true. (Since 5.1)
Tight bool `json:"tight"`
}
// Captures a socket address in the vsock namespace.
//
// Note: string types are used to allow for possible future hostname or
//
// service resolution support.
//
// Since: 2.8
type VsockSocketAddress struct {
// unique host identifier
Cid string `json:"cid"`
// port
Port string `json:"port"`
}
// Captures the address of a socket, which could also be a named file
// descriptor
//
// Since: 2.9
type SocketAddress struct {
Type SocketAddressType `json:"type"`
Inet InetSocketAddress `json:"inet"`
Unix UnixSocketAddress `json:"unix"`
Vsock VsockSocketAddress `json:"vsock"`
Fd string `json:"fd"`
}