datapath: Remove netdev_alloc_skb_ip_align() compat code.
[openvswitch] / datapath / linux-2.6 / compat-2.6 / include / linux / in.h
index fd5c3c67369a14d695903dd4729b1a8544818533..f91a832a7f1742f534f13daaf64cf237114f0474 100644 (file)
@@ -5,11 +5,32 @@
 
 #ifndef HAVE_IPV4_IS_MULTICAST
 
+static inline bool ipv4_is_loopback(__be32 addr)
+{
+       return (addr & htonl(0xff000000)) == htonl(0x7f000000);
+}
+
 static inline bool ipv4_is_multicast(__be32 addr)
 {
        return (addr & htonl(0xf0000000)) == htonl(0xe0000000);
 }
 
+static inline bool ipv4_is_local_multicast(__be32 addr)
+{
+       return (addr & htonl(0xffffff00)) == htonl(0xe0000000);
+}
+
+static inline bool ipv4_is_lbcast(__be32 addr)
+{
+       /* limited broadcast */
+       return addr == htonl(INADDR_BROADCAST);
+}
+
+static inline bool ipv4_is_zeronet(__be32 addr)
+{
+       return (addr & htonl(0xff000000)) == htonl(0x00000000);
+}
+
 #endif /* !HAVE_IPV4_IS_MULTICAST */
 
 #endif