| 
    libnl 3.7.0
    
   | 
 
Modules | |
| Inet Diag Memory Info | |
| Inet Diag Messages | |
| Inet Diag Requests | |
| Inet Diag TCP Vegas Info | |
Macros | |
| #define | IDIAG_SS_ALL IDIAGNL_SS_ALL | 
| Macro to represent all socket states.  More... | |
| #define | IDIAGNL_SS_ALL (((1<<12)-1)) | 
| Macro to represent all socket states.  More... | |
Enumerations | |
| enum | {  IDIAG_SS_UNKNOWN = 0 , IDIAG_SS_ESTABLISHED = 1 , IDIAG_SS_SYN_SENT = 2 , IDIAG_SS_SYN_RECV = 3 , IDIAG_SS_FIN_WAIT1 = 4 , IDIAG_SS_FIN_WAIT2 = 5 , IDIAG_SS_TIME_WAIT = 6 , IDIAG_SS_CLOSE = 7 , IDIAG_SS_CLOSE_WAIT = 8 , IDIAG_SS_LAST_ACK = 9 , IDIAG_SS_LISTEN = 10 , IDIAG_SS_CLOSING = 11 , IDIAG_SS_MAX = 12 }  | 
| Socket state identifiers.  More... | |
| enum | {  IDIAG_ATTR_NONE = 0 , IDIAG_ATTR_MEMINFO = 1 , IDIAG_ATTR_INFO = 2 , IDIAG_ATTR_VEGASINFO = 3 , IDIAG_ATTR_CONG = 4 , IDIAG_ATTR_TOS = 5 , IDIAG_ATTR_TCLASS = 6 , IDIAG_ATTR_SKMEMINFO = 7 , IDIAG_ATTR_SHUTDOWN = 8 , IDIAG_ATTR_MAX = 9 , IDIAG_ATTR_ALL = (1<<IDIAG_ATTR_MAX) - 1 }  | 
| Inet Diag extended attributes.  More... | |
Inet Diag flag and attribute conversions | |
| char * | idiagnl_state2str (int state, char *buf, size_t len) | 
| Convert inet diag socket states to strings.  More... | |
| int | idiagnl_str2state (const char *name) | 
| Convert inet diag socket state string to int.  More... | |
| char * | idiagnl_timer2str (int timer, char *buf, size_t len) | 
| Convert inet diag timer types to strings.  More... | |
| int | idiagnl_str2timer (const char *name) | 
| Convert inet diag timer string to int.  More... | |
| char * | idiagnl_attrs2str (int attrs, char *buf, size_t len) | 
| Convert inet diag extension type to a string.  More... | |
| char * | idiagnl_exts2str (uint8_t attrs, char *buf, size_t len) | 
| Convert inet diag extension flags to a string.  More... | |
| char * | idiagnl_tcpstate2str (uint8_t state, char *buf, size_t len) | 
| Convert inetdiag tcp states to strings.  More... | |
| char * | idiagnl_tcpopts2str (uint8_t attrs, char *buf, size_t len) | 
| Convert TCP option attributes to string.  More... | |
| char * | idiagnl_shutdown2str (uint8_t shutdown, char *buf, size_t len) | 
| Convert shutdown state to string.  More... | |
Socket Creation | |
| int | idiagnl_connect (struct nl_sock *sk) | 
| Create and connect idiag netlink socket.  More... | |
Sending | |
| int | idiagnl_send_simple (struct nl_sock *sk, int flags, uint8_t family, uint16_t states, uint16_t ext) | 
| Send trivial idiag netlink message.  More... | |
| #define IDIAG_SS_ALL IDIAGNL_SS_ALL | 
| #define IDIAGNL_SS_ALL (((1<<12)-1)) | 
| anonymous enum | 
| anonymous enum | 
| int idiagnl_connect | ( | struct nl_sock * | sk | ) | 
Create and connect idiag netlink socket.
| sk | Netlink socket. | 
Creates a NETLINK_INET_DIAG socket, binds the socket, and issues a connection attemp.
Definition at line 34 of file idiag.c.
References nl_connect().
 Here is the call graph for this function:| int idiagnl_send_simple | ( | struct nl_sock * | sk, | 
| int | flags, | ||
| uint8_t | family, | ||
| uint16_t | states, | ||
| uint16_t | ext | ||
| ) | 
Send trivial idiag netlink message.
| sk | Netlink socket. | 
| flags | Message flags | 
| family | Address family | 
| states | Socket states to query | 
| ext | Inet Diag attribute extensions to query. Note that this only supports 8 bit arguments. Flags outside uint8_t range are silently ignored. | 
Definition at line 58 of file idiag.c.
References nl_send_simple().
 Here is the call graph for this function:| char * idiagnl_state2str | ( | int | state, | 
| char * | buf, | ||
| size_t | len | ||
| ) | 
Convert inet diag socket states to strings.
| state | inetdiag socket state (e.g., TCP_ESTABLISHED) | 
| buf | output buffer which will hold string result | 
| len | length in bytes of the output buffer | 
| int idiagnl_str2state | ( | const char * | name | ) | 
| char * idiagnl_timer2str | ( | int | timer, | 
| char * | buf, | ||
| size_t | len | ||
| ) | 
Convert inet diag timer types to strings.
| timer | inetdiag timer (e.g., IDIAGNL_TIMER_ON) | 
| buf | output buffer which will hold string result | 
| len | length in bytes of the output buffer | 
| int idiagnl_str2timer | ( | const char * | name | ) | 
| char * idiagnl_attrs2str | ( | int | attrs, | 
| char * | buf, | ||
| size_t | len | ||
| ) | 
Convert inet diag extension type to a string.
| attrs | inet diag extension type (e.g. INET_DIAG_MEMINFO) | 
| buf | output buffer which will hold string result | 
| len | length in bytes of the output buffer | 
| char * idiagnl_exts2str | ( | uint8_t | attrs, | 
| char * | buf, | ||
| size_t | len | ||
| ) | 
Convert inet diag extension flags to a string.
| attrs | inet diag extension flags (e.g. ( (1<<(INET_DIAG_MEMINFO-1)) | (1<<(INET_DIAG_CONG-1)) | (1<<(INET_DIAG_TOS-1)) ) ) | 
| buf | Output buffer to hold string representation | 
| len | length in bytes of the output buffer | 
| char * idiagnl_tcpstate2str | ( | uint8_t | state, | 
| char * | buf, | ||
| size_t | len | ||
| ) | 
| char * idiagnl_tcpopts2str | ( | uint8_t | attrs, | 
| char * | buf, | ||
| size_t | len | ||
| ) | 
| char * idiagnl_shutdown2str | ( | uint8_t | shutdown, | 
| char * | buf, | ||
| size_t | len | ||
| ) |