2003-11-11 08:29:34 +00:00
|
|
|
/* packet-ses.c
|
|
|
|
*
|
2005-08-29 20:07:06 +00:00
|
|
|
* Routine to dissect ITU-T Rec. X.225 (1995 E)/ISO 8327-1 OSI Session Protocol packets
|
2003-11-11 08:29:34 +00:00
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2003-11-11 08:29:34 +00:00
|
|
|
*
|
|
|
|
* Yuriy Sidelnikov <YSidelnikov@hotmail.com>
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2003-11-11 08:29:34 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2003-11-11 08:29:34 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2003-11-11 08:29:34 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
2011-02-21 11:00:19 +00:00
|
|
|
#include <epan/packet.h>
|
|
|
|
#include <epan/prefs.h>
|
2007-05-15 05:49:43 +00:00
|
|
|
#include <epan/asn1.h>
|
2011-02-21 11:00:19 +00:00
|
|
|
#include <epan/conversation.h>
|
|
|
|
#include <epan/reassemble.h>
|
Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c. Update their callers to include
<epan/show_exception.h> to get their declaration.
Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff. Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).
Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).
Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.
Use show_exception() to report non-fatal errors, rather than doing it
yourself.
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.
Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.
Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.
svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
|
|
|
#include <epan/show_exception.h>
|
2011-02-21 11:00:19 +00:00
|
|
|
|
2007-05-15 05:49:43 +00:00
|
|
|
#include "packet-ber.h"
|
2003-11-11 08:29:34 +00:00
|
|
|
#include "packet-ses.h"
|
2007-05-15 05:49:43 +00:00
|
|
|
|
2008-11-27 16:38:22 +00:00
|
|
|
/* #include <epan/prefs.h> */
|
2007-06-24 05:28:27 +00:00
|
|
|
#include <epan/emem.h>
|
2003-11-11 08:29:34 +00:00
|
|
|
#include <epan/strutil.h>
|
|
|
|
|
|
|
|
/* ses header fields */
|
|
|
|
static int proto_ses = -1;
|
|
|
|
static int hf_ses_type = -1;
|
2003-12-12 22:19:45 +00:00
|
|
|
static int hf_ses_type_0 = -1;
|
2003-11-11 08:29:34 +00:00
|
|
|
static int hf_ses_length = -1;
|
2013-01-26 18:54:53 +00:00
|
|
|
/* static int hf_ses_version = -1; */
|
|
|
|
/* static int hf_ses_reserved = -1; */
|
2003-11-11 08:29:34 +00:00
|
|
|
|
2011-02-21 11:00:19 +00:00
|
|
|
static int hf_ses_segment_data = -1;
|
|
|
|
static int hf_ses_segments = -1;
|
|
|
|
static int hf_ses_segment = -1;
|
|
|
|
static int hf_ses_segment_overlap = -1;
|
|
|
|
static int hf_ses_segment_overlap_conflicts = -1;
|
|
|
|
static int hf_ses_segment_multiple_tails = -1;
|
|
|
|
static int hf_ses_segment_too_long_segment = -1;
|
|
|
|
static int hf_ses_segment_error = -1;
|
|
|
|
static int hf_ses_segment_count = -1;
|
|
|
|
static int hf_ses_reassembled_in = -1;
|
|
|
|
static int hf_ses_reassembled_length = -1;
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
/* ses fields defining a sub tree */
|
|
|
|
static gint ett_ses = -1;
|
|
|
|
static gint ett_ses_param = -1;
|
|
|
|
|
2011-02-21 11:00:19 +00:00
|
|
|
static gint ett_ses_segment = -1;
|
|
|
|
static gint ett_ses_segments = -1;
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
|
|
|
|
/* flags */
|
|
|
|
static int hf_connect_protocol_options_flags = -1;
|
|
|
|
static int hf_version_number_options_flags = -1;
|
|
|
|
static int hf_enclosure_item_options_flags = -1;
|
|
|
|
static int hf_token_item_options_flags = -1;
|
|
|
|
|
|
|
|
static gint ett_connect_protocol_options_flags = -1;
|
|
|
|
static gint ett_protocol_version_flags = -1;
|
|
|
|
static gint ett_enclosure_item_flags = -1;
|
|
|
|
static gint ett_token_item_flags = -1;
|
|
|
|
static gint ett_ses_req_options_flags = -1;
|
|
|
|
|
|
|
|
/* called SS user reference */
|
|
|
|
static int hf_called_ss_user_reference = -1;
|
|
|
|
|
|
|
|
/* calling SS user reference */
|
|
|
|
static int hf_calling_ss_user_reference = -1;
|
|
|
|
|
|
|
|
/* common reference */
|
|
|
|
static int hf_common_reference = -1;
|
|
|
|
|
|
|
|
/* additional reference information */
|
|
|
|
static int hf_additional_reference_information = -1;
|
|
|
|
|
|
|
|
/* token item */
|
|
|
|
static int hf_release_token = -1;
|
|
|
|
static int hf_major_activity_token = -1;
|
|
|
|
static int hf_synchronize_minor_token = -1;
|
|
|
|
static int hf_data_token = -1;
|
|
|
|
|
|
|
|
/* protocol options */
|
|
|
|
static int hf_able_to_receive_extended_concatenated_SPDU = -1;
|
|
|
|
|
|
|
|
/* session requirement */
|
|
|
|
static int hf_session_user_req_flags = -1;
|
|
|
|
static int hf_session_exception_report= -1;
|
|
|
|
static int hf_data_separation_function_unit= -1;
|
|
|
|
static int hf_symmetric_synchronize_function_unit= -1;
|
|
|
|
static int hf_typed_data_function_unit= -1;
|
|
|
|
static int hf_exception_function_unit= -1;
|
|
|
|
static int hf_capability_function_unit=-1;
|
|
|
|
static int hf_negotiated_release_function_unit= -1;
|
|
|
|
static int hf_activity_management_function_unit= -1;
|
|
|
|
static int hf_resynchronize_function_unit= -1;
|
|
|
|
static int hf_major_resynchronize_function_unit= -1;
|
|
|
|
static int hf_minor_resynchronize_function_unit= -1;
|
|
|
|
static int hf_expedited_data_resynchronize_function_unit= -1;
|
|
|
|
static int hf_duplex_function_unit= -1;
|
|
|
|
static int hf_half_duplex_function_unit = -1;
|
|
|
|
|
|
|
|
/* TSDU maximum size */
|
|
|
|
static int hf_proposed_tsdu_maximum_size_i2r = -1;
|
|
|
|
static int hf_proposed_tsdu_maximum_size_r2i = -1;
|
|
|
|
|
|
|
|
/* protocol version */
|
|
|
|
static int hf_protocol_version_1 = -1;
|
|
|
|
static int hf_protocol_version_2 = -1;
|
|
|
|
|
|
|
|
/* initial serial number */
|
|
|
|
static int hf_initial_serial_number = -1;
|
|
|
|
|
|
|
|
/* enclosure item */
|
|
|
|
static int hf_beginning_of_SSDU = -1;
|
|
|
|
static int hf_end_of_SSDU = -1;
|
|
|
|
|
|
|
|
/* token setting item */
|
|
|
|
|
|
|
|
static const value_string token_setting_vals[] = {
|
|
|
|
{ 0x00, "initiator's side" },
|
|
|
|
{ 0x01, "responder's side" },
|
|
|
|
{ 0x02, "called SS user's choice" },
|
|
|
|
{ 0x03, "reserved" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2010-10-08 01:50:50 +00:00
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
static int hf_release_token_setting = -1;
|
|
|
|
static int hf_major_activity_token_setting = -1;
|
|
|
|
static int hf_synchronize_minor_token_setting = -1;
|
|
|
|
static int hf_data_token_setting = -1;
|
|
|
|
|
|
|
|
/* calling session selector */
|
|
|
|
static int hf_calling_session_selector = -1;
|
|
|
|
|
|
|
|
/* called session selector */
|
|
|
|
static int hf_called_session_selector = -1;
|
|
|
|
|
2005-12-01 06:28:04 +00:00
|
|
|
/* activity id */
|
|
|
|
static int hf_activity_identifier = -1;
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
/* serial number */
|
|
|
|
static int hf_serial_number = -1;
|
|
|
|
|
|
|
|
/* second serial number */
|
|
|
|
static int hf_second_serial_number = -1;
|
|
|
|
|
|
|
|
/* second initial serial number */
|
|
|
|
static int hf_second_initial_serial_number = -1;
|
|
|
|
|
|
|
|
/* large initial serial number */
|
|
|
|
static int hf_large_initial_serial_number = -1;
|
|
|
|
|
|
|
|
/* large second initial serial number */
|
|
|
|
static int hf_large_second_initial_serial_number = -1;
|
|
|
|
|
2010-01-04 23:17:37 +00:00
|
|
|
/* clses header fields */
|
|
|
|
static int proto_clses = -1;
|
|
|
|
|
|
|
|
#define PROTO_STRING_CLSES "ISO 9548-1 OSI Connectionless Session Protocol"
|
|
|
|
|
|
|
|
static dissector_handle_t pres_handle = NULL;
|
|
|
|
|
2013-03-22 23:59:54 +00:00
|
|
|
static reassembly_table ses_reassembly_table;
|
2011-02-21 11:00:19 +00:00
|
|
|
|
|
|
|
static const fragment_items ses_frag_items = {
|
|
|
|
/* Segment subtrees */
|
|
|
|
&ett_ses_segment,
|
|
|
|
&ett_ses_segments,
|
|
|
|
/* Segment fields */
|
|
|
|
&hf_ses_segments,
|
|
|
|
&hf_ses_segment,
|
|
|
|
&hf_ses_segment_overlap,
|
|
|
|
&hf_ses_segment_overlap_conflicts,
|
|
|
|
&hf_ses_segment_multiple_tails,
|
|
|
|
&hf_ses_segment_too_long_segment,
|
|
|
|
&hf_ses_segment_error,
|
|
|
|
&hf_ses_segment_count,
|
|
|
|
/* Reassembled in field */
|
|
|
|
&hf_ses_reassembled_in,
|
|
|
|
/* Reassembled length field */
|
|
|
|
&hf_ses_reassembled_length,
|
2012-09-07 02:09:59 +00:00
|
|
|
/* Reassembled data field */
|
|
|
|
NULL,
|
2011-02-21 11:00:19 +00:00
|
|
|
/* Tag */
|
|
|
|
"SES segments"
|
|
|
|
};
|
2010-01-04 23:17:37 +00:00
|
|
|
|
|
|
|
|
2004-01-09 23:18:17 +00:00
|
|
|
const value_string ses_vals[] =
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
2010-10-08 01:36:20 +00:00
|
|
|
{SES_CONNECTION_REQUEST, "CONNECT (CN) SPDU" }, /* 13 */
|
|
|
|
{SES_CONNECTION_ACCEPT, "ACCEPT (AC) SPDU" }, /* 14 */
|
|
|
|
{SES_EXCEPTION_REPORT, "EXCEPTION REPORT (ER) SPDU" }, /* 0 */
|
|
|
|
{SES_DATA_TRANSFER, "DATA TRANSFER (DT) SPDU" }, /* 1 */
|
|
|
|
{SES_PLEASE_TOKENS, "PLEASE TOKENS (PT) SPDU" }, /* 2 */
|
|
|
|
{SES_EXPEDITED, "EXPEDITED (EX) SPDU" }, /* 5 */
|
|
|
|
{SES_PREPARE, "PREPARE (PR) SPDU" }, /* 7 */
|
|
|
|
{SES_NOT_FINISHED, "NOT FINISHED (NF) SPDU" }, /* 8 */
|
|
|
|
{SES_FINISH, "FINISH (FN) SPDU" }, /* 9 */
|
|
|
|
{SES_DISCONNECT, "DISCONNECT (DN) SPDU" }, /* 10 */
|
|
|
|
{SES_REFUSE, "REFUSE (RF) SPDU" }, /* 12 */
|
|
|
|
{SES_CONNECTION_DATA_OVERFLOW, "CONNECT DATA OVERFLOW (CDO) SPDU"}, /* 15 */
|
|
|
|
{SES_OVERFLOW_ACCEPT, "OVERFLOW ACCEPT (OA) SPDU" }, /* 16 */
|
|
|
|
{SES_GIVE_TOKENS_CONFIRM, "GIVE TOKENS CONFIRM (GTC) SPDU"}, /* 21 */
|
|
|
|
{SES_GIVE_TOKENS_ACK, "GIVE TOKENS ACK (GTA) SPDU" }, /* 22 */
|
|
|
|
{SES_ABORT, "ABORT (AB) SPDU" }, /* 25 */
|
|
|
|
{SES_ABORT_ACCEPT, "ABORT ACCEPT (AA) SPDU" }, /* 26 */
|
|
|
|
{SES_ACTIVITY_RESUME, "ACTIVITY RESUME (AR) SPDU" }, /* 29 */
|
|
|
|
{SES_TYPED_DATA, "TYPED DATA (TD) SPDU" }, /* 33 */
|
|
|
|
{SES_RESYNCHRONIZE_ACK, "RESYNCHRONIZE ACK (RA) SPDU" }, /* 34 */
|
|
|
|
{SES_MAJOR_SYNC_POINT, "MAJOR SYNC POINT (MAP) SPDU" }, /* 41 */
|
|
|
|
{SES_MAJOR_SYNC_ACK, "MAJOR SYNC ACK (MAA) SPDU" }, /* 42 */
|
|
|
|
{SES_ACTIVITY_START, "ACTIVITY START (AS) SPDU" }, /* 45 */
|
|
|
|
{SES_EXCEPTION_DATA, "EXCEPTION DATA (ED) SPDU" }, /* 48 */
|
|
|
|
{SES_MINOR_SYNC_POINT, "MINOR SYNC POINT (MIP) SPDU" }, /* 49 */
|
|
|
|
{SES_MINOR_SYNC_ACK, "MINOR SYNC ACK (MIA) SPDU" }, /* 50 */
|
|
|
|
{SES_RESYNCHRONIZE, "RESYNCHRONIZE (RS) SPDU" }, /* 53 */
|
|
|
|
{SES_ACTIVITY_DISCARD, "ACTIVITY DISCARD (AD) SPDU" }, /* 57 */
|
|
|
|
{SES_ACTIVITY_DISCARD_ACK, "ACTIVITY DISCARD ACK (ADA) SPDU" }, /* 58 */
|
|
|
|
{SES_CAPABILITY, "CAPABILITY DATA (CD) SPDU" }, /* 61 */
|
|
|
|
{SES_CAPABILITY_DATA_ACK, "CAPABILITY DATA ACK (CDA) SPDU" }, /* 62 */
|
|
|
|
{CLSES_UNIT_DATA, "UNIT DATA (UD) SPDU" }, /* 64 */
|
|
|
|
{0, NULL }
|
2003-11-11 08:29:34 +00:00
|
|
|
};
|
|
|
|
|
2003-12-12 22:19:45 +00:00
|
|
|
static const value_string ses_category0_vals[] =
|
|
|
|
{
|
2010-10-08 01:36:20 +00:00
|
|
|
{SES_PLEASE_TOKENS, "Please tokens PDU" },
|
|
|
|
{SES_GIVE_TOKENS, "Give tokens PDU" },
|
|
|
|
{0, NULL }
|
2003-12-12 22:19:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
static const value_string param_vals[] =
|
|
|
|
{
|
|
|
|
{Connection_Identifier, "Connection Identifier"},
|
|
|
|
{Connect_Accept_Item, "Connect Accept Item"},
|
|
|
|
{Called_SS_user_Reference, "Called SS user Reference"},
|
|
|
|
{Calling_SS_user_Reference, "Calling SS user Reference"},
|
|
|
|
{Common_Reference, "Common Reference"},
|
|
|
|
{Sync_Type_Item, "Sync Type Item"},
|
|
|
|
{Token_Item, "Token Item"},
|
|
|
|
{Transport_Disconnect, "Transport_Disconnect"},
|
|
|
|
{Additional_Reference_Information, "Additional Reference Information"},
|
|
|
|
{Protocol_Options, "Protocol Options"},
|
|
|
|
{TSDU_Maximum_Size, "TSDU Maximum Size"},
|
|
|
|
{Version_Number, "Version Number"},
|
|
|
|
{Initial_Serial_Number, "Initial Serial Number"},
|
|
|
|
{Prepare_Type, "Prepare Type"},
|
|
|
|
{EnclosureItem, "Enclosure Item"},
|
|
|
|
{Token_Setting_Item, "Token Setting Item"},
|
|
|
|
{Resync_Type, "Resync Type"},
|
2005-12-01 06:28:04 +00:00
|
|
|
{Activity_Identifier, "Activity Identifier"},
|
2003-11-11 08:29:34 +00:00
|
|
|
{Serial_Number, "Serial Number"},
|
|
|
|
{Linking_Information, "Linking Information"},
|
|
|
|
{Reflect_Parameter, "Reflect Parameter"},
|
|
|
|
{Reason_Code, "Reason Code"},
|
|
|
|
{Calling_Session_Selector, "Calling Session Selector"},
|
|
|
|
{Called_Session_Selector, "Called Session Selector"},
|
|
|
|
{Second_Resync_Type, "Second Resync Type"},
|
|
|
|
{Second_Serial_Number, "Second Serial Number"},
|
|
|
|
{Second_Initial_Serial_Number, "Second Initial Serial Number"},
|
|
|
|
{Upper_Limit_Serial_Number, "Upper Limit Serial Number"},
|
|
|
|
{Large_Initial_Serial_Number, "Large Initial Serial Number"},
|
|
|
|
{Large_Second_Initial_Serial_Number, "Large Second Initial Serial Number"},
|
|
|
|
{Data_Overflow, "Data Overflow"},
|
|
|
|
{Session_Requirement, "Session Requirement"},
|
|
|
|
{User_Data, "Session user data"},
|
|
|
|
{Extended_User_Data, "Session extended user data"},
|
|
|
|
{0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string reason_vals[] =
|
|
|
|
{
|
|
|
|
{reason_not_specified, "Rejection by called SS-user; reason not specified" },
|
|
|
|
{temporary_congestion, "Rejection by called SS-user due to temporary congestion" },
|
|
|
|
{Subsequent, "Rejection by called SS-user." },
|
|
|
|
{Session_Selector_unknown, "Session Selector unknown" },
|
|
|
|
{SS_user_not_attached_to_SSAP, "SS-user not attached to SSAP" },
|
|
|
|
{SPM_congestion_at_connect_time, "SPM congestion at connect time" },
|
|
|
|
{versions_not_supported, "Proposed protocol versions not supported" },
|
|
|
|
{SPM_reason_not_specified, "Rejection by the SPM; reason not specified" },
|
|
|
|
{SPM_implementation_restriction, "Finish PDU" },
|
|
|
|
{SES_DISCONNECT, "Rejection by the SPM; implementation restriction stated in the PICS" },
|
|
|
|
{0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
/* desegmentation of OSI over ses */
|
2011-02-21 11:00:19 +00:00
|
|
|
static gboolean ses_desegment = TRUE;
|
2003-11-11 08:29:34 +00:00
|
|
|
|
2007-06-24 05:28:27 +00:00
|
|
|
/* RTSE reassembly data */
|
|
|
|
static guint ses_pres_ctx_id = 0;
|
|
|
|
static gboolean ses_rtse_reassemble = FALSE;
|
2003-11-11 08:29:34 +00:00
|
|
|
|
|
|
|
/* find the dissector for data */
|
|
|
|
static dissector_handle_t data_handle;
|
|
|
|
|
|
|
|
static void
|
|
|
|
call_pres_dissector(tvbuff_t *tvb, int offset, guint16 param_len,
|
2010-10-08 01:36:20 +00:00
|
|
|
packet_info *pinfo, proto_tree *tree,
|
|
|
|
proto_tree *param_tree,
|
|
|
|
struct SESSION_DATA_STRUCTURE *session)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
2004-01-09 23:18:17 +00:00
|
|
|
void *saved_private_data;
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
/* do we have OSI presentation packet dissector ? */
|
|
|
|
if(!pres_handle)
|
|
|
|
{
|
|
|
|
/* No - display as data */
|
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, param_len,
|
|
|
|
"User data");
|
|
|
|
}
|
2003-12-02 05:53:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Yes - call presentation dissector */
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
|
|
|
|
next_tvb = tvb_new_subset(tvb, offset, param_len, param_len);
|
2010-10-08 01:36:20 +00:00
|
|
|
/* save type of session pdu. We'll need it in the presentation dissector */
|
|
|
|
saved_private_data = pinfo->private_data;
|
|
|
|
pinfo->private_data = session;
|
2003-12-02 05:53:26 +00:00
|
|
|
TRY
|
|
|
|
{
|
|
|
|
call_dissector(pres_handle, next_tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
CATCH_ALL
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
2005-01-16 16:06:15 +00:00
|
|
|
show_exception(tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
2003-12-02 05:53:26 +00:00
|
|
|
ENDTRY;
|
2010-10-08 01:36:20 +00:00
|
|
|
/* Restore private_data even if there was an exception */
|
|
|
|
pinfo->private_data = saved_private_data;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* this routine returns length of parameter field, parameter group,
|
|
|
|
or parameter */
|
|
|
|
static int
|
|
|
|
get_item_len(tvbuff_t *tvb, int offset, int *len_len)
|
|
|
|
{
|
|
|
|
guint16 len;
|
|
|
|
|
|
|
|
len = tvb_get_guint8(tvb, offset);
|
|
|
|
if(len == TWO_BYTE_LEN)
|
|
|
|
{
|
|
|
|
len = tvb_get_ntohs(tvb, offset+1);
|
|
|
|
*len_len = 3;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
*len_len = 1;
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
static gboolean
|
2003-11-11 08:29:34 +00:00
|
|
|
dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
2010-10-08 01:36:20 +00:00
|
|
|
proto_tree *param_tree, packet_info *pinfo, guint8 param_type,
|
2011-02-21 11:00:19 +00:00
|
|
|
guint16 param_len, guint8 *enclosure_item_flags,
|
|
|
|
struct SESSION_DATA_STRUCTURE *session)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
2003-11-18 07:08:43 +00:00
|
|
|
gboolean has_user_information = TRUE;
|
|
|
|
guint16 flags;
|
|
|
|
proto_item *tf;
|
|
|
|
proto_tree *flags_tree;
|
2007-05-15 05:49:43 +00:00
|
|
|
asn1_ctx_t asn1_ctx;
|
|
|
|
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
2003-11-18 07:08:43 +00:00
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
switch (param_type)
|
|
|
|
{
|
|
|
|
case Called_SS_user_Reference:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_called_ss_user_reference,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, param_len, ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Calling_SS_user_Reference:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_calling_ss_user_reference,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, param_len, ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Common_Reference:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_common_reference,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, param_len, ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Additional_Reference_Information:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_additional_reference_information,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, param_len, ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Token_Item:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 1",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
flags = tvb_get_guint8(tvb, offset);
|
|
|
|
tf = proto_tree_add_uint(param_tree,
|
|
|
|
hf_token_item_options_flags, tvb, offset, 1,
|
|
|
|
flags);
|
|
|
|
flags_tree = proto_item_add_subtree(tf,
|
|
|
|
ett_token_item_flags);
|
|
|
|
proto_tree_add_boolean(flags_tree, hf_release_token,
|
|
|
|
tvb, offset, 1, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_major_activity_token, tvb, offset, 1, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_synchronize_minor_token, tvb, offset, 1, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree, hf_data_token, tvb,
|
|
|
|
offset, 1, flags);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Transport_Disconnect:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 1",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
2010-01-19 23:51:27 +00:00
|
|
|
guint8 flags8;
|
2003-11-11 08:29:34 +00:00
|
|
|
|
2010-01-19 23:51:27 +00:00
|
|
|
flags8 = tvb_get_guint8(tvb, offset);
|
|
|
|
if(flags8 & transport_connection_is_released )
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
|
|
|
"transport connection is released");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
|
|
|
"transport connection is kept");
|
|
|
|
}
|
|
|
|
|
2010-01-19 23:51:27 +00:00
|
|
|
if(flags8 & user_abort )
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
|
|
|
"user abort");
|
2004-01-09 23:18:17 +00:00
|
|
|
session->abort_type = SESSION_USER_ABORT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
session->abort_type = SESSION_PROVIDER_ABORT;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
|
2010-01-19 23:51:27 +00:00
|
|
|
if(flags8 & protocol_error )
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
|
|
|
"protocol error");
|
|
|
|
}
|
|
|
|
|
2010-01-19 23:51:27 +00:00
|
|
|
if(flags8 & no_reason )
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
|
|
|
"no reason");
|
|
|
|
}
|
|
|
|
|
2010-01-19 23:51:27 +00:00
|
|
|
if(flags8 & implementation_restriction )
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
|
|
|
"implementation restriction");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Protocol_Options:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 1",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
flags = tvb_get_guint8(tvb, offset);
|
|
|
|
tf = proto_tree_add_uint(param_tree,
|
|
|
|
hf_connect_protocol_options_flags, tvb, offset, 1,
|
|
|
|
flags);
|
2010-10-08 01:50:50 +00:00
|
|
|
flags_tree = proto_item_add_subtree(tf,
|
2003-11-11 08:29:34 +00:00
|
|
|
ett_connect_protocol_options_flags);
|
2010-10-08 01:50:50 +00:00
|
|
|
proto_tree_add_boolean(flags_tree,
|
2003-11-11 08:29:34 +00:00
|
|
|
hf_able_to_receive_extended_concatenated_SPDU,
|
|
|
|
tvb, offset, 1, flags);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Session_Requirement:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 2)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 2",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
flags = tvb_get_ntohs(tvb, offset);
|
|
|
|
tf = proto_tree_add_uint(param_tree,
|
|
|
|
hf_session_user_req_flags, tvb, offset, 2,
|
|
|
|
flags);
|
|
|
|
flags_tree = proto_item_add_subtree(tf,
|
|
|
|
ett_ses_req_options_flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_session_exception_report, tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_data_separation_function_unit, tvb, offset, 2,
|
|
|
|
flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
2010-10-08 01:50:50 +00:00
|
|
|
hf_symmetric_synchronize_function_unit,
|
2003-11-11 08:29:34 +00:00
|
|
|
tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_typed_data_function_unit, tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_exception_function_unit, tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_capability_function_unit, tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
2010-10-08 01:50:50 +00:00
|
|
|
hf_negotiated_release_function_unit,
|
2003-11-11 08:29:34 +00:00
|
|
|
tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
2010-10-08 01:50:50 +00:00
|
|
|
hf_activity_management_function_unit,
|
2003-11-11 08:29:34 +00:00
|
|
|
tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_resynchronize_function_unit, tvb, offset, 2,
|
|
|
|
flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
2010-10-08 01:50:50 +00:00
|
|
|
hf_major_resynchronize_function_unit,
|
2003-11-11 08:29:34 +00:00
|
|
|
tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
2010-10-08 01:50:50 +00:00
|
|
|
hf_minor_resynchronize_function_unit,
|
2003-11-11 08:29:34 +00:00
|
|
|
tvb, offset, 2, flags);
|
2010-10-08 01:50:50 +00:00
|
|
|
proto_tree_add_boolean(flags_tree,
|
2003-11-11 08:29:34 +00:00
|
|
|
hf_expedited_data_resynchronize_function_unit,
|
|
|
|
tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_duplex_function_unit, tvb, offset, 2, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_half_duplex_function_unit,
|
|
|
|
tvb, offset, 2, flags);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TSDU_Maximum_Size:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 4)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 4",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_proposed_tsdu_maximum_size_i2r,
|
2011-10-16 23:38:49 +00:00
|
|
|
tvb, offset, 2, ENC_BIG_ENDIAN);
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_proposed_tsdu_maximum_size_r2i,
|
2011-10-16 23:38:49 +00:00
|
|
|
tvb, offset+2, 2, ENC_BIG_ENDIAN);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Version_Number:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 1",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
flags = tvb_get_guint8(tvb, offset);
|
|
|
|
tf = proto_tree_add_uint(param_tree,
|
|
|
|
hf_version_number_options_flags, tvb, offset, 1,
|
|
|
|
flags);
|
|
|
|
flags_tree = proto_item_add_subtree(tf,
|
|
|
|
ett_protocol_version_flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_protocol_version_2, tvb, offset, 1, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree,
|
|
|
|
hf_protocol_version_1, tvb, offset, 1, flags);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Initial_Serial_Number:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_initial_serial_number,
|
2011-10-15 18:46:26 +00:00
|
|
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case EnclosureItem:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 1",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
flags = tvb_get_guint8(tvb, offset);
|
2011-02-21 11:36:50 +00:00
|
|
|
*enclosure_item_flags = (guint8) flags;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
tf = proto_tree_add_uint(param_tree,
|
|
|
|
hf_enclosure_item_options_flags, tvb, offset, 1,
|
|
|
|
flags);
|
|
|
|
flags_tree = proto_item_add_subtree(tf,
|
|
|
|
ett_enclosure_item_flags);
|
|
|
|
proto_tree_add_boolean(flags_tree, hf_end_of_SSDU,
|
|
|
|
tvb, offset, 1, flags);
|
|
|
|
proto_tree_add_boolean(flags_tree, hf_beginning_of_SSDU,
|
|
|
|
tvb, offset, 1, flags);
|
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
if (flags & END_SPDU) {
|
|
|
|
/*
|
2009-06-04 08:30:03 +00:00
|
|
|
* In Data Transfer and Typed Data SPDUs, (X.225: 8.3.{11,13}.4)
|
2003-11-18 07:08:43 +00:00
|
|
|
* "The User Information Field shall be present
|
|
|
|
* if the Enclosure Item is not present, or has
|
|
|
|
* bit 2 = 0", which presumably means it shall
|
|
|
|
* *not* be present if the Enclosure item *is*
|
|
|
|
* present and has bit 2 = 1.
|
|
|
|
*/
|
2009-06-04 08:30:03 +00:00
|
|
|
|
|
|
|
if(!(flags & BEGINNING_SPDU)) {
|
|
|
|
/* X.225 7.11.2 also states:
|
|
|
|
* "All DATA TRANSFER SPDUs, except the last DATA TRANSFER SPDU in a sequence greater than one, must have user information"
|
2010-10-08 01:50:50 +00:00
|
|
|
* So if BEGINNING_SPDU and END_SPDU are set in the enclosure item, then this is presumably a sequence of one and
|
2009-06-04 08:30:03 +00:00
|
|
|
* consequently there must be user information.
|
|
|
|
*
|
|
|
|
* So, there is only no user information if *only* END_SPDU is set.
|
|
|
|
*/
|
|
|
|
|
|
|
|
has_user_information = FALSE;
|
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Token_Setting_Item:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len != 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be 1",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_release_token_setting,
|
2011-10-06 03:35:44 +00:00
|
|
|
tvb, offset, 1, ENC_BIG_ENDIAN);
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_major_activity_token_setting,
|
2011-10-06 03:35:44 +00:00
|
|
|
tvb, offset, 1, ENC_BIG_ENDIAN);
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_synchronize_minor_token_setting,
|
2011-10-06 03:35:44 +00:00
|
|
|
tvb, offset, 1, ENC_BIG_ENDIAN);
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_data_token_setting,
|
2011-10-06 03:35:44 +00:00
|
|
|
tvb, offset, 1, ENC_BIG_ENDIAN);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2005-12-01 06:28:04 +00:00
|
|
|
case Activity_Identifier:
|
|
|
|
if (param_len == 0)
|
|
|
|
break;
|
|
|
|
if (tree)
|
|
|
|
{
|
2012-03-07 15:18:22 +00:00
|
|
|
/* 8.3.29.2 The parameter fields shall be as specified in Table 37.
|
|
|
|
* Activity Identifier m 41 6 octets maximum
|
|
|
|
*/
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_activity_identifier,
|
|
|
|
tvb, offset, param_len, ENC_NA);
|
2005-12-01 06:28:04 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
case Serial_Number:
|
|
|
|
if (param_len == 0)
|
|
|
|
break;
|
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_serial_number,
|
2011-10-15 18:46:26 +00:00
|
|
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
2003-11-18 07:08:43 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
case Reason_Code:
|
|
|
|
/*
|
|
|
|
0: Rejection by called SS-user; reason not specified.
|
|
|
|
1: Rejection by called SS-user due to temporary congestion.
|
2010-10-08 01:50:50 +00:00
|
|
|
2: Rejection by called SS-user. Subsequent octets may be used for user data
|
|
|
|
up to a length of 512 octets if Protocol Version 1 has been selected, and up
|
|
|
|
to a length such that the total length (including SI and LI) of the SPDU
|
2003-11-11 08:29:34 +00:00
|
|
|
does not exceed 65 539 octets if Protocol Version 2 has been selected.
|
|
|
|
128 + 1: Session Selector unknown.
|
|
|
|
128 + 2: SS-user not attached to SSAP.
|
|
|
|
128 + 3: SPM congestion at connect time.
|
|
|
|
128 + 4: Proposed protocol versions not supported.
|
|
|
|
128 + 5: Rejection by the SPM; reason not specified.
|
2010-10-08 01:50:50 +00:00
|
|
|
128 + 6: Rejection by the SPM; implementation restriction stated in the
|
2003-11-11 08:29:34 +00:00
|
|
|
PICS. */
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len < 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len, "Length is %u, should be >= 1",
|
|
|
|
param_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 20:33:53 +00:00
|
|
|
}
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
guint8 reason_code;
|
|
|
|
|
|
|
|
reason_code = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
|
|
|
"Reason Code: %s",
|
|
|
|
val_to_str(reason_code, reason_vals, "Unknown (%u)"));
|
|
|
|
}
|
|
|
|
offset++;
|
|
|
|
param_len--;
|
|
|
|
if (param_len != 0)
|
|
|
|
{
|
|
|
|
call_pres_dissector(tvb, offset, param_len,
|
2004-01-09 23:18:17 +00:00
|
|
|
pinfo, tree, param_tree, session);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Calling_Session_Selector:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_calling_session_selector,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, param_len, ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Called_Session_Selector:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_called_session_selector,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, param_len, ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Second_Serial_Number:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_second_serial_number,
|
2011-10-15 18:46:26 +00:00
|
|
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Second_Initial_Serial_Number:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_second_initial_serial_number,
|
2011-10-15 18:46:26 +00:00
|
|
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Large_Initial_Serial_Number:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_large_initial_serial_number,
|
2011-10-15 18:46:26 +00:00
|
|
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Large_Second_Initial_Serial_Number:
|
2003-11-11 20:33:53 +00:00
|
|
|
if (param_len == 0)
|
2003-11-18 07:08:43 +00:00
|
|
|
break;
|
2003-11-11 08:29:34 +00:00
|
|
|
if (tree)
|
|
|
|
{
|
|
|
|
proto_tree_add_item(param_tree,
|
|
|
|
hf_large_second_initial_serial_number,
|
2011-10-15 18:46:26 +00:00
|
|
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
return has_user_information;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
static gboolean
|
2003-11-11 08:29:34 +00:00
|
|
|
dissect_parameter_group(tvbuff_t *tvb, int offset, proto_tree *tree,
|
2010-10-08 01:36:20 +00:00
|
|
|
proto_tree *pg_tree, packet_info *pinfo, guint16 pg_len,
|
2011-02-21 11:00:19 +00:00
|
|
|
guint8 *enclosure_item_flags, struct SESSION_DATA_STRUCTURE *session)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
2003-11-18 07:08:43 +00:00
|
|
|
gboolean has_user_information = TRUE;
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *param_tree;
|
|
|
|
guint8 param_type;
|
2005-06-26 19:56:52 +00:00
|
|
|
const char *param_str;
|
2003-11-11 08:29:34 +00:00
|
|
|
int len_len;
|
|
|
|
guint16 param_len;
|
|
|
|
|
|
|
|
while(pg_len != 0)
|
|
|
|
{
|
|
|
|
param_type = tvb_get_guint8(tvb, offset);
|
2008-10-31 15:34:00 +00:00
|
|
|
ti = proto_tree_add_text(pg_tree, tvb, offset, -1, "%s",
|
2003-11-11 08:29:34 +00:00
|
|
|
val_to_str(param_type, param_vals,
|
|
|
|
"Unknown parameter type (0x%02x)"));
|
|
|
|
param_tree = proto_item_add_subtree(ti, ett_ses_param);
|
2011-05-17 18:58:40 +00:00
|
|
|
param_str = val_to_str_const(param_type, param_vals, "Unknown");
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
2011-05-17 18:58:40 +00:00
|
|
|
"Parameter type: %s", param_str);
|
2003-11-11 08:29:34 +00:00
|
|
|
offset++;
|
|
|
|
pg_len--;
|
|
|
|
param_len = get_item_len(tvb, offset, &len_len);
|
|
|
|
if (len_len > pg_len) {
|
|
|
|
proto_item_set_len(ti, pg_len + 1);
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, pg_len,
|
|
|
|
"Parameter length doesn't fit in parameter");
|
2003-11-18 07:08:43 +00:00
|
|
|
return has_user_information;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
pg_len -= len_len;
|
|
|
|
if (param_len > pg_len) {
|
|
|
|
proto_item_set_len(ti, pg_len + 1 + len_len);
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, pg_len,
|
|
|
|
"Parameter length: %u, should be <= %u",
|
|
|
|
param_len, pg_len);
|
2003-11-18 07:08:43 +00:00
|
|
|
return has_user_information;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
proto_item_set_len(ti, 1 + len_len + param_len);
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, len_len,
|
|
|
|
"Parameter length: %u", param_len);
|
|
|
|
offset += len_len;
|
2010-10-08 01:50:50 +00:00
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
if (param_str != NULL)
|
|
|
|
{
|
|
|
|
switch(param_type)
|
|
|
|
{
|
|
|
|
/* PG's in PG's are invalid, presumably */
|
|
|
|
case Extended_User_Data:
|
|
|
|
case User_Data:
|
|
|
|
case Connect_Accept_Item:
|
|
|
|
case Connection_Identifier:
|
|
|
|
case Linking_Information:
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset,
|
|
|
|
param_len,
|
|
|
|
"Parameter group inside parameter group");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2003-11-18 07:08:43 +00:00
|
|
|
if (!dissect_parameter(tvb, offset, tree,
|
2004-01-09 23:18:17 +00:00
|
|
|
param_tree, pinfo, param_type, param_len,
|
2011-02-21 11:00:19 +00:00
|
|
|
enclosure_item_flags, session))
|
2003-11-18 07:08:43 +00:00
|
|
|
has_user_information = FALSE;
|
2003-11-11 08:29:34 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
offset += param_len;
|
|
|
|
pg_len -= param_len;
|
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
return has_user_information;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
/*
|
|
|
|
* Returns TRUE if there's a User Information field in this SPDU, FALSE
|
|
|
|
* otherwise.
|
|
|
|
*/
|
|
|
|
static gboolean
|
2003-11-11 08:29:34 +00:00
|
|
|
dissect_parameters(tvbuff_t *tvb, int offset, guint16 len, proto_tree *tree,
|
2010-10-08 01:36:20 +00:00
|
|
|
proto_tree *ses_tree, packet_info *pinfo,
|
2011-02-21 11:00:19 +00:00
|
|
|
guint8 *enclosure_item_flags, struct SESSION_DATA_STRUCTURE *session)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
2003-11-18 07:08:43 +00:00
|
|
|
gboolean has_user_information = TRUE;
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *param_tree;
|
|
|
|
guint8 param_type;
|
2005-06-26 19:56:52 +00:00
|
|
|
const char *param_str;
|
2003-11-11 08:29:34 +00:00
|
|
|
int len_len;
|
|
|
|
guint16 param_len;
|
|
|
|
|
2010-10-08 01:36:20 +00:00
|
|
|
while (len != 0)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
param_type = tvb_get_guint8(tvb, offset);
|
2008-10-31 15:34:00 +00:00
|
|
|
ti = proto_tree_add_text(ses_tree, tvb, offset, -1, "%s",
|
2003-11-11 08:29:34 +00:00
|
|
|
val_to_str(param_type, param_vals,
|
|
|
|
"Unknown parameter type (0x%02x)"));
|
|
|
|
param_tree = proto_item_add_subtree(ti, ett_ses_param);
|
2011-05-17 18:58:40 +00:00
|
|
|
param_str = val_to_str_const(param_type, param_vals, "Unknown");
|
2003-11-11 08:29:34 +00:00
|
|
|
proto_tree_add_text(param_tree, tvb, offset, 1,
|
2011-05-17 18:58:40 +00:00
|
|
|
"Parameter type: %s", param_str);
|
2003-11-11 08:29:34 +00:00
|
|
|
offset++;
|
|
|
|
len--;
|
|
|
|
param_len = get_item_len(tvb, offset, &len_len);
|
|
|
|
if (len_len > len) {
|
|
|
|
proto_item_set_len(ti, len + 1 );
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, len,
|
|
|
|
"Parameter length doesn't fit in parameter");
|
2003-11-18 07:08:43 +00:00
|
|
|
return has_user_information;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
len -= len_len;
|
|
|
|
if (param_len > len) {
|
|
|
|
proto_item_set_len(ti, len + 1 + len_len);
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, len,
|
|
|
|
"Parameter length: %u, should be <= %u",
|
|
|
|
param_len, len);
|
2003-11-18 07:08:43 +00:00
|
|
|
return has_user_information;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
proto_item_set_len(ti, 1 + len_len + param_len);
|
|
|
|
proto_tree_add_text(param_tree, tvb, offset, len_len,
|
|
|
|
"Parameter length: %u", param_len);
|
|
|
|
offset += len_len;
|
2010-10-08 01:50:50 +00:00
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
if (param_str != NULL)
|
|
|
|
{
|
|
|
|
switch(param_type)
|
|
|
|
{
|
|
|
|
case Extended_User_Data:
|
2006-03-25 16:32:46 +00:00
|
|
|
call_pres_dissector(tvb, offset, param_len,
|
|
|
|
pinfo, tree, param_tree, session);
|
2003-11-11 08:29:34 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case User_Data:
|
|
|
|
call_pres_dissector(tvb, offset, param_len,
|
2004-01-09 23:18:17 +00:00
|
|
|
pinfo, tree, param_tree, session);
|
2003-11-11 08:29:34 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
/* handle PGI's */
|
|
|
|
case Connect_Accept_Item:
|
|
|
|
case Connection_Identifier:
|
|
|
|
case Linking_Information:
|
|
|
|
/* Yes. */
|
2003-11-18 07:08:43 +00:00
|
|
|
if (!dissect_parameter_group(tvb, offset, tree,
|
2011-02-21 11:00:19 +00:00
|
|
|
param_tree, pinfo, param_len, enclosure_item_flags, session))
|
2003-11-18 07:08:43 +00:00
|
|
|
has_user_information = FALSE;
|
2003-11-11 08:29:34 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
/* everything else is a PI */
|
|
|
|
default:
|
2003-11-18 07:08:43 +00:00
|
|
|
if (!dissect_parameter(tvb, offset, tree,
|
2004-01-09 23:18:17 +00:00
|
|
|
param_tree, pinfo, param_type, param_len,
|
2011-02-21 11:00:19 +00:00
|
|
|
enclosure_item_flags, session))
|
2003-11-18 07:08:43 +00:00
|
|
|
has_user_information = FALSE;
|
2003-11-11 08:29:34 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
offset += param_len;
|
|
|
|
len -= param_len;
|
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
return has_user_information;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2003-11-18 07:08:43 +00:00
|
|
|
* Dissect an SPDU.
|
|
|
|
*/
|
|
|
|
static int
|
2003-12-12 22:19:45 +00:00
|
|
|
dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
|
2010-10-08 01:36:20 +00:00
|
|
|
gboolean tokens, gboolean connectionless)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
2003-12-12 22:19:45 +00:00
|
|
|
gboolean has_user_information = FALSE;
|
2003-11-11 08:29:34 +00:00
|
|
|
guint8 type;
|
|
|
|
proto_item *ti = NULL;
|
|
|
|
proto_tree *ses_tree = NULL;
|
|
|
|
int len_len;
|
|
|
|
guint16 parameters_len;
|
2011-02-21 11:00:19 +00:00
|
|
|
tvbuff_t *next_tvb = NULL;
|
2004-01-09 23:18:17 +00:00
|
|
|
void *save_private_data;
|
2007-06-24 05:28:27 +00:00
|
|
|
guint32 *pres_ctx_id = NULL;
|
2011-02-21 11:00:19 +00:00
|
|
|
guint8 enclosure_item_flags = BEGINNING_SPDU|END_SPDU;
|
2004-01-09 23:18:17 +00:00
|
|
|
struct SESSION_DATA_STRUCTURE session;
|
2003-11-11 08:29:34 +00:00
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
/*
|
|
|
|
* Get SPDU type.
|
|
|
|
*/
|
2003-11-11 08:29:34 +00:00
|
|
|
type = tvb_get_guint8(tvb, offset);
|
2004-01-09 23:18:17 +00:00
|
|
|
session.spdu_type = type;
|
|
|
|
session.abort_type = SESSION_NO_ABORT;
|
2006-03-25 16:32:46 +00:00
|
|
|
session.ros_op = 0;
|
2007-06-24 05:28:27 +00:00
|
|
|
session.rtse_reassemble = FALSE;
|
2003-11-11 08:29:34 +00:00
|
|
|
|
2010-01-04 23:17:37 +00:00
|
|
|
if(connectionless) {
|
2010-10-08 01:50:50 +00:00
|
|
|
col_add_str(pinfo->cinfo, COL_INFO,
|
2010-01-04 23:17:37 +00:00
|
|
|
val_to_str(type, ses_vals, "Unknown SPDU type (0x%02x)"));
|
|
|
|
if (tree) {
|
|
|
|
ti = proto_tree_add_item(tree, proto_clses, tvb, offset,
|
2011-10-21 02:10:19 +00:00
|
|
|
-1, ENC_NA);
|
2010-01-04 23:17:37 +00:00
|
|
|
ses_tree = proto_item_add_subtree(ti, ett_ses);
|
|
|
|
proto_tree_add_uint(ses_tree, hf_ses_type, tvb,
|
|
|
|
offset, 1, type);
|
|
|
|
}
|
|
|
|
has_user_information = TRUE;
|
|
|
|
}
|
|
|
|
else if (tokens) {
|
2010-10-08 01:50:50 +00:00
|
|
|
col_add_str(pinfo->cinfo, COL_INFO,
|
2003-12-12 22:19:45 +00:00
|
|
|
val_to_str(type, ses_category0_vals, "Unknown SPDU type (0x%02x)"));
|
|
|
|
if (tree) {
|
|
|
|
ti = proto_tree_add_item(tree, proto_ses, tvb, offset,
|
2011-10-21 02:10:19 +00:00
|
|
|
-1, ENC_NA);
|
2003-12-12 22:19:45 +00:00
|
|
|
ses_tree = proto_item_add_subtree(ti, ett_ses);
|
|
|
|
proto_tree_add_uint(ses_tree, hf_ses_type_0, tvb,
|
|
|
|
offset, 1, type);
|
|
|
|
}
|
|
|
|
} else {
|
2010-10-08 01:50:50 +00:00
|
|
|
col_add_str(pinfo->cinfo, COL_INFO,
|
2003-12-12 22:19:45 +00:00
|
|
|
val_to_str(type, ses_vals, "Unknown SPDU type (0x%02x)"));
|
|
|
|
if (tree) {
|
|
|
|
ti = proto_tree_add_item(tree, proto_ses, tvb, offset,
|
2011-10-21 02:10:19 +00:00
|
|
|
-1, ENC_NA);
|
2003-12-12 22:19:45 +00:00
|
|
|
ses_tree = proto_item_add_subtree(ti, ett_ses);
|
|
|
|
proto_tree_add_uint(ses_tree, hf_ses_type, tvb,
|
2010-01-04 23:17:37 +00:00
|
|
|
offset, 1, type);
|
2003-12-12 22:19:45 +00:00
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
|
2003-12-12 22:19:45 +00:00
|
|
|
/*
|
|
|
|
* Might this SPDU have a User Information field?
|
|
|
|
*/
|
|
|
|
switch (type) {
|
|
|
|
case SES_DATA_TRANSFER:
|
|
|
|
case SES_EXPEDITED:
|
|
|
|
case SES_TYPED_DATA:
|
|
|
|
has_user_information = TRUE;
|
|
|
|
break;
|
2007-06-24 05:28:27 +00:00
|
|
|
case SES_MAJOR_SYNC_POINT:
|
2013-05-12 18:11:02 +00:00
|
|
|
pres_ctx_id = (guint32 *)p_get_proto_data (pinfo->fd, proto_ses, 0);
|
2007-06-24 05:28:27 +00:00
|
|
|
if (ses_rtse_reassemble != 0 && !pres_ctx_id) {
|
|
|
|
/* First time visited - save pres_ctx_id */
|
2013-03-19 22:03:00 +00:00
|
|
|
pres_ctx_id = se_new(guint32);
|
2007-06-24 05:28:27 +00:00
|
|
|
*pres_ctx_id = ses_pres_ctx_id;
|
2013-05-12 18:11:02 +00:00
|
|
|
p_add_proto_data (pinfo->fd, proto_ses, 0, pres_ctx_id);
|
2007-06-24 05:28:27 +00:00
|
|
|
}
|
|
|
|
if (pres_ctx_id) {
|
|
|
|
session.pres_ctx_id = *pres_ctx_id;
|
|
|
|
session.rtse_reassemble = TRUE;
|
|
|
|
has_user_information = TRUE;
|
|
|
|
}
|
|
|
|
ses_rtse_reassemble = FALSE;
|
|
|
|
break;
|
2003-12-12 22:19:45 +00:00
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
}
|
2003-12-12 22:19:45 +00:00
|
|
|
offset++;
|
2003-11-18 07:08:43 +00:00
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
/* get length of SPDU parameter field */
|
|
|
|
parameters_len = get_item_len(tvb, offset, &len_len);
|
|
|
|
if (tree)
|
|
|
|
proto_tree_add_uint(ses_tree, hf_ses_length, tvb, offset,
|
|
|
|
len_len, parameters_len);
|
|
|
|
offset += len_len;
|
|
|
|
|
|
|
|
/* Dissect parameters. */
|
2003-11-18 07:08:43 +00:00
|
|
|
if (!dissect_parameters(tvb, offset, parameters_len, tree, ses_tree,
|
2011-02-21 11:00:19 +00:00
|
|
|
pinfo, &enclosure_item_flags, &session))
|
2003-11-18 07:08:43 +00:00
|
|
|
has_user_information = FALSE;
|
2003-11-11 08:29:34 +00:00
|
|
|
offset += parameters_len;
|
2010-10-08 01:50:50 +00:00
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
proto_item_set_end(ti, tvb, offset);
|
2003-11-11 08:29:34 +00:00
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
/* Dissect user information, if present */
|
2011-02-21 11:00:19 +00:00
|
|
|
if (!ses_desegment || enclosure_item_flags == (BEGINNING_SPDU|END_SPDU)) {
|
|
|
|
if (has_user_information) {
|
|
|
|
/* Not desegment or only one segment */
|
|
|
|
if (tvb_reported_length_remaining(tvb, offset) > 0 || type == SES_MAJOR_SYNC_POINT) {
|
|
|
|
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
2003-11-18 07:08:43 +00:00
|
|
|
}
|
2011-02-21 11:00:19 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
conversation_t *conversation = NULL;
|
|
|
|
fragment_data *frag_msg = NULL;
|
|
|
|
gint fragment_len;
|
|
|
|
guint32 ses_id = 0;
|
|
|
|
|
|
|
|
/* Use conversation index as segment id */
|
2011-05-17 18:58:40 +00:00
|
|
|
conversation = find_conversation (pinfo->fd->num,
|
|
|
|
&pinfo->src, &pinfo->dst, pinfo->ptype,
|
2011-02-21 11:00:19 +00:00
|
|
|
pinfo->srcport, pinfo->destport, 0);
|
|
|
|
if (conversation != NULL) {
|
|
|
|
ses_id = conversation->index;
|
|
|
|
}
|
|
|
|
fragment_len = tvb_reported_length_remaining (tvb, offset);
|
2011-05-17 18:58:40 +00:00
|
|
|
ti = proto_tree_add_item (ses_tree, hf_ses_segment_data, tvb, offset,
|
2011-10-04 22:44:31 +00:00
|
|
|
fragment_len, ENC_NA);
|
2011-02-21 11:00:19 +00:00
|
|
|
proto_item_append_text (ti, " (%d byte%s)", fragment_len, plurality (fragment_len, "", "s"));
|
2013-03-22 23:59:54 +00:00
|
|
|
frag_msg = fragment_add_seq_next (&ses_reassembly_table,
|
|
|
|
tvb, offset,
|
|
|
|
pinfo, ses_id, NULL,
|
|
|
|
fragment_len,
|
2011-02-21 11:00:19 +00:00
|
|
|
(enclosure_item_flags & END_SPDU) ? FALSE : TRUE);
|
2011-05-17 18:58:40 +00:00
|
|
|
next_tvb = process_reassembled_data (tvb, offset, pinfo, "Reassembled SES",
|
|
|
|
frag_msg, &ses_frag_items, NULL,
|
2011-02-21 11:00:19 +00:00
|
|
|
(enclosure_item_flags & END_SPDU) ? tree : ses_tree);
|
2003-11-18 07:08:43 +00:00
|
|
|
|
2011-02-21 11:00:19 +00:00
|
|
|
has_user_information = TRUE;
|
|
|
|
offset += fragment_len;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (has_user_information && next_tvb) {
|
|
|
|
if (!pres_handle) {
|
|
|
|
call_dissector(data_handle, next_tvb, pinfo, tree);
|
|
|
|
} else {
|
|
|
|
/* save type of session pdu. We'll need it in the presentation dissector */
|
|
|
|
save_private_data = pinfo->private_data;
|
|
|
|
pinfo->private_data = &session;
|
|
|
|
call_dissector(pres_handle, next_tvb, pinfo, tree);
|
|
|
|
pinfo->private_data = save_private_data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* No more SPDUs to dissect. Set the offset to the
|
|
|
|
* end of the tvbuff.
|
|
|
|
*/
|
|
|
|
offset = tvb_length(tvb);
|
|
|
|
if (session.rtse_reassemble && type == SES_DATA_TRANSFER) {
|
|
|
|
ses_pres_ctx_id = session.pres_ctx_id;
|
|
|
|
ses_rtse_reassemble = TRUE;
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
}
|
2003-11-18 07:08:43 +00:00
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Dissect SPDUs inside a TSDU.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
dissect_ses(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
int offset = 0;
|
2003-12-12 22:19:45 +00:00
|
|
|
guint8 type;
|
2010-01-04 23:17:37 +00:00
|
|
|
gboolean is_clsp = FALSE;
|
|
|
|
|
|
|
|
type = tvb_get_guint8(tvb, offset);
|
|
|
|
if(type == CLSES_UNIT_DATA)
|
|
|
|
is_clsp = TRUE;
|
|
|
|
|
2003-11-18 07:08:43 +00:00
|
|
|
|
2010-01-04 23:17:37 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, is_clsp ? "CLSES" : "SES");
|
2009-08-09 07:36:13 +00:00
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
2003-11-18 07:08:43 +00:00
|
|
|
|
2010-01-04 23:17:37 +00:00
|
|
|
|
2003-12-12 22:19:45 +00:00
|
|
|
/*
|
|
|
|
* Do we have a category 0 SPDU (GIVE_TOKENS/PLEASE_TOKENS) as
|
|
|
|
* the first SPDU?
|
|
|
|
*
|
|
|
|
* If so, dissect it as such (GIVE_TOKENS and DATA_TRANSFER have
|
2004-01-09 23:18:17 +00:00
|
|
|
* the same SPDU type value).
|
2003-12-12 22:19:45 +00:00
|
|
|
*/
|
2011-09-21 07:35:51 +00:00
|
|
|
if ((type == SES_PLEASE_TOKENS) || (type == SES_GIVE_TOKENS))
|
2010-01-04 23:17:37 +00:00
|
|
|
offset = dissect_spdu(tvb, offset, pinfo, tree, TOKENS_SPDU, FALSE);
|
|
|
|
|
2003-12-12 22:19:45 +00:00
|
|
|
|
|
|
|
/* Dissect the remaining SPDUs. */
|
2003-11-18 07:08:43 +00:00
|
|
|
while (tvb_reported_length_remaining(tvb, offset) > 0)
|
2010-01-04 23:17:37 +00:00
|
|
|
offset = dissect_spdu(tvb, offset, pinfo, tree, NON_TOKENS_SPDU, is_clsp);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
|
2011-02-21 11:00:19 +00:00
|
|
|
static void ses_reassemble_init (void)
|
|
|
|
{
|
2013-03-22 23:59:54 +00:00
|
|
|
reassembly_table_init (&ses_reassembly_table,
|
|
|
|
&addresses_reassembly_table_functions);
|
2011-02-21 11:00:19 +00:00
|
|
|
}
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
void
|
|
|
|
proto_register_ses(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
&hf_ses_type,
|
|
|
|
{
|
|
|
|
"SPDU Type",
|
|
|
|
"ses.type",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(ses_vals),
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
},
|
2003-12-12 22:19:45 +00:00
|
|
|
{
|
|
|
|
&hf_ses_type_0,
|
|
|
|
{
|
|
|
|
"SPDU Type",
|
|
|
|
"ses.type",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
VALS(ses_category0_vals),
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2003-12-12 22:19:45 +00:00
|
|
|
}
|
|
|
|
},
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
&hf_ses_length,
|
|
|
|
{
|
|
|
|
"Length",
|
|
|
|
"ses.length",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2013-01-31 18:31:28 +00:00
|
|
|
#if 0
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
&hf_ses_version,
|
|
|
|
{
|
|
|
|
"Version",
|
|
|
|
"ses.version",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
},
|
2013-01-31 18:31:28 +00:00
|
|
|
#endif
|
|
|
|
#if 0
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
&hf_ses_reserved,
|
|
|
|
{
|
|
|
|
"Reserved",
|
|
|
|
"ses.reserved",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, HFILL
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
|
|
|
},
|
2013-01-31 18:31:28 +00:00
|
|
|
#endif
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
&hf_called_ss_user_reference,
|
|
|
|
{
|
|
|
|
"Called SS User Reference",
|
|
|
|
"ses.called_ss_user_reference",
|
|
|
|
FT_BYTES, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_calling_ss_user_reference,
|
|
|
|
{
|
|
|
|
"Calling SS User Reference",
|
|
|
|
"ses.calling_ss_user_reference",
|
|
|
|
FT_BYTES, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_common_reference,
|
|
|
|
{
|
|
|
|
"Common Reference",
|
|
|
|
"ses.common_reference",
|
|
|
|
FT_BYTES, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_additional_reference_information,
|
|
|
|
{
|
|
|
|
"Additional Reference Information",
|
|
|
|
"ses.additional_reference_information",
|
|
|
|
FT_BYTES, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_release_token,
|
|
|
|
{
|
|
|
|
"release token",
|
|
|
|
"ses.release_token",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
RELEASE_TOKEN,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_major_activity_token,
|
|
|
|
{
|
|
|
|
"major/activity token",
|
|
|
|
"ses.major.token",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
MAJOR_ACTIVITY_TOKEN,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_synchronize_minor_token,
|
|
|
|
{
|
|
|
|
"synchronize minor token",
|
|
|
|
"ses.synchronize_token",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
SYNCHRONIZE_MINOR_TOKEN,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_data_token,
|
|
|
|
{
|
|
|
|
"data token",
|
|
|
|
"ses.data_token",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
DATA_TOKEN,
|
|
|
|
"data token",
|
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_able_to_receive_extended_concatenated_SPDU,
|
|
|
|
{
|
|
|
|
"Able to receive extended concatenated SPDU",
|
|
|
|
"ses.connect.f1",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
SES_EXT_CONT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_session_user_req_flags,
|
|
|
|
{
|
|
|
|
"Flags",
|
|
|
|
"ses.req.flags",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_HEX,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_session_exception_report,
|
|
|
|
{
|
|
|
|
"Session exception report",
|
|
|
|
"ses.exception_report.",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
SES_EXCEPTION_REPORT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_data_separation_function_unit,
|
|
|
|
{
|
|
|
|
"Data separation function unit",
|
|
|
|
"ses.data_sep",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
DATA_SEPARATION_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_symmetric_synchronize_function_unit,
|
|
|
|
{
|
|
|
|
"Symmetric synchronize function unit",
|
|
|
|
"ses.symm_sync",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
SYMMETRIC_SYNCHRONIZE_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_typed_data_function_unit,
|
|
|
|
{
|
|
|
|
"Typed data function unit",
|
|
|
|
"ses.typed_data",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
TYPED_DATA_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_exception_function_unit,
|
|
|
|
{
|
|
|
|
"Exception function unit",
|
|
|
|
"ses.exception_data",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
EXCEPTION_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_capability_function_unit,
|
|
|
|
{
|
|
|
|
"Capability function unit",
|
|
|
|
"ses.capability_data",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
CAPABILITY_DATA_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_negotiated_release_function_unit,
|
|
|
|
{
|
|
|
|
"Negotiated release function unit",
|
|
|
|
"ses.negotiated_release",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
NEGOTIATED_RELEASE_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_activity_management_function_unit,
|
|
|
|
{
|
|
|
|
"Activity management function unit",
|
|
|
|
"ses.activity_management",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
ACTIVITY_MANAGEMENT_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_resynchronize_function_unit,
|
|
|
|
{
|
|
|
|
"Resynchronize function unit",
|
|
|
|
"ses.resynchronize",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
RESYNCHRONIZE_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_major_resynchronize_function_unit,
|
|
|
|
{
|
|
|
|
"Major resynchronize function unit",
|
|
|
|
"ses.major_resynchronize",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
MAJOR_SYNCHRONIZE_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_minor_resynchronize_function_unit,
|
|
|
|
{
|
|
|
|
"Minor resynchronize function unit",
|
|
|
|
"ses.minor_resynchronize",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
MINOR_SYNCHRONIZE_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_expedited_data_resynchronize_function_unit,
|
|
|
|
{
|
|
|
|
"Expedited data function unit",
|
|
|
|
"ses.expedited_data",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
EXPEDITED_DATA_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_duplex_function_unit,
|
|
|
|
{
|
|
|
|
"Duplex functional unit",
|
|
|
|
"ses.duplex",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
DUPLEX_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_half_duplex_function_unit,
|
|
|
|
{
|
|
|
|
"Half-duplex functional unit",
|
|
|
|
"ses.half_duplex",
|
|
|
|
FT_BOOLEAN, 16,
|
|
|
|
NULL,
|
|
|
|
HALF_DUPLEX_FUNCTION_UNIT,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_proposed_tsdu_maximum_size_i2r,
|
|
|
|
{
|
|
|
|
"Proposed TSDU Maximum Size, Initiator to Responder",
|
|
|
|
"ses.proposed_tsdu_maximum_size_i2r",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_proposed_tsdu_maximum_size_r2i,
|
|
|
|
{
|
|
|
|
"Proposed TSDU Maximum Size, Responder to Initiator",
|
|
|
|
"ses.proposed_tsdu_maximum_size_r2i",
|
|
|
|
FT_UINT16,
|
|
|
|
BASE_DEC,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_protocol_version_1,
|
|
|
|
{
|
|
|
|
"Protocol Version 1",
|
|
|
|
"ses.protocol_version1",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
PROTOCOL_VERSION_1,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_protocol_version_2,
|
|
|
|
{
|
|
|
|
"Protocol Version 2",
|
|
|
|
"ses.protocol_version2",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
PROTOCOL_VERSION_2,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_initial_serial_number,
|
|
|
|
{
|
|
|
|
"Initial Serial Number",
|
|
|
|
"ses.initial_serial_number",
|
|
|
|
FT_STRING, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_beginning_of_SSDU,
|
|
|
|
{
|
|
|
|
"beginning of SSDU",
|
|
|
|
"ses.begininng_of_SSDU",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
BEGINNING_SPDU,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_end_of_SSDU,
|
|
|
|
{
|
|
|
|
"end of SSDU",
|
|
|
|
"ses.end_of_SSDU",
|
|
|
|
FT_BOOLEAN, 8,
|
|
|
|
NULL,
|
|
|
|
END_SPDU,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_release_token_setting,
|
|
|
|
{
|
|
|
|
"release token setting",
|
|
|
|
"ses.release_token_setting",
|
|
|
|
FT_UINT8, BASE_HEX,
|
|
|
|
VALS(token_setting_vals),
|
|
|
|
0xC0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_major_activity_token_setting,
|
|
|
|
{
|
|
|
|
"major/activity setting",
|
|
|
|
"ses.major_activity_token_setting",
|
|
|
|
FT_UINT8, BASE_HEX,
|
|
|
|
VALS(token_setting_vals),
|
|
|
|
0x30,
|
|
|
|
"major/activity token setting",
|
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_synchronize_minor_token_setting,
|
|
|
|
{
|
|
|
|
"synchronize-minor token setting",
|
|
|
|
"ses.synchronize_minor_token_setting",
|
|
|
|
FT_UINT8, BASE_HEX,
|
|
|
|
VALS(token_setting_vals),
|
|
|
|
0x0C,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_data_token_setting,
|
|
|
|
{
|
|
|
|
"data token setting",
|
|
|
|
"ses.data_token_setting",
|
|
|
|
FT_UINT8, BASE_HEX,
|
|
|
|
VALS(token_setting_vals),
|
|
|
|
0x03,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
2005-12-01 06:28:04 +00:00
|
|
|
{
|
|
|
|
&hf_activity_identifier,
|
|
|
|
{
|
|
|
|
"Activity Identifier",
|
|
|
|
"ses.activity_identifier",
|
2012-03-07 15:18:22 +00:00
|
|
|
FT_BYTES, BASE_NONE,
|
2005-12-01 06:28:04 +00:00
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2005-12-01 06:28:04 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
&hf_serial_number,
|
|
|
|
{
|
|
|
|
"Serial Number",
|
|
|
|
"ses.serial_number",
|
|
|
|
FT_STRING, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_calling_session_selector,
|
|
|
|
{
|
|
|
|
"Calling Session Selector",
|
|
|
|
"ses.calling_session_selector",
|
|
|
|
FT_BYTES, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_called_session_selector,
|
|
|
|
{
|
|
|
|
"Called Session Selector",
|
|
|
|
"ses.called_session_selector",
|
|
|
|
FT_BYTES, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_second_serial_number,
|
|
|
|
{
|
|
|
|
"Second Serial Number",
|
|
|
|
"ses.second_serial_number",
|
|
|
|
FT_STRING, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_second_initial_serial_number,
|
|
|
|
{
|
|
|
|
"Second Initial Serial Number",
|
|
|
|
"ses.second_initial_serial_number",
|
|
|
|
FT_STRING, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_large_initial_serial_number,
|
|
|
|
{
|
|
|
|
"Large Initial Serial Number",
|
|
|
|
"ses.large_initial_serial_number",
|
|
|
|
FT_STRING, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_large_second_initial_serial_number,
|
|
|
|
{
|
|
|
|
"Large Second Initial Serial Number",
|
|
|
|
"ses.large_second_initial_serial_number",
|
|
|
|
FT_STRING, BASE_NONE,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_connect_protocol_options_flags,
|
|
|
|
{
|
|
|
|
"Flags",
|
|
|
|
"ses.connect.flags",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_HEX,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
&hf_version_number_options_flags,
|
|
|
|
|
|
|
|
{
|
|
|
|
"Flags",
|
|
|
|
"ses.version.flags",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_HEX,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
&hf_token_item_options_flags,
|
|
|
|
|
|
|
|
{
|
|
|
|
"Flags",
|
|
|
|
"ses.tken_item.flags",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_HEX,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
&hf_enclosure_item_options_flags,
|
|
|
|
|
|
|
|
{
|
|
|
|
"Flags",
|
|
|
|
"ses.enclosure.flags",
|
|
|
|
FT_UINT8,
|
|
|
|
BASE_HEX,
|
|
|
|
NULL,
|
|
|
|
0x0,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL,
|
2003-11-11 08:29:34 +00:00
|
|
|
HFILL
|
|
|
|
}
|
|
|
|
},
|
2011-02-21 11:00:19 +00:00
|
|
|
|
|
|
|
{ &hf_ses_segment_data,
|
|
|
|
{ "SES segment data", "ses.segment.data", FT_NONE, BASE_NONE,
|
|
|
|
NULL, 0x00, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segments,
|
|
|
|
{ "SES segments", "ses.segments", FT_NONE, BASE_NONE,
|
|
|
|
NULL, 0x00, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segment,
|
|
|
|
{ "SES segment", "ses.segment", FT_FRAMENUM, BASE_NONE,
|
|
|
|
NULL, 0x00, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segment_overlap,
|
|
|
|
{ "SES segment overlap", "ses.segment.overlap", FT_BOOLEAN,
|
|
|
|
BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segment_overlap_conflicts,
|
|
|
|
{ "SES segment overlapping with conflicting data",
|
|
|
|
"ses.segment.overlap.conflicts", FT_BOOLEAN, BASE_NONE,
|
|
|
|
NULL, 0x0, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segment_multiple_tails,
|
|
|
|
{ "SES has multiple tail segments",
|
|
|
|
"ses.segment.multiple_tails", FT_BOOLEAN, BASE_NONE,
|
|
|
|
NULL, 0x0, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segment_too_long_segment,
|
|
|
|
{ "SES segment too long", "ses.segment.too_long_segment",
|
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segment_error,
|
|
|
|
{ "SES desegmentation error", "ses.segment.error", FT_FRAMENUM,
|
|
|
|
BASE_NONE, NULL, 0x00, NULL, HFILL } },
|
|
|
|
{ &hf_ses_segment_count,
|
|
|
|
{ "SES segment count", "ses.segment.count", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0x00, NULL, HFILL } },
|
|
|
|
{ &hf_ses_reassembled_in,
|
|
|
|
{ "Reassembled SES in frame", "ses.reassembled.in", FT_FRAMENUM, BASE_NONE,
|
|
|
|
NULL, 0x00, "This SES packet is reassembled in this frame", HFILL } },
|
|
|
|
{ &hf_ses_reassembled_length,
|
|
|
|
{ "Reassembled SES length", "ses.reassembled.length", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0x00, "The total length of the reassembled payload", HFILL } }
|
2003-11-11 08:29:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] =
|
|
|
|
{
|
|
|
|
&ett_ses,
|
|
|
|
&ett_ses_param,
|
|
|
|
&ett_connect_protocol_options_flags,
|
|
|
|
&ett_protocol_version_flags,
|
|
|
|
&ett_enclosure_item_flags,
|
|
|
|
&ett_token_item_flags,
|
|
|
|
&ett_ses_req_options_flags,
|
2011-02-21 11:00:19 +00:00
|
|
|
&ett_ses_segment,
|
|
|
|
&ett_ses_segments
|
2003-11-11 08:29:34 +00:00
|
|
|
};
|
2011-02-21 11:00:19 +00:00
|
|
|
module_t *ses_module;
|
2003-11-11 08:29:34 +00:00
|
|
|
|
|
|
|
proto_ses = proto_register_protocol(PROTO_STRING_SES, "SES", "ses");
|
|
|
|
proto_register_field_array(proto_ses, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
|
2011-02-21 11:00:19 +00:00
|
|
|
register_init_routine (&ses_reassemble_init);
|
2010-01-04 23:17:37 +00:00
|
|
|
|
2008-11-27 16:38:22 +00:00
|
|
|
ses_module = prefs_register_protocol(proto_ses, NULL);
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
prefs_register_bool_preference(ses_module, "desegment",
|
2004-08-21 09:02:52 +00:00
|
|
|
"Reassemble session packets ",
|
|
|
|
"Whether the session dissector should reassemble messages spanning multiple SES segments",
|
2011-02-21 11:00:19 +00:00
|
|
|
&ses_desegment);
|
2003-11-11 08:29:34 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Register the dissector by name, so other dissectors can
|
|
|
|
* grab it by name rather than just referring to it directly
|
|
|
|
* (you can't refer to it directly from a plugin dissector
|
|
|
|
* on Windows without stuffing it into the Big Transfer Vector).
|
|
|
|
*/
|
|
|
|
register_dissector("ses", dissect_ses, proto_ses);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2012-09-10 21:40:21 +00:00
|
|
|
dissect_ses_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
/* must check that this really is a ses packet */
|
|
|
|
int offset = 0;
|
|
|
|
guint8 type;
|
|
|
|
int len_len;
|
|
|
|
guint16 len;
|
|
|
|
|
|
|
|
/* first, check do we have at least 4 bytes (type+length) */
|
2007-11-09 06:01:18 +00:00
|
|
|
if (tvb_length(tvb) < 2)
|
2003-11-11 08:29:34 +00:00
|
|
|
return FALSE; /* no */
|
|
|
|
|
2004-01-09 23:18:17 +00:00
|
|
|
/* can we recognize session PDU ? Return FALSE if not */
|
2003-11-11 08:29:34 +00:00
|
|
|
/* get SPDU type */
|
|
|
|
type = tvb_get_guint8(tvb, offset);
|
|
|
|
/* check SPDU type */
|
2013-03-29 00:26:23 +00:00
|
|
|
if (try_val_to_str(type, ses_vals) == NULL)
|
2003-11-11 08:29:34 +00:00
|
|
|
{
|
|
|
|
return FALSE; /* no, it isn't a session PDU */
|
|
|
|
}
|
|
|
|
|
2006-11-17 01:52:15 +00:00
|
|
|
/* can we recognize the second session PDU if the first one was
|
|
|
|
* a Give Tokens PDU? Return FALSE if not */
|
|
|
|
if(tvb_bytes_exist(tvb, 2, 2) && type == SES_GIVE_TOKENS) {
|
2006-11-14 05:47:57 +00:00
|
|
|
/* get SPDU type */
|
2006-11-17 01:52:15 +00:00
|
|
|
type = tvb_get_guint8(tvb, offset+2);
|
2006-11-14 05:47:57 +00:00
|
|
|
/* check SPDU type */
|
2013-03-29 00:26:23 +00:00
|
|
|
if (try_val_to_str(type, ses_vals) == NULL)
|
2011-05-17 18:58:40 +00:00
|
|
|
{
|
|
|
|
return FALSE; /* no, it isn't a session PDU */
|
|
|
|
}
|
2006-11-14 05:47:57 +00:00
|
|
|
}
|
|
|
|
|
2010-10-08 01:50:50 +00:00
|
|
|
/* some Siemens SIMATIC protocols also use COTP, and shouldn't be
|
2005-09-22 21:16:54 +00:00
|
|
|
* misinterpreted as SES.
|
2010-10-08 01:50:50 +00:00
|
|
|
* the starter in this case is fixed to 0x32 (SES_MINOR_SYNC_ACK for SES),
|
2005-09-22 21:16:54 +00:00
|
|
|
* so if the parameter type is unknown, it's probably SIMATIC */
|
2007-11-09 06:01:18 +00:00
|
|
|
if(type == 0x32 && tvb_length(tvb) >= 3) {
|
2005-09-22 21:16:54 +00:00
|
|
|
type = tvb_get_guint8(tvb, offset+2);
|
2013-03-29 00:26:23 +00:00
|
|
|
if (try_val_to_str(type, param_vals) == NULL) {
|
2005-09-22 21:16:54 +00:00
|
|
|
return FALSE; /* it's probably a SIMATIC protocol */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
/* OK,let's check SPDU length */
|
|
|
|
/* get length of SPDU */
|
2004-01-09 23:18:17 +00:00
|
|
|
len = get_item_len(tvb, offset+1, &len_len);
|
2006-10-29 20:56:00 +00:00
|
|
|
|
2004-01-09 23:18:17 +00:00
|
|
|
/* add header length */
|
|
|
|
len+=len_len;
|
2003-11-11 08:29:34 +00:00
|
|
|
/* do we have enough bytes ? */
|
2007-11-09 06:01:18 +00:00
|
|
|
if (tvb_length(tvb) < len)
|
2003-11-11 08:29:34 +00:00
|
|
|
return FALSE; /* no */
|
|
|
|
|
2011-09-21 07:35:51 +00:00
|
|
|
/* final check to see if the next SPDU, if present, is also valid */
|
2012-07-17 13:01:17 +00:00
|
|
|
if (tvb_length(tvb) > 1+(guint) len) {
|
2011-09-21 07:35:51 +00:00
|
|
|
type = tvb_get_guint8(tvb, offset + len + 1);
|
|
|
|
/* check SPDU type */
|
2013-03-29 00:26:23 +00:00
|
|
|
if (try_val_to_str(type, ses_vals) == NULL) {
|
2011-09-21 07:35:51 +00:00
|
|
|
return FALSE; /* no, it isn't a session PDU */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-11 08:29:34 +00:00
|
|
|
dissect_ses(tvb, pinfo, parent_tree);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_ses(void)
|
|
|
|
{
|
|
|
|
/* find data dissector */
|
|
|
|
data_handle = find_dissector("data");
|
|
|
|
|
|
|
|
/* define sub dissector */
|
|
|
|
pres_handle = find_dissector("pres");
|
|
|
|
|
2010-10-08 01:50:50 +00:00
|
|
|
/* add our session dissector to cotp dissector list
|
2004-09-04 20:39:00 +00:00
|
|
|
* and cotp_is dissector list*/
|
2003-11-11 08:29:34 +00:00
|
|
|
heur_dissector_add("cotp", dissect_ses_heur, proto_ses);
|
2004-09-04 20:39:00 +00:00
|
|
|
heur_dissector_add("cotp_is", dissect_ses_heur, proto_ses);
|
2003-11-11 08:29:34 +00:00
|
|
|
}
|
2010-01-04 23:17:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void proto_register_clses(void)
|
|
|
|
{
|
|
|
|
proto_clses = proto_register_protocol(PROTO_STRING_CLSES, "CLSP", "clsp");
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_clses(void)
|
|
|
|
{
|
|
|
|
/* add our session dissector to cltp dissector list */
|
|
|
|
heur_dissector_add("cltp", dissect_ses_heur, proto_clses);
|
|
|
|
}
|
|
|
|
|