16 #include <linux/atalk.h>
17 #include <linux/export.h>
30 static void *atalk_seq_interface_start(
struct seq_file *seq, loff_t *pos)
39 static void *atalk_seq_interface_next(
struct seq_file *seq,
void *
v, loff_t *pos)
56 static void atalk_seq_interface_stop(
struct seq_file *seq,
void *v)
62 static int atalk_seq_interface_show(
struct seq_file *seq,
void *v)
67 seq_puts(seq,
"Interface Address Networks "
73 seq_printf(seq,
"%-16s %04X:%02X %04X-%04X %d\n",
91 static void *atalk_seq_route_start(
struct seq_file *seq, loff_t *pos)
100 static void *atalk_seq_route_next(
struct seq_file *seq,
void *v, loff_t *pos)
117 static void atalk_seq_route_stop(
struct seq_file *seq,
void *v)
123 static int atalk_seq_route_show(
struct seq_file *seq,
void *v)
128 seq_puts(seq,
"Target Router Flags Dev\n");
134 seq_printf(seq,
"Default %04X:%02X %-4d %s\n",
140 seq_printf(seq,
"%04X:%02X %04X:%02X %-4d %s\n",
148 static void *atalk_seq_socket_start(
struct seq_file *seq, loff_t *pos)
155 static void *atalk_seq_socket_next(
struct seq_file *seq,
void *v, loff_t *pos)
160 static void atalk_seq_socket_stop(
struct seq_file *seq,
void *v)
166 static int atalk_seq_socket_show(
struct seq_file *seq,
void *v)
172 seq_printf(seq,
"Type Local_addr Remote_addr Tx_queue "
173 "Rx_queue St UID\n");
180 seq_printf(seq,
"%02X %04X:%02X:%02X %04X:%02X:%02X %08X:%08X "
184 sk_wmem_alloc_get(s),
185 sk_rmem_alloc_get(s),
193 .start = atalk_seq_interface_start,
194 .next = atalk_seq_interface_next,
195 .stop = atalk_seq_interface_stop,
196 .show = atalk_seq_interface_show,
200 .start = atalk_seq_route_start,
201 .next = atalk_seq_route_next,
202 .stop = atalk_seq_route_stop,
203 .show = atalk_seq_route_show,
207 .start = atalk_seq_socket_start,
208 .next = atalk_seq_socket_next,
209 .stop = atalk_seq_socket_stop,
210 .show = atalk_seq_socket_show,
215 return seq_open(file, &atalk_seq_interface_ops);
220 return seq_open(file, &atalk_seq_route_ops);
225 return seq_open(file, &atalk_seq_socket_ops);
230 .open = atalk_seq_interface_open,
238 .open = atalk_seq_route_open,
246 .open = atalk_seq_socket_open,
263 p = proc_create(
"interface",
S_IRUGO, atalk_proc_dir,
264 &atalk_seq_interface_fops);
268 p = proc_create(
"route",
S_IRUGO, atalk_proc_dir,
269 &atalk_seq_route_fops);
273 p = proc_create(
"socket",
S_IRUGO, atalk_proc_dir,
274 &atalk_seq_socket_fops);