]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
dccp: Kill dead code and add static markers.
authorstephen hemminger <shemminger@vyatta.com>
Tue, 5 Oct 2010 04:24:09 +0000 (04:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Oct 2010 06:12:07 +0000 (23:12 -0700)
Remove dead code and make some functions static.
Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/dccp.h
net/dccp/feat.c
net/dccp/feat.h
net/dccp/options.c
net/dccp/proto.c

index 3ccef1b70feef57556f6b5a71c6ed84bc1a12f02..019d6ffee3544d341cce53d3986379b1d00764bd 100644 (file)
@@ -246,7 +246,6 @@ static inline void dccp_clear_xmit_timers(struct sock *sk)
 extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu);
 
 extern const char *dccp_packet_name(const int type);
-extern const char *dccp_state_name(const int state);
 
 extern void dccp_set_state(struct sock *sk, const int state);
 extern void dccp_done(struct sock *sk);
@@ -449,7 +448,6 @@ extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*);
 extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
 extern u32 dccp_timestamp(void);
 extern void dccp_timestamping_init(void);
-extern int dccp_insert_option_timestamp(struct sk_buff *skb);
 extern int dccp_insert_option(struct sk_buff *skb, unsigned char option,
                              const void *value, unsigned char len);
 
index df7dd26cf07eb8c5fa131f2ce7aee8eb87f065e9..568def9527224d662bb3928b2a4258aafd2e0cfa 100644 (file)
@@ -730,16 +730,6 @@ int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local,
                                  0, list, len);
 }
 
-/* Analogous to dccp_feat_register_sp(), but for non-negotiable values */
-int dccp_feat_register_nn(struct sock *sk, u8 feat, u64 val)
-{
-       /* any changes must be registered before establishing the connection */
-       if (sk->sk_state != DCCP_CLOSED)
-               return -EISCONN;
-       if (dccp_feat_type(feat) != FEAT_NN)
-               return -EINVAL;
-       return __feat_register_nn(&dccp_sk(sk)->dccps_featneg, feat, 0, val);
-}
 
 /*
  *     Tracking features whose value depend on the choice of CCID
index f96721619defecb9d844fd56e5e9f3e9d65f6eb6..e56a4e5e634e61a2b0239c513c021f789e00f32c 100644 (file)
@@ -111,7 +111,6 @@ extern int  dccp_feat_init(struct sock *sk);
 extern void dccp_feat_initialise_sysctls(void);
 extern int  dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local,
                                  u8 const *list, u8 len);
-extern int  dccp_feat_register_nn(struct sock *sk, u8 feat, u64 val);
 extern int  dccp_feat_parse_options(struct sock *, struct dccp_request_sock *,
                                    u8 mand, u8 opt, u8 feat, u8 *val, u8 len);
 extern int  dccp_feat_clone_list(struct list_head const *, struct list_head *);
index 92718511eac5af1d1896196c2591f5621dd22d38..d4b1ae0daacbd6e76774b6cb1005a421a8a80ce9 100644 (file)
@@ -369,7 +369,7 @@ int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time)
 
 EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
 
-int dccp_insert_option_timestamp(struct sk_buff *skb)
+static int dccp_insert_option_timestamp(struct sk_buff *skb)
 {
        __be32 now = htonl(dccp_timestamp());
        /* yes this will overflow but that is the point as we want a
@@ -378,8 +378,6 @@ int dccp_insert_option_timestamp(struct sk_buff *skb)
        return dccp_insert_option(skb, DCCPO_TIMESTAMP, &now, sizeof(now));
 }
 
-EXPORT_SYMBOL_GPL(dccp_insert_option_timestamp);
-
 static int dccp_insert_option_timestamp_echo(struct dccp_sock *dp,
                                             struct dccp_request_sock *dreq,
                                             struct sk_buff *skb)
index 096250d1323b9960c0a73d449c9b6589077e7015..b054ba1f55d2bec7241e47821b923495f391cd5e 100644 (file)
@@ -50,6 +50,30 @@ EXPORT_SYMBOL_GPL(dccp_hashinfo);
 /* the maximum queue length for tx in packets. 0 is no limit */
 int sysctl_dccp_tx_qlen __read_mostly = 5;
 
+#ifdef CONFIG_IP_DCCP_DEBUG
+static const char *dccp_state_name(const int state)
+{
+       static const char *const dccp_state_names[] = {
+       [DCCP_OPEN]             = "OPEN",
+       [DCCP_REQUESTING]       = "REQUESTING",
+       [DCCP_PARTOPEN]         = "PARTOPEN",
+       [DCCP_LISTEN]           = "LISTEN",
+       [DCCP_RESPOND]          = "RESPOND",
+       [DCCP_CLOSING]          = "CLOSING",
+       [DCCP_ACTIVE_CLOSEREQ]  = "CLOSEREQ",
+       [DCCP_PASSIVE_CLOSE]    = "PASSIVE_CLOSE",
+       [DCCP_PASSIVE_CLOSEREQ] = "PASSIVE_CLOSEREQ",
+       [DCCP_TIME_WAIT]        = "TIME_WAIT",
+       [DCCP_CLOSED]           = "CLOSED",
+       };
+
+       if (state >= DCCP_MAX_STATES)
+               return "INVALID STATE!";
+       else
+               return dccp_state_names[state];
+}
+#endif
+
 void dccp_set_state(struct sock *sk, const int state)
 {
        const int oldstate = sk->sk_state;
@@ -146,30 +170,6 @@ const char *dccp_packet_name(const int type)
 
 EXPORT_SYMBOL_GPL(dccp_packet_name);
 
-const char *dccp_state_name(const int state)
-{
-       static const char *const dccp_state_names[] = {
-       [DCCP_OPEN]             = "OPEN",
-       [DCCP_REQUESTING]       = "REQUESTING",
-       [DCCP_PARTOPEN]         = "PARTOPEN",
-       [DCCP_LISTEN]           = "LISTEN",
-       [DCCP_RESPOND]          = "RESPOND",
-       [DCCP_CLOSING]          = "CLOSING",
-       [DCCP_ACTIVE_CLOSEREQ]  = "CLOSEREQ",
-       [DCCP_PASSIVE_CLOSE]    = "PASSIVE_CLOSE",
-       [DCCP_PASSIVE_CLOSEREQ] = "PASSIVE_CLOSEREQ",
-       [DCCP_TIME_WAIT]        = "TIME_WAIT",
-       [DCCP_CLOSED]           = "CLOSED",
-       };
-
-       if (state >= DCCP_MAX_STATES)
-               return "INVALID STATE!";
-       else
-               return dccp_state_names[state];
-}
-
-EXPORT_SYMBOL_GPL(dccp_state_name);
-
 int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
 {
        struct dccp_sock *dp = dccp_sk(sk);