Searched refs:routes (Results 1 - 11 of 11) sorted by relevance

/systemd/src/network/
H A Dtest-network.c60 _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 Dnetworkd-route.c72 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 Dnetworkd-route.h52 LIST_FIELDS(Route, routes);
H A Dnetworkd-dhcp4.c108 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 Dnetworkd-link.h87 Set *routes; member in struct:Link
H A Dnetworkd-link.c676 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) {
H A Dnetworkd-network.c163 LIST_FOREACH(routes, route, network->static_routes) {
/systemd/src/libsystemd-network/
H A Dnetwork-internal.c438 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 Dsd-dhcp-lease.c210 * 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...]
H A Dnetwork-internal.h77 void serialize_dhcp_routes(FILE *f, const char *key, sd_dhcp_route **routes, size_t size);
/systemd/src/systemd/
H A Dsd-dhcp-lease.h54 int sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, sd_dhcp_route ***routes);

Completed in 268 milliseconds