Lines Matching +full:com +full:- +full:seq
1 // SPDX-License-Identifier: GPL-2.0-only
3 * atalk_proc.c - proc support for Appletalk
5 * Copyright(c) Arnaldo Carvalho de Melo <acme@conectiva.com.br>
21 for (i = atalk_interfaces; pos && i; i = i->next) in atalk_get_interface_idx()
22 --pos; in atalk_get_interface_idx()
27 static void *atalk_seq_interface_start(struct seq_file *seq, loff_t *pos) in atalk_seq_interface_start() argument
33 return l ? atalk_get_interface_idx(--l) : SEQ_START_TOKEN; in atalk_seq_interface_start()
36 static void *atalk_seq_interface_next(struct seq_file *seq, void *v, loff_t *pos) in atalk_seq_interface_next() argument
48 i = i->next; in atalk_seq_interface_next()
53 static void atalk_seq_interface_stop(struct seq_file *seq, void *v) in atalk_seq_interface_stop() argument
59 static int atalk_seq_interface_show(struct seq_file *seq, void *v) in atalk_seq_interface_show() argument
64 seq_puts(seq, "Interface Address Networks " in atalk_seq_interface_show()
70 seq_printf(seq, "%-16s %04X:%02X %04X-%04X %d\n", in atalk_seq_interface_show()
71 iface->dev->name, ntohs(iface->address.s_net), in atalk_seq_interface_show()
72 iface->address.s_node, ntohs(iface->nets.nr_firstnet), in atalk_seq_interface_show()
73 ntohs(iface->nets.nr_lastnet), iface->status); in atalk_seq_interface_show()
82 for (r = atalk_routes; pos && r; r = r->next) in atalk_get_route_idx()
83 --pos; in atalk_get_route_idx()
88 static void *atalk_seq_route_start(struct seq_file *seq, loff_t *pos) in atalk_seq_route_start() argument
94 return l ? atalk_get_route_idx(--l) : SEQ_START_TOKEN; in atalk_seq_route_start()
97 static void *atalk_seq_route_next(struct seq_file *seq, void *v, loff_t *pos) in atalk_seq_route_next() argument
109 r = r->next; in atalk_seq_route_next()
114 static void atalk_seq_route_stop(struct seq_file *seq, void *v) in atalk_seq_route_stop() argument
120 static int atalk_seq_route_show(struct seq_file *seq, void *v) in atalk_seq_route_show() argument
125 seq_puts(seq, "Target Router Flags Dev\n"); in atalk_seq_route_show()
131 seq_printf(seq, "Default %04X:%02X %-4d %s\n", in atalk_seq_route_show()
132 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show()
133 rt->flags, rt->dev->name); in atalk_seq_route_show()
137 seq_printf(seq, "%04X:%02X %04X:%02X %-4d %s\n", in atalk_seq_route_show()
138 ntohs(rt->target.s_net), rt->target.s_node, in atalk_seq_route_show()
139 ntohs(rt->gateway.s_net), rt->gateway.s_node, in atalk_seq_route_show()
140 rt->flags, rt->dev->name); in atalk_seq_route_show()
145 static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos) in atalk_seq_socket_start() argument
152 static void *atalk_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos) in atalk_seq_socket_next() argument
157 static void atalk_seq_socket_stop(struct seq_file *seq, void *v) in atalk_seq_socket_stop() argument
163 static int atalk_seq_socket_show(struct seq_file *seq, void *v) in atalk_seq_socket_show() argument
169 seq_printf(seq, "Type Local_addr Remote_addr Tx_queue " in atalk_seq_socket_show()
177 seq_printf(seq, "%02X %04X:%02X:%02X %04X:%02X:%02X %08X:%08X " in atalk_seq_socket_show()
179 s->sk_type, ntohs(at->src_net), at->src_node, at->src_port, in atalk_seq_socket_show()
180 ntohs(at->dest_net), at->dest_node, at->dest_port, in atalk_seq_socket_show()
183 s->sk_state, in atalk_seq_socket_show()
184 from_kuid_munged(seq_user_ns(seq), sock_i_uid(s))); in atalk_seq_socket_show()
213 return -ENOMEM; in atalk_proc_init()
236 return -ENOMEM; in atalk_proc_init()