8 { 'include': 'common.json' }
11 # @NetworkAddressFamily:
13 # The network address family
21 # @vsock: vsock family (since 2.8)
27 { 'enum': 'NetworkAddressFamily',
28 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
31 # @InetSocketAddressBase:
33 # @host: host part of the address
34 # @port: port part of the address
36 { 'struct': 'InetSocketAddressBase',
44 # Captures a socket address or address range in the Internet
47 # @numeric: true if the host/port are guaranteed to be numeric, false
48 # if name resolution should be attempted. Defaults to false.
51 # @to: If present, this is range of possible addresses, with port
52 # between @port and @to.
54 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and
57 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and
60 # @keep-alive: enable keep-alive when connecting to this socket. Not
61 # supported for passive sockets. (Since 4.2)
63 # @mptcp: enable multi-path TCP. (Since 6.1)
67 { 'struct': 'InetSocketAddress',
68 'base': 'InetSocketAddressBase',
74 '*keep-alive': 'bool',
75 '*mptcp': { 'type': 'bool', 'if': 'HAVE_IPPROTO_MPTCP' } } }
80 # Captures a socket address in the local ("Unix socket") namespace.
82 # @path: filesystem path to use
84 # @abstract: if true, this is a Linux abstract socket address. @path
85 # will be prefixed by a null byte, and optionally padded with null
86 # bytes. Defaults to false. (Since 5.1)
88 # @tight: if false, pad an abstract socket address with enough null
89 # bytes to make it fill struct sockaddr_un member sun_path.
90 # Defaults to true. (Since 5.1)
94 { 'struct': 'UnixSocketAddress',
97 '*abstract': { 'type': 'bool', 'if': 'CONFIG_LINUX' },
98 '*tight': { 'type': 'bool', 'if': 'CONFIG_LINUX' } } }
101 # @VsockSocketAddress:
103 # Captures a socket address in the vsock namespace.
105 # @cid: unique host identifier
109 # Note: string types are used to allow for possible future hostname or
110 # service resolution support.
114 { 'struct': 'VsockSocketAddress',
120 # @InetSocketAddressWrapper:
124 { 'struct': 'InetSocketAddressWrapper',
125 'data': { 'data': 'InetSocketAddress' } }
128 # @UnixSocketAddressWrapper:
132 { 'struct': 'UnixSocketAddressWrapper',
133 'data': { 'data': 'UnixSocketAddress' } }
136 # @VsockSocketAddressWrapper:
140 { 'struct': 'VsockSocketAddressWrapper',
141 'data': { 'data': 'VsockSocketAddress' } }
148 { 'struct': 'StringWrapper',
149 'data': { 'data': 'String' } }
152 # @SocketAddressLegacy:
154 # Captures the address of a socket, which could also be a named file
157 # Note: This type is deprecated in favor of SocketAddress. The
158 # difference between SocketAddressLegacy and SocketAddress is that
159 # the latter has fewer {} on the wire.
163 { 'union': 'SocketAddressLegacy',
164 'base': { 'type': 'SocketAddressType' },
165 'discriminator': 'type',
167 'inet': 'InetSocketAddressWrapper',
168 'unix': 'UnixSocketAddressWrapper',
169 'vsock': 'VsockSocketAddressWrapper',
170 'fd': 'StringWrapper' } }
173 # @SocketAddressType:
175 # Available SocketAddress types
177 # @inet: Internet address
179 # @unix: Unix domain socket
181 # @vsock: VMCI address
183 # @fd: decimal is for file descriptor number, otherwise a file
184 # descriptor name. Named file descriptors are permitted in
185 # monitor commands, in combination with the 'getfd' command.
186 # Decimal file descriptors are permitted at startup or other
187 # contexts where no monitor context is active.
191 { 'enum': 'SocketAddressType',
192 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
197 # Captures the address of a socket, which could also be a named file
200 # @type: Transport type
204 { 'union': 'SocketAddress',
205 'base': { 'type': 'SocketAddressType' },
206 'discriminator': 'type',
207 'data': { 'inet': 'InetSocketAddress',
208 'unix': 'UnixSocketAddress',
209 'vsock': 'VsockSocketAddress',