2010-11-22 16:19:39 +00:00
|
|
|
/* -*- Mode: C; tab-width: 2 -*- */
|
|
|
|
/* packet-reload-framing.c
|
|
|
|
* Routines for REsource LOcation And Discovery (RELOAD) Framing
|
|
|
|
* Author: Stephane Bryant <sbryant@glycon.org>
|
|
|
|
* Copyright 2010 Stonyfish Inc.
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* Please refer to the following specs for protocol detail:
|
2011-05-29 06:16:19 +00:00
|
|
|
* - draft-ietf-p2psip-base-15
|
2010-11-22 16:19:39 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <epan/conversation.h>
|
|
|
|
#include <epan/expert.h>
|
|
|
|
#include <packet-tcp.h>
|
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
|
|
|
static int proto_reload_framing = -1;
|
|
|
|
|
|
|
|
static int hf_reload_framing_type = -1;
|
|
|
|
static int hf_reload_framing_sequence = -1;
|
|
|
|
static int hf_reload_framing_ack_sequence = -1;
|
|
|
|
static int hf_reload_framing_message = -1;
|
|
|
|
static int hf_reload_framing_message_length = -1;
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
static int hf_reload_framing_message_data = -1;
|
2010-11-22 16:19:39 +00:00
|
|
|
static int hf_reload_framing_received = -1;
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
static int hf_reload_framing_parsed_received = -1;
|
2010-11-22 16:19:39 +00:00
|
|
|
static int hf_reload_framing_duplicate = -1;
|
|
|
|
static int hf_reload_framing_response_in = -1;
|
|
|
|
static int hf_reload_framing_response_to = -1;
|
|
|
|
static int hf_reload_framing_time = -1;
|
|
|
|
|
|
|
|
static dissector_handle_t reload_handle;
|
|
|
|
|
|
|
|
/* Structure containing transaction specific information */
|
|
|
|
typedef struct _reload_frame_t {
|
|
|
|
guint32 data_frame;
|
|
|
|
guint32 ack_frame;
|
|
|
|
nstime_t req_time;
|
|
|
|
} reload_frame_t;
|
|
|
|
|
|
|
|
/* Structure containing conversation specific information */
|
|
|
|
typedef struct _reload_frame_conv_info_t {
|
|
|
|
emem_tree_t *transaction_pdus;
|
|
|
|
} reload_conv_info_t;
|
|
|
|
|
|
|
|
|
2011-05-06 01:09:04 +00:00
|
|
|
/* RELOAD Message classes = (message_code & 0x1) (response = request +1) */
|
2010-11-22 16:19:39 +00:00
|
|
|
#define DATA 128
|
|
|
|
#define ACK 129
|
|
|
|
|
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_reload_framing = -1;
|
|
|
|
static gint ett_reload_framing_message = -1;
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
static gint ett_reload_framing_received = -1;
|
2010-11-22 16:19:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define UDP_PORT_RELOAD 6084
|
|
|
|
#define TCP_PORT_RELOAD 6084
|
|
|
|
|
|
|
|
#define MIN_HDR_LENGTH 9
|
|
|
|
#define MIN_RELOADDATA_HDR_LENGTH 38
|
|
|
|
|
|
|
|
#define RELOAD_TOKEN 0xd2454c4f
|
|
|
|
|
|
|
|
static const value_string types[] = {
|
2011-05-06 01:09:04 +00:00
|
|
|
{DATA, "DATA"},
|
|
|
|
{ACK, "ACK"},
|
2010-11-22 16:19:39 +00:00
|
|
|
{0x00, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static guint
|
|
|
|
get_reload_framing_message_length(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
|
|
|
|
{
|
|
|
|
/* Get the type */
|
|
|
|
guint32 length = 9;
|
|
|
|
|
|
|
|
|
|
|
|
if (tvb_get_guint8(tvb, offset) == DATA) {
|
|
|
|
|
|
|
|
length = 1 + 4;
|
|
|
|
length += 3;
|
|
|
|
length += (tvb_get_ntohs(tvb, 1 + 4)<<8)+ tvb_get_guint8(tvb, 1 + 4 + 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
return length;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
|
|
|
dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *reload_framing_tree;
|
|
|
|
guint32 relo_token;
|
|
|
|
guint32 message_length=0;
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
emem_tree_key_t transaction_id_key[4];
|
2010-11-22 16:19:39 +00:00
|
|
|
guint32 sequence;
|
|
|
|
guint effective_length;
|
|
|
|
guint16 offset;
|
|
|
|
conversation_t *conversation;
|
|
|
|
reload_conv_info_t *reload_framing_info;
|
|
|
|
reload_frame_t * reload_frame;
|
|
|
|
guint8 type;
|
|
|
|
|
|
|
|
offset = 0;
|
|
|
|
effective_length = tvb_length(tvb);
|
|
|
|
|
|
|
|
/* First, make sure we have enough data to do the check. */
|
|
|
|
if (effective_length < MIN_HDR_LENGTH)
|
|
|
|
return 0;
|
|
|
|
|
2011-06-09 17:30:13 +00:00
|
|
|
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
|
|
|
pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
|
|
|
|
|
2011-05-06 01:09:04 +00:00
|
|
|
/* Get the type
|
2010-11-24 15:15:28 +00:00
|
|
|
* http://tools.ietf.org/html/draft-ietf-p2psip-base-12
|
|
|
|
* 5.6.2. Framing Header
|
|
|
|
*/
|
2010-11-22 16:19:39 +00:00
|
|
|
type = tvb_get_guint8(tvb, 0);
|
|
|
|
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
switch(type) {
|
|
|
|
case DATA:
|
|
|
|
/* in the data type, check the reload token to be sure this
|
|
|
|
* is a reLoad packet
|
|
|
|
*/
|
|
|
|
message_length = (tvb_get_ntohs(tvb, 1 + 4)<<8)+ tvb_get_guint8(tvb, 1 + 4 + 2);
|
|
|
|
if (message_length < MIN_RELOADDATA_HDR_LENGTH) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
relo_token = tvb_get_ntohl(tvb,1 + 4 + 3);
|
|
|
|
if (relo_token != RELOAD_TOKEN) {
|
2011-05-06 01:09:04 +00:00
|
|
|
return 0;
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ACK:
|
|
|
|
if (effective_length < 9 || ! conversation) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return 0;
|
2010-11-22 16:19:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-05-06 01:09:04 +00:00
|
|
|
/* The message seems to be a valid RELOAD framing message! */
|
2010-11-22 16:19:39 +00:00
|
|
|
|
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RELOAD Frame");
|
|
|
|
col_clear(pinfo->cinfo, COL_INFO);
|
|
|
|
|
|
|
|
/* Create the transaction key which may be used to track the conversation */
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
|
2010-11-22 16:19:39 +00:00
|
|
|
sequence = tvb_get_ntohl(tvb, 1);
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
transaction_id_key[0].length = 1;
|
|
|
|
transaction_id_key[0].key = &sequence; /* sequence number */
|
|
|
|
|
|
|
|
if (type==DATA) {
|
|
|
|
transaction_id_key[1].length = 1;
|
|
|
|
transaction_id_key[1].key = &pinfo->srcport;
|
|
|
|
transaction_id_key[2].length = (pinfo->src.len)>>2;
|
|
|
|
transaction_id_key[2].key = (void*)pinfo->src.data;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
transaction_id_key[1].length = 1;
|
|
|
|
transaction_id_key[1].key = &pinfo->destport;
|
|
|
|
transaction_id_key[2].length = (pinfo->dst.len)>>2;
|
|
|
|
transaction_id_key[2].key = (void*)pinfo->dst.data;
|
|
|
|
}
|
|
|
|
transaction_id_key[3].length=0;
|
|
|
|
transaction_id_key[3].key=NULL;
|
2010-11-22 16:19:39 +00:00
|
|
|
|
2011-06-09 17:30:13 +00:00
|
|
|
if (!conversation) {
|
|
|
|
conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
|
|
|
pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Do we already have a state structure for this conv
|
|
|
|
*/
|
|
|
|
reload_framing_info = conversation_get_proto_data(conversation, proto_reload_framing);
|
|
|
|
if (!reload_framing_info) {
|
|
|
|
/* No. Attach that information to the conversation, and add
|
|
|
|
* it to the list of information structures.
|
|
|
|
*/
|
|
|
|
reload_framing_info = se_alloc(sizeof(reload_conv_info_t));
|
|
|
|
reload_framing_info->transaction_pdus = se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "reload_framing_transaction_pdus");
|
|
|
|
conversation_add_proto_data(conversation, proto_reload_framing, reload_framing_info);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!pinfo->fd->flags.visited) {
|
|
|
|
if ((reload_frame =
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
se_tree_lookup32_array(reload_framing_info->transaction_pdus, transaction_id_key)) == NULL) {
|
2010-11-22 16:19:39 +00:00
|
|
|
reload_frame = se_alloc(sizeof(reload_frame_t));
|
|
|
|
reload_frame->data_frame = 0;
|
|
|
|
reload_frame->ack_frame = 0;
|
|
|
|
reload_frame->req_time = pinfo->fd->abs_ts;
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
se_tree_insert32_array(reload_framing_info->transaction_pdus, transaction_id_key, (void *)reload_frame);
|
2010-11-22 16:19:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* check whether the message is a request or a response */
|
|
|
|
|
|
|
|
if (type == DATA) {
|
|
|
|
/* This is a data */
|
|
|
|
if (reload_frame->data_frame == 0) {
|
|
|
|
reload_frame->data_frame = pinfo->fd->num;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* This is a catch-all for all non-request messages */
|
|
|
|
if (reload_frame->ack_frame == 0) {
|
|
|
|
reload_frame->ack_frame = pinfo->fd->num;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
reload_frame=se_tree_lookup32_array(reload_framing_info->transaction_pdus, transaction_id_key);
|
2010-11-22 16:19:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!reload_frame) {
|
|
|
|
/* create a "fake" pana_trans structure */
|
2011-03-22 19:13:05 +00:00
|
|
|
reload_frame = ep_alloc(sizeof(reload_frame_t));
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
reload_frame->data_frame = (type==DATA) ? pinfo->fd->num : 0;
|
|
|
|
reload_frame->ack_frame = (type!=DATA) ? pinfo->fd->num : 0;
|
2010-11-22 16:19:39 +00:00
|
|
|
reload_frame->req_time = pinfo->fd->abs_ts;
|
|
|
|
}
|
|
|
|
|
2011-10-21 02:10:19 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_reload_framing, tvb, 0, -1, ENC_NA);
|
2010-11-22 16:19:39 +00:00
|
|
|
|
|
|
|
reload_framing_tree = proto_item_add_subtree(ti, ett_reload_framing);
|
|
|
|
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str(type, types, "Unknown"));
|
|
|
|
proto_item_append_text(ti, ": %s", val_to_str(type, types, "Unknown"));
|
|
|
|
|
|
|
|
/* Retransmission control */
|
|
|
|
if (type == DATA) {
|
|
|
|
if (reload_frame->data_frame != pinfo->fd->num) {
|
|
|
|
proto_item *it;
|
|
|
|
it = proto_tree_add_uint(reload_framing_tree, hf_reload_framing_duplicate, tvb, 0, 0, reload_frame->data_frame);
|
|
|
|
PROTO_ITEM_SET_GENERATED(it);
|
|
|
|
}
|
|
|
|
if (reload_frame->ack_frame) {
|
|
|
|
proto_item *it;
|
|
|
|
it = proto_tree_add_uint(reload_framing_tree, hf_reload_framing_response_in, tvb, 0, 0, reload_frame->ack_frame);
|
|
|
|
PROTO_ITEM_SET_GENERATED(it);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* This is a response */
|
|
|
|
if (reload_frame->ack_frame != pinfo->fd->num) {
|
|
|
|
proto_item *it;
|
|
|
|
it = proto_tree_add_uint(reload_framing_tree, hf_reload_framing_duplicate, tvb, 0, 0, reload_frame->ack_frame);
|
|
|
|
PROTO_ITEM_SET_GENERATED(it);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (reload_frame->data_frame) {
|
|
|
|
proto_item *it;
|
|
|
|
nstime_t ns;
|
|
|
|
|
|
|
|
it = proto_tree_add_uint(reload_framing_tree, hf_reload_framing_response_to, tvb, 0, 0, reload_frame->data_frame);
|
|
|
|
PROTO_ITEM_SET_GENERATED(it);
|
|
|
|
|
|
|
|
nstime_delta(&ns, &pinfo->fd->abs_ts, &reload_frame->req_time);
|
|
|
|
it = proto_tree_add_time(reload_framing_tree, hf_reload_framing_time, tvb, 0, 0, &ns);
|
|
|
|
PROTO_ITEM_SET_GENERATED(it);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Message dissection
|
|
|
|
*/
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(reload_framing_tree, hf_reload_framing_type, tvb, offset , 1, ENC_BIG_ENDIAN);
|
2010-11-22 16:19:39 +00:00
|
|
|
offset += 1;
|
|
|
|
switch (type) {
|
|
|
|
|
|
|
|
case DATA:
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
proto_item *ti_message;
|
|
|
|
proto_tree *message_tree;
|
|
|
|
|
|
|
|
proto_tree_add_item(reload_framing_tree, hf_reload_framing_sequence, tvb, offset , 4, ENC_BIG_ENDIAN);
|
|
|
|
offset += 4;
|
|
|
|
ti_message = proto_tree_add_item(reload_framing_tree, hf_reload_framing_message, tvb, offset, 3+message_length, ENC_NA);
|
|
|
|
proto_item_append_text(ti_message, " (opaque<%d>)", message_length);
|
|
|
|
message_tree = proto_item_add_subtree(ti_message, ett_reload_framing_message);
|
|
|
|
proto_tree_add_item(message_tree, hf_reload_framing_message_length, tvb, offset, 3, ENC_BIG_ENDIAN);
|
|
|
|
offset += 3;
|
|
|
|
proto_tree_add_item(message_tree, hf_reload_framing_message_data, tvb, offset, message_length, ENC_NA);
|
|
|
|
next_tvb = tvb_new_subset(tvb, offset, effective_length - offset, message_length);
|
|
|
|
if (reload_handle == NULL) {
|
|
|
|
expert_add_info_format(pinfo, ti, PI_PROTOCOL, PI_WARN, "Can not find reload dissector");
|
|
|
|
return tvb_length(tvb);
|
2010-11-22 16:19:39 +00:00
|
|
|
}
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
call_dissector_only(reload_handle, next_tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
break;
|
2010-11-22 16:19:39 +00:00
|
|
|
|
|
|
|
case ACK:
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{
|
|
|
|
guint32 sequence;
|
|
|
|
proto_item *ti_received;
|
|
|
|
|
|
|
|
sequence = tvb_get_ntohl(tvb, offset);
|
|
|
|
proto_tree_add_uint(reload_framing_tree, hf_reload_framing_ack_sequence, tvb, offset , 4, sequence);
|
2010-11-22 16:19:39 +00:00
|
|
|
offset += 4;
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
|
|
|
|
ti_received = proto_tree_add_item(reload_framing_tree, hf_reload_framing_received, tvb, offset , 4, ENC_BIG_ENDIAN);
|
|
|
|
{
|
|
|
|
guint32 received;
|
|
|
|
int last_received=-1;
|
|
|
|
int index = 0;
|
|
|
|
proto_tree * received_tree;
|
|
|
|
proto_item *ti_parsed_received=NULL;
|
|
|
|
|
|
|
|
received = tvb_get_ntohl(tvb, offset);
|
|
|
|
while ((received<<index) != 0) {
|
|
|
|
if (index>=32) break;
|
|
|
|
if (received &(0x1<<(31-index))) {
|
|
|
|
if (index==0) {
|
|
|
|
received_tree = proto_item_add_subtree(ti_received, ett_reload_framing_received);
|
|
|
|
ti_parsed_received = proto_tree_add_item(received_tree, hf_reload_framing_parsed_received, tvb, offset, 4, ENC_NA);
|
|
|
|
proto_item_append_text(ti_parsed_received, "[%u", (sequence -32+index));
|
|
|
|
last_received = index;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (received &(0x1<<(31-index+1))) {
|
|
|
|
index++;
|
|
|
|
/* range: skip */
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* 1st acked in a serie */
|
|
|
|
if (last_received<0) {
|
|
|
|
/* 1st acked ever */
|
|
|
|
received_tree = proto_item_add_subtree(ti_received, ett_reload_framing_received);
|
|
|
|
ti_parsed_received = proto_tree_add_item(received_tree, hf_reload_framing_parsed_received, tvb, offset, 4, ENC_NA);
|
|
|
|
proto_item_append_text(ti_parsed_received, "[%u",(sequence-32+index));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
proto_item_append_text(ti_parsed_received, ",%u",(sequence-32+index));
|
|
|
|
}
|
|
|
|
last_received = index;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (index>0) {
|
|
|
|
if ((received &(0x1<<(31-index+1))) && (received &(0x1<<(31-index+2)))) {
|
|
|
|
/* end of a series */
|
|
|
|
if ((received &(0x1<<(31-index+3)))) {
|
|
|
|
proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+index-1));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* just a pair */
|
|
|
|
proto_item_append_text(ti_received, ",%u", (sequence-32+index-1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
index++;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
index++;
|
|
|
|
}
|
|
|
|
if (last_received>=0) {
|
|
|
|
if ((received &(0x1<<(31-index+1))) && (received &(0x1<<(31-index+2)))) {
|
|
|
|
/* end of a series */
|
|
|
|
if ((received &(0x1<<(31-index+3)))) {
|
|
|
|
proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+index-1));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* just a pair */
|
|
|
|
proto_item_append_text(ti_parsed_received, ",%u", (sequence-32+index-1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
proto_item_append_text(ti_parsed_received, "]");
|
|
|
|
PROTO_ITEM_SET_GENERATED(ti_parsed_received);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2010-11-22 16:19:39 +00:00
|
|
|
|
|
|
|
default:
|
2011-03-27 16:15:19 +00:00
|
|
|
DISSECTOR_ASSERT_NOT_REACHED();
|
2010-11-22 16:19:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return tvb_length(tvb);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
dissect_reload_framing_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
return dissect_reload_framing_message(tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_reload_framing_message_no_return(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
dissect_reload_framing_message(tvb, pinfo, tree);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_reload_framing_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
2011-05-06 01:09:04 +00:00
|
|
|
/* XXX: Check if we have a valid RELOAD Frame Type ? */
|
2010-11-22 16:19:39 +00:00
|
|
|
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, MIN_HDR_LENGTH,
|
|
|
|
get_reload_framing_message_length, dissect_reload_framing_message_no_return);
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
dissect_reload_framing_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
if (dissect_reload_framing_message(tvb, pinfo, tree) == 0) {
|
|
|
|
/*
|
|
|
|
* It wasn't a valid RELOAD message, and wasn't
|
|
|
|
* dissected as such.
|
|
|
|
*/
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_reload_framing(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_reload_framing_type,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{ "type (FramedMessageType)", "reload_framing.type", FT_UINT8,
|
|
|
|
BASE_DEC, VALS(types), 0x0, NULL, HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_sequence,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{ "sequence (uint32)", "reload_framing.sequence", FT_UINT32,
|
|
|
|
BASE_DEC, NULL, 0x0, NULL, HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_ack_sequence,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{ "ack_sequence (uint32)", "reload_framing.ack_sequence", FT_UINT32,
|
|
|
|
BASE_DEC, NULL, 0x0, NULL, HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_message,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{ "message", "reload_framing.message", FT_NONE,
|
|
|
|
BASE_NONE, NULL, 0x0, NULL, HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_message_length,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{ "length (uint24)", "reload_framing.message.length", FT_UINT32,
|
|
|
|
BASE_DEC, NULL, 0x0, NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{ &hf_reload_framing_message_data,
|
|
|
|
{ "data", "reload_framing.message.data", FT_BYTES,
|
|
|
|
BASE_NONE, NULL, 0x0, NULL, HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_received,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
{ "received (uint32)", "reload_framing.received", FT_UINT32,
|
|
|
|
BASE_HEX, NULL, 0x0, NULL, HFILL
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{ &hf_reload_framing_parsed_received,
|
|
|
|
{ "Acked Frames:", "reload_framing.parsed_received", FT_NONE,
|
|
|
|
BASE_NONE, NULL, 0x0, NULL, HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_response_in,
|
|
|
|
{ "Response In", "reload_framing.response-in", FT_FRAMENUM,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
BASE_NONE, NULL, 0x0, "The response to this RELOAD Request is in this frame", HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_response_to,
|
|
|
|
{ "Request In", "reload_framing.response-to", FT_FRAMENUM,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
BASE_NONE, NULL, 0x0, "This is a response to the RELOAD Request in this frame", HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_time,
|
|
|
|
{ "Time", "reload_framing.time", FT_RELATIVE_TIME,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
BASE_NONE, NULL, 0x0, "The time between the Request and the Response", HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
{ &hf_reload_framing_duplicate,
|
|
|
|
{ "Duplicated original message in", "reload_framing.duplicate", FT_FRAMENUM,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
BASE_NONE, NULL, 0x0, "This is a duplicate of RELOAD message in this frame", HFILL
|
|
|
|
}
|
2010-11-22 16:19:39 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Setup protocol subtree array */
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_reload_framing,
|
|
|
|
&ett_reload_framing_message,
|
From Stéphane Bryant: improvements in RELOAD dissection
- Follow closely draft-ietf-p2psip-base-18
- Added support for draft-ietf-p2psip-base-18,
draft-ietf-p2psip-sip-06,
draft-ietf-p2psip-service-discovery-03,
draft-ietf-p2psip-self-tuning-04,
draft-ietf-p2psip-diagnostics-06,
draft-zong-p2psip-drr-00,
- Handoff to the xml dissectors for
configuration data
- export the message content dissection function
in the new packet-reload.h file for use in
related protocols (draft-hautakorpi-p2psip-with-hip-01)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6317
From me:
- Fix a few C++ style comments;
- Fix:
packet-reload.c(2156) ... conversion from 'guint64' to 'guint32', possible loss of data
packet-reload.c(3528) ... conversion from 'guint64' to 'guint32', possible loss of data
Note: Additional fix yet req'd since checkhf.pl gives:
ERROR: NO ARRAY: packet-reload.c, hf_reload_dmflag_underlay_hop
Unused entry: packet-reload.c, hf_reload_storeddata_signature
Unused entry: packet-reload.c, hf_reload_storeddataspecifiers
(Compile is OK).
svn path=/trunk/; revision=39301
2011-10-06 20:46:45 +00:00
|
|
|
&ett_reload_framing_received,
|
2010-11-22 16:19:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Register the protocol name and description */
|
|
|
|
proto_reload_framing = proto_register_protocol("REsource LOcation And Discovery Framing", "RELOAD FRAMING", "reload-framing");
|
|
|
|
|
|
|
|
/* Required function calls to register the header fields and subtrees used */
|
|
|
|
proto_register_field_array(proto_reload_framing, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2011-03-28 15:23:27 +00:00
|
|
|
|
|
|
|
register_dissector("reload-framing", dissect_reload_framing_message_no_return, proto_reload_framing);
|
|
|
|
|
2010-11-22 16:19:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_reload_framing(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
dissector_handle_t reload_framing_tcp_handle;
|
|
|
|
dissector_handle_t reload_framing_udp_handle;
|
|
|
|
|
|
|
|
reload_framing_tcp_handle = create_dissector_handle(dissect_reload_framing_tcp, proto_reload_framing);
|
|
|
|
reload_framing_udp_handle = new_create_dissector_handle(dissect_reload_framing_udp, proto_reload_framing);
|
|
|
|
|
|
|
|
reload_handle = find_dissector("reload");
|
|
|
|
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint("tcp.port", TCP_PORT_RELOAD, reload_framing_tcp_handle);
|
|
|
|
dissector_add_uint("udp.port", UDP_PORT_RELOAD, reload_framing_udp_handle);
|
2010-11-22 16:19:39 +00:00
|
|
|
|
|
|
|
heur_dissector_add("udp", dissect_reload_framing_heur, proto_reload_framing);
|
|
|
|
heur_dissector_add("tcp", dissect_reload_framing_heur, proto_reload_framing);
|
From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863 :
1. Reload framing protocol no longer encapsulates the Reload message, instead
the latter is in its own tree following Reload framing, much like IP, UDP, etc.
2. Similarly, DTLS no longer encapsulates its data payload if the payload can
be dissected. The recognized payload is in its own tree following the DTLS,
much like IP, UDP, etc.
4. DTLS now has its own heuristic table for dissecting its payload, and
reload-framing is added to this DTLS heuristic table.
6. DTLS will try to dissect its payload if the agreed upon cipher is
RSA-NULL-MD5 (0x0001) or RSA-NULL-SHA (0x0002), even when DTLS is not
configured with the client/server private keys.
Still to do: make DTLS a heuristic dissector on top of UDP (item 3 in the bug).
svn path=/trunk/; revision=37110
2011-05-13 02:48:08 +00:00
|
|
|
heur_dissector_add("dtls", dissect_reload_framing_heur, proto_reload_framing);
|
2010-11-22 16:19:39 +00:00
|
|
|
}
|