Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279147
b: refs/heads/master
c: c9da99e
h: refs/heads/master
i:
  279145: e7a7f01
  279143: 2990528
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Dec 30, 2011
1 parent a7bb24c commit f0631f1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 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: 885ee74d5d3058e4a904671ed7929c9540c95fa5
refs/heads/master: c9da99e6475f92653139e43f3c30c0cd011a0fd8
5 changes: 5 additions & 0 deletions trunk/include/linux/unix_diag.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ struct unix_diag_vfs {
__u32 udiag_vfs_dev;
};

struct unix_diag_rqlen {
__u32 udiag_rqueue;
__u32 udiag_wqueue;
};

#endif
13 changes: 12 additions & 1 deletion trunk/net/unix/diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,18 @@ static int sk_diag_dump_icons(struct sock *sk, struct sk_buff *nlskb)

static int sk_diag_show_rqlen(struct sock *sk, struct sk_buff *nlskb)
{
RTA_PUT_U32(nlskb, UNIX_DIAG_RQLEN, sk->sk_receive_queue.qlen);
struct unix_diag_rqlen *rql;

rql = UNIX_DIAG_PUT(nlskb, UNIX_DIAG_RQLEN, sizeof(*rql));

if (sk->sk_state == TCP_LISTEN) {
rql->udiag_rqueue = sk->sk_receive_queue.qlen;
rql->udiag_wqueue = sk->sk_max_ack_backlog;
} else {
rql->udiag_rqueue = (__u32)unix_inq_len(sk);
rql->udiag_wqueue = (__u32)unix_outq_len(sk);
}

return 0;

rtattr_failure:
Expand Down

0 comments on commit f0631f1

Please sign in to comment.