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
33 # @port: port part of the address
35 { 'struct': 'InetSocketAddressBase',
43 # Captures a socket address or address range in the Internet
46 # @numeric: true if the host/port are guaranteed to be numeric, false
47 # if name resolution should be attempted. Defaults to false.
50 # @to: If present, this is range of possible addresses, with port
51 # between @port and @to.
53 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and
56 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and
59 # @keep-alive: enable keep-alive when connecting to this socket. Not
60 # supported for passive sockets. (Since 4.2)
62 # @mptcp: enable multi-path TCP. (Since 6.1)
66 { 'struct': 'InetSocketAddress',
67 'base': 'InetSocketAddressBase',
73 '*keep-alive': 'bool',
74 '*mptcp': { 'type': 'bool', 'if': 'HAVE_IPPROTO_MPTCP' } } }
79 # Captures a socket address in the local ("Unix socket") namespace.
81 # @path: filesystem path to use
83 # @abstract: if true, this is a Linux abstract socket address. @path
84 # will be prefixed by a null byte, and optionally padded with null
85 # bytes. Defaults to false. (Since 5.1)
87 # @tight: if false, pad an abstract socket address with enough null
88 # bytes to make it fill struct sockaddr_un member sun_path.
89 # Defaults to true. (Since 5.1)
93 { 'struct': 'UnixSocketAddress',
96 '*abstract': { 'type': 'bool', 'if': 'CONFIG_LINUX' },
97 '*tight': { 'type': 'bool', 'if': 'CONFIG_LINUX' } } }
100 # @VsockSocketAddress:
102 # Captures a socket address in the vsock namespace.
104 # @cid: unique host identifier
108 # .. note:: String types are used to allow for possible future
109 # hostname or service resolution support.
113 { 'struct': 'VsockSocketAddress',
121 # A file descriptor name or number.
123 # @str: decimal is for file descriptor number, otherwise it's a file
124 # descriptor name. Named file descriptors are permitted in
125 # monitor commands, in combination with the 'getfd' command.
126 # Decimal file descriptors are permitted at startup or other
127 # 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 # @type: Transport type
185 { 'union': 'SocketAddressLegacy',
186 'base': { 'type': 'SocketAddressType' },
187 'discriminator': 'type',
189 'inet': 'InetSocketAddressWrapper',
190 'unix': 'UnixSocketAddressWrapper',
191 'vsock': 'VsockSocketAddressWrapper',
192 'fd': 'FdSocketAddressWrapper' } }
193 # Note: This type is deprecated in favor of SocketAddress. The
194 # difference between SocketAddressLegacy and SocketAddress is that the
195 # latter has fewer ``{}`` on the wire.
198 # @SocketAddressType:
200 # Available SocketAddress types
202 # @inet: Internet address
204 # @unix: Unix domain socket
206 # @vsock: VMCI address
208 # @fd: Socket file descriptor
212 { 'enum': 'SocketAddressType',
213 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
218 # Captures the address of a socket, which could also be a socket file
221 # @type: Transport type
225 { 'union': 'SocketAddress',
226 'base': { 'type': 'SocketAddressType' },
227 'discriminator': 'type',
228 'data': { 'inet': 'InetSocketAddress',
229 'unix': 'UnixSocketAddress',
230 'vsock': 'VsockSocketAddress',
231 'fd': 'FdSocketAddress' } }