Lines Matching refs:type
274 static bool icmpv4_mask_allow(struct net *net, int type, int code) in icmpv4_mask_allow() argument
276 if (type > NR_ICMP_TYPES) in icmpv4_mask_allow()
280 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) in icmpv4_mask_allow()
284 if (!((1 << type) & READ_ONCE(net->ipv4.sysctl_icmp_ratemask))) in icmpv4_mask_allow()
290 static bool icmpv4_global_allow(struct net *net, int type, int code, in icmpv4_global_allow() argument
293 if (icmpv4_mask_allow(net, type, code)) in icmpv4_global_allow()
309 struct flowi4 *fl4, int type, int code, in icmpv4_xrlim_allow() argument
342 void icmp_out_count(struct net *net, unsigned char type) in icmp_out_count() argument
344 ICMPMSGOUT_INC_STATS(net, type); in icmp_out_count()
363 if (icmp_pointers[icmp_param->data.icmph.type].error) in icmp_glue_bits()
412 int type = icmp_param->data.icmph.type; in icmp_reply() local
422 if (!icmpv4_global_allow(net, type, code, &apply_ratelimit)) in icmp_reply()
454 if (icmpv4_xrlim_allow(net, rt, &fl4, type, code, apply_ratelimit)) in icmp_reply()
483 dscp_t dscp, u32 mark, int type, in icmp_route_lookup() argument
500 fl4->fl4_icmp_type = type; in icmp_route_lookup()
594 void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info, in __icmp_send() argument
656 if (icmp_pointers[type].error) { in __icmp_send()
668 type) - in __icmp_send()
693 !icmpv4_global_allow(net, type, code, &apply_ratelimit)) in __icmp_send()
721 tos = icmp_pointers[type].error ? (RT_TOS(iph->tos) | in __icmp_send()
734 icmp_param.data.icmph.type = type; in __icmp_send()
747 inet_dsfield_to_dscp(tos), mark, type, code, in __icmp_send()
753 if (!icmpv4_xrlim_allow(net, rt, &fl4, type, code, apply_ratelimit)) in __icmp_send()
781 trace_icmp_send(skb_in, type, code); in __icmp_send()
797 void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info) in icmp_ndo_send() argument
807 __icmp_send(skb_in, type, code, info, &opts); in icmp_ndo_send()
822 __icmp_send(skb_in, type, code, info, &opts); in icmp_ndo_send()
893 switch (icmph->type) { in icmp_unreach()
963 icmph->type, icmph->code, in icmp_unreach()
1028 if (icmp_param.data.icmph.type == ICMP_ECHO) in icmp_echo()
1029 icmp_param.data.icmph.type = ICMP_ECHOREPLY; in icmp_echo()
1066 if (icmphdr->type == ICMP_EXT_ECHO) in icmp_build_probe()
1067 icmphdr->type = ICMP_EXT_ECHOREPLY; in icmp_build_probe()
1069 icmphdr->type = ICMPV6_EXT_ECHO_REPLY; in icmp_build_probe()
1177 icmp_param.data.icmph.type = ICMP_TIMESTAMPREPLY; in icmp_timestamp()
1242 ICMPMSGIN_INC_STATS(net, icmph->type); in icmp_rcv()
1245 if (icmph->type == ICMP_EXT_ECHO) { in icmp_rcv()
1264 if ((icmph->type == ICMP_ECHO || in icmp_rcv()
1265 icmph->type == ICMP_TIMESTAMP) && in icmp_rcv()
1270 if (icmph->type != ICMP_ECHO && in icmp_rcv()
1271 icmph->type != ICMP_TIMESTAMP && in icmp_rcv()
1272 icmph->type != ICMP_ADDRESS && in icmp_rcv()
1273 icmph->type != ICMP_ADDRESSREPLY) { in icmp_rcv()
1279 if (icmph->type == ICMP_EXT_ECHOREPLY || in icmp_rcv()
1280 icmph->type == ICMP_ECHOREPLY) { in icmp_rcv()
1291 if (icmph->type > NR_ICMP_TYPES) { in icmp_rcv()
1296 reason = icmp_pointers[icmph->type].handler(skb); in icmp_rcv()
1379 int type = icmp_hdr(skb)->type; in icmp_err() local
1386 if (icmph->type != ICMP_ECHOREPLY) { in icmp_err()
1391 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) in icmp_err()
1393 else if (type == ICMP_REDIRECT) in icmp_err()