hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP1_GPIO type name
[qemu.git] / qapi / sockets.json
blobbad74e34d38c4e58ede853a6c2f09d97d766b4dc
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 # @mptcp: enable multi-path TCP. (Since 6.1)
62 # Since: 1.3
64 { 'struct': 'InetSocketAddress',
65   'base': 'InetSocketAddressBase',
66   'data': {
67     '*numeric':  'bool',
68     '*to': 'uint16',
69     '*ipv4': 'bool',
70     '*ipv6': 'bool',
71     '*keep-alive': 'bool',
72     '*mptcp': { 'type': 'bool', 'if': 'HAVE_IPPROTO_MPTCP' } } }
75 # @UnixSocketAddress:
77 # Captures a socket address in the local ("Unix socket") namespace.
79 # @path: filesystem path to use
80 # @abstract: if true, this is a Linux abstract socket address.  @path
81 #            will be prefixed by a null byte, and optionally padded
82 #            with null bytes.  Defaults to false.  (Since 5.1)
83 # @tight: if false, pad an abstract socket address with enough null
84 #         bytes to make it fill struct sockaddr_un member sun_path.
85 #         Defaults to true.  (Since 5.1)
87 # Since: 1.3
89 { 'struct': 'UnixSocketAddress',
90   'data': {
91     'path': 'str',
92     '*abstract': { 'type': 'bool', 'if': 'CONFIG_LINUX' },
93     '*tight': { 'type': 'bool', 'if': 'CONFIG_LINUX' } } }
96 # @VsockSocketAddress:
98 # Captures a socket address in the vsock namespace.
100 # @cid: unique host identifier
101 # @port: port
103 # Note: string types are used to allow for possible future hostname or
104 #       service resolution support.
106 # Since: 2.8
108 { 'struct': 'VsockSocketAddress',
109   'data': {
110     'cid': 'str',
111     'port': 'str' } }
114 # @InetSocketAddressWrapper:
116 # Since: 1.3
118 { 'struct': 'InetSocketAddressWrapper',
119   'data': { 'data': 'InetSocketAddress' } }
122 # @UnixSocketAddressWrapper:
124 # Since: 1.3
126 { 'struct': 'UnixSocketAddressWrapper',
127   'data': { 'data': 'UnixSocketAddress' } }
130 # @VsockSocketAddressWrapper:
132 # Since: 2.8
134 { 'struct': 'VsockSocketAddressWrapper',
135   'data': { 'data': 'VsockSocketAddress' } }
138 # @StringWrapper:
140 # Since: 1.3
142 { 'struct': 'StringWrapper',
143   'data': { 'data': 'String' } }
146 # @SocketAddressLegacy:
148 # Captures the address of a socket, which could also be a named file descriptor
150 # Note: This type is deprecated in favor of SocketAddress.  The
151 #       difference between SocketAddressLegacy and SocketAddress is that the
152 #       latter has fewer {} on the wire.
154 # Since: 1.3
156 { 'union': 'SocketAddressLegacy',
157   'base': { 'type': 'SocketAddressType' },
158   'discriminator': 'type',
159   'data': {
160     'inet': 'InetSocketAddressWrapper',
161     'unix': 'UnixSocketAddressWrapper',
162     'vsock': 'VsockSocketAddressWrapper',
163     'fd': 'StringWrapper' } }
166 # @SocketAddressType:
168 # Available SocketAddress types
170 # @inet: Internet address
172 # @unix: Unix domain socket
174 # @vsock: VMCI address
176 # @fd: decimal is for file descriptor number, otherwise a file descriptor name.
177 #      Named file descriptors are permitted in monitor commands, in combination
178 #      with the 'getfd' command. Decimal file descriptors are permitted at
179 #      startup or other contexts where no monitor context is active.
181 # Since: 2.9
183 { 'enum': 'SocketAddressType',
184   'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
187 # @SocketAddress:
189 # Captures the address of a socket, which could also be a named file
190 # descriptor
192 # @type: Transport type
194 # Since: 2.9
196 { 'union': 'SocketAddress',
197   'base': { 'type': 'SocketAddressType' },
198   'discriminator': 'type',
199   'data': { 'inet': 'InetSocketAddress',
200             'unix': 'UnixSocketAddress',
201             'vsock': 'VsockSocketAddress',
202             'fd': 'String' } }