Roman Bogorodskiy <[email protected]> writes:

> Implement 'guest-network-get-route' for FreeBSD. This
> implementation uses the sysctl(3) interface to get
> the routing table.
>
> Limitations:
>
>  - This implementation does not populate irtt, refcnt, use,
>    window, source, and srcprefixlen fields.
>  - The implementation uses the default FIB (routing table) 0.
>    Selecting QGA's active FIB is left for the follow-up patch.
>
> Signed-off-by: Roman Bogorodskiy <[email protected]>

[...]

> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
> index 05fe4ea484..2f9d9f13a0 100644
> --- a/qga/qapi-schema.json
> +++ b/qga/qapi-schema.json
> @@ -1823,8 +1823,8 @@
>  
>  ##
>  # @GuestNetworkRoute:
> -#     Route information.  Supported on Linux (since 9.1) and Windows
> -#     (since 11.0).
> +#     Route information.  Supported on Linux (since 9.1), Windows
> +#     (since 11.0), and FreeBSD (since 11.2).
>  #
>  # @iface: The destination network or host's egress network interface
>  #     in the routing table
> @@ -1838,30 +1838,31 @@
>  #
>  # @mask: Subnet Mask (IPv4 only)
>  #
> -# @irtt: Initial round-trip delay (not for windows, IPv4 only)
> +# @irtt: Initial round-trip delay (not for windows and freebsd,
> +#     IPv4 only)

FreeBSD, please, and use the opportunity to spell Windows correctly.
More of the same below.

>  #
>  # @flags: Route flags (not for windows)
>  #
> -# @refcnt: The route's reference count (not for windows)
> +# @refcnt: The route's reference count (not for windows and freebsd)
>  #
> -# @use: Route usage count (not for windows)
> +# @use: Route usage count (not for windows and freebsd)
>  #
> -# @window: TCP window size, used for flow control (not for windows,
> -#     IPv4 only)
> +# @window: TCP window size, used for flow control (not for windows
> +#     and freebsd, IPv4 only)
>  #
>  # @mtu: Data link layer maximum packet size (not for windows)
>  #
>  # @desprefixlen: Destination prefix length (for IPv6)
>  #
> -# @source: Source IP address (for IPv6)
> +# @source: Source IP address (not for freebsd, IPv6 only)
>  #
> -# @srcprefixlen: Source prefix length (for IPv6)
> +# @srcprefixlen: Source prefix length (not for freebsd, IPv6 only)
>  #
>  # @nexthop: Next hop IP address (for IPv6)
>  #
>  # @version: IP version (4 or 6)
>  #
> -# Since: 9.1 (Linux only); 11.0 (Windows)
> +# Since: 9.1 (Linux only); 11.0 (Windows); 11.2 (FreeBSD)
>  ##
>  { 'struct': 'GuestNetworkRoute',
>    'data': {'iface': 'str',
> @@ -1881,7 +1882,7 @@
>             '*nexthop': 'str',
>             'version': 'int'
>             },
> -  'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32'] } }
> +  'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32', 'CONFIG_FREEBSD'] } }
>  
>  ##
>  # @guest-network-get-route:
> @@ -1889,9 +1890,9 @@
>  #
>  # Returns: List of route info of guest.
>  #
> -# Since: 9.1 (Linux only); 11.0 (Windows)
> +# Since: 9.1 (Linux only); 11.0 (Windows); 11.2 (FreeBSD)
>  ##
>  { 'command': 'guest-network-get-route',
>    'returns': ['GuestNetworkRoute'],
> -  'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32'] }
> +  'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32', 'CONFIG_FREEBSD'] }
>  }

Acked-by: Markus Armbruster <[email protected]>


Reply via email to