Lines Matching defs:code
9 * Based on ipv4/udp.c code.
471 static inline int ping_supported(int family, int type, int code)
473 return (family == AF_INET && type == ICMP_ECHO && code == 0) ||
474 (family == AF_INET6 && type == ICMPV6_ECHO_REQUEST && code == 0);
488 int code;
497 code = icmp_hdr(skb)->code;
502 code = icmp6_hdr(skb)->icmp6_code;
510 if (!ping_supported(family, icmph->type, icmph->code))
513 pr_debug("ping_err(proto=0x%x,type=%d,code=%d,id=%04x,seq=%04x)\n",
514 skb->protocol, type, code, ntohs(icmph->un.echo.id),
545 if (code == ICMP_FRAG_NEEDED) { /* Path MTU discovery */
555 if (code <= NR_ICMP_UNREACH) {
556 harderr = icmp_err_convert[code].fatal;
557 err = icmp_err_convert[code].errno;
568 harderr = pingv6_ops.icmpv6_err_convert(type, code, &err);
658 u8 type, code;
684 code = ((struct icmphdr *) user_icmph)->code;
688 code = ((struct icmp6hdr *) user_icmph)->icmp6_code;
694 if (!ping_supported(family, type, code))
797 fl4.fl4_icmp_code = user_icmph.code;
824 pfh.icmph.code = user_icmph.code; /* ditto */