12 #include <linux/module.h>
17 static const char *
const rxrpc_conn_states[] = {
18 [RXRPC_CONN_UNUSED] =
"Unused ",
19 [RXRPC_CONN_CLIENT] =
"Client ",
20 [RXRPC_CONN_SERVER_UNSECURED] =
"SvUnsec ",
21 [RXRPC_CONN_SERVER_CHALLENGING] =
"SvChall ",
22 [RXRPC_CONN_SERVER] =
"SvSecure",
23 [RXRPC_CONN_REMOTELY_ABORTED] =
"RmtAbort",
24 [RXRPC_CONN_LOCALLY_ABORTED] =
"LocAbort",
25 [RXRPC_CONN_NETWORK_ERROR] =
"NetError",
31 static void *rxrpc_call_seq_start(
struct seq_file *seq, loff_t *_pos)
37 static void *rxrpc_call_seq_next(
struct seq_file *seq,
void *
v, loff_t *
pos)
42 static void rxrpc_call_seq_stop(
struct seq_file *seq,
void *
v)
47 static int rxrpc_call_seq_show(
struct seq_file *seq,
void *
v)
51 char lbuff[4 + 4 + 4 + 4 + 5 + 1], rbuff[4 + 4 + 4 + 4 + 5 + 1];
53 if (v == &rxrpc_calls) {
56 " SvID ConnID CallID End Use State Abort "
62 trans = call->
conn->trans;
65 &trans->
local->srx.transport.sin.sin_addr,
66 ntohs(trans->
local->srx.transport.sin.sin_port));
69 &trans->
peer->srx.transport.sin.sin_addr,
70 ntohs(trans->
peer->srx.transport.sin.sin_port));
73 "UDP %-22.22s %-22.22s %4x %08x %08x %s %3u"
80 call->
conn->in_clientflag ?
"Svc" :
"Clt",
90 .start = rxrpc_call_seq_start,
91 .next = rxrpc_call_seq_next,
92 .stop = rxrpc_call_seq_stop,
93 .show = rxrpc_call_seq_show,
98 return seq_open(file, &rxrpc_call_seq_ops);
103 .open = rxrpc_call_seq_open,
112 static void *rxrpc_connection_seq_start(
struct seq_file *seq, loff_t *_pos)
118 static void *rxrpc_connection_seq_next(
struct seq_file *seq,
void *v,
124 static void rxrpc_connection_seq_stop(
struct seq_file *seq,
void *v)
129 static int rxrpc_connection_seq_show(
struct seq_file *seq,
void *v)
133 char lbuff[4 + 4 + 4 + 4 + 5 + 1], rbuff[4 + 4 + 4 + 4 + 5 + 1];
135 if (v == &rxrpc_connections) {
137 "Proto Local Remote "
138 " SvID ConnID Calls End Use State Key "
148 &trans->
local->srx.transport.sin.sin_addr,
149 ntohs(trans->
local->srx.transport.sin.sin_port));
152 &trans->
peer->srx.transport.sin.sin_addr,
153 ntohs(trans->
peer->srx.transport.sin.sin_port));
156 "UDP %-22.22s %-22.22s %4x %08x %08x %s %3u"
157 " %s %08x %08x %08x\n",
165 rxrpc_conn_states[conn->
state],
166 key_serial(conn->
key),
174 .start = rxrpc_connection_seq_start,
175 .next = rxrpc_connection_seq_next,
176 .stop = rxrpc_connection_seq_stop,
177 .show = rxrpc_connection_seq_show,
183 return seq_open(file, &rxrpc_connection_seq_ops);
188 .open = rxrpc_connection_seq_open,