ip_routes_to_variant


Description:


[ Version ( since = "1.42" ) ]
public unowned Variant ip_routes_to_variant (GenericArray<IPRoute> routes)

Utility function to convert a GenericArray of IPRoute objects representing IPv4 or IPv6 routes into a Variant of type 'aa{sv}' representing an array of new-style NetworkManager IP routes.

All routes will include "dest" (an IP address string), "prefix" (an uint) and optionally "next-hop" (an IP address string) and "metric" (an uint). Some routes may include additional attributes. Note that invalid routes are discarded and only a warning is emitted, but the valid routes are still returned.

Parameters:

routes

an array of IPRoute objects

Returns:

a new floating Variant representing routes.


Namespace: NM.Utils
Package: libnm