Lines Matching defs:seq
958 static struct sock *raw_get_first(struct seq_file *seq, int bucket)
960 struct raw_hashinfo *h = pde_data(file_inode(seq->file));
961 struct raw_iter_state *state = raw_seq_private(seq);
969 if (sock_net(sk) == seq_file_net(seq))
976 static struct sock *raw_get_next(struct seq_file *seq, struct sock *sk)
978 struct raw_iter_state *state = raw_seq_private(seq);
982 } while (sk && sock_net(sk) != seq_file_net(seq));
985 return raw_get_first(seq, state->bucket + 1);
989 static struct sock *raw_get_idx(struct seq_file *seq, loff_t pos)
991 struct sock *sk = raw_get_first(seq, 0);
994 while (pos && (sk = raw_get_next(seq, sk)) != NULL)
999 void *raw_seq_start(struct seq_file *seq, loff_t *pos)
1002 struct raw_hashinfo *h = pde_data(file_inode(seq->file));
1006 return *pos ? raw_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
1010 void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1015 sk = raw_get_first(seq, 0);
1017 sk = raw_get_next(seq, v);
1023 void raw_seq_stop(struct seq_file *seq, void *v)
1026 struct raw_hashinfo *h = pde_data(file_inode(seq->file));
1032 static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
1040 seq_printf(seq, "%4d: %08X:%04X %08X:%04X"
1046 from_kuid_munged(seq_user_ns(seq), sock_i_uid(sp)),
1051 static int raw_seq_show(struct seq_file *seq, void *v)
1054 seq_printf(seq, " sl local_address rem_address st tx_queue "
1058 raw_sock_seq_show(seq, v, raw_seq_private(seq)->bucket);