diff options
Diffstat (limited to 'net/dccp/feat.h')
-rw-r--r-- | net/dccp/feat.h | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/net/dccp/feat.h b/net/dccp/feat.h index 177f7dee4d10..e272222c7ace 100644 --- a/net/dccp/feat.h +++ b/net/dccp/feat.h | |||
@@ -14,32 +14,6 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include "dccp.h" | 15 | #include "dccp.h" |
16 | 16 | ||
17 | static inline int dccp_feat_is_valid_length(u8 type, u8 feature, u8 len) | ||
18 | { | ||
19 | /* sec. 6.1: Confirm has at least length 3, | ||
20 | * sec. 6.2: Change has at least length 4 */ | ||
21 | if (len < 3) | ||
22 | return 1; | ||
23 | if (len < 4 && (type == DCCPO_CHANGE_L || type == DCCPO_CHANGE_R)) | ||
24 | return 1; | ||
25 | /* XXX: add per-feature length validation (sec. 6.6.8) */ | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | static inline int dccp_feat_is_reserved(const u8 feat) | ||
30 | { | ||
31 | return (feat > DCCPF_DATA_CHECKSUM && | ||
32 | feat < DCCPF_MIN_CCID_SPECIFIC) || | ||
33 | feat == DCCPF_RESERVED; | ||
34 | } | ||
35 | |||
36 | /* feature negotiation knows only these four option types (RFC 4340, sec. 6) */ | ||
37 | static inline int dccp_feat_is_valid_type(const u8 optnum) | ||
38 | { | ||
39 | return optnum >= DCCPO_CHANGE_L && optnum <= DCCPO_CONFIRM_R; | ||
40 | |||
41 | } | ||
42 | |||
43 | #ifdef CONFIG_IP_DCCP_DEBUG | 17 | #ifdef CONFIG_IP_DCCP_DEBUG |
44 | extern const char *dccp_feat_typename(const u8 type); | 18 | extern const char *dccp_feat_typename(const u8 type); |
45 | extern const char *dccp_feat_name(const u8 feat); | 19 | extern const char *dccp_feat_name(const u8 feat); |