Lines Matching refs:icmph
106 struct icmphdr icmph; member
355 if (icmp_pointers[icmp_param->data.icmph.type].error) in icmp_glue_bits()
374 struct icmphdr *icmph = icmp_hdr(skb); in icmp_push_reply() local
379 (char *)icmph, in icmp_push_reply()
384 icmph->checksum = csum_fold(csum); in icmp_push_reply()
404 int type = icmp_param->data.icmph.type; in icmp_reply()
405 int code = icmp_param->data.icmph.code; in icmp_reply()
422 icmp_param->data.icmph.checksum = 0; in icmp_reply()
721 icmp_param.data.icmph.type = type; in __icmp_send()
722 icmp_param.data.icmph.code = code; in __icmp_send()
723 icmp_param.data.icmph.un.gateway = info; in __icmp_send()
724 icmp_param.data.icmph.checksum = 0; in __icmp_send()
848 struct icmphdr *icmph; in icmp_unreach() local
863 icmph = icmp_hdr(skb); in icmp_unreach()
871 switch (icmph->type) { in icmp_unreach()
873 switch (icmph->code & 15) { in icmp_unreach()
896 info = ntohs(icmph->un.frag.mtu); in icmp_unreach()
906 if (icmph->code > NR_ICMP_UNREACH) in icmp_unreach()
910 info = ntohl(icmph->un.gateway) >> 24; in icmp_unreach()
914 if (icmph->code == ICMP_EXC_FRAGTIME) in icmp_unreach()
941 icmph->type, icmph->code, in icmp_unreach()
1000 icmp_param.data.icmph = *icmp_hdr(skb); in icmp_echo()
1006 if (icmp_param.data.icmph.type == ICMP_ECHO) in icmp_echo()
1007 icmp_param.data.icmph.type = ICMP_ECHOREPLY; in icmp_echo()
1008 else if (!icmp_build_probe(skb, &icmp_param.data.icmph)) in icmp_echo()
1147 icmp_param.data.icmph = *icmp_hdr(skb); in icmp_timestamp()
1148 icmp_param.data.icmph.type = ICMP_TIMESTAMPREPLY; in icmp_timestamp()
1149 icmp_param.data.icmph.code = 0; in icmp_timestamp()
1176 struct icmphdr *icmph; in icmp_rcv() local
1188 if (!pskb_may_pull(skb, sizeof(*icmph) + sizeof(struct iphdr))) in icmp_rcv()
1192 skb_set_network_header(skb, sizeof(*icmph)); in icmp_rcv()
1208 if (!pskb_pull(skb, sizeof(*icmph))) in icmp_rcv()
1211 icmph = icmp_hdr(skb); in icmp_rcv()
1213 ICMPMSGIN_INC_STATS(net, icmph->type); in icmp_rcv()
1216 if (icmph->type == ICMP_EXT_ECHO) { in icmp_rcv()
1224 if (icmph->type == ICMP_EXT_ECHOREPLY) { in icmp_rcv()
1235 if (icmph->type > NR_ICMP_TYPES) { in icmp_rcv()
1251 if ((icmph->type == ICMP_ECHO || in icmp_rcv()
1252 icmph->type == ICMP_TIMESTAMP) && in icmp_rcv()
1257 if (icmph->type != ICMP_ECHO && in icmp_rcv()
1258 icmph->type != ICMP_TIMESTAMP && in icmp_rcv()
1259 icmph->type != ICMP_ADDRESS && in icmp_rcv()
1260 icmph->type != ICMP_ADDRESSREPLY) { in icmp_rcv()
1266 reason = icmp_pointers[icmph->type].handler(skb); in icmp_rcv()
1347 struct icmphdr *icmph = (struct icmphdr *)(skb->data + offset); in icmp_err() local
1356 if (icmph->type != ICMP_ECHOREPLY) { in icmp_err()