Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81879
b: refs/heads/master
c: 8cd850e
h: refs/heads/master
i:
  81877: 687cd2a
  81875: a29d022
  81871: 08c61fd
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Feb 1, 2008
1 parent 30eb3b4 commit a2afea9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 377cf82d66ea43f3d3cb82c2563e65b5c12c9bfd
refs/heads/master: 8cd850efa4948d57a2ed836911cfd1ab299e89c6
24 changes: 7 additions & 17 deletions trunk/net/ipv4/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,41 +927,31 @@ void raw_seq_stop(struct seq_file *seq, void *v)
}
EXPORT_SYMBOL_GPL(raw_seq_stop);

static __inline__ char *get_raw_sock(struct sock *sp, char *tmpbuf, int i)
static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
{
struct inet_sock *inet = inet_sk(sp);
__be32 dest = inet->daddr,
src = inet->rcv_saddr;
__u16 destp = 0,
srcp = inet->num;

sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
seq_printf(seq, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d",
i, src, srcp, dest, destp, sp->sk_state,
atomic_read(&sp->sk_wmem_alloc),
atomic_read(&sp->sk_rmem_alloc),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp, atomic_read(&sp->sk_drops));
return tmpbuf;
}

#define TMPSZ 128

static int raw_seq_show(struct seq_file *seq, void *v)
{
char tmpbuf[TMPSZ+1];

if (v == SEQ_START_TOKEN)
seq_printf(seq, "%-*s\n", TMPSZ-1,
" sl local_address rem_address st tx_queue "
"rx_queue tr tm->when retrnsmt uid timeout "
"inode drops");
else {
struct raw_iter_state *state = raw_seq_private(seq);

seq_printf(seq, "%-*s\n", TMPSZ-1,
get_raw_sock(v, tmpbuf, state->bucket));
}
seq_printf(seq, " sl local_address rem_address st tx_queue "
"rx_queue tr tm->when retrnsmt uid timeout "
"inode drops\n");
else
raw_sock_seq_show(seq, v, raw_seq_private(seq)->bucket);
return 0;
}

Expand Down

0 comments on commit a2afea9

Please sign in to comment.