From: Thomas Haller Date: Mon, 24 Nov 2014 16:14:50 +0000 (+0100) Subject: idiag: deprecate IDIAG_SS_* socket states X-Git-Tag: libnl3_2_26rc1~27^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94039ca48aad406acaffe6421ea2a06b05a69dde;p=libnl 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 Signed-off-by: Thomas Haller --- diff --git a/include/netlink/idiag/idiagnl.h b/include/netlink/idiag/idiagnl.h index 9f3345a..3b3b57e 100644 --- a/include/netlink/idiag/idiagnl.h +++ b/include/netlink/idiag/idiagnl.h @@ -32,28 +32,39 @@ extern "C" { /** * Socket state identifiers * @ingroup idiag + * @deprecated: use instead the TCP_* defines from netinet/tcp.h. */ enum { - IDIAG_SS_UNKNOWN, - IDIAG_SS_ESTABLISHED, - IDIAG_SS_SYN_SENT, - IDIAG_SS_SYN_RECV, - IDIAG_SS_FIN_WAIT1, - IDIAG_SS_FIN_WAIT2, - IDIAG_SS_TIME_WAIT, - IDIAG_SS_CLOSE, - IDIAG_SS_CLOSE_WAIT, - IDIAG_SS_LAST_ACK, - IDIAG_SS_LISTEN, - IDIAG_SS_CLOSING, - IDIAG_SS_MAX + IDIAG_SS_UNKNOWN = 0, + + IDIAG_SS_ESTABLISHED = 1, /* TCP_ESTABLISHED */ + IDIAG_SS_SYN_SENT = 2, /* TCP_SYN_SENT */ + IDIAG_SS_SYN_RECV = 3, /* TCP_SYN_RECV */ + IDIAG_SS_FIN_WAIT1 = 4, /* TCP_FIN_WAIT1 */ + IDIAG_SS_FIN_WAIT2 = 5, /* TCP_FIN_WAIT2 */ + IDIAG_SS_TIME_WAIT = 6, /* TCP_TIME_WAIT */ + IDIAG_SS_CLOSE = 7, /* TCP_CLOSE */ + IDIAG_SS_CLOSE_WAIT = 8, /* TCP_CLOSE_WAIT */ + IDIAG_SS_LAST_ACK = 9, /* TCP_LAST_ACK */ + IDIAG_SS_LISTEN = 10, /* TCP_LISTEN */ + IDIAG_SS_CLOSING = 11, /* TCP_CLOSING */ + + IDIAG_SS_MAX = 12, }; /** * Macro to represent all socket states. * @ingroup idiag */ -#define IDIAG_SS_ALL ((1<