9 # @NetworkAddressFamily:
11 # The network address family
19 # @vsock: vsock family (since 2.8)
25 { 'enum': 'NetworkAddressFamily',
26 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
29 # @InetSocketAddressBase:
31 # @host: host part of the address
32 # @port: port part of the address
34 { 'struct': 'InetSocketAddressBase',
42 # Captures a socket address or address range in the Internet
45 # @numeric: true if the host/port are guaranteed to be numeric, false
46 # if name resolution should be attempted. Defaults to false.
49 # @to: If present, this is range of possible addresses, with port
50 # between @port and @to.
52 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and
55 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and
58 # @keep-alive: enable keep-alive when connecting to this socket. Not
59 # supported for passive sockets. (Since 4.2)
61 # @mptcp: enable multi-path TCP. (Since 6.1)
65 { 'struct': 'InetSocketAddress',
66 'base': 'InetSocketAddressBase',
72 '*keep-alive': 'bool',
73 '*mptcp': { 'type': 'bool', 'if': 'HAVE_IPPROTO_MPTCP' } } }
78 # Captures a socket address in the local ("Unix socket") namespace.
80 # @path: filesystem path to use
82 # @abstract: if true, this is a Linux abstract socket address. @path
83 # will be prefixed by a null byte, and optionally padded with null
84 # bytes. Defaults to false. (Since 5.1)
86 # @tight: if false, pad an abstract socket address with enough null
87 # bytes to make it fill struct sockaddr_un member sun_path.
88 # Defaults to true. (Since 5.1)
92 { 'struct': 'UnixSocketAddress',
95 '*abstract': { 'type': 'bool', 'if': 'CONFIG_LINUX' },
96 '*tight': { 'type': 'bool', 'if': 'CONFIG_LINUX' } } }
99 # @VsockSocketAddress:
101 # Captures a socket address in the vsock namespace.
103 # @cid: unique host identifier
107 # Note: string types are used to allow for possible future hostname or
108 # service resolution support.
112 { 'struct': 'VsockSocketAddress',
120 # A file descriptor name or number.
122 # @str: decimal is for file descriptor number, otherwise it's a file
123 # descriptor name. Named file descriptors are permitted in
124 # monitor commands, in combination with the 'getfd' command.
125 # Decimal file descriptors are permitted at startup or other
126 # contexts where no monitor context is active.
131 { 'struct': 'FdSocketAddress',
136 # @InetSocketAddressWrapper:
138 # @data: internet domain socket address
142 { 'struct': 'InetSocketAddressWrapper',
143 'data': { 'data': 'InetSocketAddress' } }
146 # @UnixSocketAddressWrapper:
148 # @data: UNIX domain socket address
152 { 'struct': 'UnixSocketAddressWrapper',
153 'data': { 'data': 'UnixSocketAddress' } }
156 # @VsockSocketAddressWrapper:
158 # @data: VSOCK domain socket address
162 { 'struct': 'VsockSocketAddressWrapper',
163 'data': { 'data': 'VsockSocketAddress' } }
166 # @FdSocketAddressWrapper:
168 # @data: file descriptor name or number
172 { 'struct': 'FdSocketAddressWrapper',
173 'data': { 'data': 'FdSocketAddress' } }
176 # @SocketAddressLegacy:
178 # Captures the address of a socket, which could also be a named file
181 # Note: This type is deprecated in favor of SocketAddress. The
182 # difference between SocketAddressLegacy and SocketAddress is that
183 # the latter has fewer {} on the wire.
187 { 'union': 'SocketAddressLegacy',
188 'base': { 'type': 'SocketAddressType' },
189 'discriminator': 'type',
191 'inet': 'InetSocketAddressWrapper',
192 'unix': 'UnixSocketAddressWrapper',
193 'vsock': 'VsockSocketAddressWrapper',
194 'fd': 'FdSocketAddressWrapper' } }
197 # @SocketAddressType:
199 # Available SocketAddress types
201 # @inet: Internet address
203 # @unix: Unix domain socket
205 # @vsock: VMCI address
207 # @fd: Socket file descriptor
211 { 'enum': 'SocketAddressType',
212 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
217 # Captures the address of a socket, which could also be a socket file
220 # @type: Transport type
224 { 'union': 'SocketAddress',
225 'base': { 'type': 'SocketAddressType' },
226 'discriminator': 'type',
227 'data': { 'inet': 'InetSocketAddress',
228 'unix': 'UnixSocketAddress',
229 'vsock': 'VsockSocketAddress',
230 'fd': 'FdSocketAddress' } }