]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/icmp.h
Merge tag 'f2fs-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
[linux.git] / include / linux / icmp.h
index 2d8aaf7d4b9e2da9f883d18bda399f956723ce0f..81ca84ce3119247400601059921899511e3ff9f1 100644 (file)
@@ -20,4 +20,19 @@ static inline struct icmphdr *icmp_hdr(const struct sk_buff *skb)
 {
        return (struct icmphdr *)skb_transport_header(skb);
 }
+
+static inline bool icmp_is_err(int type)
+{
+       switch (type) {
+       case ICMP_DEST_UNREACH:
+       case ICMP_SOURCE_QUENCH:
+       case ICMP_REDIRECT:
+       case ICMP_TIME_EXCEEDED:
+       case ICMP_PARAMETERPROB:
+               return true;
+       }
+
+       return false;
+}
+
 #endif /* _LINUX_ICMP_H */