Support reading in and storing multiple Section Header and Name Resolution blocks.
[metze/wireshark/wip.git] / wiretap / netscaler.h
1 /* netscaler.h
2  *
3  * Wiretap Library
4  * Copyright (c) 2006 by Ravi Kondamuru <Ravi.Kondamuru@citrix.com>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 #ifndef _NETSCALER_H
22 #define _NETSCALER_H
23
24 #include <glib.h>
25 #include <wiretap/wtap.h>
26
27 /* Physical Device full packet trace */
28 #define NSPR_PDPKTRACEFULLTX_V10        0x0310  /* Transmitted */
29 #define NSPR_PDPKTRACEFULLTX_V20        0xC0    /* Transmitted */
30 #define NSPR_PDPKTRACEFULLTXB_V10       0x0311  /* In transmit buffer */
31 #define NSPR_PDPKTRACEFULLTXB_V20       0xC1    /* In transmit buffer */
32 #define NSPR_PDPKTRACEFULLRX_V10        0x0312  /* Received */
33 #define NSPR_PDPKTRACEFULLRX_V20        0xC2    /* Received */
34
35 /* Physical Device partial packet trace */
36
37 #define NSPR_PDPKTRACEPARTTX_V10        0x0314  /* Transmitted */
38 #define NSPR_PDPKTRACEPARTTX_V20        0xC4    /* Transmitted */
39 #define NSPR_PDPKTRACEPARTTXB_V10       0x0315  /* In transmit buffer */
40 #define NSPR_PDPKTRACEPARTTXB_V20       0xC5    /* In transmit buffer */
41 #define NSPR_PDPKTRACEPARTRX_V10        0x0316  /* Received */
42 #define NSPR_PDPKTRACEPARTRX_V20        0xC6    /* Received */
43
44 /* pcb devno support (c.f. REQ16549) */
45 #define NSPR_PDPKTRACEFULLTX_V21        0xD0    /* Transmitted */
46 #define NSPR_PDPKTRACEFULLTXB_V21       0xD1    /* In transmit buffer */
47 #define NSPR_PDPKTRACEFULLRX_V21        0xD2    /* Received */
48 #define NSPR_PDPKTRACEPARTTX_V21        0xD4    /* Transmitted */
49 #define NSPR_PDPKTRACEPARTTXB_V21       0xD5    /* In transmit buffer */
50 #define NSPR_PDPKTRACEPARTRX_V21        0xD6    /* Received */
51
52 /* vlan tag support (c.f. REQ24791) */
53 #define NSPR_PDPKTRACEFULLTX_V22        0xE0    /* Transmitted */
54 #define NSPR_PDPKTRACEFULLTXB_V22       0xE1    /* In transmit buffer */
55 #define NSPR_PDPKTRACEFULLRX_V22        0xE2    /* Received */
56 #define NSPR_PDPKTRACEPARTTX_V22        0xE4    /* Transmitted */
57 #define NSPR_PDPKTRACEPARTTXB_V22       0xE5    /* In transmit buffer */
58 #define NSPR_PDPKTRACEPARTRX_V22        0xE6    /* Received */
59
60 /* Per core tracing */
61 #define NSPR_PDPKTRACEFULLTX_V23        0xF0    /* Transmitted */
62 #define NSPR_PDPKTRACEFULLTXB_V23       0xF1    /* In transmit buffer */
63 #define NSPR_PDPKTRACEFULLRX_V23        0xF2    /* Received */
64 #define NSPR_PDPKTRACEPARTTX_V23        0xF4    /* Transmitted */
65 #define NSPR_PDPKTRACEPARTTXB_V23       0xF5    /* In transmit buffer */
66 #define NSPR_PDPKTRACEPARTRX_V23        0xF6    /* Received */
67
68 /* cluster tracing*/
69 #define NSPR_PDPKTRACEFULLTX_V24    0xF8    /* Transmitted */
70 #define NSPR_PDPKTRACEFULLTXB_V24   0xF9    /* In transmit buffer */
71 #define NSPR_PDPKTRACEFULLRX_V24    0xFA    /* Received packets before NIC pipelining */
72 #define NSPR_PDPKTRACEFULLNEWRX_V24     0xfB    /* Received packets after NIC pipelining */
73 #define NSPR_PDPKTRACEPARTTX_V24    0xFC    /* Transmitted */
74 #define NSPR_PDPKTRACEPARTTXB_V24   0xFD    /* In transmit buffer */
75 #define NSPR_PDPKTRACEPARTRX_V24    0xFE    /* Received packets before NIC pipelining */
76 #define NSPR_PDPKTRACEPARTNEWRX_V24     0xFF    /* Received packets after NIC pipelining */
77
78 /* vm info tracing*/
79 #define NSPR_PDPKTRACEFULLTX_V25    0xB0    /* Transmitted */
80 #define NSPR_PDPKTRACEFULLTXB_V25   0xB1    /* In transmit buffer */
81 #define NSPR_PDPKTRACEFULLRX_V25    0xB2    /* Received packets before NIC pipelining */
82 #define NSPR_PDPKTRACEFULLNEWRX_V25     0xB3    /* Received packets after NIC pipelining */
83 #define NSPR_PDPKTRACEPARTTX_V25    0xB4    /* Transmitted */
84 #define NSPR_PDPKTRACEPARTTXB_V25   0xB5    /* In transmit buffer */
85 #define NSPR_PDPKTRACEPARTRX_V25    0xB6    /* Received packets before NIC pipelining */
86 #define NSPR_PDPKTRACEPARTNEWRX_V25     0xB7    /* Received packets after NIC pipelining */
87
88 /* NS DEBUG INFO PER PACKET */
89 #define NSPR_PDPKTRACEFULLTX_V26    0xA0    /* Transmitted */
90 #define NSPR_PDPKTRACEFULLTXB_V26  0xA1    /* In transmit buffer */
91 #define NSPR_PDPKTRACEFULLRX_V26    0xA2    /* Received packets before NIC pipelining */
92 #define NSPR_PDPKTRACEFULLNEWRX_V26     0xA3    /* Received packets after NIC pipelining */
93 #define NSPR_PDPKTRACEPARTTX_V26    0xA4    /* Transmitted */
94 #define NSPR_PDPKTRACEPARTTXB_V26   0xA5    /* In transmit buffer */
95 #define NSPR_PDPKTRACEPARTRX_V26    0xA6    /* Received packets before NIC pipelining */
96 #define NSPR_PDPKTRACEPARTNEWRX_V26     0xA7    /* Received packets after NIC pipelining */
97
98 /* Jumbo Frame Support */
99 #define NSPR_PDPKTRACEFULLTX_V30    0xA8    /* Transmitted */
100 #define NSPR_PDPKTRACEFULLTXB_V30  0xA9   /* In transmit buffer */
101 #define NSPR_PDPKTRACEFULLRX_V30    0xAA    /* Received packets before NIC pipelining */
102 #define NSPR_PDPKTRACEFULLNEWRX_V30 0xAB    /* Received packets after NIC pipelining */
103
104 #define NSPR_PDPKTRACEFULLTX_V35    0xAC    /* Transmitted */
105 #define NSPR_PDPKTRACEFULLTXB_V35   0xAD   /* In transmit buffer */
106 #define NSPR_PDPKTRACEFULLRX_V35    0xAE    /* Received packets before NIC pipelining */
107 #define NSPR_PDPKTRACEFULLNEWRX_V35 0xAF    /* Received packets after NIC pipelining */
108
109
110 /* Record types */
111 #define NSPR_HEADER_VERSION100 0x10
112 #define NSPR_HEADER_VERSION200 0x20
113 #define NSPR_HEADER_VERSION201 0x21
114 #define NSPR_HEADER_VERSION202 0x22
115 #define NSPR_HEADER_VERSION203 0x23
116 #define NSPR_HEADER_VERSION204 0x24
117 #define NSPR_HEADER_VERSION205 0x25
118 #define NSPR_HEADER_VERSION206 0x26
119 #define NSPR_HEADER_VERSION300 0x30
120 #define NSPR_HEADER_VERSION350 0x35
121
122 wtap_open_return_val nstrace_open(wtap *wth, int *err, gchar **err_info);
123 int nstrace_10_dump_can_write_encap(int encap);
124 int nstrace_20_dump_can_write_encap(int encap);
125 int nstrace_30_dump_can_write_encap(int encap);
126 int nstrace_35_dump_can_write_encap(int encap);
127
128 gboolean nstrace_dump_open(wtap_dumper *wdh, int *err);
129
130
131 #endif /* _NETSCALER_H */