: Glue function to support sockopt code
PATCH 5/9 : Glue function to support sockopt code
[DCCP]: Glue function to support sockopt code
This adds a glue function so that change requests can still be made via setsockopt calls. This is useful for testing and maybe even from an API point of view.
The test whether the socket is not already connected is made deeper in the function call hierarchy - when dccp_feat_register_change is called. This is on purpose, since it enables to write further functions on top of the latter function without having to test for this condition in each calling function.
Signed-off-by Gerrit Renker <[email protected]>
--- net/dccp/feat.c | 67 +++++++++++++++++++------------------------------------ net/dccp/feat.h | 4 +-- net/dccp/proto.c | 45 +++++++++++------------------------- 3 files changed, 40 insertions(+), 76 deletions(-)
net/dccp/feat.h +2 -2
@@ -101,8 +101,8 @@ static inline void dccp_feat_debug(const#define dccp_feat_debug (type, feat, val)#endif /* CONFIG_IP_DCCP_DEBUG */ -extern int dccp_feat_change (struct dccp_minisock *dmsk,u8 type,u8 feature, -u8 *val,u8 len,gfp_t gfp); +extern int dccp_feat_register_change (struct sock *sk,u8 feat, +u8 is_local,u8 *val,u8 len);extern int dccp_feat_change_recv (struct sock *sk,u8 type,u8 feature,u8 *val,u8 len); extern int dccp_feat_confirm_recv(struct sock *sk, u8 type, u8 feature,
net/dccp/proto.c +14 -31
70 lines not on this page · raw message
net/dccp/feat.c +24 -43
78 lines not on this page · raw message