Home
last modified time | relevance | path

Searched refs:htobe32 (Results 1 – 25 of 49) sorted by relevance

12

/systemd-251/src/libsystemd-network/
Dtest-dhcp-server.c27 .s_addr = htobe32(INADDR_LOOPBACK), in test_basic()
30 .s_addr = htobe32(INADDR_ANY), in test_basic()
106 .message.xid = htobe32(0x12345678), in test_message_handler()
114 .s_addr = htobe32(INADDR_LOOPBACK), in test_message_handler()
117 .s_addr = htobe32(INADDR_LOOPBACK + 42), in test_message_handler()
166 test.option_requested_ip.address = htobe32(0x12345678); in test_message_handler()
170 test.option_server_id.address = htobe32(INADDR_LOOPBACK); in test_message_handler()
171 test.option_requested_ip.address = htobe32(INADDR_LOOPBACK + 3); in test_message_handler()
174 test.option_server_id.address = htobe32(0x12345678); in test_message_handler()
175 test.option_requested_ip.address = htobe32(INADDR_LOOPBACK + 3); in test_message_handler()
[all …]
Dtest-ipv4ll.c97 address.s_addr |= htobe32(169U << 24 | 254U << 16); in test_public_api_setters()
99 address.s_addr |= htobe32(0x00FF); in test_public_api_setters()
101 address.s_addr |= htobe32(0xF000); in test_public_api_setters()
103 address.s_addr |= htobe32(0x0F00); in test_public_api_setters()
Dfuzz-dhcp-server.c31 lease->address = htobe32(UINT32_C(10) << 24 | i); in add_lease()
48 … &(struct in_addr) { .s_addr = htobe32(UINT32_C(10) << 24 | i)}, in add_static_lease()
54 struct in_addr address = { .s_addr = htobe32(UINT32_C(10) << 24 | UINT32_C(1))}; in LLVMFuzzerTestOneInput()
Dsd-radv.c141 return htobe32(UINT32_MAX); in usec_to_be32_sec()
145 return htobe32(UINT32_MAX - 1); in usec_to_be32_sec()
147 return htobe32(usec / USEC_PER_SEC); in usec_to_be32_sec()
206 opt_mtu.nd_opt_mtu_mtu = htobe32(ra->mtu); in radv_send()
784 opt_rdnss->lifetime = htobe32(lifetime); in sd_radv_set_rdnss()
822 opt_dnssl->lifetime = htobe32(lifetime); in sd_radv_set_dnssl()
Ddhcp-packet.c51 message->xid = htobe32(xid); in dhcp_message_init()
52 message->magic = htobe32(DHCP_MAGIC_COOKIE); in dhcp_message_init()
Dfuzz-dhcp-server-relay.c21 struct in_addr address = {.s_addr = htobe32(UINT32_C(10) << 24 | UINT32_C(1))}; in LLVMFuzzerTestOneInput()
Dsd-dhcp6-client.c287 client->ia_na.header.id = htobe32(iaid); in sd_dhcp6_client_set_iaid()
288 client->ia_pd.header.id = htobe32(iaid); in sd_dhcp6_client_set_iaid()
489 client->transaction_id = transaction_id & htobe32(0x00ffffff); in dhcp6_client_set_transaction_id()
916 client->transaction_id = random_u32() & htobe32(0x00ffffff); in client_start_transaction()
1274 if (client->transaction_id != (message->transaction_id & htobe32(0x00ffffff))) in client_receive_message()
/systemd-251/src/shared/
Dfirewall-util-nft.c84 r = sd_netlink_message_append_u32(m, NFTA_FIB_FLAGS, htobe32(nft_fib_flags)); in nfnl_add_expr_fib()
87 r = sd_netlink_message_append_u32(m, NFTA_FIB_RESULT, htobe32(result)); in nfnl_add_expr_fib()
90 r = sd_netlink_message_append_u32(m, NFTA_FIB_DREG, htobe32(dreg)); in nfnl_add_expr_fib()
109 r = sd_netlink_message_append_u32(m, NFTA_META_KEY, htobe32(key)); in nfnl_add_expr_meta()
113 r = sd_netlink_message_append_u32(m, NFTA_META_DREG, htobe32(dreg)); in nfnl_add_expr_meta()
132 r = sd_netlink_message_append_u32(m, NFTA_PAYLOAD_DREG, htobe32(dreg)); in nfnl_add_expr_payload()
135 r = sd_netlink_message_append_u32(m, NFTA_PAYLOAD_BASE, htobe32(pb)); in nfnl_add_expr_payload()
138 r = sd_netlink_message_append_u32(m, NFTA_PAYLOAD_OFFSET, htobe32(offset)); in nfnl_add_expr_payload()
141 r = sd_netlink_message_append_u32(m, NFTA_PAYLOAD_LEN, htobe32(len)); in nfnl_add_expr_payload()
163 return sd_netlink_message_append_u32(m, NFTA_LOOKUP_SREG, htobe32(sreg)); in nfnl_add_expr_lookup_set_data()
[all …]
Dfirewall-util-iptables.c303 entry->ip.dst.s_addr = htobe32(0x7F000000); in fw_iptables_add_local_dnat()
304 entry->ip.dmsk.s_addr = htobe32(0xFF000000); in fw_iptables_add_local_dnat()
334 entry->ip.dst.s_addr = htobe32(0x7F000000); in fw_iptables_add_local_dnat()
335 entry->ip.dmsk.s_addr = htobe32(0xFF000000); in fw_iptables_add_local_dnat()
Din-addr-prefix-util.c17 .address.in.s_addr = htobe32(UINT32_C(127) << 24), \
31 .address.in.s_addr = htobe32((UINT32_C(169) << 24) | \
47 .address.in.s_addr = htobe32((UINT32_C(224) << 24)), \
/systemd-251/src/network/
Dtest-networkd-conf.c200 … AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
201 … AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
202 … AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
203 … AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
204 … AF_INET, 1, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
/systemd-251/src/network/netdev/
Dtunnel.c24 #define IP6_FLOWINFO_FLOWLABEL htobe32(0x000FFFFF)
368 ikey = okey = htobe32(t->key); in netdev_gre_erspan_fill_message_create()
374 ikey = htobe32(t->ikey); in netdev_gre_erspan_fill_message_create()
379 okey = htobe32(t->okey); in netdev_gre_erspan_fill_message_create()
485 ikey = okey = htobe32(t->key); in netdev_ip6gre_fill_message_create()
491 ikey = htobe32(t->ikey); in netdev_ip6gre_fill_message_create()
496 okey = htobe32(t->okey); in netdev_ip6gre_fill_message_create()
542 ikey = okey = htobe32(t->key); in netdev_vti_fill_message_create()
544 ikey = htobe32(t->ikey); in netdev_vti_fill_message_create()
545 okey = htobe32(t->okey); in netdev_vti_fill_message_create()
[all …]
/systemd-251/src/test/
Dtest-bpf-firewall.c129 … .address.in.s_addr = htobe32((UINT32_C(10) << 24) | (UINT32_C(1) << 8)), in main()
133 .address.in.s_addr = htobe32(0x7f000002), in main()
137 .address.in.s_addr = htobe32(0x7f000000), in main()
141 … .address.in.s_addr = htobe32((UINT32_C(10) << 24) | (UINT32_C(3) << 8)), in main()
Dtest-in-addr-util.c64 … AF_INET, 0, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
65 … AF_INET, 0, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
66 … AF_INET, 0, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
67 … AF_INET, 0, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
68 … AF_INET, 0, &(union in_addr_union) { .in = (struct in_addr) { .s_addr = htobe32(0x01020304) } }, … in TEST()
Dtest-in-addr-prefix-util.c21 .in.s_addr = htobe32((UINT32_C(169) << 24) | in test_config_parse_in_addr_prefixes()
34 .in.s_addr = htobe32((UINT32_C(169) << 24) | in test_config_parse_in_addr_prefixes()
Dtest-socket-util.c94 .in.sin_addr.s_addr = htobe32(INADDR_ANY), in TEST()
99 .in.sin_addr.s_addr = htobe32(INADDR_ANY), in TEST()
104 .in.sin_addr.s_addr = htobe32(1234), in TEST()
/systemd-251/src/nss-myhostname/
Dnss-myhostname.c24 #define LOCALADDRESS_IPV4 (htobe32(0x7F000002))
59 local_address_ipv4 = htobe32(INADDR_LOOPBACK); in _nss_myhostname_gethostbyname4_r()
353 local_address_ipv4 = htobe32(INADDR_LOOPBACK); in _nss_myhostname_gethostbyname3_r()
454 if ((*(uint32_t*) addr) == htobe32(INADDR_LOOPBACK)) { in _nss_myhostname_gethostbyaddr2_r()
456 local_address_ipv4 = htobe32(INADDR_LOOPBACK); in _nss_myhostname_gethostbyaddr2_r()
/systemd-251/src/libsystemd/sd-device/
Ddevice-monitor.c483 if (buf.nlh.magic != htobe32(UDEV_MONITOR_MAGIC)) in device_monitor_receive_device()
486 buf.nlh.magic, htobe32(UDEV_MONITOR_MAGIC)); in device_monitor_receive_device()
553 .magic = htobe32(UDEV_MONITOR_MAGIC), in device_monitor_send_device()
588 nlh.filter_subsystem_hash = htobe32(string_hash32(val)); in device_monitor_send_device()
591 nlh.filter_devtype_hash = htobe32(string_hash32(val)); in device_monitor_send_device()
599 nlh.filter_tag_bloom_hi = htobe32(tag_bloom_bits >> 32); in device_monitor_send_device()
600 nlh.filter_tag_bloom_lo = htobe32(tag_bloom_bits & 0xffffffff); in device_monitor_send_device()
/systemd-251/src/basic/
Dsparse-endian.h48 #undef htobe32
78 static inline be32_t htobe32(uint32_t value) { return (be32_t __sd_force) bswap_32_on_le(value); } in htobe32() function
Din-addr-util.c140 a->s6_addr32[2] == htobe32(UINT32_C(0x0000ffff)); in in6_addr_is_ipv4_mapped_address()
274 u->in.s_addr = htobe32(n); in in_addr_prefix_nth()
343 u->in.s_addr = htobe32(n | c); in in_addr_random_prefix()
593 addr->s_addr = htobe32((0xffffffff << (32 - prefixlen)) & 0xffffffff); in in4_addr_prefixlen_to_netmask()
/systemd-251/src/libsystemd/sd-netlink/
Dnetlink-message-nfnl.c100 r = sd_netlink_message_append_u32(m, NFTA_HOOK_HOOKNUM, htobe32(hook)); in sd_nfnl_nft_message_new_basechain()
104 r = sd_netlink_message_append_u32(m, NFTA_HOOK_PRIORITY, htobe32(prio)); in sd_nfnl_nft_message_new_basechain()
212 r = sd_netlink_message_append_u32(m, NFTA_SET_KEY_LEN, htobe32(klen)); in sd_nfnl_nft_message_new_set()
/systemd-251/src/resolve/
Dresolved-dns-synthesize.c77 rr->a.in_addr.s_addr = htobe32(INADDR_LOOPBACK); in synthesize_localhost_rr()
234 .address.in.s_addr = htobe32(0x7F000002), in synthesize_system_hostname_rr()
262 if (af == AF_INET && address->in.s_addr == htobe32(0x7F000002)) { in synthesize_system_hostname_ptr()
Dresolved-dns-packet.h290 #define LLMNR_MULTICAST_IPV4_ADDRESS ((struct in_addr) { .s_addr = htobe32(224U << 24 | 252U) })
293 #define MDNS_MULTICAST_IPV4_ADDRESS ((struct in_addr) { .s_addr = htobe32(224U << 24 | 251U) })
/systemd-251/coccinelle/
Dhtonl.cocci6 + htobe32(s)
/systemd-251/.lgtm/cpp-queries/
DPotentiallyDangerousFunction.ql33 message = "Call to htonl() is confusing. Use htobe32() instead."

12