|
@@ -50,6 +50,30 @@ EXPORT_SYMBOL_GPL(dccp_hashinfo);
|
|
/* the maximum queue length for tx in packets. 0 is no limit */
|
|
/* the maximum queue length for tx in packets. 0 is no limit */
|
|
int sysctl_dccp_tx_qlen __read_mostly = 5;
|
|
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)
|
|
void dccp_set_state(struct sock *sk, const int state)
|
|
{
|
|
{
|
|
const int oldstate = sk->sk_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);
|
|
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)
|
|
int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
|
|
{
|
|
{
|
|
struct dccp_sock *dp = dccp_sk(sk);
|
|
struct dccp_sock *dp = dccp_sk(sk);
|