Update version for v4.1.0-rc0 release
[qemu/ar7.git] / qapi / sockets.json
blobfc81d8d5e8b91390064f5e56e91dcf925e78312a
1 # -*- Mode: Python -*-
3 ##
4 # = Socket data types
5 ##
7 { 'include': 'common.json' }
9 ##
10 # @NetworkAddressFamily:
12 # The network address family
14 # @ipv4: IPV4 family
16 # @ipv6: IPV6 family
18 # @unix: unix socket
20 # @vsock: vsock family (since 2.8)
22 # @unknown: otherwise
24 # Since: 2.1
26 { 'enum': 'NetworkAddressFamily',
27   'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
30 # @InetSocketAddressBase:
32 # @host: host part of the address
33 # @port: port part of the address
35 { 'struct': 'InetSocketAddressBase',
36   'data': {
37     'host': 'str',
38     'port': 'str' } }
41 # @InetSocketAddress:
43 # Captures a socket address or address range in the Internet namespace.
45 # @numeric: true if the host/port are guaranteed to be numeric,
46 #           false if name resolution should be attempted. Defaults to false.
47 #           (Since 2.9)
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 IPv6
54 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
56 # Since: 1.3
58 { 'struct': 'InetSocketAddress',
59   'base': 'InetSocketAddressBase',
60   'data': {
61     '*numeric':  'bool',
62     '*to': 'uint16',
63     '*ipv4': 'bool',
64     '*ipv6': 'bool' } }
67 # @UnixSocketAddress:
69 # Captures a socket address in the local ("Unix socket") namespace.
71 # @path: filesystem path to use
73 # Since: 1.3
75 { 'struct': 'UnixSocketAddress',
76   'data': {
77     'path': 'str' } }
80 # @VsockSocketAddress:
82 # Captures a socket address in the vsock namespace.
84 # @cid: unique host identifier
85 # @port: port
87 # Note: string types are used to allow for possible future hostname or
88 # service resolution support.
90 # Since: 2.8
92 { 'struct': 'VsockSocketAddress',
93   'data': {
94     'cid': 'str',
95     'port': 'str' } }
98 # @SocketAddressLegacy:
100 # Captures the address of a socket, which could also be a named file descriptor
102 # Note: This type is deprecated in favor of SocketAddress.  The
103 # difference between SocketAddressLegacy and SocketAddress is that the
104 # latter is a flat union rather than a simple union. Flat is nicer
105 # because it avoids nesting on the wire, i.e. that form has fewer {}.
108 # Since: 1.3
110 { 'union': 'SocketAddressLegacy',
111   'data': {
112     'inet': 'InetSocketAddress',
113     'unix': 'UnixSocketAddress',
114     'vsock': 'VsockSocketAddress',
115     'fd': 'String' } }
118 # @SocketAddressType:
120 # Available SocketAddress types
122 # @inet:  Internet address
124 # @unix:  Unix domain socket
126 # @vsock: VMCI address
128 # @fd: decimal is for file descriptor number, otherwise a file descriptor name.
129 #      Named file descriptors are permitted in monitor commands, in combination
130 #      with the 'getfd' command. Decimal file descriptors are permitted at
131 #      startup or other contexts where no monitor context is active.
133 # Since: 2.9
135 { 'enum': 'SocketAddressType',
136   'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
139 # @SocketAddress:
141 # Captures the address of a socket, which could also be a named file
142 # descriptor
144 # @type:       Transport type
146 # Since: 2.9
148 { 'union': 'SocketAddress',
149   'base': { 'type': 'SocketAddressType' },
150   'discriminator': 'type',
151   'data': { 'inet': 'InetSocketAddress',
152             'unix': 'UnixSocketAddress',
153             'vsock': 'VsockSocketAddress',
154             'fd': 'String' } }