From 8b819412481494fb6861c08d360b75fabcbbfbbf Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Thu, 13 Dec 2007 12:29:24 -0200 Subject: [DCCP]: Allow to parse options on Request Sockets The option parsing code currently only parses on full sk's. This causes a problem for options sent during the initial handshake (in particular timestamps and feature-negotiation options). Therefore, this patch extends the option parsing code with an additional argument for request_socks: if it is non-NULL, options are parsed on the request socket, otherwise the normal path (parsing on the sk) is used. Subsequent patches, which implement feature negotiation during connection setup, make use of this facility. Signed-off-by: Gerrit Renker Signed-off-by: Ian McDonald Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- include/linux/dccp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/linux/dccp.h') diff --git a/include/linux/dccp.h b/include/linux/dccp.h index c676021603f5..7214031461d3 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -407,8 +407,6 @@ struct dccp_opt_pend { extern void dccp_minisock_init(struct dccp_minisock *dmsk); -extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb); - struct dccp_request_sock { struct inet_request_sock dreq_inet_rsk; __u64 dreq_iss; @@ -423,6 +421,9 @@ static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req) extern struct inet_timewait_death_row dccp_death_row; +extern int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, + struct sk_buff *skb); + struct dccp_options_received { u32 dccpor_ndp; /* only 24 bits */ u32 dccpor_timestamp; -- cgit v1.2.2