diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/dccp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index ee97950d77d1..f4a5ea116e34 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -334,6 +334,7 @@ struct dccp_skb_cb { | |||
334 | 334 | ||
335 | #define DCCP_SKB_CB(__skb) ((struct dccp_skb_cb *)&((__skb)->cb[0])) | 335 | #define DCCP_SKB_CB(__skb) ((struct dccp_skb_cb *)&((__skb)->cb[0])) |
336 | 336 | ||
337 | /* RFC 4340, sec. 7.7 */ | ||
337 | static inline int dccp_non_data_packet(const struct sk_buff *skb) | 338 | static inline int dccp_non_data_packet(const struct sk_buff *skb) |
338 | { | 339 | { |
339 | const __u8 type = DCCP_SKB_CB(skb)->dccpd_type; | 340 | const __u8 type = DCCP_SKB_CB(skb)->dccpd_type; |
@@ -346,6 +347,17 @@ static inline int dccp_non_data_packet(const struct sk_buff *skb) | |||
346 | type == DCCP_PKT_SYNCACK; | 347 | type == DCCP_PKT_SYNCACK; |
347 | } | 348 | } |
348 | 349 | ||
350 | /* RFC 4340, sec. 7.7 */ | ||
351 | static inline int dccp_data_packet(const struct sk_buff *skb) | ||
352 | { | ||
353 | const __u8 type = DCCP_SKB_CB(skb)->dccpd_type; | ||
354 | |||
355 | return type == DCCP_PKT_DATA || | ||
356 | type == DCCP_PKT_DATAACK || | ||
357 | type == DCCP_PKT_REQUEST || | ||
358 | type == DCCP_PKT_RESPONSE; | ||
359 | } | ||
360 | |||
349 | static inline int dccp_packet_without_ack(const struct sk_buff *skb) | 361 | static inline int dccp_packet_without_ack(const struct sk_buff *skb) |
350 | { | 362 | { |
351 | const __u8 type = DCCP_SKB_CB(skb)->dccpd_type; | 363 | const __u8 type = DCCP_SKB_CB(skb)->dccpd_type; |