]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/dccp.h
[PATCH] Make most file operations structs in fs/ const
[linux-2.6-omap-h63xx.git] / include / linux / dccp.h
index 496dbad8e89655205d6aa9e21bfee827362e5fb0..676333b9fad02a8cc30360685c5659ed9322eb9d 100644 (file)
@@ -320,38 +320,32 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
 /* initial values for each feature */
 #define DCCPF_INITIAL_SEQUENCE_WINDOW          100
 #define DCCPF_INITIAL_ACK_RATIO                        2
-
-#if defined(CONFIG_IP_DCCP_CCID2) || defined(CONFIG_IP_DCCP_CCID2_MODULE)
 #define DCCPF_INITIAL_CCID                     2
 #define DCCPF_INITIAL_SEND_ACK_VECTOR          1
-#elif defined(CONFIG_IP_DCCP_CCID3) || defined(CONFIG_IP_DCCP_CCID3_MODULE)
-#define DCCPF_INITIAL_CCID                     3
-#define DCCPF_INITIAL_SEND_ACK_VECTOR          0
-#else
-#error  "At least one CCID must be built as the default"
-#endif
-
 /* FIXME: for now we're default to 1 but it should really be 0 */
 #define DCCPF_INITIAL_SEND_NDP_COUNT           1
 
 #define DCCP_NDP_LIMIT 0xFFFFFF
 
 /**
-  * struct dccp_options - option values for a DCCP connection
-  *    @dccpo_sequence_window - Sequence Window Feature (section 7.5.2)
-  *    @dccpo_ccid - Congestion Control Id (CCID) (section 10)
-  *    @dccpo_send_ack_vector - Send Ack Vector Feature (section 11.5)
-  *    @dccpo_send_ndp_count - Send NDP Count Feature (7.7.2)
+  * struct dccp_minisock - Minimal DCCP connection representation
+  *
+  * Will be used to pass the state from dccp_request_sock to dccp_sock.
+  *
+  * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2)
+  * @dccpms_ccid - Congestion Control Id (CCID) (section 10)
+  * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
+  * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
   */
-struct dccp_options {
-       __u64   dccpo_sequence_window;
-       __u8    dccpo_rx_ccid;
-       __u8    dccpo_tx_ccid;
-       __u8    dccpo_send_ack_vector;
-       __u8    dccpo_send_ndp_count;
-       __u8                    dccpo_ack_ratio;
-       struct list_head        dccpo_pending;
-       struct list_head        dccpo_conf;
+struct dccp_minisock {
+       __u64                   dccpms_sequence_window;
+       __u8                    dccpms_rx_ccid;
+       __u8                    dccpms_tx_ccid;
+       __u8                    dccpms_send_ack_vector;
+       __u8                    dccpms_send_ndp_count;
+       __u8                    dccpms_ack_ratio;
+       struct list_head        dccpms_pending;
+       struct list_head        dccpms_conf;
 };
 
 struct dccp_opt_conf {
@@ -369,8 +363,9 @@ struct dccp_opt_pend {
        struct dccp_opt_conf    *dccpop_sc;
 };
 
-extern void __dccp_options_init(struct dccp_options *dccpo);
-extern void dccp_options_init(struct dccp_options *dccpo);
+extern void __dccp_minisock_init(struct dccp_minisock *dmsk);
+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 {
@@ -466,7 +461,7 @@ struct dccp_sock {
        __u16                           dccps_r_ack_ratio;
        unsigned long                   dccps_ndp_count;
        __u32                           dccps_mss_cache;
-       struct dccp_options             dccps_options;
+       struct dccp_minisock            dccps_minisock;
        struct dccp_ackvec              *dccps_hc_rx_ackvec;
        struct ccid                     *dccps_hc_rx_ccid;
        struct ccid                     *dccps_hc_tx_ccid;
@@ -482,6 +477,11 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk)
        return (struct dccp_sock *)sk;
 }
 
+static inline struct dccp_minisock *dccp_msk(const struct sock *sk)
+{
+       return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock;
+}
+
 static inline int dccp_service_not_initialized(const struct sock *sk)
 {
        return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE;