[PATCH] w1: Adds a sysfs entry (w1_master_search) that allows you to disable/enable...
[linux-2.6/verdex.git] / include / linux / tcp_diag.h
blobceee962e1d15a56262fe9b288cce886db6ff1dbe
1 #ifndef _TCP_DIAG_H_
2 #define _TCP_DIAG_H_ 1
4 /* Just some random number */
5 #define TCPDIAG_GETSOCK 18
7 /* Socket identity */
8 struct tcpdiag_sockid
10 __u16 tcpdiag_sport;
11 __u16 tcpdiag_dport;
12 __u32 tcpdiag_src[4];
13 __u32 tcpdiag_dst[4];
14 __u32 tcpdiag_if;
15 __u32 tcpdiag_cookie[2];
16 #define TCPDIAG_NOCOOKIE (~0U)
19 /* Request structure */
21 struct tcpdiagreq
23 __u8 tcpdiag_family; /* Family of addresses. */
24 __u8 tcpdiag_src_len;
25 __u8 tcpdiag_dst_len;
26 __u8 tcpdiag_ext; /* Query extended information */
28 struct tcpdiag_sockid id;
30 __u32 tcpdiag_states; /* States to dump */
31 __u32 tcpdiag_dbs; /* Tables to dump (NI) */
34 enum
36 TCPDIAG_REQ_NONE,
37 TCPDIAG_REQ_BYTECODE,
40 #define TCPDIAG_REQ_MAX TCPDIAG_REQ_BYTECODE
42 /* Bytecode is sequence of 4 byte commands followed by variable arguments.
43 * All the commands identified by "code" are conditional jumps forward:
44 * to offset cc+"yes" or to offset cc+"no". "yes" is supposed to be
45 * length of the command and its arguments.
48 struct tcpdiag_bc_op
50 unsigned char code;
51 unsigned char yes;
52 unsigned short no;
55 enum
57 TCPDIAG_BC_NOP,
58 TCPDIAG_BC_JMP,
59 TCPDIAG_BC_S_GE,
60 TCPDIAG_BC_S_LE,
61 TCPDIAG_BC_D_GE,
62 TCPDIAG_BC_D_LE,
63 TCPDIAG_BC_AUTO,
64 TCPDIAG_BC_S_COND,
65 TCPDIAG_BC_D_COND,
68 struct tcpdiag_hostcond
70 __u8 family;
71 __u8 prefix_len;
72 int port;
73 __u32 addr[0];
76 /* Base info structure. It contains socket identity (addrs/ports/cookie)
77 * and, alas, the information shown by netstat. */
78 struct tcpdiagmsg
80 __u8 tcpdiag_family;
81 __u8 tcpdiag_state;
82 __u8 tcpdiag_timer;
83 __u8 tcpdiag_retrans;
85 struct tcpdiag_sockid id;
87 __u32 tcpdiag_expires;
88 __u32 tcpdiag_rqueue;
89 __u32 tcpdiag_wqueue;
90 __u32 tcpdiag_uid;
91 __u32 tcpdiag_inode;
94 /* Extensions */
96 enum
98 TCPDIAG_NONE,
99 TCPDIAG_MEMINFO,
100 TCPDIAG_INFO,
101 TCPDIAG_VEGASINFO,
104 #define TCPDIAG_MAX TCPDIAG_VEGASINFO
107 /* TCPDIAG_MEM */
109 struct tcpdiag_meminfo
111 __u32 tcpdiag_rmem;
112 __u32 tcpdiag_wmem;
113 __u32 tcpdiag_fmem;
114 __u32 tcpdiag_tmem;
117 /* TCPDIAG_VEGASINFO */
119 struct tcpvegas_info {
120 __u32 tcpv_enabled;
121 __u32 tcpv_rttcnt;
122 __u32 tcpv_rtt;
123 __u32 tcpv_minrtt;
127 #endif /* _TCP_DIAG_H_ */