/* * netlink/idiag/idiagnl.h Inetdiag Netlink * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation version 2.1 * of the License. * * Copyright (c) 2013 Sassano Systems LLC */ #ifndef NETLINK_IDIAGNL_H_ #define NETLINK_IDIAGNL_H_ #include #include #ifdef __cplusplus extern "C" { #endif /************************************************************* * The following part contains DEPRECATED names and defines. * Don't use them. *************************************************************/ /** * Inet Diag message types * * deprecated: use TCPDIAG_GETSOCK, DCCPDIAG_GETSOCK and * INET_DIAG_GETSOCK_MAX from linux/inet_diag.h */ #define IDIAG_TCPDIAG_GETSOCK 18 #define IDIAG_DCCPDIAG_GETSOCK 19 #define IDIAG_GETSOCK_MAX 24 /** * Socket state identifiers * @ingroup idiag * @deprecated: use instead the TCP_* defines from netinet/tcp.h. */ enum { 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 * @deprecated */ #define IDIAG_SS_ALL IDIAGNL_SS_ALL /** * Inet Diag extended attributes * @ingroup idiag * @deprecated These attributes should not be used. They mirror the * INET_DIAG_* extension flags from kernel headers. Use those instead. */ enum { IDIAG_ATTR_NONE = 0, /* INET_DIAG_NONE */ IDIAG_ATTR_MEMINFO = 1, /* INET_DIAG_MEMINFO */ IDIAG_ATTR_INFO = 2, /* INET_DIAG_INFO */ IDIAG_ATTR_VEGASINFO = 3, /* INET_DIAG_VEGASINFO */ IDIAG_ATTR_CONG = 4, /* INET_DIAG_CONG */ IDIAG_ATTR_TOS = 5, /* INET_DIAG_TOS */ IDIAG_ATTR_TCLASS = 6, /* INET_DIAG_TCLASS */ IDIAG_ATTR_SKMEMINFO = 7, /* INET_DIAG_SKMEMINFO */ IDIAG_ATTR_SHUTDOWN = 8, /* INET_DIAG_SHUTDOWN */ /* IDIAG_ATTR_MAX was wrong, because it did not correspond to * INET_DIAG_MAX. Anyway, freeze it to the previous value. */ IDIAG_ATTR_MAX = 9, IDIAG_ATTR_ALL = (1<