cirrus: use V=1 when running tests on FreeBSD and macOS
[qemu/ar7.git] / qapi / sockets.json
blobc0c640a5b05adeee11f8f2f954796e513e547807
1 # -*- Mode: Python -*-
2 # vim: filetype=python
4 ##
5 # = Socket data types
6 ##
8 { 'include': 'common.json' }
11 # @NetworkAddressFamily:
13 # The network address family
15 # @ipv4: IPV4 family
17 # @ipv6: IPV6 family
19 # @unix: unix socket
21 # @vsock: vsock family (since 2.8)
23 # @unknown: otherwise
25 # Since: 2.1
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',
37   'data': {
38     'host': 'str',
39     'port': 'str' } }
42 # @InetSocketAddress:
44 # Captures a socket address or address range in the Internet namespace.
46 # @numeric: true if the host/port are guaranteed to be numeric,
47 #           false if name resolution should be attempted. Defaults to false.
48 #           (Since 2.9)
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 IPv6
55 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
57 # @keep-alive: enable keep-alive when connecting to this socket. Not supported
58 #              for passive sockets. (Since 4.2)
60 # Since: 1.3
62 { 'struct': 'InetSocketAddress',
63   'base': 'InetSocketAddressBase',
64   'data': {
65     '*numeric':  'bool',
66     '*to': 'uint16',
67     '*ipv4': 'bool',
68     '*ipv6': 'bool',
69     '*keep-alive': 'bool' } }
72 # @UnixSocketAddress:
74 # Captures a socket address in the local ("Unix socket") namespace.
76 # @path: filesystem path to use
77 # @tight: pass a socket address length confined to the minimum length of the
78 #         abstract string, rather than the full sockaddr_un record length
79 #         (only matters for abstract sockets, default true). (Since 5.1)
80 # @abstract: whether this is an abstract address, default false. (Since 5.1)
82 # Since: 1.3
84 { 'struct': 'UnixSocketAddress',
85   'data': {
86     'path': 'str',
87     '*tight': 'bool',
88     '*abstract': 'bool' } }
91 # @VsockSocketAddress:
93 # Captures a socket address in the vsock namespace.
95 # @cid: unique host identifier
96 # @port: port
98 # Note: string types are used to allow for possible future hostname or
99 #       service resolution support.
101 # Since: 2.8
103 { 'struct': 'VsockSocketAddress',
104   'data': {
105     'cid': 'str',
106     'port': 'str' } }
109 # @SocketAddressLegacy:
111 # Captures the address of a socket, which could also be a named file descriptor
113 # Note: This type is deprecated in favor of SocketAddress.  The
114 #       difference between SocketAddressLegacy and SocketAddress is that the
115 #       latter is a flat union rather than a simple union. Flat is nicer
116 #       because it avoids nesting on the wire, i.e. that form has fewer {}.
119 # Since: 1.3
121 { 'union': 'SocketAddressLegacy',
122   'data': {
123     'inet': 'InetSocketAddress',
124     'unix': 'UnixSocketAddress',
125     'vsock': 'VsockSocketAddress',
126     'fd': 'String' } }
129 # @SocketAddressType:
131 # Available SocketAddress types
133 # @inet:  Internet address
135 # @unix:  Unix domain socket
137 # @vsock: VMCI address
139 # @fd: decimal is for file descriptor number, otherwise a file descriptor name.
140 #      Named file descriptors are permitted in monitor commands, in combination
141 #      with the 'getfd' command. Decimal file descriptors are permitted at
142 #      startup or other contexts where no monitor context is active.
144 # Since: 2.9
146 { 'enum': 'SocketAddressType',
147   'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
150 # @SocketAddress:
152 # Captures the address of a socket, which could also be a named file
153 # descriptor
155 # @type:       Transport type
157 # Since: 2.9
159 { 'union': 'SocketAddress',
160   'base': { 'type': 'SocketAddressType' },
161   'discriminator': 'type',
162   'data': { 'inet': 'InetSocketAddress',
163             'unix': 'UnixSocketAddress',
164             'vsock': 'VsockSocketAddress',
165             'fd': 'String' } }