Home
last modified time | relevance | path

Searched refs:in6 (Results 1 – 25 of 69) sorted by relevance

123

/systemd-251/src/libsystemd-network/
Ddhcp6-network.c22 .in6.sin6_family = AF_INET6, in dhcp6_network_bind_udp_socket()
23 .in6.sin6_port = htobe16(DHCP6_PORT_CLIENT), in dhcp6_network_bind_udp_socket()
24 .in6.sin6_scope_id = ifindex, in dhcp6_network_bind_udp_socket()
32 src.in6.sin6_addr = *local_address; in dhcp6_network_bind_udp_socket()
54 r = bind(s, &src.sa, sizeof(src.in6)); in dhcp6_network_bind_udp_socket()
64 .in6.sin6_family = AF_INET6, in dhcp6_network_send_udp_socket()
65 .in6.sin6_port = htobe16(DHCP6_PORT_SERVER), in dhcp6_network_send_udp_socket()
71 memcpy(&dest.in6.sin6_addr, server_address, sizeof(dest.in6.sin6_addr)); in dhcp6_network_send_udp_socket()
73 r = sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in6)); in dhcp6_network_send_udp_socket()
Dicmp6-util.c178 sa.in6.sin6_family == AF_INET6) { in icmp6_receive()
180 addr = sa.in6.sin6_addr; in icmp6_receive()
/systemd-251/src/basic/
Din-addr-util.c40 return in6_addr_is_null(&u->in6); in in_addr_is_null()
64 return in6_addr_is_link_local(&u->in6); in in_addr_is_link_local()
86 return IN6_IS_ADDR_MULTICAST(&u->in6); in in_addr_is_multicast()
119 … return IN6_IS_ADDR_LOOPBACK(&u->in6); /* lgtm [cpp/potentially-dangerous-function] */ in in_addr_is_localhost()
132 … return IN6_IS_ADDR_LOOPBACK(&u->in6); /* lgtm [cpp/potentially-dangerous-function] */ in in_addr_is_localhost_one()
165 return in6_addr_equal(&a->in6, &b->in6); in in_addr_equal()
205 x = a->in6.s6_addr[i] ^ b->in6.s6_addr[i]; in in_addr_prefix_intersect()
288 u->in6.s6_addr[j] = 0; in in_addr_prefix_nth()
293 u->in6.s6_addr[j] &= 0xff << (8 - (prefixlen - p)); in in_addr_prefix_nth()
294 t = u->in6.s6_addr[j] + ((nth & 0xff) << (8 - (prefixlen - p))); in in_addr_prefix_nth()
[all …]
Dsocket-util.c79 if (a->sockaddr.in6.sin6_port == 0) in socket_address_verify()
209 …if (memcmp(&a->sockaddr.in6.sin6_addr, &b->sockaddr.in6.sin6_addr, sizeof(a->sockaddr.in6.sin6_add… in socket_address_equal()
212 if (a->sockaddr.in6.sin6_port != b->sockaddr.in6.sin6_port) in socket_address_equal()
372 *ret_port = be16toh(sa->in6.sin6_port); in sockaddr_port()
396 return (const union in_addr_union*) &sa->in6.sin6_addr; in sockaddr_in_addr()
424 u->in6 = (struct sockaddr_in6) { in sockaddr_set_in_addr()
426 .sin6_addr = a->in6, in sockaddr_set_in_addr()
479 memcmp(&sa->in6.sin6_addr, ipv4_prefix, sizeof(ipv4_prefix)) == 0) { in sockaddr_pretty()
480 const uint8_t *a = sa->in6.sin6_addr.s6_addr+12; in sockaddr_pretty()
485 be16toh(sa->in6.sin6_port)); in sockaddr_pretty()
[all …]
Din-addr-util.h14 struct in6_addr in6; member
127 #define IN_ADDR_NULL ((union in_addr_union) { .in6 = {} })
/systemd-251/src/test/
Dtest-in-addr-prefix-util.c28 .in6.s6_addr[0] = 0xff, in test_config_parse_in_addr_prefixes()
29 .in6.s6_addr[1] = i, in test_config_parse_in_addr_prefixes()
40 .in6.s6_addr[0] = 0xff, in test_config_parse_in_addr_prefixes()
41 .in6.s6_addr[1] = i, in test_config_parse_in_addr_prefixes()
42 .in6.s6_addr[2] = j, in test_config_parse_in_addr_prefixes()
Dtest-in-addr-util.c76 …test_in_addr_prefix_from_string_one("::1", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADDR_LO… in TEST()
77 …test_in_addr_prefix_from_string_one("::1/0", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADDR_… in TEST()
78 …test_in_addr_prefix_from_string_one("::1/1", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADDR_… in TEST()
79 …test_in_addr_prefix_from_string_one("::1/2", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADDR_… in TEST()
80 …test_in_addr_prefix_from_string_one("::1/32", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADDR… in TEST()
81 …test_in_addr_prefix_from_string_one("::1/33", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADDR… in TEST()
82 …test_in_addr_prefix_from_string_one("::1/64", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADDR… in TEST()
83 …test_in_addr_prefix_from_string_one("::1/128", AF_INET6, 0, &(union in_addr_union) { .in6 = IN6ADD… in TEST()
/systemd-251/src/network/
Dtest-networkd-conf.c211 …test_config_parse_address_one("::1", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOPBACK… in TEST()
212 …test_config_parse_address_one("::1/0", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOPBA… in TEST()
213 …test_config_parse_address_one("::1/1", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOPBA… in TEST()
214 …test_config_parse_address_one("::1/2", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOPBA… in TEST()
215 …test_config_parse_address_one("::1/32", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOPB… in TEST()
216 …test_config_parse_address_one("::1/33", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOPB… in TEST()
217 …test_config_parse_address_one("::1/64", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOPB… in TEST()
218 …test_config_parse_address_one("::1/128", AF_INET6, 1, &(union in_addr_union) { .in6 = IN6ADDR_LOOP… in TEST()
Dnetworkd-dhcp-prefix-delegation.c138 … if (in6_addr_prefix_covers(pd_prefix, pd_prefix_len, &address->in_addr.in6) <= 0) in dhcp_pd_get_assigned_subnet_prefix()
142 struct in6_addr prefix = address->in_addr.in6; in dhcp_pd_get_assigned_subnet_prefix()
157 if (in6_addr_prefix_covers(pd_prefix, pd_prefix_len, &route->dst.in6) > 0) { in dhcp_pd_get_assigned_subnet_prefix()
159 *ret = route->dst.in6; in dhcp_pd_get_assigned_subnet_prefix()
190 sd_radv_remove_prefix(link->radv, &route->dst.in6, 64); in dhcp_pd_remove()
192 link_remove_dhcp_pd_subnet_prefix(link, &route->dst.in6); in dhcp_pd_remove()
211 prefix = address->in_addr.in6; in dhcp_pd_remove()
325 route->dst.in6 = *prefix; in dhcp_pd_request_route()
372 (void) in6_addr_prefix_to_string(&address->in_addr.in6, address->prefixlen, &buffer); in log_dhcp_pd_address()
411 address->in_addr.in6 = *a; in dhcp_pd_request_address()
[all …]
Dnetworkd-ndisc.c96 if (router && !in6_addr_equal(router, &route->provider.in6)) in ndisc_remove()
111 if (router && !in6_addr_equal(router, &address->provider.in6)) in ndisc_remove()
237 route->provider.in6 = router; in ndisc_request_route()
285 address->provider.in6 = router; in ndisc_request_address()
360 route->gw.in6 = gateway; in ndisc_router_process_default()
383 route->gw.in6 = gateway; in ndisc_router_process_default()
467 address->in_addr.in6 = *a; in ndisc_router_process_autonomous_prefix()
530 r = sd_ndisc_router_prefix_get_address(rt, &route->dst.in6); in ndisc_router_process_onlink_prefix()
665 route->gw.in6 = gateway; in ndisc_router_process_route()
667 route->dst.in6 = dst; in ndisc_router_process_route()
Dnetworkd-address-generation.c412 assert(in6_addr_is_null(&buffer.in6)); in config_parse_address_generation_type()
417 memzero(buffer.in6.s6_addr, 8); in config_parse_address_generation_type()
419 if (in6_addr_is_null(&buffer.in6)) { in config_parse_address_generation_type()
429 (void) in6_addr_mask(&buffer.in6, 64); in config_parse_address_generation_type()
436 r = ipv6_token_add(tokens, type, &buffer.in6, &secret_key); in config_parse_address_generation_type()
Dtest-network.c45 assert_se(in6_addr_equal(&d.in6, &addresses6[0])); in test_deserialize_in_addr()
46 assert_se(in6_addr_equal(&e.in6, &addresses6[1])); in test_deserialize_in_addr()
47 assert_se(in6_addr_equal(&f.in6, &addresses6[2])); in test_deserialize_in_addr()
Dnetworkd-ipv6ll.c68 if (in6_addr_is_set(&a->in_addr_peer.in6)) in link_may_have_ipv6ll()
70 if (in6_addr_is_link_local(&a->in_addr.in6)) in link_may_have_ipv6ll()
Dnetworkd-address.c132 in6_addr_equal(&address->in_addr.in6, &address->link->ipv6ll_address)) in address_free()
171 router && !in6_addr_equal(router, &a->provider.in6)) in link_mark_addresses()
478 in6_addr_is_link_local(&address->in_addr.in6) && in address_update()
481 link->ipv6ll_address = address->in_addr.in6; in address_update()
872 a->in_addr.in6 = address; in link_drop_ipv6ll_addresses()
902 if (address->family == AF_INET6 && in6_addr_is_link_local(&address->in_addr.in6)) in link_drop_foreign_addresses()
1007 in_addr.in6.s6_addr[15] |= 1; in address_acquire()
1417 r = sd_netlink_message_read_in6_addr(message, IFA_LOCAL, &tmp->in_addr.in6); in manager_rtnl_process_address()
1420 … r = sd_netlink_message_read_in6_addr(message, IFA_ADDRESS, &tmp->in_addr_peer.in6); in manager_rtnl_process_address()
1427 … r = sd_netlink_message_read_in6_addr(message, IFA_ADDRESS, &tmp->in_addr.in6); in manager_rtnl_process_address()
Dnetworkd-radv.c213 address->in_addr.in6 = *a; in link_request_radv_addresses()
321 addresses[n_addresses++] = addr->in6; in network_get_ipv6_dns()
818 (void) in6_addr_mask(&a.in6, p->prefixlen); in config_parse_prefix()
819 p->prefix = a.in6; in config_parse_prefix()
1029 (void) in6_addr_mask(&a.in6, p->prefixlen); in config_parse_route_prefix()
1030 p->prefix = a.in6; in config_parse_route_prefix()
1144 m[n->n_router_dns++] = a.in6; in config_parse_radv_dns()
/systemd-251/src/resolve/
Dresolved-dns-stream.c111 s->ifindex = s->local.in6.sin6_scope_id; in dns_stream_identify()
119 s->ifindex = s->peer.in6.sin6_scope_id; in dns_stream_identify()
402 s->read_packet->sender.in6 = s->peer.in6.sin6_addr; in on_stream_io()
403 … s->read_packet->sender_port = be16toh(s->peer.in6.sin6_port); in on_stream_io()
404 … s->read_packet->destination.in6 = s->local.in6.sin6_addr; in on_stream_io()
405 … s->read_packet->destination_port = be16toh(s->local.in6.sin6_port); in on_stream_io()
408 … s->read_packet->ifindex = s->peer.in6.sin6_scope_id; in on_stream_io()
410 … s->read_packet->ifindex = s->local.in6.sin6_scope_id; in on_stream_io()
564 …s->tfo_salen = tfo_address->sa.sa_family == AF_INET6 ? sizeof(tfo_address->in6) : sizeof(tfo_addre… in dns_stream_new()
Dresolved-llmnr.c212 .in6.sin6_family = AF_INET6, in manager_llmnr_ipv6_udp_fd()
213 .in6.sin6_port = htobe16(LLMNR_PORT), in manager_llmnr_ipv6_udp_fd()
249 r = bind(s, &sa.sa, sizeof(sa.in6)); in manager_llmnr_ipv6_udp_fd()
261 r = bind(s, &sa.sa, sizeof(sa.in6)); in manager_llmnr_ipv6_udp_fd()
411 .in6.sin6_family = AF_INET6, in manager_llmnr_ipv6_tcp_fd()
412 .in6.sin6_port = htobe16(LLMNR_PORT), in manager_llmnr_ipv6_tcp_fd()
439 r = bind(s, &sa.sa, sizeof(sa.in6)); in manager_llmnr_ipv6_tcp_fd()
451 r = bind(s, &sa.sa, sizeof(sa.in6)); in manager_llmnr_ipv6_tcp_fd()
Dresolved-dns-scope.c268 addr.in6 = LLMNR_MULTICAST_IPV6_ADDRESS; in dns_scope_emit_one()
296 if (in6_addr_is_null(&p->destination.in6)) in dns_scope_emit_one()
297 addr.in6 = MDNS_MULTICAST_IPV6_ADDRESS; in dns_scope_emit_one()
378 .in6.sin6_family = server->family, in dns_scope_socket()
379 .in6.sin6_port = htobe16(port), in dns_scope_socket()
380 .in6.sin6_addr = server->address.in6, in dns_scope_socket()
381 .in6.sin6_scope_id = ifindex, in dns_scope_socket()
383 salen = sizeof(sa.in6); in dns_scope_socket()
405 .in6.sin6_family = family, in dns_scope_socket()
406 .in6.sin6_port = htobe16(port), in dns_scope_socket()
[all …]
Dresolved-manager.c149 r = sd_netlink_message_read_in6_addr(mm, IFA_LOCAL, &address.in6); in manager_process_address()
151 r = sd_netlink_message_read_in6_addr(mm, IFA_ADDRESS, &address.in6); in manager_process_address()
800 p->sender.in6 = sa.in6.sin6_addr; in manager_recv()
801 p->sender_port = be16toh(sa.in6.sin6_port); in manager_recv()
802 p->ifindex = sa.in6.sin6_scope_id; in manager_recv()
821 p->destination.in6 = i->ipi6_addr; in manager_recv()
1023 .msg_namelen = sizeof(sa.in6), in manager_ipv6_send()
1035 .in6.sin6_family = AF_INET6, in manager_ipv6_send()
1036 .in6.sin6_addr = *destination, in manager_ipv6_send()
1037 .in6.sin6_port = htobe16(port), in manager_ipv6_send()
[all …]
Dresolved-mdns.c204 if (!in6_addr_equal(&p->destination.in6, &MDNS_MULTICAST_IPV6_ADDRESS)) in mdns_should_reply_using_unicast()
514 .in6.sin6_family = AF_INET6, in manager_mdns_ipv6_fd()
515 .in6.sin6_port = htobe16(MDNS_PORT), in manager_mdns_ipv6_fd()
556 r = bind(s, &sa.sa, sizeof(sa.in6)); in manager_mdns_ipv6_fd()
568 r = bind(s, &sa.sa, sizeof(sa.in6)); in manager_mdns_ipv6_fd()
/systemd-251/src/shared/
Dlocal-addresses.c152 r = sd_netlink_message_read_in6_addr(m, IFA_LOCAL, &a->address.in6); in local_addresses()
154 … r = sd_netlink_message_read_in6_addr(m, IFA_ADDRESS, &a->address.in6); in local_addresses()
415 sa.in6 = (struct sockaddr_in6) { in local_outbounds()
417 .sin6_addr = gateways[i].address.in6, in local_outbounds()
482 if (in6_addr_is_null(&sa.in6.sin6_addr)) in local_outbounds()
491 .address.in6 = sa.in6.sin6_addr, in local_outbounds()
Din-addr-prefix-util.c24 .address.in6 = IN6ADDR_LOOPBACK_INIT, \
39 .address.in6.s6_addr[0] = 0xfe, \
40 .address.in6.s6_addr[1] = 0x80, \
54 .address.in6.s6_addr[0] = 0xff, \
Dfirewall-util-nft.c830 r = sd_nfnl_nft_message_add_setelem(m, 0, &start.in6, sizeof(start.in6), NULL, 0); in nft_message_add_setelem_ip6range()
838 r = sd_nfnl_nft_message_add_setelem(m, 1, &end.in6, sizeof(end.in6), NULL, 0); in nft_message_add_setelem_ip6range()
998 memcpy(data, &previous_remote->in6, sizeof(previous_remote->in6)); in fw_nftables_add_local_dnat_internal()
1010 memcpy(data, &remote->in6, sizeof(remote->in6)); in fw_nftables_add_local_dnat_internal()
Dsocket-netlink.c84 .sockaddr.in6 = { in socket_address_parse()
123 .sockaddr.in6 = { in socket_address_parse()
125 .sin6_addr = address.in6, in socket_address_parse()
/systemd-251/src/libsystemd/sd-daemon/
Dsd-daemon.c342 sockaddr.in6.sin6_port != in->sin6_port) in sd_is_socket_sockaddr()
346 sockaddr.in6.sin6_flowinfo != in->sin6_flowinfo) in sd_is_socket_sockaddr()
350 sockaddr.in6.sin6_scope_id != in->sin6_scope_id) in sd_is_socket_sockaddr()
353 return memcmp(sockaddr.in6.sin6_addr.s6_addr, in->sin6_addr.s6_addr, in sd_is_socket_sockaddr()

123