diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:30:19 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-09-04 01:45:27 -0400 |
commit | 86349c8d9c6892b57aff4549256ab1aa65aed0f0 (patch) | |
tree | 7fdd7a5d44b7999c8426012c83705cd3fec92cf7 /net/dccp/feat.h | |
parent | 5591d286281fdfb57914f5fad3ca001d44ce8fc6 (diff) |
dccp: Registration routines for changing feature values
Two registration routines, for SP and NN features, are provided by this patch,
replacing a previous routine which was used for both feature types.
These are internal-only routines and therefore start with `__feat_register'.
It further exports the known limits of Sequence Window and Ack Ratio as symbolic
constants.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Diffstat (limited to 'net/dccp/feat.h')
-rw-r--r-- | net/dccp/feat.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/net/dccp/feat.h b/net/dccp/feat.h index 7e953fd0a79b..9eefdb43783e 100644 --- a/net/dccp/feat.h +++ b/net/dccp/feat.h | |||
@@ -14,6 +14,15 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include "dccp.h" | 15 | #include "dccp.h" |
16 | 16 | ||
17 | /* | ||
18 | * Known limit values | ||
19 | */ | ||
20 | /* Ack Ratio takes 2-byte integer values (11.3) */ | ||
21 | #define DCCPF_ACK_RATIO_MAX 0xFFFF | ||
22 | /* Wmin=32 and Wmax=2^46-1 from 7.5.2 */ | ||
23 | #define DCCPF_SEQ_WMIN 32 | ||
24 | #define DCCPF_SEQ_WMAX 0x3FFFFFFFFFFFull | ||
25 | |||
17 | enum dccp_feat_type { | 26 | enum dccp_feat_type { |
18 | FEAT_AT_RX = 1, /* located at RX side of half-connection */ | 27 | FEAT_AT_RX = 1, /* located at RX side of half-connection */ |
19 | FEAT_AT_TX = 2, /* located at TX side of half-connection */ | 28 | FEAT_AT_TX = 2, /* located at TX side of half-connection */ |
@@ -74,6 +83,20 @@ static inline u8 dccp_feat_genopt(struct dccp_feat_entry *entry) | |||
74 | return entry->is_local ? DCCPO_CHANGE_L : DCCPO_CHANGE_R; | 83 | return entry->is_local ? DCCPO_CHANGE_L : DCCPO_CHANGE_R; |
75 | } | 84 | } |
76 | 85 | ||
86 | /** | ||
87 | * struct ccid_dependency - Track changes resulting from choosing a CCID | ||
88 | * @dependent_feat: one of %dccp_feature_numbers | ||
89 | * @is_local: local (1) or remote (0) @dependent_feat | ||
90 | * @is_mandatory: whether presence of @dependent_feat is mission-critical or not | ||
91 | * @val: corresponding default value for @dependent_feat (u8 is sufficient here) | ||
92 | */ | ||
93 | struct ccid_dependency { | ||
94 | u8 dependent_feat; | ||
95 | bool is_local:1, | ||
96 | is_mandatory:1; | ||
97 | u8 val; | ||
98 | }; | ||
99 | |||
77 | #ifdef CONFIG_IP_DCCP_DEBUG | 100 | #ifdef CONFIG_IP_DCCP_DEBUG |
78 | extern const char *dccp_feat_typename(const u8 type); | 101 | extern const char *dccp_feat_typename(const u8 type); |
79 | extern const char *dccp_feat_name(const u8 feat); | 102 | extern const char *dccp_feat_name(const u8 feat); |
@@ -96,6 +119,6 @@ extern int dccp_feat_confirm_recv(struct sock *sk, u8 type, u8 feature, | |||
96 | extern void dccp_feat_clean(struct dccp_minisock *dmsk); | 119 | extern void dccp_feat_clean(struct dccp_minisock *dmsk); |
97 | extern int dccp_feat_clone(struct sock *oldsk, struct sock *newsk); | 120 | extern int dccp_feat_clone(struct sock *oldsk, struct sock *newsk); |
98 | extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); | 121 | extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); |
99 | extern int dccp_feat_init(struct dccp_minisock *dmsk); | 122 | extern int dccp_feat_init(struct sock *sk); |
100 | 123 | ||
101 | #endif /* _DCCP_FEAT_H */ | 124 | #endif /* _DCCP_FEAT_H */ |