gint offset;
gint sbus_eth_len;
guint sbus_crc_calc;
- guint8 sbus_version;
guint8 sbus_attribut;
guint8 sbus_media_cnt;
guint8 sbus_fio_cnt;
guint8 sbus_rdwr_block_tlg;
guint8 sbus_rdwr_block_type;
guint8 sbus_rdwr_ack_nak;
- guint8 sbus_sysinfo_number;
guint8 sbus_quint8_helper0;
guint32 sbus_binarymasked;
guint32 sbus_binaries;
hf_sbus_length, tvb, offset, 4, FALSE);
offset += 4;
- sbus_version = tvb_get_guint8(tvb,offset);
proto_tree_add_item(ethsbus_tree,
hf_sbus_version, tvb, offset, 1, FALSE);
offset += 1;
/*Request for reading system info*/
/*Syinfo 05 is not implemented as no serial baud is possible*/
case SBUS_RD_SYSTEM_INFORMATION:
- sbus_sysinfo_number = (tvb_get_guint8(tvb,13));
proto_tree_add_item(sbus_tree,
hf_sbus_sysinfo_nr, tvb, offset, 1, FALSE);
offset += 1;
- sbus_sysinfo_number = (tvb_get_guint8(tvb,14));
proto_tree_add_item(sbus_tree,
hf_sbus_sysinfo_nr, tvb, offset, 1, FALSE);
offset += 1;
/*
* Some Notes on using the SCSI Decoder:
*
- * The SCSI decoder has been built right now that it is invoked directly by the
+ * The SCSI decoder has been built right now so that it is invoked directly by the
* SCSI transport layers as compared to the standard mechanism of being invoked
* via a dissector chain. There are multiple reasons for this:
* - The SCSI CDB is typically embedded inside the transport along with other
* header fields that have nothing to do with SCSI. So, it is required to be
-
+ * done this way.
* - Originally, Wireshark couldn't do filtering on protocol trees that were not
* on the top level.
*
};
-/* This function must be called with walid pointers for both itlq and itl */
+/* This function must be called with valid pointers for both itlq and itl */
void
dissect_scsi_cdb (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- gint devtype_arg, itlq_nexus_t *itlq, itl_nexus_t *itl)
+ gint devtype_arg _U_, itlq_nexus_t *itlq, itl_nexus_t *itl)
{
int offset = 0;
proto_item *ti;
proto_tree *scsi_tree = NULL;
guint8 opcode;
+#if 0
scsi_device_type devtype;
+#endif
const gchar *valstr;
scsi_task_data_t *cdata;
const char *old_proto;
itlq->scsi_opcode=opcode;
csdata=get_cmdset_data(itlq, itl);
+#if 0 /* XXX: devtype never actually used ?? */
if (devtype_arg != SCSI_DEV_UNKNOWN) {
devtype = devtype_arg;
} else {
devtype = (scsi_device_type)scsi_def_devtype;
}
}
+#endif
if ((valstr = match_strval (opcode, scsi_spc_vals)) == NULL) {
valstr = match_strval(opcode, csdata->cdb_vals);
proto_item *ti;
proto_tree *scsi_tree = NULL;
guint8 opcode;
- scsi_device_type devtype;
scsi_task_data_t *cdata;
int payload_len;
const char *old_proto;
pinfo->current_proto="SCSI";
opcode = (guint8) cdata->itlq->scsi_opcode;
- devtype = cdata->itl->cmdset&SCSI_CMDSET_MASK;
if (tree) {
ti = proto_tree_add_protocol_format (tree, proto_scsi, tvb, offset,
for(nr_gap_block_number = 1; nr_gap_block_number <= number_of_nr_gap_blocks; nr_gap_block_number++) {
proto_item *pi;
proto_tree *pt;
- guint32 tsn_start;
+ /*guint32 tsn_start;*/
start = tvb_get_ntohs(chunk_tvb, nr_gap_block_offset);
end = tvb_get_ntohs(chunk_tvb, nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH);
- tsn_start = cum_tsn_ack + start;
+ /*tsn_start = cum_tsn_ack + start;*/
block_item = proto_tree_add_text(chunk_tree, chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH, "NR-Gap Acknowledgement for TSN %u to %u", cum_tsn_ack + start, cum_tsn_ack + end);
block_tree = proto_item_add_subtree(block_item, ett_sctp_nr_sack_chunk_nr_gap_block);
sctp_half_assoc_t* ha,
gboolean useinfo)
{
- guint8 type, flags;
+ guint8 type;
guint16 length, padding_length, reported_length;
gboolean result;
proto_item *flags_item;
/* first extract the chunk header */
type = tvb_get_guint8(chunk_tvb, CHUNK_TYPE_OFFSET);
- flags = tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET);
length = tvb_get_ntohs(chunk_tvb, CHUNK_LENGTH_OFFSET);
reported_length = tvb_reported_length(chunk_tvb);
padding_length = reported_length - length;
static guint16
de_sgsap_err_msg(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
-
- curr_offset = offset;
-
/* 18.4.5 Erroneous message
* The Erroneous message IE is a TLV IE that encapsulates the message in error.
* Octet 3 - Octet n
static guint16
de_sgsap_mme_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
guint name_len, tmp;
guint8 *fqdn = NULL;
- curr_offset = offset;
-
/* The MME name information element specifies the MME name and is coded as shown in figure 9.4.13.1. Octets 3
* through n contain the name in the form of a fully qualified domain name (FQDN) as specified in 3GPP TS 23.003 [3].
* The value part of the MME name information element (not including IEI and length indicator) shall have a length of 55
static guint16
de_sgsap_vlr_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
guint name_len, tmp;
guint8 *fqdn = NULL;
- curr_offset = offset;
/* The VLR name information element specifies the VLR name and is coded as shown in figure 9.4.22.1.
* Octets 3 through n contain the VLR name in the form of a fully qualified domain name (FQDN)
* as specified in IETF RFC 1035 [21].
static gint hf_sip_tc_host = -1;
static gint hf_sip_tc_port = -1;
static gint hf_sip_tc_turi = -1;
-static gint hf_sip_contact_param = -1;
+static gint hf_sip_contact_param = -1;
static gint hf_sip_resend = -1;
static gint hf_sip_original_frame = -1;
static gint hf_sip_matching_request_frame = -1;
gboolean equals_found = FALSE;
gboolean found_end_of_parameters = FALSE;
gint parameter_name_end = 0;
- gint parameter_value_end;
header_parameter_t *via_parameter;
guint i = 0;
}
/* Note parameter name */
- parameter_value_end = current_offset;
param_name = tvb_get_ephemeral_string(tvb, semicolon_offset+1,
parameter_name_end - semicolon_offset - 1);
case POS_RACK :
{
int cseq_no_offset;
- int cseq_method_offset;
+ /*int cseq_method_offset;*/
/* Add RAck tree */
if (hdr_tree) {
break;
}
}
- cseq_method_offset = sub_value_offset;
+ /*cseq_method_offset = sub_value_offset;*/
if (sub_value_offset == linelen)
{
guint32 cseq_number _U_,
guint32 *response_time)
{
+#if 0
guint32 cseq_to_compare = 0;
+#endif
sip_hash_key key;
sip_hash_value *p_val = 0;
sip_frame_result_value *sip_frame_result = NULL;
if (p_val)
{
+#if 0
/* Table entry found, we'll use its value for comparison */
cseq_to_compare = p_val->cseq;
+#endif
}
else
{
guint32 portNameInst, dword;
guint32 portNameType, portNameInstLow, portNameInstHigh;
guint8 error;
- guint8 item_size = 0;
+ /*guint8 item_size = 0;*/
switch (user) {
case TIPCv2_DATA_LOW:
break;
case TIPCv2_ROUTE_DISTRIBUTOR:
/* determine if it is TIPC v1.6 or v1.7 */
- dword = tvb_get_ntohl(tvb, 36);
- item_size = (dword >> 24) & 0xff;
+ /*dword = tvb_get_ntohl(tvb, 36); */
+ /*item_size = (dword >> 24) & 0xff;*/
if ((handle_v2_as & V2_AS_1_6) || ((handle_v2_as & V2_AS_ALL) == 0)) {
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val_to_str(msg_type, tipcv2_route_mtype_strings_1_6, "unknown"));
} else {
{
guint8 msg_type;
tvbuff_t *data_tvb;
- guint16 message_count;
guint32 msg_in_bundle_size;
guint32 dword;
guint msg_no = 0;
proto_tree_add_item(tipc_tree, hf_tipc_link_selector, tvb, offset, 4, FALSE);
/* Message count */
if (user == TIPC_MSG_BUNDLER || user == TIPC_CHANGEOVER_PROTOCOL) {
- message_count = tvb_get_ntohs(tvb, offset+2);
proto_tree_add_item(tipc_tree, hf_tipc_msg_cnt, tvb, offset, 4, FALSE);
}
/* Unused */
static void
dissect_draft_tei_status_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
- gint length, offset;
+ gint offset;
offset = tvb_get_ntohs(parameter_tvb, TEI_STATUS_LENGTH_OFFSET) + 8;
- length = msg_length - offset;
if(tvb_length_remaining(parameter_tvb, offset) > 0 ){
proto_tree_add_item(parameter_tree, hf_tei_draft_status, parameter_tvb, offset, TEI_STATUS_LENGTH, FALSE);
proto_item_append_text(parameter_item, " (%s)",
static void
dissect_layer3_message(tvbuff_t *layer3_data_tvb, proto_tree *v5ua_tree,proto_item *parameter_item, packet_info *pinfo)
{
- guint16 discriminator_offset, address_offset, low_address_offset, msg_type_offset, info_element_offset;
-
-
- guint32 all_address_offset;
+ guint16 discriminator_offset;
if(iua_version == DRAFT){
discriminator_offset = DISCRIMINATOR_OFFSET;
- address_offset = ADDRESS_OFFSET;
- low_address_offset = LOW_ADDRESS_OFFSET;
- msg_type_offset = MSG_TYPE_OFFSET;
- info_element_offset = INFO_ELEMENT_OFFSET;
}
else{
discriminator_offset = DISCRIMINATOR_OFFSET + PARAMETER_HEADER_LENGTH;
- address_offset = ADDRESS_OFFSET + PARAMETER_HEADER_LENGTH;
- low_address_offset = LOW_ADDRESS_OFFSET + PARAMETER_HEADER_LENGTH;
-
- all_address_offset = address_offset;
-
- msg_type_offset = MSG_TYPE_OFFSET + PARAMETER_HEADER_LENGTH;
- info_element_offset = INFO_ELEMENT_OFFSET + PARAMETER_HEADER_LENGTH;
}
if (tvb_get_guint8(layer3_data_tvb, discriminator_offset) == 0x48){
int offset = 0;
char pdut;
- char pdu_msg_type;
guint count = 0;
guint offset_wtls = 0;
ti = proto_tree_add_item(wtls_rec_tree, hf_wtls_alert, tvb, offset,
count, bo_little_endian);
wtls_msg_type_tree = proto_item_add_subtree(ti, ett_wtls_msg_type);
- pdu_msg_type = tvb_get_guint8 (tvb, offset);
proto_tree_add_item (wtls_msg_type_tree, hf_wtls_alert_level,
tvb,offset,1,bo_big_endian);
offset+=1;
guint value = 0;
int size = 0;
guint public_key = 0;
- guint signature = 0;
char valStr[1024];
const char *valBulk = NULL;
const char *valMac = NULL;
bo_little_endian);
offset++;
client_size++;
- signature = tvb_get_guint8 (tvb, offset);
proto_tree_add_item(wtls_msg_type_item_sub_tree,
hf_wtls_hands_certificate_wtls_signature_type,
tvb, offset,1,
static int
dissect_xtp_aseg(tvbuff_t *tvb, proto_tree *tree, guint32 offset) {
guint32 len = tvb_length_remaining(tvb, offset);
- guint32 start = offset, start2;
+ guint32 start = offset;
proto_item *ti, *ti2, *top_ti;
proto_tree *xtp_subtree;
struct xtp_ip_addr_seg aseg[1];
return (offset - start);
/** parse and display each address fileds */
- start2 = offset;
switch (aseg->aformat) {
case 0:
/* address(4) */
static int
dissect_xtp_tspec(tvbuff_t *tvb, proto_tree *tree, guint32 offset) {
guint32 len = tvb_length_remaining(tvb, offset);
- guint32 start = offset, start2;
+ guint32 start = offset;
proto_item *ti, *ti2;
proto_tree *xtp_subtree;
struct xtp_traffic_spec1 tspec[1];
return (offset - start);
/** parse and display each traffic fields **/
- start2 = offset;
switch (tspec->tformat) {
case 0:
/* traffic(4) */