2005-11-07 19:35:48 +00:00
|
|
|
/* packet-p_mul.c
|
|
|
|
*
|
|
|
|
* Routines for P_Mul (ACP142) packet disassembly.
|
|
|
|
* A protocol for reliable multicast messaging in bandwidth constrained
|
|
|
|
* and delayed acknowledgement (EMCON) environments.
|
|
|
|
*
|
2009-03-15 21:13:27 +00:00
|
|
|
* Copyright 2005, Stig Bjorlykke <stig@bjorlykke.org>, Thales Norway AS
|
2005-11-07 19:35:48 +00:00
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2005-11-07 19:35:48 +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.
|
|
|
|
*
|
2011-01-22 18:07:28 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2005-11-07 19:35:48 +00:00
|
|
|
*
|
2011-01-22 18:07:28 +00:00
|
|
|
* Ref: http://jcs.dtic.mil/j6/cceb/acps/acp142/
|
2005-11-07 19:35:48 +00:00
|
|
|
*/
|
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
/*
|
|
|
|
* TODO:
|
2008-03-07 12:22:20 +00:00
|
|
|
* - Obtain dedicated UDP port numbers
|
2007-12-19 10:05:42 +00:00
|
|
|
* - SEQ/ACK analysis for Announce/Request/Reject/Release PDU
|
|
|
|
*/
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <epan/packet.h>
|
|
|
|
#include <epan/to_str.h>
|
|
|
|
#include <epan/prefs.h>
|
2005-11-09 16:01:35 +00:00
|
|
|
#include <epan/reassemble.h>
|
2007-02-08 17:15:45 +00:00
|
|
|
#include <epan/expert.h>
|
2007-05-13 20:58:29 +00:00
|
|
|
#include <epan/asn1.h>
|
2007-12-19 10:05:42 +00:00
|
|
|
#include <string.h>
|
2005-11-07 19:35:48 +00:00
|
|
|
|
2005-11-23 07:33:03 +00:00
|
|
|
#include "packet-cdt.h"
|
2008-10-02 15:47:06 +00:00
|
|
|
#include "packet-ber.h"
|
2005-11-23 07:33:03 +00:00
|
|
|
|
|
|
|
#define PNAME "P_Mul (ACP142)"
|
|
|
|
#define PSNAME "P_MUL"
|
|
|
|
#define PFNAME "p_mul"
|
2005-11-07 19:35:48 +00:00
|
|
|
|
|
|
|
/* Recommended UDP Port Numbers */
|
2008-03-07 12:22:20 +00:00
|
|
|
#define DEFAULT_P_MUL_PORT_RANGE ""
|
2005-11-07 19:35:48 +00:00
|
|
|
|
|
|
|
/* PDU Types */
|
2008-03-07 12:22:20 +00:00
|
|
|
#define Data_PDU 0x00
|
|
|
|
#define Ack_PDU 0x01
|
|
|
|
#define Address_PDU 0x02
|
|
|
|
#define Discard_Message_PDU 0x03
|
|
|
|
#define Announce_PDU 0x04
|
|
|
|
#define Request_PDU 0x05
|
|
|
|
#define Reject_PDU 0x06
|
|
|
|
#define Release_PDU 0x07
|
|
|
|
#define FEC_Address_PDU 0x08
|
|
|
|
#define Extra_Address_PDU 0x12
|
|
|
|
#define Extra_FEC_Address_PDU 0x18
|
2008-10-03 14:58:53 +00:00
|
|
|
#define Ack_Ack_PDU 0xFF /* Fake type to indicate Ack-Ack */
|
2005-11-07 19:35:48 +00:00
|
|
|
|
2005-11-23 07:33:03 +00:00
|
|
|
/* Type of content to decode from Data_PDU */
|
|
|
|
#define DECODE_NONE 0
|
2008-10-02 15:47:06 +00:00
|
|
|
#define DECODE_BER 1
|
|
|
|
#define DECODE_CDT 2
|
2005-11-23 07:33:03 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
void proto_reg_handoff_p_mul (void);
|
|
|
|
|
|
|
|
static int proto_p_mul = -1;
|
|
|
|
|
|
|
|
static int hf_length = -1;
|
|
|
|
static int hf_priority = -1;
|
|
|
|
static int hf_map_first = -1;
|
|
|
|
static int hf_map_last = -1;
|
|
|
|
static int hf_map_unused = -1;
|
|
|
|
static int hf_pdu_type = -1;
|
2010-10-05 20:46:34 +00:00
|
|
|
static int hf_pdu_type_value = -1;
|
2005-11-07 19:35:48 +00:00
|
|
|
static int hf_no_pdus = -1;
|
|
|
|
static int hf_seq_no = -1;
|
|
|
|
static int hf_unused8 = -1;
|
|
|
|
static int hf_unused16 = -1;
|
|
|
|
static int hf_checksum = -1;
|
2007-11-25 21:30:57 +00:00
|
|
|
static int hf_checksum_good = -1;
|
|
|
|
static int hf_checksum_bad = -1;
|
2005-11-07 19:35:48 +00:00
|
|
|
static int hf_source_id_ack = -1;
|
|
|
|
static int hf_source_id = -1;
|
|
|
|
static int hf_message_id = -1;
|
|
|
|
static int hf_expiry_time = -1;
|
|
|
|
static int hf_mc_group = -1;
|
|
|
|
static int hf_ann_mc_group = -1;
|
2008-03-07 12:22:20 +00:00
|
|
|
static int hf_fec_len = -1;
|
|
|
|
static int hf_fec_id = -1;
|
|
|
|
static int hf_fec_parameters = -1;
|
2005-11-07 19:35:48 +00:00
|
|
|
static int hf_count_of_dest = -1;
|
|
|
|
static int hf_length_of_res = -1;
|
|
|
|
static int hf_ack_count = -1;
|
|
|
|
static int hf_ack_entry = -1;
|
|
|
|
static int hf_ack_length = -1;
|
|
|
|
static int hf_miss_seq_no = -1;
|
2008-08-15 07:59:11 +00:00
|
|
|
static int hf_miss_seq_range = -1;
|
2007-10-06 11:28:09 +00:00
|
|
|
static int hf_tot_miss_seq_no = -1;
|
2008-03-07 12:22:20 +00:00
|
|
|
static int hf_timestamp_option = -1;
|
2005-11-07 19:35:48 +00:00
|
|
|
static int hf_dest_entry = -1;
|
|
|
|
static int hf_dest_id = -1;
|
|
|
|
static int hf_msg_seq_no = -1;
|
|
|
|
static int hf_sym_key = -1;
|
2005-11-09 16:01:35 +00:00
|
|
|
static int hf_data_fragment = -1;
|
|
|
|
|
|
|
|
static int hf_msg_fragments = -1;
|
|
|
|
static int hf_msg_fragment = -1;
|
|
|
|
static int hf_msg_fragment_overlap = -1;
|
|
|
|
static int hf_msg_fragment_overlap_conflicts = -1;
|
|
|
|
static int hf_msg_fragment_multiple_tails = -1;
|
|
|
|
static int hf_msg_fragment_too_long_fragment = -1;
|
|
|
|
static int hf_msg_fragment_error = -1;
|
2011-01-30 21:01:07 +00:00
|
|
|
static int hf_msg_fragment_count = -1;
|
2005-11-09 16:01:35 +00:00
|
|
|
static int hf_msg_reassembled_in = -1;
|
2010-02-02 16:01:52 +00:00
|
|
|
static int hf_msg_reassembled_length = -1;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
static int hf_analysis_ack_time = -1;
|
2008-10-13 14:59:28 +00:00
|
|
|
static int hf_analysis_trans_time = -1;
|
2007-12-19 11:25:47 +00:00
|
|
|
static int hf_analysis_retrans_time = -1;
|
|
|
|
static int hf_analysis_total_retrans_time = -1;
|
2007-12-19 10:05:42 +00:00
|
|
|
static int hf_analysis_last_pdu_num = -1;
|
|
|
|
static int hf_analysis_addr_pdu_num = -1;
|
|
|
|
static int hf_analysis_addr_pdu_time = -1;
|
|
|
|
static int hf_analysis_addr_pdu_missing = -1;
|
|
|
|
static int hf_analysis_prev_pdu_num = -1;
|
|
|
|
static int hf_analysis_prev_pdu_time = -1;
|
|
|
|
static int hf_analysis_prev_pdu_missing = -1;
|
|
|
|
static int hf_analysis_retrans_no = -1;
|
|
|
|
static int hf_analysis_ack_num = -1;
|
|
|
|
static int hf_analysis_ack_missing = -1;
|
|
|
|
static int hf_analysis_ack_dup_no = -1;
|
|
|
|
static int hf_analysis_msg_resend_from = -1;
|
|
|
|
static int hf_analysis_ack_resend_from = -1;
|
2008-10-13 14:59:28 +00:00
|
|
|
static int hf_analysis_total_time = -1;
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
static gint ett_p_mul = -1;
|
|
|
|
static gint ett_pdu_type = -1;
|
2008-08-15 07:59:11 +00:00
|
|
|
static gint ett_dest_entry = -1;
|
|
|
|
static gint ett_ack_entry = -1;
|
|
|
|
static gint ett_range_entry = -1;
|
2007-11-25 21:30:57 +00:00
|
|
|
static gint ett_checksum = -1;
|
2008-10-03 14:58:53 +00:00
|
|
|
static gint ett_seq_analysis = -1;
|
|
|
|
static gint ett_ack_analysis = -1;
|
|
|
|
static gint ett_seq_ack_analysis = -1;
|
2005-11-09 16:01:35 +00:00
|
|
|
static gint ett_msg_fragment = -1;
|
|
|
|
static gint ett_msg_fragments = -1;
|
2005-11-07 19:35:48 +00:00
|
|
|
|
2007-11-19 07:26:53 +00:00
|
|
|
static dissector_handle_t p_mul_handle = NULL;
|
2008-10-02 15:47:06 +00:00
|
|
|
static dissector_handle_t data_handle = NULL;
|
2005-11-23 07:33:03 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
typedef struct _p_mul_id_key {
|
|
|
|
guint32 id;
|
2008-08-15 07:59:11 +00:00
|
|
|
guint16 seq;
|
2008-08-22 15:15:56 +00:00
|
|
|
address addr;
|
2007-12-19 10:05:42 +00:00
|
|
|
} p_mul_id_key;
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
typedef struct _p_mul_seq_val {
|
2012-07-12 17:22:47 +00:00
|
|
|
gint msg_type; /* Message type */
|
|
|
|
guint32 prev_msg_id; /* Previous message package num */
|
|
|
|
nstime_t prev_msg_time; /* Previous message receive time */
|
|
|
|
guint32 addr_id; /* PDU package num for Address_PDU */
|
|
|
|
nstime_t addr_time; /* PDU received time for Address_PDU */
|
|
|
|
guint32 pdu_id; /* PDU package num */
|
|
|
|
nstime_t pdu_time; /* PDU receive time */
|
|
|
|
guint32 prev_pdu_id; /* Previous PDU package num */
|
|
|
|
nstime_t prev_pdu_time; /* Previous PDU receive time */
|
|
|
|
guint16 last_found_pdu; /* Last PDU num */
|
|
|
|
nstime_t first_msg_time; /* First message receive time */
|
|
|
|
guint32 msg_resend_count; /* Message resend counter */
|
2008-10-03 14:58:53 +00:00
|
|
|
GHashTable *ack_data;
|
|
|
|
} p_mul_seq_val;
|
|
|
|
|
|
|
|
typedef struct _p_mul_ack_data {
|
|
|
|
guint32 ack_id; /* Ack PDU package num */
|
|
|
|
guint32 ack_resend_count; /* Ack resend counter */
|
|
|
|
} p_mul_ack_data;
|
|
|
|
|
|
|
|
/* Hash table with current data for seq/ack analysis */
|
2007-12-19 10:05:42 +00:00
|
|
|
static GHashTable *p_mul_id_hash_table = NULL;
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
/* List of hash tables stored in each frame */
|
|
|
|
static GList *p_mul_package_data_list = NULL;
|
|
|
|
|
2005-11-09 16:01:35 +00:00
|
|
|
/* User definable values to use for dissection */
|
2008-09-23 15:03:39 +00:00
|
|
|
static range_t *global_p_mul_port_range;
|
2005-11-09 16:01:35 +00:00
|
|
|
static gboolean p_mul_reassemble = TRUE;
|
2005-11-23 07:33:03 +00:00
|
|
|
static gint decode_option = DECODE_NONE;
|
2007-10-06 11:28:09 +00:00
|
|
|
static gboolean use_relative_msgid = TRUE;
|
2007-12-19 10:05:42 +00:00
|
|
|
static gboolean use_seq_ack_analysis = TRUE;
|
2005-11-23 07:33:03 +00:00
|
|
|
|
2013-03-22 23:59:54 +00:00
|
|
|
static reassembly_table p_mul_reassembly_table;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-10-06 11:28:09 +00:00
|
|
|
static guint32 message_id_offset = 0;
|
|
|
|
|
2005-11-09 16:01:35 +00:00
|
|
|
static const fragment_items p_mul_frag_items = {
|
2005-11-23 07:33:03 +00:00
|
|
|
/* Fragment subtrees */
|
|
|
|
&ett_msg_fragment,
|
|
|
|
&ett_msg_fragments,
|
|
|
|
/* Fragment fields */
|
|
|
|
&hf_msg_fragments,
|
|
|
|
&hf_msg_fragment,
|
|
|
|
&hf_msg_fragment_overlap,
|
|
|
|
&hf_msg_fragment_overlap_conflicts,
|
|
|
|
&hf_msg_fragment_multiple_tails,
|
|
|
|
&hf_msg_fragment_too_long_fragment,
|
|
|
|
&hf_msg_fragment_error,
|
2011-01-30 21:01:07 +00:00
|
|
|
&hf_msg_fragment_count,
|
2005-11-23 07:33:03 +00:00
|
|
|
/* Reassembled in field */
|
|
|
|
&hf_msg_reassembled_in,
|
2010-02-02 16:01:52 +00:00
|
|
|
/* Reassembled length field */
|
|
|
|
&hf_msg_reassembled_length,
|
2012-09-07 02:09:59 +00:00
|
|
|
/* Reassembled data field */
|
|
|
|
NULL,
|
2005-11-23 07:33:03 +00:00
|
|
|
/* Tag */
|
|
|
|
"Message fragments"
|
2005-11-09 16:01:35 +00:00
|
|
|
};
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
static const value_string pdu_vals[] = {
|
2008-03-07 12:22:20 +00:00
|
|
|
{ Data_PDU, "Data PDU" },
|
|
|
|
{ Ack_PDU, "Ack PDU" },
|
|
|
|
{ Address_PDU, "Address PDU" },
|
|
|
|
{ Discard_Message_PDU, "Discard Message PDU" },
|
|
|
|
{ Announce_PDU, "Announce PDU" },
|
|
|
|
{ Request_PDU, "Request PDU" },
|
|
|
|
{ Reject_PDU, "Reject PDU" },
|
|
|
|
{ Release_PDU, "Release PDU" },
|
|
|
|
{ FEC_Address_PDU, "FEC Address PDU" },
|
|
|
|
{ Extra_Address_PDU, "Extra Address PDU" },
|
|
|
|
{ Extra_FEC_Address_PDU, "Extra FEC Address PDU" },
|
2008-10-03 14:58:53 +00:00
|
|
|
{ Ack_Ack_PDU, "Ack-Ack PDU" },
|
2008-03-07 12:22:20 +00:00
|
|
|
{ 0, NULL }
|
2005-11-23 07:33:03 +00:00
|
|
|
};
|
|
|
|
|
2012-11-29 20:15:37 +00:00
|
|
|
static const enum_val_t decode_options[] = {
|
2005-11-23 07:33:03 +00:00
|
|
|
{ "none", "No decoding", DECODE_NONE },
|
2008-10-02 15:47:06 +00:00
|
|
|
{ "ber", "BER encoded ASN.1", DECODE_BER },
|
2005-11-23 07:33:03 +00:00
|
|
|
{ "cdt", "Compressed Data Type", DECODE_CDT },
|
|
|
|
{ NULL, NULL, 0 }
|
|
|
|
};
|
2005-11-07 19:35:48 +00:00
|
|
|
|
2011-01-22 18:07:28 +00:00
|
|
|
static const true_false_string no_yes = {
|
2005-11-07 19:35:48 +00:00
|
|
|
"No", "Yes"
|
|
|
|
};
|
|
|
|
|
2005-11-09 16:01:35 +00:00
|
|
|
static const gchar *get_type (guint8 value)
|
2005-11-07 19:35:48 +00:00
|
|
|
{
|
2012-08-10 22:55:02 +00:00
|
|
|
return val_to_str_const (value, pdu_vals, "Unknown");
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
|
|
|
|
2005-11-23 07:33:03 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/*Function checksum, found in ACP142 annex B-3 */
|
|
|
|
static guint16 checksum (guint8 *buffer, gint len, gint offset)
|
|
|
|
{
|
|
|
|
guint16 c0 = 0, c1 = 0, ret, ctmp;
|
|
|
|
gint16 cs;
|
|
|
|
guint8 *hpp, *pls;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-08-16 20:54:43 +00:00
|
|
|
if (len < offset+2) {
|
|
|
|
/* Buffer to small */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
buffer[offset] = 0;
|
|
|
|
buffer[offset+1] = 0;
|
|
|
|
ctmp = len - offset - 1;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
pls = buffer + len;
|
|
|
|
hpp = buffer;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
while (hpp < pls) {
|
|
|
|
if ((c0 += *hpp++) > 254) { c0 -= 255; }
|
|
|
|
if ((c1 += c0) > 254) { c1 -= 255; }
|
|
|
|
}
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-03-26 21:16:21 +00:00
|
|
|
if ((cs = ((ctmp * c0) - c1) % 255) < 0) { cs += 255; }
|
2005-11-07 19:35:48 +00:00
|
|
|
ret = cs << 8;
|
2007-03-26 21:16:21 +00:00
|
|
|
if ((cs = (c1 - ((ctmp + 1L) * c0)) % 255) < 0) { cs += 255; }
|
2005-11-07 19:35:48 +00:00
|
|
|
ret |= cs;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
static guint p_mul_id_hash (gconstpointer k)
|
|
|
|
{
|
2013-03-24 18:28:40 +00:00
|
|
|
const p_mul_id_key *p_mul = (const p_mul_id_key *)k;
|
2007-12-19 10:05:42 +00:00
|
|
|
return p_mul->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint p_mul_id_hash_equal (gconstpointer k1, gconstpointer k2)
|
|
|
|
{
|
2013-03-24 18:28:40 +00:00
|
|
|
const p_mul_id_key *p_mul1 = (const p_mul_id_key *)k1;
|
|
|
|
const p_mul_id_key *p_mul2 = (const p_mul_id_key *)k2;
|
2008-10-03 14:58:53 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (p_mul1->id != p_mul2->id)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (p_mul1->seq != p_mul2->seq)
|
|
|
|
return 0;
|
2008-10-03 14:58:53 +00:00
|
|
|
|
2008-08-22 15:15:56 +00:00
|
|
|
return (ADDRESSES_EQUAL (&p_mul1->addr, &p_mul2->addr));
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
static p_mul_seq_val *lookup_seq_val (guint32 message_id, guint16 seq_no,
|
|
|
|
address *addr)
|
|
|
|
{
|
2012-07-12 17:22:47 +00:00
|
|
|
p_mul_seq_val *pkg_data;
|
2013-03-18 05:18:32 +00:00
|
|
|
p_mul_id_key *p_mul_key = se_new(p_mul_id_key);
|
2008-10-03 14:58:53 +00:00
|
|
|
|
|
|
|
p_mul_key->id = message_id;
|
|
|
|
p_mul_key->seq = seq_no;
|
|
|
|
SE_COPY_ADDRESS(&p_mul_key->addr, addr);
|
|
|
|
|
|
|
|
pkg_data = (p_mul_seq_val *) g_hash_table_lookup (p_mul_id_hash_table, p_mul_key);
|
|
|
|
|
|
|
|
return pkg_data;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void p_mul_id_value_destroy (p_mul_seq_val *pkg_data)
|
|
|
|
{
|
|
|
|
if (pkg_data->ack_data) {
|
|
|
|
g_hash_table_destroy (pkg_data->ack_data);
|
|
|
|
}
|
2011-01-22 18:07:28 +00:00
|
|
|
g_free (pkg_data);
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void p_mul_package_data_destroy (GHashTable *pkg_list, gpointer user_data _U_)
|
|
|
|
{
|
|
|
|
g_hash_table_destroy (pkg_list);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void copy_hashtable_data (gpointer key, p_mul_ack_data *ack_data1, GHashTable *table)
|
|
|
|
{
|
|
|
|
p_mul_ack_data *ack_data2;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2013-03-18 05:18:32 +00:00
|
|
|
ack_data2 = se_new(p_mul_ack_data);
|
2008-10-03 14:58:53 +00:00
|
|
|
ack_data2->ack_id = ack_data1->ack_id;
|
|
|
|
ack_data2->ack_resend_count = ack_data1->ack_resend_count;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
g_hash_table_insert (table, key, ack_data2);
|
|
|
|
}
|
|
|
|
|
|
|
|
static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guint32 dstIP,
|
|
|
|
guint8 pdu_type, guint32 message_id,
|
|
|
|
guint16 seq_no, gint no_missing)
|
2007-12-19 10:05:42 +00:00
|
|
|
{
|
2012-07-12 17:22:47 +00:00
|
|
|
p_mul_seq_val *p_mul_data = NULL, *pkg_data = NULL;
|
|
|
|
p_mul_id_key *p_mul_key;
|
2008-10-03 14:58:53 +00:00
|
|
|
p_mul_ack_data *ack_data = NULL;
|
2012-07-12 17:22:47 +00:00
|
|
|
nstime_t addr_time, prev_time;
|
|
|
|
guint addr_id = 0, prev_id = 0;
|
|
|
|
guint16 last_found_pdu = 0;
|
|
|
|
gboolean missing_pdu = FALSE, set_address = FALSE;
|
|
|
|
GHashTable *pkg_list;
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2011-11-08 18:39:11 +00:00
|
|
|
if (pinfo->flags.in_error_pkt) {
|
2007-12-19 10:05:42 +00:00
|
|
|
/* No analysis of error packets */
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-01-22 15:35:34 +00:00
|
|
|
nstime_set_zero(&addr_time);
|
|
|
|
nstime_set_zero(&prev_time);
|
|
|
|
|
2013-03-18 05:18:32 +00:00
|
|
|
p_mul_key = se_new(p_mul_id_key);
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2011-01-22 15:35:34 +00:00
|
|
|
if (!pinfo->fd->flags.visited &&
|
|
|
|
(pdu_type == Address_PDU || pdu_type == Data_PDU || pdu_type == Discard_Message_PDU))
|
2007-12-19 10:05:42 +00:00
|
|
|
{
|
|
|
|
/* Try to match corresponding address PDU */
|
|
|
|
p_mul_key->id = message_id;
|
|
|
|
p_mul_key->seq = 0;
|
2008-10-03 14:58:53 +00:00
|
|
|
SE_COPY_ADDRESS(&p_mul_key->addr, addr);
|
2007-12-19 10:05:42 +00:00
|
|
|
set_address = TRUE;
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
p_mul_data = (p_mul_seq_val *) g_hash_table_lookup (p_mul_id_hash_table, p_mul_key);
|
2007-12-19 10:05:42 +00:00
|
|
|
|
|
|
|
if (p_mul_data) {
|
|
|
|
/* Found address PDU */
|
|
|
|
last_found_pdu = p_mul_data->last_found_pdu;
|
|
|
|
p_mul_data->last_found_pdu = seq_no;
|
|
|
|
addr_id = p_mul_data->pdu_id;
|
|
|
|
addr_time = p_mul_data->pdu_time;
|
2008-10-03 14:58:53 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
/* Save data for last found PDU */
|
|
|
|
p_mul_data->prev_pdu_id = pinfo->fd->num;
|
|
|
|
p_mul_data->prev_pdu_time = pinfo->fd->abs_ts;
|
|
|
|
|
|
|
|
if (pdu_type == Data_PDU && p_mul_data->msg_resend_count == 0 && last_found_pdu != seq_no - 1) {
|
|
|
|
/* Data_PDU and missing previous PDU */
|
|
|
|
missing_pdu = TRUE;
|
|
|
|
}
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (last_found_pdu) {
|
|
|
|
/* Try to match previous data PDU */
|
|
|
|
p_mul_key->seq = last_found_pdu;
|
2008-10-03 14:58:53 +00:00
|
|
|
p_mul_data = (p_mul_seq_val *) g_hash_table_lookup (p_mul_id_hash_table, p_mul_key);
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (p_mul_data) {
|
|
|
|
/* Found a previous PDU (Address or Data) */
|
|
|
|
if (p_mul_data->prev_msg_id > 0) {
|
|
|
|
prev_id = p_mul_data->prev_msg_id;
|
|
|
|
} else {
|
|
|
|
prev_id = p_mul_data->pdu_id;
|
|
|
|
}
|
|
|
|
prev_time = p_mul_data->pdu_time;
|
|
|
|
}
|
2008-10-13 14:59:28 +00:00
|
|
|
} else if (pdu_type == Address_PDU) {
|
|
|
|
addr_id = pinfo->fd->num;
|
|
|
|
addr_time = pinfo->fd->abs_ts;
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-12 18:11:02 +00:00
|
|
|
pkg_list = (GHashTable *)p_get_proto_data(pinfo->fd, proto_p_mul, 0);
|
2008-10-03 14:58:53 +00:00
|
|
|
if (!pkg_list) {
|
|
|
|
/* Never saved list for this packet, create a new */
|
|
|
|
pkg_list = g_hash_table_new (NULL, NULL);
|
|
|
|
p_mul_package_data_list = g_list_append (p_mul_package_data_list, pkg_list);
|
2013-05-12 18:11:02 +00:00
|
|
|
p_add_proto_data (pinfo->fd, proto_p_mul, 0, pkg_list);
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
2007-12-19 10:05:42 +00:00
|
|
|
|
|
|
|
if (!pinfo->fd->flags.visited) {
|
2008-10-03 14:58:53 +00:00
|
|
|
p_mul_key->id = message_id;
|
|
|
|
p_mul_key->seq = seq_no;
|
|
|
|
if (!set_address) {
|
|
|
|
SE_COPY_ADDRESS(&p_mul_key->addr, addr);
|
|
|
|
}
|
|
|
|
p_mul_data = (p_mul_seq_val *) g_hash_table_lookup (p_mul_id_hash_table, p_mul_key);
|
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (p_mul_data) {
|
|
|
|
if (pdu_type == Ack_PDU) {
|
|
|
|
/* Only save this data if positive ack */
|
|
|
|
if (no_missing == 0) {
|
2013-03-18 05:18:32 +00:00
|
|
|
ack_data = (p_mul_ack_data *)g_hash_table_lookup (p_mul_data->ack_data, GUINT_TO_POINTER(dstIP));
|
2008-10-03 14:58:53 +00:00
|
|
|
if (!ack_data) {
|
2007-12-19 10:05:42 +00:00
|
|
|
/* Only save reference to first ACK */
|
2013-03-18 05:18:32 +00:00
|
|
|
ack_data = se_new0(p_mul_ack_data);
|
2008-10-03 14:58:53 +00:00
|
|
|
ack_data->ack_id = pinfo->fd->num;
|
2008-10-03 17:01:08 +00:00
|
|
|
g_hash_table_insert (p_mul_data->ack_data, GUINT_TO_POINTER(dstIP), ack_data);
|
2007-12-19 10:05:42 +00:00
|
|
|
} else {
|
|
|
|
/* Only count when resending */
|
2008-10-03 14:58:53 +00:00
|
|
|
ack_data->ack_resend_count++;
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2008-08-15 07:59:11 +00:00
|
|
|
/* Message resent */
|
|
|
|
p_mul_data->msg_resend_count++;
|
|
|
|
p_mul_data->prev_msg_id = pinfo->fd->num;
|
|
|
|
p_mul_data->prev_msg_time = p_mul_data->pdu_time;
|
|
|
|
p_mul_data->pdu_time = pinfo->fd->abs_ts;
|
2007-12-19 10:05:42 +00:00
|
|
|
|
|
|
|
if (pdu_type == Data_PDU) {
|
|
|
|
p_mul_data->prev_pdu_id = prev_id;
|
|
|
|
p_mul_data->prev_pdu_time = prev_time;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/* New message */
|
2011-01-22 18:07:28 +00:00
|
|
|
if (pdu_type == Ack_PDU) {
|
2013-03-18 05:18:32 +00:00
|
|
|
p_mul_data = se_new0(p_mul_seq_val);
|
2011-01-22 18:07:28 +00:00
|
|
|
} else {
|
2013-03-18 05:18:32 +00:00
|
|
|
p_mul_data = (p_mul_seq_val *)g_malloc0(sizeof (p_mul_seq_val));
|
2011-01-22 18:07:28 +00:00
|
|
|
}
|
2007-12-19 10:05:42 +00:00
|
|
|
p_mul_data->msg_type = pdu_type;
|
2008-10-03 14:58:53 +00:00
|
|
|
if (pdu_type == Address_PDU || pdu_type == Ack_PDU) {
|
|
|
|
p_mul_data->ack_data = g_hash_table_new (NULL, NULL);
|
|
|
|
}
|
2007-12-19 10:05:42 +00:00
|
|
|
|
|
|
|
if (pdu_type == Ack_PDU) {
|
2008-08-15 07:59:11 +00:00
|
|
|
/* No matching message for this ack */
|
2013-03-18 05:18:32 +00:00
|
|
|
ack_data = se_new0(p_mul_ack_data);
|
2008-10-03 14:58:53 +00:00
|
|
|
ack_data->ack_id = pinfo->fd->num;
|
2008-10-03 17:01:08 +00:00
|
|
|
g_hash_table_insert (p_mul_data->ack_data, GUINT_TO_POINTER(dstIP), ack_data);
|
2007-12-19 10:05:42 +00:00
|
|
|
} else {
|
|
|
|
p_mul_data->pdu_id = pinfo->fd->num;
|
|
|
|
p_mul_data->pdu_time = pinfo->fd->abs_ts;
|
|
|
|
p_mul_data->addr_id = addr_id;
|
|
|
|
p_mul_data->addr_time = addr_time;
|
|
|
|
p_mul_data->first_msg_time = pinfo->fd->abs_ts;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (pdu_type == Data_PDU && !missing_pdu) {
|
|
|
|
p_mul_data->prev_pdu_id = prev_id;
|
|
|
|
p_mul_data->prev_pdu_time = prev_time;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_hash_table_insert (p_mul_id_hash_table, p_mul_key, p_mul_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
/* Copy the current package data to the frame */
|
2013-03-18 05:18:32 +00:00
|
|
|
pkg_data = se_new(p_mul_seq_val);
|
2007-12-19 10:05:42 +00:00
|
|
|
*pkg_data = *p_mul_data;
|
2008-10-03 14:58:53 +00:00
|
|
|
if (p_mul_data->ack_data) {
|
|
|
|
/* Copy the hash table for ack data */
|
|
|
|
pkg_data->ack_data = g_hash_table_new (NULL, NULL);
|
|
|
|
g_hash_table_foreach (p_mul_data->ack_data, (GHFunc) copy_hashtable_data, pkg_data->ack_data);
|
|
|
|
}
|
2008-10-03 17:01:08 +00:00
|
|
|
g_hash_table_insert (pkg_list, GUINT_TO_POINTER(message_id), pkg_data);
|
2007-12-19 10:05:42 +00:00
|
|
|
} else {
|
|
|
|
/* Fetch last values from data saved in packet */
|
2013-03-18 05:18:32 +00:00
|
|
|
pkg_data = (p_mul_seq_val *)g_hash_table_lookup (pkg_list, GUINT_TO_POINTER(message_id));
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DISSECTOR_ASSERT (pkg_data);
|
|
|
|
return pkg_data;
|
|
|
|
}
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
static void add_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_mul_tree,
|
|
|
|
gint offset, guint8 pdu_type, address *src, address *dst,
|
|
|
|
guint32 message_id, gint no_missing)
|
|
|
|
{
|
2012-07-12 17:22:47 +00:00
|
|
|
proto_tree *analysis_tree = NULL;
|
|
|
|
proto_item *sa = NULL;
|
|
|
|
proto_item *en = NULL;
|
|
|
|
p_mul_seq_val *pkg_data = NULL;
|
|
|
|
p_mul_ack_data *ack_data = NULL;
|
|
|
|
gboolean item_added = FALSE;
|
|
|
|
guint32 dstIp;
|
|
|
|
nstime_t ns;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2011-11-08 18:39:11 +00:00
|
|
|
if (pinfo->flags.in_error_pkt) {
|
2008-10-03 14:58:53 +00:00
|
|
|
/* No analysis of error packets */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pdu_type == Address_PDU) {
|
|
|
|
sa = proto_tree_add_text (p_mul_tree, tvb, 0, 0, "ACK analysis");
|
|
|
|
PROTO_ITEM_SET_GENERATED (sa);
|
|
|
|
analysis_tree = proto_item_add_subtree (sa, ett_ack_analysis);
|
|
|
|
|
|
|
|
/* Fetch package data */
|
|
|
|
if ((pkg_data = lookup_seq_val (message_id, 0, src)) == NULL) {
|
|
|
|
/* No need for seq/ack analysis yet */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-10-13 14:59:28 +00:00
|
|
|
if (dst == NULL) {
|
|
|
|
/* Ack-Ack */
|
|
|
|
if (pkg_data->addr_id) {
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_addr_pdu_num, tvb,
|
|
|
|
0, 0, pkg_data->addr_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-13 14:59:28 +00:00
|
|
|
nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->addr_time);
|
|
|
|
en = proto_tree_add_time (analysis_tree, hf_analysis_total_time,
|
|
|
|
tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
} else {
|
|
|
|
en = proto_tree_add_item (analysis_tree,
|
|
|
|
hf_analysis_addr_pdu_missing,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, 0, ENC_NA);
|
2008-10-03 14:58:53 +00:00
|
|
|
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
|
2008-10-13 14:59:28 +00:00
|
|
|
"Address PDU missing");
|
2008-10-03 14:58:53 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
}
|
|
|
|
item_added = TRUE;
|
2008-10-13 14:59:28 +00:00
|
|
|
} else {
|
2009-08-11 13:44:35 +00:00
|
|
|
memcpy((guint8 *)&dstIp, dst->data, 4);
|
2008-10-13 14:59:28 +00:00
|
|
|
if (pkg_data->ack_data) {
|
2013-03-18 05:18:32 +00:00
|
|
|
ack_data = (p_mul_ack_data *)g_hash_table_lookup (pkg_data->ack_data, GUINT_TO_POINTER(dstIp));
|
2008-10-13 14:59:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Add reference to Ack_PDU */
|
|
|
|
if (ack_data && ack_data->ack_id) {
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_ack_num, tvb,
|
|
|
|
0, 0, ack_data->ack_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
item_added = TRUE;
|
|
|
|
} else if (!pkg_data->msg_resend_count) {
|
|
|
|
en = proto_tree_add_item (analysis_tree,
|
|
|
|
hf_analysis_ack_missing,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, 0, ENC_NA);
|
2008-10-13 14:59:28 +00:00
|
|
|
if (pinfo->fd->flags.visited) {
|
|
|
|
/* We do not know this on first visit and we do not want to
|
|
|
|
add a entry in the "Expert Severity Info" for this note */
|
|
|
|
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
|
|
|
|
"Ack PDU missing");
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
}
|
|
|
|
item_added = TRUE;
|
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!item_added) {
|
|
|
|
PROTO_ITEM_SET_HIDDEN (sa);
|
|
|
|
}
|
|
|
|
} else if (pdu_type == Ack_PDU) {
|
|
|
|
sa = proto_tree_add_text (p_mul_tree, tvb, 0, 0, "SEQ/ACK analysis");
|
|
|
|
PROTO_ITEM_SET_GENERATED (sa);
|
|
|
|
analysis_tree = proto_item_add_subtree (sa, ett_seq_ack_analysis);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
/* Fetch package data */
|
2009-08-11 13:44:35 +00:00
|
|
|
memcpy((guint8 *)&dstIp, dst->data, 4);
|
2008-10-03 14:58:53 +00:00
|
|
|
if ((pkg_data = register_p_mul_id (pinfo, src, dstIp, pdu_type, message_id, 0, no_missing)) == NULL) {
|
|
|
|
/* No need for seq/ack analysis yet */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (pkg_data->ack_data) {
|
2013-03-18 05:18:32 +00:00
|
|
|
ack_data = (p_mul_ack_data *)g_hash_table_lookup (pkg_data->ack_data, GUINT_TO_POINTER(dstIp));
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Add reference to Address_PDU */
|
|
|
|
if (pkg_data->msg_type != Ack_PDU) {
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_addr_pdu_num, tvb,
|
|
|
|
0, 0, pkg_data->pdu_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
|
|
|
|
if (no_missing == 0) {
|
|
|
|
nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->first_msg_time);
|
2008-10-13 14:59:28 +00:00
|
|
|
en = proto_tree_add_time (analysis_tree, hf_analysis_trans_time,
|
2008-10-03 14:58:53 +00:00
|
|
|
tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
en = proto_tree_add_item (analysis_tree,
|
|
|
|
hf_analysis_addr_pdu_missing,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, 0, ENC_NA);
|
2008-10-03 14:58:53 +00:00
|
|
|
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
|
|
|
|
"Address PDU missing");
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pkg_data->msg_type != Ack_PDU && pkg_data->prev_pdu_id) {
|
|
|
|
/* Add reference to previous PDU */
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_last_pdu_num,
|
|
|
|
tvb, 0, 0, pkg_data->prev_pdu_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->prev_pdu_time);
|
|
|
|
en = proto_tree_add_time (analysis_tree, hf_analysis_ack_time,
|
|
|
|
tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ack_data && ack_data->ack_resend_count) {
|
|
|
|
/* Add resend statistics */
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_ack_dup_no,
|
|
|
|
tvb, 0, 0, ack_data->ack_resend_count);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
|
|
|
|
"Dup ACK #%d", ack_data->ack_resend_count);
|
|
|
|
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_ack_resend_from,
|
|
|
|
tvb, 0, 0, ack_data->ack_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
|
2009-07-07 10:07:42 +00:00
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, "[Dup ACK %d#%d] ",
|
|
|
|
ack_data->ack_id, ack_data->ack_resend_count);
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
2011-01-22 15:35:34 +00:00
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static p_mul_seq_val *add_seq_analysis (tvbuff_t *tvb, packet_info *pinfo,
|
|
|
|
proto_tree *p_mul_tree, address *src,
|
|
|
|
gint offset,
|
2007-12-19 10:05:42 +00:00
|
|
|
guint8 pdu_type, guint32 message_id,
|
2008-08-15 07:59:11 +00:00
|
|
|
guint16 seq_no, gint no_missing)
|
2007-12-19 10:05:42 +00:00
|
|
|
{
|
2012-07-12 17:22:47 +00:00
|
|
|
p_mul_seq_val *pkg_data;
|
|
|
|
proto_tree *analysis_tree;
|
|
|
|
proto_item *sa, *en = NULL, *eh = NULL;
|
|
|
|
gboolean item_added = FALSE;
|
|
|
|
nstime_t ns;
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2011-01-22 15:35:34 +00:00
|
|
|
pkg_data = register_p_mul_id (pinfo, src, 0, pdu_type, message_id, seq_no,
|
2007-12-19 10:05:42 +00:00
|
|
|
no_missing);
|
|
|
|
|
|
|
|
if (!pkg_data) {
|
|
|
|
/* No need for seq/ack analysis */
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
sa = proto_tree_add_text (p_mul_tree, tvb, 0, 0, "SEQ analysis");
|
|
|
|
PROTO_ITEM_SET_GENERATED (sa);
|
|
|
|
analysis_tree = proto_item_add_subtree (sa, ett_seq_analysis);
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
if (pdu_type == Data_PDU || pdu_type == Discard_Message_PDU) {
|
|
|
|
/* Add reference to Address_PDU */
|
|
|
|
if (pkg_data->addr_id) {
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_addr_pdu_num, tvb,
|
|
|
|
0, 0, pkg_data->addr_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->addr_time);
|
|
|
|
en = proto_tree_add_time (analysis_tree, hf_analysis_addr_pdu_time,
|
|
|
|
tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2009-11-27 14:29:38 +00:00
|
|
|
|
|
|
|
if (pkg_data->prev_pdu_id == pkg_data->addr_id) {
|
|
|
|
/* Previous pdu time is the same as time since address pdu */
|
|
|
|
en = proto_tree_add_time (analysis_tree, hf_analysis_prev_pdu_time,
|
|
|
|
tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
item_added = TRUE;
|
|
|
|
} else if (!pkg_data->msg_resend_count) {
|
|
|
|
en = proto_tree_add_item (analysis_tree,
|
|
|
|
hf_analysis_addr_pdu_missing,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, 0, ENC_NA);
|
2008-10-03 14:58:53 +00:00
|
|
|
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
|
|
|
|
"Address PDU missing");
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
item_added = TRUE;
|
|
|
|
}
|
|
|
|
}
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
if ((pdu_type == Data_PDU) && (pkg_data->prev_pdu_id != pkg_data->addr_id)) {
|
|
|
|
/* Add reference to previous Data_PDU */
|
|
|
|
if (pkg_data->prev_pdu_id) {
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_prev_pdu_num, tvb,
|
|
|
|
0, 0, pkg_data->prev_pdu_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->prev_pdu_time);
|
|
|
|
en = proto_tree_add_time (analysis_tree, hf_analysis_prev_pdu_time,
|
|
|
|
tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
item_added = TRUE;
|
|
|
|
} else if (!pkg_data->msg_resend_count) {
|
|
|
|
en = proto_tree_add_item (analysis_tree,
|
|
|
|
hf_analysis_prev_pdu_missing,
|
2011-10-04 22:44:31 +00:00
|
|
|
tvb, offset, 0, ENC_NA);
|
2008-10-03 14:58:53 +00:00
|
|
|
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
|
|
|
|
"Previous PDU missing");
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
item_added = TRUE;
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
if ((pdu_type == Address_PDU) || (pdu_type == Data_PDU) ||
|
|
|
|
(pdu_type == Discard_Message_PDU)) {
|
|
|
|
/* Add resend statistics */
|
2007-12-19 10:05:42 +00:00
|
|
|
if (pkg_data->msg_resend_count) {
|
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_retrans_no,
|
2008-08-15 07:59:11 +00:00
|
|
|
tvb, 0, 0, pkg_data->msg_resend_count);
|
2007-12-19 10:05:42 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
en = proto_tree_add_uint (analysis_tree, hf_analysis_msg_resend_from,
|
|
|
|
tvb, 0, 0, pkg_data->pdu_id);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
|
|
|
|
expert_add_info_format (pinfo, en, PI_SEQUENCE, PI_NOTE,
|
2008-08-15 07:59:11 +00:00
|
|
|
"Retransmission #%d",
|
|
|
|
pkg_data->msg_resend_count);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->prev_msg_time);
|
2007-12-19 11:25:47 +00:00
|
|
|
en = proto_tree_add_time (analysis_tree, hf_analysis_retrans_time,
|
2008-08-15 07:59:11 +00:00
|
|
|
tvb, 0, 0, &ns);
|
2007-12-19 10:05:42 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 11:25:47 +00:00
|
|
|
nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->first_msg_time);
|
|
|
|
eh = proto_tree_add_time (analysis_tree, hf_analysis_total_retrans_time,
|
|
|
|
tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED (eh);
|
|
|
|
|
|
|
|
if (pkg_data->first_msg_time.secs == pkg_data->prev_msg_time.secs &&
|
2008-08-15 07:59:11 +00:00
|
|
|
pkg_data->first_msg_time.nsecs == pkg_data->prev_msg_time.nsecs) {
|
|
|
|
/* Time values does not differ, hide the total time */
|
|
|
|
PROTO_ITEM_SET_HIDDEN (eh);
|
2007-12-19 11:25:47 +00:00
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
item_added = TRUE;
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2009-07-07 10:07:42 +00:00
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, "[Retrans %d#%d] ",
|
|
|
|
pkg_data->pdu_id, pkg_data->msg_resend_count);
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
}
|
2007-12-19 10:05:42 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
if (!item_added) {
|
|
|
|
PROTO_ITEM_SET_HIDDEN (sa);
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return pkg_data;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-25 00:28:19 +00:00
|
|
|
static void dissect_reassembled_data (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2005-11-09 16:01:35 +00:00
|
|
|
{
|
2012-07-12 17:22:47 +00:00
|
|
|
DISSECTOR_ASSERT(tvb != NULL);
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
switch (decode_option) {
|
2008-10-02 15:47:06 +00:00
|
|
|
case DECODE_BER:
|
|
|
|
dissect_unknown_ber (pinfo, tvb, 0, tree);
|
|
|
|
break;
|
|
|
|
case DECODE_CDT:
|
2005-11-23 07:33:03 +00:00
|
|
|
dissect_cdt (tvb, pinfo, tree);
|
2008-10-02 15:47:06 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
call_dissector (data_handle, tvb, pinfo, tree);
|
|
|
|
break;
|
2005-11-23 07:33:03 +00:00
|
|
|
}
|
2005-11-09 16:01:35 +00:00
|
|
|
}
|
|
|
|
|
2009-02-25 00:28:19 +00:00
|
|
|
static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2005-11-07 19:35:48 +00:00
|
|
|
{
|
2012-07-12 17:22:47 +00:00
|
|
|
proto_tree *p_mul_tree, *field_tree, *checksum_tree;
|
|
|
|
proto_item *ti, *en, *len_en;
|
|
|
|
gboolean save_fragmented;
|
|
|
|
guint32 message_id = 0, ip;
|
|
|
|
guint16 no_dest = 0, count = 0, len, data_len = 0;
|
|
|
|
guint16 checksum1, checksum2;
|
|
|
|
guint16 pdu_length, no_pdus = 0, seq_no = 0;
|
|
|
|
guint8 pdu_type, *value, map = 0, fec_len;
|
|
|
|
gint i, tot_no_missing = 0, no_missing = 0, offset = 0;
|
|
|
|
address src, dst;
|
2009-08-05 19:03:48 +00:00
|
|
|
emem_strbuf_t *message_id_list = NULL;
|
2012-07-12 17:22:47 +00:00
|
|
|
nstime_t ts;
|
2005-11-07 19:35:48 +00:00
|
|
|
|
2009-07-07 10:07:42 +00:00
|
|
|
col_set_str (pinfo->cinfo, COL_PROTOCOL, "P_MUL");
|
|
|
|
col_clear (pinfo->cinfo, COL_INFO);
|
2005-11-07 19:35:48 +00:00
|
|
|
|
|
|
|
/* First fetch PDU Type */
|
|
|
|
pdu_type = tvb_get_guint8 (tvb, offset + 3) & 0x3F;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item (tree, proto_p_mul, tvb, offset, -1, ENC_NA);
|
2005-11-09 16:01:35 +00:00
|
|
|
proto_item_append_text (ti, ", %s", get_type (pdu_type));
|
2005-11-07 19:35:48 +00:00
|
|
|
p_mul_tree = proto_item_add_subtree (ti, ett_p_mul);
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Length of PDU */
|
2005-11-09 16:01:35 +00:00
|
|
|
pdu_length = tvb_get_ntohs (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
len_en = proto_tree_add_item (p_mul_tree, hf_length, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 2;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
switch (pdu_type) {
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Data_PDU:
|
|
|
|
case Ack_PDU:
|
|
|
|
case Address_PDU:
|
|
|
|
case Discard_Message_PDU:
|
2008-03-07 12:22:20 +00:00
|
|
|
case Extra_Address_PDU:
|
|
|
|
case FEC_Address_PDU:
|
|
|
|
case Extra_FEC_Address_PDU:
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Priority */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_priority, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
default:
|
|
|
|
/* Unused */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_unused8, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
|
|
|
offset += 1;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* MAP / PDU_Type */
|
|
|
|
en = proto_tree_add_uint_format (p_mul_tree, hf_pdu_type, tvb, offset, 1,
|
|
|
|
pdu_type, "PDU Type: %s (0x%02x)",
|
|
|
|
get_type (pdu_type), pdu_type);
|
|
|
|
field_tree = proto_item_add_subtree (en, ett_pdu_type);
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (pdu_type == Discard_Message_PDU) {
|
|
|
|
expert_add_info_format (pinfo, en, PI_RESPONSE_CODE, PI_NOTE,
|
|
|
|
"Message discarded");
|
|
|
|
}
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
switch (pdu_type) {
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Address_PDU:
|
|
|
|
case Announce_PDU:
|
2008-03-07 12:22:20 +00:00
|
|
|
case Extra_Address_PDU:
|
|
|
|
case FEC_Address_PDU:
|
|
|
|
case Extra_FEC_Address_PDU:
|
2005-11-07 19:35:48 +00:00
|
|
|
map = tvb_get_guint8 (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (field_tree, hf_map_first, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item (field_tree, hf_map_last, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
if ((map & 0x80) || (map & 0x40)) {
|
2005-11-09 16:01:35 +00:00
|
|
|
proto_item_append_text (en, ", %s / %s",
|
2005-11-07 19:35:48 +00:00
|
|
|
(map & 0x80) ? "Not first" : "First",
|
|
|
|
(map & 0x40) ? "Not last" : "Last");
|
|
|
|
} else {
|
|
|
|
proto_item_append_text (en, ", Only one PDU");
|
|
|
|
}
|
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
default:
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (field_tree, hf_map_unused, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
|
|
|
}
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (field_tree, hf_pdu_type_value, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 1;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
switch (pdu_type) {
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Address_PDU:
|
2008-03-07 12:22:20 +00:00
|
|
|
case Extra_Address_PDU:
|
|
|
|
case FEC_Address_PDU:
|
|
|
|
case Extra_FEC_Address_PDU:
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Total Number of PDUs */
|
|
|
|
no_pdus = tvb_get_ntohs (tvb, offset);
|
2007-12-19 10:05:42 +00:00
|
|
|
seq_no = 0;
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_no_pdus, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-23 07:33:03 +00:00
|
|
|
proto_item_append_text (ti, ", No PDUs: %u", no_pdus);
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Data_PDU:
|
|
|
|
/* Sequence Number of PDUs */
|
|
|
|
seq_no = tvb_get_ntohs (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_seq_no, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-23 07:33:03 +00:00
|
|
|
proto_item_append_text (ti, ", Seq no: %u", seq_no);
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Announce_PDU:
|
|
|
|
/* Count of Destination Entries */
|
|
|
|
count = tvb_get_ntohs (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_count_of_dest, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
default:
|
|
|
|
/* Unused */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_unused16, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
offset += 2;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Checksum */
|
2011-07-19 10:51:12 +00:00
|
|
|
en = proto_tree_add_item (p_mul_tree, hf_checksum, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2007-11-25 21:30:57 +00:00
|
|
|
checksum_tree = proto_item_add_subtree (en, ett_checksum);
|
2005-11-07 19:35:48 +00:00
|
|
|
len = tvb_length (tvb);
|
2007-08-15 22:27:52 +00:00
|
|
|
value = tvb_get_ephemeral_string (tvb, 0, len);
|
2005-11-07 19:35:48 +00:00
|
|
|
checksum1 = checksum (value, len, offset);
|
|
|
|
checksum2 = tvb_get_ntohs (tvb, offset);
|
2005-11-09 16:01:35 +00:00
|
|
|
if (checksum1 == checksum2) {
|
2005-11-07 19:35:48 +00:00
|
|
|
proto_item_append_text (en, " (correct)");
|
2007-11-25 21:30:57 +00:00
|
|
|
en = proto_tree_add_boolean (checksum_tree, hf_checksum_good, tvb,
|
|
|
|
offset, 2, TRUE);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
en = proto_tree_add_boolean (checksum_tree, hf_checksum_bad, tvb,
|
|
|
|
offset, 2, FALSE);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2005-11-07 19:35:48 +00:00
|
|
|
} else {
|
|
|
|
proto_item_append_text (en, " (incorrect, should be 0x%04x)", checksum1);
|
2007-02-08 17:15:45 +00:00
|
|
|
expert_add_info_format (pinfo, en, PI_CHECKSUM, PI_WARN, "Bad checksum");
|
2007-11-25 21:30:57 +00:00
|
|
|
en = proto_tree_add_boolean (checksum_tree, hf_checksum_good, tvb,
|
|
|
|
offset, 2, FALSE);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
en = proto_tree_add_boolean (checksum_tree, hf_checksum_bad, tvb,
|
|
|
|
offset, 2, TRUE);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
|
|
|
offset += 2;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
if (pdu_type == Ack_PDU) {
|
|
|
|
/* Source ID of Ack Sender */
|
2008-10-03 14:58:53 +00:00
|
|
|
ip = tvb_get_ipv4 (tvb, offset);
|
|
|
|
SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_source_id_ack, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Count of Ack Info Entries */
|
|
|
|
count = tvb_get_ntohs (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_ack_count, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 2;
|
|
|
|
} else {
|
|
|
|
/* Source Id */
|
2008-10-03 14:58:53 +00:00
|
|
|
ip = tvb_get_ipv4 (tvb, offset);
|
|
|
|
SET_ADDRESS (&src, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_source_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Message Id */
|
|
|
|
message_id = tvb_get_ntohl (tvb, offset);
|
2007-10-06 11:28:09 +00:00
|
|
|
if (use_relative_msgid) {
|
|
|
|
if (message_id_offset == 0) {
|
2008-08-15 07:59:11 +00:00
|
|
|
/* First P_Mul package - initialize message_id_offset */
|
|
|
|
message_id_offset = message_id;
|
2007-10-06 11:28:09 +00:00
|
|
|
}
|
|
|
|
message_id -= message_id_offset;
|
|
|
|
proto_tree_add_uint_format (p_mul_tree, hf_message_id, tvb, offset, 4,
|
2008-08-15 07:59:11 +00:00
|
|
|
message_id, "Message ID (MSID): %u"
|
|
|
|
" (relative message id)", message_id);
|
2007-10-06 11:28:09 +00:00
|
|
|
} else {
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_message_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2007-10-06 11:28:09 +00:00
|
|
|
}
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
2007-08-15 22:27:52 +00:00
|
|
|
|
2005-11-23 07:33:03 +00:00
|
|
|
proto_item_append_text (ti, ", MSID: %u", message_id);
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2008-03-07 12:22:20 +00:00
|
|
|
if (pdu_type == Address_PDU || pdu_type == Announce_PDU ||
|
|
|
|
pdu_type == Extra_Address_PDU || pdu_type == FEC_Address_PDU ||
|
|
|
|
pdu_type == Extra_FEC_Address_PDU) {
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Expiry Time */
|
|
|
|
ts.secs = tvb_get_ntohl (tvb, offset);
|
|
|
|
ts.nsecs = 0;
|
|
|
|
proto_tree_add_time (p_mul_tree, hf_expiry_time, tvb, offset, 4, &ts);
|
|
|
|
offset += 4;
|
|
|
|
}
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2008-03-07 12:22:20 +00:00
|
|
|
if (pdu_type == FEC_Address_PDU || pdu_type == Extra_FEC_Address_PDU) {
|
|
|
|
/* FEC Parameters Length */
|
|
|
|
fec_len = tvb_get_guint8 (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_fec_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2008-03-07 12:22:20 +00:00
|
|
|
offset += 1;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-03-07 12:22:20 +00:00
|
|
|
/* FEC ID */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_fec_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2008-03-07 12:22:20 +00:00
|
|
|
offset += 1;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-03-07 12:22:20 +00:00
|
|
|
if (fec_len > 0) {
|
|
|
|
/* FEC Parameters */
|
|
|
|
proto_tree_add_none_format (p_mul_tree, hf_fec_parameters, tvb, offset,
|
|
|
|
fec_len, "FEC Parameters (%d byte%s)",
|
|
|
|
fec_len, plurality (fec_len, "", "s"));
|
|
|
|
offset += fec_len;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
switch (pdu_type) {
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Address_PDU:
|
2008-03-07 12:22:20 +00:00
|
|
|
case Extra_Address_PDU:
|
|
|
|
case FEC_Address_PDU:
|
|
|
|
case Extra_FEC_Address_PDU:
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Count of Destination Entries */
|
|
|
|
no_dest = tvb_get_ntohs (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_count_of_dest, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 2;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Length of Reserved Field */
|
|
|
|
len = tvb_get_ntohs (tvb, offset);
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_length_of_res, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 2;
|
|
|
|
|
|
|
|
for (i = 0; i < no_dest; i++) {
|
|
|
|
/* Destination Entry */
|
2005-11-09 16:01:35 +00:00
|
|
|
en = proto_tree_add_none_format (p_mul_tree, hf_dest_entry, tvb,
|
2008-08-22 15:15:56 +00:00
|
|
|
offset, 8 + len,
|
2005-11-07 19:35:48 +00:00
|
|
|
"Destination Entry #%d", i + 1);
|
2008-08-15 07:59:11 +00:00
|
|
|
field_tree = proto_item_add_subtree (en, ett_dest_entry);
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Destination Id */
|
2008-10-03 14:58:53 +00:00
|
|
|
ip = tvb_get_ipv4 (tvb, offset);
|
|
|
|
SET_ADDRESS (&dst, AT_IPv4, sizeof(ip), ep_memdup(&ip, 4));
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (field_tree, hf_dest_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Message Sequence Number */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (field_tree, hf_msg_seq_no, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
if (len > 0) {
|
|
|
|
/* Reserved Field (variable length) */
|
|
|
|
proto_tree_add_none_format (field_tree, hf_sym_key, tvb, offset,
|
|
|
|
len, "Symmetric Key (%d byte%s)",
|
|
|
|
len, plurality (len, "", "s"));
|
|
|
|
offset += len;
|
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
|
|
|
|
if (use_seq_ack_analysis) {
|
|
|
|
add_ack_analysis (tvb, pinfo, field_tree, offset, pdu_type, &src, &dst,
|
|
|
|
message_id, 0);
|
|
|
|
}
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
2008-10-13 14:59:28 +00:00
|
|
|
if (no_dest == 0 && use_seq_ack_analysis) {
|
|
|
|
/* Add Ack-Ack analysis */
|
|
|
|
add_ack_analysis (tvb, pinfo, p_mul_tree, offset, pdu_type, &src, NULL,
|
|
|
|
message_id, 0);
|
|
|
|
}
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-23 07:33:03 +00:00
|
|
|
proto_item_append_text (ti, ", Count of Dest: %u", no_dest);
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Data_PDU:
|
|
|
|
/* Fragment of Data (variable length) */
|
2005-11-09 16:01:35 +00:00
|
|
|
data_len = tvb_length_remaining (tvb, offset);
|
2005-12-02 22:01:00 +00:00
|
|
|
proto_tree_add_none_format (p_mul_tree, hf_data_fragment, tvb, offset,
|
2005-11-09 16:01:35 +00:00
|
|
|
data_len, "Fragment %d of Data (%d byte%s)",
|
|
|
|
seq_no, data_len,
|
|
|
|
plurality (data_len, "", "s"));
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Ack_PDU:
|
2013-06-14 01:56:28 +00:00
|
|
|
message_id_list = ep_strbuf_new_label("");
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
for (i = 0; i < count; i++) {
|
|
|
|
/* Ack Info Entry */
|
|
|
|
len = tvb_get_ntohs (tvb, offset);
|
|
|
|
|
2005-11-09 16:01:35 +00:00
|
|
|
en = proto_tree_add_none_format (p_mul_tree, hf_ack_entry, tvb,
|
2008-08-22 15:15:56 +00:00
|
|
|
offset, len,
|
2005-11-07 19:35:48 +00:00
|
|
|
"Ack Info Entry #%d", i + 1);
|
2008-08-15 07:59:11 +00:00
|
|
|
field_tree = proto_item_add_subtree (en, ett_ack_entry);
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Length of Ack Info Entry */
|
2011-07-19 10:51:12 +00:00
|
|
|
en = proto_tree_add_item (field_tree, hf_ack_length, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 2;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-10-06 11:28:09 +00:00
|
|
|
if (len < 10) {
|
2008-08-15 07:59:11 +00:00
|
|
|
proto_item_append_text (en, " (invalid length)");
|
|
|
|
expert_add_info_format (pinfo, en, PI_MALFORMED, PI_WARN,
|
|
|
|
"Invalid ack info length");
|
2007-10-06 11:28:09 +00:00
|
|
|
}
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Source Id */
|
2008-10-03 14:58:53 +00:00
|
|
|
ip = tvb_get_ipv4 (tvb, offset);
|
|
|
|
SET_ADDRESS (&src, AT_IPv4, sizeof(ip), ep_memdup (&ip, 4));
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (field_tree, hf_source_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Message Id */
|
2007-10-06 11:28:09 +00:00
|
|
|
message_id = tvb_get_ntohl (tvb, offset);
|
|
|
|
if (use_relative_msgid) {
|
2008-08-15 07:59:11 +00:00
|
|
|
if (message_id_offset == 0) {
|
|
|
|
/* First P_Mul package - initialize message_id_offset */
|
|
|
|
message_id_offset = message_id;
|
|
|
|
}
|
|
|
|
message_id -= message_id_offset;
|
|
|
|
proto_tree_add_uint_format (field_tree, hf_message_id, tvb, offset, 4,
|
|
|
|
message_id, "Message ID (MSID): %u"
|
|
|
|
" (relative message id)", message_id);
|
2007-10-06 11:28:09 +00:00
|
|
|
} else {
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (field_tree, hf_message_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
2007-10-06 11:28:09 +00:00
|
|
|
offset += 4;
|
2005-11-23 07:33:03 +00:00
|
|
|
|
2013-06-14 01:56:28 +00:00
|
|
|
if (i == 0) {
|
|
|
|
ep_strbuf_printf (message_id_list, "%u", message_id);
|
|
|
|
} else {
|
|
|
|
ep_strbuf_append_printf (message_id_list, ",%u", message_id);
|
2008-08-22 15:15:56 +00:00
|
|
|
}
|
|
|
|
|
2007-10-06 11:28:09 +00:00
|
|
|
if (len > 10) {
|
2008-08-15 07:59:11 +00:00
|
|
|
gint num_seq_no = (len - 10) / 2;
|
2008-10-03 14:58:53 +00:00
|
|
|
guint16 ack_seq_no, prev_ack_seq_no = 0;
|
2008-08-15 07:59:11 +00:00
|
|
|
for (no_missing = 0; no_missing < num_seq_no; no_missing++) {
|
|
|
|
/* Missing Data PDU Seq Number */
|
2008-10-03 14:58:53 +00:00
|
|
|
ack_seq_no = tvb_get_ntohs (tvb, offset);
|
|
|
|
if ((ack_seq_no != 0) && (no_missing < num_seq_no - 2) && tvb_get_ntohs (tvb, offset + 2) == 0) {
|
2008-08-15 07:59:11 +00:00
|
|
|
/* We are handling a range */
|
|
|
|
guint16 end_seq_no = tvb_get_ntohs (tvb, offset + 4);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-08-15 07:59:11 +00:00
|
|
|
en = proto_tree_add_bytes_format (field_tree, hf_miss_seq_range,
|
Modify proto_tree_add_bytes_format() and proto_tree_add_bytes_format_value()
so that if the start_ptr is NULL the bytes are extracted from the given TVB
using the given offset and length.
Replace a bunch of:
proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), [...])
with:
proto_tree_add_bytes_format*(tree, hf, tvb, offset, length, NULL, [...])
svn path=/trunk/; revision=35896
2011-02-10 16:31:00 +00:00
|
|
|
tvb, offset, 6, NULL,
|
2008-08-15 07:59:11 +00:00
|
|
|
"Missing Data PDU Seq Range: %d - %d",
|
2008-10-03 14:58:53 +00:00
|
|
|
ack_seq_no, end_seq_no);
|
|
|
|
if (ack_seq_no >= end_seq_no) {
|
2008-08-15 07:59:11 +00:00
|
|
|
proto_item_append_text (en, " (invalid)");
|
|
|
|
expert_add_info_format (pinfo, en, PI_UNDECODED, PI_WARN,
|
|
|
|
"Invalid missing sequence range");
|
|
|
|
} else {
|
|
|
|
proto_tree *missing_tree;
|
|
|
|
guint16 sno;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-08-15 07:59:11 +00:00
|
|
|
missing_tree = proto_item_add_subtree (en, ett_range_entry);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
for (sno = ack_seq_no; sno <= end_seq_no; sno++) {
|
2008-08-15 07:59:11 +00:00
|
|
|
en = proto_tree_add_uint_format (missing_tree, hf_miss_seq_no,
|
|
|
|
tvb, offset, 6, sno,
|
|
|
|
"Missing Data PDU Seq Number: %d", sno);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
tot_no_missing += (end_seq_no - ack_seq_no + 1);
|
2008-08-15 07:59:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
offset += 6;
|
|
|
|
no_missing += 2; /* Skip the next two */
|
2008-10-03 14:58:53 +00:00
|
|
|
prev_ack_seq_no = end_seq_no;
|
2008-08-15 07:59:11 +00:00
|
|
|
} else {
|
|
|
|
/* No range, handle one seq no */
|
2011-07-19 10:51:12 +00:00
|
|
|
en = proto_tree_add_item (field_tree, hf_miss_seq_no, tvb,offset, 2, ENC_BIG_ENDIAN);
|
2008-08-15 07:59:11 +00:00
|
|
|
offset += 2;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
if (ack_seq_no == 0) {
|
2008-08-15 07:59:11 +00:00
|
|
|
proto_item_append_text (en, " (invalid)");
|
|
|
|
expert_add_info_format (pinfo, en, PI_UNDECODED, PI_WARN,
|
|
|
|
"Invalid missing seq number");
|
2008-10-03 14:58:53 +00:00
|
|
|
} else if (ack_seq_no <= prev_ack_seq_no) {
|
|
|
|
proto_item_append_text (en, " (end of list indicator)");
|
|
|
|
} else {
|
|
|
|
tot_no_missing++;
|
2008-08-15 07:59:11 +00:00
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
prev_ack_seq_no = ack_seq_no;
|
2008-08-15 07:59:11 +00:00
|
|
|
}
|
|
|
|
}
|
2005-11-23 07:33:03 +00:00
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
|
|
|
|
if (use_seq_ack_analysis) {
|
|
|
|
add_ack_analysis (tvb, pinfo, field_tree, offset, pdu_type, &src, &dst,
|
|
|
|
message_id, no_missing);
|
|
|
|
}
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
2008-10-03 14:58:53 +00:00
|
|
|
proto_item_append_text (ti, ", Count of Ack: %u", count);
|
2008-03-07 12:22:20 +00:00
|
|
|
|
|
|
|
if (tvb_length_remaining (tvb, offset) >= 8) {
|
2008-10-03 14:58:53 +00:00
|
|
|
/* Timestamp Option (in units of 100ms) */
|
|
|
|
guint64 timestamp;
|
|
|
|
|
|
|
|
timestamp = tvb_get_ntoh64 (tvb, offset);
|
|
|
|
proto_tree_add_uint64_format (p_mul_tree, hf_timestamp_option, tvb,
|
|
|
|
offset, 8, timestamp,
|
|
|
|
"Timestamp: %" G_GINT64_MODIFIER "d.%d second%s (%" G_GINT64_MODIFIER "u)",
|
|
|
|
timestamp / 10, (int) timestamp % 10,
|
|
|
|
(timestamp == 10) ? "" : "s", timestamp);
|
2008-03-07 12:22:20 +00:00
|
|
|
offset += 8;
|
|
|
|
}
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-10-06 11:28:09 +00:00
|
|
|
if (tot_no_missing) {
|
|
|
|
proto_item_append_text (ti, ", Missing seq numbers: %u", tot_no_missing);
|
|
|
|
en = proto_tree_add_uint (p_mul_tree, hf_tot_miss_seq_no, tvb, 0, 0,
|
|
|
|
tot_no_missing);
|
|
|
|
PROTO_ITEM_SET_GENERATED (en);
|
|
|
|
expert_add_info_format (pinfo, en, PI_RESPONSE_CODE, PI_NOTE,
|
|
|
|
"Missing seq numbers: %d", tot_no_missing);
|
|
|
|
}
|
2007-12-19 10:05:42 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Discard_Message_PDU:
|
2008-08-15 07:59:11 +00:00
|
|
|
seq_no = G_MAXUINT16; /* To make the seq_no uniq */
|
2005-11-07 19:35:48 +00:00
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Announce_PDU:
|
|
|
|
/* Announced Multicast Group */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_ann_mc_group, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
|
|
|
|
|
|
|
for (i = 0; i < count; i++) {
|
|
|
|
/* Destination Id */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_dest_id, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
|
|
|
}
|
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
case Request_PDU:
|
|
|
|
case Reject_PDU:
|
|
|
|
case Release_PDU:
|
|
|
|
/* Multicast Group */
|
2011-07-19 10:51:12 +00:00
|
|
|
proto_tree_add_item (p_mul_tree, hf_mc_group, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2005-11-07 19:35:48 +00:00
|
|
|
offset += 4;
|
|
|
|
break;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
default:
|
|
|
|
/* Nothing */
|
|
|
|
break;
|
|
|
|
}
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
/* Add SEQ/ACK analysis entry */
|
|
|
|
if (use_seq_ack_analysis && (pdu_type <= Discard_Message_PDU) &&
|
2011-01-22 15:35:34 +00:00
|
|
|
(pdu_type != Ack_PDU) && (pdu_type != Address_PDU || no_dest != 0))
|
2007-12-19 10:05:42 +00:00
|
|
|
{
|
2011-01-22 15:35:34 +00:00
|
|
|
add_seq_analysis (tvb, pinfo, p_mul_tree, &src, offset, pdu_type,
|
2008-10-03 14:58:53 +00:00
|
|
|
message_id, seq_no, tot_no_missing);
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2013-06-14 01:56:28 +00:00
|
|
|
/* Check if printing Ack-Ack */
|
|
|
|
if (pdu_type == Address_PDU && no_dest == 0) {
|
|
|
|
col_append_str (pinfo->cinfo, COL_INFO, get_type (Ack_Ack_PDU));
|
|
|
|
} else {
|
|
|
|
col_append_str (pinfo->cinfo, COL_INFO, get_type (pdu_type));
|
|
|
|
}
|
|
|
|
if (pdu_type == Address_PDU || pdu_type == Extra_Address_PDU ||
|
|
|
|
pdu_type == FEC_Address_PDU || pdu_type == Extra_FEC_Address_PDU) {
|
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, ", No PDUs: %u", no_pdus);
|
|
|
|
} else if (pdu_type == Data_PDU) {
|
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, ", Seq no: %u", seq_no);
|
|
|
|
}
|
|
|
|
if (pdu_type == Address_PDU || pdu_type == Extra_Address_PDU ||
|
|
|
|
pdu_type == FEC_Address_PDU || pdu_type == Extra_FEC_Address_PDU) {
|
|
|
|
if (no_dest > 0) {
|
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, ", Count of Dest: %u", no_dest);
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
2013-06-14 01:56:28 +00:00
|
|
|
} else if (pdu_type == Ack_PDU) {
|
|
|
|
if (tot_no_missing) {
|
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, ", Missing seq numbers: %u",
|
|
|
|
tot_no_missing);
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
2013-06-14 01:56:28 +00:00
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, ", Count of Ack: %u", count);
|
|
|
|
}
|
|
|
|
if (pdu_type != Ack_PDU) {
|
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, ", MSID: %u", message_id);
|
|
|
|
} else {
|
|
|
|
if (message_id_list && message_id_list->len > 0) {
|
|
|
|
col_append_fstr (pinfo->cinfo, COL_INFO, ", MSID: %s", message_id_list->str);
|
2008-08-15 07:59:11 +00:00
|
|
|
}
|
2007-12-19 10:05:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (p_mul_reassemble) {
|
|
|
|
save_fragmented = pinfo->fragmented;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (pdu_type == Address_PDU && no_pdus > 0) {
|
|
|
|
/* Start fragment table */
|
2013-03-22 23:59:54 +00:00
|
|
|
fragment_start_seq_check (&p_mul_reassembly_table,
|
|
|
|
pinfo, message_id, NULL, no_pdus - 1);
|
2007-12-19 10:05:42 +00:00
|
|
|
} else if (pdu_type == Data_PDU) {
|
2012-07-12 17:22:47 +00:00
|
|
|
fragment_data *frag_msg;
|
|
|
|
tvbuff_t *new_tvb;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
pinfo->fragmented = TRUE;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
/* Add fragment to fragment table */
|
2013-03-22 23:59:54 +00:00
|
|
|
frag_msg = fragment_add_seq_check (&p_mul_reassembly_table,
|
|
|
|
tvb, offset, pinfo, message_id, NULL,
|
|
|
|
seq_no - 1, data_len, TRUE);
|
2007-12-19 10:05:42 +00:00
|
|
|
new_tvb = process_reassembled_data (tvb, offset, pinfo,
|
2010-02-06 18:20:21 +00:00
|
|
|
"Reassembled P_MUL", frag_msg,
|
2007-12-19 10:05:42 +00:00
|
|
|
&p_mul_frag_items, NULL, tree);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2009-07-07 10:07:42 +00:00
|
|
|
if (frag_msg)
|
2007-12-19 10:05:42 +00:00
|
|
|
col_append_str (pinfo->cinfo, COL_INFO, " (Message Reassembled)");
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (new_tvb) {
|
|
|
|
dissect_reassembled_data (new_tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pinfo->fragmented = save_fragmented;
|
|
|
|
}
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2005-11-09 16:01:35 +00:00
|
|
|
/* Update length of P_Mul packet and check length values */
|
|
|
|
proto_item_set_len (ti, offset);
|
|
|
|
if (pdu_length != (offset + data_len)) {
|
|
|
|
proto_item_append_text (len_en, " (incorrect, should be: %d)",
|
|
|
|
offset + data_len);
|
2011-01-22 15:35:34 +00:00
|
|
|
expert_add_info_format (pinfo, len_en, PI_MALFORMED, PI_WARN,
|
2007-08-24 23:27:33 +00:00
|
|
|
"Incorrect length field");
|
2005-11-09 16:01:35 +00:00
|
|
|
} else if ((len = tvb_length_remaining (tvb, pdu_length)) > 0) {
|
|
|
|
proto_item_append_text (len_en, " (more data in packet: %d)", len);
|
2011-01-22 15:35:34 +00:00
|
|
|
expert_add_info_format (pinfo, len_en, PI_MALFORMED, PI_WARN,
|
2007-08-24 23:27:33 +00:00
|
|
|
"More data in packet");
|
2005-11-09 16:01:35 +00:00
|
|
|
}
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
static void p_mul_init_routine (void)
|
2005-11-09 16:01:35 +00:00
|
|
|
{
|
2013-03-22 23:59:54 +00:00
|
|
|
reassembly_table_init (&p_mul_reassembly_table,
|
|
|
|
&addresses_reassembly_table_functions);
|
2007-10-06 11:28:09 +00:00
|
|
|
message_id_offset = 0;
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-12-19 10:05:42 +00:00
|
|
|
if (p_mul_id_hash_table) {
|
|
|
|
g_hash_table_destroy (p_mul_id_hash_table);
|
|
|
|
}
|
|
|
|
|
2008-10-03 14:58:53 +00:00
|
|
|
if (p_mul_package_data_list) {
|
|
|
|
g_list_foreach (p_mul_package_data_list, (GFunc)p_mul_package_data_destroy, NULL);
|
|
|
|
g_list_free (p_mul_package_data_list);
|
|
|
|
}
|
|
|
|
|
|
|
|
p_mul_id_hash_table = g_hash_table_new_full (p_mul_id_hash, p_mul_id_hash_equal, NULL, (GDestroyNotify)p_mul_id_value_destroy);
|
|
|
|
p_mul_package_data_list = NULL;
|
2005-11-09 16:01:35 +00:00
|
|
|
}
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
void proto_register_p_mul (void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_length,
|
2005-11-09 16:01:35 +00:00
|
|
|
{ "Length of PDU", "p_mul.length", FT_UINT16, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_priority,
|
|
|
|
{ "Priority", "p_mul.priority", FT_UINT8, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_map_first,
|
|
|
|
{ "First", "p_mul.first", FT_BOOLEAN, 8,
|
2011-01-22 18:07:28 +00:00
|
|
|
TFS (&no_yes), 0x80, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_map_last,
|
|
|
|
{ "Last", "p_mul.last", FT_BOOLEAN, 8,
|
2011-01-22 18:07:28 +00:00
|
|
|
TFS (&no_yes), 0x40, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_map_unused,
|
|
|
|
{ "MAP unused", "p_mul.unused", FT_UINT8, BASE_DEC,
|
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, 0xC0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_pdu_type,
|
|
|
|
{ "PDU Type", "p_mul.pdu_type", FT_UINT8, BASE_DEC,
|
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
|
|
|
VALS (pdu_vals), 0x3F, NULL, HFILL } },
|
2010-10-05 20:46:34 +00:00
|
|
|
{ &hf_pdu_type_value,
|
|
|
|
{ "PDU Type", "p_mul.pdu_type_value", FT_UINT8, BASE_DEC,
|
|
|
|
VALS (pdu_vals), 0x3F, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_no_pdus,
|
|
|
|
{ "Total Number of PDUs", "p_mul.no_pdus", FT_UINT16, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_seq_no,
|
|
|
|
{ "Sequence Number of PDUs", "p_mul.seq_no", FT_UINT16, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_unused8,
|
|
|
|
{ "Unused", "p_mul.unused", FT_UINT8, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_unused16,
|
|
|
|
{ "Unused", "p_mul.unused", FT_UINT16, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_checksum,
|
2005-11-07 19:35:48 +00:00
|
|
|
{ "Checksum", "p_mul.checksum", FT_UINT16, BASE_HEX,
|
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, 0x0, NULL, HFILL } },
|
2007-11-25 21:30:57 +00:00
|
|
|
{ &hf_checksum_good,
|
2008-01-16 19:16:30 +00:00
|
|
|
{ "Good", "p_mul.checksum_good", FT_BOOLEAN, BASE_NONE,
|
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, 0x0, "True: checksum matches packet content; False: doesn't match content or not checked", HFILL } },
|
2007-11-25 21:30:57 +00:00
|
|
|
{ &hf_checksum_bad,
|
2008-01-16 19:16:30 +00:00
|
|
|
{ "Bad", "p_mul.checksum_bad", FT_BOOLEAN, BASE_NONE,
|
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, 0x0, "True: checksum doesn't match packet content; False: matches content or not checked", HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_source_id_ack,
|
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
|
|
|
{ "Source ID of Ack Sender", "p_mul.source_id_ack", FT_IPv4, BASE_NONE,
|
|
|
|
NULL, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_source_id,
|
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
|
|
|
{ "Source ID", "p_mul.source_id", FT_IPv4, BASE_NONE,
|
|
|
|
NULL, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_message_id,
|
|
|
|
{ "Message ID (MSID)", "p_mul.message_id", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0x0, "Message ID", HFILL } },
|
|
|
|
{ &hf_expiry_time,
|
2009-12-19 03:17:44 +00:00
|
|
|
{ "Expiry Time", "p_mul.expiry_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_mc_group,
|
|
|
|
{ "Multicast Group", "p_mul.mc_group", FT_UINT32, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_ann_mc_group,
|
|
|
|
{ "Announced Multicast Group", "p_mul.ann_mc_group", FT_UINT32, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2008-03-07 12:22:20 +00:00
|
|
|
{ &hf_fec_len,
|
|
|
|
{ "FEC Parameter Length", "p_mul.fec.length", FT_UINT8, BASE_DEC,
|
|
|
|
NULL, 0x0, "Forward Error Correction Parameter Length", HFILL } },
|
|
|
|
{ &hf_fec_id,
|
|
|
|
{ "FEC ID", "p_mul.fec.id", FT_UINT8, BASE_HEX,
|
|
|
|
NULL, 0x0, "Forward Error Correction ID", HFILL } },
|
|
|
|
{ &hf_fec_parameters,
|
|
|
|
{ "FEC Parameters", "p_mul.fec.parameters", FT_NONE, BASE_NONE,
|
|
|
|
NULL, 0x0, "Forward Error Correction Parameters", HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_count_of_dest,
|
|
|
|
{ "Count of Destination Entries", "p_mul.dest_count", FT_UINT16,BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_length_of_res,
|
|
|
|
{ "Length of Reserved Field", "p_mul.reserved_length",FT_UINT16,BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_ack_count,
|
|
|
|
{ "Count of Ack Info Entries", "p_mul.ack_count", FT_UINT16, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_ack_entry,
|
|
|
|
{ "Ack Info Entry", "p_mul.ack_info_entry", FT_NONE, BASE_NONE,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_ack_length,
|
|
|
|
{ "Length of Ack Info Entry", "p_mul.ack_length", FT_UINT16, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_miss_seq_no,
|
2005-11-09 16:01:35 +00:00
|
|
|
{ "Missing Data PDU Seq Number", "p_mul.missing_seq_no", FT_UINT16,
|
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
|
|
|
BASE_DEC, NULL, 0x0, NULL, HFILL } },
|
2008-08-15 07:59:11 +00:00
|
|
|
{ &hf_miss_seq_range,
|
|
|
|
{ "Missing Data PDU Seq Range", "p_mul.missing_seq_range", FT_BYTES,
|
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
|
|
|
BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
2007-10-06 11:28:09 +00:00
|
|
|
{ &hf_tot_miss_seq_no,
|
2011-01-22 15:35:34 +00:00
|
|
|
{ "Total Number of Missing Data PDU Sequence Numbers",
|
|
|
|
"p_mul.no_missing_seq_no", 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 } },
|
2008-03-07 12:22:20 +00:00
|
|
|
{ &hf_timestamp_option,
|
|
|
|
{ "Timestamp Option", "p_mul.timestamp", FT_UINT64, BASE_DEC,
|
|
|
|
NULL, 0x0, "Timestamp Option (in units of 100ms)", HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_dest_entry,
|
|
|
|
{ "Destination Entry", "p_mul.dest_entry", FT_NONE, BASE_NONE,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_dest_id,
|
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
|
|
|
{ "Destination ID", "p_mul.dest_id", FT_IPv4, BASE_NONE,
|
|
|
|
NULL, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_msg_seq_no,
|
|
|
|
{ "Message Sequence Number", "p_mul.msg_seq_no", FT_UINT16, BASE_DEC,
|
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, 0x0, NULL, HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
{ &hf_sym_key,
|
|
|
|
{ "Symmetric Key", "p_mul.sym_key", FT_NONE, BASE_NONE,
|
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, 0x0, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_data_fragment,
|
|
|
|
{ "Fragment of Data", "p_mul.data_fragment", FT_NONE, BASE_NONE,
|
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, 0x0, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-23 07:33:03 +00:00
|
|
|
/* Fragment entries */
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_fragments,
|
|
|
|
{ "Message fragments", "p_mul.fragments", FT_NONE, BASE_NONE,
|
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, 0x00, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_fragment,
|
|
|
|
{ "Message fragment", "p_mul.fragment", FT_FRAMENUM, BASE_NONE,
|
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, 0x00, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_fragment_overlap,
|
|
|
|
{ "Message fragment overlap", "p_mul.fragment.overlap", FT_BOOLEAN,
|
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
|
|
|
BASE_NONE, NULL, 0x0, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_fragment_overlap_conflicts,
|
|
|
|
{ "Message fragment overlapping with conflicting data",
|
2005-11-23 07:33:03 +00:00
|
|
|
"p_mul.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL,
|
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
|
|
|
0x0, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_fragment_multiple_tails,
|
|
|
|
{ "Message has multiple tail fragments",
|
|
|
|
"p_mul.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE,
|
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, 0x0, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_fragment_too_long_fragment,
|
|
|
|
{ "Message fragment too long", "p_mul.fragment.too_long_fragment",
|
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
|
|
|
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL,
|
2005-11-23 07:33:03 +00:00
|
|
|
HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_fragment_error,
|
2005-11-23 07:33:03 +00:00
|
|
|
{ "Message defragmentation error", "p_mul.fragment.error", FT_FRAMENUM,
|
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
|
|
|
BASE_NONE, NULL, 0x00, NULL, HFILL } },
|
2011-01-30 21:01:07 +00:00
|
|
|
{ &hf_msg_fragment_count,
|
|
|
|
{ "Message fragment count", "p_mul.fragment.count", FT_UINT32, BASE_DEC,
|
|
|
|
NULL, 0x00, NULL, HFILL } },
|
2005-11-09 16:01:35 +00:00
|
|
|
{ &hf_msg_reassembled_in,
|
|
|
|
{ "Reassembled in", "p_mul.reassembled.in", FT_FRAMENUM, BASE_NONE,
|
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, 0x00, NULL, HFILL } },
|
2010-02-02 16:01:52 +00:00
|
|
|
{ &hf_msg_reassembled_length,
|
2010-02-06 18:20:21 +00:00
|
|
|
{ "Reassembled P_MUL length", "p_mul.reassembled.length", FT_UINT32, BASE_DEC,
|
2010-02-02 16:01:52 +00:00
|
|
|
NULL, 0x00, NULL, HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
** Ack matching / Resend
|
|
|
|
*/
|
|
|
|
{ &hf_analysis_ack_time,
|
|
|
|
{ "Ack Time", "p_mul.analysis.ack_time", FT_RELATIVE_TIME, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The time between the Last PDU and the Ack", HFILL } },
|
2008-10-13 14:59:28 +00:00
|
|
|
{ &hf_analysis_trans_time,
|
|
|
|
{ "Transfer Time", "p_mul.analysis.trans_time", FT_RELATIVE_TIME, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The time between the first Address PDU and the Ack", HFILL } },
|
2007-12-19 11:25:47 +00:00
|
|
|
{ &hf_analysis_retrans_time,
|
2007-12-19 10:05:42 +00:00
|
|
|
{ "Retransmission Time", "p_mul.analysis.retrans_time", FT_RELATIVE_TIME, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The time between the last PDU and this PDU", HFILL } },
|
2007-12-19 11:25:47 +00:00
|
|
|
{ &hf_analysis_total_retrans_time,
|
|
|
|
{ "Total Retransmission Time", "p_mul.analysis.total_retrans_time", FT_RELATIVE_TIME, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The time between the first PDU and this PDU", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_addr_pdu_time,
|
|
|
|
{ "Time since Address PDU", "p_mul.analysis.elapsed_time", FT_RELATIVE_TIME, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The time between the Address PDU and this PDU", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_prev_pdu_time,
|
|
|
|
{ "PDU Delay", "p_mul.analysis.pdu_delay", FT_RELATIVE_TIME, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The time between the last PDU and this PDU", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_last_pdu_num,
|
|
|
|
{ "Last Data PDU in", "p_mul.analysis.last_pdu_in", FT_FRAMENUM, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The last Data PDU found in this frame", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_addr_pdu_num,
|
|
|
|
{ "Address PDU in", "p_mul.analysis.addr_pdu_in", FT_FRAMENUM, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The Address PDU is found in this frame", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_prev_pdu_num,
|
|
|
|
{ "Previous PDU in", "p_mul.analysis.prev_pdu_in", FT_FRAMENUM, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The previous PDU is found in this frame", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_ack_num,
|
|
|
|
{ "Ack PDU in", "p_mul.analysis.ack_in", FT_FRAMENUM, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "This packet has an Ack in this frame", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_addr_pdu_missing,
|
|
|
|
{ "Address PDU missing", "p_mul.analysis.addr_pdu_missing", FT_NONE, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The Address PDU for this packet is missing", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_prev_pdu_missing,
|
|
|
|
{ "Previous PDU missing", "p_mul.analysis.prev_pdu_missing", FT_NONE, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The previous PDU for this packet is missing", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_ack_missing,
|
|
|
|
{ "Ack PDU missing", "p_mul.analysis.ack_missing", FT_NONE, BASE_NONE,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "The acknowledgement for this packet is missing", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_retrans_no,
|
|
|
|
{ "Retransmission #", "p_mul.analysis.retrans_no", FT_UINT32, BASE_DEC,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "Retransmission count", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_ack_dup_no,
|
|
|
|
{ "Duplicate ACK #", "p_mul.analysis.dup_ack_no", FT_UINT32, BASE_DEC,
|
2008-08-15 07:59:11 +00:00
|
|
|
NULL, 0x0, "Duplicate Ack count", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_msg_resend_from,
|
2011-01-22 15:35:34 +00:00
|
|
|
{ "Retransmission of Message in", "p_mul.analysis.msg_first_in",
|
2008-08-15 07:59:11 +00:00
|
|
|
FT_FRAMENUM, BASE_NONE,
|
|
|
|
NULL, 0x0, "This Message was first sent in this frame", HFILL } },
|
2007-12-19 10:05:42 +00:00
|
|
|
{ &hf_analysis_ack_resend_from,
|
2011-01-22 15:35:34 +00:00
|
|
|
{ "Retransmission of Ack in", "p_mul.analysis.ack_first_in",
|
2008-08-15 07:59:11 +00:00
|
|
|
FT_FRAMENUM, BASE_NONE,
|
|
|
|
NULL, 0x0, "This Ack was first sent in this frame", HFILL } },
|
2008-10-13 14:59:28 +00:00
|
|
|
{ &hf_analysis_total_time,
|
|
|
|
{ "Total Time", "p_mul.analysis.total_time", FT_RELATIVE_TIME, BASE_NONE,
|
|
|
|
NULL, 0x0, "The time between the first and the last Address PDU", HFILL } },
|
2005-11-07 19:35:48 +00:00
|
|
|
};
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_p_mul,
|
|
|
|
&ett_pdu_type,
|
2008-08-15 07:59:11 +00:00
|
|
|
&ett_dest_entry,
|
|
|
|
&ett_ack_entry,
|
|
|
|
&ett_range_entry,
|
2007-11-25 21:30:57 +00:00
|
|
|
&ett_checksum,
|
2008-10-03 14:58:53 +00:00
|
|
|
&ett_seq_analysis,
|
|
|
|
&ett_ack_analysis,
|
|
|
|
&ett_seq_ack_analysis,
|
2005-11-09 16:01:35 +00:00
|
|
|
&ett_msg_fragment,
|
|
|
|
&ett_msg_fragments
|
2005-11-07 19:35:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module_t *p_mul_module;
|
2005-11-09 16:01:35 +00:00
|
|
|
|
2005-11-23 07:33:03 +00:00
|
|
|
proto_p_mul = proto_register_protocol (PNAME, PSNAME, PFNAME);
|
2008-04-25 19:25:49 +00:00
|
|
|
register_dissector(PFNAME, dissect_p_mul, proto_p_mul);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
proto_register_field_array (proto_p_mul, hf, array_length (hf));
|
|
|
|
proto_register_subtree_array (ett, array_length (ett));
|
2007-12-19 10:05:42 +00:00
|
|
|
register_init_routine (&p_mul_init_routine);
|
2005-11-07 19:35:48 +00:00
|
|
|
|
2007-11-19 07:26:53 +00:00
|
|
|
/* Set default UDP ports */
|
2011-01-22 15:35:34 +00:00
|
|
|
range_convert_str (&global_p_mul_port_range, DEFAULT_P_MUL_PORT_RANGE,
|
2007-11-19 07:26:53 +00:00
|
|
|
MAX_UDP_PORT);
|
|
|
|
|
2005-11-07 19:35:48 +00:00
|
|
|
/* Register our configuration options */
|
|
|
|
p_mul_module = prefs_register_protocol (proto_p_mul,
|
|
|
|
proto_reg_handoff_p_mul);
|
|
|
|
|
2007-11-19 07:26:53 +00:00
|
|
|
prefs_register_obsolete_preference (p_mul_module, "tport");
|
|
|
|
prefs_register_obsolete_preference (p_mul_module, "rport");
|
|
|
|
prefs_register_obsolete_preference (p_mul_module, "dport");
|
|
|
|
prefs_register_obsolete_preference (p_mul_module, "aport");
|
|
|
|
|
2011-01-22 15:35:34 +00:00
|
|
|
prefs_register_range_preference (p_mul_module, "udp_ports",
|
2007-11-19 07:26:53 +00:00
|
|
|
"P_Mul port numbers",
|
|
|
|
"Port numbers used for P_Mul traffic",
|
|
|
|
&global_p_mul_port_range, MAX_UDP_PORT);
|
2005-11-09 16:01:35 +00:00
|
|
|
prefs_register_bool_preference (p_mul_module, "reassemble",
|
|
|
|
"Reassemble fragmented P_Mul packets",
|
|
|
|
"Reassemble fragmented P_Mul packets",
|
|
|
|
&p_mul_reassemble);
|
2007-10-06 11:28:09 +00:00
|
|
|
prefs_register_bool_preference (p_mul_module, "relative_msgid",
|
|
|
|
"Use relative Message ID",
|
|
|
|
"Make the P_Mul dissector use relative"
|
|
|
|
" message id number instead of absolute"
|
|
|
|
" ones", &use_relative_msgid);
|
2007-12-19 10:05:42 +00:00
|
|
|
prefs_register_bool_preference (p_mul_module, "seq_ack_analysis",
|
|
|
|
"SEQ/ACK Analysis",
|
|
|
|
"Calculate sequence/acknowledgement analysis",
|
|
|
|
&use_seq_ack_analysis);
|
2005-11-23 07:33:03 +00:00
|
|
|
prefs_register_enum_preference (p_mul_module, "decode",
|
|
|
|
"Decode Data PDU as",
|
|
|
|
"Type of content in Data_PDU",
|
|
|
|
&decode_option, decode_options, FALSE);
|
2007-11-19 07:26:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void range_delete_callback (guint32 port)
|
|
|
|
{
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_delete_uint ("udp.port", port, p_mul_handle);
|
2007-11-19 07:26:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void range_add_callback (guint32 port)
|
|
|
|
{
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint ("udp.port", port, p_mul_handle);
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void proto_reg_handoff_p_mul (void)
|
|
|
|
{
|
2008-09-19 17:39:44 +00:00
|
|
|
static gboolean p_mul_prefs_initialized = FALSE;
|
2008-09-23 15:03:39 +00:00
|
|
|
static range_t *p_mul_port_range;
|
2005-11-07 19:35:48 +00:00
|
|
|
|
|
|
|
if (!p_mul_prefs_initialized) {
|
2008-09-19 17:39:44 +00:00
|
|
|
p_mul_handle = find_dissector(PFNAME);
|
2005-11-07 19:35:48 +00:00
|
|
|
p_mul_prefs_initialized = TRUE;
|
2008-10-02 15:47:06 +00:00
|
|
|
data_handle = find_dissector ("data");
|
2005-11-07 19:35:48 +00:00
|
|
|
} else {
|
2007-11-19 07:26:53 +00:00
|
|
|
range_foreach (p_mul_port_range, range_delete_callback);
|
2008-09-23 15:03:39 +00:00
|
|
|
g_free (p_mul_port_range);
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
|
|
|
|
2007-11-19 07:26:53 +00:00
|
|
|
/* Save port number for later deletion */
|
|
|
|
p_mul_port_range = range_copy (global_p_mul_port_range);
|
2011-01-22 15:35:34 +00:00
|
|
|
|
2007-11-19 07:26:53 +00:00
|
|
|
range_foreach (p_mul_port_range, range_add_callback);
|
2005-11-07 19:35:48 +00:00
|
|
|
}
|
2007-10-06 11:28:09 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 2
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
2011-09-21 17:49:11 +00:00
|
|
|
* ex: set shiftwidth=2 tabstop=8 expandtab:
|
2009-07-23 17:46:09 +00:00
|
|
|
* :indentSize=2:tabSize=8:noTabs=true:
|
2007-10-06 11:28:09 +00:00
|
|
|
*/
|