diff options
author | Thomas Haller <thaller@redhat.com> | 2014-11-24 17:14:50 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-11-24 18:30:21 +0100 |
commit | 94039ca48aad406acaffe6421ea2a06b05a69dde (patch) | |
tree | 3afb891f8b7088a53b6aba3c408c1587331968d5 /lib/idiag | |
parent | 3b5226e3a2c4dc53c0932b7a65196345ffe5245a (diff) | |
download | libnl-94039ca48aad406acaffe6421ea2a06b05a69dde.tar.gz |
idiag: deprecate IDIAG_SS_* socket states
These values mirror TCP_* socket states from 'netinit/tcp.h'.
There is no good reason to expose a copy of those values.
User space should use the original values (if they care).
The only value that is actually useful is IDIAGNL_SS_ALL.
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib/idiag')
-rw-r--r-- | lib/idiag/idiag.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/lib/idiag/idiag.c b/lib/idiag/idiag.c index 21623525..303ffea9 100644 --- a/lib/idiag/idiag.c +++ b/lib/idiag/idiag.c @@ -82,25 +82,22 @@ int idiagnl_send_simple(struct nl_sock *sk, int flags, uint8_t family, */ static const struct trans_tbl idiag_states[] = { - __ADD(IDIAG_SS_UNKNOWN, unknown), - __ADD(IDIAG_SS_ESTABLISHED, established), - __ADD(IDIAG_SS_SYN_SENT, syn_sent), - __ADD(IDIAG_SS_SYN_RECV, syn_recv), - __ADD(IDIAG_SS_FIN_WAIT1, fin_wait), - __ADD(IDIAG_SS_FIN_WAIT2, fin_wait2), - __ADD(IDIAG_SS_TIME_WAIT, time_wait), - __ADD(IDIAG_SS_CLOSE, close), - __ADD(IDIAG_SS_CLOSE_WAIT, close_wait), - __ADD(IDIAG_SS_LAST_ACK, last_ack), - __ADD(IDIAG_SS_LISTEN, listen), - __ADD(IDIAG_SS_CLOSING, closing), - __ADD(IDIAG_SS_MAX, max), - { ((1<<IDIAG_SS_MAX)-1), "all" } + __ADD(TCP_ESTABLISHED, established), + __ADD(TCP_SYN_SENT, syn_sent), + __ADD(TCP_SYN_RECV, syn_recv), + __ADD(TCP_FIN_WAIT1, fin_wait), + __ADD(TCP_FIN_WAIT2, fin_wait2), + __ADD(TCP_TIME_WAIT, time_wait), + __ADD(TCP_CLOSE, close), + __ADD(TCP_CLOSE_WAIT, close_wait), + __ADD(TCP_LAST_ACK, last_ack), + __ADD(TCP_LISTEN, listen), + __ADD(TCP_CLOSING, closing), }; /** * Convert inet diag socket states to strings. - * @arg state inetdiag socket state (e.g., IDIAG_SS_ESTABLISHED) + * @arg state inetdiag socket state (e.g., TCP_ESTABLISHED) * @arg buf output buffer which will hold string result * @arg len length in bytes of the output buffer * |