~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to datapath/linux/compat/include/linux/in.h

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include_next <linux/in.h>
5
5
 
 
6
#include <linux/module.h>
 
7
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
 
8
static inline int proto_ports_offset(int proto)
 
9
{
 
10
        switch (proto) {
 
11
        case IPPROTO_TCP:
 
12
        case IPPROTO_UDP:
 
13
        case IPPROTO_DCCP:
 
14
        case IPPROTO_ESP:       /* SPI */
 
15
        case IPPROTO_SCTP:
 
16
        case IPPROTO_UDPLITE:
 
17
                return 0;
 
18
        case IPPROTO_AH:        /* SPI */
 
19
                return 4;
 
20
        default:
 
21
                return -EINVAL;
 
22
        }
 
23
}
 
24
#endif
 
25
 
6
26
#ifndef HAVE_IPV4_IS_MULTICAST
7
27
 
8
28
static inline bool ipv4_is_loopback(__be32 addr)