Lines Matching refs:icmp_hdr
37 struct net_icmp_hdr *icmp_hdr; in icmpv4_create() local
39 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data(pkt, &icmpv4_access); in icmpv4_create()
40 if (!icmp_hdr) { in icmpv4_create()
44 icmp_hdr->type = icmp_type; in icmpv4_create()
45 icmp_hdr->code = icmp_code; in icmpv4_create()
46 icmp_hdr->chksum = 0U; in icmpv4_create()
55 struct net_icmp_hdr *icmp_hdr; in net_icmpv4_finalize() local
63 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data(pkt, &icmpv4_access); in net_icmpv4_finalize()
64 if (!icmp_hdr) { in net_icmpv4_finalize()
68 icmp_hdr->chksum = net_calc_chksum_icmpv4(pkt); in net_icmpv4_finalize()
412 struct net_icmp_hdr *icmp_hdr) in icmpv4_handle_echo_request() argument
591 struct net_icmp_hdr *icmp_hdr; in net_icmpv4_send_error() local
593 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data( in net_icmpv4_send_error()
595 if (!icmp_hdr || icmp_hdr->code < 8) { in net_icmpv4_send_error()
679 struct net_icmp_hdr *icmp_hdr; in net_icmpv4_input() local
682 icmp_hdr = (struct net_icmp_hdr *)net_pkt_get_data(pkt, &icmp_access); in net_icmpv4_input()
683 if (!icmp_hdr) { in net_icmpv4_input()
695 icmp_hdr->type != NET_ICMPV4_ECHO_REQUEST)) { in net_icmpv4_input()
703 icmp_hdr->type, icmp_hdr->code); in net_icmpv4_input()
708 if (cb->type == icmp_hdr->type && in net_icmpv4_input()
709 (cb->code == icmp_hdr->code || cb->code == 0U)) { in net_icmpv4_input()
710 return cb->handler(pkt, ip_hdr, icmp_hdr); in net_icmpv4_input()