Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-cast.c
blob1df45d0107af725f0c18e2c04a6a68fc59bc9c4d
1 /* packet-cast.c
3 * Dissector for the CAST Client Control Protocol
4 * (The "D-Channel"-Protocol for Cisco Systems' IP-Phones)
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 /* This implementation is based on a draft version of the 3.0
10 * specification
13 #include "config.h"
15 #include <epan/packet.h>
16 #include <epan/prefs.h>
17 #include <epan/tfs.h>
19 #include "packet-tcp.h"
21 #define TCP_PORT_CAST 4224 /* Not IANA registered */
23 void proto_register_cast(void);
24 void proto_reg_handoff_cast(void);
26 static dissector_handle_t cast_handle;
28 /* I will probably need this again when I change things
29 * to function pointers, but let me use the existing
30 * infrastructure for now
32 * typedef struct {
33 * uint32_t id;
34 * char *name;
35 * } message_id_t;
38 static const value_string message_id[] = {
40 {0x0000, "KeepAliveMessage"},
41 {0x0001, "KeepAliveVersionMessage"},
42 {0x0002, "KeepAliveVersionACKMessage"},
43 {0x0003, "UpdateCapabilitiesMessage"},
44 {0x0004, "EmptyCapabilitiesMessage"},
45 {0x0005, "OpenMultiMediaReceiveChannelMessage"},
46 {0x0006, "OpenMultiMediaReceiveChannelACKMessage"},
47 {0x0007, "CloseMultiMediaReceiveChannelMessage"},
48 {0x0008, "StartMultiMediaTransmissionMessage"},
49 {0x0009, "StopMultiMediaTransmissionMessage"},
50 {0x000A, "MiscellaneousCommandMessage"},
51 {0x000B, "FlowControlCommandMessage"},
52 {0x000C, "ClearConferenceMessage"},
53 {0x000D, "CallStateMessage"},
54 {0x000E, "RequestCallStateMessage"},
55 {0x000F, "RequestAllCallStatesMessage"},
56 {0x0010, "CallInfoMessage"},
57 {0x0011, "RequestCallInfoMessage"},
58 {0x0012, "CallFocusMessage"},
59 {0x0013, "MakeCallMessage"},
60 {0x0014, "HangUpMessage"},
61 {0x0015, "AnswerMessage"},
63 {0x0040, "KeepAliveACKMessage"},
64 {0x0041, "StreamStartMessage"},
65 {0x0042, "StreamStopMessage"},
66 {0x0043, "MuteStartMessage"},
67 {0x0044, "MuteStopMessage"},
68 {0x0045, "SpeakerStartMessage"},
69 {0x0046, "SpeakerStopMessage"},
70 {0x0047, "StreamStartMessageWithCodec"},
72 {0x0050, "VIEODiscoveryprotocol"},
73 {0x0051, "VIEOControlprotocol"},
75 {0x0060, "T120protocol"},
76 {0x0061, "T121protocol"},
77 {0x0062, "T122protocol"},
79 {0x0070, "IMSessionDiscoveryprotocol"},
80 {0x0071, "IMSessionControlprotocol"},
82 {0x0074, "SlidesDiscoveryprotocol"},
83 {0x0075, "SlidesControlprotocol"},
85 {0x0080, "CastTunnelMessage"},
87 {0x0090, "RemoteRequestMessage"},
88 {0x0091, "RemoteResponseMessage"},
90 {0x00A0, "CollabDiscoveryprotocol"},
91 {0x00A1, "CollabControlprotocol"},
93 {0x00A4, "FECCDiscoveryprotocol"},
94 {0x00A5, "FECCControlprotocol"},
96 {0x00B0, "ClockSyncprotocol"},
97 {0x00B1, "StreamSyncprotocol"},
99 {0x00B4, "MediaDiscoveryprotocol"},
100 {0x00B5, "MediaControlprotocol"},
102 {0x00C0, "SessionDiscoveryprotocol"},
103 {0x00C1, "SessionControlprotocol"},
105 {0x00C4, "ConferenceDiscoveryprotocol"},
106 {0x00C5, "Conferenceprotocol"},
108 {0x00CC, "SCCPCallControlProxyprotocol"},
110 {0x00D0, "CallDiscoveryprotocol"},
111 {0x00D1, "CallControlprotocol"},
113 {0 , NULL} /* terminator */
116 static const value_string audioCodecTypes[] = {
117 {1 , "G711/G729"},
118 {2 , "GSM"},
119 {3 , "G723"},
120 {4 , "G722"},
121 {5 , "WideBand"},
122 { 0 , NULL}
125 static const value_string orcStatus[] = {
126 {0 , "orcOk"},
127 {1 , "orcError"},
128 {0 , NULL}
131 static const value_string mediaPayloads[] = {
132 { 1 , "Non-standard codec"},
133 { 2 , "G.711 A-law 64k"},
134 { 3 , "G.711 A-law 56k"},
135 { 4 , "G.711 u-law 64k"},
136 { 5 , "G.711 u-law 56k"},
137 { 6 , "G.722 64k"},
138 { 7 , "G.722 56k"},
139 { 8 , "G.722 48k"},
140 { 9 , "G.723.1"},
141 { 10 , "G.728"},
142 { 11 , "G.729"},
143 { 12 , "G.729 Annex A"},
144 { 13 , "IS11172 AudioCap"}, /* IS11172 is an ISO MPEG standard */
145 { 14 , "IS13818 AudioCap"}, /* IS13818 is an ISO MPEG standard */
146 { 15 , "G.729 Annex B"},
147 { 16 , "G.729 Annex A+Annex B"},
148 { 18 , "GSM Full Rate"},
149 { 19 , "GSM Half Rate"},
150 { 20 , "GSM Enhanced Full Rate"},
151 { 25 , "Wideband 256k"},
152 { 32 , "Data 64k"},
153 { 33 , "Data 56k"},
154 { 80 , "GSM"},
155 { 81 , "ActiveVoice"},
156 { 82 , "G.726 32K"},
157 { 83 , "G.726 24K"},
158 { 84 , "G.726 16K"},
159 { 85 , "G.729B"},
160 { 86 , "G.729B Low Complexity"},
161 {100 , "H261"},
162 {101 , "H263"},
163 {102 , "Vieo"},
164 {105 , "T120"},
165 {106 , "H224"},
166 {257 , "RFC2833_DynPayload"},
167 {0 , NULL}
170 static const value_string cast_Layouts[] = {
171 { 0 , "NoLayout"},
172 { 1 , "OneByOne"},
173 { 2 , "OneByTwo"},
174 { 3 , "TwoByTwo"},
175 { 4 , "TwoByTwo3Alt1"},
176 { 5 , "TwoByTwo3Alt2"},
177 { 6 , "ThreeByThree"},
178 { 7 , "ThreeByThree6Alt1"},
179 { 8 , "ThreeByThree6Alt2"},
180 { 9 , "ThreeByThree4Alt1"},
181 {10 , "ThreeByThree4Alt2"},
182 {0 , NULL}
185 static const value_string cast_transmitOrReceive[] = {
186 {1 , "Station_Receive_only"},
187 {2 , "Station_Transmit_only"},
188 {3 , "Station_Receive_Transmit"},
189 {0 , NULL}
192 static const value_string cast_formatTypes[] = {
193 {1 , "sqcif (128x96)"},
194 {2 , "qcif (176x144)"},
195 {3 , "cif (352x288)"},
196 {4 , "4cif (704x576)"},
197 {5 , "16cif (1408x1152)"},
198 {6 , "custom_base"},
199 {0 , NULL}
202 static const value_string cast_echoCancelTypes[] = {
203 {0 , "Media_EchoCancellation_Off"},
204 {1 , "Media_EchoCancellation_On"},
205 {0 , NULL}
208 static const value_string cast_g723BitRates[] = {
209 {1 , "Media_G723BRate_5_3"},
210 {2 , "Media_G723BRate_6_4"},
211 {0 , NULL}
214 static const value_string cast_miscCommandType[] = {
215 {0 , "videoFreezePicture"},
216 {1 , "videoFastUpdatePicture"},
217 {2 , "videoFastUpdateGOB"},
218 {3 , "videoFastUpdateMB"},
219 {4 , "lostPicture"},
220 {5 , "lostPartialPicture"},
221 {6 , "recoveryReferencePicture"},
222 {7 , "temporalSpatialTradeOff"},
223 {0 , NULL}
226 static const value_string cast_callStateTypes[] = {
227 { 0 , "TsIdle"},
228 { 1 , "TsOffHook"},
229 { 2 , "TsOnHook"},
230 { 3 , "TsRingOut"},
231 { 4 , "TsRingIn"},
232 { 5 , "TsConnected"},
233 { 6 , "TsBusy"},
234 { 7 , "TsCongestion"},
235 { 8 , "TsHold"},
236 { 9 , "TsCallWaiting"},
237 {10 , "TsCallTransfer"},
238 {11 , "TsCallPark"},
239 {12 , "TsProceed"},
240 {13 , "TsCallRemoteMultiline"},
241 {14 , "TsInvalidNumber"},
242 {15 , "TsMaxState"},
243 {0 , NULL}
246 /* Defined Call Type */
247 static const value_string cast_callTypes[] = {
248 {1 , "InBoundCall"},
249 {2 , "OutBoundCall"},
250 {3 , "ForwardCall"},
251 {0 , NULL}
254 static const value_string cast_callSecurityStatusTypes[] = {
255 {0 , "CallSecurityStatusUnknown"},
256 {1 , "CallSecurityStatusNotAuthenticated"},
257 {2 , "CallSecurityStatusAuthenticated"},
258 {0 , NULL}
262 #define MAX_CUSTOM_PICTURES 6
263 #define MAX_SERVICE_TYPE 4
264 #define MAX_LAYOUT_WITH_SAME_SERVICE 5
265 #define MAX_PICTURE_FORMAT 5
266 #define MAX_REFERENCE_PICTURE 4
267 #define MAX_LEVEL_PREFERENCE 4
268 #define StationMaxVideoCapabilities 10
269 #define StationMaxDataCapabilities 5
270 #define StationMaxNameSize 40 /* max size of calling party's name */
271 #define StationMaxDirnumSize 24 /* max size of calling or called party dirnum */
274 /* Initialize the protocol and registered fields */
275 static int proto_cast;
276 static int hf_cast_data_length;
277 static int hf_cast_reserved;
278 static int hf_cast_messageid;
279 static int hf_cast_version;
280 static int hf_cast_ORCStatus;
281 static int hf_cast_ipAddress;
282 static int hf_cast_portNumber;
283 static int hf_cast_passThruPartyID;
284 static int hf_cast_callIdentifier;
285 static int hf_cast_conferenceID;
286 static int hf_cast_payloadType;
287 static int hf_cast_lineInstance;
288 static int hf_cast_payloadCapability;
289 static int hf_cast_isConferenceCreator;
290 static int hf_cast_payload_rfc_number;
291 static int hf_cast_videoCapCount;
292 static int hf_cast_dataCapCount;
293 static int hf_cast_RTPPayloadFormat;
294 static int hf_cast_customPictureFormatCount;
295 static int hf_cast_pictureWidth;
296 static int hf_cast_pictureHeight;
297 static int hf_cast_pixelAspectRatio;
298 static int hf_cast_clockConversionCode;
299 static int hf_cast_clockDivisor;
300 static int hf_cast_activeStreamsOnRegistration;
301 static int hf_cast_maxBW;
302 static int hf_cast_serviceResourceCount;
303 static int hf_cast_layoutCount;
304 static int hf_cast_layout;
305 static int hf_cast_maxConferences;
306 static int hf_cast_activeConferenceOnRegistration;
307 static int hf_cast_transmitOrReceive;
308 static int hf_cast_levelPreferenceCount;
309 static int hf_cast_transmitPreference;
310 static int hf_cast_format;
311 static int hf_cast_maxBitRate;
312 static int hf_cast_minBitRate;
313 static int hf_cast_MPI;
314 static int hf_cast_serviceNumber;
315 static int hf_cast_temporalSpatialTradeOffCapability;
316 static int hf_cast_stillImageTransmission;
317 static int hf_cast_h263_capability_bitfield;
318 static int hf_cast_annexNandWFutureUse;
319 static int hf_cast_modelNumber;
320 static int hf_cast_bandwidth;
321 static int hf_cast_protocolDependentData;
322 static int hf_cast_DSCPValue;
323 static int hf_cast_serviceNum;
324 /* static int hf_cast_precedenceValue; */
325 static int hf_cast_maxStreams;
326 static int hf_cast_millisecondPacketSize;
327 static int hf_cast_echoCancelType;
328 static int hf_cast_g723BitRate;
329 static int hf_cast_bitRate;
330 static int hf_cast_pictureFormatCount;
331 static int hf_cast_confServiceNum;
332 static int hf_cast_miscCommandType;
333 static int hf_cast_temporalSpatialTradeOff;
334 static int hf_cast_firstGOB;
335 static int hf_cast_numberOfGOBs;
336 static int hf_cast_firstMB;
337 static int hf_cast_numberOfMBs;
338 static int hf_cast_pictureNumber;
339 static int hf_cast_longTermPictureIndex;
340 static int hf_cast_recoveryReferencePictureCount;
341 static int hf_cast_calledParty;
342 static int hf_cast_privacy;
343 static int hf_cast_precedenceLv;
344 static int hf_cast_precedenceDm;
345 static int hf_cast_callState;
346 static int hf_cast_callingPartyName;
347 static int hf_cast_callingParty;
348 static int hf_cast_calledPartyName;
349 static int hf_cast_callType;
350 static int hf_cast_originalCalledPartyName;
351 static int hf_cast_originalCalledParty;
352 static int hf_cast_lastRedirectingPartyName;
353 static int hf_cast_lastRedirectingParty;
354 static int hf_cast_cgpnVoiceMailbox;
355 static int hf_cast_cdpnVoiceMailbox;
356 static int hf_cast_originalCdpnVoiceMailbox;
357 static int hf_cast_lastRedirectingVoiceMailbox;
358 static int hf_cast_originalCdpnRedirectReason;
359 static int hf_cast_lastRedirectingReason;
360 static int hf_cast_callInstance;
361 static int hf_cast_callSecurityStatus;
362 static int hf_cast_partyPIRestrictionBits_CallingPartyName;
363 static int hf_cast_partyPIRestrictionBits_CallingPartyNumber;
364 static int hf_cast_partyPIRestrictionBits_CalledPartyName;
365 static int hf_cast_partyPIRestrictionBits_CalledPartyNumber;
366 static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyName;
367 static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber;
368 static int hf_cast_partyPIRestrictionBits_LastRedirectPartyName;
369 static int hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber;
370 static int hf_cast_directoryNumber;
371 static int hf_cast_requestorIpAddress;
372 static int hf_cast_stationIpAddress;
373 static int hf_cast_stationFriendlyName;
374 static int hf_cast_stationGUID;
375 static int hf_cast_audio;
379 /* Initialize the subtree pointers */
380 static int ett_cast;
381 static int ett_cast_tree;
383 /* desegmentation of SCCP */
384 static bool cast_desegment = true;
386 /* Dissect a single CAST PDU */
387 static int
388 dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
390 int offset = 0;
392 /* Header fields */
393 uint32_t hdr_data_length;
394 uint32_t hdr_marker;
395 uint32_t data_messageid;
396 const char *messageid_str;
397 /* uint32_t data_size; */
399 unsigned i = 0;
400 unsigned t = 0;
401 int count;
402 int val;
404 /* Set up structures we will need to add the protocol subtree and manage it */
405 proto_item *ti;
406 proto_tree *cast_tree = NULL;
407 proto_tree *cast_sub_tree;
408 proto_tree *cast_sub_tree_sav;
409 proto_tree *cast_sub_tree_sav_sav;
411 hdr_data_length = tvb_get_letohl(tvb, offset);
412 hdr_marker = tvb_get_letohl(tvb, offset+4);
413 data_messageid = tvb_get_letohl(tvb, offset+8);
415 /* In the interest of speed, if "tree" is NULL, don't do any work not
416 * necessary to generate protocol tree items. */
417 if (tree) {
418 ti = proto_tree_add_item(tree, proto_cast, tvb, offset, hdr_data_length+8, ENC_NA);
419 cast_tree = proto_item_add_subtree(ti, ett_cast);
420 proto_tree_add_uint(cast_tree, hf_cast_data_length, tvb, offset, 4, hdr_data_length);
421 proto_tree_add_uint(cast_tree, hf_cast_reserved, tvb, offset+4, 4, hdr_marker);
424 messageid_str = val_to_str(data_messageid, message_id, "0x%08X (Unknown)");
426 col_add_str(pinfo->cinfo, COL_INFO, messageid_str);
428 if (tree) {
429 proto_tree_add_uint(cast_tree, hf_cast_messageid, tvb,offset+8, 4, data_messageid );
432 if (tree) {
433 switch(data_messageid) {
435 case 0x0 : /* keepAlive */
436 /* no data in message */
437 break;
439 case 0x1 : /* KeepAliveVersion */
440 proto_tree_add_item(cast_tree, hf_cast_version, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
441 break;
443 case 0x2 : /* KeepAliveVersionAck */
444 proto_tree_add_item(cast_tree, hf_cast_version, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
445 break;
447 case 0x3 : /* UpdateCapabilities */
448 /* to do - this message is very large and will span multiple packets, it would be nice to someday */
449 /* find out a way to join the next packet and get the complete message to decode */
450 proto_tree_add_item(cast_tree, hf_cast_videoCapCount, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
451 proto_tree_add_item(cast_tree, hf_cast_dataCapCount, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
452 proto_tree_add_item(cast_tree, hf_cast_RTPPayloadFormat, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
453 proto_tree_add_item(cast_tree, hf_cast_customPictureFormatCount, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
454 count = offset+28;
455 /* total of 120 bytes */
456 for ( i = 0; i < MAX_CUSTOM_PICTURES; i++ ) {
457 cast_sub_tree = proto_tree_add_subtree_format(cast_tree, tvb, offset, 20, ett_cast_tree, NULL, "customPictureFormat[%d]", i);
458 proto_tree_add_item(cast_sub_tree, hf_cast_pictureWidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
459 count+= 4;
460 proto_tree_add_item(cast_sub_tree, hf_cast_pictureHeight, tvb, count, 4, ENC_LITTLE_ENDIAN);
461 count+= 4;
462 proto_tree_add_item(cast_sub_tree, hf_cast_pixelAspectRatio, tvb, count, 4, ENC_LITTLE_ENDIAN);
463 count+= 4;
464 proto_tree_add_item(cast_sub_tree, hf_cast_clockConversionCode, tvb, count, 4, ENC_LITTLE_ENDIAN);
465 count+= 4;
466 proto_tree_add_item(cast_sub_tree, hf_cast_clockDivisor, tvb, count, 4, ENC_LITTLE_ENDIAN);
467 count+= 4;
469 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "confResources");
470 proto_tree_add_item(cast_sub_tree, hf_cast_activeStreamsOnRegistration, tvb, count, 4, ENC_LITTLE_ENDIAN);
471 count+= 4;
472 proto_tree_add_item(cast_sub_tree, hf_cast_maxBW, tvb, count, 4, ENC_LITTLE_ENDIAN);
473 count+= 4;
474 proto_tree_add_item(cast_sub_tree, hf_cast_serviceResourceCount, tvb, count, 4, ENC_LITTLE_ENDIAN);
475 count+= 4;
476 cast_sub_tree_sav = cast_sub_tree;
477 /* total of 160 bytes */
478 for ( i = 0; i < MAX_SERVICE_TYPE; i++ ) {
479 cast_sub_tree = proto_tree_add_subtree_format(cast_sub_tree_sav, tvb, offset, 20, ett_cast_tree, NULL, "serviceResource[%d]", i);
480 proto_tree_add_item(cast_sub_tree, hf_cast_layoutCount, tvb, count, 4, ENC_LITTLE_ENDIAN);
481 count+= 4;
482 cast_sub_tree_sav_sav = cast_sub_tree_sav;
483 for ( t = 0; t < MAX_LAYOUT_WITH_SAME_SERVICE; t++ ) {
484 cast_sub_tree = proto_tree_add_subtree_format(cast_sub_tree_sav, tvb, offset, 20, ett_cast_tree, NULL, "layouts[%d]", t);
485 proto_tree_add_item(cast_sub_tree, hf_cast_layout, tvb, count, 4, ENC_LITTLE_ENDIAN);
486 count+= 4;
488 cast_sub_tree = cast_sub_tree_sav_sav;
489 proto_tree_add_item(cast_sub_tree, hf_cast_serviceNum, tvb, count, 4, ENC_LITTLE_ENDIAN);
490 count+= 4;
491 proto_tree_add_item(cast_sub_tree, hf_cast_maxStreams, tvb, count, 4, ENC_LITTLE_ENDIAN);
492 count+= 4;
493 proto_tree_add_item(cast_sub_tree, hf_cast_maxConferences, tvb, count, 4, ENC_LITTLE_ENDIAN);
494 count+= 4;
495 proto_tree_add_item(cast_sub_tree, hf_cast_activeConferenceOnRegistration, tvb, count, 4, ENC_LITTLE_ENDIAN);
496 count+= 4;
498 /* total of 176 bytes */
499 for ( i = 0; i < StationMaxVideoCapabilities; i++ ) {
500 cast_sub_tree = proto_tree_add_subtree_format(cast_tree, tvb, offset, 20, ett_cast_tree, NULL, "vidCaps[%d]", i);
501 proto_tree_add_item(cast_sub_tree, hf_cast_payloadCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
502 count+= 4;
503 proto_tree_add_item(cast_sub_tree, hf_cast_transmitOrReceive, tvb, count, 4, ENC_LITTLE_ENDIAN);
504 count+= 4;
505 proto_tree_add_item(cast_sub_tree, hf_cast_levelPreferenceCount, tvb, count, 4, ENC_LITTLE_ENDIAN);
506 count+= 4;
507 cast_sub_tree_sav = cast_sub_tree;
508 for ( t = 0; t < MAX_LEVEL_PREFERENCE; t++ ) {
509 cast_sub_tree = proto_tree_add_subtree_format(cast_sub_tree_sav, tvb, offset, 20, ett_cast_tree, NULL, "levelPreference[%d]", t);
510 proto_tree_add_item(cast_sub_tree, hf_cast_transmitPreference, tvb, count, 4, ENC_LITTLE_ENDIAN);
511 count+= 4;
512 proto_tree_add_item(cast_sub_tree, hf_cast_format, tvb, count, 4, ENC_LITTLE_ENDIAN);
513 count+= 4;
514 proto_tree_add_item(cast_sub_tree, hf_cast_maxBitRate, tvb, count, 4, ENC_LITTLE_ENDIAN);
515 count+= 4;
516 proto_tree_add_item(cast_sub_tree, hf_cast_minBitRate, tvb, count, 4, ENC_LITTLE_ENDIAN);
517 count+= 4;
518 proto_tree_add_item(cast_sub_tree, hf_cast_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN);
519 count+= 4;
520 proto_tree_add_item(cast_sub_tree, hf_cast_serviceNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
521 count+= 4;
524 /* H.261 */
525 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "h261VideoCapability");
526 proto_tree_add_item(cast_sub_tree, hf_cast_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
527 proto_tree_add_item(cast_sub_tree, hf_cast_stillImageTransmission, tvb, count+4, 4, ENC_LITTLE_ENDIAN);
529 /* H.263 */
530 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "h263VideoCapability");
531 proto_tree_add_item(cast_sub_tree, hf_cast_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN);
532 proto_tree_add_item(cast_sub_tree, hf_cast_annexNandWFutureUse, tvb, count+4, 4, ENC_LITTLE_ENDIAN);
534 /* Vieo */
535 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "vieoVideoCapability");
536 proto_tree_add_item(cast_sub_tree, hf_cast_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
537 count+= 4;
538 proto_tree_add_item(cast_sub_tree, hf_cast_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
539 count+= 4;
541 /* total 80 bytes */
542 for ( i = 0; i < StationMaxDataCapabilities; i++ ) {
543 cast_sub_tree = proto_tree_add_subtree_format(cast_tree, tvb, offset, 20, ett_cast_tree, NULL, "dataCaps[%d]", i);
544 proto_tree_add_item(cast_sub_tree, hf_cast_payloadCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
545 count+= 4;
546 proto_tree_add_item(cast_sub_tree, hf_cast_transmitOrReceive, tvb, count, 4, ENC_LITTLE_ENDIAN);
547 count+= 4;
548 proto_tree_add_item(cast_sub_tree, hf_cast_protocolDependentData, tvb, count, 4, ENC_LITTLE_ENDIAN);
549 count+= 4;
550 proto_tree_add_item(cast_sub_tree, hf_cast_maxBitRate, tvb, count, 4, ENC_LITTLE_ENDIAN);
551 count+= 4;
553 break;
555 case 0x4 : /* */
556 break;
558 case 0x5 : /* OpenMultiMediaReceiveChannel */
559 proto_tree_add_item(cast_tree, hf_cast_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
560 proto_tree_add_item(cast_tree, hf_cast_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
561 proto_tree_add_item(cast_tree, hf_cast_payloadCapability, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
562 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
563 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
564 proto_tree_add_item(cast_tree, hf_cast_payload_rfc_number, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
565 proto_tree_add_item(cast_tree, hf_cast_payloadType, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
566 proto_tree_add_item(cast_tree, hf_cast_isConferenceCreator, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
568 /* add audio part of union */
569 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 12, ett_cast_tree, NULL, "audioParameters");
570 proto_tree_add_item(cast_sub_tree, hf_cast_millisecondPacketSize, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
571 proto_tree_add_item(cast_sub_tree, hf_cast_echoCancelType, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
572 proto_tree_add_item(cast_sub_tree, hf_cast_g723BitRate, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
574 /* add video part of union */
575 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 30, ett_cast_tree, NULL, "videoParameters");
576 proto_tree_add_item(cast_sub_tree, hf_cast_bitRate, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
577 proto_tree_add_item(cast_sub_tree, hf_cast_pictureFormatCount, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
578 cast_sub_tree_sav = cast_sub_tree;
579 count = offset+52;
580 for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) {
581 cast_sub_tree = proto_tree_add_subtree_format(cast_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT, ett_cast_tree, NULL, "pictureFormat[%d]", i);
582 proto_tree_add_item(cast_sub_tree, hf_cast_format, tvb, count, 4, ENC_LITTLE_ENDIAN);
583 count += 4;
584 proto_tree_add_item(cast_sub_tree, hf_cast_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN);
585 count += 4;
587 cast_sub_tree = cast_sub_tree_sav;
588 proto_tree_add_item(cast_sub_tree, hf_cast_confServiceNum, tvb, count, 4, ENC_LITTLE_ENDIAN);
589 count += 4;
591 /* add H261 part of union */
592 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "h261VideoCapability");
593 proto_tree_add_item(cast_sub_tree, hf_cast_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
594 proto_tree_add_item(cast_sub_tree, hf_cast_stillImageTransmission, tvb, count+4, 4, ENC_LITTLE_ENDIAN);
596 /* add H263 part of union */
597 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "h263VideoCapability");
598 proto_tree_add_item(cast_sub_tree, hf_cast_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN);
599 proto_tree_add_item(cast_sub_tree, hf_cast_annexNandWFutureUse, tvb, count+4, 4, ENC_LITTLE_ENDIAN);
601 /* add Vieo part of union */
602 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "vieoVideoCapability");
603 proto_tree_add_item(cast_sub_tree, hf_cast_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
604 count += 4;
605 proto_tree_add_item(cast_sub_tree, hf_cast_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
607 /* add data part of union */
608 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "dataParameters");
609 proto_tree_add_item(cast_sub_tree, hf_cast_protocolDependentData, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
610 proto_tree_add_item(cast_sub_tree, hf_cast_maxBitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
611 break;
613 case 0x6 : /* OpenMultiMediaReceiveChannelACK */
614 proto_tree_add_item(cast_tree, hf_cast_ORCStatus, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
615 proto_tree_add_item(cast_tree, hf_cast_ipAddress, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
616 proto_tree_add_item(cast_tree, hf_cast_portNumber, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
617 proto_tree_add_item(cast_tree, hf_cast_passThruPartyID, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
618 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
619 break;
621 case 0x7 : /* CloseMultiMediaReceiveChannel */
622 proto_tree_add_item(cast_tree, hf_cast_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
623 proto_tree_add_item(cast_tree, hf_cast_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
624 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
625 break;
627 case 0x8 : /* StartMultiMediaTransmission */
628 proto_tree_add_item(cast_tree, hf_cast_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
629 proto_tree_add_item(cast_tree, hf_cast_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
630 proto_tree_add_item(cast_tree, hf_cast_payloadCapability, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
631 proto_tree_add_item(cast_tree, hf_cast_ipAddress, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
632 proto_tree_add_item(cast_tree, hf_cast_portNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
633 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
634 proto_tree_add_item(cast_tree, hf_cast_payload_rfc_number, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
635 proto_tree_add_item(cast_tree, hf_cast_payloadType, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
636 proto_tree_add_item(cast_tree, hf_cast_DSCPValue, tvb, offset+44, 4, ENC_LITTLE_ENDIAN);
638 /* add video part of union */
639 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 30, ett_cast_tree, NULL, "videoParameters");
640 proto_tree_add_item(cast_sub_tree, hf_cast_bitRate, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
641 proto_tree_add_item(cast_sub_tree, hf_cast_pictureFormatCount, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
642 cast_sub_tree_sav = cast_sub_tree;
643 count = offset+56;
644 for ( i = 0; i < MAX_PICTURE_FORMAT; i++ ) {
645 cast_sub_tree = proto_tree_add_subtree_format(cast_sub_tree_sav, tvb, offset, 8 * MAX_PICTURE_FORMAT,
646 ett_cast_tree, NULL, "pictureFormat[%d]", i);
647 proto_tree_add_item(cast_sub_tree, hf_cast_format, tvb, count, 4, ENC_LITTLE_ENDIAN);
648 count += 4;
649 proto_tree_add_item(cast_sub_tree, hf_cast_MPI, tvb, count, 4, ENC_LITTLE_ENDIAN);
650 count += 4;
652 cast_sub_tree = cast_sub_tree_sav;
653 proto_tree_add_item(cast_sub_tree, hf_cast_confServiceNum, tvb, count, 4, ENC_LITTLE_ENDIAN);
654 count += 4;
656 val = count;
657 /* add H261 part of union */
658 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "h261VideoCapability");
659 proto_tree_add_item(cast_sub_tree, hf_cast_temporalSpatialTradeOffCapability, tvb, count, 4, ENC_LITTLE_ENDIAN);
660 count += 4;
661 proto_tree_add_item(cast_sub_tree, hf_cast_stillImageTransmission, tvb, count, 4, ENC_LITTLE_ENDIAN);
663 /* add H263 part of union */
664 count = val;
665 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "h263VideoCapability");
666 proto_tree_add_item(cast_sub_tree, hf_cast_h263_capability_bitfield, tvb, count, 4, ENC_LITTLE_ENDIAN);
667 count += 4;
668 proto_tree_add_item(cast_sub_tree, hf_cast_annexNandWFutureUse, tvb, count, 4, ENC_LITTLE_ENDIAN);
670 /* add Vieo part of union */
671 count = val;
672 cast_sub_tree = proto_tree_add_subtree(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "vieoVideoCapability");
673 proto_tree_add_item(cast_sub_tree, hf_cast_modelNumber, tvb, count, 4, ENC_LITTLE_ENDIAN);
674 count += 4;
675 proto_tree_add_item(cast_sub_tree, hf_cast_bandwidth, tvb, count, 4, ENC_LITTLE_ENDIAN);
677 /* add data part of union */
678 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "dataParameters");
679 proto_tree_add_item(cast_sub_tree, hf_cast_protocolDependentData, tvb, offset+48, 4, ENC_LITTLE_ENDIAN);
680 proto_tree_add_item(cast_sub_tree, hf_cast_maxBitRate, tvb, offset+52, 4, ENC_LITTLE_ENDIAN);
681 break;
683 case 0x9 : /* StopMultiMediaTransmission */
684 proto_tree_add_item(cast_tree, hf_cast_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
685 proto_tree_add_item(cast_tree, hf_cast_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
686 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
687 break;
689 case 0xA : /* MiscellaneousCommand */
690 proto_tree_add_item(cast_tree, hf_cast_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
691 proto_tree_add_item(cast_tree, hf_cast_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
692 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
693 proto_tree_add_item(cast_tree, hf_cast_miscCommandType, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
695 /* show videoFreezePicture */
696 /* not sure of format */
698 /* show videoFastUpdatePicture */
699 /* not sure of format */
701 /* show videoFastUpdateGOB */
702 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "videoFastUpdateGOB");
703 proto_tree_add_item(cast_sub_tree, hf_cast_firstGOB, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
704 proto_tree_add_item(cast_sub_tree, hf_cast_numberOfGOBs, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
706 /* show videoFastUpdateMB */
707 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "videoFastUpdateGOB");
708 proto_tree_add_item(cast_sub_tree, hf_cast_firstGOB, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
709 proto_tree_add_item(cast_sub_tree, hf_cast_firstMB, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
710 proto_tree_add_item(cast_sub_tree, hf_cast_numberOfMBs, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
712 /* show lostPicture */
713 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "lostPicture");
714 proto_tree_add_item(cast_sub_tree, hf_cast_pictureNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
715 proto_tree_add_item(cast_sub_tree, hf_cast_longTermPictureIndex, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
717 /* show lostPartialPicture */
718 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "lostPartialPicture");
719 proto_tree_add_item(cast_sub_tree, hf_cast_pictureNumber, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
720 proto_tree_add_item(cast_sub_tree, hf_cast_longTermPictureIndex, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
721 proto_tree_add_item(cast_sub_tree, hf_cast_firstMB, tvb, offset+36, 4, ENC_LITTLE_ENDIAN);
722 proto_tree_add_item(cast_sub_tree, hf_cast_numberOfMBs, tvb, offset+40, 4, ENC_LITTLE_ENDIAN);
724 /* show recoveryReferencePicture */
725 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "recoveryReferencePicture");
726 proto_tree_add_item(cast_sub_tree, hf_cast_recoveryReferencePictureCount, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
727 cast_sub_tree_sav = cast_sub_tree;
728 for ( i = 0; i < MAX_REFERENCE_PICTURE; i++ ) {
729 cast_sub_tree = proto_tree_add_subtree_format(cast_sub_tree_sav, tvb, offset, 8, ett_cast_tree, NULL, "recoveryReferencePicture[%d]", i);
730 proto_tree_add_item(cast_sub_tree, hf_cast_pictureNumber, tvb, offset+32+(i*8), 4, ENC_LITTLE_ENDIAN);
731 proto_tree_add_item(cast_sub_tree, hf_cast_longTermPictureIndex, tvb, offset+36+(i*8), 4, ENC_LITTLE_ENDIAN);
734 /* show temporalSpatialTradeOff */
735 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 4, ett_cast_tree, NULL, "temporalSpatialTradeOff");
736 proto_tree_add_item(cast_sub_tree, hf_cast_temporalSpatialTradeOff, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
737 break;
739 case 0xB : /* FlowControlCommand */
740 proto_tree_add_item(cast_tree, hf_cast_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
741 proto_tree_add_item(cast_tree, hf_cast_passThruPartyID, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
742 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
743 proto_tree_add_item(cast_tree, hf_cast_maxBitRate, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
744 break;
746 case 0xC : /* ClearConference */
747 proto_tree_add_item(cast_tree, hf_cast_conferenceID, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
748 proto_tree_add_item(cast_tree, hf_cast_serviceNum, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
749 break;
751 case 0xD : /* CallState */
752 proto_tree_add_item(cast_tree, hf_cast_callState, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
753 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
754 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+20, 4, ENC_LITTLE_ENDIAN);
755 proto_tree_add_item(cast_tree, hf_cast_privacy, tvb, offset+24, 4, ENC_LITTLE_ENDIAN);
756 proto_tree_add_item(cast_tree, hf_cast_precedenceLv, tvb, offset+28, 4, ENC_LITTLE_ENDIAN);
757 proto_tree_add_item(cast_tree, hf_cast_precedenceDm, tvb, offset+32, 4, ENC_LITTLE_ENDIAN);
758 break;
760 case 0xE : /* RequestCallState */
761 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
762 break;
764 case 0xF : /* RequestAllCallStates */
765 /* no data in message */
766 break;
768 case 0x10 : /* CallInfo */
769 i = offset+12;
770 proto_tree_add_item(cast_tree, hf_cast_callingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
771 i += StationMaxNameSize;
772 proto_tree_add_item(cast_tree, hf_cast_callingParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
773 i += StationMaxDirnumSize;
774 proto_tree_add_item(cast_tree, hf_cast_calledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
775 i += StationMaxNameSize;
776 proto_tree_add_item(cast_tree, hf_cast_calledParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
777 i += StationMaxDirnumSize;
778 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, i, 4, ENC_LITTLE_ENDIAN);
779 i += 4;
780 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, i, 4, ENC_LITTLE_ENDIAN);
781 i += 4;
782 proto_tree_add_item(cast_tree, hf_cast_callType, tvb, i, 4, ENC_LITTLE_ENDIAN);
783 i += 4;
784 proto_tree_add_item(cast_tree, hf_cast_originalCalledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
785 i += StationMaxNameSize;
786 proto_tree_add_item(cast_tree, hf_cast_originalCalledParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
787 i += StationMaxDirnumSize;
788 proto_tree_add_item(cast_tree, hf_cast_lastRedirectingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
789 i += StationMaxNameSize;
790 proto_tree_add_item(cast_tree, hf_cast_lastRedirectingParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
791 i += StationMaxDirnumSize;
792 proto_tree_add_item(cast_tree, hf_cast_originalCdpnRedirectReason, tvb, i, 4, ENC_LITTLE_ENDIAN);
793 i += 4;
794 proto_tree_add_item(cast_tree, hf_cast_lastRedirectingReason, tvb, i, 4, ENC_LITTLE_ENDIAN);
795 i += 4;
796 proto_tree_add_item(cast_tree, hf_cast_cgpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
797 i += StationMaxDirnumSize;
798 proto_tree_add_item(cast_tree, hf_cast_cdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
799 i += StationMaxDirnumSize;
800 proto_tree_add_item(cast_tree, hf_cast_originalCdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
801 i += StationMaxDirnumSize;
802 proto_tree_add_item(cast_tree, hf_cast_lastRedirectingVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
803 i += StationMaxDirnumSize;
804 proto_tree_add_item(cast_tree, hf_cast_callInstance, tvb, i, 4, ENC_LITTLE_ENDIAN);
805 i += 4;
806 proto_tree_add_item(cast_tree, hf_cast_callSecurityStatus, tvb, i, 4, ENC_LITTLE_ENDIAN);
807 i += 4;
808 cast_sub_tree = proto_tree_add_subtree(cast_tree, tvb, offset, 8, ett_cast_tree, NULL, "partyPIRestrictionBits");
809 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CallingPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
810 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CallingPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
811 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CalledPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
812 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CalledPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
813 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_OriginalCalledPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
814 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
815 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_LastRedirectPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
816 proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
817 break;
819 case 0x11 : /* RequestCallInfo */
820 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
821 break;
823 case 0x12 : /* CallFocus */
824 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
825 proto_tree_add_item(cast_tree, hf_cast_callIdentifier, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
826 break;
828 case 0x13 : /* MakeCall */
829 proto_tree_add_item(cast_tree, hf_cast_calledParty, tvb, offset+12, StationMaxDirnumSize, ENC_ASCII);
830 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
831 break;
833 case 0x14 : /* HangUp */
834 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
835 break;
837 case 0x15 : /* Answer */
838 proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
839 break;
841 case 0x40 : /* keepAliveAck */
842 /* no data in message */
843 break;
845 case 0x41 : /* StreamStart */
846 /* no data in message */
847 break;
849 case 0x42 : /* StreamStop */
850 /* no data in message */
851 break;
853 case 0x43 : /* MuteStart */
854 /* no data in message */
855 break;
857 case 0x44 : /* MuteStop */
858 /* no data in message */
859 break;
861 case 0x45 : /* SpeakerStart */
862 /* no data in message */
863 break;
865 case 0x46 : /* SpeakerStop */
866 /* no data in message */
867 break;
869 case 0x47 : /* StreamStartMessageWithCodec */
870 proto_tree_add_item(cast_tree, hf_cast_audio, tvb, offset+12, 4, ENC_LITTLE_ENDIAN);
871 break;
874 case 0x50 : /* VIEODiscoveryprotocol */
875 break;
877 case 0x51 : /* VIEOControlprotocol */
878 break;
881 case 0x60 : /* VeT120protocol */
882 break;
884 case 0x61 : /* VeT121protocol */
885 break;
887 case 0x62 : /* VeT122protocol */
888 break;
891 case 0x70 : /* IMSessionDiscoveryprotocol */
892 break;
894 case 0x71 : /* IMSessionControlprotocol */
895 break;
898 case 0x74 : /* SlidesDiscoveryprotocol */
899 break;
901 case 0x75 : /* SlidesControlprotocol */
902 break;
905 case 0x80 : /* Tunnel */
906 break;
908 case 0x90 : /* RemoteInfoRequest */
909 i = offset+12;
910 proto_tree_add_item(cast_tree, hf_cast_stationFriendlyName, tvb, i, StationMaxNameSize, ENC_ASCII);
911 i += StationMaxNameSize;
912 proto_tree_add_item(cast_tree, hf_cast_stationGUID, tvb, i, StationMaxNameSize, ENC_ASCII);
913 i += StationMaxNameSize;
914 proto_tree_add_item(cast_tree, hf_cast_requestorIpAddress, tvb, i, 4, ENC_LITTLE_ENDIAN);
915 break;
917 case 0x91 : /* RemoteInfoResponse */
918 i = offset+12;
919 proto_tree_add_item(cast_tree, hf_cast_stationFriendlyName, tvb, i, StationMaxNameSize, ENC_ASCII);
920 i += StationMaxNameSize;
921 proto_tree_add_item(cast_tree, hf_cast_stationGUID, tvb, i, StationMaxNameSize, ENC_ASCII);
922 i += StationMaxNameSize;
923 proto_tree_add_item(cast_tree, hf_cast_stationIpAddress, tvb, i, 4, ENC_LITTLE_ENDIAN);
924 i += 4;
925 proto_tree_add_item(cast_tree, hf_cast_directoryNumber, tvb, i, StationMaxNameSize, ENC_ASCII);
926 break;
929 case 0xA0 : /* CollabDiscoveryprotocol */
930 break;
932 case 0xA1 : /* CollabControlprotocol */
933 break;
936 case 0xA4 : /* FECCDiscoveryprotocol */
937 break;
939 case 0xA5 : /* FECCControlprotocol */
940 break;
943 case 0xB0 : /* ClockSyncprotocol */
944 break;
946 case 0xB1 : /* StreamSyncprotocol */
947 break;
950 case 0xB4 : /* MediaDiscoveryprotocol */
951 break;
953 case 0xB5 : /* MediaControlprotocol */
954 break;
957 case 0xC0 : /* SessionDiscoveryprotocol */
958 break;
960 case 0xC1 : /* SessionControlprotocol */
961 break;
964 case 0xC4 : /* ConferenceDiscoveryprotocol */
965 break;
967 case 0xC5 : /* Conferenceprotocol */
968 break;
971 case 0xCC : /* SCCPCallControlProxyprotocol */
972 break;
975 case 0xD0 : /* CallDiscoveryprotocol */
976 break;
978 case 0xD1 : /* CallControlprotocol */
979 break;
982 default:
983 break;
987 return tvb_reported_length(tvb);
990 /* Get the length of a single CAST PDU */
991 static unsigned
992 get_cast_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
994 uint32_t hdr_data_length;
997 * Get the length of the CAST packet.
999 hdr_data_length = tvb_get_letohl(tvb, offset);
1002 * That length doesn't include the length of the header itself;
1003 * add that in.
1005 return hdr_data_length + 8;
1008 /* Code to actually dissect the packets */
1009 static int
1010 dissect_cast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
1012 /* The general structure of a packet: {IP-Header|TCP-Header|n*CAST}
1013 * CAST-Packet: {Header(Size, Reserved)|Data(MessageID, Message-Data)}
1015 /* Header fields */
1016 uint32_t hdr_data_length;
1017 uint32_t hdr_marker;
1019 /* check, if this is really an SKINNY packet, they start with a length + 0 */
1021 /* get relevant header information */
1022 hdr_data_length = tvb_get_letohl(tvb, 0);
1023 hdr_marker = tvb_get_letohl(tvb, 4);
1025 /* data_size = MIN(8+hdr_data_length, tvb_reported_length(tvb)) - 0xC; */
1027 if (hdr_data_length < 4 || hdr_marker != 0) {
1028 return 0;
1031 /* Make entries in Protocol column and Info column on summary display */
1032 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CAST");
1034 col_set_str(pinfo->cinfo, COL_INFO, "Cast Client Control Protocol");
1035 tcp_dissect_pdus(tvb, pinfo, tree, cast_desegment, 4, get_cast_pdu_len, dissect_cast_pdu, data);
1036 return tvb_reported_length(tvb);
1039 /* Register the protocol with Wireshark */
1040 void
1041 proto_register_cast(void)
1043 /* Setup list of header fields */
1044 static hf_register_info hf[] = {
1045 { &hf_cast_data_length,
1046 { "Data Length", "cast.data_length",
1047 FT_UINT32, BASE_DEC, NULL, 0x0,
1048 "Number of bytes in the data portion.",
1049 HFILL }
1052 { &hf_cast_reserved,
1053 { "Marker", "cast.marker",
1054 FT_UINT32, BASE_HEX, NULL, 0x0,
1055 "Marker value should ne zero.",
1056 HFILL }
1059 /* FIXME: Enable use of message name ??? */
1060 { &hf_cast_messageid,
1061 { "Message ID", "cast.messageid",
1062 FT_UINT32, BASE_HEX, VALS(message_id), 0x0,
1063 "The function requested/done with this message.",
1064 HFILL }
1067 { &hf_cast_version,
1068 { "Version", "cast.version",
1069 FT_UINT32, BASE_DEC, NULL, 0x0,
1070 "The version in the keepalive version messages.",
1071 HFILL }
1074 { &hf_cast_ORCStatus,
1075 { "ORCStatus", "cast.ORCStatus",
1076 FT_UINT32, BASE_DEC, VALS(orcStatus), 0x0,
1077 "The status of the opened receive channel.",
1078 HFILL }
1081 { &hf_cast_ipAddress,
1082 { "IP Address", "cast.ipAddress",
1083 FT_IPv4, BASE_NONE, NULL, 0x0,
1084 NULL, HFILL }
1087 { &hf_cast_portNumber,
1088 { "Port Number", "cast.portNumber",
1089 FT_UINT32, BASE_DEC, NULL, 0x0,
1090 NULL, HFILL }
1093 { &hf_cast_passThruPartyID,
1094 { "PassThruPartyID", "cast.passThruPartyID",
1095 FT_UINT32, BASE_DEC, NULL, 0x0,
1096 NULL, HFILL }
1099 { &hf_cast_callIdentifier,
1100 { "Call Identifier", "cast.callIdentifier",
1101 FT_UINT32, BASE_DEC, NULL, 0x0,
1102 "Call identifier for this call.",
1103 HFILL }
1106 { &hf_cast_conferenceID,
1107 { "Conference ID", "cast.conferenceID",
1108 FT_UINT32, BASE_DEC, NULL, 0x0,
1109 NULL, HFILL }
1112 { &hf_cast_payloadType,
1113 { "PayloadType", "cast.payloadType",
1114 FT_UINT32, BASE_DEC, NULL, 0x0,
1115 NULL, HFILL }
1118 { &hf_cast_lineInstance,
1119 { "Line Instance", "cast.lineInstance",
1120 FT_UINT32, BASE_DEC, NULL, 0x0,
1121 "The display call plane associated with this call.",
1122 HFILL }
1125 { &hf_cast_payloadCapability,
1126 { "PayloadCapability", "cast.payloadCapability",
1127 FT_UINT32, BASE_DEC, VALS(mediaPayloads), 0x0,
1128 "The payload capability for this media capability structure.",
1129 HFILL }
1132 { &hf_cast_isConferenceCreator,
1133 { "IsConferenceCreator", "cast.isConferenceCreator",
1134 FT_UINT32, BASE_DEC, NULL, 0x0,
1135 NULL, HFILL }
1138 { &hf_cast_payload_rfc_number,
1139 { "Payload_rfc_number", "cast.payload_rfc_number",
1140 FT_UINT32, BASE_DEC, NULL, 0x0,
1141 NULL, HFILL }
1144 { &hf_cast_videoCapCount,
1145 { "VideoCapCount", "cast.videoCapCount",
1146 FT_UINT32, BASE_DEC, NULL, 0x0,
1147 NULL, HFILL }
1150 { &hf_cast_dataCapCount,
1151 { "DataCapCount", "cast.dataCapCount",
1152 FT_UINT32, BASE_DEC, NULL, 0x0,
1153 NULL, HFILL }
1156 { &hf_cast_RTPPayloadFormat,
1157 { "RTPPayloadFormat", "cast.RTPPayloadFormat",
1158 FT_UINT32, BASE_DEC, NULL, 0x0,
1159 NULL, HFILL }
1162 { &hf_cast_customPictureFormatCount,
1163 { "CustomPictureFormatCount", "cast.customPictureFormatCount",
1164 FT_UINT32, BASE_DEC, NULL, 0x0,
1165 NULL, HFILL }
1168 { &hf_cast_pictureWidth,
1169 { "PictureWidth", "cast.pictureWidth",
1170 FT_UINT32, BASE_DEC, NULL, 0x0,
1171 NULL, HFILL }
1174 { &hf_cast_pictureHeight,
1175 { "PictureHeight", "cast.pictureHeight",
1176 FT_UINT32, BASE_DEC, NULL, 0x0,
1177 NULL, HFILL }
1180 { &hf_cast_pixelAspectRatio,
1181 { "PixelAspectRatio", "cast.pixelAspectRatio",
1182 FT_UINT32, BASE_DEC, NULL, 0x0,
1183 NULL, HFILL }
1186 { &hf_cast_clockConversionCode,
1187 { "ClockConversionCode", "cast.clockConversionCode",
1188 FT_UINT32, BASE_DEC, NULL, 0x0,
1189 NULL, HFILL }
1192 { &hf_cast_clockDivisor,
1193 { "ClockDivisor", "cast.clockDivisor",
1194 FT_UINT32, BASE_DEC, NULL, 0x0,
1195 NULL, HFILL }
1198 { &hf_cast_activeStreamsOnRegistration,
1199 { "ActiveStreamsOnRegistration", "cast.activeStreamsOnRegistration",
1200 FT_UINT32, BASE_DEC, NULL, 0x0,
1201 NULL, HFILL }
1204 { &hf_cast_maxBW,
1205 { "MaxBW", "cast.maxBW",
1206 FT_UINT32, BASE_DEC, NULL, 0x0,
1207 NULL, HFILL }
1210 { &hf_cast_serviceResourceCount,
1211 { "ServiceResourceCount", "cast.serviceResourceCount",
1212 FT_UINT32, BASE_DEC, NULL, 0x0,
1213 NULL, HFILL }
1216 { &hf_cast_layoutCount,
1217 { "LayoutCount", "cast.layoutCount",
1218 FT_UINT32, BASE_DEC, NULL, 0x0,
1219 NULL, HFILL }
1222 { &hf_cast_layout,
1223 { "Layout", "cast.layout",
1224 FT_UINT32, BASE_DEC, VALS(cast_Layouts), 0x0,
1225 NULL, HFILL }
1228 { &hf_cast_maxConferences,
1229 { "MaxConferences", "cast.maxConferences",
1230 FT_UINT32, BASE_DEC, NULL, 0x0,
1231 NULL, HFILL }
1234 { &hf_cast_activeConferenceOnRegistration,
1235 { "ActiveConferenceOnRegistration", "cast.activeConferenceOnRegistration",
1236 FT_UINT32, BASE_DEC, NULL, 0x0,
1237 NULL, HFILL }
1240 { &hf_cast_transmitOrReceive,
1241 { "TransmitOrReceive", "cast.transmitOrReceive",
1242 FT_UINT32, BASE_DEC, VALS(cast_transmitOrReceive), 0x0,
1243 NULL, HFILL }
1246 { &hf_cast_levelPreferenceCount,
1247 { "LevelPreferenceCount", "cast.levelPreferenceCount",
1248 FT_UINT32, BASE_DEC, NULL, 0x0,
1249 NULL, HFILL }
1252 { &hf_cast_transmitPreference,
1253 { "TransmitPreference", "cast.transmitPreference",
1254 FT_UINT32, BASE_DEC, NULL, 0x0,
1255 NULL, HFILL }
1258 { &hf_cast_format,
1259 { "Format", "cast.format",
1260 FT_UINT32, BASE_DEC, VALS(cast_formatTypes), 0x0,
1261 NULL, HFILL }
1264 { &hf_cast_maxBitRate,
1265 { "MaxBitRate", "cast.maxBitRate",
1266 FT_UINT32, BASE_DEC, NULL, 0x0,
1267 NULL, HFILL }
1270 { &hf_cast_minBitRate,
1271 { "MinBitRate", "cast.minBitRate",
1272 FT_UINT32, BASE_DEC, NULL, 0x0,
1273 NULL, HFILL }
1276 { &hf_cast_MPI,
1277 { "MPI", "cast.MPI",
1278 FT_UINT32, BASE_DEC, NULL, 0x0,
1279 NULL, HFILL }
1282 { &hf_cast_serviceNumber,
1283 { "ServiceNumber", "cast.serviceNumber",
1284 FT_UINT32, BASE_DEC, NULL, 0x0,
1285 NULL, HFILL }
1288 { &hf_cast_temporalSpatialTradeOffCapability,
1289 { "TemporalSpatialTradeOffCapability", "cast.temporalSpatialTradeOffCapability",
1290 FT_UINT32, BASE_DEC, NULL, 0x0,
1291 NULL, HFILL }
1294 { &hf_cast_stillImageTransmission,
1295 { "StillImageTransmission", "cast.stillImageTransmission",
1296 FT_UINT32, BASE_DEC, NULL, 0x0,
1297 NULL, HFILL }
1300 { &hf_cast_h263_capability_bitfield,
1301 { "H263_capability_bitfield", "cast.h263_capability_bitfield",
1302 FT_UINT32, BASE_DEC, NULL, 0x0,
1303 NULL, HFILL }
1306 { &hf_cast_annexNandWFutureUse,
1307 { "AnnexNandWFutureUse", "cast.annexNandWFutureUse",
1308 FT_UINT32, BASE_DEC, NULL, 0x0,
1309 NULL, HFILL }
1312 { &hf_cast_modelNumber,
1313 { "ModelNumber", "cast.modelNumber",
1314 FT_UINT32, BASE_DEC, NULL, 0x0,
1315 NULL, HFILL }
1318 { &hf_cast_bandwidth,
1319 { "Bandwidth", "cast.bandwidth",
1320 FT_UINT32, BASE_DEC, NULL, 0x0,
1321 NULL, HFILL }
1324 { &hf_cast_protocolDependentData,
1325 { "ProtocolDependentData", "cast.protocolDependentData",
1326 FT_UINT32, BASE_DEC, NULL, 0x0,
1327 NULL, HFILL }
1330 { &hf_cast_DSCPValue,
1331 { "DSCPValue", "cast.DSCPValue",
1332 FT_UINT32, BASE_DEC, NULL, 0x0,
1333 NULL, HFILL }
1336 { &hf_cast_serviceNum,
1337 { "ServiceNum", "cast.serviceNum",
1338 FT_UINT32, BASE_DEC, NULL, 0x0,
1339 NULL, HFILL }
1342 #if 0
1343 { &hf_cast_precedenceValue,
1344 { "Precedence", "cast.precedenceValue",
1345 FT_UINT32, BASE_DEC, NULL, 0x0,
1346 NULL, HFILL }
1348 #endif
1350 { &hf_cast_maxStreams,
1351 { "MaxStreams", "cast.maxStreams",
1352 FT_UINT32, BASE_DEC, NULL, 0x0,
1353 "32 bit unsigned integer indicating the maximum number of simultaneous RTP duplex streams that the client can handle.",
1354 HFILL }
1357 { &hf_cast_millisecondPacketSize,
1358 { "MS/Packet", "cast.millisecondPacketSize",
1359 FT_UINT32, BASE_DEC, NULL, 0x0,
1360 "The number of milliseconds of conversation in each packet",
1361 HFILL }
1364 { &hf_cast_echoCancelType,
1365 { "Echo Cancel Type", "cast.echoCancelType",
1366 FT_UINT32, BASE_DEC, VALS(cast_echoCancelTypes), 0x0,
1367 "Is echo cancelling enabled or not",
1368 HFILL }
1371 { &hf_cast_g723BitRate,
1372 { "G723 BitRate", "cast.g723BitRate",
1373 FT_UINT32, BASE_DEC, VALS(cast_g723BitRates), 0x0,
1374 "The G723 bit rate for this stream/JUNK if not g723 stream",
1375 HFILL }
1378 { &hf_cast_pictureFormatCount,
1379 { "PictureFormatCount", "cast.pictureFormatCount",
1380 FT_UINT32, BASE_DEC, NULL, 0x0,
1381 NULL, HFILL }
1384 { &hf_cast_confServiceNum,
1385 { "ConfServiceNum", "cast.confServiceNum",
1386 FT_UINT32, BASE_DEC, NULL, 0x0,
1387 NULL, HFILL }
1390 { &hf_cast_miscCommandType,
1391 { "MiscCommandType", "cast.miscCommandType",
1392 FT_UINT32, BASE_DEC, VALS(cast_miscCommandType), 0x0,
1393 NULL, HFILL }
1396 { &hf_cast_temporalSpatialTradeOff,
1397 { "TemporalSpatialTradeOff", "cast.temporalSpatialTradeOff",
1398 FT_UINT32, BASE_DEC, NULL, 0x0,
1399 NULL, HFILL }
1402 { &hf_cast_firstGOB,
1403 { "FirstGOB", "cast.firstGOB",
1404 FT_UINT32, BASE_DEC, NULL, 0x0,
1405 NULL, HFILL }
1408 { &hf_cast_numberOfGOBs,
1409 { "NumberOfGOBs", "cast.numberOfGOBs",
1410 FT_UINT32, BASE_DEC, NULL, 0x0,
1411 NULL, HFILL }
1414 { &hf_cast_firstMB,
1415 { "FirstMB", "cast.firstMB",
1416 FT_UINT32, BASE_DEC, NULL, 0x0,
1417 NULL, HFILL }
1420 { &hf_cast_numberOfMBs,
1421 { "NumberOfMBs", "cast.numberOfMBs",
1422 FT_UINT32, BASE_DEC, NULL, 0x0,
1423 NULL, HFILL }
1426 { &hf_cast_pictureNumber,
1427 { "PictureNumber", "cast.pictureNumber",
1428 FT_UINT32, BASE_DEC, NULL, 0x0,
1429 NULL, HFILL }
1432 { &hf_cast_longTermPictureIndex,
1433 { "LongTermPictureIndex", "cast.longTermPictureIndex",
1434 FT_UINT32, BASE_DEC, NULL, 0x0,
1435 "LongTermPictureIndex.",
1436 HFILL }
1439 { &hf_cast_recoveryReferencePictureCount,
1440 { "RecoveryReferencePictureCount", "cast.recoveryReferencePictureCount",
1441 FT_UINT32, BASE_DEC, NULL, 0x0,
1442 "RecoveryReferencePictureCount.",
1443 HFILL }
1446 { &hf_cast_calledParty,
1447 { "CalledParty", "cast.calledParty",
1448 FT_STRING, BASE_NONE, NULL, 0x0,
1449 "The number called.",
1450 HFILL }
1453 { &hf_cast_privacy,
1454 { "Privacy", "cast.privacy",
1455 FT_UINT32, BASE_DEC, NULL, 0x0,
1456 NULL, HFILL }
1459 { &hf_cast_precedenceLv,
1460 { "PrecedenceLv", "cast.precedenceLv",
1461 FT_UINT32, BASE_DEC, NULL, 0x0,
1462 NULL, HFILL }
1465 { &hf_cast_precedenceDm,
1466 { "PrecedenceDm", "cast.precedenceDm",
1467 FT_UINT32, BASE_DEC, NULL, 0x0,
1468 NULL, HFILL }
1471 { &hf_cast_callState,
1472 { "CallState", "cast.callState",
1473 FT_UINT32, BASE_DEC, VALS(cast_callStateTypes), 0x0,
1474 NULL, HFILL }
1477 { &hf_cast_callingPartyName,
1478 { "Calling Party Name", "cast.callingPartyName",
1479 FT_STRING, BASE_NONE, NULL, 0x0,
1480 "The passed name of the calling party.",
1481 HFILL }
1484 { &hf_cast_callingParty,
1485 { "Calling Party", "cast.callingParty",
1486 FT_STRING, BASE_NONE, NULL, 0x0,
1487 "The passed number of the calling party.",
1488 HFILL }
1491 { &hf_cast_calledPartyName,
1492 { "Called Party Name", "cast.calledPartyName",
1493 FT_STRING, BASE_NONE, NULL, 0x0,
1494 "The name of the party we are calling.",
1495 HFILL }
1498 { &hf_cast_callType,
1499 { "Call Type", "cast.callType",
1500 FT_UINT32, BASE_DEC, VALS(cast_callTypes), 0x0,
1501 "What type of call, in/out/etc",
1502 HFILL }
1505 { &hf_cast_originalCalledPartyName,
1506 { "Original Called Party Name", "cast.originalCalledPartyName",
1507 FT_STRING, BASE_NONE, NULL, 0x0,
1508 "name of the original person who placed the call.",
1509 HFILL }
1512 { &hf_cast_originalCalledParty,
1513 { "Original Called Party", "cast.originalCalledParty",
1514 FT_STRING, BASE_NONE, NULL, 0x0,
1515 "The number of the original calling party.",
1516 HFILL }
1519 { &hf_cast_lastRedirectingPartyName,
1520 { "LastRedirectingPartyName", "cast.lastRedirectingPartyName",
1521 FT_STRING, BASE_NONE, NULL, 0x0,
1522 NULL, HFILL }
1525 { &hf_cast_lastRedirectingParty,
1526 { "LastRedirectingParty", "cast.lastRedirectingParty",
1527 FT_STRING, BASE_NONE, NULL, 0x0,
1528 NULL, HFILL }
1531 { &hf_cast_cgpnVoiceMailbox,
1532 { "CgpnVoiceMailbox", "cast.cgpnVoiceMailbox",
1533 FT_STRING, BASE_NONE, NULL, 0x0,
1534 NULL, HFILL }
1537 { &hf_cast_cdpnVoiceMailbox,
1538 { "CdpnVoiceMailbox", "cast.cdpnVoiceMailbox",
1539 FT_STRING, BASE_NONE, NULL, 0x0,
1540 NULL, HFILL }
1543 { &hf_cast_originalCdpnVoiceMailbox,
1544 { "OriginalCdpnVoiceMailbox", "cast.originalCdpnVoiceMailbox",
1545 FT_STRING, BASE_NONE, NULL, 0x0,
1546 NULL, HFILL }
1549 { &hf_cast_lastRedirectingVoiceMailbox,
1550 { "LastRedirectingVoiceMailbox", "cast.lastRedirectingVoiceMailbox",
1551 FT_STRING, BASE_NONE, NULL, 0x0,
1552 NULL, HFILL }
1555 { &hf_cast_originalCdpnRedirectReason,
1556 { "OriginalCdpnRedirectReason", "cast.originalCdpnRedirectReason",
1557 FT_UINT32, BASE_DEC, NULL, 0x0,
1558 NULL, HFILL }
1561 { &hf_cast_lastRedirectingReason,
1562 { "LastRedirectingReason", "cast.lastRedirectingReason",
1563 FT_UINT32, BASE_DEC, NULL, 0x0,
1564 NULL, HFILL }
1567 { &hf_cast_callInstance,
1568 { "CallInstance", "cast.callInstance",
1569 FT_UINT32, BASE_DEC, NULL, 0x0,
1570 NULL, HFILL }
1573 { &hf_cast_callSecurityStatus,
1574 { "CallSecurityStatus", "cast.callSecurityStatus",
1575 FT_UINT32, BASE_DEC, VALS(cast_callSecurityStatusTypes), 0x0,
1576 NULL, HFILL }
1579 { &hf_cast_partyPIRestrictionBits_CallingPartyName,
1580 { "RestrictCallingPartyName", "cast.partyPIRestrictionBits.CallingPartyName",
1581 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
1582 NULL, HFILL }
1585 { &hf_cast_partyPIRestrictionBits_CallingPartyNumber,
1586 { "RestrictCallingPartyNumber", "cast.partyPIRestrictionBits.CallingPartyNumber",
1587 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
1588 NULL, HFILL }
1591 { &hf_cast_partyPIRestrictionBits_CalledPartyName,
1592 { "RestrictCalledPartyName", "cast.partyPIRestrictionBits.CalledPartyName",
1593 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
1594 NULL, HFILL }
1597 { &hf_cast_partyPIRestrictionBits_CalledPartyNumber,
1598 { "RestrictCalledPartyNumber", "cast.partyPIRestrictionBits.CalledPartyNumber",
1599 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
1600 NULL, HFILL }
1603 { &hf_cast_partyPIRestrictionBits_OriginalCalledPartyName,
1604 { "RestrictOriginalCalledPartyName", "cast.partyPIRestrictionBits.OriginalCalledPartyName",
1605 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000010,
1606 NULL, HFILL }
1609 { &hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber,
1610 { "RestrictOriginalCalledPartyNumber", "cast.partyPIRestrictionBits.OriginalCalledPartyNumber",
1611 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000020,
1612 NULL, HFILL }
1615 { &hf_cast_partyPIRestrictionBits_LastRedirectPartyName,
1616 { "RestrictLastRedirectPartyName", "cast.partyPIRestrictionBits.LastRedirectPartyName",
1617 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000040,
1618 NULL, HFILL }
1621 { &hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber,
1622 { "RestrictLastRedirectPartyNumber", "cast.partyPIRestrictionBits.LastRedirectPartyNumber",
1623 FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000080,
1624 NULL, HFILL }
1627 { &hf_cast_directoryNumber,
1628 { "Directory Number", "cast.directoryNumber",
1629 FT_STRING, BASE_NONE, NULL, 0x0,
1630 "The number we are reporting statistics for.",
1631 HFILL }
1634 { &hf_cast_requestorIpAddress,
1635 { "RequestorIpAddress", "cast.requestorIpAddress",
1636 FT_IPv4, BASE_NONE, NULL, 0x0,
1637 NULL, HFILL }
1640 { &hf_cast_stationIpAddress,
1641 { "StationIpAddress", "cast.stationIpAddress",
1642 FT_IPv4, BASE_NONE, NULL, 0x0,
1643 NULL, HFILL }
1646 { &hf_cast_stationFriendlyName,
1647 { "StationFriendlyName", "cast.stationFriendlyName",
1648 FT_STRING, BASE_NONE, NULL, 0x0,
1649 NULL, HFILL }
1652 { &hf_cast_stationGUID,
1653 { "stationGUID", "cast.stationGUID",
1654 FT_STRING, BASE_NONE, NULL, 0x0,
1655 NULL, HFILL }
1658 { &hf_cast_audio,
1659 { "AudioCodec", "cast.audio",
1660 FT_UINT32, BASE_DEC, VALS(audioCodecTypes), 0x0,
1661 "The audio codec that is in use.",
1662 HFILL }
1665 { &hf_cast_bitRate,
1666 { "BitRate", "cast.bitRate",
1667 FT_UINT32, BASE_DEC, NULL, 0x0,
1668 NULL, HFILL }
1673 /* Setup protocol subtree array */
1674 static int *ett[] = {
1675 &ett_cast,
1676 &ett_cast_tree,
1679 module_t *cast_module;
1681 /* Register the protocol name and description */
1682 proto_cast = proto_register_protocol("Cast Client Control Protocol",
1683 "CAST", "cast");
1685 proto_register_field_array(proto_cast, hf, array_length(hf));
1686 proto_register_subtree_array(ett, array_length(ett));
1688 cast_module = prefs_register_protocol(proto_cast, NULL);
1689 prefs_register_bool_preference(cast_module, "reassembly", /*"desegment",*/
1690 "Reassemble CAST messages spanning multiple TCP segments",
1691 "Whether the CAST dissector should reassemble messages spanning multiple TCP segments."
1692 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
1693 &cast_desegment);
1695 cast_handle = register_dissector("cast", dissect_cast, proto_cast);
1698 void
1699 proto_reg_handoff_cast(void)
1701 dissector_add_uint_with_preference("tcp.port", TCP_PORT_CAST, cast_handle);
1705 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1707 * Local Variables:
1708 * c-basic-offset: 2
1709 * tab-width: 8
1710 * indent-tabs-mode: nil
1711 * End:
1713 * ex: set shiftwidth=2 tabstop=8 expandtab:
1714 * :indentSize=2:tabSize=8:noTabs=true: