* http://www.ietf.org/internet-drafts/draft-ietf-sigtran-m3ua-06.txt (expired)
* http://www.ietf.org/rfc/rfc3332.txt
*
- * Copyright 2000, 2001, 2002, 2003 Michael Tuexen <Michael.Tuexen [AT] siemens.com>
+ * Copyright 2000, 2001, 2002, 2003 Michael Tuexen <tuexen [AT] fh-muenster.de>
*
- * $Id: packet-m3ua.c,v 1.28 2003/02/18 19:48:31 tuexen Exp $
+ * $Id: packet-m3ua.c,v 1.31 2003/04/22 13:47:38 tuexen Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
{ MESSAGE_CLASS_RKM_MESSAGE * 256 + MESSAGE_TYPE_DEREG_RSP , "DEREG_RSP" },
{ 0, NULL } };
-
-
-
-
-#define PROTOCOL_DATA_OFFSET PARAMETER_VALUE_OFFSET
-
-
-
-#define TRAFFIC_MODE_TYPE_LENGTH 4
-#define TRAFFIC_MODE_TYPE_OFFSET PARAMETER_VALUE_OFFSET
-
/* Initialize the protocol and registered fields */
static int proto_m3ua = -1;
static int hf_version = -1;
message_class = tvb_get_guint8(common_header_tvb, MESSAGE_CLASS_OFFSET);
message_type = tvb_get_guint8(common_header_tvb, MESSAGE_TYPE_OFFSET);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_class * 256 + message_type, v5_message_class_type_acro_values, "reserved"));
- col_append_str(pinfo->cinfo, COL_INFO, " ");
- }
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_class * 256 + message_type, v5_message_class_type_acro_values, "reserved"));
if (m3ua_tree) {
/* add the components of the common header to the protocol tree */
message_class = tvb_get_guint8(common_header_tvb, MESSAGE_CLASS_OFFSET);
message_type = tvb_get_guint8(common_header_tvb, MESSAGE_TYPE_OFFSET);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_str(pinfo->cinfo, COL_INFO, val_to_str(message_class * 256 + message_type, message_class_type_acro_values, "reserved"));
- col_append_str(pinfo->cinfo, COL_INFO, " ");
- }
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO,"%s ", val_to_str(message_class * 256 + message_type, message_class_type_acro_values, "reserved"));
if (m3ua_tree) {
/* add the components of the common header to the protocol tree */
proto_item_append_text(parameter_item, " (%u)", tvb_get_ntohl(parameter_tvb, NETWORK_APPEARANCE_OFFSET));
}
+#define V5_PROTOCOL_DATA_OFFSET PARAMETER_VALUE_OFFSET
+
static void
dissect_v5_protocol_data_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *tree, proto_item *parameter_item)
{
length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
protocol_data_length = length - PARAMETER_HEADER_LENGTH;
- payload_tvb = tvb_new_subset(parameter_tvb, PROTOCOL_DATA_OFFSET, protocol_data_length, protocol_data_length);
+ payload_tvb = tvb_new_subset(parameter_tvb, V5_PROTOCOL_DATA_OFFSET, protocol_data_length, protocol_data_length);
proto_item_append_text(parameter_item, " (SS7 message of %u byte%s)", protocol_data_length, plurality(protocol_data_length, "", "s"));
proto_item_set_len(parameter_item, PARAMETER_HEADER_LENGTH);
call_dissector(mtp3_handle, payload_tvb, pinfo, tree);
proto_item_append_text(parameter_item, " (%s)", val_to_str(tvb_get_ntohl(parameter_tvb, REASON_OFFSET), reason_values, "unknown"));
}
+#define TRAFFIC_MODE_TYPE_LENGTH 4
+#define TRAFFIC_MODE_TYPE_OFFSET PARAMETER_VALUE_OFFSET
+
static const value_string v5_traffic_mode_type_values[] = {
{ 1, "Over-ride" },
{ 2, "Load-share" },
proto_item_append_text(parameter_item, " (%u)", tvb_get_ntohl(parameter_tvb, ASP_IDENTIFIER_OFFSET));
}
+#define PROTOCOL_DATA_1_OFFSET PARAMETER_VALUE_OFFSET
+
static void
dissect_protocol_data_1_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *tree, proto_item *parameter_item)
{
tvbuff_t *payload_tvb;
protocol_data_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH;
- payload_tvb = tvb_new_subset(parameter_tvb, PROTOCOL_DATA_OFFSET, protocol_data_length, protocol_data_length);
+ payload_tvb = tvb_new_subset(parameter_tvb, PROTOCOL_DATA_1_OFFSET, protocol_data_length, protocol_data_length);
proto_item_append_text(parameter_item, " (SS7 message of %u byte%s)", protocol_data_length, plurality(protocol_data_length, "", "s"));
proto_item_set_len(parameter_item, PARAMETER_HEADER_LENGTH);
call_dissector(mtp3_handle, payload_tvb, pinfo, tree);
-
}
#define LI_OCTETT_LENGTH 1
#define LI_OCTETT_OFFSET PARAMETER_VALUE_OFFSET
+#define PROTOCOL_DATA_2_OFFSET (PARAMETER_VALUE_OFFSET + LI_OCTETT_LENGTH)
static void
dissect_protocol_data_2_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *tree, proto_tree *parameter_tree, proto_item *parameter_item)
li = tvb_get_guint8(parameter_tvb, LI_OCTETT_OFFSET);
protocol_data_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH - LI_OCTETT_LENGTH;
- payload_tvb = tvb_new_subset(parameter_tvb, PROTOCOL_DATA_OFFSET + LI_OCTETT_LENGTH, protocol_data_length, protocol_data_length);
+ payload_tvb = tvb_new_subset(parameter_tvb, PROTOCOL_DATA_2_OFFSET, protocol_data_length, protocol_data_length);
proto_tree_add_item(parameter_tree, hf_li, parameter_tvb, LI_OCTETT_OFFSET, LI_OCTETT_LENGTH, NETWORK_BYTE_ORDER);
proto_item_append_text(parameter_item, " (SS7 message of %u byte%s)", protocol_data_length, plurality(protocol_data_length, "", "s"));
proto_item_set_len(parameter_item, PARAMETER_HEADER_LENGTH + LI_OCTETT_LENGTH);
}
static const value_string registration_result_status_values[] = {
- { 0, "Successfully Registered" } ,
- { 1, "Error - Unknown" } ,
- { 2, "Error - Invalid DPC" } ,
- { 3, "Error - Invalid Network Appearance" } ,
- { 4, "Error - Invalid Routing Key" } ,
- { 5, "Error - Permission Denied" } ,
- { 6, "Error - Overlapping (Non-unique) Routing Key" } ,
- { 7, "Error - Routing Key not Provisioned" } ,
- { 8, "Error - Insufficient Resources" } ,
- { 0, NULL } };
+ { 0, "Successfully Registered" } ,
+ { 1, "Error - Unknown" } ,
+ { 2, "Error - Invalid DPC" } ,
+ { 3, "Error - Invalid Network Appearance" } ,
+ { 4, "Error - Invalid Routing Key" } ,
+ { 5, "Error - Permission Denied" } ,
+ { 6, "Error - Overlapping (Non-unique) Routing Key" } ,
+ { 7, "Error - Routing Key not Provisioned" } ,
+ { 8, "Error - Insufficient Resources" } ,
+ { 0, NULL } };
#define REG_RES_IDENTIFIER_LENGTH 4
#define REG_RES_STATUS_LENGTH 4
#define REG_STATUS_OFFSET PARAMETER_VALUE_OFFSET
static const value_string registration_status_values[] = {
- { 0, "Successfully Registered" },
- { 1, "Error - Unknown" },
- { 2, "Error - Invalid DPC" },
- { 3, "Error - Invalid Network Appearance" },
- { 4, "Error - Invalid Routing Key" },
- { 5, "Error - Permission Denied" },
- { 6, "Error - Cannot Support Unique Routing" },
- { 7, "Error - Routing Key not Currently Provisioned" },
- { 8, "Error - Insufficient Resources" },
- { 9, "Error - Unsupported RK parameter Field" },
- { 10, "Error - Unsupported/Invalid Traffic Handling Mode" },
- { 0, NULL } };
+ { 0, "Successfully Registered" },
+ { 1, "Error - Unknown" },
+ { 2, "Error - Invalid DPC" },
+ { 3, "Error - Invalid Network Appearance" },
+ { 4, "Error - Invalid Routing Key" },
+ { 5, "Error - Permission Denied" },
+ { 6, "Error - Cannot Support Unique Routing" },
+ { 7, "Error - Routing Key not Currently Provisioned" },
+ { 8, "Error - Insufficient Resources" },
+ { 9, "Error - Unsupported RK parameter Field" },
+ { 10, "Error - Unsupported/Invalid Traffic Handling Mode" },
+ { 0, NULL } };
static void
dissect_registration_status_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
#define DEREG_STATUS_OFFSET PARAMETER_VALUE_OFFSET
static const value_string deregistration_status_values[] = {
- { 0, "Successfully Deregistered" },
- { 1, "Error - Unknown" },
- { 2, "Error - Invalid Routing Context" },
- { 3, "Error - Permission Denied" },
- { 4, "Error - Not Registered" },
- { 5, "Error - ASP Currently Active for Routing Context" },
- { 0, NULL } };
+ { 0, "Successfully Deregistered" },
+ { 1, "Error - Unknown" },
+ { 2, "Error - Invalid Routing Context" },
+ { 3, "Error - Permission Denied" },
+ { 4, "Error - Not Registered" },
+ { 5, "Error - ASP Currently Active for Routing Context" },
+ { 0, NULL } };
static void
dissect_deregistration_status_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
} else {
m3ua_tree = NULL;
};
+
/* dissect the message */
dissect_message(message_tvb, pinfo, tree, m3ua_tree);
}