netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] sctp: support sctp_diag in kernel
@ 2016-04-05  4:06 Xin Long
  2016-04-05  4:06 ` [PATCH net-next 1/7] sctp: add sctp_info dump api for sctp_diag Xin Long
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Xin Long @ 2016-04-05  4:06 UTC (permalink / raw)
  To: network dev, linux-sctp
  Cc: Marcelo Ricardo Leitner, Vlad Yasevich, daniel, davem

This patchset will add sctp_diag module to implement diag interface on
sctp in kernel.

For a listening sctp endpoint, we will just dump it's ep info.
For a sctp connection, we will the assoc info and it's ep info.

The ss dump will looks like:

[iproute2]# ./misc/ss --sctp  -n -l
State      Recv-Q Send-Q   Local Address:Port       Peer Address:Port
LISTEN     0      128      172.16.254.254:8888      *:*
LISTEN     0      5        127.0.0.1:1234           *:*
LISTEN     0      5        127.0.0.1:1234           *:*
  - ESTAB  0      0        127.0.0.1%lo:1234        127.0.0.1:4321
LISTEN     0      128      172.16.254.254:8888      *:*
  - ESTAB  0      0        172.16.254.254%eth1:8888 172.16.253.253:8888
  - ESTAB  0      0        172.16.254.254%eth1:8888 172.16.1.1:8888
  - ESTAB  0      0        172.16.254.254%eth1:8888 172.16.1.2:8888
  - ESTAB  0      0        172.16.254.254%eth1:8888 172.16.2.1:8888
  - ESTAB  0      0        172.16.254.254%eth1:8888 172.16.2.2:8888
  - ESTAB  0      0        172.16.254.254%eth1:8888 172.16.3.1:8888
  - ESTAB  0      0        172.16.254.254%eth1:8888 172.16.3.2:8888
LISTEN     0      0        127.0.0.1:4321           *:*
  - ESTAB  0      0        127.0.0.1%lo:4321        127.0.0.1:1234

The entries with '- ESTAB' are the assocs, some of them may belong to
the same endpoint. So we will dump the parent endpoint first, like the
entry with 'LISTEN'. then dump the assocs. ep and assocs entries will
be dumped in right order so that ss can show them in tree format easily.

Besides, this patchset also simplifies sctp proc codes, cause it has
some similar codes with sctp diag in sctp transport traversal.

Xin Long (7):
  sctp: add sctp_info dump api for sctp_diag
  sctp: export some apis or variables for sctp_diag
  sctp: export some functions for sctp_diag in inet_diag
  sctp: add the sctp_diag.c file
  sctp: reuse the some transport traversal functions in proc
  sctp: merge the seq_start/next/exits in remaddrs and assocs
  sctp: fix some rhashtable functions using in sctp proc/diag

 include/linux/sctp.h           |  65 +++++
 include/net/sctp/sctp.h        |  16 ++
 include/uapi/linux/inet_diag.h |   2 +
 net/ipv4/inet_diag.c           |   9 +-
 net/sctp/Kconfig               |   4 +
 net/sctp/Makefile              |   1 +
 net/sctp/proc.c                | 104 ++------
 net/sctp/sctp_diag.c           | 581 +++++++++++++++++++++++++++++++++++++++++
 net/sctp/socket.c              | 215 +++++++++++++++
 9 files changed, 911 insertions(+), 86 deletions(-)
 create mode 100644 net/sctp/sctp_diag.c

-- 
2.1.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-04-07 18:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-05  4:06 [PATCH net-next 0/7] sctp: support sctp_diag in kernel Xin Long
2016-04-05  4:06 ` [PATCH net-next 1/7] sctp: add sctp_info dump api for sctp_diag Xin Long
2016-04-05  4:06   ` [PATCH net-next 2/7] sctp: export some apis or variables " Xin Long
2016-04-05  4:06     ` [PATCH net-next 3/7] sctp: export some functions for sctp_diag in inet_diag Xin Long
2016-04-05  4:06       ` [PATCH net-next 4/7] sctp: add the sctp_diag.c file Xin Long
2016-04-05  4:06         ` [PATCH net-next 5/7] sctp: reuse the some transport traversal functions in proc Xin Long
2016-04-05  4:06           ` [PATCH net-next 6/7] sctp: merge the seq_start/next/exits in remaddrs and assocs Xin Long
2016-04-05  4:06             ` [PATCH net-next 7/7] sctp: fix some rhashtable functions using in sctp proc/diag Xin Long
2016-04-07 13:09           ` [PATCH net-next 5/7] sctp: reuse the some transport traversal functions in proc Neil Horman
2016-04-07 18:29             ` Marcelo Ricardo Leitner
2016-04-07 18:17       ` [PATCH net-next 3/7] sctp: export some functions for sctp_diag in inet_diag Marcelo Ricardo Leitner
2016-04-06 20:13 ` [PATCH net-next 0/7] sctp: support sctp_diag in kernel David Miller
2016-04-06 21:42   ` marcelo.leitner
2016-04-07 18:34 ` Marcelo Ricardo Leitner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).