diff options
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r-- | include/linux/udp.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h index 8ec703f462da..4144664d69d9 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -70,8 +70,10 @@ struct udp_sock { | |||
70 | #define UDPLITE_BIT 0x1 /* set by udplite proto init function */ | 70 | #define UDPLITE_BIT 0x1 /* set by udplite proto init function */ |
71 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ | 71 | #define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */ |
72 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ | 72 | #define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */ |
73 | #ifdef CONFIG_IP_UDPLITE | ||
73 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ | 74 | __u8 pcflag; /* marks socket as UDP-Lite if > 0 */ |
74 | __u8 unused[3]; | 75 | __u8 unused[3]; |
76 | #endif | ||
75 | /* | 77 | /* |
76 | * For encapsulation sockets. | 78 | * For encapsulation sockets. |
77 | */ | 79 | */ |
@@ -82,7 +84,16 @@ static inline struct udp_sock *udp_sk(const struct sock *sk) | |||
82 | { | 84 | { |
83 | return (struct udp_sock *)sk; | 85 | return (struct udp_sock *)sk; |
84 | } | 86 | } |
87 | |||
88 | #ifdef CONFIG_IP_UDPLITE | ||
85 | #define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) | 89 | #define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) |
90 | #define IS_PROTO_UDPLITE(__proto) ((__proto) == IPPROTO_UDPLITE) | ||
91 | #define IS_SOL_UDPFAMILY(level) ((level) == SOL_UDP || (level) == SOL_UDPLITE) | ||
92 | #else | ||
93 | #define IS_UDPLITE(__sk) 0 | ||
94 | #define IS_PROTO_UDPLITE(__proto) 0 | ||
95 | #define IS_SOL_UDPFAMILY(level) ((level) == SOL_UDP) | ||
96 | #endif | ||
86 | 97 | ||
87 | #endif | 98 | #endif |
88 | 99 | ||