diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2009-01-16 23:36:32 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 14:34:05 -0800 |
commit | 883ca833e5fb814fb03426c9d35e5489ce43e8da (patch) | |
tree | dcf361291b79e57195f8d89ca493c15c835b14cf /net/dccp/dccp.h | |
parent | 792b48780e8b6435d017cef4b5c304876a48653e (diff) | |
download | kernel_samsung_crespo-883ca833e5fb814fb03426c9d35e5489ce43e8da.zip kernel_samsung_crespo-883ca833e5fb814fb03426c9d35e5489ce43e8da.tar.gz kernel_samsung_crespo-883ca833e5fb814fb03426c9d35e5489ce43e8da.tar.bz2 |
dccp: Initialisation and type-checking of feature sysctls
This patch takes care of initialising and type-checking sysctls
related to feature negotiation. Type checking is important since some
of the sysctls now directly impact the feature-negotiation process.
The sysctls are initialised with the known default values for each
feature. For the type-checking the value constraints from RFC 4340
are used:
* Sequence Window uses the specified Wmin=32, the maximum is ulong (4 bytes),
tested and confirmed that it works up to 4294967295 - for Gbps speed;
* Ack Ratio is between 0 .. 0xffff (2-byte unsigned integer);
* CCIDs are between 0 .. 255;
* request_retries, retries1, retries2 also between 0..255 for good measure;
* tx_qlen is checked to be non-negative;
* sync_ratelimit remains as before.
Notes:
------
1. Die s@sysctl_dccp_feat@sysctl_dccp@g since the sysctls are now in feat.c.
2. As pointed out by Arnaldo, the pattern of type-checking repeats itself in
other places, sometimes with exactly the same kind of definitions (e.g.
"static int zero;"). It may be a good idea (kernel janitors?) to consolidate
type checking. For the sake of keeping the changeset small and in order not
to affect other subsystems, I have not strived to generalise here.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r-- | net/dccp/dccp.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 04ae918..44a5bc6 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -95,9 +95,6 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo); extern int sysctl_dccp_request_retries; extern int sysctl_dccp_retries1; extern int sysctl_dccp_retries2; -extern int sysctl_dccp_feat_sequence_window; -extern int sysctl_dccp_feat_rx_ccid; -extern int sysctl_dccp_feat_tx_ccid; extern int sysctl_dccp_tx_qlen; extern int sysctl_dccp_sync_ratelimit; |