3 * Dissector for the CAST Client Control Protocol
4 * (The "D-Channel"-Protocol for Cisco Systems' IP-Phones)
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 /* This implementation is based on a draft version of the 3.0
29 #include <epan/packet.h>
30 #include <epan/prefs.h>
32 #include "packet-tcp.h"
34 #define TCP_PORT_CAST 4224
36 void proto_register_cast(void);
37 void proto_reg_handoff_cast(void);
39 /* I will probably need this again when I change things
40 * to function pointers, but let me use the existing
41 * infrastructure for now
49 static const value_string message_id
[] = {
51 {0x0000, "KeepAliveMessage"},
52 {0x0001, "KeepAliveVersionMessage"},
53 {0x0002, "KeepAliveVersionACKMessage"},
54 {0x0003, "UpdateCapabilitiesMessage"},
55 {0x0004, "EmptyCapabilitiesMessage"},
56 {0x0005, "OpenMultiMediaReceiveChannelMessage"},
57 {0x0006, "OpenMultiMediaReceiveChannelACKMessage"},
58 {0x0007, "CloseMultiMediaReceiveChannelMessage"},
59 {0x0008, "StartMultiMediaTransmissionMessage"},
60 {0x0009, "StopMultiMediaTransmissionMessage"},
61 {0x000A, "MiscellaneousCommandMessage"},
62 {0x000B, "FlowControlCommandMessage"},
63 {0x000C, "ClearConferenceMessage"},
64 {0x000D, "CallStateMessage"},
65 {0x000E, "RequestCallStateMessage"},
66 {0x000F, "RequestAllCallStatesMessage"},
67 {0x0010, "CallInfoMessage"},
68 {0x0011, "RequestCallInfoMessage"},
69 {0x0012, "CallFocusMessage"},
70 {0x0013, "MakeCallMessage"},
71 {0x0014, "HangUpMessage"},
72 {0x0015, "AnswerMessage"},
74 {0x0040, "KeepAliveACKMessage"},
75 {0x0041, "StreamStartMessage"},
76 {0x0042, "StreamStopMessage"},
77 {0x0043, "MuteStartMessage"},
78 {0x0044, "MuteStopMessage"},
79 {0x0045, "SpeakerStartMessage"},
80 {0x0046, "SpeakerStopMessage"},
81 {0x0047, "StreamStartMessageWithCodec"},
83 {0x0050, "VIEODiscoveryprotocol"},
84 {0x0051, "VIEOControlprotocol"},
86 {0x0060, "T120protocol"},
87 {0x0061, "T121protocol"},
88 {0x0062, "T122protocol"},
90 {0x0070, "IMSessionDiscoveryprotocol"},
91 {0x0071, "IMSessionControlprotocol"},
93 {0x0074, "SlidesDiscoveryprotocol"},
94 {0x0075, "SlidesControlprotocol"},
96 {0x0080, "CastTunnelMessage"},
98 {0x0090, "RemoteRequestMessage"},
99 {0x0091, "RemoteResponseMessage"},
101 {0x00A0, "CollabDiscoveryprotocol"},
102 {0x00A1, "CollabControlprotocol"},
104 {0x00A4, "FECCDiscoveryprotocol"},
105 {0x00A5, "FECCControlprotocol"},
107 {0x00B0, "ClockSyncprotocol"},
108 {0x00B1, "StreamSyncprotocol"},
110 {0x00B4, "MediaDiscoveryprotocol"},
111 {0x00B5, "MediaControlprotocol"},
113 {0x00C0, "SessionDiscoveryprotocol"},
114 {0x00C1, "SessionControlprotocol"},
116 {0x00C4, "ConferenceDiscoveryprotocol"},
117 {0x00C5, "Conferenceprotocol"},
119 {0x00CC, "SCCPCallControlProxyprotocol"},
121 {0x00D0, "CallDiscoveryprotocol"},
122 {0x00D1, "CallControlprotocol"},
124 {0 , NULL
} /* terminator */
127 static const value_string audioCodecTypes
[] = {
137 static const value_string orcStatus
[] = {
143 static const value_string mediaPayloads
[] = {
144 { 1 , "Non-standard codec"},
145 { 2 , "G.711 A-law 64k"},
146 { 3 , "G.711 A-law 56k"},
147 { 4 , "G.711 u-law 64k"},
148 { 5 , "G.711 u-law 56k"},
155 { 12 , "G.729 Annex A"},
156 { 13 , "IS11172 AudioCap"}, /* IS11172 is an ISO MPEG standard */
157 { 14 , "IS13818 AudioCap"}, /* IS13818 is an ISO MPEG standard */
158 { 15 , "G.729 Annex B"},
159 { 16 , "G.729 Annex A+Annex B"},
160 { 18 , "GSM Full Rate"},
161 { 19 , "GSM Half Rate"},
162 { 20 , "GSM Enhanced Full Rate"},
163 { 25 , "Wideband 256k"},
167 { 81 , "ActiveVoice"},
172 { 86 , "G.729B Low Complexity"},
178 {257 , "RFC2833_DynPayload"},
182 static const value_string cast_Layouts
[] = {
187 { 4 , "TwoByTwo3Alt1"},
188 { 5 , "TwoByTwo3Alt2"},
189 { 6 , "ThreeByThree"},
190 { 7 , "ThreeByThree6Alt1"},
191 { 8 , "ThreeByThree6Alt2"},
192 { 9 , "ThreeByThree4Alt1"},
193 {10 , "ThreeByThree4Alt2"},
197 static const value_string cast_transmitOrReceive
[] = {
198 {1 , "Station_Receive_only"},
199 {2 , "Station_Transmit_only"},
200 {3 , "Station_Receive_Transmit"},
204 static const value_string cast_formatTypes
[] = {
205 {1 , "sqcif (128x96)"},
206 {2 , "qcif (176x144)"},
207 {3 , "cif (352x288)"},
208 {4 , "4cif (704x576)"},
209 {5 , "16cif (1408x1152)"},
214 static const value_string cast_echoCancelTypes
[] = {
215 {0 , "Media_EchoCancellation_Off"},
216 {1 , "Media_EchoCancellation_On"},
220 static const value_string cast_g723BitRates
[] = {
221 {1 , "Media_G723BRate_5_3"},
222 {2 , "Media_G723BRate_6_4"},
226 static const value_string cast_miscCommandType
[] = {
227 {0 , "videoFreezePicture"},
228 {1 , "videoFastUpdatePicture"},
229 {2 , "videoFastUpdateGOB"},
230 {3 , "videoFastUpdateMB"},
232 {5 , "lostPartialPicture"},
233 {6 , "recoveryReferencePicture"},
234 {7 , "temporalSpatialTradeOff"},
238 static const value_string cast_callStateTypes
[] = {
244 { 5 , "TsConnected"},
246 { 7 , "TsCongestion"},
248 { 9 , "TsCallWaiting"},
249 {10 , "TsCallTransfer"},
252 {13 , "TsCallRemoteMultiline"},
253 {14 , "TsInvalidNumber"},
258 /* Defined Call Type */
259 static const value_string cast_callTypes
[] = {
261 {2 , "OutBoundCall"},
266 static const value_string cast_callSecurityStatusTypes
[] = {
267 {0 , "CallSecurityStatusUnknown"},
268 {1 , "CallSecurityStatusNotAuthenticated"},
269 {2 , "CallSecurityStatusAuthenticated"},
274 #define MAX_CUSTOM_PICTURES 6
275 #define MAX_SERVICE_TYPE 4
276 #define MAX_LAYOUT_WITH_SAME_SERVICE 5
277 #define MAX_PICTURE_FORMAT 5
278 #define MAX_REFERENCE_PICTURE 4
279 #define MAX_LEVEL_PREFERENCE 4
280 #define StationMaxVideoCapabilities 10
281 #define StationMaxDataCapabilities 5
282 #define StationMaxNameSize 40 /* max size of calling party's name */
283 #define StationMaxDirnumSize 24 /* max size of calling or called party dirnum */
286 /* Initialize the protocol and registered fields */
287 static int proto_cast
= -1;
288 static int hf_cast_data_length
= -1;
289 static int hf_cast_reserved
= -1;
290 static int hf_cast_messageid
= -1;
291 static int hf_cast_version
= -1;
292 static int hf_cast_ORCStatus
= -1;
293 static int hf_cast_ipAddress
= -1;
294 static int hf_cast_portNumber
= -1;
295 static int hf_cast_passThruPartyID
= -1;
296 static int hf_cast_callIdentifier
= -1;
297 static int hf_cast_conferenceID
= -1;
298 static int hf_cast_payloadType
= -1;
299 static int hf_cast_lineInstance
= -1;
300 static int hf_cast_payloadCapability
= -1;
301 static int hf_cast_isConferenceCreator
= -1;
302 static int hf_cast_payload_rfc_number
= -1;
303 static int hf_cast_videoCapCount
= -1;
304 static int hf_cast_dataCapCount
= -1;
305 static int hf_cast_RTPPayloadFormat
= -1;
306 static int hf_cast_customPictureFormatCount
= -1;
307 static int hf_cast_pictureWidth
= -1;
308 static int hf_cast_pictureHeight
= -1;
309 static int hf_cast_pixelAspectRatio
= -1;
310 static int hf_cast_clockConversionCode
= -1;
311 static int hf_cast_clockDivisor
= -1;
312 static int hf_cast_activeStreamsOnRegistration
= -1;
313 static int hf_cast_maxBW
= -1;
314 static int hf_cast_serviceResourceCount
= -1;
315 static int hf_cast_layoutCount
= -1;
316 static int hf_cast_layout
= -1;
317 static int hf_cast_maxConferences
= -1;
318 static int hf_cast_activeConferenceOnRegistration
= -1;
319 static int hf_cast_transmitOrReceive
= -1;
320 static int hf_cast_levelPreferenceCount
= -1;
321 static int hf_cast_transmitPreference
= -1;
322 static int hf_cast_format
= -1;
323 static int hf_cast_maxBitRate
= -1;
324 static int hf_cast_minBitRate
= -1;
325 static int hf_cast_MPI
= -1;
326 static int hf_cast_serviceNumber
= -1;
327 static int hf_cast_temporalSpatialTradeOffCapability
= -1;
328 static int hf_cast_stillImageTransmission
= -1;
329 static int hf_cast_h263_capability_bitfield
= -1;
330 static int hf_cast_annexNandWFutureUse
= -1;
331 static int hf_cast_modelNumber
= -1;
332 static int hf_cast_bandwidth
= -1;
333 static int hf_cast_protocolDependentData
= -1;
334 static int hf_cast_DSCPValue
= -1;
335 static int hf_cast_serviceNum
= -1;
336 /* static int hf_cast_precedenceValue = -1; */
337 static int hf_cast_maxStreams
= -1;
338 static int hf_cast_millisecondPacketSize
= -1;
339 static int hf_cast_echoCancelType
= -1;
340 static int hf_cast_g723BitRate
= -1;
341 static int hf_cast_bitRate
= -1;
342 static int hf_cast_pictureFormatCount
= -1;
343 static int hf_cast_confServiceNum
= -1;
344 static int hf_cast_miscCommandType
= -1;
345 static int hf_cast_temporalSpatialTradeOff
= -1;
346 static int hf_cast_firstGOB
= -1;
347 static int hf_cast_numberOfGOBs
= -1;
348 static int hf_cast_firstMB
= -1;
349 static int hf_cast_numberOfMBs
= -1;
350 static int hf_cast_pictureNumber
= -1;
351 static int hf_cast_longTermPictureIndex
= -1;
352 static int hf_cast_recoveryReferencePictureCount
= -1;
353 static int hf_cast_calledParty
= -1;
354 static int hf_cast_privacy
= -1;
355 static int hf_cast_precedenceLv
= -1;
356 static int hf_cast_precedenceDm
= -1;
357 static int hf_cast_callState
= -1;
358 static int hf_cast_callingPartyName
= -1;
359 static int hf_cast_callingParty
= -1;
360 static int hf_cast_calledPartyName
= -1;
361 static int hf_cast_callType
= -1;
362 static int hf_cast_originalCalledPartyName
= -1;
363 static int hf_cast_originalCalledParty
= -1;
364 static int hf_cast_lastRedirectingPartyName
= -1;
365 static int hf_cast_lastRedirectingParty
= -1;
366 static int hf_cast_cgpnVoiceMailbox
= -1;
367 static int hf_cast_cdpnVoiceMailbox
= -1;
368 static int hf_cast_originalCdpnVoiceMailbox
= -1;
369 static int hf_cast_lastRedirectingVoiceMailbox
= -1;
370 static int hf_cast_originalCdpnRedirectReason
= -1;
371 static int hf_cast_lastRedirectingReason
= -1;
372 static int hf_cast_callInstance
= -1;
373 static int hf_cast_callSecurityStatus
= -1;
374 static int hf_cast_partyPIRestrictionBits_CallingPartyName
= -1;
375 static int hf_cast_partyPIRestrictionBits_CallingPartyNumber
= -1;
376 static int hf_cast_partyPIRestrictionBits_CalledPartyName
= -1;
377 static int hf_cast_partyPIRestrictionBits_CalledPartyNumber
= -1;
378 static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyName
= -1;
379 static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber
= -1;
380 static int hf_cast_partyPIRestrictionBits_LastRedirectPartyName
= -1;
381 static int hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber
= -1;
382 static int hf_cast_directoryNumber
= -1;
383 static int hf_cast_requestorIpAddress
= -1;
384 static int hf_cast_stationIpAddress
= -1;
385 static int hf_cast_stationFriendlyName
= -1;
386 static int hf_cast_stationGUID
= -1;
387 static int hf_cast_audio
= -1;
391 /* Initialize the subtree pointers */
392 static gint ett_cast
= -1;
393 static gint ett_cast_tree
= -1;
395 /* desegmentation of SCCP */
396 static gboolean cast_desegment
= TRUE
;
398 static dissector_handle_t data_handle
;
400 /* Dissect a single CAST PDU */
402 dissect_cast_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
407 guint32 hdr_data_length
;
409 guint32 data_messageid
;
410 const gchar
*messageid_str
;
411 /* guint32 data_size; */
418 /* Set up structures we will need to add the protocol subtree and manage it */
420 proto_tree
*cast_tree
= NULL
;
422 proto_tree
*cast_sub_tree
;
423 proto_tree
*cast_sub_tree_sav
;
424 proto_tree
*cast_sub_tree_sav_sav
;
426 hdr_data_length
= tvb_get_letohl(tvb
, offset
);
427 hdr_marker
= tvb_get_letohl(tvb
, offset
+4);
428 data_messageid
= tvb_get_letohl(tvb
, offset
+8);
430 /* In the interest of speed, if "tree" is NULL, don't do any work not
431 * necessary to generate protocol tree items. */
433 ti
= proto_tree_add_item(tree
, proto_cast
, tvb
, offset
, hdr_data_length
+8, ENC_NA
);
434 cast_tree
= proto_item_add_subtree(ti
, ett_cast
);
435 proto_tree_add_uint(cast_tree
, hf_cast_data_length
, tvb
, offset
, 4, hdr_data_length
);
436 proto_tree_add_uint(cast_tree
, hf_cast_reserved
, tvb
, offset
+4, 4, hdr_marker
);
439 messageid_str
= val_to_str(data_messageid
, message_id
, "0x%08X (Unknown)");
441 col_add_str(pinfo
->cinfo
, COL_INFO
, messageid_str
);
444 proto_tree_add_uint(cast_tree
, hf_cast_messageid
, tvb
,offset
+8, 4, data_messageid
);
448 switch(data_messageid
) {
450 case 0x0 : /* keepAlive */
451 /* no data in message */
454 case 0x1 : /* KeepAliveVersion */
455 proto_tree_add_item(cast_tree
, hf_cast_version
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
458 case 0x2 : /* KeepAliveVersionAck */
459 proto_tree_add_item(cast_tree
, hf_cast_version
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
462 case 0x3 : /* UpdateCapabilities */
463 /* to do - this message is very large and will span multiple packets, it would be nice to someday */
464 /* find out a way to join the next packet and get the complete message to decode */
465 proto_tree_add_item(cast_tree
, hf_cast_videoCapCount
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
466 proto_tree_add_item(cast_tree
, hf_cast_dataCapCount
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
467 proto_tree_add_item(cast_tree
, hf_cast_RTPPayloadFormat
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
468 proto_tree_add_item(cast_tree
, hf_cast_customPictureFormatCount
, tvb
, offset
+24, 4, ENC_LITTLE_ENDIAN
);
470 /* total of 120 bytes */
471 for ( i
= 0; i
< MAX_CUSTOM_PICTURES
; i
++ ) {
472 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 20, "customPictureFormat[%d]", i
);
473 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
474 proto_tree_add_item(cast_sub_tree
, hf_cast_pictureWidth
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
476 proto_tree_add_item(cast_sub_tree
, hf_cast_pictureHeight
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
478 proto_tree_add_item(cast_sub_tree
, hf_cast_pixelAspectRatio
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
480 proto_tree_add_item(cast_sub_tree
, hf_cast_clockConversionCode
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
482 proto_tree_add_item(cast_sub_tree
, hf_cast_clockDivisor
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
485 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "confResources");
486 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
487 proto_tree_add_item(cast_sub_tree
, hf_cast_activeStreamsOnRegistration
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
489 proto_tree_add_item(cast_sub_tree
, hf_cast_maxBW
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
491 proto_tree_add_item(cast_sub_tree
, hf_cast_serviceResourceCount
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
493 cast_sub_tree_sav
= cast_sub_tree
;
494 /* total of 160 bytes */
495 for ( i
= 0; i
< MAX_SERVICE_TYPE
; i
++ ) {
496 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 20, "serviceResource[%d]", i
);
497 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
498 proto_tree_add_item(cast_sub_tree
, hf_cast_layoutCount
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
500 cast_sub_tree_sav_sav
= cast_sub_tree_sav
;
501 for ( t
= 0; t
< MAX_LAYOUT_WITH_SAME_SERVICE
; t
++ ) {
502 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 20, "layouts[%d]", t
);
503 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
504 proto_tree_add_item(cast_sub_tree
, hf_cast_layout
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
507 cast_sub_tree
= cast_sub_tree_sav_sav
;
508 proto_tree_add_item(cast_sub_tree
, hf_cast_serviceNum
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
510 proto_tree_add_item(cast_sub_tree
, hf_cast_maxStreams
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
512 proto_tree_add_item(cast_sub_tree
, hf_cast_maxConferences
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
514 proto_tree_add_item(cast_sub_tree
, hf_cast_activeConferenceOnRegistration
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
517 /* total of 176 bytes */
518 for ( i
= 0; i
< StationMaxVideoCapabilities
; i
++ ) {
519 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 20, "vidCaps[%d]", i
);
520 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
521 proto_tree_add_item(cast_sub_tree
, hf_cast_payloadCapability
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
523 proto_tree_add_item(cast_sub_tree
, hf_cast_transmitOrReceive
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
525 proto_tree_add_item(cast_sub_tree
, hf_cast_levelPreferenceCount
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
527 cast_sub_tree_sav
= cast_sub_tree
;
528 for ( t
= 0; t
< MAX_LEVEL_PREFERENCE
; t
++ ) {
529 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 20, "levelPreference[%d]", t
);
530 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
531 proto_tree_add_item(cast_sub_tree
, hf_cast_transmitPreference
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
533 proto_tree_add_item(cast_sub_tree
, hf_cast_format
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
535 proto_tree_add_item(cast_sub_tree
, hf_cast_maxBitRate
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
537 proto_tree_add_item(cast_sub_tree
, hf_cast_minBitRate
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
539 proto_tree_add_item(cast_sub_tree
, hf_cast_MPI
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
541 proto_tree_add_item(cast_sub_tree
, hf_cast_serviceNumber
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
546 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "h261VideoCapability");
547 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
548 proto_tree_add_item(cast_sub_tree
, hf_cast_temporalSpatialTradeOffCapability
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
549 proto_tree_add_item(cast_sub_tree
, hf_cast_stillImageTransmission
, tvb
, count
+4, 4, ENC_LITTLE_ENDIAN
);
552 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "h263VideoCapability");
553 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
554 proto_tree_add_item(cast_sub_tree
, hf_cast_h263_capability_bitfield
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
555 proto_tree_add_item(cast_sub_tree
, hf_cast_annexNandWFutureUse
, tvb
, count
+4, 4, ENC_LITTLE_ENDIAN
);
558 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "vieoVideoCapability");
559 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
560 proto_tree_add_item(cast_sub_tree
, hf_cast_modelNumber
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
562 proto_tree_add_item(cast_sub_tree
, hf_cast_bandwidth
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
566 for ( i
= 0; i
< StationMaxDataCapabilities
; i
++ ) {
567 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 20, "dataCaps[%d]", i
);
568 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
569 proto_tree_add_item(cast_sub_tree
, hf_cast_payloadCapability
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
571 proto_tree_add_item(cast_sub_tree
, hf_cast_transmitOrReceive
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
573 proto_tree_add_item(cast_sub_tree
, hf_cast_protocolDependentData
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
575 proto_tree_add_item(cast_sub_tree
, hf_cast_maxBitRate
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
583 case 0x5 : /* OpenMultiMediaReceiveChannel */
584 proto_tree_add_item(cast_tree
, hf_cast_conferenceID
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
585 proto_tree_add_item(cast_tree
, hf_cast_passThruPartyID
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
586 proto_tree_add_item(cast_tree
, hf_cast_payloadCapability
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
587 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, offset
+24, 4, ENC_LITTLE_ENDIAN
);
588 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
589 proto_tree_add_item(cast_tree
, hf_cast_payload_rfc_number
, tvb
, offset
+32, 4, ENC_LITTLE_ENDIAN
);
590 proto_tree_add_item(cast_tree
, hf_cast_payloadType
, tvb
, offset
+36, 4, ENC_LITTLE_ENDIAN
);
591 proto_tree_add_item(cast_tree
, hf_cast_isConferenceCreator
, tvb
, offset
+40, 4, ENC_LITTLE_ENDIAN
);
593 /* add audio part of union */
594 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 12, "audioParameters");
595 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
596 proto_tree_add_item(cast_sub_tree
, hf_cast_millisecondPacketSize
, tvb
, offset
+44, 4, ENC_LITTLE_ENDIAN
);
597 proto_tree_add_item(cast_sub_tree
, hf_cast_echoCancelType
, tvb
, offset
+48, 4, ENC_LITTLE_ENDIAN
);
598 proto_tree_add_item(cast_sub_tree
, hf_cast_g723BitRate
, tvb
, offset
+52, 4, ENC_LITTLE_ENDIAN
);
600 /* add video part of union */
601 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 30, "videoParameters");
602 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
603 proto_tree_add_item(cast_sub_tree
, hf_cast_bitRate
, tvb
, offset
+44, 4, ENC_LITTLE_ENDIAN
);
604 proto_tree_add_item(cast_sub_tree
, hf_cast_pictureFormatCount
, tvb
, offset
+48, 4, ENC_LITTLE_ENDIAN
);
605 cast_sub_tree_sav
= cast_sub_tree
;
607 for ( i
= 0; i
< MAX_PICTURE_FORMAT
; i
++ ) {
608 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8 * MAX_PICTURE_FORMAT
, "pictureFormat[%d]", i
);
609 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
610 proto_tree_add_item(cast_sub_tree
, hf_cast_format
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
612 proto_tree_add_item(cast_sub_tree
, hf_cast_MPI
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
615 cast_sub_tree
= cast_sub_tree_sav
;
616 proto_tree_add_item(cast_sub_tree
, hf_cast_confServiceNum
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
619 /* add H261 part of union */
620 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "h261VideoCapability");
621 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
622 proto_tree_add_item(cast_sub_tree
, hf_cast_temporalSpatialTradeOffCapability
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
623 proto_tree_add_item(cast_sub_tree
, hf_cast_stillImageTransmission
, tvb
, count
+4, 4, ENC_LITTLE_ENDIAN
);
625 /* add H263 part of union */
626 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "h263VideoCapability");
627 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
628 proto_tree_add_item(cast_sub_tree
, hf_cast_h263_capability_bitfield
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
629 proto_tree_add_item(cast_sub_tree
, hf_cast_annexNandWFutureUse
, tvb
, count
+4, 4, ENC_LITTLE_ENDIAN
);
631 /* add Vieo part of union */
632 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "vieoVideoCapability");
633 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
634 proto_tree_add_item(cast_sub_tree
, hf_cast_modelNumber
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
636 proto_tree_add_item(cast_sub_tree
, hf_cast_bandwidth
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
638 /* add data part of union */
639 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "dataParameters");
640 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
641 proto_tree_add_item(cast_sub_tree
, hf_cast_protocolDependentData
, tvb
, offset
+44, 4, ENC_LITTLE_ENDIAN
);
642 proto_tree_add_item(cast_sub_tree
, hf_cast_maxBitRate
, tvb
, offset
+48, 4, ENC_LITTLE_ENDIAN
);
645 case 0x6 : /* OpenMultiMediaReceiveChannelACK */
646 proto_tree_add_item(cast_tree
, hf_cast_ORCStatus
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
647 proto_tree_add_item(cast_tree
, hf_cast_ipAddress
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
648 proto_tree_add_item(cast_tree
, hf_cast_portNumber
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
649 proto_tree_add_item(cast_tree
, hf_cast_passThruPartyID
, tvb
, offset
+24, 4, ENC_LITTLE_ENDIAN
);
650 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
653 case 0x7 : /* CloseMultiMediaReceiveChannel */
654 proto_tree_add_item(cast_tree
, hf_cast_conferenceID
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
655 proto_tree_add_item(cast_tree
, hf_cast_passThruPartyID
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
656 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
659 case 0x8 : /* StartMultiMediaTransmission */
660 proto_tree_add_item(cast_tree
, hf_cast_conferenceID
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
661 proto_tree_add_item(cast_tree
, hf_cast_passThruPartyID
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
662 proto_tree_add_item(cast_tree
, hf_cast_payloadCapability
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
663 proto_tree_add_item(cast_tree
, hf_cast_ipAddress
, tvb
, offset
+24, 4, ENC_LITTLE_ENDIAN
);
664 proto_tree_add_item(cast_tree
, hf_cast_portNumber
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
665 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+32, 4, ENC_LITTLE_ENDIAN
);
666 proto_tree_add_item(cast_tree
, hf_cast_payload_rfc_number
, tvb
, offset
+36, 4, ENC_LITTLE_ENDIAN
);
667 proto_tree_add_item(cast_tree
, hf_cast_payloadType
, tvb
, offset
+40, 4, ENC_LITTLE_ENDIAN
);
668 proto_tree_add_item(cast_tree
, hf_cast_DSCPValue
, tvb
, offset
+44, 4, ENC_LITTLE_ENDIAN
);
670 /* add video part of union */
671 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 30, "videoParameters");
672 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
673 proto_tree_add_item(cast_sub_tree
, hf_cast_bitRate
, tvb
, offset
+48, 4, ENC_LITTLE_ENDIAN
);
674 proto_tree_add_item(cast_sub_tree
, hf_cast_pictureFormatCount
, tvb
, offset
+52, 4, ENC_LITTLE_ENDIAN
);
675 cast_sub_tree_sav
= cast_sub_tree
;
677 for ( i
= 0; i
< MAX_PICTURE_FORMAT
; i
++ ) {
678 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8 * MAX_PICTURE_FORMAT
, "pictureFormat[%d]", i
);
679 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
680 proto_tree_add_item(cast_sub_tree
, hf_cast_format
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
682 proto_tree_add_item(cast_sub_tree
, hf_cast_MPI
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
685 cast_sub_tree
= cast_sub_tree_sav
;
686 proto_tree_add_item(cast_sub_tree
, hf_cast_confServiceNum
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
690 /* add H261 part of union */
691 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "h261VideoCapability");
692 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
693 proto_tree_add_item(cast_sub_tree
, hf_cast_temporalSpatialTradeOffCapability
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
695 proto_tree_add_item(cast_sub_tree
, hf_cast_stillImageTransmission
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
697 /* add H263 part of union */
699 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "h263VideoCapability");
700 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
701 proto_tree_add_item(cast_sub_tree
, hf_cast_h263_capability_bitfield
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
703 proto_tree_add_item(cast_sub_tree
, hf_cast_annexNandWFutureUse
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
705 /* add Vieo part of union */
707 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "vieoVideoCapability");
708 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
709 proto_tree_add_item(cast_sub_tree
, hf_cast_modelNumber
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
711 proto_tree_add_item(cast_sub_tree
, hf_cast_bandwidth
, tvb
, count
, 4, ENC_LITTLE_ENDIAN
);
713 /* add data part of union */
714 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "dataParameters");
715 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
716 proto_tree_add_item(cast_sub_tree
, hf_cast_protocolDependentData
, tvb
, offset
+48, 4, ENC_LITTLE_ENDIAN
);
717 proto_tree_add_item(cast_sub_tree
, hf_cast_maxBitRate
, tvb
, offset
+52, 4, ENC_LITTLE_ENDIAN
);
720 case 0x9 : /* StopMultiMediaTransmission */
721 proto_tree_add_item(cast_tree
, hf_cast_conferenceID
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
722 proto_tree_add_item(cast_tree
, hf_cast_passThruPartyID
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
723 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
726 case 0xA : /* MiscellaneousCommand */
727 proto_tree_add_item(cast_tree
, hf_cast_conferenceID
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
728 proto_tree_add_item(cast_tree
, hf_cast_passThruPartyID
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
729 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
730 proto_tree_add_item(cast_tree
, hf_cast_miscCommandType
, tvb
, offset
+24, 4, ENC_LITTLE_ENDIAN
);
732 /* show videoFreezePicture */
733 /* not sure of format */
735 /* show videoFastUpdatePicture */
736 /* not sure of format */
738 /* show videoFastUpdateGOB */
739 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "videoFastUpdateGOB");
740 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
741 proto_tree_add_item(cast_sub_tree
, hf_cast_firstGOB
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
742 proto_tree_add_item(cast_sub_tree
, hf_cast_numberOfGOBs
, tvb
, offset
+32, 4, ENC_LITTLE_ENDIAN
);
744 /* show videoFastUpdateMB */
745 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "videoFastUpdateGOB");
746 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
747 proto_tree_add_item(cast_sub_tree
, hf_cast_firstGOB
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
748 proto_tree_add_item(cast_sub_tree
, hf_cast_firstMB
, tvb
, offset
+32, 4, ENC_LITTLE_ENDIAN
);
749 proto_tree_add_item(cast_sub_tree
, hf_cast_numberOfMBs
, tvb
, offset
+36, 4, ENC_LITTLE_ENDIAN
);
751 /* show lostPicture */
752 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "lostPicture");
753 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
754 proto_tree_add_item(cast_sub_tree
, hf_cast_pictureNumber
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
755 proto_tree_add_item(cast_sub_tree
, hf_cast_longTermPictureIndex
, tvb
, offset
+32, 4, ENC_LITTLE_ENDIAN
);
757 /* show lostPartialPicture */
758 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "lostPartialPicture");
759 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
760 proto_tree_add_item(cast_sub_tree
, hf_cast_pictureNumber
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
761 proto_tree_add_item(cast_sub_tree
, hf_cast_longTermPictureIndex
, tvb
, offset
+32, 4, ENC_LITTLE_ENDIAN
);
762 proto_tree_add_item(cast_sub_tree
, hf_cast_firstMB
, tvb
, offset
+36, 4, ENC_LITTLE_ENDIAN
);
763 proto_tree_add_item(cast_sub_tree
, hf_cast_numberOfMBs
, tvb
, offset
+40, 4, ENC_LITTLE_ENDIAN
);
765 /* show recoveryReferencePicture */
766 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "recoveryReferencePicture");
767 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
768 proto_tree_add_item(cast_sub_tree
, hf_cast_recoveryReferencePictureCount
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
769 cast_sub_tree_sav
= cast_sub_tree
;
770 for ( i
= 0; i
< MAX_REFERENCE_PICTURE
; i
++ ) {
771 ti_sub
= proto_tree_add_text(cast_sub_tree_sav
, tvb
, offset
, 8, "recoveryReferencePicture[%d]", i
);
772 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
773 proto_tree_add_item(cast_sub_tree
, hf_cast_pictureNumber
, tvb
, offset
+32+(i
*8), 4, ENC_LITTLE_ENDIAN
);
774 proto_tree_add_item(cast_sub_tree
, hf_cast_longTermPictureIndex
, tvb
, offset
+36+(i
*8), 4, ENC_LITTLE_ENDIAN
);
777 /* show temporalSpatialTradeOff */
778 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 4, "temporalSpatialTradeOff");
779 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
780 proto_tree_add_item(cast_sub_tree
, hf_cast_temporalSpatialTradeOff
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
783 case 0xB : /* FlowControlCommand */
784 proto_tree_add_item(cast_tree
, hf_cast_conferenceID
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
785 proto_tree_add_item(cast_tree
, hf_cast_passThruPartyID
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
786 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
787 proto_tree_add_item(cast_tree
, hf_cast_maxBitRate
, tvb
, offset
+24, 4, ENC_LITTLE_ENDIAN
);
790 case 0xC : /* ClearConference */
791 proto_tree_add_item(cast_tree
, hf_cast_conferenceID
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
792 proto_tree_add_item(cast_tree
, hf_cast_serviceNum
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
795 case 0xD : /* CallState */
796 proto_tree_add_item(cast_tree
, hf_cast_callState
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
797 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
798 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+20, 4, ENC_LITTLE_ENDIAN
);
799 proto_tree_add_item(cast_tree
, hf_cast_privacy
, tvb
, offset
+24, 4, ENC_LITTLE_ENDIAN
);
800 proto_tree_add_item(cast_tree
, hf_cast_precedenceLv
, tvb
, offset
+28, 4, ENC_LITTLE_ENDIAN
);
801 proto_tree_add_item(cast_tree
, hf_cast_precedenceDm
, tvb
, offset
+32, 4, ENC_LITTLE_ENDIAN
);
804 case 0xE : /* RequestCallState */
805 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
808 case 0xF : /* RequestAllCallStates */
809 /* no data in message */
812 case 0x10 : /* CallInfo */
814 proto_tree_add_item(cast_tree
, hf_cast_callingPartyName
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
815 i
+= StationMaxNameSize
;
816 proto_tree_add_item(cast_tree
, hf_cast_callingParty
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
817 i
+= StationMaxDirnumSize
;
818 proto_tree_add_item(cast_tree
, hf_cast_calledPartyName
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
819 i
+= StationMaxNameSize
;
820 proto_tree_add_item(cast_tree
, hf_cast_calledParty
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
821 i
+= StationMaxDirnumSize
;
822 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
824 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
826 proto_tree_add_item(cast_tree
, hf_cast_callType
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
828 proto_tree_add_item(cast_tree
, hf_cast_originalCalledPartyName
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
829 i
+= StationMaxNameSize
;
830 proto_tree_add_item(cast_tree
, hf_cast_originalCalledParty
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
831 i
+= StationMaxDirnumSize
;
832 proto_tree_add_item(cast_tree
, hf_cast_lastRedirectingPartyName
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
833 i
+= StationMaxNameSize
;
834 proto_tree_add_item(cast_tree
, hf_cast_lastRedirectingParty
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
835 i
+= StationMaxDirnumSize
;
836 proto_tree_add_item(cast_tree
, hf_cast_originalCdpnRedirectReason
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
838 proto_tree_add_item(cast_tree
, hf_cast_lastRedirectingReason
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
840 proto_tree_add_item(cast_tree
, hf_cast_cgpnVoiceMailbox
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
841 i
+= StationMaxDirnumSize
;
842 proto_tree_add_item(cast_tree
, hf_cast_cdpnVoiceMailbox
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
843 i
+= StationMaxDirnumSize
;
844 proto_tree_add_item(cast_tree
, hf_cast_originalCdpnVoiceMailbox
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
845 i
+= StationMaxDirnumSize
;
846 proto_tree_add_item(cast_tree
, hf_cast_lastRedirectingVoiceMailbox
, tvb
, i
, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
847 i
+= StationMaxDirnumSize
;
848 proto_tree_add_item(cast_tree
, hf_cast_callInstance
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
850 proto_tree_add_item(cast_tree
, hf_cast_callSecurityStatus
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
852 ti_sub
= proto_tree_add_text(cast_tree
, tvb
, offset
, 8, "partyPIRestrictionBits");
853 cast_sub_tree
= proto_item_add_subtree(ti_sub
, ett_cast_tree
);
854 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_CallingPartyName
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
855 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_CallingPartyNumber
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
856 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_CalledPartyName
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
857 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_CalledPartyNumber
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
858 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_OriginalCalledPartyName
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
859 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
860 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_LastRedirectPartyName
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
861 proto_tree_add_item(cast_sub_tree
, hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
864 case 0x11 : /* RequestCallInfo */
865 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
868 case 0x12 : /* CallFocus */
869 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
870 proto_tree_add_item(cast_tree
, hf_cast_callIdentifier
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
873 case 0x13 : /* MakeCall */
874 proto_tree_add_item(cast_tree
, hf_cast_calledParty
, tvb
, offset
+12, StationMaxDirnumSize
, ENC_ASCII
|ENC_NA
);
875 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, offset
+16, 4, ENC_LITTLE_ENDIAN
);
878 case 0x14 : /* HangUp */
879 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
882 case 0x15 : /* Answer */
883 proto_tree_add_item(cast_tree
, hf_cast_lineInstance
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
886 case 0x40 : /* keepAliveAck */
887 /* no data in message */
890 case 0x41 : /* StreamStart */
891 /* no data in message */
894 case 0x42 : /* StreamStop */
895 /* no data in message */
898 case 0x43 : /* MuteStart */
899 /* no data in message */
902 case 0x44 : /* MuteStop */
903 /* no data in message */
906 case 0x45 : /* SpeakerStart */
907 /* no data in message */
910 case 0x46 : /* SpeakerStop */
911 /* no data in message */
914 case 0x47 : /* StreamStartMessageWithCodec */
915 proto_tree_add_item(cast_tree
, hf_cast_audio
, tvb
, offset
+12, 4, ENC_LITTLE_ENDIAN
);
919 case 0x50 : /* VIEODiscoveryprotocol */
922 case 0x51 : /* VIEOControlprotocol */
926 case 0x60 : /* VeT120protocol */
929 case 0x61 : /* VeT121protocol */
932 case 0x62 : /* VeT122protocol */
936 case 0x70 : /* IMSessionDiscoveryprotocol */
939 case 0x71 : /* IMSessionControlprotocol */
943 case 0x74 : /* SlidesDiscoveryprotocol */
946 case 0x75 : /* SlidesControlprotocol */
950 case 0x80 : /* Tunnel */
953 case 0x90 : /* RemoteInfoRequest */
955 proto_tree_add_item(cast_tree
, hf_cast_stationFriendlyName
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
956 i
+= StationMaxNameSize
;
957 proto_tree_add_item(cast_tree
, hf_cast_stationGUID
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
958 i
+= StationMaxNameSize
;
959 proto_tree_add_item(cast_tree
, hf_cast_requestorIpAddress
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
962 case 0x91 : /* RemoteInfoResponse */
964 proto_tree_add_item(cast_tree
, hf_cast_stationFriendlyName
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
965 i
+= StationMaxNameSize
;
966 proto_tree_add_item(cast_tree
, hf_cast_stationGUID
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
967 i
+= StationMaxNameSize
;
968 proto_tree_add_item(cast_tree
, hf_cast_stationIpAddress
, tvb
, i
, 4, ENC_LITTLE_ENDIAN
);
970 proto_tree_add_item(cast_tree
, hf_cast_directoryNumber
, tvb
, i
, StationMaxNameSize
, ENC_ASCII
|ENC_NA
);
974 case 0xA0 : /* CollabDiscoveryprotocol */
977 case 0xA1 : /* CollabControlprotocol */
981 case 0xA4 : /* FECCDiscoveryprotocol */
984 case 0xA5 : /* FECCControlprotocol */
988 case 0xB0 : /* ClockSyncprotocol */
991 case 0xB1 : /* StreamSyncprotocol */
995 case 0xB4 : /* MediaDiscoveryprotocol */
998 case 0xB5 : /* MediaControlprotocol */
1002 case 0xC0 : /* SessionDiscoveryprotocol */
1005 case 0xC1 : /* SessionControlprotocol */
1009 case 0xC4 : /* ConferenceDiscoveryprotocol */
1012 case 0xC5 : /* Conferenceprotocol */
1016 case 0xCC : /* SCCPCallControlProxyprotocol */
1020 case 0xD0 : /* CallDiscoveryprotocol */
1023 case 0xD1 : /* CallControlprotocol */
1032 return tvb_length(tvb
);
1035 /* Get the length of a single CAST PDU */
1037 get_cast_pdu_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, int offset
)
1039 guint32 hdr_data_length
;
1042 * Get the length of the CAST packet.
1044 hdr_data_length
= tvb_get_letohl(tvb
, offset
);
1047 * That length doesn't include the length of the header itself;
1050 return hdr_data_length
+ 8;
1053 /* Code to actually dissect the packets */
1055 dissect_cast(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data
)
1057 /* The general structure of a packet: {IP-Header|TCP-Header|n*CAST}
1058 * CAST-Packet: {Header(Size, Reserved)|Data(MessageID, Message-Data)}
1061 volatile guint32 hdr_data_length
;
1064 /* check, if this is really an SKINNY packet, they start with a length + 0 */
1066 /* get relevant header information */
1067 hdr_data_length
= tvb_get_letohl(tvb
, 0);
1068 hdr_marker
= tvb_get_letohl(tvb
, 4);
1070 /* data_size = MIN(8+hdr_data_length, tvb_length(tvb)) - 0xC; */
1072 if (hdr_data_length
< 4 || hdr_marker
!= 0) {
1076 /* Make entries in Protocol column and Info column on summary display */
1077 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "CAST");
1079 col_set_str(pinfo
->cinfo
, COL_INFO
, "Cast Client Control Protocol");
1080 tcp_dissect_pdus(tvb
, pinfo
, tree
, cast_desegment
, 4, get_cast_pdu_len
, dissect_cast_pdu
, data
);
1081 return tvb_length(tvb
);
1084 /* Register the protocol with Wireshark */
1086 proto_register_cast(void)
1088 /* Setup list of header fields */
1089 static hf_register_info hf
[] = {
1090 { &hf_cast_data_length
,
1091 { "Data Length", "cast.data_length",
1092 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1093 "Number of bytes in the data portion.",
1097 { &hf_cast_reserved
,
1098 { "Marker", "cast.marker",
1099 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
1100 "Marker value should ne zero.",
1104 /* FIXME: Enable use of message name ??? */
1105 { &hf_cast_messageid
,
1106 { "Message ID", "cast.messageid",
1107 FT_UINT32
, BASE_HEX
, VALS(message_id
), 0x0,
1108 "The function requested/done with this message.",
1113 { "Version", "cast.version",
1114 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1115 "The version in the keepalive version messages.",
1119 { &hf_cast_ORCStatus
,
1120 { "ORCStatus", "cast.ORCStatus",
1121 FT_UINT32
, BASE_DEC
, VALS(orcStatus
), 0x0,
1122 "The status of the opened receive channel.",
1126 { &hf_cast_ipAddress
,
1127 { "IP Address", "cast.ipAddress",
1128 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1132 { &hf_cast_portNumber
,
1133 { "Port Number", "cast.portNumber",
1134 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1138 { &hf_cast_passThruPartyID
,
1139 { "PassThruPartyID", "cast.passThruPartyID",
1140 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1144 { &hf_cast_callIdentifier
,
1145 { "Call Identifier", "cast.callIdentifier",
1146 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1147 "Call identifier for this call.",
1151 { &hf_cast_conferenceID
,
1152 { "Conference ID", "cast.conferenceID",
1153 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1157 { &hf_cast_payloadType
,
1158 { "PayloadType", "cast.payloadType",
1159 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1163 { &hf_cast_lineInstance
,
1164 { "Line Instance", "cast.lineInstance",
1165 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1166 "The display call plane associated with this call.",
1170 { &hf_cast_payloadCapability
,
1171 { "PayloadCapability", "cast.payloadCapability",
1172 FT_UINT32
, BASE_DEC
, VALS(mediaPayloads
), 0x0,
1173 "The payload capability for this media capability structure.",
1177 { &hf_cast_isConferenceCreator
,
1178 { "IsConferenceCreator", "cast.isConferenceCreator",
1179 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1183 { &hf_cast_payload_rfc_number
,
1184 { "Payload_rfc_number", "cast.payload_rfc_number",
1185 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1189 { &hf_cast_videoCapCount
,
1190 { "VideoCapCount", "cast.videoCapCount",
1191 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1195 { &hf_cast_dataCapCount
,
1196 { "DataCapCount", "cast.dataCapCount",
1197 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1201 { &hf_cast_RTPPayloadFormat
,
1202 { "RTPPayloadFormat", "cast.RTPPayloadFormat",
1203 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1207 { &hf_cast_customPictureFormatCount
,
1208 { "CustomPictureFormatCount", "cast.customPictureFormatCount",
1209 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1213 { &hf_cast_pictureWidth
,
1214 { "PictureWidth", "cast.pictureWidth",
1215 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1219 { &hf_cast_pictureHeight
,
1220 { "PictureHeight", "cast.pictureHeight",
1221 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1225 { &hf_cast_pixelAspectRatio
,
1226 { "PixelAspectRatio", "cast.pixelAspectRatio",
1227 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1231 { &hf_cast_clockConversionCode
,
1232 { "ClockConversionCode", "cast.clockConversionCode",
1233 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1237 { &hf_cast_clockDivisor
,
1238 { "ClockDivisor", "cast.clockDivisor",
1239 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1243 { &hf_cast_activeStreamsOnRegistration
,
1244 { "ActiveStreamsOnRegistration", "cast.activeStreamsOnRegistration",
1245 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1250 { "MaxBW", "cast.maxBW",
1251 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1255 { &hf_cast_serviceResourceCount
,
1256 { "ServiceResourceCount", "cast.serviceResourceCount",
1257 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1261 { &hf_cast_layoutCount
,
1262 { "LayoutCount", "cast.layoutCount",
1263 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1268 { "Layout", "cast.layout",
1269 FT_UINT32
, BASE_DEC
, VALS(cast_Layouts
), 0x0,
1273 { &hf_cast_maxConferences
,
1274 { "MaxConferences", "cast.maxConferences",
1275 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1279 { &hf_cast_activeConferenceOnRegistration
,
1280 { "ActiveConferenceOnRegistration", "cast.activeConferenceOnRegistration",
1281 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1285 { &hf_cast_transmitOrReceive
,
1286 { "TransmitOrReceive", "cast.transmitOrReceive",
1287 FT_UINT32
, BASE_DEC
, VALS(cast_transmitOrReceive
), 0x0,
1291 { &hf_cast_levelPreferenceCount
,
1292 { "LevelPreferenceCount", "cast.levelPreferenceCount",
1293 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1297 { &hf_cast_transmitPreference
,
1298 { "TransmitPreference", "cast.transmitPreference",
1299 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1304 { "Format", "cast.format",
1305 FT_UINT32
, BASE_DEC
, VALS(cast_formatTypes
), 0x0,
1309 { &hf_cast_maxBitRate
,
1310 { "MaxBitRate", "cast.maxBitRate",
1311 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1315 { &hf_cast_minBitRate
,
1316 { "MinBitRate", "cast.minBitRate",
1317 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1322 { "MPI", "cast.MPI",
1323 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1327 { &hf_cast_serviceNumber
,
1328 { "ServiceNumber", "cast.serviceNumber",
1329 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1333 { &hf_cast_temporalSpatialTradeOffCapability
,
1334 { "TemporalSpatialTradeOffCapability", "cast.temporalSpatialTradeOffCapability",
1335 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1339 { &hf_cast_stillImageTransmission
,
1340 { "StillImageTransmission", "cast.stillImageTransmission",
1341 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1345 { &hf_cast_h263_capability_bitfield
,
1346 { "H263_capability_bitfield", "cast.h263_capability_bitfield",
1347 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1351 { &hf_cast_annexNandWFutureUse
,
1352 { "AnnexNandWFutureUse", "cast.annexNandWFutureUse",
1353 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1357 { &hf_cast_modelNumber
,
1358 { "ModelNumber", "cast.modelNumber",
1359 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1363 { &hf_cast_bandwidth
,
1364 { "Bandwidth", "cast.bandwidth",
1365 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1369 { &hf_cast_protocolDependentData
,
1370 { "ProtocolDependentData", "cast.protocolDependentData",
1371 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1375 { &hf_cast_DSCPValue
,
1376 { "DSCPValue", "cast.DSCPValue",
1377 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1381 { &hf_cast_serviceNum
,
1382 { "ServiceNum", "cast.serviceNum",
1383 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1388 { &hf_cast_precedenceValue
,
1389 { "Precedence", "cast.precedenceValue",
1390 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1395 { &hf_cast_maxStreams
,
1396 { "MaxStreams", "cast.maxStreams",
1397 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1398 "32 bit unsigned integer indicating the maximum number of simultansous RTP duplex streams that the client can handle.",
1402 { &hf_cast_millisecondPacketSize
,
1403 { "MS/Packet", "cast.millisecondPacketSize",
1404 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1405 "The number of milliseconds of conversation in each packet",
1409 { &hf_cast_echoCancelType
,
1410 { "Echo Cancel Type", "cast.echoCancelType",
1411 FT_UINT32
, BASE_DEC
, VALS(cast_echoCancelTypes
), 0x0,
1412 "Is echo cancelling enabled or not",
1416 { &hf_cast_g723BitRate
,
1417 { "G723 BitRate", "cast.g723BitRate",
1418 FT_UINT32
, BASE_DEC
, VALS(cast_g723BitRates
), 0x0,
1419 "The G723 bit rate for this stream/JUNK if not g723 stream",
1423 { &hf_cast_pictureFormatCount
,
1424 { "PictureFormatCount", "cast.pictureFormatCount",
1425 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1429 { &hf_cast_confServiceNum
,
1430 { "ConfServiceNum", "cast.confServiceNum",
1431 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1435 { &hf_cast_miscCommandType
,
1436 { "MiscCommandType", "cast.miscCommandType",
1437 FT_UINT32
, BASE_DEC
, VALS(cast_miscCommandType
), 0x0,
1441 { &hf_cast_temporalSpatialTradeOff
,
1442 { "TemporalSpatialTradeOff", "cast.temporalSpatialTradeOff",
1443 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1447 { &hf_cast_firstGOB
,
1448 { "FirstGOB", "cast.firstGOB",
1449 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1453 { &hf_cast_numberOfGOBs
,
1454 { "NumberOfGOBs", "cast.numberOfGOBs",
1455 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1460 { "FirstMB", "cast.firstMB",
1461 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1465 { &hf_cast_numberOfMBs
,
1466 { "NumberOfMBs", "cast.numberOfMBs",
1467 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1471 { &hf_cast_pictureNumber
,
1472 { "PictureNumber", "cast.pictureNumber",
1473 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1477 { &hf_cast_longTermPictureIndex
,
1478 { "LongTermPictureIndex", "cast.longTermPictureIndex",
1479 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1480 "LongTermPictureIndex.",
1484 { &hf_cast_recoveryReferencePictureCount
,
1485 { "RecoveryReferencePictureCount", "cast.recoveryReferencePictureCount",
1486 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1487 "RecoveryReferencePictureCount.",
1491 { &hf_cast_calledParty
,
1492 { "CalledParty", "cast.calledParty",
1493 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1494 "The number called.",
1499 { "Privacy", "cast.privacy",
1500 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1504 { &hf_cast_precedenceLv
,
1505 { "PrecedenceLv", "cast.precedenceLv",
1506 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1510 { &hf_cast_precedenceDm
,
1511 { "PrecedenceDm", "cast.precedenceDm",
1512 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1516 { &hf_cast_callState
,
1517 { "CallState", "cast.callState",
1518 FT_UINT32
, BASE_DEC
, VALS(cast_callStateTypes
), 0x0,
1522 { &hf_cast_callingPartyName
,
1523 { "Calling Party Name", "cast.callingPartyName",
1524 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1525 "The passed name of the calling party.",
1529 { &hf_cast_callingParty
,
1530 { "Calling Party", "cast.callingParty",
1531 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1532 "The passed number of the calling party.",
1536 { &hf_cast_calledPartyName
,
1537 { "Called Party Name", "cast.calledPartyName",
1538 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1539 "The name of the party we are calling.",
1543 { &hf_cast_callType
,
1544 { "Call Type", "cast.callType",
1545 FT_UINT32
, BASE_DEC
, VALS(cast_callTypes
), 0x0,
1546 "What type of call, in/out/etc",
1550 { &hf_cast_originalCalledPartyName
,
1551 { "Original Called Party Name", "cast.originalCalledPartyName",
1552 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1553 "name of the original person who placed the call.",
1557 { &hf_cast_originalCalledParty
,
1558 { "Original Called Party", "cast.originalCalledParty",
1559 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1560 "The number of the original calling party.",
1564 { &hf_cast_lastRedirectingPartyName
,
1565 { "LastRedirectingPartyName", "cast.lastRedirectingPartyName",
1566 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1570 { &hf_cast_lastRedirectingParty
,
1571 { "LastRedirectingParty", "cast.lastRedirectingParty",
1572 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1576 { &hf_cast_cgpnVoiceMailbox
,
1577 { "CgpnVoiceMailbox", "cast.cgpnVoiceMailbox",
1578 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1582 { &hf_cast_cdpnVoiceMailbox
,
1583 { "CdpnVoiceMailbox", "cast.cdpnVoiceMailbox",
1584 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1588 { &hf_cast_originalCdpnVoiceMailbox
,
1589 { "OriginalCdpnVoiceMailbox", "cast.originalCdpnVoiceMailbox",
1590 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1594 { &hf_cast_lastRedirectingVoiceMailbox
,
1595 { "LastRedirectingVoiceMailbox", "cast.lastRedirectingVoiceMailbox",
1596 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1600 { &hf_cast_originalCdpnRedirectReason
,
1601 { "OriginalCdpnRedirectReason", "cast.originalCdpnRedirectReason",
1602 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1606 { &hf_cast_lastRedirectingReason
,
1607 { "LastRedirectingReason", "cast.lastRedirectingReason",
1608 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1612 { &hf_cast_callInstance
,
1613 { "CallInstance", "cast.callInstance",
1614 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1618 { &hf_cast_callSecurityStatus
,
1619 { "CallSecurityStatus", "cast.callSecurityStatus",
1620 FT_UINT32
, BASE_DEC
, VALS(cast_callSecurityStatusTypes
), 0x0,
1624 { &hf_cast_partyPIRestrictionBits_CallingPartyName
,
1625 { "RestrictCallingPartyName", "cast.partyPIRestrictionBits.CallingPartyName",
1626 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x01,
1630 { &hf_cast_partyPIRestrictionBits_CallingPartyNumber
,
1631 { "RestrictCallingPartyNumber", "cast.partyPIRestrictionBits.CallingPartyNumber",
1632 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x02,
1636 { &hf_cast_partyPIRestrictionBits_CalledPartyName
,
1637 { "RestrictCalledPartyName", "cast.partyPIRestrictionBits.CalledPartyName",
1638 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x04,
1642 { &hf_cast_partyPIRestrictionBits_CalledPartyNumber
,
1643 { "RestrictCalledPartyNumber", "cast.partyPIRestrictionBits.CalledPartyNumber",
1644 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x08,
1648 { &hf_cast_partyPIRestrictionBits_OriginalCalledPartyName
,
1649 { "RestrictOriginalCalledPartyName", "cast.partyPIRestrictionBits.OriginalCalledPartyName",
1650 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x10,
1654 { &hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber
,
1655 { "RestrictOriginalCalledPartyNumber", "cast.partyPIRestrictionBits.OriginalCalledPartyNumber",
1656 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x20,
1660 { &hf_cast_partyPIRestrictionBits_LastRedirectPartyName
,
1661 { "RestrictLastRedirectPartyName", "cast.partyPIRestrictionBits.LastRedirectPartyName",
1662 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x40,
1666 { &hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber
,
1667 { "RestrictLastRedirectPartyNumber", "cast.partyPIRestrictionBits.LastRedirectPartyNumber",
1668 FT_BOOLEAN
, 32, TFS(&tfs_yes_no
), 0x80,
1672 { &hf_cast_directoryNumber
,
1673 { "Directory Number", "cast.directoryNumber",
1674 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1675 "The number we are reporting statistics for.",
1679 { &hf_cast_requestorIpAddress
,
1680 { "RequestorIpAddress", "cast.requestorIpAddress",
1681 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1685 { &hf_cast_stationIpAddress
,
1686 { "StationIpAddress", "cast.stationIpAddress",
1687 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
1691 { &hf_cast_stationFriendlyName
,
1692 { "StationFriendlyName", "cast.stationFriendlyName",
1693 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1697 { &hf_cast_stationGUID
,
1698 { "stationGUID", "cast.stationGUID",
1699 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1704 { "AudioCodec", "cast.audio",
1705 FT_UINT32
, BASE_DEC
, VALS(audioCodecTypes
), 0x0,
1706 "The audio codec that is in use.",
1711 { "BitRate", "cast.bitRate",
1712 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
1718 /* Setup protocol subtree array */
1719 static gint
*ett
[] = {
1724 module_t
*cast_module
;
1726 /* Register the protocol name and description */
1727 proto_cast
= proto_register_protocol("Cast Client Control Protocol",
1730 proto_register_field_array(proto_cast
, hf
, array_length(hf
));
1731 proto_register_subtree_array(ett
, array_length(ett
));
1733 cast_module
= prefs_register_protocol(proto_cast
, NULL
);
1734 prefs_register_bool_preference(cast_module
, "reassembly", /*"desegment",*/
1735 "Reassemble CAST messages spanning multiple TCP segments",
1736 "Whether the CAST dissector should reassemble messages spanning multiple TCP segments."
1737 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
1742 proto_reg_handoff_cast(void)
1744 dissector_handle_t cast_handle
;
1746 data_handle
= find_dissector("data");
1747 cast_handle
= new_create_dissector_handle(dissect_cast
, proto_cast
);
1748 dissector_add_uint("tcp.port", TCP_PORT_CAST
, cast_handle
);