Home
last modified time | relevance | path

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

12345

/Zephyr-latest/include/zephyr/net/
Digmp.h34 struct in_addr *source_list; /**< List of sources to include or exclude */
49 int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr,
52 static inline int net_ipv4_igmp_join(struct net_if *iface, const struct in_addr *addr, in net_ipv4_igmp_join()
72 int net_ipv4_igmp_leave(struct net_if *iface, const struct in_addr *addr);
75 const struct in_addr *addr) in net_ipv4_igmp_leave()
Ddhcpv4_server.h51 struct in_addr addr;
72 int net_dhcpv4_server_start(struct net_if *iface, struct in_addr *base_addr);
129 struct in_addr *addr,
Dnet_if.h455 struct in_addr netmask;
467 struct in_addr gw;
504 struct in_addr server_id;
507 struct in_addr requested_ip;
510 struct in_addr netmask;
522 struct in_addr request_server_addr;
525 struct in_addr response_src_addr;
529 struct in_addr ntp_addr;
540 struct in_addr requested_ip;
2256 struct net_if_addr *net_if_ipv4_addr_lookup(const struct in_addr *addr,
[all …]
Dnet_ip.h155 struct in_addr { struct
193 struct in_addr sin_addr; /**< IPv4 address */
221 struct in_addr *sin_addr; /**< IPv4 address */
438 struct in_addr in_addr; member
811 static inline bool net_ipv4_is_addr_loopback(struct in_addr *addr) in net_ipv4_is_addr_loopback()
823 static inline bool net_ipv4_is_addr_unspecified(const struct in_addr *addr) in net_ipv4_is_addr_unspecified()
835 static inline bool net_ipv4_is_addr_mcast(const struct in_addr *addr) in net_ipv4_is_addr_mcast()
847 static inline bool net_ipv4_is_ll_addr(const struct in_addr *addr) in net_ipv4_is_ll_addr()
861 static inline bool net_ipv4_is_private_addr(const struct in_addr *addr) in net_ipv4_is_private_addr()
900 net_ipaddr_copy((struct in_addr *)dest, (const struct in_addr *)src); in net_ipv4_addr_copy_raw()
[all …]
Dsocket.h953 struct in_addr ipi_spec_dst; /**< Local address */
954 struct in_addr ipi_addr; /**< Header Destination address */
976 struct in_addr imr_multiaddr; /**< IP multicast group address */
977 struct in_addr imr_address; /**< IP address of local interface */
985 struct in_addr imr_multiaddr; /**< IP multicast group address */
986 struct in_addr imr_interface; /**< IP address of local interface */
/Zephyr-latest/subsys/net/ip/
Dipv4.h60 struct in_addr address;
71 struct in_addr address;
82 struct in_addr address;
103 struct in_addr address;
135 const struct in_addr *src,
136 const struct in_addr *dst,
143 const struct in_addr *src, in net_ipv4_create_full()
144 const struct in_addr *dst, in net_ipv4_create_full()
173 const struct in_addr *src,
174 const struct in_addr *dst);
[all …]
Dipv4_acd.c74 struct in_addr *sender_ip, in ipv4_acd_prepare_arp()
75 struct in_addr *target_ip) in ipv4_acd_prepare_arp()
97 struct in_addr unspecified = { 0 }; in ipv4_acd_send_probe()
100 pkt = ipv4_acd_prepare_arp(iface, &unspecified, &ifaddr->address.in_addr); in ipv4_acd_send_probe()
116 pkt = ipv4_acd_prepare_arp(iface, &ifaddr->address.in_addr, in ipv4_acd_send_announcement()
117 &ifaddr->address.in_addr); in ipv4_acd_send_announcement()
160 net_sprint_ipv4_addr(&ifaddr->address.in_addr)); in ipv4_acd_manage_timeout()
188 net_sprint_ipv4_addr(&ifaddr->address.in_addr)); in ipv4_acd_manage_timeout()
200 net_sprint_ipv4_addr(&ifaddr->address.in_addr)); in ipv4_acd_manage_timeout()
297 (uint8_t *)&ifaddr->address.in_addr) || in net_ipv4_acd_input()
[all …]
Digmp.c35 static const struct in_addr all_systems = { { { 224, 0, 0, 1 } } };
37 static const struct in_addr igmp_multicast_addr = { { { 224, 0, 0, 22 } } };
39 static const struct in_addr all_routers = { { { 224, 0, 0, 2 } } };
56 static int igmp_v2_create(struct net_pkt *pkt, const struct in_addr *addr, in igmp_v2_create()
115 net_ipv4_addr_cmp_raw((uint8_t *)&mcast[i].address.in_addr, in igmp_v3_create()
144 net_ipv4_addr_cmp_raw((uint8_t *)&mcast[i].address.in_addr, in igmp_v3_create()
157 net_ipaddr_copy(&group_record->address, &mcast[i].address.in_addr); in igmp_v3_create()
165 if (net_pkt_write(pkt, &mcast[i].sources[j].in_addr.s_addr, in igmp_v3_create()
166 sizeof(mcast[i].sources[j].in_addr.s_addr))) { in igmp_v3_create()
186 static int igmp_v2_create_packet(struct net_pkt *pkt, const struct in_addr *dst, in igmp_v2_create_packet()
[all …]
Dipv4.c30 BUILD_ASSERT(sizeof(struct in_addr) == NET_IPV4_ADDR_SIZE);
36 const struct in_addr *src, in net_ipv4_create_full()
37 const struct in_addr *dst, in net_ipv4_create_full()
90 const struct in_addr *src, in net_ipv4_create()
91 const struct in_addr *dst) in net_ipv4_create()
303 if (net_ipv4_is_addr_loopback((struct in_addr *)hdr->dst) || in net_ipv4_input()
304 net_ipv4_is_addr_loopback((struct in_addr *)hdr->src)) { in net_ipv4_input()
309 if (net_ipv4_is_my_addr((struct in_addr *)hdr->src)) { in net_ipv4_input()
315 if (net_ipv4_is_addr_mcast((struct in_addr *)hdr->src)) { in net_ipv4_input()
320 if (net_ipv4_is_addr_bcast(net_pkt_iface(pkt), (struct in_addr *)hdr->src)) { in net_ipv4_input()
[all …]
Dicmpv4.c30 const struct in_addr *src;
86 const struct in_addr *src) in icmpv4_update_record_route()
89 uint8_t addr_len = sizeof(struct in_addr); in icmpv4_update_record_route()
194 const struct in_addr *src) in icmpv4_update_time_stamp()
197 uint8_t addr_len = sizeof(struct in_addr); in icmpv4_update_time_stamp()
372 const struct in_addr *src) in icmpv4_handle_header_options()
405 const struct in_addr *src) in icmpv4_handle_header_options()
423 const struct in_addr *src; in icmpv4_handle_echo_request()
429 if (net_ipv4_is_addr_unspecified((struct in_addr *)ip_hdr->src)) { in icmpv4_handle_echo_request()
456 if (net_ipv4_is_addr_mcast((struct in_addr *)ip_hdr->dst) || in icmpv4_handle_echo_request()
[all …]
Dipv4_autoconf.c28 struct in_addr netmask = { { { 255, 255, 0, 0 } } }; in ipv4_autoconf_addr_set()
61 struct in_addr *addr; in acd_event_handler()
78 if (cb->info_length != sizeof(struct in_addr)) { in acd_event_handler()
82 addr = (struct in_addr *)cb->info; in acd_event_handler()
Dnet_if.c731 (struct in_addr *)addr))) { in iface_router_lookup()
764 &router->address.in_addr, in iface_router_notify_deletion()
890 sizeof(struct in_addr)); in iface_router_add()
895 &routers[i].address.in_addr, in iface_router_add()
896 sizeof(struct in_addr)); in iface_router_add()
900 net_sprint_ipv4_addr((struct in_addr *)addr), in iface_router_add()
3454 const struct in_addr *addr) in net_if_ipv4_addr_mask_cmp()
3476 if ((ipv4->unicast[i].ipv4.address.in_addr.s_addr & in net_if_ipv4_addr_mask_cmp()
3490 const struct in_addr *addr) in ipv4_is_broadcast_address()
3494 struct in_addr bcast; in ipv4_is_broadcast_address()
[all …]
Dutils.c163 struct in_addr *addr = NULL; in z_impl_net_addr_ntop()
208 addr = (struct in_addr *)src; in z_impl_net_addr_ntop()
241 addr = (struct in_addr *)(&addr6->s6_addr32[3]); in z_impl_net_addr_ntop()
303 struct in_addr addr4; in z_vrfy_net_addr_ntop()
337 struct in_addr *addr = (struct in_addr *)dst; in z_impl_net_addr_pton()
348 (void)memset(addr, 0, sizeof(struct in_addr)); in z_impl_net_addr_pton()
350 for (i = 0; i < sizeof(struct in_addr); i++) { in z_impl_net_addr_pton()
472 struct in_addr addr4; in z_vrfy_net_addr_pton()
478 size = sizeof(struct in_addr); in z_vrfy_net_addr_pton()
648 len = 2 * sizeof(struct in_addr); in net_calc_chksum()
[all …]
/Zephyr-latest/subsys/net/l2/ethernet/
Darp.h47 struct in_addr *request_ip,
48 struct in_addr *current_ip);
53 struct in_addr *dst);
59 struct in_addr ip;
70 void net_arp_update(struct net_if *iface, struct in_addr *src,
Darp.c62 (void)memset(&entry->ip, 0, sizeof(struct in_addr)); in arp_entry_cleanup()
68 struct in_addr *dst, in arp_entry_find()
92 struct in_addr *dst) in arp_entry_find_move_first()
117 struct in_addr *dst) in arp_entry_find_pending()
125 struct in_addr *dst) in arp_entry_get_pending()
227 static inline struct in_addr *if_get_addr(struct net_if *iface, in if_get_addr()
228 struct in_addr *addr) in if_get_addr()
242 &ipv4->unicast[i].ipv4.address.in_addr))) { in if_get_addr()
243 return &ipv4->unicast[i].ipv4.address.in_addr; in if_get_addr()
251 struct in_addr *next_addr, in arp_prepare()
[all …]
/Zephyr-latest/tests/net/dhcpv4/server/src/
Dmain.c24 static struct in_addr server_addr = { { { 192, 0, 2, 1 } } };
25 static struct in_addr netmask = { { { 255, 255, 255, 0 } } };
26 static struct in_addr test_base_addr = { { { 192, 0, 2, 10 } } };
29 static struct in_addr client_addr_static = { { { 192, 0, 2, 2 } } };
39 struct in_addr assigned_ip;
40 struct in_addr declined_ip;
84 zassert_ok(net_ipv4_create(reply, (struct in_addr *)ipv4_hdr->dst, in send_icmp_echo_reply()
85 (struct in_addr *)ipv4_hdr->src), in send_icmp_echo_reply()
111 sizeof(struct in_addr)); in server_send()
146 const struct in_addr *src_addr, const struct in_addr *dst_addr, in client_prepare_test_msg()
[all …]
/Zephyr-latest/tests/net/ip-addr/src/
Dmain.c101 struct in_addr addr = { { { a, b, c, d } } }; \
377 const struct in_addr *out; in ZTEST()
379 struct in_addr lladdr4_1 = { { { 169, 254, 0, 1 } } }; in ZTEST()
380 struct in_addr lladdr4_2 = { { { 169, 254, 0, 3 } } }; in ZTEST()
381 struct in_addr netmask = { { { 255, 255, 0, 0 } } }; in ZTEST()
382 struct in_addr dst4 = { { { 169, 254, 0, 2 } } }; in ZTEST()
417 const struct in_addr *out; in ZTEST()
419 struct in_addr lladdr4_1 = { { { 169, 254, 250, 1 } } }; in ZTEST()
420 struct in_addr lladdr4_2 = { { { 169, 254, 253, 1 } } }; in ZTEST()
421 struct in_addr netmask_1 = { { { 255, 255, 255, 0 } } }; in ZTEST()
[all …]
/Zephyr-latest/tests/net/npf/src/
Dmain.c92 ret = net_ipv4_create(pkt, (struct in_addr *)src, (struct in_addr *)dst); in build_test_ip_pkt()
346 static struct in_addr ipv4_address_list[4] = {
370 struct in_addr dst = { { { 192, 168, 2, 1 } } }; in ZTEST()
371 struct in_addr bad_addr = { { { 192, 168, 2, 3 } } }; in ZTEST()
385 memcpy((struct in_addr *)NET_IPV4_HDR(pkt_v4)->src, &ipv4_address_list[it], in ZTEST()
386 sizeof(struct in_addr)); in ZTEST()
391 memcpy((struct in_addr *)NET_IPV4_HDR(pkt_v4)->src, in ZTEST()
392 &bad_addr, sizeof(struct in_addr)); in ZTEST()
407 memcpy((struct in_addr *)NET_IPV4_HDR(pkt_v4)->src, &ipv4_address_list[it], in ZTEST()
408 sizeof(struct in_addr)); in ZTEST()
[all …]
/Zephyr-latest/tests/net/shell/src/
Dmain.c110 static inline struct in_addr *if_get_addr(struct net_if *iface) in if_get_addr()
121 &iface->config.ip.ipv4->unicast[i].ipv4.address.in_addr; in if_get_addr()
161 const struct in_addr in4addr_any = { { { 0 } } }; in test_setup()
164 struct in_addr in4addr_my = { { { 192, 0, 2, 1 } } }; in test_setup()
167 struct in_addr in4addr_peer = { { { 192, 0, 2, 9 } } }; in test_setup()
/Zephyr-latest/subsys/net/lib/dhcpv4/
Ddhcpv4_server.c67 struct in_addr server_addr;
68 struct in_addr netmask;
178 struct in_addr *server_id) in dhcpv4_find_server_id_option()
189 if (optlen != sizeof(struct in_addr)) { in dhcpv4_find_server_id_option()
193 memcpy(server_id, opt, sizeof(struct in_addr)); in dhcpv4_find_server_id_option()
226 struct in_addr *requested_ip) in dhcpv4_find_requested_ip_option()
237 if (optlen != sizeof(struct in_addr)) { in dhcpv4_find_requested_ip_option()
241 memcpy(requested_ip, opt, sizeof(struct in_addr)); in dhcpv4_find_requested_ip_option()
339 struct in_addr *server_id) in dhcpv4_encode_server_id_option()
346 buf[1] = sizeof(struct in_addr); in dhcpv4_encode_server_id_option()
[all …]
/Zephyr-latest/tests/net/arp/src/
Dmain.c152 static inline struct in_addr *if_get_addr(struct net_if *iface) in if_get_addr()
163 &iface->config.ip.ipv4->unicast[i].ipv4.address.in_addr; in if_get_addr()
205 hdr->protolen = sizeof(struct in_addr); in prepare_arp_reply()
257 hdr->protolen = sizeof(struct in_addr); in prepare_arp_request()
311 struct in_addr *addr = user_data; in arp_cb()
313 if (memcmp(&entry->ip, addr, sizeof(struct in_addr)) == 0 && in arp_cb()
338 struct in_addr dst = { { { 192, 168, 0, 2 } } }; in ZTEST()
339 struct in_addr dst_far = { { { 10, 11, 12, 13 } } }; in ZTEST()
340 struct in_addr dst_far2 = { { { 172, 16, 14, 186 } } }; in ZTEST()
341 struct in_addr src = { { { 192, 168, 0, 1 } } }; in ZTEST()
[all …]
/Zephyr-latest/subsys/net/lib/dns/
Ddns_sd.h140 const struct in_addr *addr4, const struct in6_addr *addr6,
158 const struct in_addr *addr4, const struct in6_addr *addr6,
/Zephyr-latest/subsys/net/lib/shell/
Dipv4.c48 &ipv4->unicast[i].ipv4.address.in_addr), in ip_address_lifetime_cb()
103 struct in_addr addr; in cmd_net_ip_add()
137 struct in_addr netmask; in cmd_net_ip_add()
170 struct in_addr addr; in cmd_net_ip_del()
219 struct in_addr addr; in cmd_net_ip_gateway()
/Zephyr-latest/tests/net/igmp/src/
Dmain.c66 static struct in_addr my_addr = { { { 192, 0, 2, 1 } } };
67 static struct in_addr mcast_addr = { { { 224, 0, 2, 63 } } };
68 static struct in_addr any_addr = INADDR_ANY_INIT;
435 static void socket_group_with_address(struct in_addr *local_addr, bool do_join) in socket_group_with_address()
499 static void socket_group_with_index(struct in_addr *local_addr, bool do_join) in socket_group_with_index()
544 static void socket_join_group_with_address(struct in_addr *addr) in socket_join_group_with_address()
549 static void socket_leave_group_with_address(struct in_addr *addr) in socket_leave_group_with_address()
554 static void socket_join_group_with_index(struct in_addr *addr) in socket_join_group_with_index()
559 static void socket_leave_group_with_index(struct in_addr *addr) in socket_leave_group_with_index()
/Zephyr-latest/subsys/net/l2/virtual/ipip/
Dipip.c48 const struct in_addr *my4addr;
208 &ctx->peer.in_addr); in interface_send()
222 &ctx->peer.in_addr, in interface_send()
277 if (memcmp(&ctx->peer.in_addr, &net_sin(remote_addr)->sin_addr, in verify_remote_addr()
278 sizeof(struct in_addr)) == 0) { in verify_remote_addr()
393 iface_test = net_if_ipv4_select_src_iface((struct in_addr *)hdr->dst); in interface_recv()
495 net_ipaddr_copy(&ctx->peer.in_addr, &config->peer4addr); in interface_set_config()
497 addr_str = net_addr_ntop(AF_INET, &ctx->peer.in_addr, in interface_set_config()
506 &ctx->peer.in_addr)); in interface_set_config()
584 &ctx->peer.in_addr); in interface_get_config()

12345