aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-cast.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-cast.c')
-rw-r--r--epan/dissectors/packet-cast.c265
1 files changed, 133 insertions, 132 deletions
diff --git a/epan/dissectors/packet-cast.c b/epan/dissectors/packet-cast.c
index 5d46c21b4f..fac820e03c 100644
--- a/epan/dissectors/packet-cast.c
+++ b/epan/dissectors/packet-cast.c
@@ -22,6 +22,8 @@
void proto_register_cast(void);
void proto_reg_handoff_cast(void);
+static dissector_handle_t cast_handle;
+
/* I will probably need this again when I change things
* to function pointers, but let me use the existing
* infrastructure for now
@@ -269,113 +271,113 @@ static const value_string cast_callSecurityStatusTypes[] = {
/* Initialize the protocol and registered fields */
-static int proto_cast = -1;
-static int hf_cast_data_length = -1;
-static int hf_cast_reserved = -1;
-static int hf_cast_messageid = -1;
-static int hf_cast_version = -1;
-static int hf_cast_ORCStatus = -1;
-static int hf_cast_ipAddress = -1;
-static int hf_cast_portNumber = -1;
-static int hf_cast_passThruPartyID = -1;
-static int hf_cast_callIdentifier = -1;
-static int hf_cast_conferenceID = -1;
-static int hf_cast_payloadType = -1;
-static int hf_cast_lineInstance = -1;
-static int hf_cast_payloadCapability = -1;
-static int hf_cast_isConferenceCreator = -1;
-static int hf_cast_payload_rfc_number = -1;
-static int hf_cast_videoCapCount = -1;
-static int hf_cast_dataCapCount = -1;
-static int hf_cast_RTPPayloadFormat = -1;
-static int hf_cast_customPictureFormatCount = -1;
-static int hf_cast_pictureWidth = -1;
-static int hf_cast_pictureHeight = -1;
-static int hf_cast_pixelAspectRatio = -1;
-static int hf_cast_clockConversionCode = -1;
-static int hf_cast_clockDivisor = -1;
-static int hf_cast_activeStreamsOnRegistration = -1;
-static int hf_cast_maxBW = -1;
-static int hf_cast_serviceResourceCount = -1;
-static int hf_cast_layoutCount = -1;
-static int hf_cast_layout = -1;
-static int hf_cast_maxConferences = -1;
-static int hf_cast_activeConferenceOnRegistration = -1;
-static int hf_cast_transmitOrReceive = -1;
-static int hf_cast_levelPreferenceCount = -1;
-static int hf_cast_transmitPreference = -1;
-static int hf_cast_format = -1;
-static int hf_cast_maxBitRate = -1;
-static int hf_cast_minBitRate = -1;
-static int hf_cast_MPI = -1;
-static int hf_cast_serviceNumber = -1;
-static int hf_cast_temporalSpatialTradeOffCapability = -1;
-static int hf_cast_stillImageTransmission = -1;
-static int hf_cast_h263_capability_bitfield = -1;
-static int hf_cast_annexNandWFutureUse = -1;
-static int hf_cast_modelNumber = -1;
-static int hf_cast_bandwidth = -1;
-static int hf_cast_protocolDependentData = -1;
-static int hf_cast_DSCPValue = -1;
-static int hf_cast_serviceNum = -1;
-/* static int hf_cast_precedenceValue = -1; */
-static int hf_cast_maxStreams = -1;
-static int hf_cast_millisecondPacketSize = -1;
-static int hf_cast_echoCancelType = -1;
-static int hf_cast_g723BitRate = -1;
-static int hf_cast_bitRate = -1;
-static int hf_cast_pictureFormatCount = -1;
-static int hf_cast_confServiceNum = -1;
-static int hf_cast_miscCommandType = -1;
-static int hf_cast_temporalSpatialTradeOff = -1;
-static int hf_cast_firstGOB = -1;
-static int hf_cast_numberOfGOBs = -1;
-static int hf_cast_firstMB = -1;
-static int hf_cast_numberOfMBs = -1;
-static int hf_cast_pictureNumber = -1;
-static int hf_cast_longTermPictureIndex = -1;
-static int hf_cast_recoveryReferencePictureCount = -1;
-static int hf_cast_calledParty = -1;
-static int hf_cast_privacy = -1;
-static int hf_cast_precedenceLv = -1;
-static int hf_cast_precedenceDm = -1;
-static int hf_cast_callState = -1;
-static int hf_cast_callingPartyName = -1;
-static int hf_cast_callingParty = -1;
-static int hf_cast_calledPartyName = -1;
-static int hf_cast_callType = -1;
-static int hf_cast_originalCalledPartyName = -1;
-static int hf_cast_originalCalledParty = -1;
-static int hf_cast_lastRedirectingPartyName = -1;
-static int hf_cast_lastRedirectingParty = -1;
-static int hf_cast_cgpnVoiceMailbox = -1;
-static int hf_cast_cdpnVoiceMailbox = -1;
-static int hf_cast_originalCdpnVoiceMailbox = -1;
-static int hf_cast_lastRedirectingVoiceMailbox = -1;
-static int hf_cast_originalCdpnRedirectReason = -1;
-static int hf_cast_lastRedirectingReason = -1;
-static int hf_cast_callInstance = -1;
-static int hf_cast_callSecurityStatus = -1;
-static int hf_cast_partyPIRestrictionBits_CallingPartyName = -1;
-static int hf_cast_partyPIRestrictionBits_CallingPartyNumber = -1;
-static int hf_cast_partyPIRestrictionBits_CalledPartyName = -1;
-static int hf_cast_partyPIRestrictionBits_CalledPartyNumber = -1;
-static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyName = -1;
-static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber = -1;
-static int hf_cast_partyPIRestrictionBits_LastRedirectPartyName = -1;
-static int hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber = -1;
-static int hf_cast_directoryNumber = -1;
-static int hf_cast_requestorIpAddress = -1;
-static int hf_cast_stationIpAddress = -1;
-static int hf_cast_stationFriendlyName = -1;
-static int hf_cast_stationGUID = -1;
-static int hf_cast_audio = -1;
+static int proto_cast;
+static int hf_cast_data_length;
+static int hf_cast_reserved;
+static int hf_cast_messageid;
+static int hf_cast_version;
+static int hf_cast_ORCStatus;
+static int hf_cast_ipAddress;
+static int hf_cast_portNumber;
+static int hf_cast_passThruPartyID;
+static int hf_cast_callIdentifier;
+static int hf_cast_conferenceID;
+static int hf_cast_payloadType;
+static int hf_cast_lineInstance;
+static int hf_cast_payloadCapability;
+static int hf_cast_isConferenceCreator;
+static int hf_cast_payload_rfc_number;
+static int hf_cast_videoCapCount;
+static int hf_cast_dataCapCount;
+static int hf_cast_RTPPayloadFormat;
+static int hf_cast_customPictureFormatCount;
+static int hf_cast_pictureWidth;
+static int hf_cast_pictureHeight;
+static int hf_cast_pixelAspectRatio;
+static int hf_cast_clockConversionCode;
+static int hf_cast_clockDivisor;
+static int hf_cast_activeStreamsOnRegistration;
+static int hf_cast_maxBW;
+static int hf_cast_serviceResourceCount;
+static int hf_cast_layoutCount;
+static int hf_cast_layout;
+static int hf_cast_maxConferences;
+static int hf_cast_activeConferenceOnRegistration;
+static int hf_cast_transmitOrReceive;
+static int hf_cast_levelPreferenceCount;
+static int hf_cast_transmitPreference;
+static int hf_cast_format;
+static int hf_cast_maxBitRate;
+static int hf_cast_minBitRate;
+static int hf_cast_MPI;
+static int hf_cast_serviceNumber;
+static int hf_cast_temporalSpatialTradeOffCapability;
+static int hf_cast_stillImageTransmission;
+static int hf_cast_h263_capability_bitfield;
+static int hf_cast_annexNandWFutureUse;
+static int hf_cast_modelNumber;
+static int hf_cast_bandwidth;
+static int hf_cast_protocolDependentData;
+static int hf_cast_DSCPValue;
+static int hf_cast_serviceNum;
+/* static int hf_cast_precedenceValue; */
+static int hf_cast_maxStreams;
+static int hf_cast_millisecondPacketSize;
+static int hf_cast_echoCancelType;
+static int hf_cast_g723BitRate;
+static int hf_cast_bitRate;
+static int hf_cast_pictureFormatCount;
+static int hf_cast_confServiceNum;
+static int hf_cast_miscCommandType;
+static int hf_cast_temporalSpatialTradeOff;
+static int hf_cast_firstGOB;
+static int hf_cast_numberOfGOBs;
+static int hf_cast_firstMB;
+static int hf_cast_numberOfMBs;
+static int hf_cast_pictureNumber;
+static int hf_cast_longTermPictureIndex;
+static int hf_cast_recoveryReferencePictureCount;
+static int hf_cast_calledParty;
+static int hf_cast_privacy;
+static int hf_cast_precedenceLv;
+static int hf_cast_precedenceDm;
+static int hf_cast_callState;
+static int hf_cast_callingPartyName;
+static int hf_cast_callingParty;
+static int hf_cast_calledPartyName;
+static int hf_cast_callType;
+static int hf_cast_originalCalledPartyName;
+static int hf_cast_originalCalledParty;
+static int hf_cast_lastRedirectingPartyName;
+static int hf_cast_lastRedirectingParty;
+static int hf_cast_cgpnVoiceMailbox;
+static int hf_cast_cdpnVoiceMailbox;
+static int hf_cast_originalCdpnVoiceMailbox;
+static int hf_cast_lastRedirectingVoiceMailbox;
+static int hf_cast_originalCdpnRedirectReason;
+static int hf_cast_lastRedirectingReason;
+static int hf_cast_callInstance;
+static int hf_cast_callSecurityStatus;
+static int hf_cast_partyPIRestrictionBits_CallingPartyName;
+static int hf_cast_partyPIRestrictionBits_CallingPartyNumber;
+static int hf_cast_partyPIRestrictionBits_CalledPartyName;
+static int hf_cast_partyPIRestrictionBits_CalledPartyNumber;
+static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyName;
+static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber;
+static int hf_cast_partyPIRestrictionBits_LastRedirectPartyName;
+static int hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber;
+static int hf_cast_directoryNumber;
+static int hf_cast_requestorIpAddress;
+static int hf_cast_stationIpAddress;
+static int hf_cast_stationFriendlyName;
+static int hf_cast_stationGUID;
+static int hf_cast_audio;
/* Initialize the subtree pointers */
-static gint ett_cast = -1;
-static gint ett_cast_tree = -1;
+static gint ett_cast;
+static gint ett_cast_tree;
/* desegmentation of SCCP */
static gboolean cast_desegment = TRUE;
@@ -764,13 +766,13 @@ dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
case 0x10 : /* CallInfo */
i = offset+12;
- proto_tree_add_item(cast_tree, hf_cast_callingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_callingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
- proto_tree_add_item(cast_tree, hf_cast_callingParty, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_callingParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
- proto_tree_add_item(cast_tree, hf_cast_calledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_calledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
- proto_tree_add_item(cast_tree, hf_cast_calledParty, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_calledParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, i, 4, ENC_LITTLE_ENDIAN);
i += 4;
@@ -778,25 +780,25 @@ dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
i += 4;
proto_tree_add_item(cast_tree, hf_cast_callType, tvb, i, 4, ENC_LITTLE_ENDIAN);
i += 4;
- proto_tree_add_item(cast_tree, hf_cast_originalCalledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_originalCalledPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
- proto_tree_add_item(cast_tree, hf_cast_originalCalledParty, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_originalCalledParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
- proto_tree_add_item(cast_tree, hf_cast_lastRedirectingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_lastRedirectingPartyName, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
- proto_tree_add_item(cast_tree, hf_cast_lastRedirectingParty, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_lastRedirectingParty, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
proto_tree_add_item(cast_tree, hf_cast_originalCdpnRedirectReason, tvb, i, 4, ENC_LITTLE_ENDIAN);
i += 4;
proto_tree_add_item(cast_tree, hf_cast_lastRedirectingReason, tvb, i, 4, ENC_LITTLE_ENDIAN);
i += 4;
- proto_tree_add_item(cast_tree, hf_cast_cgpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_cgpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
- proto_tree_add_item(cast_tree, hf_cast_cdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_cdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
- proto_tree_add_item(cast_tree, hf_cast_originalCdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_originalCdpnVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
- proto_tree_add_item(cast_tree, hf_cast_lastRedirectingVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_lastRedirectingVoiceMailbox, tvb, i, StationMaxDirnumSize, ENC_ASCII);
i += StationMaxDirnumSize;
proto_tree_add_item(cast_tree, hf_cast_callInstance, tvb, i, 4, ENC_LITTLE_ENDIAN);
i += 4;
@@ -823,7 +825,7 @@ dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
break;
case 0x13 : /* MakeCall */
- proto_tree_add_item(cast_tree, hf_cast_calledParty, tvb, offset+12, StationMaxDirnumSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_calledParty, tvb, offset+12, StationMaxDirnumSize, ENC_ASCII);
proto_tree_add_item(cast_tree, hf_cast_lineInstance, tvb, offset+16, 4, ENC_LITTLE_ENDIAN);
break;
@@ -904,22 +906,22 @@ dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
case 0x90 : /* RemoteInfoRequest */
i = offset+12;
- proto_tree_add_item(cast_tree, hf_cast_stationFriendlyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_stationFriendlyName, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
- proto_tree_add_item(cast_tree, hf_cast_stationGUID, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_stationGUID, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
proto_tree_add_item(cast_tree, hf_cast_requestorIpAddress, tvb, i, 4, ENC_LITTLE_ENDIAN);
break;
case 0x91 : /* RemoteInfoResponse */
i = offset+12;
- proto_tree_add_item(cast_tree, hf_cast_stationFriendlyName, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_stationFriendlyName, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
- proto_tree_add_item(cast_tree, hf_cast_stationGUID, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_stationGUID, tvb, i, StationMaxNameSize, ENC_ASCII);
i += StationMaxNameSize;
proto_tree_add_item(cast_tree, hf_cast_stationIpAddress, tvb, i, 4, ENC_LITTLE_ENDIAN);
i += 4;
- proto_tree_add_item(cast_tree, hf_cast_directoryNumber, tvb, i, StationMaxNameSize, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(cast_tree, hf_cast_directoryNumber, tvb, i, StationMaxNameSize, ENC_ASCII);
break;
@@ -1575,49 +1577,49 @@ proto_register_cast(void)
{ &hf_cast_partyPIRestrictionBits_CallingPartyName,
{ "RestrictCallingPartyName", "cast.partyPIRestrictionBits.CallingPartyName",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x01,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_CallingPartyNumber,
{ "RestrictCallingPartyNumber", "cast.partyPIRestrictionBits.CallingPartyNumber",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x02,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_CalledPartyName,
{ "RestrictCalledPartyName", "cast.partyPIRestrictionBits.CalledPartyName",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x04,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_CalledPartyNumber,
{ "RestrictCalledPartyNumber", "cast.partyPIRestrictionBits.CalledPartyNumber",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x08,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_OriginalCalledPartyName,
{ "RestrictOriginalCalledPartyName", "cast.partyPIRestrictionBits.OriginalCalledPartyName",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x10,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000010,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber,
{ "RestrictOriginalCalledPartyNumber", "cast.partyPIRestrictionBits.OriginalCalledPartyNumber",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x20,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000020,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_LastRedirectPartyName,
{ "RestrictLastRedirectPartyName", "cast.partyPIRestrictionBits.LastRedirectPartyName",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x40,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000040,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber,
{ "RestrictLastRedirectPartyNumber", "cast.partyPIRestrictionBits.LastRedirectPartyNumber",
- FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x80,
+ FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000080,
NULL, HFILL }
},
@@ -1688,14 +1690,13 @@ proto_register_cast(void)
"Whether the CAST dissector should reassemble messages spanning multiple TCP segments."
" To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
&cast_desegment);
+
+ cast_handle = register_dissector("cast", dissect_cast, proto_cast);
}
void
proto_reg_handoff_cast(void)
{
- dissector_handle_t cast_handle;
-
- cast_handle = create_dissector_handle(dissect_cast, proto_cast);
dissector_add_uint_with_preference("tcp.port", TCP_PORT_CAST, cast_handle);
}