Home
last modified time | relevance | path

Searched refs:in_addr (Results 1 – 25 of 88) sorted by relevance

1234

/systemd-251/src/systemd/
Dsd-dhcp-lease.h49 int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
53 int sd_dhcp_lease_get_broadcast(sd_dhcp_lease *lease, struct in_addr *addr);
54 int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr);
55 int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, const struct in_addr **addr);
56 int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr);
57 int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_addr *addr);
58 …e_get_servers(sd_dhcp_lease *lease, sd_dhcp_lease_server_type_t what, const struct in_addr **addr);
59 int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr);
60 int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr);
61 int sd_dhcp_lease_get_sip(sd_dhcp_lease *lease, const struct in_addr **addr);
[all …]
Dsd-dhcp-server.h59 int sd_dhcp_server_configure_pool(sd_dhcp_server *server, const struct in_addr *address, unsigned c…
61 int sd_dhcp_server_set_boot_server_address(sd_dhcp_server *server, const struct in_addr *address);
66 int sd_dhcp_server_set_router(sd_dhcp_server *server, const struct in_addr *address);
71 const struct in_addr addresses[],
74 int sd_dhcp_server_set_lpr(sd_dhcp_server *server, const struct in_addr lpr[], size_t n);
75 int sd_dhcp_server_set_dns(sd_dhcp_server *server, const struct in_addr dns[], size_t n);
76 int sd_dhcp_server_set_ntp(sd_dhcp_server *server, const struct in_addr ntp[], size_t n);
77 int sd_dhcp_server_set_sip(sd_dhcp_server *server, const struct in_addr sip[], size_t n);
78 int sd_dhcp_server_set_pop3(sd_dhcp_server *server, const struct in_addr pop3[], size_t n);
79 int sd_dhcp_server_set_smtp(sd_dhcp_server *server, const struct in_addr smtp[], size_t n);
[all …]
/systemd-251/src/basic/
Din-addr-util.h13 struct in_addr in;
15 uint8_t bytes[CONST_MAX(sizeof(struct in_addr), sizeof(struct in6_addr))];
23 bool in4_addr_is_null(const struct in_addr *a);
24 static inline bool in4_addr_is_set(const struct in_addr *a) { in in4_addr_is_set()
45 bool in4_addr_is_link_local(const struct in_addr *a);
50 bool in4_addr_is_localhost(const struct in_addr *a);
54 bool in4_addr_is_local_multicast(const struct in_addr *a);
55 bool in4_addr_is_non_local(const struct in_addr *a);
58 bool in4_addr_equal(const struct in_addr *a, const struct in_addr *b);
89 unsigned char in4_addr_netmask_to_prefixlen(const struct in_addr *addr);
[all …]
Din-addr-util.c21 bool in4_addr_is_null(const struct in_addr *a) { in in4_addr_is_null()
45 bool in4_addr_is_link_local(const struct in_addr *a) { in in4_addr_is_link_local()
91 bool in4_addr_is_local_multicast(const struct in_addr *a) { in in4_addr_is_local_multicast()
97 bool in4_addr_is_localhost(const struct in_addr *a) { in in4_addr_is_localhost()
104 bool in4_addr_is_non_local(const struct in_addr *a) { in in4_addr_is_non_local()
143 bool in4_addr_equal(const struct in_addr *a, const struct in_addr *b) { in in4_addr_equal()
579 unsigned char in4_addr_netmask_to_prefixlen(const struct in_addr *addr) { in in4_addr_netmask_to_prefixlen()
585 struct in_addr* in4_addr_prefixlen_to_netmask(struct in_addr *addr, unsigned char prefixlen) { in in4_addr_prefixlen_to_netmask()
598 int in4_addr_default_prefixlen(const struct in_addr *addr, unsigned char *prefixlen) { in in4_addr_default_prefixlen()
622 int in4_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask) { in in4_addr_default_subnet_mask()
[all …]
/systemd-251/src/libsystemd-network/
Dtest-dhcp-server.c15 static void test_pool(struct in_addr *address, unsigned size, int ret) { in test_pool()
26 struct in_addr address_lo = { in test_basic()
29 struct in_addr address_any = { in test_basic()
113 struct in_addr address_lo = { in test_message_handler()
116 struct in_addr static_lease_address = { in test_message_handler()
272 … assert_se(sd_dhcp_server_set_static_lease(server, &(struct in_addr) { .s_addr = 0x01020304 }, in test_static_lease()
275 … assert_se(sd_dhcp_server_set_static_lease(server, &(struct in_addr) { .s_addr = 0x01020304 }, in test_static_lease()
278 … assert_se(sd_dhcp_server_set_static_lease(server, &(struct in_addr) { .s_addr = 0x01020304 }, in test_static_lease()
281 … assert_se(sd_dhcp_server_set_static_lease(server, &(struct in_addr) { .s_addr = 0x01020305 }, in test_static_lease()
284 … assert_se(sd_dhcp_server_set_static_lease(server, &(struct in_addr) { .s_addr = 0x01020305 }, in test_static_lease()
[all …]
Darp-util.h14 int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *mac);
15 int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const struct ether_addr *mac);
20 const struct in_addr *pa,
26 const struct in_addr *pa, in arp_send_probe()
33 const struct in_addr *pa, in arp_send_announcement()
Dsd-dhcp-lease.c34 int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr) { in sd_dhcp_lease_get_address()
45 int sd_dhcp_lease_get_broadcast(sd_dhcp_lease *lease, struct in_addr *addr) { in sd_dhcp_lease_get_broadcast()
103 const struct in_addr **addr) { in sd_dhcp_lease_get_servers()
118 int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr) { in sd_dhcp_lease_get_dns()
121 int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr) { in sd_dhcp_lease_get_ntp()
124 int sd_dhcp_lease_get_sip(sd_dhcp_lease *lease, const struct in_addr **addr) { in sd_dhcp_lease_get_sip()
127 int sd_dhcp_lease_get_pop3(sd_dhcp_lease *lease, const struct in_addr **addr) { in sd_dhcp_lease_get_pop3()
130 int sd_dhcp_lease_get_smtp(sd_dhcp_lease *lease, const struct in_addr **addr) { in sd_dhcp_lease_get_smtp()
133 int sd_dhcp_lease_get_lpr(sd_dhcp_lease *lease, const struct in_addr **addr) { in sd_dhcp_lease_get_lpr()
170 int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, const struct in_addr **addr) { in sd_dhcp_lease_get_router()
[all …]
Darp-util.c17 int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *mac) { in arp_update_filter()
32 …BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, sizeof(struct in_addr), 1, 0), /* length == sizeof… in arp_update_filter()
69 int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const struct ether_addr *mac)… in arp_network_bind_raw_socket()
100 const struct in_addr *pa, in arp_send_packet()
115 .ea_hdr.ar_pln = sizeof(struct in_addr), /* PLEN */ in arp_send_packet()
128 memcpy(&arp.arp_tpa, pa, sizeof(struct in_addr)); in arp_send_packet()
131 memcpy(&arp.arp_spa, pa, sizeof(struct in_addr)); in arp_send_packet()
Dnetwork-internal.c18 const struct in_addr *addresses, in serialize_in_addrs()
21 bool (*predicate)(const struct in_addr *addr)) { in serialize_in_addrs()
46 int deserialize_in_addrs(struct in_addr **ret, const char *string) { in deserialize_in_addrs()
47 _cleanup_free_ struct in_addr *addresses = NULL; in deserialize_in_addrs()
55 struct in_addr *new_addresses; in deserialize_in_addrs()
64 new_addresses = reallocarray(addresses, size + 1, sizeof(struct in_addr)); in deserialize_in_addrs()
147 struct in_addr dest, gw; in serialize_dhcp_routes()
Ddhcp-lease-internal.h16 struct in_addr dst_addr;
17 struct in_addr gw_addr;
48 struct in_addr *router;
76 struct in_addr *sixrd_br_addresses;
Dnetwork-internal.h10 const struct in_addr *addresses,
13 bool (*predicate)(const struct in_addr *addr));
14 int deserialize_in_addrs(struct in_addr **addresses, const char *string);
Dsd-dhcp-server.c53 const struct in_addr *address, in sd_dhcp_server_configure_pool()
58 struct in_addr netmask_addr; in sd_dhcp_server_configure_pool()
277 int sd_dhcp_server_set_boot_server_address(sd_dhcp_server *server, const struct in_addr *address) { in sd_dhcp_server_set_boot_server_address()
283 server->boot_server_address = (struct in_addr) {}; in sd_dhcp_server_set_boot_server_address()
639 sizeof(struct in_addr) * server->servers[k].size, in server_send_offer_or_ack()
1490 const struct in_addr addresses[], in sd_dhcp_server_set_servers()
1493 struct in_addr *c = NULL; in sd_dhcp_server_set_servers()
1502 … memcmp(server->servers[what].addr, addresses, sizeof(struct in_addr) * n_addresses) == 0) in sd_dhcp_server_set_servers()
1506 c = newdup(struct in_addr, addresses, n_addresses); in sd_dhcp_server_set_servers()
1516 int sd_dhcp_server_set_dns(sd_dhcp_server *server, const struct in_addr dns[], size_t n) { in sd_dhcp_server_set_dns()
[all …]
Dtest-ipv4ll.c48 const struct in_addr *pa, in arp_send_packet()
65 int arp_update_filter(int fd, const struct in_addr *a, const struct ether_addr *eth_mac) { in arp_update_filter()
69 int arp_network_bind_raw_socket(int ifindex, const struct in_addr *a, const struct ether_addr *eth_… in arp_network_bind_raw_socket()
77 struct in_addr address = {}; in test_public_api_setters()
Ddhcp-server-internal.h68 struct in_addr boot_server_address;
76 struct in_addr router_address;
88 struct in_addr relay_target;
/systemd-251/src/basic/linux/
Din.h89 struct in_addr { struct
174 struct in_addr imr_multiaddr; /* IP multicast address of group */
175 struct in_addr imr_interface; /* local IP address of interface */
179 struct in_addr imr_multiaddr; /* IP multicast address of group */
180 struct in_addr imr_address; /* local IP address of interface */
251 struct in_addr ipi_spec_dst;
252 struct in_addr ipi_addr;
262 struct in_addr sin_addr; /* Internet address */
266 sizeof(unsigned short int) - sizeof(struct in_addr)];
/systemd-251/src/network/
Dnetworkd-address.c132 in6_addr_equal(&address->in_addr.in6, &address->link->ipv6ll_address)) in address_free()
212 a->broadcast.s_addr = a->in_addr.in.s_addr | htobe32(UINT32_C(0xffffffff) >> a->prefixlen); in address_set_broadcast()
261 return be32toh(a->in_addr.in.s_addr) >> (32 - a->prefixlen); in address_prefix()
278 siphash24_compress(&a->in_addr, FAMILY_ADDRESS_SIZE(a->family), state); in address_kernel_hash_func()
307 return memcmp(&a1->in_addr, &a2->in_addr, FAMILY_ADDRESS_SIZE(a1->family)); in address_kernel_compare_func()
330 siphash24_compress(&a->in_addr, FAMILY_ADDRESS_SIZE(a->family), state); in address_hash_func()
357 r = memcmp(&a1->in_addr, &a2->in_addr, FAMILY_ADDRESS_SIZE(a1->family)); in address_compare_func()
437 masked = address->in_addr; in address_set_masquerade()
478 in6_addr_is_link_local(&address->in_addr.in6) && in address_update()
481 link->ipv6ll_address = address->in_addr.in6; in address_update()
[all …]
Dnetworkd-ipv4acd.c26 IPV4_ADDRESS_FMT_VAL(address->in_addr.in)); in static_ipv4acd_address_remove()
29 IPV4_ADDRESS_FMT_VAL(address->in_addr.in)); in static_ipv4acd_address_remove()
34 IPV4_ADDRESS_FMT_VAL(address->in_addr.in)); in static_ipv4acd_address_remove()
93 IPV4_ADDRESS_FMT_VAL(address->in_addr.in)); in on_acd()
100 IPV4_ADDRESS_FMT_VAL(address->in_addr.in)); in on_acd()
156 IPV4_ADDRESS_FMT_VAL(address->in_addr.in)); in ipv4acd_configure()
174 r = sd_ipv4acd_set_address(address->acd, &address->in_addr.in); in ipv4acd_configure()
Dnetworkd-dhcp-server.c65 if (in4_addr_is_localhost(&address->in_addr.in)) in network_adjust_dhcp_server()
68 if (in4_addr_is_link_local(&address->in_addr.in)) in network_adjust_dhcp_server()
107 address->in_addr.in = link->network->dhcp_server_address; in link_request_dhcp_server_address()
140 if (in4_addr_is_localhost(&address->in_addr.in)) in link_find_dhcp_server_address()
142 if (in4_addr_is_link_local(&address->in_addr.in)) in link_find_dhcp_server_address()
179 _cleanup_free_ struct in_addr *addresses = NULL; in link_push_uplink_to_dhcp_server()
198 struct in_addr ia; in link_push_uplink_to_dhcp_server()
261 const struct in_addr *da; in link_push_uplink_to_dhcp_server()
282 struct in_addr **addresses, in dhcp4_server_parse_dns_server_string_and_warn()
320 _cleanup_free_ struct in_addr *addresses = NULL; in dhcp4_server_set_dns_from_resolve_conf()
[all …]
Dnetworkd-dhcp4.c221 struct in_addr server; in dhcp4_request_route()
262 struct in_addr address, netmask; in dhcp4_request_prefix_route()
292 static int dhcp4_request_route_to_gateway(Link *link, const struct in_addr *gw) { in dhcp4_request_route_to_gateway()
294 struct in_addr address; in dhcp4_request_route_to_gateway()
320 const struct in_addr *gw) { in dhcp4_request_route_auto()
323 struct in_addr address, netmask, prefix; in dhcp4_request_route_auto()
401 static int dhcp4_request_static_routes(Link *link, struct in_addr *ret_default_gw) { in dhcp4_request_static_routes()
404 struct in_addr default_gw = {}; in dhcp4_request_static_routes()
444 struct in_addr dst; in dhcp4_request_static_routes()
484 struct in_addr gw; in dhcp4_request_static_routes()
[all …]
Dtest-networkd-conf.c191 assert_se(in_addr_equal(family, &a->in_addr, u)); in test_config_parse_address_one()
200 …ddress_one("1.2.3.4", AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htob… in TEST()
201 …ress_one("1.2.3.4/0", AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htob… in TEST()
202 …ress_one("1.2.3.4/1", AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htob… in TEST()
203 …ress_one("1.2.3.4/2", AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htob… in TEST()
204 …ess_one("1.2.3.4/32", AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htob… in TEST()
Dnetworkd-address-pool.c32 .in_addr = *u, in address_pool_new()
106 … if (in_addr_prefix_intersect(p->family, u, prefixlen, &a->in_addr, a->prefixlen)) in address_pool_prefix_is_taken()
119 … if (in_addr_prefix_intersect(p->family, u, prefixlen, &a->in_addr, a->prefixlen)) in address_pool_prefix_is_taken()
141 u = p->in_addr; in address_pool_acquire_one()
Dnetworkd-neighbor.c99 … siphash24_compress(&neighbor->in_addr, FAMILY_ADDRESS_SIZE(neighbor->family), state); in neighbor_hash_func()
119 r = memcmp(&a->in_addr, &b->in_addr, FAMILY_ADDRESS_SIZE(a->family)); in neighbor_compare_func()
170 (void) in_addr_to_string(neighbor->family, &neighbor->in_addr, &dst); in log_neighbor_debug()
189 … r = netlink_message_append_in_addr_union(req, NDA_DST, neighbor->family, &neighbor->in_addr); in neighbor_configure_message()
363 … r = netlink_message_append_in_addr_union(req, NDA_DST, neighbor->family, &neighbor->in_addr); in neighbor_remove()
515 r = netlink_message_read_in_addr_union(message, NDA_DST, tmp->family, &tmp->in_addr); in manager_rtnl_process_neighbor()
625 n->in_addr = IN_ADDR_NULL; in config_parse_neighbor_address()
630 r = in_addr_from_string_auto(rvalue, &n->family, &n->in_addr); in config_parse_neighbor_address()
Dtest-network.c21 _cleanup_free_ struct in_addr *addresses = NULL; in test_deserialize_in_addr()
206 assert_se(in_addr_from_string(AF_INET, "192.168.3.9", &a1->in_addr) >= 0); in test_address_equality()
208 assert_se(in_addr_from_string(AF_INET, "192.168.3.9", &a2->in_addr) >= 0); in test_address_equality()
225 assert_se(in_addr_from_string(AF_INET6, "2001:4ca0:4f01::2", &a1->in_addr) >= 0); in test_address_equality()
226 assert_se(in_addr_from_string(AF_INET6, "2001:4ca0:4f01::2", &a2->in_addr) >= 0); in test_address_equality()
233 assert_se(in_addr_from_string(AF_INET6, "2001:4ca0:4f01::1", &a2->in_addr) >= 0); in test_address_equality()
Dnetworkd-network.h57 struct in_addr *addresses;
187 struct in_addr dhcp_server_address;
190 struct in_addr dhcp_server_relay_target;
195 struct in_addr dhcp_server_router;
203 struct in_addr dhcp_server_boot_server_address;
/systemd-251/src/resolve/
Dresolved-link.c706 LinkAddress *link_find_address(Link *l, int family, const union in_addr_union *in_addr) { in link_find_address() argument
712 if (!in_addr) in link_find_address()
716 if (a->family == family && in_addr_equal(family, &a->in_addr, in_addr)) in link_find_address()
806 int link_address_new(Link *l, LinkAddress **ret, int family, const union in_addr_union *in_addr) { in link_address_new() argument
810 assert(in_addr); in link_address_new()
818 .in_addr = *in_addr, in link_address_new()
907 a->llmnr_address_rr->a.in_addr = a->in_addr.in; in link_address_add_rrs()
912 …r = dns_resource_record_new_reverse(&a->llmnr_ptr_rr, a->family, &a->in_addr, a->link->manager->ll… in link_address_add_rrs()
960 a->mdns_address_rr->a.in_addr = a->in_addr.in; in link_address_add_rrs()
965 …r = dns_resource_record_new_reverse(&a->mdns_ptr_rr, a->family, &a->in_addr, a->link->manager->mdn… in link_address_add_rrs()
[all …]

1234