| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _TCPINFO_H_ |
| 18 |
#define _TCPINFO_H_ |
| 19 |
|
| 20 |
#define TCP_UNSET 0 |
| 21 |
#define TCP_VERBOSE (1 << 1) |
| 22 |
#define TCP_v4 (1 << 2) |
| 23 |
#define TCP_v6 (1 << 3) |
| 24 |
|
| 25 |
#ifdef __cplusplus |
| 26 |
extern "C" |
| 27 |
{ |
| 28 |
#endif |
| 29 |
|
| 30 |
struct proc_tcptable; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
int proc_tcptable_new (struct proc_tcptable **tcptable); |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
void proc_tcptable_read (struct proc_tcptable *tcptable, int flags); |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
struct proc_cputable *proc_tcptable_unref (struct proc_tcptable *tcptable); |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
unsigned long proc_tcp_get_tcp_established (struct proc_tcptable *tcptable); |
| 47 |
unsigned long proc_tcp_get_tcp_syn_sent (struct proc_tcptable *tcptable); |
| 48 |
unsigned long proc_tcp_get_tcp_syn_recv (struct proc_tcptable *tcptable); |
| 49 |
unsigned long proc_tcp_get_tcp_fin_wait1 (struct proc_tcptable *tcptable); |
| 50 |
unsigned long proc_tcp_get_tcp_fin_wait2 (struct proc_tcptable *tcptable); |
| 51 |
unsigned long proc_tcp_get_tcp_time_wait (struct proc_tcptable *tcptable); |
| 52 |
unsigned long proc_tcp_get_tcp_close (struct proc_tcptable *tcptable); |
| 53 |
unsigned long proc_tcp_get_tcp_close_wait (struct proc_tcptable *tcptable); |
| 54 |
unsigned long proc_tcp_get_tcp_last_ack (struct proc_tcptable *tcptable); |
| 55 |
unsigned long proc_tcp_get_tcp_listen (struct proc_tcptable *tcptable); |
| 56 |
unsigned long proc_tcp_get_tcp_closing (struct proc_tcptable *tcptable); |
| 57 |
|
| 58 |
#ifdef __cplusplus |
| 59 |
} |
| 60 |
#endif |
| 61 |
|
| 62 |
#endif |