2 * Routines for WaveAgent dissection
3 * Copyright 2009-2011, Tom Cook <tcook@ixiacom.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
14 #include <epan/packet.h>
15 #define ETHERNET_INTERFACE 1
16 #define WLAN_INTERFACE 2
21 #define NUM_STATE_CHANGES 8
25 #define WA_V2_PAYLOAD_OFFSET 40
26 #define WA_V3_PAYLOAD_OFFSET 44
28 void proto_register_waveagent(void);
29 void proto_reg_handoff_waveagent(void);
31 /* Initialize the protocol and registered fields */
32 static int proto_waveagent
;
33 static int hf_waveagent_controlword
;
34 static int hf_waveagent_payloadlen
;
35 static int hf_waveagent_transnum
;
36 static int hf_waveagent_rtoken
;
37 static int hf_waveagent_flowid
;
38 static int hf_waveagent_capstatus
;
39 static int hf_waveagent_protocolversion
;
40 static int hf_waveagent_capimpl
;
41 static int hf_waveagent_id
;
42 static int hf_waveagent_bindtag
;
43 static int hf_waveagent_version
;
44 static int hf_waveagent_brokerip
;
45 static int hf_waveagent_brokerport
;
46 static int hf_waveagent_bindlevel
;
47 static int hf_waveagent_bindport
;
48 static int hf_waveagent_numinterfaces
;
49 static int hf_waveagent_capabilities2
;
50 static int hf_waveagent_ifmask
;
51 static int hf_waveagent_commandstatus
;
52 static int hf_waveagent_syserrno
;
53 static int hf_waveagent_statusstring
;
54 static int hf_waveagent_rxdatapckts
;
55 static int hf_waveagent_rxdatabytes
;
56 static int hf_waveagent_rxpcktrate
;
57 static int hf_waveagent_rxbyterate
;
58 static int hf_waveagent_txdatapckts
;
59 static int hf_waveagent_txdatabytes
;
60 static int hf_waveagent_txpcktrate
;
61 static int hf_waveagent_txbyterate
;
62 static int hf_waveagent_looppckts
;
63 static int hf_waveagent_loopbytes
;
64 static int hf_waveagent_rxctlpckts
;
65 static int hf_waveagent_rxctlbytes
;
66 static int hf_waveagent_txctlpckts
;
67 static int hf_waveagent_txctlbytes
;
68 static int hf_waveagent_unknowncmds
;
69 static int hf_waveagent_snap
;
70 static int hf_waveagent_state
;
71 static int hf_waveagent_appstate
;
72 static int hf_waveagent_rx1pl
;
73 static int hf_waveagent_rx2pl
;
74 static int hf_waveagent_rx3pl
;
75 static int hf_waveagent_rx4pl
;
76 static int hf_waveagent_rx5pl
;
77 static int hf_waveagent_rxoospkts
;
78 /* static int hf_waveagent_rxmeanlatency; */
79 /* static int hf_waveagent_rxminlatency; */
80 /* static int hf_waveagent_rxmaxlatency; */
81 static int hf_waveagent_latencysum
;
82 static int hf_waveagent_latencycount
;
83 static int hf_waveagent_txflowstop
;
84 static int hf_waveagent_jitter
;
85 static int hf_waveagent_remoteport
;
86 static int hf_waveagent_remoteaddr
;
87 static int hf_waveagent_dscp
;
88 static int hf_waveagent_fsflags
;
89 static int hf_waveagent_fscbrflag
;
90 static int hf_waveagent_fscombinedsetupflag
;
91 /* static int hf_waveagent_totalbytes; */
92 static int hf_waveagent_payfill
;
93 static int hf_waveagent_paysize
;
94 static int hf_waveagent_avgrate
;
95 static int hf_waveagent_rxflownum
;
96 static int hf_waveagent_mode
;
97 static int hf_waveagent_endpointtype
;
98 static int hf_waveagent_totalframes
;
99 static int hf_waveagent_bssidstartindex
;
100 static int hf_waveagent_bssidstopindex
;
101 static int hf_waveagent_ifindex
;
102 static int hf_waveagent_iftype
;
103 static int hf_waveagent_ifdescription
;
104 static int hf_waveagent_ifmacaddr
;
105 static int hf_waveagent_iflinkspeed
;
106 static int hf_waveagent_ifdhcp
;
107 static int hf_waveagent_ifwlanbssid
;
108 static int hf_waveagent_ifwlanssid
;
109 static int hf_waveagent_ifiptype
;
110 static int hf_waveagent_ifipv4
;
111 static int hf_waveagent_ifipv6
;
112 static int hf_waveagent_ifdhcpserver
;
113 static int hf_waveagent_ifgateway
;
114 static int hf_waveagent_ifdnsserver
;
115 static int hf_waveagent_ifethl2status
;
116 static int hf_waveagent_ifwlanl2status
;
117 static int hf_waveagent_ifl3status
;
118 static int hf_waveagent_totalbssid
;
119 static int hf_waveagent_returnedbssid
;
120 static int hf_waveagent_scanbssid
;
121 static int hf_waveagent_scanssid
;
122 static int hf_waveagent_ifwlanrssi
;
123 static int hf_waveagent_ifwlansupprates
;
124 static int hf_waveagent_ifwlancapabilities
;
125 static int hf_waveagent_ifwlanchannel
;
126 static int hf_waveagent_ifwlanprivacy
;
127 static int hf_waveagent_ifwlanbssmode
;
128 static int hf_waveagent_ifwlannoise
;
129 static int hf_waveagent_ifphytypes
;
130 static int hf_waveagent_ifphytypebit0
;
131 static int hf_waveagent_ifphytypebit1
;
132 static int hf_waveagent_ifphytypebit2
;
133 static int hf_waveagent_ifphytypebit3
;
134 /* static int hf_waveagent_ifphytypebit4; */
135 static int hf_waveagent_ifwlanauthentication
;
136 static int hf_waveagent_ifwlancipher
;
137 static int hf_waveagent_delayfactor
;
138 static int hf_waveagent_medialossrate
;
139 static int hf_waveagent_txstartts
;
140 static int hf_waveagent_txendts
;
141 static int hf_waveagent_rxstartts
;
142 static int hf_waveagent_rxendts
;
143 static int hf_waveagent_oidcode
;
144 static int hf_waveagent_oidvalue
;
145 static int hf_waveagent_destip
;
146 static int hf_waveagent_destport
;
147 static int hf_waveagent_connectflags
;
148 static int hf_waveagent_connecttype
;
149 static int hf_waveagent_minrssi
;
150 static int hf_waveagent_connecttimeout
;
151 static int hf_waveagent_connectattempts
;
152 static int hf_waveagent_reason
;
153 static int hf_waveagent_sigsequencenum
;
154 static int hf_waveagent_relaydestid
;
155 static int hf_waveagent_relaysrcid
;
156 static int hf_waveagent_relaymessagest
;
158 /* Initialize the subtree pointers */
159 static int ett_waveagent
;
160 static int ett_statechange
;
161 static int ett_phytypes
;
162 static int ett_fsflags
;
163 static int ett_scindex
[8]; /* NUM_STATE_CHANGES */
164 static int ett_bss
[8]; /* NUM_BSS */
165 static int ett_relaymessage
;
168 static const value_string control_words
[] = {
169 { 0x01, "Receive, Count, Discard"},
170 { 0x02, "Receive, Count, Loopback"},
171 { 0x03, "Receive, Count, Push timestamp, Discard"},
172 { 0x04, "Receive, Count, Push timestamp, Loopback"},
174 { 0x11, "Start Flow"},
175 { 0x12, "Stop Flow"},
176 { 0x20, "Stats Reset"},
177 { 0x21, "Stats Request"},
178 { 0x22, "Flow Stats Reset"},
179 { 0x23, "Scan Results Request"},
180 { 0x24, "Interface Info Request"},
181 { 0x25, "Interface Change Info Request"},
182 { 0x26, "OID Request"},
183 { 0x2e, "Scan Results Response"},
184 { 0x2f, "Stats Response"},
185 { 0x30, "Interface Info Response"},
186 { 0x31, "Interface Change Info Response"},
187 { 0x32, "OID Response"}, /* XXX: is this correct ? entry originally located after 0x41 */
188 { 0x3e, "Relay Message"},
189 { 0x3f, "Relay Response"},
190 { 0x40, "Client Connect Request"},
191 { 0x41, "Client Disconnect Request"},
192 { 0x80, "Capabilities Request"},
193 { 0x81, "Capabilities Response"},
194 { 0x82, "Reserve Request"},
195 { 0x84, "Release Request"},
196 { 0x85, "Flow Setup"},
197 { 0x86, "Flow Destroy"},
198 { 0x87, "Flow Connect"},
199 { 0x88, "Flow Disconnect"},
200 { 0x89, "Flow Listen"},
201 { 0x8a, "Scan Request"},
202 { 0x8b, "Learning Message"},
203 { 0x8f, "Command Response"},
206 static value_string_ext control_words_ext
= VALUE_STRING_EXT_INIT(control_words
);
208 /* Dissects the WLAN interface stats structure */
209 static void dissect_wlan_if_stats(uint32_t starting_offset
, proto_item
*parent_tree
, tvbuff_t
*tvb
)
211 proto_item
*phy_types
;
212 proto_tree
*phy_types_tree
;
213 uint32_t phy_types_bitfield
, noise_floor
;
215 proto_tree_add_item(parent_tree
,
216 hf_waveagent_ifwlanbssid
, tvb
, starting_offset
, 6, ENC_NA
);
218 /* two bytes of pad go here */
220 proto_tree_add_item(parent_tree
,
221 hf_waveagent_ifwlanssid
, tvb
, starting_offset
+ 8, 32, ENC_ASCII
);
223 /* 4 byte SSID length field not reported */
225 proto_tree_add_item(parent_tree
,
226 hf_waveagent_ifwlanrssi
, tvb
, starting_offset
+ 44, 4, ENC_BIG_ENDIAN
);
228 noise_floor
= tvb_get_ntohl(tvb
, starting_offset
+ 48);
230 if (noise_floor
!= 0x7fffffff) {
231 proto_tree_add_item(parent_tree
,
232 hf_waveagent_ifwlannoise
, tvb
, starting_offset
+ 48, 4, ENC_BIG_ENDIAN
);
235 proto_tree_add_int_format_value(parent_tree
,
236 hf_waveagent_ifwlannoise
, tvb
, starting_offset
+ 48, 4, noise_floor
,
240 phy_types_bitfield
= tvb_get_ntohl(tvb
, starting_offset
+ 52);
242 phy_types
= proto_tree_add_uint(parent_tree
, hf_waveagent_ifphytypes
,
243 tvb
, starting_offset
+ 52, 4, phy_types_bitfield
);
245 phy_types_tree
= proto_item_add_subtree(phy_types
, ett_phytypes
);
247 proto_tree_add_item(phy_types_tree
,
248 hf_waveagent_ifphytypebit0
, tvb
, starting_offset
+ 55, 1, ENC_LITTLE_ENDIAN
);
250 proto_tree_add_item(phy_types_tree
,
251 hf_waveagent_ifphytypebit1
, tvb
, starting_offset
+ 55, 1, ENC_LITTLE_ENDIAN
);
253 proto_tree_add_item(phy_types_tree
,
254 hf_waveagent_ifphytypebit2
, tvb
, starting_offset
+ 55, 1, ENC_LITTLE_ENDIAN
);
256 proto_tree_add_item(phy_types_tree
,
257 hf_waveagent_ifphytypebit3
, tvb
, starting_offset
+ 55, 1, ENC_LITTLE_ENDIAN
);
259 proto_tree_add_item(parent_tree
,
260 hf_waveagent_ifwlanauthentication
, tvb
, starting_offset
+ 56, 4, ENC_BIG_ENDIAN
);
262 proto_tree_add_item(parent_tree
,
263 hf_waveagent_ifwlancipher
, tvb
, starting_offset
+ 60, 4, ENC_BIG_ENDIAN
);
266 static void dissect_wa_payload(uint32_t starting_offset
, proto_item
*parent_tree
, tvbuff_t
*tvb
, uint32_t control_word
, uint8_t version
)
268 switch (control_word
)
270 case 0x11: /* Flow start message */
271 proto_tree_add_item(parent_tree
,
272 hf_waveagent_payfill
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
274 proto_tree_add_item(parent_tree
,
275 hf_waveagent_paysize
, tvb
, starting_offset
+4, 4, ENC_BIG_ENDIAN
);
277 proto_tree_add_item(parent_tree
,
278 hf_waveagent_avgrate
, tvb
, starting_offset
+8, 4, ENC_BIG_ENDIAN
);
280 proto_tree_add_item(parent_tree
,
281 hf_waveagent_totalframes
, tvb
, starting_offset
+12, 4, ENC_BIG_ENDIAN
);
285 case 0x23: /* Scan results request */
286 proto_tree_add_item(parent_tree
,
287 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
289 proto_tree_add_item(parent_tree
,
290 hf_waveagent_bssidstartindex
, tvb
, starting_offset
+4, 4, ENC_BIG_ENDIAN
);
292 proto_tree_add_item(parent_tree
,
293 hf_waveagent_bssidstopindex
, tvb
, starting_offset
+8, 4, ENC_BIG_ENDIAN
);
297 case 0x24: /* Interface info request */
298 case 0x25: /* Interface change info request */
299 case 0x8a: /* Scan request */
300 proto_tree_add_item(parent_tree
,
301 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
305 case 0x26: /* OID request */
306 proto_tree_add_item(parent_tree
,
307 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
309 proto_tree_add_item(parent_tree
,
310 hf_waveagent_oidcode
, tvb
, starting_offset
+4, 4, ENC_BIG_ENDIAN
);
314 case 0x30: { /* Interface stats response */
317 proto_tree_add_item(parent_tree
,
318 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
320 if_type
= tvb_get_ntohl(tvb
, starting_offset
+ 4);
322 proto_tree_add_item(parent_tree
,
323 hf_waveagent_iftype
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
325 proto_tree_add_item(parent_tree
,
326 hf_waveagent_ifdhcp
, tvb
, starting_offset
+ 8, 4, ENC_BIG_ENDIAN
);
328 proto_tree_add_item(parent_tree
,
329 hf_waveagent_ifmacaddr
, tvb
, starting_offset
+ 12, 6, ENC_NA
);
331 /* 2 bytes of pad go here */
333 proto_tree_add_item(parent_tree
,
334 hf_waveagent_iflinkspeed
, tvb
, starting_offset
+ 20, 4, ENC_BIG_ENDIAN
);
336 proto_tree_add_item(parent_tree
,
337 hf_waveagent_ifdescription
, tvb
, starting_offset
+ 24, 128, ENC_ASCII
);
339 /* 4 byte length field goes here - skip it */
341 /* two bytes of pad go here */
343 /* If we have WLAN interface, then report the following */
344 if (if_type
== WLAN_INTERFACE
)
345 dissect_wlan_if_stats(starting_offset
+ 156, parent_tree
, tvb
);
347 /* Next come the BindingAddress fields (for each address):
348 2 bytes: IP type (v4 or v6)
349 2 bytes: address length
350 4 bytes: service number (not used)
351 16 bytes: IP address */
353 /* for the bound IP address, report both IP type and address */
355 proto_tree_add_item(parent_tree
,
356 hf_waveagent_ifiptype
, tvb
, starting_offset
+ 252, 2, ENC_BIG_ENDIAN
);
358 if (tvb_get_ntohs(tvb
, starting_offset
+ 252) == IPV4_TYPE
) {
359 proto_tree_add_item(parent_tree
,
360 hf_waveagent_ifipv4
, tvb
, starting_offset
+ 260, 4, ENC_BIG_ENDIAN
); /* grab the last 4 bytes of the IP address field */
363 proto_tree_add_item(parent_tree
,
364 hf_waveagent_ifipv6
, tvb
, starting_offset
+ 260, 16, ENC_NA
);
367 proto_tree_add_item(parent_tree
,
368 hf_waveagent_ifdhcpserver
, tvb
, starting_offset
+ 284, 4, ENC_BIG_ENDIAN
);
370 proto_tree_add_item(parent_tree
,
371 hf_waveagent_ifgateway
, tvb
, starting_offset
+ 308, 4, ENC_BIG_ENDIAN
);
373 proto_tree_add_item(parent_tree
,
374 hf_waveagent_ifdnsserver
, tvb
, starting_offset
+ 332, 4, ENC_BIG_ENDIAN
);
379 case 0x31: { /* Interface change info response */
385 proto_tree_add_item(parent_tree
,
386 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
388 if_type
= tvb_get_ntohl(tvb
, starting_offset
+ 4);
390 proto_tree_add_item(parent_tree
,
391 hf_waveagent_iftype
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
393 offset
= starting_offset
+ 8;
396 for (iLoop
= 0; iLoop
< NUM_STATE_CHANGES
; iLoop
++) {
398 proto_tree
*st_change_index_tree
;
402 current_offset
= offset
+ iLoop
* delta
;
404 /* Check to see if the interface entry is valid */
405 if_status
= tvb_get_ntohl(tvb
, current_offset
);
406 if (if_status
== 0) continue; /* No entry at this index, keep going */
408 /* Add index specific trees to hide the details */
409 stIndex
= proto_tree_add_uint_format_value(parent_tree
,
410 hf_waveagent_ifwlanl2status
, tvb
, current_offset
, 4, if_status
, "Interface state change %d", iLoop
);
412 st_change_index_tree
= proto_item_add_subtree(stIndex
, ett_scindex
[iLoop
]);
414 if (if_type
== WLAN_INTERFACE
) {
415 proto_tree_add_item(st_change_index_tree
,
416 hf_waveagent_ifwlanl2status
, tvb
, current_offset
, 4, ENC_BIG_ENDIAN
);
418 proto_tree_add_item(st_change_index_tree
,
419 hf_waveagent_ifethl2status
, tvb
, current_offset
, 4, ENC_BIG_ENDIAN
);
422 proto_tree_add_item(st_change_index_tree
,
423 hf_waveagent_ifl3status
, tvb
, current_offset
+ 4, 4, ENC_BIG_ENDIAN
);
425 proto_tree_add_item(st_change_index_tree
,
426 hf_waveagent_iflinkspeed
, tvb
, current_offset
+ 8, 4, ENC_BIG_ENDIAN
);
428 if (if_type
== WLAN_INTERFACE
) {
429 dissect_wlan_if_stats(current_offset
+ 12, st_change_index_tree
, tvb
);
432 proto_tree_add_item(st_change_index_tree
,
433 hf_waveagent_snap
, tvb
, current_offset
+ 108, 8, ENC_BIG_ENDIAN
);
435 proto_tree_add_item(st_change_index_tree
,
436 hf_waveagent_ifiptype
, tvb
, current_offset
+ 116, 2, ENC_BIG_ENDIAN
);
438 if (tvb_get_ntohs(tvb
, current_offset
+ 116) == IPV4_TYPE
) {
439 proto_tree_add_item(st_change_index_tree
,
440 hf_waveagent_ifipv4
, tvb
, current_offset
+ 124, 4, ENC_BIG_ENDIAN
); /* grab the last 4 bytes of the IP address field */
443 proto_tree_add_item(st_change_index_tree
,
444 hf_waveagent_ifipv6
, tvb
, current_offset
+ 124, 16, ENC_NA
);
447 /* 16 bytes of padding */
453 case 0x32: /* OID response */
454 proto_tree_add_item(parent_tree
,
455 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
457 proto_tree_add_item(parent_tree
,
458 hf_waveagent_oidcode
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
460 proto_tree_add_item(parent_tree
,
461 hf_waveagent_oidvalue
, tvb
, starting_offset
+ 12, 1024, ENC_ASCII
);
465 case 0x2e: { /* scan results response message */
468 uint32_t num_bss_entries
;
474 proto_tree_add_item(parent_tree
,
475 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
478 proto_tree_add_item(parent_tree
,
479 hf_waveagent_totalbssid
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
481 pi
= proto_tree_add_item(parent_tree
,
482 hf_waveagent_returnedbssid
, tvb
, starting_offset
+ 8, 4, ENC_BIG_ENDIAN
);
484 num_bss_entries
= tvb_get_ntohl(tvb
, starting_offset
+ 8);
486 if (num_bss_entries
> NUM_BSS
) {
487 proto_item_append_text(pi
, " [**Too large: Limiting to " G_STRINGIFY(NUM_BSS
) "]");
488 num_bss_entries
= NUM_BSS
;
490 /* Add 4 bytes of pad for the offset */
492 offset
= starting_offset
+ 16;
495 sb
= wmem_strbuf_new_sized(wmem_packet_scope(), 8);
497 for (iLoop
= 0; iLoop
< num_bss_entries
; iLoop
++)
499 proto_item
*bssIndex
;
500 proto_tree
*bss_tree
;
503 wmem_strbuf_truncate(sb
, 0);
505 current_offset
= offset
+ iLoop
* delta
;
507 bssIndex
= proto_tree_add_item(parent_tree
,
508 hf_waveagent_scanssid
, tvb
, current_offset
, 32, ENC_ASCII
);
510 bss_tree
= proto_item_add_subtree(bssIndex
, ett_bss
[iLoop
]);
512 tag_len
= tvb_get_ntohl(tvb
, current_offset
+ 52);
518 for (isr
= 0; isr
< tag_len
; isr
++) {
519 isr_value
= tvb_get_uint8(tvb
, offset
+ 36 + isr
);
520 if (isr_value
== 0xFF){
521 proto_tree_add_string (bss_tree
, hf_waveagent_ifwlansupprates
, tvb
, offset
+ 36 + isr
,
523 "BSS requires support for mandatory features of HT PHY (IEEE 802.11"
526 wmem_strbuf_append_printf(sb
, "%2.1f%s ",
527 (isr_value
& 0x7F) * 0.5,
528 (isr_value
& 0x80) ? "(B)" : "");
532 wmem_strbuf_append(sb
, " [Mbit/sec]");
535 wmem_strbuf_append(sb
, "Not defined");
538 proto_tree_add_string (bss_tree
, hf_waveagent_ifwlansupprates
, tvb
, offset
+ 36,
539 tag_len
, wmem_strbuf_get_str(sb
));
541 proto_tree_add_item(bss_tree
,
542 hf_waveagent_scanbssid
, tvb
, current_offset
+ 56, 6, ENC_NA
);
544 proto_tree_add_item(bss_tree
,
545 hf_waveagent_ifwlancapabilities
, tvb
, current_offset
+ 62, 2, ENC_BIG_ENDIAN
);
547 proto_tree_add_item(bss_tree
,
548 hf_waveagent_ifwlanrssi
, tvb
, current_offset
+ 64, 4, ENC_BIG_ENDIAN
);
550 /* For now this is just a 4 byte pad, so comment it out... */
552 proto_tree_add_item(bss_tree
,
553 hf_waveagent_ifwlansigquality
, tvb
, current_offset
+ 68, 4, ENC_BIG_ENDIAN
);
555 proto_tree_add_item(bss_tree
,
556 hf_waveagent_ifwlanchannel
, tvb
, current_offset
+ 72, 4, ENC_BIG_ENDIAN
);
558 proto_tree_add_item(bss_tree
,
559 hf_waveagent_ifwlanprivacy
, tvb
, current_offset
+ 76, 4, ENC_BIG_ENDIAN
);
561 proto_tree_add_item(bss_tree
,
562 hf_waveagent_ifwlanbssmode
, tvb
, current_offset
+ 80, 4, ENC_BIG_ENDIAN
);
567 case 0x2f: /* Stats response message */
569 /* For version 2 WA protocol the capability status is not in the header but in the CAP
570 RESPONSE. Need to read it here and then advance the payload offset. This is a
571 packet that had a structure change in the beginning of the packet when moving
573 proto_tree_add_item(parent_tree
,
574 hf_waveagent_capstatus
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
576 proto_tree_add_item(parent_tree
,
577 hf_waveagent_protocolversion
, tvb
, starting_offset
, 1, ENC_BIG_ENDIAN
);
579 starting_offset
+= 4;
582 proto_tree_add_item(parent_tree
,
583 hf_waveagent_capimpl
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
585 proto_tree_add_item(parent_tree
,
586 hf_waveagent_state
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
588 proto_tree_add_item(parent_tree
,
589 hf_waveagent_appstate
, tvb
, starting_offset
+ 8, 4, ENC_BIG_ENDIAN
);
591 proto_tree_add_item(parent_tree
,
592 hf_waveagent_rxdatapckts
, tvb
, starting_offset
+ 12, 8, ENC_BIG_ENDIAN
);
594 proto_tree_add_item(parent_tree
,
595 hf_waveagent_rxdatabytes
, tvb
, starting_offset
+ 20, 8, ENC_BIG_ENDIAN
);
597 proto_tree_add_item(parent_tree
,
598 hf_waveagent_rxpcktrate
, tvb
, starting_offset
+ 28, 8, ENC_BIG_ENDIAN
);
600 proto_tree_add_item(parent_tree
,
601 hf_waveagent_rxbyterate
, tvb
, starting_offset
+ 36, 8, ENC_BIG_ENDIAN
);
603 proto_tree_add_item(parent_tree
,
604 hf_waveagent_txdatapckts
, tvb
, starting_offset
+ 44, 8, ENC_BIG_ENDIAN
);
606 proto_tree_add_item(parent_tree
,
607 hf_waveagent_txdatabytes
, tvb
, starting_offset
+ 52, 8, ENC_BIG_ENDIAN
);
609 proto_tree_add_item(parent_tree
,
610 hf_waveagent_txpcktrate
, tvb
, starting_offset
+ 60, 8, ENC_BIG_ENDIAN
);
612 proto_tree_add_item(parent_tree
,
613 hf_waveagent_txbyterate
, tvb
, starting_offset
+ 68, 8, ENC_BIG_ENDIAN
);
615 proto_tree_add_item(parent_tree
,
616 hf_waveagent_looppckts
, tvb
, starting_offset
+ 76, 8, ENC_BIG_ENDIAN
);
618 proto_tree_add_item(parent_tree
,
619 hf_waveagent_loopbytes
, tvb
, starting_offset
+ 84, 8, ENC_BIG_ENDIAN
);
621 proto_tree_add_item(parent_tree
,
622 hf_waveagent_rxctlpckts
, tvb
, starting_offset
+ 92, 8, ENC_BIG_ENDIAN
);
624 proto_tree_add_item(parent_tree
,
625 hf_waveagent_rxctlbytes
, tvb
, starting_offset
+ 100, 8, ENC_BIG_ENDIAN
);
627 proto_tree_add_item(parent_tree
,
628 hf_waveagent_txctlpckts
, tvb
, starting_offset
+ 108, 8, ENC_BIG_ENDIAN
);
630 proto_tree_add_item(parent_tree
,
631 hf_waveagent_txctlbytes
, tvb
, starting_offset
+ 116, 8, ENC_BIG_ENDIAN
);
633 proto_tree_add_item(parent_tree
,
634 hf_waveagent_unknowncmds
, tvb
, starting_offset
+ 124, 8, ENC_BIG_ENDIAN
);
636 proto_tree_add_item(parent_tree
,
637 hf_waveagent_snap
, tvb
, starting_offset
+ 132, 8, ENC_BIG_ENDIAN
);
640 proto_tree_add_item(parent_tree
,
641 hf_waveagent_tstamp1
, tvb
, 140, 4, ENC_BIG_ENDIAN
);
643 proto_tree_add_item(parent_tree
,
644 hf_waveagent_tstamp2
, tvb
, 144, 4, ENC_BIG_ENDIAN
);
646 proto_tree_add_item(parent_tree
,
647 hf_waveagent_tstamp3
, tvb
, 148, 4, ENC_BIG_ENDIAN
);
649 proto_tree_add_item(parent_tree
,
650 hf_waveagent_tstamp4
, tvb
, 152, 4, ENC_BIG_ENDIAN
);
652 proto_tree_add_item(parent_tree
,
653 hf_waveagent_tstamp5
, tvb
, 156, 4, ENC_BIG_ENDIAN
);
655 proto_tree_add_item(parent_tree
,
656 hf_waveagent_tstamp6
, tvb
, 160, 4, ENC_BIG_ENDIAN
);
658 proto_tree_add_item(parent_tree
,
659 hf_waveagent_tstamp7
, tvb
, 164, 4, ENC_BIG_ENDIAN
);
661 proto_tree_add_item(parent_tree
,
662 hf_waveagent_tstamp8
, tvb
, 168, 4, ENC_BIG_ENDIAN
);
664 proto_tree_add_item(parent_tree
,
665 hf_waveagent_minlcldelta
, tvb
, 172, 4, ENC_BIG_ENDIAN
);
667 proto_tree_add_item(parent_tree
,
668 hf_waveagent_maxlcldelta
, tvb
, 176, 4, ENC_BIG_ENDIAN
);
670 proto_tree_add_item(parent_tree
,
671 hf_waveagent_avglcldelta
, tvb
, 180, 4, ENC_BIG_ENDIAN
);
673 proto_tree_add_item(parent_tree
,
674 hf_waveagent_minremdelta
, tvb
, 184, 4, ENC_BIG_ENDIAN
);
676 proto_tree_add_item(parent_tree
,
677 hf_waveagent_maxremdelta
, tvb
, 188, 4, ENC_BIG_ENDIAN
);
679 proto_tree_add_item(parent_tree
,
680 hf_waveagent_avgremdelta
, tvb
, 192, 4, ENC_BIG_ENDIAN
);
682 proto_tree_add_item(parent_tree
,
683 hf_waveagent_rx1pl
, tvb
, starting_offset
+ 284, 8, ENC_BIG_ENDIAN
);
685 proto_tree_add_item(parent_tree
,
686 hf_waveagent_rx2pl
, tvb
, starting_offset
+ 292, 8, ENC_BIG_ENDIAN
);
688 proto_tree_add_item(parent_tree
,
689 hf_waveagent_rx3pl
, tvb
, starting_offset
+ 300, 8, ENC_BIG_ENDIAN
);
691 proto_tree_add_item(parent_tree
,
692 hf_waveagent_rx4pl
, tvb
, starting_offset
+ 308, 8, ENC_BIG_ENDIAN
);
694 proto_tree_add_item(parent_tree
,
695 hf_waveagent_rx5pl
, tvb
, starting_offset
+ 316, 8, ENC_BIG_ENDIAN
);
697 proto_tree_add_item(parent_tree
,
698 hf_waveagent_rxoospkts
, tvb
, starting_offset
+ 324, 8, ENC_BIG_ENDIAN
);
700 proto_tree_add_item(parent_tree
,
701 hf_waveagent_jitter
, tvb
, starting_offset
+ 356, 8, ENC_BIG_ENDIAN
);
704 proto_tree_add_item(parent_tree
,
705 hf_waveagent_delayfactor
, tvb
, starting_offset
+ 364, 8, ENC_BIG_ENDIAN
);
707 proto_tree_add_item(parent_tree
,
708 hf_waveagent_medialossrate
, tvb
, starting_offset
+ 372, 8, ENC_BIG_ENDIAN
);
710 proto_tree_add_item(parent_tree
,
711 hf_waveagent_txstartts
, tvb
, starting_offset
+ 380, 8, ENC_BIG_ENDIAN
);
713 proto_tree_add_item(parent_tree
,
714 hf_waveagent_txendts
, tvb
, starting_offset
+ 388, 8, ENC_BIG_ENDIAN
);
716 proto_tree_add_item(parent_tree
,
717 hf_waveagent_rxstartts
, tvb
, starting_offset
+ 396, 8, ENC_BIG_ENDIAN
);
719 proto_tree_add_item(parent_tree
,
720 hf_waveagent_rxendts
, tvb
, starting_offset
+ 404, 8, ENC_BIG_ENDIAN
);
722 proto_tree_add_item(parent_tree
,
723 hf_waveagent_latencysum
, tvb
, starting_offset
+ 412, 8, ENC_BIG_ENDIAN
);
725 proto_tree_add_item(parent_tree
,
726 hf_waveagent_latencycount
, tvb
, starting_offset
+ 420, 8, ENC_BIG_ENDIAN
);
728 proto_tree_add_item(parent_tree
,
729 hf_waveagent_txflowstop
, tvb
, starting_offset
+ 428, 8, ENC_BIG_ENDIAN
);
738 uint32_t num_bss_entries
;
740 proto_tree_add_item(parent_tree
,
741 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
743 proto_tree_add_item(parent_tree
,
744 hf_waveagent_connectflags
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
746 proto_tree_add_item(parent_tree
,
747 hf_waveagent_connecttype
, tvb
, starting_offset
+ 8, 4, ENC_BIG_ENDIAN
);
749 proto_tree_add_item(parent_tree
,
750 hf_waveagent_scanssid
, tvb
, starting_offset
+ 12, 32, ENC_ASCII
);
752 num_bss_entries
= tvb_get_ntohl(tvb
, starting_offset
+ 142);
754 offset
= starting_offset
+ 46;
756 for (iLoop
= 0; iLoop
< num_bss_entries
; iLoop
++)
759 current_offset
= offset
+ iLoop
* delta
;
761 proto_tree_add_item(parent_tree
,
762 hf_waveagent_scanbssid
, tvb
, current_offset
, 6, ENC_NA
);
765 proto_tree_add_item(parent_tree
,
766 hf_waveagent_minrssi
, tvb
, starting_offset
+ 146, 4, ENC_BIG_ENDIAN
);
768 proto_tree_add_item(parent_tree
,
769 hf_waveagent_connecttimeout
, tvb
, starting_offset
+ 150, 4, ENC_BIG_ENDIAN
);
771 proto_tree_add_item(parent_tree
,
772 hf_waveagent_connectattempts
, tvb
, starting_offset
+ 154, 4, ENC_BIG_ENDIAN
);
778 proto_tree_add_item(parent_tree
,
779 hf_waveagent_ifindex
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
781 proto_tree_add_item(parent_tree
,
782 hf_waveagent_reason
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
786 case 0x81: /* Capabilities response */
788 /* For version 2 WA protocol the capability status is not in the header but in the CAP
789 RESPONSE. Need to read it here and then advance the payload offset. This is a
790 packet that had a structure change in the beginning of the packet when moving
792 proto_tree_add_item(parent_tree
,
793 hf_waveagent_capstatus
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
795 proto_tree_add_item(parent_tree
,
796 hf_waveagent_protocolversion
, tvb
, starting_offset
, 1, ENC_BIG_ENDIAN
);
798 starting_offset
+= 4;
801 proto_tree_add_item(parent_tree
,
802 hf_waveagent_capimpl
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
804 proto_tree_add_item(parent_tree
,
805 hf_waveagent_id
, tvb
, starting_offset
+ 4, 128, ENC_ASCII
);
807 proto_tree_add_item(parent_tree
,
808 hf_waveagent_bindtag
, tvb
, starting_offset
+ 136, 128, ENC_ASCII
);
810 proto_tree_add_item(parent_tree
,
811 hf_waveagent_version
, tvb
, starting_offset
+ 268, 128, ENC_ASCII
);
813 proto_tree_add_item(parent_tree
,
814 hf_waveagent_brokerip
, tvb
, starting_offset
+ 400, 4, ENC_BIG_ENDIAN
);
816 proto_tree_add_item(parent_tree
,
817 hf_waveagent_brokerport
, tvb
, starting_offset
+ 404, 4, ENC_BIG_ENDIAN
);
819 proto_tree_add_item(parent_tree
,
820 hf_waveagent_bindlevel
, tvb
, starting_offset
+ 408, 4, ENC_BIG_ENDIAN
);
822 proto_tree_add_item(parent_tree
,
823 hf_waveagent_bindport
, tvb
, starting_offset
+ 412, 4, ENC_BIG_ENDIAN
);
826 proto_tree_add_item(parent_tree
,
827 hf_waveagent_capabilities2
, tvb
, starting_offset
+ 416, 4, ENC_BIG_ENDIAN
);
829 proto_tree_add_item(parent_tree
,
830 hf_waveagent_numinterfaces
, tvb
, starting_offset
+ 420, 4, ENC_BIG_ENDIAN
);
832 proto_tree_add_item(parent_tree
,
833 hf_waveagent_ifmask
, tvb
, starting_offset
+ 424, 4, ENC_BIG_ENDIAN
);
838 case 0x82: /* Reserve request */
839 proto_tree_add_item(parent_tree
,
840 hf_waveagent_bindtag
, tvb
, starting_offset
, 128, ENC_ASCII
);
842 proto_tree_add_item(parent_tree
,
843 hf_waveagent_brokerip
, tvb
, starting_offset
+ 132, 4, ENC_BIG_ENDIAN
);
845 proto_tree_add_item(parent_tree
,
846 hf_waveagent_brokerport
, tvb
, starting_offset
+ 136, 4, ENC_BIG_ENDIAN
);
850 case 0x85: { /* Flow setup */
851 proto_tree
*fs_flags
;
852 proto_tree
*fs_flags_tree
;
853 uint32_t flags_bitfield
;
856 proto_tree_add_item(parent_tree
,
857 hf_waveagent_rxflownum
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
860 proto_tree_add_item(parent_tree
,
861 hf_waveagent_mode
, tvb
, starting_offset
+ 7, 1, ENC_BIG_ENDIAN
);
863 proto_tree_add_item(parent_tree
,
864 hf_waveagent_endpointtype
, tvb
, starting_offset
+ 7, 1, ENC_BIG_ENDIAN
);
866 proto_tree_add_item(parent_tree
,
867 hf_waveagent_bindport
, tvb
, starting_offset
+ 8, 4, ENC_BIG_ENDIAN
);
869 proto_tree_add_item(parent_tree
,
870 hf_waveagent_bindlevel
, tvb
, starting_offset
+ 12, 4, ENC_BIG_ENDIAN
);
872 proto_tree_add_item(parent_tree
,
873 hf_waveagent_remoteport
, tvb
, starting_offset
+ 16, 4, ENC_BIG_ENDIAN
);
875 proto_tree_add_item(parent_tree
,
876 hf_waveagent_remoteaddr
, tvb
, starting_offset
+ 24, 4, ENC_BIG_ENDIAN
);
878 proto_tree_add_item(parent_tree
,
879 hf_waveagent_dscp
, tvb
, starting_offset
+ 40, 4, ENC_BIG_ENDIAN
);
881 flags_bitfield
= tvb_get_ntohl(tvb
, starting_offset
+ 44);
883 fs_flags
= proto_tree_add_uint(parent_tree
, hf_waveagent_fsflags
,
884 tvb
, starting_offset
+ 44, 4, flags_bitfield
);
886 fs_flags_tree
= proto_item_add_subtree(fs_flags
, ett_fsflags
);
888 proto_tree_add_item(fs_flags_tree
,
889 hf_waveagent_fscbrflag
, tvb
, starting_offset
+ 47, 1, ENC_LITTLE_ENDIAN
);
891 proto_tree_add_item(fs_flags_tree
,
892 hf_waveagent_fscombinedsetupflag
, tvb
, starting_offset
+ 47, 1, ENC_LITTLE_ENDIAN
);
895 proto_tree_add_item(parent_tree
,
896 hf_waveagent_ifindex
, tvb
, starting_offset
+ 48, 4, ENC_BIG_ENDIAN
);
898 proto_tree_add_item(parent_tree
,
899 hf_waveagent_payfill
, tvb
, starting_offset
+ 52, 4, ENC_BIG_ENDIAN
);
901 proto_tree_add_item(parent_tree
,
902 hf_waveagent_paysize
, tvb
, starting_offset
+ 56, 4, ENC_BIG_ENDIAN
);
904 proto_tree_add_item(parent_tree
,
905 hf_waveagent_avgrate
, tvb
, starting_offset
+ 60, 4, ENC_BIG_ENDIAN
);
907 proto_tree_add_item(parent_tree
,
908 hf_waveagent_totalframes
, tvb
, starting_offset
+ 64, 4, ENC_BIG_ENDIAN
);
915 proto_tree_add_item(parent_tree
,
916 hf_waveagent_destip
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
918 proto_tree_add_item(parent_tree
,
919 hf_waveagent_destport
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
921 proto_tree_add_item(parent_tree
,
922 hf_waveagent_connectflags
, tvb
, starting_offset
+ 8, 4, ENC_BIG_ENDIAN
);
926 case 0x3f: /* Relay response */
927 case 0x8f: /* Command Response */
928 proto_tree_add_item(parent_tree
,
929 hf_waveagent_commandstatus
, tvb
, starting_offset
, 4, ENC_BIG_ENDIAN
);
931 proto_tree_add_item(parent_tree
,
932 hf_waveagent_syserrno
, tvb
, starting_offset
+ 4, 4, ENC_BIG_ENDIAN
);
934 proto_tree_add_item(parent_tree
,
935 hf_waveagent_statusstring
, tvb
, starting_offset
+ 8, 128, ENC_ASCII
);
943 static uint32_t dissect_wa_header(uint32_t starting_offset
, proto_item
*parent_tree
, tvbuff_t
*tvb
, uint8_t version
)
945 uint32_t wa_payload_offset
;
947 proto_tree_add_item(parent_tree
,
948 hf_waveagent_controlword
, tvb
, 30+starting_offset
, 2, ENC_BIG_ENDIAN
);
950 proto_tree_add_item(parent_tree
,
951 hf_waveagent_payloadlen
, tvb
, 20+starting_offset
, 4, ENC_BIG_ENDIAN
);
953 proto_tree_add_item(parent_tree
,
954 hf_waveagent_transnum
, tvb
, 24+starting_offset
, 4, ENC_BIG_ENDIAN
);
956 proto_tree_add_item(parent_tree
,
957 hf_waveagent_rtoken
, tvb
, 32+starting_offset
, 4, ENC_BIG_ENDIAN
);
959 proto_tree_add_item(parent_tree
,
960 hf_waveagent_flowid
, tvb
, 36+starting_offset
, 4, ENC_BIG_ENDIAN
);
963 proto_tree_add_item(parent_tree
,
964 hf_waveagent_capstatus
, tvb
, 40+starting_offset
, 4, ENC_BIG_ENDIAN
);
966 proto_tree_add_item(parent_tree
,
967 hf_waveagent_protocolversion
, tvb
, 40+starting_offset
, 1, ENC_BIG_ENDIAN
);
969 wa_payload_offset
= WA_V3_PAYLOAD_OFFSET
+ starting_offset
;
972 wa_payload_offset
= WA_V2_PAYLOAD_OFFSET
+ starting_offset
;
975 proto_tree_add_item(parent_tree
,
976 hf_waveagent_sigsequencenum
, tvb
, 4+starting_offset
, 1, ENC_BIG_ENDIAN
);
978 return wa_payload_offset
;
981 /* Dissect the packets */
982 static int dissect_waveagent(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
984 proto_item
*ti
, *rmi
;
985 proto_tree
*waveagent_tree
, *relay_message_tree
, *payload_tree
;
986 uint8_t signature_start
, signature_end
;
988 uint32_t magic_number
;
989 uint32_t control_word
, paylen
;
990 uint32_t wa_payload_offset
;
992 /* Check that there's enough data */
993 if (tvb_captured_length(tvb
) < 52 )
996 magic_number
= tvb_get_ntohl(tvb
, 16) & 0x0FFFFFFF; /* Mask magic number off */
997 if(magic_number
!= 0x0F87C3A5){
1001 signature_start
= tvb_get_uint8(tvb
, 0);
1002 signature_end
= tvb_get_uint8(tvb
, 15);
1004 if ( ((signature_start
!= 0xcc) && (signature_start
!=0xdd)) ||
1005 (signature_end
!= 0xE2))
1006 /* This packet does not appear to belong to WaveAgent.
1007 * Return 0 to give another dissector a chance to dissect it.
1011 version
= ((tvb_get_ntohl(tvb
, 16) & 0xF0000000) >> 28 == 1) ? 3 : 2; /* Mask version bit off */
1013 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "WA");
1014 col_clear(pinfo
->cinfo
, COL_INFO
);
1016 /* Grab the control word, parse the WaveAgent payload accordingly */
1018 control_word
= tvb_get_ntohl(tvb
, 28);
1019 paylen
= tvb_get_ntohl(tvb
, 20);
1021 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "%s (0x%x)",
1022 val_to_str_ext_const(control_word
, &control_words_ext
, "Unknown"), control_word
);
1025 /* create display subtree for the protocol */
1026 ti
= proto_tree_add_protocol_format(tree
, proto_waveagent
, tvb
, 0, -1,
1027 "WaveAgent, %s (0x%x), Payload Length %u Bytes",
1028 val_to_str_ext_const(control_word
, &control_words_ext
, "Unknown"), control_word
, paylen
);
1030 waveagent_tree
= proto_item_add_subtree(ti
, ett_waveagent
);
1032 wa_payload_offset
= dissect_wa_header(0, waveagent_tree
, tvb
, version
);
1034 payload_tree
= waveagent_tree
;
1036 /* Need to check for a relay message. If so, parse the extra fields and then parse the WA packet */
1037 if (control_word
== 0x3e)
1039 proto_tree_add_item(waveagent_tree
,
1040 hf_waveagent_relaydestid
, tvb
, wa_payload_offset
, 4, ENC_BIG_ENDIAN
);
1041 proto_tree_add_item(waveagent_tree
,
1042 hf_waveagent_relaysrcid
, tvb
, wa_payload_offset
+4, 4, ENC_BIG_ENDIAN
);
1044 /* Parse control_word of the relay message */
1045 control_word
= tvb_get_ntohl(tvb
, wa_payload_offset
+12+28);
1046 rmi
= proto_tree_add_none_format(waveagent_tree
, hf_waveagent_relaymessagest
,
1047 tvb
, wa_payload_offset
+12+28, 0,
1048 "Relayed WaveAgent Message, %s (0x%x)",
1049 val_to_str_ext_const(control_word
, &control_words_ext
, "Unknown"),
1052 relay_message_tree
= proto_item_add_subtree(rmi
, ett_relaymessage
);
1054 wa_payload_offset
= dissect_wa_header(wa_payload_offset
+12, relay_message_tree
, tvb
, version
);
1055 payload_tree
= relay_message_tree
;
1058 dissect_wa_payload(wa_payload_offset
, payload_tree
, tvb
, control_word
, version
);
1061 /* Return the amount of data this dissector was able to dissect */
1062 return tvb_captured_length(tvb
);
1065 static bool dissect_waveagent_heur(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
1067 return dissect_waveagent(tvb
, pinfo
, tree
) > 0;
1072 static const value_string status_values
[] = {
1079 /* Register the protocol with Wireshark */
1081 void proto_register_waveagent(void)
1083 static const value_string tcp_states
[] = {
1087 { 3, "SYN received" },
1088 { 4, "Established" },
1089 { 5, "FIN Wait 1" },
1090 { 6, "FIN Wait 2" },
1091 { 7, "Close Wait" },
1094 { 10, "Time Wait" },
1098 static const value_string app_states
[] = {
1104 static const value_string wa_modes
[] = {
1112 static const value_string wa_endpointtypes
[] = {
1119 static const value_string binding_levels
[] = {
1125 { 5, "FIN Wait 1" },
1126 { 6, "FIN Wait 2" },
1127 { 7, "Close Wait" },
1130 { 10, "Time Wait" },
1134 static const value_string if_types
[] = {
1135 { ETHERNET_INTERFACE
, "Ethernet" },
1136 { WLAN_INTERFACE
, "WLAN" },
1140 static const value_string no_yes
[] = {
1146 static const value_string ip_types
[] = {
1147 { 0, "Unspecified" },
1148 { IPV4_TYPE
, "IPv4" },
1149 { IPV6_TYPE
, "IPv6" },
1153 static const value_string if_l3_states
[] = {
1154 { 0, "Uninitialized" },
1155 { 1, "Disconnected" },
1161 static const value_string if_wlan_states
[] = {
1162 { 0, "Uninitialized" },
1165 { 3, "Ad Hoc network formed" },
1166 { 4, "Disconnecting" },
1167 { 5, "Disconnected" },
1168 { 6, "Associating" },
1169 { 7, "Discovering" },
1170 { 8, "Authenticating" },
1174 static const value_string if_eth_states
[] = {
1175 { 0, "Uninitialized" },
1176 { 1, "Not Operational" },
1177 { 2, "Unreachable" },
1178 { 3, "Disconnected" },
1179 { 4, "Connecting" },
1181 { 6, "Operational" },
1186 static const value_string bss_modes
[] = {
1187 { 0, "Infrastructure" },
1193 static const value_string auth_algs
[] = {
1195 { 1, "Shared Key" },
1203 static const value_string cipher_algs
[] = {
1213 /* Setup list of header fields See Section 1.6.1 for details*/
1214 static hf_register_info hf
[] = {
1216 /* START: General purpose message fields - used in multiple messages */
1217 { &hf_waveagent_controlword
,
1218 { "Control Word", "waveagent.cword",
1219 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &control_words_ext
, 0x0,
1222 { &hf_waveagent_payloadlen
,
1223 { "Payload Length", "waveagent.paylen",
1224 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1227 { &hf_waveagent_transnum
,
1228 { "Transaction Number", "waveagent.transnum",
1229 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1232 { &hf_waveagent_rtoken
,
1233 { "Reservation Token", "waveagent.rtoken",
1234 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1237 { &hf_waveagent_flowid
,
1238 { "Flow ID", "waveagent.flowid",
1239 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1242 { &hf_waveagent_capstatus
,
1243 { "Capabilities Status", "waveagent.capstatus",
1244 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1247 { &hf_waveagent_protocolversion
,
1248 { "Protocol Version", "waveagent.protocolversion",
1249 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1252 { &hf_waveagent_capimpl
,
1253 { "Capabilities Implementation", "waveagent.capimpl",
1254 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1257 { &hf_waveagent_sigsequencenum
,
1258 { "Signature Sequence Number", "waveagent.sigsequencenum",
1259 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
1263 { "ID", "waveagent.id",
1264 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1267 { &hf_waveagent_bindtag
,
1268 { "Binding Tag", "waveagent.bindtag",
1269 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1272 { &hf_waveagent_version
,
1273 { "Version", "waveagent.version",
1274 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1277 { &hf_waveagent_brokerip
,
1278 { "Broker IP address", "waveagent.brokerip",
1279 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1282 { &hf_waveagent_brokerport
,
1283 { "Broker Port", "waveagent.brokerport",
1284 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1287 { &hf_waveagent_bindlevel
,
1288 { "Binding Level", "waveagent.bindlevel",
1289 FT_UINT32
, BASE_DEC
, VALS(binding_levels
), 0x0,
1292 { &hf_waveagent_bindport
,
1293 { "Binding Port", "waveagent.bindport",
1294 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1297 { &hf_waveagent_ifindex
,
1298 { "Interface Index", "waveagent.ifindex",
1299 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1301 /* END: General purpose message fields - used in multiple messages */
1303 /* START: Capabilities response fields (specific to this message, other general fields are also used) */
1304 { &hf_waveagent_capabilities2
,
1305 { "Additional Capabilities", "waveagent.capabilities2",
1306 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1309 { &hf_waveagent_numinterfaces
,
1310 { "Number of WA Interfaces", "waveagent.numinterfaces",
1311 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1314 { &hf_waveagent_ifmask
,
1315 { "Mask of Active Interfaces", "waveagent.ifmask",
1316 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1318 /* END: Capabilities response fields (specific to this message, other general fields are also used) */
1320 /* START: Command response message fields */
1321 { &hf_waveagent_commandstatus
,
1322 { "Status of Previous Command", "waveagent.cmdstat",
1323 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1326 { &hf_waveagent_syserrno
,
1327 { "System Error Number", "waveagent.syserrno",
1328 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1331 { &hf_waveagent_statusstring
,
1332 { "Status Message", "waveagent.statmsg",
1333 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1335 /* END: Command response message fields */
1337 /* START: Stats response message fields */
1338 { &hf_waveagent_rxdatapckts
,
1339 { "Received Data Packets", "waveagent.rxdpkts",
1340 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1343 { &hf_waveagent_rxdatabytes
,
1344 { "Received Data Bytes", "waveagent.rxdbytes",
1345 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1348 { &hf_waveagent_rxpcktrate
,
1349 { "Received Data Packet Rate (pps)", "waveagent.rxpktrate",
1350 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1353 { &hf_waveagent_rxbyterate
,
1354 { "Received Byte Rate", "waveagent.rxbyterate",
1355 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1358 { &hf_waveagent_txdatapckts
,
1359 { "Transmitted Data Packets", "waveagent.txdpkts",
1360 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1363 { &hf_waveagent_txdatabytes
,
1364 { "Transmitted Data Bytes", "waveagent.txdbytes",
1365 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1368 { &hf_waveagent_txpcktrate
,
1369 { "Transmitted Data Packet Rate (pps)", "waveagent.txpktrate",
1370 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1373 { &hf_waveagent_txbyterate
,
1374 { "Transmitted Byte Rate", "waveagent.txbyterate",
1375 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1378 { &hf_waveagent_looppckts
,
1379 { "Loopback Packets", "waveagent.looppckts",
1380 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1383 { &hf_waveagent_loopbytes
,
1384 { "Loopback Bytes", "waveagent.loopbytes",
1385 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1388 { &hf_waveagent_rxctlpckts
,
1389 { "Received Control Packets", "waveagent.rxctlpkts",
1390 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1393 { &hf_waveagent_rxctlbytes
,
1394 { "Received Control Bytes", "waveagent.rxctlbytes",
1395 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1398 { &hf_waveagent_txctlpckts
,
1399 { "Transmitted Control Packets", "waveagent.txctlpkts",
1400 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1403 { &hf_waveagent_txctlbytes
,
1404 { "Transmitted Control Bytes", "waveagent.txctlbytes",
1405 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1408 { &hf_waveagent_unknowncmds
,
1409 { "Unknown Commands", "waveagent.unkcmds",
1410 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1413 { &hf_waveagent_snap
,
1414 { "Time Snap for Counters", "waveagent.snap",
1415 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1418 { &hf_waveagent_appstate
,
1419 { "TCP State", "waveagent.state",
1420 FT_UINT32
, BASE_DEC
, VALS(tcp_states
), 0x0,
1423 { &hf_waveagent_state
,
1424 { "Application State", "waveagent.appstate",
1425 FT_UINT32
, BASE_DEC
, VALS(app_states
), 0x0,
1428 { &hf_waveagent_rx1pl
,
1429 { "Instances of single packet loss", "waveagent.rx1pl",
1430 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1433 { &hf_waveagent_rx2pl
,
1434 { "Instances of 2 sequential packets lost", "waveagent.rx2pl",
1435 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1438 { &hf_waveagent_rx3pl
,
1439 { "Instances of 3 sequential packets lost", "waveagent.rx3pl",
1440 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1443 { &hf_waveagent_rx4pl
,
1444 { "Instances of 4 sequential packets lost", "waveagent.rx4pl",
1445 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1448 { &hf_waveagent_rx5pl
,
1449 { "Instances of 5 sequential packets lost", "waveagent.rx5pl",
1450 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1453 { &hf_waveagent_rxoospkts
,
1454 { "Instances of out-of-sequence packets", "waveagent.rxoospkts",
1455 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1459 { &hf_waveagent_rxmeanlatency
,
1460 { "Rx Mean latency", "waveagent.rxmeanlatency",
1461 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1466 { &hf_waveagent_rxminlatency
,
1467 { "Rx Minimum latency", "waveagent.rxminlatency",
1468 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1473 { &hf_waveagent_rxmaxlatency
,
1474 { "Rx Maximum latency", "waveagent.rxmaxlatency",
1475 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1479 { &hf_waveagent_jitter
,
1480 { "Jitter (microseconds)", "waveagent.jitter",
1481 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1484 { &hf_waveagent_delayfactor
,
1485 { "Delay Factor", "waveagent.delayfactor",
1486 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1489 { &hf_waveagent_medialossrate
,
1490 { "Media Loss Rate", "waveagent.medialossrate",
1491 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1494 { &hf_waveagent_txstartts
,
1495 { "Timestamp for first Tx flow packet", "waveagent.txstartts",
1496 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1499 { &hf_waveagent_txendts
,
1500 { "Timestamp for last Tx flow packet", "waveagent.txendts",
1501 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1504 { &hf_waveagent_rxstartts
,
1505 { "Timestamp for first Rx flow packet", "waveagent.rxstartts",
1506 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1509 { &hf_waveagent_rxendts
,
1510 { "Timestamp for last Rx flow packet", "waveagent.rxendts",
1511 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1514 { &hf_waveagent_latencysum
,
1515 { "Sum of latencies across all received packets", "waveagent.latencysum",
1516 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1519 { &hf_waveagent_latencycount
,
1520 { "Count of packets included in the latency sum", "waveagent.latencycount",
1521 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1524 { &hf_waveagent_txflowstop
,
1525 { "Timestamp for Tx flow stop message", "waveagent.txflowstop",
1526 FT_UINT64
, BASE_DEC
, NULL
, 0x0,
1528 /* END Stats response message fields */
1530 /* START: Flow setup message */
1531 { &hf_waveagent_rxflownum
,
1532 { "Received Flow Number", "waveagent.rxflownum",
1533 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1536 { &hf_waveagent_mode
,
1537 { "WaveAgent Mode", "waveagent.trafficmode",
1538 FT_UINT8
, BASE_DEC
, VALS(wa_modes
), 0x03,
1541 { &hf_waveagent_endpointtype
,
1542 { "WaveAgent Endpoint Type", "waveagent.endpointtype",
1543 FT_UINT8
, BASE_DEC
, VALS(wa_endpointtypes
), 0x0c,
1546 { &hf_waveagent_remoteport
,
1547 { "Remote port", "waveagent.remoteport",
1548 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1551 { &hf_waveagent_remoteaddr
,
1552 { "Remote address", "waveagent.remoteaddr",
1553 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1556 { &hf_waveagent_dscp
,
1557 { "DSCP Setting", "waveagent.dscp",
1558 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1561 { &hf_waveagent_fsflags
,
1562 { "Flow Setup Flags", "waveagent.fsflags",
1563 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1566 { &hf_waveagent_fscbrflag
,
1567 { "CBR Transmit Mode", "waveagent.fscbrflag",
1568 FT_BOOLEAN
, 4, NULL
, 0x1, NULL
, HFILL
} },
1570 { &hf_waveagent_fscombinedsetupflag
,
1571 { "Setup, Connect/Listen, Start Combined", "waveagent.fscombinedsetupflag",
1572 FT_BOOLEAN
, 4, NULL
, 0x2, NULL
, HFILL
} },
1574 /* END: Flow setup message */
1576 /* START: Flow start message fields */
1577 { &hf_waveagent_payfill
,
1578 { "Payload Fill", "waveagent.payfill",
1579 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1582 { &hf_waveagent_paysize
,
1583 { "WaveAgent Payload Size (bytes)", "waveagent.paysize",
1584 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1587 { &hf_waveagent_avgrate
,
1588 { "Average Rate (header + payload + trailer bytes/s)", "waveagent.avgrate",
1589 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1592 { &hf_waveagent_totalframes
,
1593 { "Total Frames", "waveagent.totalframes",
1594 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1597 /* END: Flow start message fields */
1599 /* START: Scan results request (0x23) fields */
1600 { &hf_waveagent_bssidstartindex
,
1601 { "Starting Index of BSSID list for reporting", "waveagent.bssidstartindex",
1602 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1605 { &hf_waveagent_bssidstopindex
,
1606 { "Ending Index of BSSID list for reporting", "waveagent.bssidstopindex",
1607 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1610 /* END: Scan results request (0x23) fields */
1612 /* START: WLAN Interface stats fields */
1613 { &hf_waveagent_ifwlanbssid
,
1614 { "WLAN Interface Connected to BSSID", "waveagent.ifwlanbssid",
1615 FT_ETHER
, 0, NULL
, 0x0,
1618 { &hf_waveagent_ifwlanssid
,
1619 { "WLAN Interface Connected to SSID", "waveagent.ifwlanssid",
1620 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1623 { &hf_waveagent_ifwlanrssi
,
1624 { "WLAN Interface RSSI", "waveagent.ifwlanrssi",
1625 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1628 { &hf_waveagent_ifwlannoise
,
1629 { "WLAN Interface Noise Floor (dBm)", "waveagent.ifwlannoise",
1630 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1633 { &hf_waveagent_ifphytypes
,
1634 { "WLAN Interface Supported PHY Types", "waveagent.ifphytypes",
1635 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1638 { &hf_waveagent_ifphytypebit0
,
1639 { "11b", "waveagent.ifphytypebit0",
1640 FT_BOOLEAN
, 4, NULL
, 0x1, NULL
, HFILL
} },
1642 { &hf_waveagent_ifphytypebit1
,
1643 { "11g", "waveagent.ifphytypebit1",
1644 FT_BOOLEAN
, 4, NULL
, 0x2, NULL
, HFILL
} },
1646 { &hf_waveagent_ifphytypebit2
,
1647 { "11a", "waveagent.ifphytypebit2",
1648 FT_BOOLEAN
, 4, NULL
, 0x4, NULL
, HFILL
} },
1650 { &hf_waveagent_ifphytypebit3
,
1651 { "11n", "waveagent.ifphytypebit3",
1652 FT_BOOLEAN
, 4, NULL
, 0x8, NULL
, HFILL
} },
1654 { &hf_waveagent_ifwlanauthentication
,
1655 { "WLAN Interface Authentication Algorithm", "waveagent.ifwlanauthentication",
1656 FT_UINT32
, BASE_DEC
, VALS(auth_algs
), 0x0,
1659 { &hf_waveagent_ifwlancipher
,
1660 { "WLAN Interface Encryption/Cipher Algorithm", "waveagent.ifwlancipher",
1661 FT_UINT32
, BASE_DEC
, VALS(cipher_algs
), 0x0,
1663 /* END: WLAN Interface stats fields */
1665 /* START: Interface stats response (0x2d) fields */
1666 { &hf_waveagent_iftype
,
1667 { "Interface type", "waveagent.iftype",
1668 FT_UINT32
, BASE_DEC
, VALS(if_types
), 0x0,
1671 { &hf_waveagent_ifdescription
,
1672 { "Name/Description of the adapter", "waveagent.ifdescription",
1673 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1676 { &hf_waveagent_ifmacaddr
,
1677 { "Interface MAC Address", "waveagent.ifmacaddr",
1678 FT_ETHER
, 0, NULL
, 0x0,
1681 { &hf_waveagent_iflinkspeed
,
1682 { "Interface Link Speed (kbps)", "waveagent.iflinkspeed",
1683 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1686 { &hf_waveagent_ifdhcp
,
1687 { "Interface DHCP Enabled", "waveagent.ifdhcp",
1688 FT_UINT32
, BASE_DEC
, VALS(no_yes
), 0x0,
1691 { &hf_waveagent_ifiptype
,
1692 { "Interface IP Type", "waveagent.ifiptype",
1693 FT_UINT32
, BASE_DEC
, VALS(ip_types
), 0x0,
1696 { &hf_waveagent_ifipv4
,
1697 { "Interface Bound to IP Address", "waveagent.ifipv4",
1698 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1701 { &hf_waveagent_ifipv6
,
1702 { "Interface Bound to IP Address", "waveagent.ifipv6",
1703 FT_IPv6
, BASE_NONE
, NULL
, 0x0,
1706 { &hf_waveagent_ifdhcpserver
,
1707 { "Interface DHCP Server Address", "waveagent.ifdhcpserver",
1708 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1711 { &hf_waveagent_ifgateway
,
1712 { "Interface Gateway", "waveagent.ifgateway",
1713 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1716 { &hf_waveagent_ifdnsserver
,
1717 { "Interface DNS Server Address", "waveagent.ifdnsserver",
1718 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1721 { &hf_waveagent_ifethl2status
,
1722 { "Ethernet L2 Interface Status", "waveagent.ifethl2status",
1723 FT_UINT32
, BASE_DEC
, VALS(if_eth_states
), 0x0,
1726 { &hf_waveagent_ifwlanl2status
,
1727 { "WLAN L2 Interface Status", "waveagent.ifwlanl2status",
1728 FT_UINT32
, BASE_DEC
, VALS(if_wlan_states
), 0x0,
1731 { &hf_waveagent_ifl3status
,
1732 { "L3 Interface Status", "waveagent.ifl3status",
1733 FT_UINT32
, BASE_DEC
, VALS(if_l3_states
), 0x0,
1736 /* END: Interface stats response (0x2d) fields */
1738 /* START: Scan results response (0x2e) fields */
1739 { &hf_waveagent_totalbssid
,
1740 { "Number of Found BSSID", "waveagent.totalbssid",
1741 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1744 { &hf_waveagent_returnedbssid
,
1745 { "Number of BSSID Reported in This Response", "waveagent.returnedbssid",
1746 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1749 { &hf_waveagent_scanbssid
,
1750 { "BSSID", "waveagent.scanbssid",
1751 FT_ETHER
, 0, NULL
, 0x0,
1754 { &hf_waveagent_scanssid
,
1755 { "SSID", "waveagent.scanssid",
1756 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1759 { &hf_waveagent_ifwlansupprates
,
1760 { "Supported Rates", "waveagent.ifwlansupportedrates",
1761 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1764 { &hf_waveagent_ifwlancapabilities
,
1765 { "Capabilities field", "waveagent.ifwlancapabilities",
1766 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
1769 { &hf_waveagent_ifwlanchannel
,
1770 { "Channel", "waveagent.ifwlanchannel",
1771 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1774 { &hf_waveagent_ifwlanprivacy
,
1775 { "Privacy Enabled", "waveagent.ifwlanprivacy",
1776 FT_UINT32
, BASE_DEC
, VALS(no_yes
), 0x0,
1779 { &hf_waveagent_ifwlanbssmode
,
1780 { "BSS Mode", "waveagent.ifwlanbssmode",
1781 FT_UINT32
, BASE_DEC
, VALS(bss_modes
), 0x0,
1783 /* END: Scan results response (0x2e) fields */
1785 /* START: OID fields */
1786 { &hf_waveagent_oidcode
,
1787 { "OID Code", "waveagent.oidcode",
1788 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1791 { &hf_waveagent_oidvalue
,
1792 { "OID Value", "waveagent.oidvalue",
1793 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1795 /* END: OID fields */
1797 /* START: Learning Message fields */
1798 { &hf_waveagent_destip
,
1799 { "Destination IP", "waveagent.destip",
1800 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1803 { &hf_waveagent_destport
,
1804 { "Destination Port", "waveagent.destport",
1805 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1808 { &hf_waveagent_connectflags
,
1809 { "Connect Flags", "waveagent.connectflags",
1810 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1812 /* END: Learning Message fields */
1814 /* START: client connect fields */
1815 { &hf_waveagent_connecttype
,
1816 { "Connect Type", "waveagent.connecttype",
1817 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1820 { &hf_waveagent_minrssi
,
1821 { "Minimum RSSI", "waveagent.minrssi",
1822 FT_INT32
, BASE_DEC
, NULL
, 0x0,
1825 { &hf_waveagent_connecttimeout
,
1826 { "Connect timeout (s)", "waveagent.connecttimeout",
1827 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1830 { &hf_waveagent_connectattempts
,
1831 { "Connect attempts", "waveagent.connectattempt",
1832 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1835 { &hf_waveagent_reason
,
1836 { "Reason", "waveagent.reason",
1837 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1839 /* END: client connect fields */
1841 /* START: relay server fields */
1842 { &hf_waveagent_relaydestid
,
1843 { "ID of destination client (assigned by relay server)", "waveagent.relaydestid",
1844 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1847 { &hf_waveagent_relaysrcid
,
1848 { "ID of source client (assigned by relay server)", "waveagent.relaysrcid",
1849 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1852 { &hf_waveagent_relaymessagest
,
1853 { "Relayed WaveAgent Message", "waveagent.relaymessagest",
1854 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1855 "This is a relayed WaveAgent message", HFILL
} },
1857 /* END: relay server fields */
1861 /* Setup protocol subtree array */
1862 static int *ett
[] = {
1886 proto_waveagent
= proto_register_protocol("WaveAgent", "waveagent", "waveagent");
1888 proto_register_field_array(proto_waveagent
, hf
, array_length(hf
));
1889 proto_register_subtree_array(ett
, array_length(ett
));
1893 void proto_reg_handoff_waveagent(void)
1895 heur_dissector_add("udp", dissect_waveagent_heur
, "WaveAgent over UDP", "waveagent_udp", proto_waveagent
, HEURISTIC_ENABLE
);
1900 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1905 * indent-tabs-mode: nil
1908 * vi: set shiftwidth=4 tabstop=8 expandtab:
1909 * :indentSize=4:tabSize=8:noTabs=true: