Searched defs:routes (Results 1 - 7 of 7) sorted by relevance
/systemd/src/network/ |
H A D | test-network.c | 60 _cleanup_free_ struct sd_dhcp_route *routes = NULL; local 61 assert_se(deserialize_dhcp_routes(&routes, &size, &allocated, "") >= 0); 67 _cleanup_free_ struct sd_dhcp_route *routes = NULL; local 70 assert_se(deserialize_dhcp_routes(&routes, &size, &allocated, routes_string) >= 0); 73 assert_se(routes[0].dst_addr.s_addr == inet_addr("192.168.0.0")); 74 assert_se(routes[0].gw_addr.s_addr == inet_addr("192.168.0.1")); 75 assert_se(routes[0].dst_prefixlen == 16); 77 assert_se(routes[1].dst_addr.s_addr == inet_addr("10.1.2.0")); 78 assert_se(routes[1].gw_addr.s_addr == inet_addr("10.1.2.1")); 79 assert_se(routes[ 88 _cleanup_free_ struct sd_dhcp_route *routes = NULL; local 105 _cleanup_free_ struct sd_dhcp_route *routes = NULL; local [all...] |
H A D | networkd-dhcp4.c | 108 log_link_warning_errno(link, r, "Could not set routes: %m"); 120 return log_link_warning_errno(link, n, "DHCP error: could not get routes: %m"); 160 _cleanup_free_ sd_dhcp_route **routes = NULL; local 163 n = sd_dhcp_lease_get_routes(link->dhcp_lease, &routes); 171 assert_se(sd_dhcp_route_get_gateway(routes[i], &route->gw.in) >= 0); 172 assert_se(sd_dhcp_route_get_destination(routes[i], &route->dst.in) >= 0); 173 assert_se(sd_dhcp_route_get_destination_prefix_length(routes[i], &route->dst_prefixlen) >= 0);
|
H A D | networkd-route.c | 72 LIST_PREPEND(routes, network->static_routes, route); 91 LIST_REMOVE(routes, route->network->static_routes, route); 99 set_remove(route->link->routes, route); 118 /* Equality of routes are given by the 4-touple 198 existing = set_get(link->routes, &route); 213 static int route_add_internal(Link *link, Set **routes, argument 224 assert(routes); 238 r = set_ensure_allocated(routes, &route_hash_ops); 242 r = set_put(*routes, route); 279 r = route_add_internal(link, &link->routes, famil [all...] |
H A D | networkd-link.h | 87 Set *routes; member in struct:Link
|
H A D | networkd-link.c | 676 LIST_FOREACH(routes, rt, link->network->static_routes) { 679 log_link_warning_errno(link, r, "Could not set routes: %m"); 691 log_link_debug(link, "Setting routes"); 2021 /* do not touch routes managed by the kernel */ 2242 *routes = NULL, local 2255 "ROUTES", &routes, 2330 if (routes) { 2331 p = routes; 2875 SET_FOREACH(route, link->routes, i) {
|
/systemd/src/libsystemd-network/ |
H A D | network-internal.c | 438 void serialize_dhcp_routes(FILE *f, const char *key, sd_dhcp_route **routes, size_t size) { argument 443 assert(routes); 452 assert_se(sd_dhcp_route_get_destination(routes[i], &dest) >= 0); 453 assert_se(sd_dhcp_route_get_gateway(routes[i], &gw) >= 0); 454 assert_se(sd_dhcp_route_get_destination_prefix_length(routes[i], &length) >= 0); 464 _cleanup_free_ struct sd_dhcp_route *routes = NULL; local 481 if (!GREEDY_REALLOC(routes, allocated, size + 1)) 496 r = inet_aton(tok, &routes[size].dst_addr); 513 routes[size].dst_prefixlen = (uint8_t) n; 517 r = inet_aton(tok, &routes[siz [all...] |
H A D | sd-dhcp-lease.c | 210 * The returned routes array must be freed by the caller. 213 int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, sd_dhcp_route ***routes) { argument 218 assert_return(routes, -EINVAL); 230 *routes = ret; 419 struct sd_dhcp_route **routes, size_t *routes_size, size_t *routes_allocated) { 424 assert(routes); 434 if (!GREEDY_REALLOC(*routes, *routes_allocated, *routes_size + (len / 8))) 438 struct sd_dhcp_route *route = *routes + *routes_size; 464 struct sd_dhcp_route **routes, size_t *routes_size, size_t *routes_allocated) { 467 assert(routes); 417 lease_parse_routes( const uint8_t *option, size_t len, struct sd_dhcp_route **routes, size_t *routes_size, size_t *routes_allocated) argument 462 lease_parse_classless_routes( const uint8_t *option, size_t len, struct sd_dhcp_route **routes, size_t *routes_size, size_t *routes_allocated) argument 736 _cleanup_free_ sd_dhcp_route **routes = NULL; local 890 *routes = NULL, local [all...] |
Completed in 23 milliseconds