aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-isup.c4
-rw-r--r--epan/dissectors/packet-q931.c16
-rw-r--r--plugins/ciscosm/packet-sm.c98
3 files changed, 106 insertions, 12 deletions
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index 7df8e98743..f4f48ac14a 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -3151,12 +3151,14 @@ dissect_isup_connected_number_parameter(tvbuff_t *parameter_tvb, proto_tree *par
proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator, parameter_tvb, 1, 1, indicators2);
offset = 2;
+ length = tvb_length_remaining(parameter_tvb, offset);
+ if (length == 0)
+ return; /* empty connected number */
address_digits_item = proto_tree_add_text(parameter_tree, parameter_tvb,
offset, -1,
"Connected Number");
address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits);
- length = tvb_length_remaining(parameter_tvb, offset);
while(length > 0){
address_digit_pair = tvb_get_guint8(parameter_tvb, offset);
proto_tree_add_uint(address_digits_tree, hf_isup_calling_party_odd_address_signal_digit, parameter_tvb, offset, 1, address_digit_pair);
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index 0de375b193..513c1807a4 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -173,6 +173,11 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree,
#define Q931_SEGMENT 0x60
#define Q931_STATUS 0x7D
#define Q931_STATUS_ENQUIRY 0x75
+#define Q931_VERSION 0x0a
+#define Q931_GROUIP_SERVICE 0x06
+#define Q931_GROUIP_SERVICE_ACK 0x0b
+#define Q931_RESYNC_REQ 0x08
+#define Q931_RESYNC_RESP 0x09
static const value_string q931_message_type_vals[] = {
{ Q931_ESCAPE, "ESCAPE" },
@@ -209,6 +214,11 @@ static const value_string q931_message_type_vals[] = {
{ Q931_SEGMENT, "SEGMENT" },
{ Q931_STATUS, "STATUS" },
{ Q931_STATUS_ENQUIRY, "STATUS ENQUIRY" },
+ { Q931_VERSION, "VERSION" },
+ { Q931_GROUIP_SERVICE, "GROUP SERVICE" },
+ { Q931_GROUIP_SERVICE_ACK, "GROUP SERVICE ACK" },
+ { Q931_RESYNC_REQ, "RESYNC REQ" },
+ { Q931_RESYNC_RESP, "RESYNC RESP" },
{ 0, NULL }
};
@@ -296,6 +306,9 @@ static const true_false_string q931_extension_ind_value = {
#define Q931_IE_CUG 0x47 /* Closed user group */
#define Q931_IE_REVERSE_CHARGE_IND 0x4A /* Reverse charging indication */
#define Q931_IE_CONNECTED_NUMBER_DEFAULT 0x4C /* Connected Number */
+#define Q931_IE_INTERFACE_SERVICE 0x66 /* q931+ Interface Service */
+#define Q931_IE_CHANNEL_STATUS 0x67 /* q931+ Channel Status */
+#define Q931_IE_VERSION_INFO 0x68 /* q931+ Version Info */
#define Q931_IE_CALLING_PARTY_NUMBER 0x6C /* Calling Party Number */
#define Q931_IE_CALLING_PARTY_SUBADDR 0x6D /* Calling Party Subaddress */
#define Q931_IE_CALLED_PARTY_NUMBER 0x70 /* Called Party Number */
@@ -374,6 +387,9 @@ static const value_string q931_info_element_vals0[] = {
{ Q931_IE_CUG, "Closed user group" },
{ Q931_IE_REVERSE_CHARGE_IND, "Reverse charging indication" },
{ Q931_IE_CONNECTED_NUMBER_DEFAULT, "Connected number" },
+ { Q931_IE_INTERFACE_SERVICE, "Interface Service" },
+ { Q931_IE_CHANNEL_STATUS, "Channel Status" },
+ { Q931_IE_VERSION_INFO, "Version Info" },
{ Q931_IE_CALLING_PARTY_NUMBER, "Calling party number" },
{ Q931_IE_CALLING_PARTY_SUBADDR, "Calling party subaddress" },
{ Q931_IE_CALLED_PARTY_NUMBER, "Called party number" },
diff --git a/plugins/ciscosm/packet-sm.c b/plugins/ciscosm/packet-sm.c
index e84fcbe6d8..fb719a053e 100644
--- a/plugins/ciscosm/packet-sm.c
+++ b/plugins/ciscosm/packet-sm.c
@@ -68,6 +68,68 @@
G_MODULE_EXPORT const gchar version[] = VERSION;
#endif
+
+#define MESSAGE_TYPE_START 0
+#define MESSAGE_TYPE_STOP 1
+#define MESSAGE_TYPE_ACTIVE 2
+#define MESSAGE_TYPE_STANDBY 3
+#define MESSAGE_TYPE_Q_HOLD_INVOKE 4
+#define MESSAGE_TYPE_Q_HOLD_RESPONSE 5
+#define MESSAGE_TYPE_Q_RESUME_INVOKE 6
+#define MESSAGE_TYPE_Q_RESUME_RESPONSE 7
+#define MESSAGE_TYPE_Q_RESET_INVOKE 8
+#define MESSAGE_TYPE_Q_RESET_RESPONSE 9
+#define MESSAGE_TYPE_PDU 0x8000
+
+const value_string sm_message_type_value[] = {
+ { MESSAGE_TYPE_START, "Start Message" },
+ { MESSAGE_TYPE_STOP, "Stop Message" },
+ { MESSAGE_TYPE_ACTIVE, "Active Message" },
+ { MESSAGE_TYPE_STANDBY, "Standby Message" },
+ { MESSAGE_TYPE_Q_HOLD_INVOKE, "Q_HOLD Invoke Message" },
+ { MESSAGE_TYPE_Q_HOLD_RESPONSE, "Q_HOLD Response Message" },
+ { MESSAGE_TYPE_Q_RESUME_INVOKE, "Q_RESUME Invoke Message" },
+ { MESSAGE_TYPE_Q_RESUME_RESPONSE, "Q_RESUME Response Message" },
+ { MESSAGE_TYPE_Q_RESET_INVOKE, "Q_RESET Invoke Message" },
+ { MESSAGE_TYPE_Q_RESET_RESPONSE, "Q_RESET Response Message" },
+ { MESSAGE_TYPE_PDU, "PDU Message" },
+ { 0, NULL }
+};
+
+const value_string sm_message_type_value_info[] = {
+ { MESSAGE_TYPE_START, "Start" },
+ { MESSAGE_TYPE_STOP, "Stop" },
+ { MESSAGE_TYPE_ACTIVE, "Active" },
+ { MESSAGE_TYPE_STANDBY, "Standby" },
+ { MESSAGE_TYPE_Q_HOLD_INVOKE, "Q_HOLD Invoke" },
+ { MESSAGE_TYPE_Q_HOLD_RESPONSE, "Q_HOLD Response" },
+ { MESSAGE_TYPE_Q_RESUME_INVOKE, "Q_RESUME Invoke" },
+ { MESSAGE_TYPE_Q_RESUME_RESPONSE, "Q_RESUME Response" },
+ { MESSAGE_TYPE_Q_RESET_INVOKE, "Q_RESET Invoke" },
+ { MESSAGE_TYPE_Q_RESET_RESPONSE, "Q_RESET Response" },
+ { MESSAGE_TYPE_PDU, "PDU" },
+ { 0, NULL }
+};
+
+
+#define PDU_MTP3_TO_SLT 0x10
+#define PDU_MTP3_FROM_SLT 0x11
+
+#define PDU_SET_STATE 0x44
+#define PDU_RETURN_STATE 0x45
+
+const value_string sm_pdu_type_value[] = {
+ { PDU_MTP3_TO_SLT, "mtp3 to SLT"},
+ { PDU_MTP3_FROM_SLT, "mtp3 from SLT"},
+ { PDU_SET_STATE, "set session state"},
+ { PDU_RETURN_STATE, "return session state"},
+ { 0, NULL }
+};
+
+
+
+
+
/* Initialize the protocol and registered fields */
static int proto_sm = -1;
@@ -89,28 +151,42 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *sm_tree;
tvbuff_t *next_tvb = NULL;
+ guint32 sm_message_type;
+ guint16 msg_type;
+
+ sm_message_type = tvb_get_ntohl(tvb,0);
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SM");
if (check_col(pinfo->cinfo, COL_INFO))
- col_set_str(pinfo->cinfo, COL_INFO, "Cisco SM Packet");
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Cisco SM Packet (%s)",
+ val_to_str(sm_message_type, sm_message_type_value_info,"reserved"));
if (tree) {
ti = proto_tree_add_item(tree, proto_sm, tvb, 0, 16, FALSE);
sm_tree = proto_item_add_subtree(ti, ett_sm);
- ti = proto_tree_add_item(sm_tree, hf_sm_sm_msg_type, tvb, 0, 4, FALSE);
- ti = proto_tree_add_item(sm_tree, hf_sm_protocol, tvb, 4, 2, FALSE);
- ti = proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, 6, 2, FALSE);
- ti = proto_tree_add_item(sm_tree, hf_sm_msg_type, tvb, 8, 2, FALSE);
- ti = proto_tree_add_item(sm_tree, hf_sm_channel, tvb, 10, 2, FALSE);
- ti = proto_tree_add_item(sm_tree, hf_sm_bearer, tvb, 12, 2, FALSE);
- ti = proto_tree_add_item(sm_tree, hf_sm_len, tvb, 14, 2, FALSE);
+
+ ti = proto_tree_add_uint_format(sm_tree, hf_sm_sm_msg_type, tvb, 0, 4, sm_message_type,
+ "SM Message type: %s (0x%0x)", val_to_str(sm_message_type, sm_message_type_value, "reserved"), sm_message_type);
+ if (sm_message_type == MESSAGE_TYPE_PDU) {
+ ti = proto_tree_add_item(sm_tree, hf_sm_protocol, tvb, 4, 2, FALSE);
+ ti = proto_tree_add_item(sm_tree, hf_sm_msg_id, tvb, 6, 2, FALSE);
+ msg_type = tvb_get_ntohs(tvb,8);
+ ti = proto_tree_add_uint_format(sm_tree, hf_sm_msg_type, tvb, 0, 4, msg_type,
+ "Message type: %s (0x%0x)", val_to_str(msg_type, sm_pdu_type_value, "reserved"), msg_type);
+ ti = proto_tree_add_item(sm_tree, hf_sm_channel, tvb, 10, 2, FALSE);
+ ti = proto_tree_add_item(sm_tree, hf_sm_bearer, tvb, 12, 2, FALSE);
+ ti = proto_tree_add_item(sm_tree, hf_sm_len, tvb, 14, 2, FALSE);
+ }
}
- next_tvb = tvb_new_subset(tvb, 16, -1, -1);
- if (tvb_length(next_tvb) && find_dissector("mtp3"))
- call_dissector(find_dissector("mtp3"), next_tvb, pinfo, tree);
+ if (sm_message_type == MESSAGE_TYPE_PDU) {
+ msg_type = tvb_get_ntohs(tvb,8);
+ next_tvb = tvb_new_subset(tvb, 16, -1, -1);
+ if ((msg_type == PDU_MTP3_TO_SLT || msg_type == PDU_MTP3_FROM_SLT) && tvb_length(next_tvb) && find_dissector("mtp3"))
+ call_dissector(find_dissector("mtp3"), next_tvb, pinfo, tree);
+ }
}
void