2 * Routines for nstrace dissection
3 * Copyright 2006, Ravi Kondamuru <Ravi.Kondamuru@citrix.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include <epan/packet.h>
15 #include <wsutil/array.h>
16 #include <wiretap/netscaler.h>
18 #define NSPR_V35_HEADER_LEN_OFFSET 26
19 #define NSPR_V35_ERROR_CODE_OFFSET 28
20 #define NSPR_V35_APP_OFFSET 29
21 #define NSPR_V35_NEXT_RECORD_OFFSET 34
22 #define NSPR_V35_TOTAL_SIZE 35
24 #define MAX_UNKNOWNREC_LOOP 5
26 #define NS_TCPCC_DEFAULT 0x00
27 #define NS_TCPCC_WESTWOOD 0x01
28 #define NS_TCPCC_BIC 0x02
29 #define NS_TCPCC_CUBIC 0x03
30 #define NS_TCPCC_NILE 0x04
31 #define NS_TCPCC_CUBIC_HYSTART 0x05
32 #define NS_TCPCC_INVALID 0x06
33 #define NS_TCPCC_LAST 0x07
35 #define TRCDBG_PRR 0x1
36 #define TRCDBG_BRST 0X2
37 #define TRCDBG_DRB 0X4
38 #define TRCDBG_NILE 0x8
39 #define TRCDBG_RTT 0x10
42 /* Netscaler Record types */
43 #define NSREC_NULL 0x00
45 /* 1.Standard protocols */
46 #define NSREC_ETHERNET 0x01
47 #define NSREC_HTTP 0x02
49 /* 2. netscaler specific records */
50 #define NSREC_TCPDEBUG 0x80
51 #define NSREC_CGP 0x81
52 #define NSREC_ICA 0x82
53 #define NSREC_INFO 0x83
54 #define NSREC_VMNAMES 0x84
55 #define NSREC_CLUSTER 0x85
56 #define NSREC_HTTP2 0x86
57 #define NSREC_SSL 0x87
58 #define NSREC_APPFW 0x88
59 #define NSREC_POL 0x89
60 #define NSREC_MPTCP 0x8A
61 #define NSREC_TCPDEBUG2 0x8B
62 #define NSREC_HTTPINFO 0x8D
63 #define NSREC_TCPCC 0x8C
64 #define NSREC_TRCDBG 0x8E
65 #define UNKNOWN_LAST 0xFF
67 /* Packet error codes */
69 #define ERR_DROP_PERX_LONGPKT 1
70 #define ERR_DROP_PERX_FIXHDR 2
71 #define ERR_DROP_PERX_DUPFREE 3
73 #define ERR_PKT_FWD6 5
83 #define APP_SSLDEC 0x07
88 #define APP_MYSQL 0x0C
89 #define APP_IPFIX 0x0D
90 #define APP_ORACLE 0x0E
96 #define APP_MPTCPIN 0x14
97 #define APP_HTTP2 0x15
98 #define APP_IPSEC 0x16
101 #define APP_LLDP 0x19
102 #define APP_VPATH 0x1A
103 #define APP_NAT64 0x1B
104 #define APP_APPFW 0x1C
107 #define APP_SSLENC 0x1F
108 #define APP_MPTCPOUT 0x20
112 void proto_register_ns(void);
113 void proto_reg_handoff_ns(void);
115 static int proto_nstrace
;
117 static int hf_ns_nicno
;
118 static int hf_ns_src_vm
;
119 static int hf_ns_dst_vm
;
120 static int hf_ns_dir
;
121 static int hf_ns_pcbdevno
;
122 static int hf_ns_l_pcbdevno
;
123 static int hf_ns_devno
;
124 static int hf_ns_vlantag
;
125 static int hf_ns_coreid
;
127 static int hf_ns_errorcode
;
128 static int hf_ns_app
;
130 static int hf_ns_snode
;
131 static int hf_ns_dnode
;
132 static int hf_ns_clflags
;
133 static int hf_ns_clflags_res
;
134 static int hf_ns_clflags_rssh
;
135 static int hf_ns_clflags_rss
;
136 static int hf_ns_clflags_dfd
;
137 static int hf_ns_clflags_fr
;
138 static int hf_ns_clflags_fp
;
140 static int hf_ns_activity
;
141 static int hf_ns_activity_perf_collection
;
142 static int hf_ns_activity_pcb_zombie
;
143 static int hf_ns_activity_natpcb_zombie
;
144 static int hf_ns_activity_lbstats_sync
;
145 static int hf_ns_activity_stats_req
;
147 static int hf_ns_capflags
;
148 static int hf_ns_capflags_dbg
;
149 static int hf_ns_capflags_int
;
150 static int hf_ns_capflags_skipnwhdr
;
152 static int hf_ns_tcpdbg
;
153 static int hf_ns_tcpdbg_cwnd
;
154 static int hf_ns_tcpdbg_rtrtt
;
155 static int hf_ns_tcpdbg_tsrecent
;
156 static int hf_ns_tcpdbg_httpabort
;
158 static int hf_ns_tcpdbg2
;
159 static int hf_ns_tcpdbg2_sndCwnd
;
160 static int hf_ns_tcpdbg2_ssthresh
;
161 static int hf_ns_tcpdbg2_sndbuf
;
162 static int hf_ns_tcpdbg2_max_rcvbuf
;
163 static int hf_ns_tcpdbg2_bw_estimate
;
164 static int hf_ns_tcpdbg2_rtt
;
165 static int hf_ns_tcpdbg2_tcpos_pktcnt
;
166 static int hf_ns_tcpdbg2_ts_recent
;
167 static int hf_ns_tcpdbg2_tcp_cfgsndbuf
;
168 static int hf_ns_tcpdbg2_tcp_flvr
;
169 static int hf_ns_trcdbg
;
170 static int hf_ns_trcdbg_val1
;
171 static int hf_ns_trcdbg_val1_PRR
;
172 static int hf_ns_trcdbg_val1_NILE
;
173 static int hf_ns_trcdbg_val1_RTT
;
174 static int hf_ns_trcdbg_val1_BURST
;
175 static int hf_ns_trcdbg_val2
;
176 static int hf_ns_trcdbg_val2_PRR
;
177 static int hf_ns_trcdbg_val2_NILE
;
178 static int hf_ns_trcdbg_val2_RTT
;
179 static int hf_ns_trcdbg_val3
;
180 static int hf_ns_trcdbg_val3_PRR
;
181 static int hf_ns_trcdbg_val3_NILE
;
182 static int hf_ns_trcdbg_val3_RTT
;
183 static int hf_ns_trcdbg_val4
;
184 static int hf_ns_trcdbg_val4_PRR
;
185 static int hf_ns_trcdbg_val4_NILE
;
186 static int hf_ns_trcdbg_val4_RTT
;
187 static int hf_ns_trcdbg_val5
;
188 static int hf_ns_trcdbg_val5_DRB_APP
;
189 static int hf_ns_trcdbg_val5_NILE
;
190 static int hf_ns_trcdbg_val5_RTT
;
191 static int hf_ns_trcdbg_val6
;
192 static int hf_ns_trcdbg_val6_DRB_APP
;
193 static int hf_ns_trcdbg_val6_NILE
;
194 static int hf_ns_trcdbg_val6_RTT
;
195 static int hf_ns_trcdbg_val7
;
196 static int hf_ns_trcdbg_val7_DRB
;
197 static int hf_ns_trcdbg_val7_NILE
;
198 static int hf_ns_trcdbg_val7_DRB_APP
;
199 static int hf_ns_trcdbg_val8
;
200 static int hf_ns_trcdbg_val8_DRB
;
201 static int hf_ns_trcdbg_val8_NILE
;
202 static int hf_ns_trcdbg_val8_DRB_APP
;
203 static int hf_ns_trcdbg_val9
;
204 static int hf_ns_trcdbg_val9_DRB
;
205 static int hf_ns_trcdbg_val9_NILE
;
206 static int hf_ns_trcdbg_val10
;
207 static int hf_ns_trcdbg_val10_DRB
;
208 static int hf_ns_trcdbg_val10_NILE
;
209 static int hf_ns_trcdbg_val11
;
210 static int hf_ns_trcdbg_val11_RTT
;
211 static int hf_ns_trcdbg_val11_DRB
;
212 static int hf_ns_trcdbg_val11_DRB_APP
;
213 static int hf_ns_trcdbg_val11_NILE
;
214 static int hf_ns_trcdbg_val11_BURST
;
215 static int hf_ns_trcdbg_val12
;
216 static int hf_ns_trcdbg_val12_NILE
;
217 static int hf_ns_trcdbg_val12_RTT
;
218 static int hf_ns_trcdbg_val13
;
219 static int hf_ns_trcdbg_val13_DRB
;
220 static int hf_ns_trcdbg_val13_NILE
;
221 static int hf_ns_trcdbg_val14
;
222 static int hf_ns_trcdbg_val14_NILE
;
223 static int hf_ns_trcdbg_val15
;
224 static int hf_ns_httpInfo
;
225 static int hf_ns_httpInfo_httpabort
;
227 static int hf_ns_tcpcc
;
228 static int hf_ns_tcpcc_last_max_cwnd
;
229 static int hf_ns_tcpcc_loss_cwnd
;
230 static int hf_ns_tcpcc_last_time
;
231 static int hf_ns_tcpcc_last_cwnd
;
232 static int hf_ns_tcpcc_delay_min
;
233 static int hf_ns_tcpcc_ack_cnt
;
234 static int hf_ns_tcpcc_last_ack
;
235 static int hf_ns_tcpcc_round_start
;
236 static int hf_ns_tcpcc_end_seq
;
237 static int hf_ns_tcpcc_curr_rtt
;
238 static int hf_ns_tcpcc_rtt_min
;
239 static int hf_ns_tcpcc_alpha
;
240 static int hf_ns_tcpcc_beta_val
;
241 static int hf_ns_tcpcc_rtt_low
;
242 static int hf_ns_tcpcc_rtt_above
;
243 static int hf_ns_tcpcc_max_rtt
;
244 static int hf_ns_tcpcc_base_rtt
;
245 static int hf_ns_unknownrec
;
246 static int hf_ns_unknowndata
;
248 static int hf_ns_inforec
;
249 static int hf_ns_inforec_info
;
251 static int hf_ns_sslrec
;
252 static int hf_ns_sslrec_seq
;
254 static int hf_ns_mptcprec
;
255 static int hf_ns_mptcprec_subflowid
;
257 static int hf_ns_vmnamerec
;
258 static int hf_ns_vmnamerec_srcvmname
;
259 static int hf_ns_vmnamerec_dstvmname
;
261 static int hf_ns_clusterrec
;
262 static int hf_ns_clu_snode
;
263 static int hf_ns_clu_dnode
;
264 static int hf_ns_clu_clflags
;
265 static int hf_ns_clu_clflags_res
;
266 static int hf_ns_clu_clflags_rssh
;
267 static int hf_ns_clu_clflags_rss
;
268 static int hf_ns_clu_clflags_dfd
;
269 static int hf_ns_clu_clflags_fr
;
270 static int hf_ns_clu_clflags_fp
;
273 static int ett_ns_flags
;
274 static int ett_ns_activity_flags
;
275 static int ett_ns_tcpdebug
;
276 static int ett_ns_tcpdebug2
;
277 static int ett_ns_trcdbg
;
278 static int ett_ns_httpInfo
;
279 static int ett_ns_tcpcc
;
280 static int ett_ns_inforec
;
281 static int ett_ns_sslrec
;
282 static int ett_ns_mptcprec
;
283 static int ett_ns_vmnamerec
;
284 static int ett_ns_clusterrec
;
285 static int ett_ns_clu_clflags
;
286 static int ett_ns_unknownrec
;
287 static int ett_ns_capflags
;
289 static int hf_ns_snd_cwnd
;
290 static int hf_ns_realtime_rtt
;
291 static int hf_ns_ts_recent
;
292 static int hf_ns_http_abort_tracking_reason
;
294 static const value_string ns_errorcode_vals
[] = {
295 { ERR_NONE
, "No Error" },
296 { ERR_DROP_PERX_LONGPKT
, "Long packet" },
297 { ERR_DROP_PERX_FIXHDR
, "Fix header" },
298 { ERR_DROP_PERX_DUPFREE
, "Dup free" },
299 { ERR_PKT_FWD
, "Forwarded packet" },
300 { ERR_PKT_FWD6
, "Forwarded ipv6 packet" },
304 static const value_string tcp_dbg2_flavour
[] = {
306 { NS_TCPCC_DEFAULT
, "DEFAULT"},
307 { NS_TCPCC_WESTWOOD
, "WESTWOOD" },
308 { NS_TCPCC_BIC
,"BIC"},
309 { NS_TCPCC_CUBIC
,"CUBIC"},
310 { NS_TCPCC_NILE
,"NILE"},
311 { NS_TCPCC_CUBIC_HYSTART
, "HYSTART"},
312 { NS_TCPCC_INVALID
,"INVALID"},
315 static const value_string ns_app_vals
[] = {
316 { APP_NULL
, "NULL" },
319 { APP_SSLDEC
,"SSL-DEC"},
321 { APP_SNMP
, "SNMP" },
322 { APP_RTSP
, "RTSP" },
324 { APP_MYSQL
, "MYSQL" },
325 { APP_ORACLE
,"ORACLE" },
326 { APP_SMPP
, "SMPP" },
327 { APP_TFTP
, "TFTP" },
328 { APP_PPTP
, "PPTP" },
329 { APP_MPTCPIN
,"MPTCP-IN" },
330 { APP_HTTP2
, "HTTP2" },
331 { APP_IPSEC
, "IPSEC" },
332 { APP_TEST
, "TEST" },
334 { APP_LLDP
, "LLDP" },
335 { APP_VPATH
, "VPATH" },
336 { APP_NAT64
, "NAT64" },
337 { APP_APPFW
, "APPFW" },
340 { APP_SSLENC
,"SSL-ENC"},
341 { APP_MPTCPOUT
,"MPTCP-OUT" },
346 static value_string_ext ns_app_vals_ext
= VALUE_STRING_EXT_INIT(ns_app_vals
);
349 static const value_string ns_dir_vals
[] = {
350 { NSPR_PDPKTRACEFULLTX_V26
, "TX" },
351 { NSPR_PDPKTRACEFULLTXB_V26
, "TXB" },
352 { NSPR_PDPKTRACEFULLRX_V26
, "RX" },
353 { NSPR_PDPKTRACEFULLNEWRX_V26
, "NEW_RX" },
354 { NSPR_PDPKTRACEPARTTX_V26
, "TX" },
355 { NSPR_PDPKTRACEPARTTXB_V26
, "TXB" },
356 { NSPR_PDPKTRACEPARTRX_V26
, "RX" },
357 { NSPR_PDPKTRACEPARTNEWRX_V26
, "NEW_RX" },
358 { NSPR_PDPKTRACEFULLTX_V30
, "TX" },
359 { NSPR_PDPKTRACEFULLTXB_V30
, "TXB" },
360 { NSPR_PDPKTRACEFULLRX_V30
, "RX" },
361 { NSPR_PDPKTRACEFULLNEWRX_V30
, "NEW_RX" },
362 { NSPR_PDPKTRACEFULLTX_V35
, "TX" },
363 { NSPR_PDPKTRACEFULLTXB_V35
, "TXB" },
364 { NSPR_PDPKTRACEFULLRX_V35
, "RX" },
365 { NSPR_PDPKTRACEFULLNEWRX_V35
, "NEW_RX" },
366 { NSPR_PDPKTRACEFULLTX_V25
, "TX" },
367 { NSPR_PDPKTRACEFULLTXB_V25
, "TXB" },
368 { NSPR_PDPKTRACEFULLRX_V25
, "RX" },
369 { NSPR_PDPKTRACEFULLNEWRX_V25
, "NEW_RX" },
370 { NSPR_PDPKTRACEPARTTX_V25
, "TX" },
371 { NSPR_PDPKTRACEPARTTXB_V25
, "TXB" },
372 { NSPR_PDPKTRACEPARTRX_V25
, "RX" },
373 { NSPR_PDPKTRACEPARTNEWRX_V25
, "NEW_RX" },
374 { NSPR_PDPKTRACEFULLTX_V20
, "TX" },
375 { NSPR_PDPKTRACEFULLTXB_V20
, "TXB" },
376 { NSPR_PDPKTRACEFULLRX_V20
, "RX" },
377 { NSPR_PDPKTRACEPARTTX_V20
, "TX" },
378 { NSPR_PDPKTRACEPARTTXB_V20
, "TXB" },
379 { NSPR_PDPKTRACEPARTRX_V20
, "RX" },
380 { NSPR_PDPKTRACEFULLTX_V21
, "TX" },
381 { NSPR_PDPKTRACEFULLTXB_V21
, "TXB" },
382 { NSPR_PDPKTRACEFULLRX_V21
, "RX" },
383 { NSPR_PDPKTRACEPARTTX_V21
, "TX" },
384 { NSPR_PDPKTRACEPARTTXB_V21
, "TXB" },
385 { NSPR_PDPKTRACEPARTRX_V21
, "RX" },
386 { NSPR_PDPKTRACEFULLTX_V22
, "TX" },
387 { NSPR_PDPKTRACEFULLTXB_V22
, "TXB" },
388 { NSPR_PDPKTRACEFULLRX_V22
, "RX" },
389 { NSPR_PDPKTRACEPARTTX_V22
, "TX" },
390 { NSPR_PDPKTRACEPARTTXB_V22
, "TXB" },
391 { NSPR_PDPKTRACEPARTRX_V22
, "RX" },
392 { NSPR_PDPKTRACEFULLTX_V23
, "TX" },
393 { NSPR_PDPKTRACEFULLTXB_V23
, "TXB" },
394 { NSPR_PDPKTRACEFULLRX_V23
, "RX" },
395 { NSPR_PDPKTRACEPARTTX_V23
, "TX" },
396 { NSPR_PDPKTRACEPARTTXB_V23
, "TXB" },
397 { NSPR_PDPKTRACEPARTRX_V23
, "RX" },
398 { NSPR_PDPKTRACEFULLTX_V24
, "TX" },
399 { NSPR_PDPKTRACEFULLTXB_V24
, "TXB" },
400 { NSPR_PDPKTRACEFULLRX_V24
, "RX" },
401 { NSPR_PDPKTRACEFULLNEWRX_V24
, "NEW_RX" },
402 { NSPR_PDPKTRACEPARTTX_V24
, "TX" },
403 { NSPR_PDPKTRACEPARTTXB_V24
, "TXB" },
404 { NSPR_PDPKTRACEPARTRX_V24
, "RX" },
405 { NSPR_PDPKTRACEPARTNEWRX_V24
, "NEW_RX" },
406 { NSPR_PDPKTRACEFULLTX_V10
, "TX" },
407 { NSPR_PDPKTRACEFULLTXB_V10
, "TXB" },
408 { NSPR_PDPKTRACEFULLRX_V10
, "RX" },
409 { NSPR_PDPKTRACEPARTTX_V10
, "TX" },
410 { NSPR_PDPKTRACEPARTTXB_V10
, "TXB" },
411 { NSPR_PDPKTRACEPARTRX_V10
, "RX" },
414 static value_string_ext ns_dir_vals_ext
= VALUE_STRING_EXT_INIT(ns_dir_vals
);
417 static const value_string ns_httpabortcode_vals
[] = {
418 {0, "connection is trackable"},
419 {1, "connection is marked for NOREUSE on receiving CONNECT request"},
420 {2, "no reuse due to HTTP/0.9 Request processing"},
421 {3, "received FIN from server in the middle of transaction"},
422 {4, "VPN GSLB CONNECTION PROXY connections"},
423 {5, "if http FA moves to unknown on clt req; svr_pcb's http state is also made unknown"},
424 {6, "Incomplete HTTP chunk"},
425 {7, "forward proxy connect url received and flagged for noreuse"},
426 {8, "connection is not reused because we received more than content-length amount of data from server"},
427 {9, "the Incomplete header reassembly failed"},
428 {10, "invalid header"},
429 {11, "RTSP : the Incomplete header reassembly failed"},
430 {12, "RTSP : incomplete header processing is terminated in case of interleaved RTSP data frame"},
431 {13, "websocket connection upgrade failed on server side"},
432 {14, "RTSP : connection is marked untrackable due to memory failures"},
433 {15, "RTSP : transaction marked untrackable"},
436 static value_string_ext ns_httpabortcode_vals_ext
= VALUE_STRING_EXT_INIT(ns_httpabortcode_vals
);
438 static dissector_handle_t nstrace_handle
;
440 static dissector_handle_t eth_withoutfcs_handle
;
441 static dissector_handle_t http_handle
;
444 static void add35records(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, proto_tree
*ns_tree
);
453 #define NS_PE_STATE_PERF_COLLECTION_IN_PROG 0x00000001
454 #define NS_PE_STATE_PCB_ZOMBIE_IN_PROG 0x00000002
455 #define NS_PE_STATE_NATPCB_ZOMBIE_IN_PROG 0x00000004
456 #define NS_PE_STATE_LBSTATS_SYNC_IN_PROG 0x00000008
457 #define NS_PE_STATE_STATS_REQ_IN_PROG 0x00000010
459 #define NS_CAPFLAG_DBG 0x00020000
460 #define NS_CAPFLAG_INT 0x00040000
461 #define NS_CAPFLAG_SKIPNWHDR 0x00080000
464 dissect_nstrace(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
469 struct nstr_phdr
*pnstr
= &(pinfo
->pseudo_header
->nstr
);
470 tvbuff_t
*next_tvb_eth_client
;
471 uint8_t src_vmname_len
= 0, dst_vmname_len
= 0;
472 uint8_t variable_ns_len
= 0;
474 static int * const activity_flags
[] = {
475 &hf_ns_activity_perf_collection
,
476 &hf_ns_activity_pcb_zombie
,
477 &hf_ns_activity_natpcb_zombie
,
478 &hf_ns_activity_lbstats_sync
,
479 &hf_ns_activity_stats_req
,
483 switch(pnstr
->rec_type
)
485 case NSPR_HEADER_VERSION205
:
486 case NSPR_HEADER_VERSION300
:
487 case NSPR_HEADER_VERSION206
:
488 src_vmname_len
= tvb_get_uint8(tvb
,pnstr
->src_vmname_len_offset
);
489 dst_vmname_len
= tvb_get_uint8(tvb
,pnstr
->dst_vmname_len_offset
);
490 variable_ns_len
= src_vmname_len
+ dst_vmname_len
;
491 pnstr
->eth_offset
+= variable_ns_len
;
495 ti
= proto_tree_add_protocol_format(tree
, proto_nstrace
, tvb
, 0, pnstr
->eth_offset
, "NetScaler Packet Trace");
496 ns_tree
= proto_item_add_subtree(ti
, ett_ns
);
498 proto_tree_add_item(ns_tree
, hf_ns_dir
, tvb
, pnstr
->dir_offset
, pnstr
->dir_len
, ENC_LITTLE_ENDIAN
);
499 proto_tree_add_item(ns_tree
, hf_ns_nicno
, tvb
, pnstr
->nicno_offset
, pnstr
->nicno_len
, ENC_LITTLE_ENDIAN
);
501 switch (pnstr
->rec_type
)
503 case NSPR_HEADER_VERSION300
:
504 case NSPR_HEADER_VERSION206
:
505 proto_tree_add_bitmask(ns_tree
, tvb
, pnstr
->ns_activity_offset
, hf_ns_activity
, ett_ns_activity_flags
, activity_flags
, ENC_LITTLE_ENDIAN
);
507 proto_tree_add_item(ns_tree
, hf_ns_snd_cwnd
, tvb
, (pnstr
->ns_activity_offset
+ 4), 4, ENC_LITTLE_ENDIAN
);
508 proto_tree_add_item(ns_tree
, hf_ns_realtime_rtt
, tvb
, (pnstr
->ns_activity_offset
+ 8), 4, ENC_LITTLE_ENDIAN
);
509 proto_tree_add_item(ns_tree
, hf_ns_ts_recent
, tvb
, (pnstr
->ns_activity_offset
+ 12), 4, ENC_LITTLE_ENDIAN
);
510 proto_tree_add_item(ns_tree
, hf_ns_http_abort_tracking_reason
, tvb
, (pnstr
->dst_vmname_len_offset
+ 1), 1, ENC_LITTLE_ENDIAN
);
514 case NSPR_HEADER_VERSION205
:
517 proto_tree_add_item(ns_tree
,hf_ns_src_vm
,tvb
,pnstr
->data_offset
,src_vmname_len
,ENC_ASCII
);
521 proto_tree_add_item(ns_tree
,hf_ns_dst_vm
,tvb
,pnstr
->data_offset
+src_vmname_len
,dst_vmname_len
,ENC_ASCII
);
526 case NSPR_HEADER_VERSION204
:
528 static int * const clflags
[] = {
538 proto_tree_add_item(ns_tree
, hf_ns_snode
, tvb
, pnstr
->srcnodeid_offset
, 2, ENC_LITTLE_ENDIAN
);
539 proto_tree_add_item(ns_tree
, hf_ns_dnode
, tvb
, pnstr
->destnodeid_offset
, 2, ENC_LITTLE_ENDIAN
);
541 proto_tree_add_bitmask(ns_tree
, tvb
, pnstr
->clflags_offset
, hf_ns_clflags
, ett_ns_flags
, clflags
, ENC_NA
);
545 case NSPR_HEADER_VERSION203
:
546 proto_tree_add_item(ns_tree
, hf_ns_coreid
, tvb
, pnstr
->coreid_offset
, 2, ENC_LITTLE_ENDIAN
);
549 case NSPR_HEADER_VERSION202
:
550 proto_tree_add_item_ret_uint(ns_tree
, hf_ns_vlantag
, tvb
, pnstr
->vlantag_offset
, 2, ENC_LITTLE_ENDIAN
, &vlan
);
553 case NSPR_HEADER_VERSION201
:
554 proto_tree_add_item(ns_tree
, hf_ns_pcbdevno
, tvb
, pnstr
->pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
555 ti
= proto_tree_add_item(ns_tree
, hf_ns_devno
, tvb
, pnstr
->pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
556 proto_item_set_hidden(ti
);
558 proto_tree_add_item(ns_tree
, hf_ns_l_pcbdevno
, tvb
, pnstr
->l_pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
559 ti
= proto_tree_add_item(ns_tree
, hf_ns_devno
, tvb
, pnstr
->l_pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
560 proto_item_set_hidden(ti
);
564 case NSPR_HEADER_VERSION350
:
566 static int * const cap_flags
[] = {
569 &hf_ns_capflags_skipnwhdr
,
572 proto_tree_add_bitmask(ns_tree
, tvb
, pnstr
->ns_activity_offset
, hf_ns_activity
, ett_ns_activity_flags
, activity_flags
, ENC_LITTLE_ENDIAN
);
573 proto_tree_add_bitmask(ns_tree
, tvb
, pnstr
->ns_activity_offset
, hf_ns_capflags
, ett_ns_capflags
, cap_flags
, ENC_LITTLE_ENDIAN
);
575 proto_tree_add_item(ns_tree
, hf_ns_errorcode
, tvb
, NSPR_V35_ERROR_CODE_OFFSET
, 1, ENC_LITTLE_ENDIAN
);
576 error_code
= tvb_get_uint8(tvb
, NSPR_V35_ERROR_CODE_OFFSET
);
577 proto_tree_add_item(ns_tree
, hf_ns_app
, tvb
, NSPR_V35_APP_OFFSET
, 1, ENC_LITTLE_ENDIAN
);
578 proto_tree_add_item(ns_tree
, hf_ns_coreid
, tvb
, pnstr
->coreid_offset
, 2, ENC_LITTLE_ENDIAN
);
580 /* NSPR_HEADER_VERSION202 stuff */
581 proto_tree_add_item_ret_uint(ns_tree
, hf_ns_vlantag
, tvb
, pnstr
->vlantag_offset
, 2, ENC_LITTLE_ENDIAN
, &vlan
);
583 /* NSPR_HEADER_VERSION201 stuff */
584 proto_tree_add_item(ns_tree
, hf_ns_pcbdevno
, tvb
, pnstr
->pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
585 ti
= proto_tree_add_item(ns_tree
, hf_ns_devno
, tvb
, pnstr
->pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
586 proto_item_set_hidden(ti
);
588 proto_tree_add_item(ns_tree
, hf_ns_l_pcbdevno
, tvb
, pnstr
->l_pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
589 ti
= proto_tree_add_item(ns_tree
, hf_ns_devno
, tvb
, pnstr
->l_pcb_offset
, 4, ENC_LITTLE_ENDIAN
);
590 proto_item_set_hidden(ti
);
592 add35records(tvb
, pinfo
, tree
, ns_tree
);
595 col_prepend_fence_fstr(pinfo
->cinfo
, COL_INFO
, "NS DROPPED | ");
598 break; /* we can return here. break;ing in case some compilers are unhappy */
604 if(pnstr
->rec_type
!= NSPR_HEADER_VERSION350
){
605 /* Dissect as Ethernet */
606 next_tvb_eth_client
= tvb_new_subset_remaining(tvb
, pnstr
->eth_offset
);
607 call_dissector(eth_withoutfcs_handle
, next_tvb_eth_client
, pinfo
, tree
);
610 return tvb_captured_length(tvb
);
613 static bool no_record_header(int rec_type
)
626 static void add35records(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, proto_tree
*ns_tree
)
629 unsigned nsheaderlen
=0;
630 uint8_t ssl_internal
=0;
632 int flavour_value
= 0;
636 int reclen
= 0, nextrec
= 0;
637 int cur_record
=tvb_get_uint8(tvb
, NSPR_V35_NEXT_RECORD_OFFSET
);
641 unsigned int tcp_mode
= 0;
642 static int * const cluster_flags
[] = {
643 &hf_ns_clu_clflags_fp
,
644 &hf_ns_clu_clflags_fr
,
645 &hf_ns_clu_clflags_dfd
,
646 &hf_ns_clu_clflags_rss
,
647 &hf_ns_clu_clflags_rssh
,
648 &hf_ns_clu_clflags_res
,
651 int hf_ns_trcdbg_val1_final
= hf_ns_trcdbg_val1
;
652 int hf_ns_trcdbg_val2_final
= hf_ns_trcdbg_val2
;
653 int hf_ns_trcdbg_val3_final
= hf_ns_trcdbg_val3
;
654 int hf_ns_trcdbg_val4_final
= hf_ns_trcdbg_val4
;
655 int hf_ns_trcdbg_val5_final
= hf_ns_trcdbg_val5
;
656 int hf_ns_trcdbg_val6_final
= hf_ns_trcdbg_val6
;
657 int hf_ns_trcdbg_val7_final
= hf_ns_trcdbg_val7
;
658 int hf_ns_trcdbg_val8_final
= hf_ns_trcdbg_val8
;
659 int hf_ns_trcdbg_val9_final
= hf_ns_trcdbg_val9
;
660 int hf_ns_trcdbg_val10_final
= hf_ns_trcdbg_val10
;
661 int hf_ns_trcdbg_val11_final
= hf_ns_trcdbg_val11
;
662 int hf_ns_trcdbg_val12_final
= hf_ns_trcdbg_val12
;
663 int hf_ns_trcdbg_val13_final
= hf_ns_trcdbg_val13
;
664 int hf_ns_trcdbg_val14_final
= hf_ns_trcdbg_val14
;
666 nsheaderlen
= tvb_get_letohs(tvb
, NSPR_V35_HEADER_LEN_OFFSET
);
667 offset
= NSPR_V35_TOTAL_SIZE
;
670 record_header
= !no_record_header(cur_record
);
673 reclen
= tvb_get_letohs(tvb
,offset
);
674 nextrec
= tvb_get_uint8(tvb
,offset
+2);
678 /* Add a case statement here for each record */
680 /* Call Ethernet dissector */
681 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
682 call_dissector(eth_withoutfcs_handle
, next_tvb
, pinfo
, tree
);
684 col_prepend_fence_fstr(pinfo
->cinfo
, COL_INFO
, "[NS_INTERNAL_SSL]");
689 /* Call HTTP dissector */
691 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
692 call_dissector(http_handle
, next_tvb
, pinfo
, tree
);
698 /* Add tcpdebug subtree */
699 subitem
= proto_tree_add_item(ns_tree
, hf_ns_tcpdbg
, tvb
, offset
, reclen
, ENC_NA
);
700 subtree
= proto_item_add_subtree(subitem
, ett_ns_tcpdebug
);
701 proto_tree_add_item(subtree
, hf_ns_tcpdbg_cwnd
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
702 proto_tree_add_item(subtree
, hf_ns_tcpdbg_rtrtt
, tvb
, offset
+ 7, 4, ENC_LITTLE_ENDIAN
);
703 proto_tree_add_item(subtree
, hf_ns_tcpdbg_tsrecent
, tvb
, offset
+ 11, 4, ENC_LITTLE_ENDIAN
);
704 proto_tree_add_item(subtree
, hf_ns_tcpdbg_httpabort
, tvb
, offset
+ 15, 1, ENC_LITTLE_ENDIAN
);
707 cur_record
= nextrec
;
709 case NSREC_TCPDEBUG2
:
710 /* Add tcpdebug2 subtree */
711 subitem
= proto_tree_add_item(ns_tree
, hf_ns_tcpdbg2
, tvb
, offset
, reclen
, ENC_NA
);
712 subtree
= proto_item_add_subtree(subitem
, ett_ns_tcpdebug2
);
713 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_sndCwnd
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
714 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_ssthresh
, tvb
, offset
+ 7, 4, ENC_LITTLE_ENDIAN
);
715 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_sndbuf
, tvb
, offset
+ 11, 4, ENC_LITTLE_ENDIAN
);
716 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_max_rcvbuf
, tvb
, offset
+ 15, 4, ENC_LITTLE_ENDIAN
);
717 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_bw_estimate
, tvb
, offset
+ 19, 4, ENC_LITTLE_ENDIAN
);
718 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_rtt
, tvb
, offset
+ 23, 4, ENC_LITTLE_ENDIAN
);
719 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_tcpos_pktcnt
, tvb
, offset
+ 27, 4, ENC_LITTLE_ENDIAN
);
720 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_ts_recent
, tvb
, offset
+ 31, 4, ENC_LITTLE_ENDIAN
);
721 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_tcp_cfgsndbuf
, tvb
, offset
+ 35, 4, ENC_LITTLE_ENDIAN
);
722 proto_tree_add_item(subtree
, hf_ns_tcpdbg2_tcp_flvr
, tvb
, offset
+ 39, 1, ENC_LITTLE_ENDIAN
);
723 flavour_value
= tvb_get_uint8(tvb
, offset
+ 39);
726 cur_record
= nextrec
;
729 /* Add tcpdebug2 subtree */
730 subitem
= proto_tree_add_item(ns_tree
, hf_ns_trcdbg
, tvb
, offset
, reclen
, ENC_NA
);
731 subtree
= proto_item_add_subtree(subitem
, ett_ns_trcdbg
);
732 app_value
= tvb_get_uint8(tvb
, NSPR_V35_APP_OFFSET
);
733 tcp_mode
= tvb_get_uint32(tvb
, offset
+ 59, ENC_LITTLE_ENDIAN
);
738 case (TRCDBG_DRB
| TRCDBG_PRR
):
742 hf_ns_trcdbg_val1_final
= hf_ns_trcdbg_val1_PRR
;
743 hf_ns_trcdbg_val2_final
= hf_ns_trcdbg_val2_PRR
;
744 hf_ns_trcdbg_val3_final
= hf_ns_trcdbg_val3_PRR
;
745 hf_ns_trcdbg_val4_final
= hf_ns_trcdbg_val4_PRR
;
746 hf_ns_trcdbg_val7_final
= hf_ns_trcdbg_val7_DRB
;
747 hf_ns_trcdbg_val8_final
= hf_ns_trcdbg_val8_DRB
;
748 hf_ns_trcdbg_val9_final
= hf_ns_trcdbg_val9_DRB
;
749 hf_ns_trcdbg_val10_final
= hf_ns_trcdbg_val10_DRB
;
750 hf_ns_trcdbg_val11_final
= hf_ns_trcdbg_val11_DRB
;
751 hf_ns_trcdbg_val13_final
= hf_ns_trcdbg_val13_DRB
;
754 hf_ns_trcdbg_val5_final
= hf_ns_trcdbg_val5_DRB_APP
;
755 hf_ns_trcdbg_val6_final
= hf_ns_trcdbg_val6_DRB_APP
;
756 hf_ns_trcdbg_val7_final
= hf_ns_trcdbg_val7_DRB_APP
;
757 hf_ns_trcdbg_val8_final
= hf_ns_trcdbg_val8_DRB_APP
;
758 hf_ns_trcdbg_val9_final
= hf_ns_trcdbg_val9_DRB
;
759 hf_ns_trcdbg_val10_final
= hf_ns_trcdbg_val10_DRB
;
760 hf_ns_trcdbg_val11_final
= hf_ns_trcdbg_val11_DRB_APP
;
761 hf_ns_trcdbg_val13_final
= hf_ns_trcdbg_val13_DRB
;
764 hf_ns_trcdbg_val7_final
= hf_ns_trcdbg_val7_DRB
;
765 hf_ns_trcdbg_val8_final
= hf_ns_trcdbg_val8_DRB
;
766 hf_ns_trcdbg_val9_final
= hf_ns_trcdbg_val9_DRB
;
767 hf_ns_trcdbg_val10_final
= hf_ns_trcdbg_val10_DRB
;
768 hf_ns_trcdbg_val11_final
= hf_ns_trcdbg_val11_DRB
;
769 hf_ns_trcdbg_val13_final
= hf_ns_trcdbg_val13_DRB
;
773 hf_ns_trcdbg_val1_final
= hf_ns_trcdbg_val1_RTT
;
774 hf_ns_trcdbg_val2_final
= hf_ns_trcdbg_val2_RTT
;
775 hf_ns_trcdbg_val3_final
= hf_ns_trcdbg_val3_RTT
;
776 hf_ns_trcdbg_val4_final
= hf_ns_trcdbg_val4_RTT
;
777 hf_ns_trcdbg_val5_final
= hf_ns_trcdbg_val5_RTT
;
778 hf_ns_trcdbg_val6_final
= hf_ns_trcdbg_val6_RTT
;
779 hf_ns_trcdbg_val11_final
= hf_ns_trcdbg_val11_RTT
;
780 hf_ns_trcdbg_val12_final
= hf_ns_trcdbg_val12_RTT
;
783 hf_ns_trcdbg_val1_final
= hf_ns_trcdbg_val1_BURST
;
784 hf_ns_trcdbg_val11_final
= hf_ns_trcdbg_val11_BURST
;
787 hf_ns_trcdbg_val1_final
= hf_ns_trcdbg_val1_NILE
;
788 hf_ns_trcdbg_val2_final
= hf_ns_trcdbg_val2_NILE
;
789 hf_ns_trcdbg_val3_final
= hf_ns_trcdbg_val3_NILE
;
790 hf_ns_trcdbg_val4_final
= hf_ns_trcdbg_val4_NILE
;
791 hf_ns_trcdbg_val5_final
= hf_ns_trcdbg_val5_NILE
;
792 hf_ns_trcdbg_val6_final
= hf_ns_trcdbg_val6_NILE
;
793 hf_ns_trcdbg_val7_final
= hf_ns_trcdbg_val7_NILE
;
794 hf_ns_trcdbg_val8_final
= hf_ns_trcdbg_val8_NILE
;
795 hf_ns_trcdbg_val9_final
= hf_ns_trcdbg_val9_NILE
;
796 hf_ns_trcdbg_val10_final
= hf_ns_trcdbg_val10_NILE
;
797 hf_ns_trcdbg_val11_final
= hf_ns_trcdbg_val11_NILE
;
798 hf_ns_trcdbg_val12_final
= hf_ns_trcdbg_val12_NILE
;
799 hf_ns_trcdbg_val13_final
= hf_ns_trcdbg_val13_NILE
;
800 hf_ns_trcdbg_val14_final
= hf_ns_trcdbg_val14_NILE
;
805 proto_tree_add_item(subtree
, hf_ns_trcdbg_val1_final
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
806 proto_tree_add_item(subtree
, hf_ns_trcdbg_val2_final
, tvb
, offset
+ 7, 4, ENC_LITTLE_ENDIAN
);
807 proto_tree_add_item(subtree
, hf_ns_trcdbg_val3_final
, tvb
, offset
+ 11, 4, ENC_LITTLE_ENDIAN
);
808 proto_tree_add_item(subtree
, hf_ns_trcdbg_val4_final
, tvb
, offset
+ 15, 4, ENC_LITTLE_ENDIAN
);
809 proto_tree_add_item(subtree
, hf_ns_trcdbg_val5_final
, tvb
, offset
+ 19, 4, ENC_LITTLE_ENDIAN
);
810 proto_tree_add_item(subtree
, hf_ns_trcdbg_val6_final
, tvb
, offset
+ 23, 4, ENC_LITTLE_ENDIAN
);
811 proto_tree_add_item(subtree
, hf_ns_trcdbg_val7_final
, tvb
, offset
+ 27, 4, ENC_LITTLE_ENDIAN
);
812 proto_tree_add_item(subtree
, hf_ns_trcdbg_val8_final
, tvb
, offset
+ 31, 4, ENC_LITTLE_ENDIAN
);
813 proto_tree_add_item(subtree
, hf_ns_trcdbg_val9_final
, tvb
, offset
+ 35, 4, ENC_LITTLE_ENDIAN
);
814 proto_tree_add_item(subtree
, hf_ns_trcdbg_val10_final
, tvb
, offset
+ 39, 4, ENC_LITTLE_ENDIAN
);
815 proto_tree_add_item(subtree
, hf_ns_trcdbg_val11_final
, tvb
, offset
+ 43, 4, ENC_LITTLE_ENDIAN
);
816 proto_tree_add_item(subtree
, hf_ns_trcdbg_val12_final
, tvb
, offset
+ 47, 4, ENC_LITTLE_ENDIAN
);
817 proto_tree_add_item(subtree
, hf_ns_trcdbg_val13_final
, tvb
, offset
+ 51, 4, ENC_LITTLE_ENDIAN
);
818 proto_tree_add_item(subtree
, hf_ns_trcdbg_val14_final
, tvb
, offset
+ 55, 4, ENC_LITTLE_ENDIAN
);
819 proto_tree_add_item(subtree
, hf_ns_trcdbg_val15
, tvb
, offset
+ 59, 4, ENC_LITTLE_ENDIAN
);
822 cur_record
= nextrec
;
825 /* Add httpinfo subtree */
826 subitem
= proto_tree_add_item(ns_tree
, hf_ns_httpInfo
, tvb
, offset
, reclen
, ENC_NA
);
827 subtree
= proto_item_add_subtree(subitem
, ett_ns_httpInfo
);
828 proto_tree_add_item(subtree
, hf_ns_httpInfo_httpabort
, tvb
, offset
+ 3, 1, ENC_LITTLE_ENDIAN
);
831 cur_record
= nextrec
;
834 /* Add tcpcc subtree */
835 subitem
= proto_tree_add_item(ns_tree
, hf_ns_tcpcc
, tvb
, offset
, reclen
, ENC_NA
);
836 subtree
= proto_item_add_subtree(subitem
, ett_ns_tcpcc
);
837 switch (flavour_value
)
840 proto_tree_add_item(subtree
, hf_ns_tcpcc_last_max_cwnd
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
841 proto_tree_add_item(subtree
, hf_ns_tcpcc_loss_cwnd
, tvb
, offset
+ 7, 4, ENC_LITTLE_ENDIAN
);
842 proto_tree_add_item(subtree
, hf_ns_tcpcc_last_time
, tvb
, offset
+ 11, 4, ENC_LITTLE_ENDIAN
);
843 proto_tree_add_item(subtree
, hf_ns_tcpcc_last_cwnd
, tvb
, offset
+ 15, 4, ENC_LITTLE_ENDIAN
);
846 proto_tree_add_item(subtree
, hf_ns_tcpcc_last_cwnd
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
847 proto_tree_add_item(subtree
, hf_ns_tcpcc_last_time
, tvb
, offset
+ 7, 4, ENC_LITTLE_ENDIAN
);
848 proto_tree_add_item(subtree
, hf_ns_tcpcc_last_max_cwnd
, tvb
, offset
+ 11, 4, ENC_LITTLE_ENDIAN
);
849 proto_tree_add_item(subtree
, hf_ns_tcpcc_delay_min
, tvb
, offset
+ 15, 4, ENC_LITTLE_ENDIAN
);
850 proto_tree_add_item(subtree
, hf_ns_tcpcc_ack_cnt
, tvb
, offset
+ 19, 4, ENC_LITTLE_ENDIAN
);
853 proto_tree_add_item(subtree
, hf_ns_tcpcc_alpha
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
854 proto_tree_add_item(subtree
, hf_ns_tcpcc_beta_val
, tvb
, offset
+ 7, 4, ENC_LITTLE_ENDIAN
);
855 proto_tree_add_item(subtree
, hf_ns_tcpcc_rtt_low
, tvb
, offset
+ 11, 4, ENC_LITTLE_ENDIAN
);
856 proto_tree_add_item(subtree
, hf_ns_tcpcc_rtt_above
, tvb
, offset
+ 15, 4, ENC_LITTLE_ENDIAN
);
857 proto_tree_add_item(subtree
, hf_ns_tcpcc_max_rtt
, tvb
, offset
+ 19, 4, ENC_LITTLE_ENDIAN
);
858 proto_tree_add_item(subtree
, hf_ns_tcpcc_base_rtt
, tvb
, offset
+ 23, 4, ENC_LITTLE_ENDIAN
);
860 case NS_TCPCC_WESTWOOD
:
861 proto_tree_add_item(subtree
, hf_ns_tcpcc_rtt_min
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
863 case NS_TCPCC_CUBIC_HYSTART
:
864 proto_tree_add_item(subtree
, hf_ns_tcpcc_last_ack
, tvb
, offset
+ 3, 4, ENC_LITTLE_ENDIAN
);
865 proto_tree_add_item(subtree
, hf_ns_tcpcc_delay_min
, tvb
, offset
+ 7, 4, ENC_LITTLE_ENDIAN
);
866 proto_tree_add_item(subtree
, hf_ns_tcpcc_round_start
, tvb
, offset
+ 11, 4, ENC_LITTLE_ENDIAN
);
867 proto_tree_add_item(subtree
, hf_ns_tcpcc_end_seq
, tvb
, offset
+ 15, 4, ENC_LITTLE_ENDIAN
);
868 proto_tree_add_item(subtree
, hf_ns_tcpcc_curr_rtt
, tvb
, offset
+ 19, 4, ENC_LITTLE_ENDIAN
);
870 case NS_TCPCC_INVALID
:
872 case NS_TCPCC_DEFAULT
:
876 cur_record
= nextrec
;
880 subitem
= proto_tree_add_item(ns_tree
, hf_ns_inforec
, tvb
, offset
, reclen
, ENC_NA
);
881 subtree
= proto_item_add_subtree(subitem
, ett_ns_inforec
);
882 proto_tree_add_item(subtree
, hf_ns_inforec_info
, tvb
, offset
+3, reclen
-3, ENC_ASCII
);
885 cur_record
= nextrec
;
888 subitem
= proto_tree_add_item(ns_tree
, hf_ns_sslrec
, tvb
, offset
, reclen
, ENC_NA
);
889 subtree
= proto_item_add_subtree(subitem
, ett_ns_sslrec
);
890 proto_tree_add_item(subtree
, hf_ns_sslrec_seq
, tvb
, offset
+3, 4, ENC_LITTLE_ENDIAN
);
895 cur_record
= nextrec
;
898 subitem
= proto_tree_add_item(ns_tree
, hf_ns_mptcprec
, tvb
, offset
, reclen
, ENC_NA
);
899 subtree
= proto_item_add_subtree(subitem
, ett_ns_mptcprec
);
900 proto_tree_add_item(subtree
, hf_ns_mptcprec_subflowid
, tvb
, offset
+3, 1, ENC_LITTLE_ENDIAN
);
903 cur_record
= nextrec
;
907 int srcvmnamelen
= tvb_get_uint8(tvb
,offset
+3);
908 int dstvmnamelen
= tvb_get_uint8(tvb
,offset
+4);
909 subitem
= proto_tree_add_item(ns_tree
, hf_ns_vmnamerec
, tvb
, offset
, reclen
, ENC_NA
);
910 subtree
= proto_item_add_subtree(subitem
, ett_ns_vmnamerec
);
911 proto_tree_add_item(subtree
, hf_ns_vmnamerec_srcvmname
, tvb
, offset
+5,
912 srcvmnamelen
, ENC_ASCII
);
913 proto_tree_add_item(subtree
, hf_ns_vmnamerec_dstvmname
, tvb
, offset
+5+srcvmnamelen
,
914 dstvmnamelen
, ENC_ASCII
);
917 cur_record
= nextrec
;
922 subitem
= proto_tree_add_item(ns_tree
, hf_ns_clusterrec
, tvb
, offset
, reclen
, ENC_NA
);
923 subtree
= proto_item_add_subtree(subitem
, ett_ns_clusterrec
);
925 proto_tree_add_item(subtree
, hf_ns_clu_snode
, tvb
, offset
+3, 2, ENC_LITTLE_ENDIAN
);
926 proto_tree_add_item(subtree
, hf_ns_clu_dnode
, tvb
, offset
+5, 2, ENC_LITTLE_ENDIAN
);
928 proto_tree_add_bitmask(subtree
,tvb
, offset
+7,hf_ns_clu_clflags
,ett_ns_flags
,cluster_flags
,ENC_NA
);
930 cur_record
= nextrec
;
934 /* This will end up in an infinite loop if the file is corrupt */
936 subitem
= proto_tree_add_item(ns_tree
, hf_ns_unknownrec
, tvb
, offset
, reclen
, ENC_NA
);
937 subtree
= proto_item_add_subtree(subitem
, ett_ns_unknownrec
);
938 proto_tree_add_item(subtree
, hf_ns_unknowndata
, tvb
, offset
+3, reclen
-3, ENC_NA
);
940 if(cur_record
== UNKNOWN_LAST
){
944 cur_record
= nextrec
;
949 loopcount
< (MAX_UNKNOWNREC_LOOP
) && /* additional checks to prevent infinite loops */
950 offset
<=nsheaderlen
);
954 proto_register_ns(void)
956 static hf_register_info hf
[] = {
959 { "Nic No", "nstrace.nicno",
960 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
965 { "Src Vm Name", "nstrace.src_vm",
966 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
971 { "Dst Vm Name", "nstrace.dst_vm",
972 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
977 { "Core Id", "nstrace.coreid",
978 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
983 { "Operation", "nstrace.dir",
984 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &ns_dir_vals_ext
, 0x0,
989 { "PcbDevNo", "nstrace.pdevno",
990 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
995 { "Linked PcbDevNo", "nstrace.l_pdevno",
996 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1001 { "DevNo", "nstrace.devno",
1002 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1007 { "Vlan", "nstrace.vlan",
1008 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1013 { "Source Node", "nstrace.snode",
1014 FT_INT16
, BASE_DEC
, NULL
, 0x0,
1019 { "Destination Node", "nstrace.dnode",
1020 FT_INT16
, BASE_DEC
, NULL
, 0x0,
1025 { "Cluster Flags", "nstrace.flags",
1026 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1030 { &hf_ns_clflags_res
,
1031 { "Reserved", "nstrace.flags.res",
1032 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_RES
,
1036 { &hf_ns_clflags_rssh
,
1037 { "RSSHASH", "nstrace.flags.rssh",
1038 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_RSSH
,
1042 { &hf_ns_clflags_rss
,
1043 { "SRSS", "nstrace.flags.srss",
1044 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_RSS
,
1048 { &hf_ns_clflags_dfd
,
1049 { "DFD", "nstrace.flags.dfd",
1050 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_DFD
,
1054 { &hf_ns_clflags_fr
,
1055 { "Flow receiver (FR)", "nstrace.flags.fr",
1056 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_FR
,
1060 { &hf_ns_clflags_fp
,
1061 { "Flow processor (FP)", "nstrace.flags.fp",
1062 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_FP
,
1067 { "Activity Flags", "nstrace.activity",
1068 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1072 { &hf_ns_activity_perf_collection
,
1073 { "Perf Collection", "nstrace.activity.perfcollection",
1074 FT_BOOLEAN
, 32, NULL
, NS_PE_STATE_PERF_COLLECTION_IN_PROG
,
1078 { &hf_ns_activity_pcb_zombie
,
1079 { "PCB Zombie", "nstrace.activity.pcbzombie",
1080 FT_BOOLEAN
, 32, NULL
, NS_PE_STATE_PCB_ZOMBIE_IN_PROG
,
1084 { &hf_ns_activity_natpcb_zombie
,
1085 { "NATPCB Zombie", "nstrace.activity.natpcbzombie",
1086 FT_BOOLEAN
, 32, NULL
, NS_PE_STATE_NATPCB_ZOMBIE_IN_PROG
,
1090 { &hf_ns_activity_lbstats_sync
,
1091 { "LB Stats Sync", "nstrace.activity.lbstatssync",
1092 FT_BOOLEAN
, 32, NULL
, NS_PE_STATE_LBSTATS_SYNC_IN_PROG
,
1096 { &hf_ns_activity_stats_req
,
1097 { "Stats Req", "nstrace.activity.statsreq",
1098 FT_BOOLEAN
, 32, NULL
, NS_PE_STATE_STATS_REQ_IN_PROG
,
1103 { "SendCwnd", "nstrace.sndcwnd",
1104 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1108 { &hf_ns_realtime_rtt
,
1109 { "RTT", "nstrace.rtt",
1110 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1115 { "tsRecent", "nstrace.tsrecent",
1116 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1120 { &hf_ns_http_abort_tracking_reason
,
1121 { "httpAbortTrackCode", "nstrace.httpabort",
1122 FT_UINT8
, BASE_DEC
|BASE_EXT_STRING
, &ns_httpabortcode_vals_ext
, 0x0,
1128 { "Capture Flags", "nstrace.capflags",
1129 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1133 { &hf_ns_capflags_dbg
,
1134 { "debug packet", "nstrace.capflags.dbg",
1135 FT_BOOLEAN
, 32, NULL
, NS_CAPFLAG_DBG
,
1139 { &hf_ns_capflags_int
,
1140 { "internal packet", "nstrace.capflags.int",
1141 FT_BOOLEAN
, 32, NULL
, NS_CAPFLAG_INT
,
1145 { &hf_ns_capflags_skipnwhdr
,
1146 { "skip headers", "nstrace.capflags.skipnwhdr",
1147 FT_BOOLEAN
, 32, NULL
, NS_CAPFLAG_SKIPNWHDR
,
1152 { "TCP Debug Info", "nstrace.tcpdbg",
1153 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1157 { &hf_ns_tcpdbg_cwnd
,
1158 { "TcpCwnd", "nstrace.tcpdbg.tcpcwnd",
1159 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1163 { &hf_ns_tcpdbg_rtrtt
,
1164 { "TcpRTT", "nstrace.tcpdbg.rtrtt",
1165 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1169 { &hf_ns_tcpdbg_tsrecent
,
1170 { "TcpTsrecent", "nstrace.tcpdbg.tcptsrecent",
1171 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1175 { &hf_ns_tcpdbg_httpabort
,
1176 { "HTTPabrtReason", "nstrace.tcpdbg.httpabort",
1177 FT_UINT8
, BASE_DEC
, VALS(ns_httpabortcode_vals
), 0x0,
1181 /** Fields of Tcp Debug 2 records**/
1183 { "TCP Debug Info", "nstrace.tcpdbg2",
1184 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1188 { &hf_ns_tcpdbg2_sndCwnd
,
1189 { "SndCwnd", "nstrace.tcpdbg2.sndCwnd",
1190 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1194 { &hf_ns_tcpdbg2_ssthresh
,
1195 { "Ssthresh", "nstrace.tcpdbg2.ssthresh",
1196 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1200 { &hf_ns_tcpdbg2_sndbuf
,
1201 { "MaxSndBuf", "nstrace.tcpdbg2.maxsndbuf",
1202 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1206 { &hf_ns_tcpdbg2_max_rcvbuf
,
1207 { "MaxRcvbuff", "nstrace.tcpdbg2.maxrcvbuff",
1208 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1212 { &hf_ns_tcpdbg2_bw_estimate
,
1213 { "BwEstimate", "nstrace.tcpdbg2.bwEstimate",
1214 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1218 { &hf_ns_tcpdbg2_rtt
,
1219 { "Rtt", "nstrace.tcpdbg2.rtt",
1220 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1224 { &hf_ns_tcpdbg2_tcpos_pktcnt
,
1225 { "Ospckcnt", "nstrace.tcpdbg2.Ospckcnt",
1226 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1230 { &hf_ns_tcpdbg2_ts_recent
,
1231 { "tsRecent", "nstrace.tcpdbg2.tsRecent",
1232 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1236 { &hf_ns_tcpdbg2_tcp_cfgsndbuf
,
1237 { "cfgSndBuf", "nstrace.tcpdbg2.cfgSndBuf",
1238 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1242 { &hf_ns_tcpdbg2_tcp_flvr
,
1243 { "Flavour", "nstrace.tcpdbg2.flavour",
1244 FT_UINT8
, BASE_DEC
, VALS(tcp_dbg2_flavour
), 0x0,
1248 /** Fields for generic trace debug record **/
1250 { "Additional debug", "nstrace.trcdbg",
1251 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1255 { &hf_ns_trcdbg_val1
,
1256 { "val1", "nstrace.trcdbg.val1",
1257 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1261 { &hf_ns_trcdbg_val1_PRR
,
1262 { "bytes_in_flight", "nstrace.trcdbg.val1",
1263 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1267 { &hf_ns_trcdbg_val1_NILE
,
1268 { "Alpha_min", "nstrace.trcdbg.val1",
1269 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1273 { &hf_ns_trcdbg_val1_RTT
,
1274 { "RTT_timems", "nstrace.trcdbg.val1",
1275 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1279 { &hf_ns_trcdbg_val1_BURST
,
1280 { "Rate_bytes_msec", "nstrace.trcdbg.val1",
1281 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1285 { &hf_ns_trcdbg_val2
,
1286 { "val2", "nstrace.trcdbg.val2",
1287 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1291 { &hf_ns_trcdbg_val2_PRR
,
1292 { "Cong_state", "nstrace.trcdbg.val2",
1293 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1297 { &hf_ns_trcdbg_val2_RTT
,
1298 { "real_time_RTT", "nstrace.trcdbg.val2",
1299 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1303 { &hf_ns_trcdbg_val2_NILE
,
1304 { "Alpha_max", "nstrace.trcdbg.val2",
1305 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1309 { &hf_ns_trcdbg_val3
,
1310 { "val3", "nstrace.trcdbg.val3",
1311 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1315 { &hf_ns_trcdbg_val3_PRR
,
1316 { "prr_delivered", "nstrace.trcdbg.val3",
1317 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1321 { &hf_ns_trcdbg_val3_RTT
,
1322 { "rtt_min", "nstrace.trcdbg.val3",
1323 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1327 { &hf_ns_trcdbg_val3_NILE
,
1328 { "nile_da", "nstrace.trcdbg.val3",
1329 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1333 { &hf_ns_trcdbg_val4
,
1334 { "val4", "nstrace.trcdbg.val4",
1335 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1339 { &hf_ns_trcdbg_val4_PRR
,
1340 { "prr_out", "nstrace.trcdbg.val4",
1341 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1345 { &hf_ns_trcdbg_val4_RTT
,
1346 { "ts_ecr", "nstrace.trcdbg.val4",
1347 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1351 { &hf_ns_trcdbg_val4_NILE
,
1352 { "nile_dm", "nstrace.trcdbg.val4",
1353 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1357 { &hf_ns_trcdbg_val5
,
1358 { "val5", "nstrace.trcdbg.val5",
1359 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1363 { &hf_ns_trcdbg_val5_DRB_APP
,
1364 { "RetxQ_bytes", "nstrace.trcdbg.val5",
1365 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1369 { &hf_ns_trcdbg_val5_RTT
,
1370 { "rtt_seq", "nstrace.trcdbg.val5",
1371 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1375 { &hf_ns_trcdbg_val5_NILE
,
1376 { "d1_percent", "nstrace.trcdbg.val5",
1377 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1382 { &hf_ns_trcdbg_val6
,
1383 { "val6", "nstrace.trcdbg.val6",
1384 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1388 { &hf_ns_trcdbg_val6_DRB_APP
,
1389 { "waitQ_bytes", "nstrace.trcdbg.val6",
1390 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1394 { &hf_ns_trcdbg_val6_RTT
,
1395 { "cong_state", "nstrace.trcdbg.val6",
1396 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1400 { &hf_ns_trcdbg_val6_NILE
,
1401 { "d2_percent", "nstrace.trcdbg.val6",
1402 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1406 { &hf_ns_trcdbg_val7
,
1407 { "val7", "nstrace.trcdbg.val7",
1408 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1412 { &hf_ns_trcdbg_val7_DRB
,
1413 { "adv_wnd", "nstrace.trcdbg.val7",
1414 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1418 { &hf_ns_trcdbg_val7_DRB_APP
,
1419 { "link_adv_wnd", "nstrace.trcdbg.val7",
1420 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1424 { &hf_ns_trcdbg_val7_NILE
,
1425 { "d3_percent", "nstrace.trcdbg.val7",
1426 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1430 { &hf_ns_trcdbg_val8
,
1431 { "val8", "nstrace.trcdbg.val8",
1432 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1436 { &hf_ns_trcdbg_val8_DRB
,
1437 { "link_snd_cwnd", "nstrace.trcdbg.val8",
1438 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1442 { &hf_ns_trcdbg_val8_DRB_APP
,
1443 { "snd_cwnd", "nstrace.trcdbg.val8",
1444 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1448 { &hf_ns_trcdbg_val8_NILE
,
1449 { "nile_d1", "nstrace.trcdbg.val8",
1450 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1454 { &hf_ns_trcdbg_val9
,
1455 { "val9", "nstrace.trcdbg.val9",
1456 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1460 { &hf_ns_trcdbg_val9_DRB
,
1461 { "cong_state", "nstrace.trcdbg.val9",
1462 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1466 { &hf_ns_trcdbg_val9_NILE
,
1467 { "nile_d2", "nstrace.trcdbg.val9",
1468 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1472 { &hf_ns_trcdbg_val10
,
1473 { "val10", "nstrace.trcdbg.val10",
1474 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1478 { &hf_ns_trcdbg_val10_DRB
,
1479 { "target_wnd", "nstrace.trcdbg.val10",
1480 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1484 { &hf_ns_trcdbg_val10_NILE
,
1485 { "nile_d3", "nstrace.trcdbg.val10",
1486 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1490 { &hf_ns_trcdbg_val11
,
1491 { "val11", "nstrace.trcdbg.val11",
1492 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1496 { &hf_ns_trcdbg_val11_DRB
,
1497 { "delta_rcvbuf", "nstrace.trcdbg.val11",
1498 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1502 { &hf_ns_trcdbg_val11_DRB_APP
,
1503 { "link_delta_rcvbuf", "nstrace.trcdbg.val11",
1504 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1508 { &hf_ns_trcdbg_val11_NILE
,
1509 { "beta_min", "nstrace.trcdbg.val11",
1510 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1514 { &hf_ns_trcdbg_val11_RTT
,
1515 { "rtt_smoothed", "nstrace.trcdbg.val11",
1516 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1520 { &hf_ns_trcdbg_val11_BURST
,
1521 { "rate_data_credit", "nstrace.trcdbg.val11",
1522 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1526 { &hf_ns_trcdbg_val12
,
1527 { "val12", "nstrace.trcdbg.val12",
1528 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1532 { &hf_ns_trcdbg_val12_RTT
,
1533 { "rtt_variance", "nstrace.trcdbg.val12",
1534 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1538 { &hf_ns_trcdbg_val12_NILE
,
1539 { "beta_min", "nstrace.trcdbg.val12",
1540 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1544 { &hf_ns_trcdbg_val13
,
1545 { "val13", "nstrace.trcdbg.val13",
1546 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1550 { &hf_ns_trcdbg_val13_DRB
,
1551 { "cmpr_advWnd_trgt", "nstrace.trcdbg.val13",
1552 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1556 { &hf_ns_trcdbg_val13_NILE
,
1557 { "rtt_factor", "nstrace.trcdbg.val13",
1558 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1562 { &hf_ns_trcdbg_val14
,
1563 { "val14", "nstrace.trcdbg.val14",
1564 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1568 { &hf_ns_trcdbg_val14_NILE
,
1569 { "rtt_filter", "nstrace.trcdbg.val14",
1570 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1574 { &hf_ns_trcdbg_val15
,
1575 { "val15", "nstrace.trcdbg.val15",
1576 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1580 /** Fields of httpInfo **/
1582 { "HTTPInfo", "nstrace.httpInfo",
1583 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1587 { &hf_ns_httpInfo_httpabort
,
1588 { "HTTPabortReason", "nstrace.httpInfo.httpabort",
1589 FT_UINT8
, BASE_DEC
, VALS(ns_httpabortcode_vals
), 0x0,
1593 /** Fields of Tcp CC Records **/
1595 { "TcpCC", "nstrace.tcpcc",
1596 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1600 { &hf_ns_tcpcc_last_max_cwnd
,
1601 { "Last_max_cwnd", "nstrace.tcpcc.lastmaxcwnd",
1602 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1605 { &hf_ns_tcpcc_loss_cwnd
,
1606 { "Loss_cwnd", "nstrace.tcpcc.losscwnd",
1607 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1611 { &hf_ns_tcpcc_last_time
,
1612 { "Last_time", "nstrace.tcpcc.lasttime",
1613 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1617 { &hf_ns_tcpcc_last_cwnd
,
1618 { "Last_cwnd", "nstrace.tcpcc.lastcwnd",
1619 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1623 { &hf_ns_tcpcc_delay_min
,
1624 { "Delay_min", "nstrace.tcpcc.delaymin",
1625 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1629 { &hf_ns_tcpcc_ack_cnt
,
1630 { "Ack_cnt", "nstrace.tcpcc.ackcnt",
1631 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1635 { &hf_ns_tcpcc_last_ack
,
1636 { "Last_ack", "nstrace.tcpcc.lastack",
1637 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1641 { &hf_ns_tcpcc_round_start
,
1642 { "Round_start", "nstrace.tcpcc.roundstart",
1643 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1647 { &hf_ns_tcpcc_end_seq
,
1648 { "End_seq", "nstrace.tcpcc.endseq",
1649 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1653 { &hf_ns_tcpcc_curr_rtt
,
1654 { "Curr_rtt", "nstrace.tcpcc.currrtt",
1655 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1659 { &hf_ns_tcpcc_rtt_min
,
1660 { "Rtt_min", "nstrace.tcpcc.rttmin",
1661 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1665 { &hf_ns_tcpcc_alpha
,
1666 { "Alpha", "nstrace.tcpcc.alpha",
1667 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1671 { &hf_ns_tcpcc_beta_val
,
1672 { "Beta_val", "nstrace.tcpcc.betaval",
1673 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1677 { &hf_ns_tcpcc_rtt_low
,
1678 { "Rtt_low", "nstrace.tcpcc.rttlow",
1679 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1683 { &hf_ns_tcpcc_rtt_above
,
1684 { "Rtt_above", "nstrace.tcpcc.rttabove",
1685 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1689 { &hf_ns_tcpcc_max_rtt
,
1690 { "Max_rtt", "nstrace.tcpcc.maxrtt",
1691 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1695 { &hf_ns_tcpcc_base_rtt
,
1696 { "Base_rtt", "nstrace.tcpcc.basertt",
1697 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1701 { &hf_ns_unknownrec
,
1702 { "unknown ns record", "nstrace.unknown",
1703 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1707 { &hf_ns_unknowndata
,
1708 { "data", "nstrace.unknown.data",
1709 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1714 { "info record", "nstrace.inforec",
1715 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1719 { &hf_ns_inforec_info
,
1720 { "info", "nstrace.inforec.info",
1721 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1726 { "ssl record", "nstrace.sslrec",
1727 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1731 { &hf_ns_sslrec_seq
,
1732 { "SSL record seq no", "nstrace.sslrec.seq",
1733 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1738 { "mptcp record", "nstrace.mptcp",
1739 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1743 { &hf_ns_mptcprec_subflowid
,
1744 { "MPTCP subflow id", "nstrace.sslrec.subflow",
1745 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1750 { "vmname record", "nstrace.vmnames",
1751 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1755 { &hf_ns_vmnamerec_srcvmname
,
1756 { "SrcVmName", "nstrace.vmnames.srcvmname",
1757 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1761 { &hf_ns_vmnamerec_dstvmname
,
1762 { "DstVmName", "nstrace.vmnames.dstvmnames",
1763 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1767 { &hf_ns_clusterrec
,
1768 { "cluster record", "nstrace.cluster",
1769 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1774 { "Source Node", "nstrace.cluster.snode",
1775 FT_INT16
, BASE_DEC
, NULL
, 0x0,
1780 { "Destination Node", "nstrace.cluster.dnode",
1781 FT_INT16
, BASE_DEC
, NULL
, 0x0,
1784 { &hf_ns_clu_clflags
,
1785 { "Cluster Flags", "nstrace.cluster.flags",
1786 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
1790 { &hf_ns_clu_clflags_res
,
1791 { "Reserved", "nstrace.cluster.flags.res",
1792 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_RES
,
1796 { &hf_ns_clu_clflags_rssh
,
1797 { "RSSHASH", "nstrace.cluster.flags.rssh",
1798 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_RSSH
,
1802 { &hf_ns_clu_clflags_rss
,
1803 { "SRSS", "nstrace.cluster.flags.srss",
1804 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_RSS
,
1808 { &hf_ns_clu_clflags_dfd
,
1809 { "DFD", "nstrace.cluster.flags.dfd",
1810 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_DFD
,
1814 { &hf_ns_clu_clflags_fr
,
1815 { "Flow receiver (FR)", "nstrace.cluster.flags.fr",
1816 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_FR
,
1820 { &hf_ns_clu_clflags_fp
,
1821 { "Flow processor (FP)", "nstrace.cluster.flags.fp",
1822 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), CL_FP
,
1827 { "Errorcode", "nstrace.err",
1828 FT_UINT8
, BASE_HEX
, VALS(ns_errorcode_vals
), 0x0,
1833 { "App", "nstrace.app",
1834 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &ns_app_vals_ext
, 0x0,
1840 static int *ett
[] = {
1843 &ett_ns_activity_flags
,
1853 &ett_ns_clu_clflags
,
1859 proto_nstrace
= proto_register_protocol("NetScaler Trace", "NS Trace", "ns");
1860 proto_register_field_array(proto_nstrace
, hf
, array_length(hf
));
1861 proto_register_subtree_array(ett
, array_length(ett
));
1863 nstrace_handle
= register_dissector("ns", dissect_nstrace
, proto_nstrace
);
1867 void proto_reg_handoff_ns(void)
1869 eth_withoutfcs_handle
= find_dissector_add_dependency("eth_withoutfcs", proto_nstrace
);
1870 http_handle
= find_dissector_add_dependency("http", proto_nstrace
);
1872 dissector_add_uint("wtap_encap", WTAP_ENCAP_NSTRACE_1_0
, nstrace_handle
);
1873 dissector_add_uint("wtap_encap", WTAP_ENCAP_NSTRACE_2_0
, nstrace_handle
);
1874 dissector_add_uint("wtap_encap", WTAP_ENCAP_NSTRACE_3_0
, nstrace_handle
);
1875 dissector_add_uint("wtap_encap", WTAP_ENCAP_NSTRACE_3_5
, nstrace_handle
);
1879 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1884 * indent-tabs-mode: t
1887 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1888 * :indentSize=8:tabSize=8:noTabs=false: