Searched defs:addr (Results 1 - 25 of 36) sorted by relevance

12

/systemd/src/basic/
H A Dether-addr-util.c24 #include "ether-addr-util.h"
27 char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]) { argument
28 assert(addr);
36 addr->ether_addr_octet[0],
37 addr->ether_addr_octet[1],
38 addr->ether_addr_octet[2],
39 addr->ether_addr_octet[3],
40 addr->ether_addr_octet[4],
41 addr->ether_addr_octet[5]);
H A Dsigbus.c42 static void sigbus_push(void *addr) { argument
45 assert(addr);
49 if (__sync_bool_compare_and_swap(&sigbus_queue[u], NULL, addr)) {
86 void *addr; local
88 addr = sigbus_queue[u];
89 if (!addr)
92 if (__sync_bool_compare_and_swap(&sigbus_queue[u], addr, NULL)) {
94 *ret = addr;
H A Din-addr-util.c27 #include "in-addr-util.h"
264 unsigned char in_addr_netmask_to_prefixlen(const struct in_addr *addr) { argument
265 assert(addr);
267 return 32 - u32ctz(be32toh(addr->s_addr));
270 struct in_addr* in_addr_prefixlen_to_netmask(struct in_addr *addr, unsigned char prefixlen) { argument
271 assert(addr);
276 addr->s_addr = 0;
278 addr->s_addr = htobe32((0xffffffff << (32 - prefixlen)) & 0xffffffff);
280 return addr;
283 int in_addr_default_prefixlen(const struct in_addr *addr, unsigne argument
307 in_addr_default_subnet_mask(const struct in_addr *addr, struct in_addr *mask) argument
322 in_addr_mask(int family, union in_addr_union *addr, unsigned char prefixlen) argument
[all...]
H A Dselinux-util.c417 int mac_selinux_bind(int fd, const struct sockaddr *addr, socklen_t addrlen) { argument
429 assert(addr);
436 if (addr->sa_family != AF_UNIX)
444 un = (const struct sockaddr_un*) addr;
480 r = bind(fd, addr, addrlen) < 0 ? -errno : 0;
489 if (bind(fd, addr, addrlen) < 0)
/systemd/src/test/
H A Dtest-sigbus.c29 void *addr = NULL; local
34 assert_se(sigbus_pop(&addr) == 0);
43 assert_se(sigbus_pop(&addr) == 0);
46 assert_se(sigbus_pop(&addr) == 0);
49 assert_se(sigbus_pop(&addr) == 0);
54 assert_se(sigbus_pop(&addr) > 0);
55 assert_se(addr == p + page_size() * 8);
56 assert_se(sigbus_pop(&addr) > 0);
57 assert_se(addr == p + page_size() * 10);
58 assert_se(sigbus_pop(&addr)
[all...]
H A Dtest-socket-util.c23 #include "in-addr-util.h"
248 static void test_in_addr_to_string_one(int f, const char *addr) { argument
252 assert_se(in_addr_from_string(f, addr, &ua) >= 0);
254 printf("test_in_addr_to_string_one: %s == %s\n", addr, r);
255 assert_se(streq(addr, r));
/systemd/src/libsystemd/sd-resolve/
H A Dtest-resolve.c47 _cleanup_free_ char *addr = NULL; local
49 assert_se(sockaddr_pretty(i->ai_addr, i->ai_addrlen, false, true, &addr) == 0);
50 puts(addr);
/systemd/src/libsystemd-network/
H A Dlldp-port.c87 const struct ether_addr *addr,
94 assert_return(addr, -EINVAL);
107 memcpy(&p->mac, addr, ETH_ALEN);
85 lldp_port_new(int ifindex, const char *ifname, const struct ether_addr *addr, void *userdata, lldp_port **ret) argument
H A Dtest-ipv4ll-manual.c31 #include "in-addr-util.h"
39 struct in_addr addr = {}; local
43 if (sd_ipv4ll_get_address(ll, &addr) >= 0)
44 assert_se(in_addr_to_string(AF_INET, (const union in_addr_union*) &addr, &address) >= 0);
H A Ddhcp6-option.c87 DHCP6Address *addr; local
119 LIST_FOREACH(addresses, addr, ia->addresses) {
121 sizeof(addr->iaaddr));
125 memcpy(*buf, &addr->iaaddr, sizeof(addr->iaaddr));
127 *buf += sizeof(addr->iaaddr);
128 *buflen -= sizeof(addr->iaaddr);
130 ia_addrlen += sizeof(DHCP6Option) + sizeof(addr->iaaddr);
192 DHCP6Address *addr; local
202 sizeof(addr
[all...]
H A Dsd-dhcp6-lease.c39 DHCP6Address *addr; local
45 LIST_FOREACH(addresses, addr, ia->addresses) {
46 t = be32toh(addr->iaaddr.lifetime_valid);
151 int sd_dhcp6_lease_get_address(sd_dhcp6_lease *lease, struct in6_addr *addr, argument
155 assert_return(addr, -EINVAL);
162 memcpy(addr, &lease->addr_iter->iaaddr.address,
H A Dsd-ipv4ll.c31 #include "in-addr-util.h"
136 int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr) { argument
145 seed = siphash24(&addr->ether_addr_octet, ETH_ALEN, HASH_KEY.bytes);
154 return sd_ipv4acd_set_mac(ll->acd, addr);
233 uint32_t addr; local
240 addr = be32toh(address->s_addr);
242 if ((addr & 0x0000FF00) == 0x0000 ||
243 (addr & 0x0000FF00) == 0xFF00)
267 be32_t addr; local
278 addr
[all...]
H A Dtest-dhcp-client.c197 const uint8_t *addr, size_t addr_len,
359 struct in_addr addr; local
367 assert_se(sd_dhcp_lease_get_address(lease, &addr) >= 0);
368 assert_se(memcmp(&addr.s_addr, &test_addr_acq_ack[44],
369 sizeof(addr.s_addr)) == 0);
371 assert_se(sd_dhcp_lease_get_netmask(lease, &addr) >= 0);
372 assert_se(memcmp(&addr.s_addr, &test_addr_acq_ack[285],
373 sizeof(addr.s_addr)) == 0);
375 assert_se(sd_dhcp_lease_get_router(lease, &addr) >= 0);
376 assert_se(memcmp(&addr
193 dhcp_network_bind_raw_socket( int index, union sockaddr_union *link, uint32_t id, const uint8_t *addr, size_t addr_len, uint16_t arp_type) argument
[all...]
H A Dtest-dhcp6-client.c213 struct in6_addr addr; local
308 assert_se(sd_dhcp6_lease_get_address(lease, &addr, &lt_pref,
310 assert_se(!memcmp(&addr, &msg_advertise[42], sizeof(addr)));
313 assert_se(sd_dhcp6_lease_get_address(lease, &addr, &lt_pref,
317 assert_se(sd_dhcp6_lease_get_address(lease, &addr, &lt_pref,
319 assert_se(!memcmp(&addr, &msg_advertise[42], sizeof(addr)));
320 assert_se(sd_dhcp6_lease_get_address(lease, &addr, &lt_pref,
323 assert_se(sd_dhcp6_lease_get_address(lease, &addr,
415 struct in6_addr addr; local
605 struct in6_addr addr; local
[all...]
/systemd/src/network/
H A Dnetworkd-ipv4ll.c29 struct in_addr addr; local
37 r = sd_ipv4ll_get_address(link->ipv4ll, &addr);
41 log_link_debug(link, "IPv4 link-local release %u.%u.%u.%u", ADDRESS_FMT_VAL(addr));
50 address->in_addr.in = addr;
H A Dnetworkd-dhcp6.c66 _cleanup_address_free_ Address *addr = NULL; local
68 r = address_new(&addr);
72 addr->family = AF_INET6;
73 memcpy(&addr->in_addr.in6, ip6_addr, sizeof(*ip6_addr));
75 addr->flags = IFA_F_NOPREFIXROUTE;
76 addr->prefixlen = 128;
78 addr->cinfo.ifa_prefered = lifetime_preferred;
79 addr->cinfo.ifa_valid = lifetime_valid;
83 SD_NDISC_ADDRESS_FORMAT_VAL(addr->in_addr.in6),
84 addr
[all...]
H A Dnetworkd-dhcp4.c148 struct in_addr addr; local
210 r = sd_dhcp_lease_get_address(link->dhcp_lease, &addr);
217 address->in_addr.in = addr;
285 _cleanup_address_free_ Address *addr = NULL; local
295 r = address_new(&addr);
299 addr->family = AF_INET;
300 addr->in_addr.in.s_addr = address->s_addr;
301 addr->cinfo.ifa_prefered = lifetime;
302 addr->cinfo.ifa_valid = lifetime;
303 addr
[all...]
H A Dnetworkd-netdev-vxlan.c148 union in_addr_union *addr = data, buffer; local
168 *addr = buffer;
H A Dnetworkd-netdev-tunnel.c385 union in_addr_union *addr = data, buffer; local
411 *addr = buffer;
/systemd/src/boot/efi/
H A Dlinux.c90 EFI_PHYSICAL_ADDRESS addr; local
100 addr = 0x3fffffff;
102 EFI_SIZE_TO_PAGES(0x4000), &addr);
105 boot_setup = (struct SetupHeader *)(UINTN)addr;
113 addr = 0xA0000;
115 EFI_SIZE_TO_PAGES(cmdline_len + 1), &addr);
118 CopyMem((VOID *)(UINTN)addr, cmdline, cmdline_len);
119 ((CHAR8 *)addr)[cmdline_len] = 0;
120 boot_setup->cmd_line_ptr = (UINT32)addr;
/systemd/src/libsystemd/sd-netlink/
H A Dnetlink-socket.c241 } addr = { local
251 0, &addr.sa, sizeof(addr));
/systemd/src/nss-myhostname/
H A Dnss-myhostname.c136 memcpy(r_tuple->addr, LOCALADDRESS_IPV6, 16);
147 *(uint32_t*) r_tuple->addr = local_address_ipv4;
161 memcpy(r_tuple->addr, &a->address, 16);
399 const void* addr, socklen_t len,
417 assert(addr);
436 if ((*(uint32_t*) addr) == LOCALADDRESS_IPV4)
439 if ((*(uint32_t*) addr) == htonl(INADDR_LOOPBACK)) {
448 if (memcmp(addr, LOCALADDRESS_IPV6, 16) == 0) {
461 if (memcmp(addr, &a->address, FAMILY_ADDRESS_SIZE(af)) == 0)
474 if (memcmp(addr,
398 _nss_myhostname_gethostbyaddr2_r( const void* addr, socklen_t len, int af, struct hostent *host, char *buffer, size_t buflen, int *errnop, int *h_errnop, int32_t *ttlp) argument
[all...]
/systemd/src/nss-resolve/
H A Dnss-resolve.c30 #include "in-addr-util.h"
251 memcpy(r_tuple->addr, a, sz);
501 const void* addr, socklen_t len,
509 const void* addr, socklen_t len,
528 assert(addr);
568 r = sd_bus_message_append_array(req, 'y', addr, len);
632 memcpy(r_addr, addr, len);
686 const void* addr, socklen_t len,
695 return fallback(addr, len, af, result, buffer, buflen, errnop, h_errnop, ttlp);
500 _nss_resolve_gethostbyaddr2_r( const void* addr, socklen_t len, int af, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop, int32_t *ttlp) argument
/systemd/src/journal/
H A Dmmap-cache.c470 static int mmap_try_harder(MMapCache *m, void *addr, int fd, int prot, int flags, uint64_t offset, size_t size, void **res) { argument
480 ptr = mmap(addr, size, prot, flags, fd, offset);
642 void *addr; local
644 r = sigbus_pop(&addr);
657 if ((uint8_t*) addr >= (uint8_t*) w->ptr &&
658 (uint8_t*) addr < (uint8_t*) w->ptr + w->size) {
/systemd/src/resolve/
H A Dresolved-dns-scope.c178 union in_addr_union addr; local
225 addr.in = LLMNR_MULTICAST_IPV4_ADDRESS;
228 addr.in6 = LLMNR_MULTICAST_IPV6_ADDRESS;
235 r = manager_send(s->manager, fd, ifindex, family, &addr, LLMNR_PORT, p);
250 addr.in = MDNS_MULTICAST_IPV4_ADDRESS;
253 addr.in6 = MDNS_MULTICAST_IPV6_ADDRESS;
260 r = manager_send(s->manager, fd, ifindex, family, &addr, MDNS_PORT, p);
425 dns_name_endswith(domain, "127.in-addr.arpa") > 0 ||
430 if (dns_name_endswith(domain, "0.in-addr.arpa") > 0 ||
431 dns_name_equal(domain, "255.255.255.255.in-addr
[all...]

Completed in 50 milliseconds

12