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_INET && type == ICMP_EXT_ECHO && code == 0) ||
475 (family == AF_INET6 && type == ICMPV6_ECHO_REQUEST && code == 0) ||
476 (family == AF_INET6 && type == ICMPV6_EXT_ECHO_REQUEST && code == 0);
490 int code;
499 code = icmp_hdr(skb)->code;
504 code = icmp6_hdr(skb)->icmp6_code;
512 if (!ping_supported(family, icmph->type, icmph->code))
515 pr_debug("ping_err(proto=0x%x,type=%d,code=%d,id=%04x,seq=%04x)\n",
516 skb->protocol, type, code, ntohs(icmph->un.echo.id),
547 if (code == ICMP_FRAG_NEEDED) { /* Path MTU discovery */
557 if (code <= NR_ICMP_UNREACH) {
558 harderr = icmp_err_convert[code].fatal;
559 err = icmp_err_convert[code].errno;
570 harderr = pingv6_ops.icmpv6_err_convert(type, code, &err);
648 u8 type, code;
674 code = ((struct icmphdr *) user_icmph)->code;
678 code = ((struct icmp6hdr *) user_icmph)->icmp6_code;
684 if (!ping_supported(family, type, code))
782 fl4.fl4_icmp_code = user_icmph.code;
809 pfh.icmph.code = user_icmph.code; /* ditto */