Searched refs:prefixlen (Results 1 - 21 of 21) sorted by relevance

/systemd/src/network/
H A Dnetworkd-address-pool.h31 unsigned prefixlen; member in struct:AddressPool
38 int address_pool_new(Manager *m, AddressPool **ret, int family, const union in_addr_union *u, unsigned prefixlen);
39 int address_pool_new_from_string(Manager *m, AddressPool **ret, int family, const char *p, unsigned prefixlen);
42 int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found);
H A Dnetworkd-address-pool.c31 unsigned prefixlen) {
45 p->prefixlen = prefixlen;
59 unsigned prefixlen) {
72 return address_pool_new(m, ret, family, &u, prefixlen);
89 unsigned prefixlen) {
107 if (in_addr_prefix_intersect(p->family, u, prefixlen, &a->in_addr, a->prefixlen))
116 if (in_addr_prefix_intersect(p->family, u, prefixlen, &a->in_addr, a->prefixlen))
26 address_pool_new( Manager *m, AddressPool **ret, int family, const union in_addr_union *u, unsigned prefixlen) argument
54 address_pool_new_from_string( Manager *m, AddressPool **ret, int family, const char *p, unsigned prefixlen) argument
86 address_pool_prefix_is_taken( AddressPool *p, const union in_addr_union *u, unsigned prefixlen) argument
137 address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found) argument
[all...]
H A Dnetworkd-address.h42 unsigned char prefixlen; member in struct:Address
61 int address_add_foreign(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret);
62 int address_add(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret);
63 int address_get(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret);
H A Dnetworkd-address.c115 siphash24_compress(&a->prefixlen, sizeof(a->prefixlen), state);
118 if (a->prefixlen != 0) {
122 prefix = be32toh(a->in_addr_peer.in.s_addr) >> (32 - a->prefixlen);
124 prefix = be32toh(a->in_addr.in.s_addr) >> (32 - a->prefixlen);
152 if (a1->prefixlen < a2->prefixlen)
154 if (a1->prefixlen > a2->prefixlen)
158 if (a1->prefixlen !
230 address_add_internal(Link *link, Set **addresses, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) argument
270 address_add_foreign(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) argument
274 address_add(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) argument
380 address_get(Link *link, int family, const union in_addr_union *in_addr, unsigned char prefixlen, Address **ret) argument
[all...]
H A Dnetworkd-dhcp4.c151 unsigned prefixlen = 0; local
214 prefixlen = in_addr_netmask_to_prefixlen(&netmask);
218 address->prefixlen = prefixlen;
286 unsigned prefixlen; local
293 prefixlen = in_addr_netmask_to_prefixlen(netmask);
303 addr->prefixlen = prefixlen;
364 unsigned prefixlen; local
383 prefixlen
[all...]
H A Dnetworkd-ndisc.c51 static void ndisc_prefix_autonomous_handler(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen, argument
89 address->prefixlen = prefixlen;
104 static void ndisc_prefix_onlink_handler(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen, unsigned lifetime, void *userdata) { argument
129 route->dst_prefixlen = prefixlen;
H A Dnetworkd.h91 int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found);
H A Dnetworkd-dhcp6.c76 addr->prefixlen = 128;
84 addr->prefixlen, lifetime_preferred, lifetime_valid);
H A Dnetworkd-ipv4ll.c51 address->prefixlen = 16;
140 ll_addr->prefixlen = 16;
141 ll_addr->broadcast.s_addr = ll_addr->in_addr.in.s_addr | htonl(0xfffffffflu >> ll_addr->prefixlen);
H A Dnetworkd-manager.c410 log_link_warning_errno(link, r, "rtnl: received route with invalid destination prefixlen, ignoring: %m");
416 log_link_warning_errno(link, r, "rtnl: received route with invalid source prefixlen, ignoring: %m");
478 unsigned char prefixlen; local
532 r = sd_rtnl_message_addr_get_prefixlen(message, &prefixlen);
534 log_link_warning_errno(link, r, "rtnl: received address with invalid prefixlen, ignoring: %m");
586 address_get(link, family, &in_addr, prefixlen, &address);
591 log_link_debug(link, "Updating address: %s/%u (valid %s%s)", buf, prefixlen,
595 r = address_add_foreign(link, family, &in_addr, prefixlen, &address);
597 log_link_warning_errno(link, r, "Failed to add address %s/%u: %m", buf, prefixlen);
600 log_link_debug(link, "Adding address: %s/%u (valid %s%s)", buf, prefixlen,
1270 manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found) argument
[all...]
H A Dtest-network.c167 a1->prefixlen = 10;
169 a2->prefixlen = 10;
180 a2->prefixlen = 8;
H A Dnetworkd-route.c639 unsigned char prefixlen; local
652 /* Destination|Source=address/prefixlen */
672 /* prefixlen */
674 r = safe_atou8(e + 1, &prefixlen);
682 prefixlen = 32;
685 prefixlen = 128;
693 n->dst_prefixlen = prefixlen;
696 n->src_prefixlen = prefixlen;
H A Dnetworkd-link.c871 r = sd_dhcp_server_configure_pool(link->dhcp_server, &address->in_addr.in, address->prefixlen,
2294 unsigned char prefixlen; local
2312 r = sscanf(prefixlen_str, "%hhu", &prefixlen);
2314 log_link_error(link, "Failed to parse prefixlen %s", prefixlen_str);
2324 r = address_add(link, family, &address, prefixlen, NULL);
2340 unsigned char prefixlen, tos, table; local
2359 r = sscanf(prefixlen_str, "%hhu/%hhu/%"SCNu32"/%hhu/"USEC_FMT, &prefixlen, &tos, &priority, &table, &lifetime);
2373 r = route_add(link, family, &route_dst, prefixlen, tos, priority, table, &route);
2868 fprintf(f, "%s%s/%u", space ? " " : "", address_str, a->prefixlen);
/systemd/src/basic/
H A Din-addr-util.c146 int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefixlen) { argument
152 if (prefixlen <= 0)
158 if (prefixlen > 32)
159 prefixlen = 32;
162 n = c + (1UL << (32 - prefixlen));
165 n &= 0xFFFFFFFFUL << (32 - prefixlen);
176 if (prefixlen > 128)
177 prefixlen = 128;
180 add.s6_addr[(prefixlen-1) / 8] = 1 << (7 - (prefixlen
270 in_addr_prefixlen_to_netmask(struct in_addr *addr, unsigned char prefixlen) argument
283 in_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen) argument
308 unsigned char prefixlen; local
322 in_addr_mask(int family, union in_addr_union *addr, unsigned char prefixlen) argument
[all...]
H A Din-addr-util.h44 int in_addr_prefix_next(int family, union in_addr_union *u, unsigned prefixlen);
49 struct in_addr* in_addr_prefixlen_to_netmask(struct in_addr *addr, unsigned char prefixlen);
50 int in_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen);
52 int in_addr_mask(int family, union in_addr_union *addr, unsigned char prefixlen);
/systemd/src/systemd/
H A Dsd-ndisc.h40 typedef void(*sd_ndisc_prefix_onlink_callback_t)(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen,
42 typedef void(*sd_ndisc_prefix_autonomous_callback_t)(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen,
H A Dsd-dhcp-server.h49 int sd_dhcp_server_configure_pool(sd_dhcp_server *server, struct in_addr *address, unsigned char prefixlen, uint32_t offset, uint32_t size);
H A Dsd-netlink.h120 int sd_rtnl_message_addr_set_prefixlen(sd_netlink_message *m, unsigned char prefixlen);
124 int sd_rtnl_message_addr_get_prefixlen(sd_netlink_message *m, unsigned char *prefixlen);
136 int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_message *m, unsigned char prefixlen);
137 int sd_rtnl_message_route_set_src_prefixlen(sd_netlink_message *m, unsigned char prefixlen);
/systemd/src/libsystemd/sd-netlink/
H A Drtnl-message.c35 int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_message *m, unsigned char prefixlen) { argument
44 if ((rtm->rtm_family == AF_INET && prefixlen > 32) ||
45 (rtm->rtm_family == AF_INET6 && prefixlen > 128))
48 rtm->rtm_dst_len = prefixlen;
53 int sd_rtnl_message_route_set_src_prefixlen(sd_netlink_message *m, unsigned char prefixlen) { argument
62 if ((rtm->rtm_family == AF_INET && prefixlen > 32) ||
63 (rtm->rtm_family == AF_INET6 && prefixlen > 128))
66 rtm->rtm_src_len = prefixlen;
423 int sd_rtnl_message_addr_set_prefixlen(sd_netlink_message *m, unsigned char prefixlen) { argument
432 if ((ifa->ifa_family == AF_INET && prefixlen > 3
484 sd_rtnl_message_addr_get_prefixlen(sd_netlink_message *m, unsigned char *prefixlen) argument
[all...]
/systemd/src/libsystemd-network/
H A Dsd-ndisc.c280 static int prefix_match(const struct in6_addr *prefix, uint8_t prefixlen, argument
288 len = MIN(prefixlen, addr_prefixlen);
380 uint8_t prefixlen; local
382 prefixlen = MIN(prefix->len, prefix_opt->nd_opt_pi_prefix_len);
387 prefixlen);
389 prefix->len = prefixlen;
H A Dsd-dhcp-server.c40 int sd_dhcp_server_configure_pool(sd_dhcp_server *server, struct in_addr *address, unsigned char prefixlen, uint32_t offset, uint32_t size) { argument
48 assert_return(prefixlen <= 32, -ERANGE);
51 assert_se(in_addr_prefixlen_to_netmask(&netmask_addr, prefixlen));

Completed in 4977 milliseconds