Lines Matching refs:route

264 static int route_build_json(Route *route, JsonVariant **ret) {  in route_build_json()  argument
270 assert(route); in route_build_json()
273 manager = route->link ? route->link->manager : route->manager; in route_build_json()
277 r = route_scope_to_string_alloc(route->scope, &scope); in route_build_json()
281 r = route_protocol_to_string_alloc(route->protocol, &protocol); in route_build_json()
285 r = manager_get_route_table_to_string(manager, route->table, &table); in route_build_json()
289 r = route_flags_to_string_alloc(route->flags, &flags); in route_build_json()
293 r = network_config_state_to_string_alloc(route->state, &state); in route_build_json()
298 JSON_BUILD_PAIR_INTEGER("Family", route->family), in route_build_json()
299 JSON_BUILD_PAIR_IN_ADDR("Destination", &route->dst, route->family), in route_build_json()
300 … JSON_BUILD_PAIR_UNSIGNED("DestinationPrefixLength", route->dst_prefixlen), in route_build_json()
301 … JSON_BUILD_PAIR_IN_ADDR_NON_NULL("Gateway", &route->gw, route->gw_family), in route_build_json()
302 JSON_BUILD_PAIR_CONDITION(route->src_prefixlen > 0, in route_build_json()
303 … "Source", JSON_BUILD_IN_ADDR(&route->src, route->family)), in route_build_json()
304 … JSON_BUILD_PAIR_UNSIGNED_NON_ZERO("SourcePrefixLength", route->src_prefixlen), in route_build_json()
305 … JSON_BUILD_PAIR_IN_ADDR_NON_NULL("PreferredSource", &route->prefsrc, route->family), in route_build_json()
306 JSON_BUILD_PAIR_UNSIGNED("Scope", route->scope), in route_build_json()
308 JSON_BUILD_PAIR_UNSIGNED("Protocol", route->protocol), in route_build_json()
310 JSON_BUILD_PAIR_UNSIGNED("Type", route->type), in route_build_json()
311 … JSON_BUILD_PAIR_STRING("TypeString", route_type_to_string(route->type)), in route_build_json()
312 JSON_BUILD_PAIR_UNSIGNED("Priority", route->priority), in route_build_json()
313 JSON_BUILD_PAIR_UNSIGNED("Table", route->table), in route_build_json()
315 JSON_BUILD_PAIR_UNSIGNED_NON_ZERO("MTU", route->mtu), in route_build_json()
316 JSON_BUILD_PAIR_UNSIGNED("Preference", route->pref), in route_build_json()
317 JSON_BUILD_PAIR_UNSIGNED("Flags", route->flags), in route_build_json()
319 JSON_BUILD_PAIR_FINITE_USEC("LifetimeUSec", route->lifetime_usec), in route_build_json()
320 … JSON_BUILD_PAIR_STRING("ConfigSource", network_config_source_to_string(route->source)), in route_build_json()
322 … JSON_BUILD_PAIR_IN_ADDR_NON_NULL("ConfigProvider", &route->provider, route->family))); in route_build_json()
332 Route *route; in routes_build_json() local
347 SET_FOREACH(route, routes) { in routes_build_json()
348 r = route_build_json(route, elements + n); in routes_build_json()