diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-11-12 03:47:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-12 03:47:26 -0500 |
commit | d90ebcbfa7f5a8b4e20518c9f94c5c4e4cd3c2e5 (patch) | |
tree | b1fb407c7ee1adbe8215311675d133a83a2d55b5 /net/dccp/ccid.h | |
parent | e8ef967a54f401ac5e8637b7f7f8bddb006144c4 (diff) |
dccp: Query supported CCIDs
This provides a data structure to record which CCIDs are locally supported
and three accessor functions:
- a test function for internal use which is used to validate CCID requests
made by the user;
- a copy function so that the list can be used for feature-negotiation;
- documented getsockopt() support so that the user can query capabilities.
The data structure is a table which is filled in at compile-time with the
list of available CCIDs (which in turn depends on the Kconfig choices).
Using the copy function for cloning the list of supported CCIDs is useful for
feature negotiation, since the negotiation is now with the full list of available
CCIDs (e.g. {2, 3}) instead of the default value {2}. This means negotiation
will not fail if the peer requests to use CCID3 instead of CCID2.
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/ccid.h')
-rw-r--r-- | net/dccp/ccid.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index fdeae7b57319..259f5469d7d0 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h | |||
@@ -103,6 +103,11 @@ static inline void *ccid_priv(const struct ccid *ccid) | |||
103 | return (void *)ccid->ccid_priv; | 103 | return (void *)ccid->ccid_priv; |
104 | } | 104 | } |
105 | 105 | ||
106 | extern bool ccid_support_check(u8 const *ccid_array, u8 array_len); | ||
107 | extern int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len); | ||
108 | extern int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, | ||
109 | char __user *, int __user *); | ||
110 | |||
106 | extern struct ccid *ccid_new(unsigned char id, struct sock *sk, int rx, | 111 | extern struct ccid *ccid_new(unsigned char id, struct sock *sk, int rx, |
107 | gfp_t gfp); | 112 | gfp_t gfp); |
108 | 113 | ||