Lines Matching refs:reply
185 struct net_pkt *reply; in get_ipv4_reply() local
194 reply = net_pkt_alloc_with_buffer(iface, sizeof(struct net_ipv4_hdr) + in get_ipv4_reply()
199 if (!reply) { in get_ipv4_reply()
207 ipv4_hdr = net_pkt_cursor_get_pos(reply); in get_ipv4_reply()
210 net_pkt_set_ipv4_ttl(reply, 1U); in get_ipv4_reply()
212 ret = net_ipv4_create_full(reply, src4, dest4, params->tc_tos, in get_ipv4_reply()
219 icmp_hdr = net_pkt_cursor_get_pos(reply); in get_ipv4_reply()
222 ret = net_icmpv4_create(reply, NET_ICMPV4_ECHO_REPLY, 0); in get_ipv4_reply()
228 ret = net_pkt_write(reply, params->data, params->data_size); in get_ipv4_reply()
234 net_pkt_cursor_init(reply); in get_ipv4_reply()
235 net_ipv4_finalize(reply, IPPROTO_ICMP); in get_ipv4_reply()
237 *reply_pkt = reply; in get_ipv4_reply()
264 struct net_pkt *reply; in get_ipv6_reply() local
268 reply = net_pkt_alloc_with_buffer(iface, sizeof(struct net_ipv6_hdr) + in get_ipv6_reply()
273 if (!reply) { in get_ipv6_reply()
281 ipv6_hdr = net_pkt_cursor_get_pos(reply); in get_ipv6_reply()
284 ret = net_ipv6_create(reply, src6, dest6); in get_ipv6_reply()
290 icmp_hdr = net_pkt_cursor_get_pos(reply); in get_ipv6_reply()
293 ret = net_icmpv6_create(reply, NET_ICMPV6_ECHO_REPLY, 0); in get_ipv6_reply()
299 ret = net_pkt_write(reply, params->data, params->data_size); in get_ipv6_reply()
305 net_pkt_cursor_init(reply); in get_ipv6_reply()
306 net_ipv6_finalize(reply, IPPROTO_ICMP); in get_ipv6_reply()
308 *reply_pkt = reply; in get_ipv6_reply()
332 struct net_pkt *reply = NULL; in offload_ping_handler() local
353 ret = get_ipv4_reply(iface, dst, params, &reply, in offload_ping_handler()
365 ret = get_ipv6_reply(iface, dst, params, &reply, in offload_ping_handler()
376 ret = resp_handler(ctx, reply, &ip_hdr, icmp_hdr, user_data); in offload_ping_handler()