12 #include <linux/export.h>
17 static void *ipx_seq_interface_start(
struct seq_file *seq, loff_t *
pos)
19 spin_lock_bh(&ipx_interfaces_lock);
23 static void *ipx_seq_interface_next(
struct seq_file *seq,
void *
v, loff_t *
pos)
28 static void ipx_seq_interface_stop(
struct seq_file *seq,
void *
v)
30 spin_unlock_bh(&ipx_interfaces_lock);
33 static int ipx_seq_interface_show(
struct seq_file *seq,
void *
v)
37 if (v == &ipx_interfaces) {
38 seq_puts(seq,
"Network Node_Address Primary Device "
40 #ifdef IPX_REFCNT_DEBUG
55 #ifdef IPX_REFCNT_DEBUG
63 static void *ipx_seq_route_start(
struct seq_file *seq, loff_t *
pos)
69 static void *ipx_seq_route_next(
struct seq_file *seq,
void *v, loff_t *
pos)
74 static void ipx_seq_route_stop(
struct seq_file *seq,
void *v)
79 static int ipx_seq_route_show(
struct seq_file *seq,
void *v)
83 if (v == &ipx_routes) {
84 seq_puts(seq,
"Network Router_Net Router_Node\n");
92 seq_printf(seq,
"%08lX %02X%02X%02X%02X%02X%02X\n",
98 seq_puts(seq,
"Directly Connected\n");
128 static void *ipx_seq_socket_start(
struct seq_file *seq, loff_t *pos)
132 spin_lock_bh(&ipx_interfaces_lock);
136 static void *ipx_seq_socket_next(
struct seq_file *seq,
void *v, loff_t *pos)
164 if (i->
node.next == &ipx_interfaces)
178 static int ipx_seq_socket_show(
struct seq_file *seq,
void *v)
184 #ifdef CONFIG_IPX_INTERN
186 "Remote_Address Tx_Queue "
187 "Rx_Queue State Uid\n");
189 seq_puts(seq,
"Local_Address Remote_Address "
190 "Tx_Queue Rx_Queue State Uid\n");
197 #ifdef CONFIG_IPX_INTERN
198 seq_printf(seq,
"%08lX:%02X%02X%02X%02X%02X%02X:%04X ",
200 ipxs->node[0], ipxs->node[1], ipxs->node[2], ipxs->node[3],
201 ipxs->node[4], ipxs->node[5],
ntohs(ipxs->
port));
209 seq_printf(seq,
"%08lX:%02X%02X%02X%02X%02X%02X:%04X ",
218 sk_wmem_alloc_get(s),
219 sk_rmem_alloc_get(s),
227 .
start = ipx_seq_interface_start,
228 .next = ipx_seq_interface_next,
229 .stop = ipx_seq_interface_stop,
230 .show = ipx_seq_interface_show,
234 .
start = ipx_seq_route_start,
235 .next = ipx_seq_route_next,
236 .stop = ipx_seq_route_stop,
237 .show = ipx_seq_route_show,
241 .
start = ipx_seq_socket_start,
242 .next = ipx_seq_socket_next,
243 .stop = ipx_seq_interface_stop,
244 .show = ipx_seq_socket_show,
249 return seq_open(file, &ipx_seq_route_ops);
254 return seq_open(file, &ipx_seq_interface_ops);
259 return seq_open(file, &ipx_seq_socket_ops);
264 .open = ipx_seq_interface_open,
272 .open = ipx_seq_route_open,
280 .open = ipx_seq_socket_open,
297 p = proc_create(
"interface",
S_IRUGO,
298 ipx_proc_dir, &ipx_seq_interface_fops);
302 p = proc_create(
"route",
S_IRUGO, ipx_proc_dir, &ipx_seq_route_fops);
306 p = proc_create(
"socket",
S_IRUGO, ipx_proc_dir, &ipx_seq_socket_fops);