forked from osmocom/wireshark
Clean up some more warnings: unused variables, unitialized variables, wrong format (%ld instead of %d) in packet-sccp.c
svn path=/trunk/; revision=21167
This commit is contained in:
parent
10e8a95401
commit
109388d263
|
@ -458,7 +458,7 @@ static gint ett_giop_locate_reply = -1;
|
|||
static gint ett_giop_fragment = -1;
|
||||
|
||||
static gint ett_giop_scl = -1; /* ServiceContextList */
|
||||
static gint ett_giop_scl_st1 = -1;
|
||||
static gint ett_giop_scl_st1 = -1;
|
||||
static gint ett_giop_ior = -1; /* IOR */
|
||||
|
||||
static dissector_handle_t data_handle;
|
||||
|
@ -677,10 +677,6 @@ GHashTable *giop_complete_reply_hash = NULL; /* hash */
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
static int giop_module_init_count = 100; /* storage size for our permanent data */
|
||||
/* ie: 100 entries -- needs tweaking -- FS */
|
||||
|
||||
struct giop_module_key {
|
||||
gchar *module; /* module (interface?) name */
|
||||
};
|
||||
|
@ -3684,7 +3680,7 @@ dissect_giop_locate_request( tvbuff_t * tvb, packet_info * pinfo,
|
|||
}
|
||||
|
||||
if (len > 0) {
|
||||
|
||||
|
||||
if(locate_request_tree)
|
||||
{
|
||||
|
||||
|
@ -4031,7 +4027,7 @@ get_giop_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
|
|||
return message_size + GIOP_HEADER_SIZE;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
dissect_giop_tcp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, giop_desegment, GIOP_HEADER_SIZE,
|
||||
get_giop_pdu_len, dissect_giop_common);
|
||||
|
@ -4049,7 +4045,7 @@ dissect_giop_heur (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) {
|
|||
/*define END_OF_GIOP_MESSAGE (offset - first_offset - GIOP_HEADER_SIZE) */
|
||||
|
||||
tot_len = tvb_length_remaining(tvb, 0);
|
||||
|
||||
|
||||
if (tot_len < GIOP_HEADER_SIZE) /* tot_len < 12 */
|
||||
{
|
||||
/* Not enough data captured to hold the GIOP header; don't try
|
||||
|
@ -4309,7 +4305,7 @@ proto_register_giop (void)
|
|||
{ "Request id", "giop.request_id",
|
||||
FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }
|
||||
},
|
||||
|
||||
|
||||
{ &hf_giop_req_operation,
|
||||
{ "Request operation", "giop.request_op",
|
||||
FT_STRING, BASE_DEC, NULL, 0x0, "", HFILL }
|
||||
|
@ -4328,9 +4324,9 @@ proto_register_giop (void)
|
|||
},
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static gint *ett[] = {
|
||||
&ett_giop,
|
||||
&ett_giop_reply,
|
||||
|
@ -4757,22 +4753,22 @@ static void decode_IIOP_IOR_profile(tvbuff_t *tvb, packet_info *pinfo, proto_tre
|
|||
* CodeSetId char_data;
|
||||
* CodeSetId wchar_data;
|
||||
* };
|
||||
* };
|
||||
*
|
||||
* };
|
||||
*
|
||||
* Code sets are identified by a 32-bit integer id from OSF.
|
||||
* See: ftp://ftp.opengroup.org/pub/code_set_registry
|
||||
*/
|
||||
static void decode_CodeSets(tvbuff_t *tvb, proto_tree *tree, int *offset,
|
||||
gboolean stream_is_be, guint32 boundary) {
|
||||
|
||||
/* The boundary being passed in is the offset where the context_data
|
||||
/* The boundary being passed in is the offset where the context_data
|
||||
* sequence begins. */
|
||||
|
||||
|
||||
guint32 code_set_id;
|
||||
if(tree) {
|
||||
/* We pass in -boundary, because the alignment is calculated relative to
|
||||
the beginning of the context_data sequence.
|
||||
Inside get_CDR_ulong(), the calculation will be (offset +(- boundary)) % 4
|
||||
Inside get_CDR_ulong(), the calculation will be (offset +(- boundary)) % 4
|
||||
to determine the correct alignment of the short. */
|
||||
code_set_id = get_CDR_ulong(tvb, offset, stream_is_be, -((gint32) boundary) );
|
||||
|
||||
|
@ -4798,13 +4794,13 @@ static void decode_CodeSets(tvbuff_t *tvb, proto_tree *tree, int *offset,
|
|||
*
|
||||
* The RT-CORBA priority is a CDR encoded short value in a sequence<octet>
|
||||
* buffer.
|
||||
*/
|
||||
static void decode_RTCorbaPriority(tvbuff_t *tvb, proto_tree *tree, int *offset,
|
||||
*/
|
||||
static void decode_RTCorbaPriority(tvbuff_t *tvb, proto_tree *tree, int *offset,
|
||||
gboolean stream_is_be, guint32 boundary) {
|
||||
|
||||
/* The boundary being passed in is the offset where the context_data
|
||||
/* The boundary being passed in is the offset where the context_data
|
||||
* sequence begins. */
|
||||
|
||||
|
||||
gint16 rtpriority;
|
||||
|
||||
/* RTCorbaPriority is stored as a CDR encoded short */
|
||||
|
@ -4815,7 +4811,7 @@ static void decode_RTCorbaPriority(tvbuff_t *tvb, proto_tree *tree, int *offset,
|
|||
rtpriority = get_CDR_short(tvb, offset, stream_is_be, -((gint32) boundary) );
|
||||
|
||||
if(tree) {
|
||||
/* Highlight all of context_data except for the first endian byte */
|
||||
/* Highlight all of context_data except for the first endian byte */
|
||||
proto_tree_add_text (tree, tvb, *offset - 2, 2,
|
||||
"RTCorbaPriority: %d", rtpriority);
|
||||
}
|
||||
|
@ -4949,18 +4945,18 @@ void decode_ServiceContextList(tvbuff_t *tvb, proto_tree *ptree, int *offset,
|
|||
service_context_name = val_to_str(scid, service_context_ids, "(0x%x)");
|
||||
} else { /* Proprietary vscid */
|
||||
service_context_name = "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
if(tree) {
|
||||
proto_tree_add_text (tree, tvb, *offset -sizeof(context_id), 4,
|
||||
"Service Context ID: %s (%u)", service_context_name,
|
||||
"Service Context ID: %s (%u)", service_context_name,
|
||||
context_id);
|
||||
}
|
||||
|
||||
temp_offset1 = *offset;
|
||||
/* The OMG has vscid of 0 reserved */
|
||||
if( vscid != 0 || scid > max_service_context_id ) {
|
||||
decode_UnknownServiceContext(tvb, tree, offset, stream_is_be, boundary);
|
||||
decode_UnknownServiceContext(tvb, tree, offset, stream_is_be, boundary);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -4987,23 +4983,23 @@ void decode_ServiceContextList(tvbuff_t *tvb, proto_tree *ptree, int *offset,
|
|||
switch(scid)
|
||||
{
|
||||
case 0x01: /* Codesets */
|
||||
decode_CodeSets(tvb, sub_tree1, offset,
|
||||
encapsulation_is_be, encapsulation_boundary);
|
||||
decode_CodeSets(tvb, sub_tree1, offset,
|
||||
encapsulation_is_be, encapsulation_boundary);
|
||||
break;
|
||||
case 0x0a: /* RTCorbaPriority */
|
||||
decode_RTCorbaPriority(tvb, sub_tree1, offset,
|
||||
encapsulation_is_be, encapsulation_boundary);
|
||||
decode_RTCorbaPriority(tvb, sub_tree1, offset,
|
||||
encapsulation_is_be, encapsulation_boundary);
|
||||
break;
|
||||
default:
|
||||
|
||||
/* Need to fill these in as we learn them */
|
||||
*offset = temp_offset1;
|
||||
decode_UnknownServiceContext(tvb, sub_tree1, offset, stream_is_be,
|
||||
decode_UnknownServiceContext(tvb, sub_tree1, offset, stream_is_be,
|
||||
boundary);
|
||||
break;
|
||||
}
|
||||
/* Set the offset to the end of the context_data sequence */
|
||||
*offset = temp_offset1 + sizeof(context_data_len) + context_data_len;
|
||||
*offset = temp_offset1 + sizeof(context_data_len) + context_data_len;
|
||||
|
||||
} /* for seqlen */
|
||||
|
||||
|
|
|
@ -175,14 +175,6 @@ static gint ett_annexc = -1;
|
|||
static gint ett_vpvc = -1;
|
||||
static gint ett_codec = -1;
|
||||
|
||||
static int two = 2;
|
||||
static int three = 3;
|
||||
static int four = 4;
|
||||
static int twelve = 12;
|
||||
static int sixteen = 16;
|
||||
static int twenty = 20;
|
||||
static int thirty = 30;
|
||||
|
||||
static value_string h248_annexc_package_properties_vals[] = {
|
||||
{ 0x1001, "media" },
|
||||
{ 0x1002, "transmission mode" },
|
||||
|
|
|
@ -726,7 +726,6 @@ static int txbf_uncomp_sm_bf_ant = -1;
|
|||
static int txbf_comp_sm_bf_ant = -1;
|
||||
|
||||
/* 802.11n 7.3.2.48 */
|
||||
static int hta_control_channel = -1;
|
||||
static int hta_cap = -1;
|
||||
static int hta_ext_chan_offset = -1;
|
||||
static int hta_rec_tx_width = -1;
|
||||
|
|
|
@ -57,10 +57,10 @@ static const gchar JXTA_MSGELEM_SIG[] = { 'j', 'x', 'e', 'l' };
|
|||
static const gchar JXTA_WELCOME_MSG_SIG[] = { 'J', 'X', 'T', 'A', 'H', 'E', 'L', 'L', 'O', ' ' };
|
||||
|
||||
static const gchar* JXTA_WELCOME_MSG_VERSION_1_1 = "1.1";
|
||||
static const gchar* JXTA_WELCOME_MSG_VERSION_3_0 = "3.0";
|
||||
static const gchar* JXTA_WELCOME_MSG_VERSION_3_0 = "3.0";
|
||||
|
||||
static const int JXTA_MSG_VERSION_1 = 0;
|
||||
static const int JXTA_MSG_VERSION_2 = 1;
|
||||
static const int JXTA_MSG_VERSION_1 = 0;
|
||||
static const int JXTA_MSG_VERSION_2 = 1;
|
||||
|
||||
static const int JXTAMSG1_ELMFLAG_TYPE = 1 << 0;
|
||||
static const int JXTAMSG1_ELMFLAG_ENCODING = 1 << 1;
|
||||
|
@ -909,7 +909,14 @@ static int dissect_jxta_stream(tvbuff_t * tvb, packet_info * pinfo, proto_tree *
|
|||
pinfo->ptype = PT_NONE;
|
||||
pinfo->srcport = 0;
|
||||
pinfo->destport = 0;
|
||||
}
|
||||
} else {
|
||||
/* Just to avoid compilers from thinking (falsely) that these
|
||||
* could be unitialized
|
||||
*/
|
||||
memset(&saved_src_addr, 0, sizeof(saved_src_addr));
|
||||
memset(&saved_dst_addr, 0, sizeof(saved_dst_addr));
|
||||
}
|
||||
|
||||
|
||||
dissected =
|
||||
dissector_try_string(media_type_dissector_table, content_type, jxta_message_tvb, pinfo, tree);
|
||||
|
@ -1171,14 +1178,14 @@ static int dissect_jxta_welcome(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
|
||||
token_offset += strlen(*current_token) + 1;
|
||||
current_token++;
|
||||
|
||||
|
||||
if (jxta_welcome_tree) {
|
||||
proto_tree_add_item(jxta_welcome_tree, hf_jxta_welcome_msgVers, tvb, token_offset, strlen(*current_token), FALSE);
|
||||
}
|
||||
|
||||
token_offset += strlen(*current_token) + 1;
|
||||
current_token++;
|
||||
|
||||
|
||||
if (jxta_welcome_tree) {
|
||||
proto_tree_add_item(jxta_welcome_tree, hf_jxta_welcome_version, tvb, token_offset, strlen(*current_token), FALSE);
|
||||
}
|
||||
|
@ -1387,7 +1394,7 @@ static int dissect_jxta_message(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
|
||||
while (TRUE) {
|
||||
guint8 message_version;
|
||||
|
||||
|
||||
/* First pass. Make sure all of the bytes we need are available */
|
||||
available = tvb_reported_length_remaining(tvb, offset);
|
||||
if (available < sizeof(JXTA_MSG_SIG)) {
|
||||
|
@ -1425,7 +1432,7 @@ static int dissect_jxta_message(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
break;
|
||||
} else {
|
||||
offset += sizeof(guint8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Read names table */
|
||||
|
@ -1476,7 +1483,7 @@ static int dissect_jxta_message(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
for (each_elem = 0; each_elem < elem_count; each_elem++) {
|
||||
tvbuff_t *jxta_message_element_tvb = tvb_new_subset(tvb, offset, -1, -1);
|
||||
int processed;
|
||||
|
||||
|
||||
if(JXTA_MSG_VERSION_1 == message_version) {
|
||||
processed = dissect_jxta_message_element_1(jxta_message_element_tvb, pinfo, NULL, 0, NULL);
|
||||
} else if(JXTA_MSG_VERSION_2 == message_version) {
|
||||
|
@ -1589,7 +1596,7 @@ static int dissect_jxta_message(tvbuff_t * tvb, packet_info * pinfo, proto_tree
|
|||
message_version = tvb_get_guint8(tvb, tree_offset);
|
||||
proto_tree_add_uint(jxta_msg_tree, hf_jxta_message_version, tvb, tree_offset, sizeof(guint8), message_version);
|
||||
tree_offset += sizeof(guint8);
|
||||
|
||||
|
||||
if( message_version > 0 ) {
|
||||
guint8 flags = tvb_get_guint8(tvb, tree_offset);
|
||||
proto_item *flags_ti = proto_tree_add_uint(jxta_msg_tree, hf_jxta_message_flags, tvb, tree_offset, sizeof(guint8), flags);
|
||||
|
@ -1956,13 +1963,13 @@ static int dissect_jxta_message_element_1(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
* Dissect a tvbuff containing a JXTA Message Element (Version 2).
|
||||
*
|
||||
* WARNING : The Version 2 Message Format is still under development and may change without notice (breaking this dissector).
|
||||
*
|
||||
*
|
||||
* @param tvb The buffer to dissect.
|
||||
* @param pinfo Packet Info.
|
||||
* @param tree The protocol tree.
|
||||
* @param names_count The number of elements in the names table.
|
||||
* @param names The table of names.
|
||||
* @return Number of bytes from the tvbuff_t which were processed, 0 (zero) if
|
||||
* @return Number of bytes from the tvbuff_t which were processed, 0 (zero) if
|
||||
* the packet was not recognized as a JXTA packet and negative if the
|
||||
* dissector needs more bytes in order to process a PDU.
|
||||
**/
|
||||
|
@ -2035,9 +2042,9 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
}
|
||||
|
||||
offset += name_len;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* type field */
|
||||
if ((flags & JXTAMSG2_ELMFLAG_TYPE) != 0) {
|
||||
available = tvb_reported_length_remaining(tvb, offset);
|
||||
|
@ -2059,8 +2066,8 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
|
||||
offset += sizeof(guint16);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* content field */
|
||||
if ((flags & JXTAMSG2_ELMFLAG_UINT64_LENS) != 0) {
|
||||
available = tvb_reported_length_remaining(tvb, offset);
|
||||
|
@ -2198,7 +2205,7 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
if (mimeID < names_count) {
|
||||
proto_item_append_text(mime_ti, " (%s)", names_table[mimeID]);
|
||||
mediatype = strdup( names_table[mimeID] );
|
||||
|
||||
|
||||
/* remove any params */
|
||||
{
|
||||
gchar *parms_at = strchr(mediatype, ';');
|
||||
|
@ -2220,7 +2227,7 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
} else {
|
||||
proto_item_append_text(mime_ti, " * BAD *");
|
||||
}
|
||||
|
||||
|
||||
tree_offset += sizeof(guint16);
|
||||
} else {
|
||||
mediatype = strdup( "application/octect-stream" );
|
||||
|
@ -2237,11 +2244,11 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
} else {
|
||||
proto_item_append_text(encoding_ti, " * BAD *");
|
||||
}
|
||||
|
||||
|
||||
tree_offset += sizeof(guint16);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((flags & JXTAMSG2_ELMFLAG_UINT64_LENS) != 0) {
|
||||
content_len = tvb_get_ntoh64(tvb, tree_offset);
|
||||
jxta_elem_length_item = proto_tree_add_item(jxta_elem_tree, hf_jxta_element_content_len64, tvb, tree_offset, sizeof(guint64), FALSE);
|
||||
|
@ -2265,13 +2272,13 @@ static int dissect_jxta_message_element_2(tvbuff_t * tvb, packet_info * pinfo, p
|
|||
}
|
||||
} else if (0 == strcmp("application/gzip", mediatype)) {
|
||||
tvbuff_t *uncomp_tvb = tvb_uncompress(element_content_tvb, 0, tvb_length(element_content_tvb));
|
||||
|
||||
|
||||
if( NULL != uncomp_tvb ) {
|
||||
proto_item_append_text( jxta_elem_length_item, " -> (%u uncompressed)", tvb_length(uncomp_tvb) );
|
||||
|
||||
tvb_set_child_real_data_tvbuff(element_content_tvb, uncomp_tvb);
|
||||
add_new_data_source(pinfo, uncomp_tvb, "Uncompressed Element Content");
|
||||
|
||||
|
||||
/* XXX bondolo 20060201 Force XML for uncompressed data. */
|
||||
media_type_recognized = dissector_try_string(media_type_dissector_table,
|
||||
"text/xml", uncomp_tvb, pinfo, jxta_elem_tree);
|
||||
|
|
|
@ -106,7 +106,7 @@ static struct novell_tap ncp_tap;
|
|||
struct ncp_common_header header;
|
||||
struct ncp_common_header *ncp_hdr;
|
||||
|
||||
/* Tables for reassembly of fragments. */
|
||||
/* Tables for reassembly of fragments. */
|
||||
GHashTable *nds_fragment_table = NULL;
|
||||
GHashTable *nds_reassembled_table = NULL;
|
||||
dissector_handle_t nds_data_handle;
|
||||
|
@ -166,10 +166,10 @@ static const value_string burst_command[] = {
|
|||
(c) 1996 by Steve Conner & Diane Conner
|
||||
Published by Annabooks, San Diego, California
|
||||
ISBN: 0-929392-31-0
|
||||
|
||||
|
||||
And:
|
||||
http:developer.novell.com
|
||||
NCP documentation
|
||||
NCP documentation
|
||||
|
||||
*/
|
||||
|
||||
|
@ -267,9 +267,9 @@ mncp_hash_insert(conversation_t *conversation, guint32 nwconnection, guint8 nwta
|
|||
key->nwtask = nwtask;
|
||||
|
||||
value = se_alloc(sizeof(mncp_rhash_value));
|
||||
|
||||
|
||||
g_hash_table_insert(mncp_rhash, key, value);
|
||||
|
||||
|
||||
if (ncp_echo_conn && nwconnection != 65535) {
|
||||
expert_add_info_format(pinfo, NULL, PI_RESPONSE_CODE, PI_CHAT, "Detected New Server Session. Connection %d, Task %d", nwconnection, nwtask);
|
||||
value->session_start_packet_num = pinfo->fd->num;
|
||||
|
@ -336,7 +336,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
ti = proto_tree_add_item(tree, proto_ncp, tvb, 0, -1, FALSE);
|
||||
ncp_tree = proto_item_add_subtree(ti, ett_ncp);
|
||||
if (is_tcp) {
|
||||
if (tvb_get_ntohl(tvb, hdr_offset) != NCPIP_RQST && tvb_get_ntohl(tvb, hdr_offset) != NCPIP_RPLY)
|
||||
if (tvb_get_ntohl(tvb, hdr_offset) != NCPIP_RQST && tvb_get_ntohl(tvb, hdr_offset) != NCPIP_RPLY)
|
||||
commhdr += 1;
|
||||
/* Get NCPIP Header data */
|
||||
ncpiph.signature = tvb_get_ntohl(tvb, commhdr);
|
||||
|
@ -360,7 +360,11 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
commhdr += 8;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Initialize this structure, we use it below */
|
||||
memset(&ncpiph, 0, sizeof(ncpiph));
|
||||
}
|
||||
|
||||
header.type = tvb_get_ntohs(tvb, commhdr);
|
||||
header.sequence = tvb_get_guint8(tvb, commhdr+2);
|
||||
header.conn_low = tvb_get_guint8(tvb, commhdr+3);
|
||||
|
@ -368,7 +372,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
header.conn_high = tvb_get_guint8(tvb, commhdr+5);
|
||||
proto_tree_add_uint(ncp_tree, hf_ncp_type, tvb, commhdr, 2, header.type);
|
||||
nw_connection = (header.conn_high*256)+header.conn_low;
|
||||
|
||||
|
||||
/* Ok, we need to track the conversation so that we can
|
||||
* determine if a new server session is occuring for this
|
||||
* connection.
|
||||
|
@ -401,7 +405,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
&pinfo->dst, PT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0);
|
||||
request_value = mncp_hash_insert(conversation, nw_connection, header.task, pinfo);
|
||||
}
|
||||
/* If this is a request packet then we
|
||||
/* If this is a request packet then we
|
||||
* might have a new task
|
||||
*/
|
||||
if (ncpiph.signature == NCPIP_RPLY) {
|
||||
|
@ -664,7 +668,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
case NCP_ALLOCATE_SLOT: /* Allocate Slot Request */
|
||||
length_remaining = tvb_length_remaining(tvb, commhdr + 4);
|
||||
if (length_remaining > 4) {
|
||||
if (length_remaining > 4) {
|
||||
testvar = tvb_get_ntohl(tvb, commhdr+4);
|
||||
if (testvar == 0x4c495020) {
|
||||
proto_tree_add_item(ncp_tree, hf_lip_echo, tvb, commhdr+4, 13, FALSE);
|
||||
|
@ -672,7 +676,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
}
|
||||
}
|
||||
/* otherwise fall through */
|
||||
|
||||
|
||||
case NCP_POSITIVE_ACK: /* Positive Acknowledgement */
|
||||
case NCP_SERVICE_REQUEST: /* Server NCP Request */
|
||||
case NCP_SERVICE_REPLY: /* Server NCP Reply */
|
||||
|
@ -1042,9 +1046,9 @@ proto_register_ncp(void)
|
|||
FT_UINT32, BASE_HEX, NULL, 0x0,
|
||||
"Packet Burst File Handle", HFILL }},
|
||||
{ &hf_ncp_burst_reserved,
|
||||
{ "Reserved", "ncp.burst_reserved",
|
||||
{ "Reserved", "ncp.burst_reserved",
|
||||
FT_BYTES, BASE_HEX, NULL, 0x0, "", HFILL }},
|
||||
|
||||
|
||||
};
|
||||
static gint *ett[] = {
|
||||
&ett_ncp,
|
||||
|
|
|
@ -750,7 +750,7 @@ static sccp_assoc_info_t* new_assoc(guint32 calling, guint32 called){
|
|||
a->extra_info = NULL;
|
||||
a->msgs = NULL;
|
||||
|
||||
return a;
|
||||
return a;
|
||||
}
|
||||
|
||||
sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_lr, guint32 dst_lr, guint msg_type) {
|
||||
|
@ -758,18 +758,18 @@ sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_
|
|||
address* opc = &(pinfo->src);
|
||||
address* dpc = &(pinfo->dst);
|
||||
guint framenum = pinfo->fd->num;
|
||||
|
||||
|
||||
if (assoc)
|
||||
return assoc;
|
||||
|
||||
|
||||
if (!src_lr && !dst_lr){
|
||||
return &no_assoc;
|
||||
}
|
||||
|
||||
|
||||
opck = opc->type == AT_SS7PC ? mtp3_pc_hash(opc->data) : g_str_hash(address_to_str(opc));
|
||||
dpck = dpc->type == AT_SS7PC ? mtp3_pc_hash(dpc->data) : g_str_hash(address_to_str(dpc));
|
||||
|
||||
|
||||
|
||||
|
||||
switch (msg_type) {
|
||||
case SCCP_MSG_TYPE_CR:
|
||||
{
|
||||
|
@ -796,12 +796,12 @@ sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_
|
|||
|
||||
if ( ( assoc = se_tree_lookup32_array(assocs,bw_key) ) ) {
|
||||
goto got_assoc;
|
||||
}
|
||||
|
||||
if ( (assoc = se_tree_lookup32_array(assocs,fw_key) ) ) {
|
||||
goto got_assoc;
|
||||
}
|
||||
|
||||
|
||||
if ( (assoc = se_tree_lookup32_array(assocs,fw_key) ) ) {
|
||||
goto got_assoc;
|
||||
}
|
||||
|
||||
assoc = new_assoc(opck,dpck);
|
||||
|
||||
got_assoc:
|
||||
|
@ -810,7 +810,7 @@ sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_
|
|||
se_tree_insert32_array(assocs,bw_key,assoc);
|
||||
assoc->has_bw_key = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ( ! pinfo->fd->flags.visited && ! assoc->has_fw_key ) {
|
||||
se_tree_insert32_array(assocs,fw_key,assoc);
|
||||
assoc->has_fw_key = TRUE;
|
||||
|
@ -823,13 +823,13 @@ sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_
|
|||
emem_tree_key_t key[] = {
|
||||
{1, &opck}, {1, &dpck}, {1, &dst_lr}, {0, NULL}
|
||||
};
|
||||
|
||||
|
||||
assoc = se_tree_lookup32_array(assocs,key);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (assoc && trace_sccp) {
|
||||
if ( ! pinfo->fd->flags.visited) {
|
||||
sccp_msg_info_t* msg = se_alloc(sizeof(sccp_msg_info_t));
|
||||
|
@ -840,7 +840,7 @@ sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_
|
|||
msg->label = NULL;
|
||||
msg->comment = NULL;
|
||||
msg->type = msg_type;
|
||||
|
||||
|
||||
if (assoc->msgs) {
|
||||
sccp_msg_info_t* m;
|
||||
for (m = assoc->msgs; m->next; m = m->next) ;
|
||||
|
@ -848,13 +848,13 @@ sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_
|
|||
} else {
|
||||
assoc->msgs = msg;
|
||||
}
|
||||
|
||||
|
||||
assoc->curr_msg = msg;
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
sccp_msg_info_t* m;
|
||||
|
||||
|
||||
for (m = assoc->msgs; m; m = m->next) {
|
||||
if (m->framenum == framenum && m->offset == offset) {
|
||||
assoc->curr_msg = m;
|
||||
|
@ -863,7 +863,7 @@ sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return assoc ? assoc : &no_assoc;
|
||||
}
|
||||
|
||||
|
@ -898,7 +898,7 @@ dissect_sccp_dlr_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_inf
|
|||
PROTO_ITEM_SET_HIDDEN(lr_item);
|
||||
|
||||
if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "DLR=%ld ", dlr);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "DLR=%d ", dlr);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -912,7 +912,7 @@ dissect_sccp_slr_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_inf
|
|||
PROTO_ITEM_SET_HIDDEN(lr_item);
|
||||
|
||||
if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "SLR=%ld ", slr);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "SLR=%d ", slr);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1428,13 +1428,13 @@ dissect_sccp_data_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
guint8 ssn = INVALID_SSN;
|
||||
guint8 other_ssn = INVALID_SSN;
|
||||
|
||||
|
||||
if (trace_sccp && assoc && assoc != &no_assoc) {
|
||||
pinfo->sccp_info = assoc->curr_msg;
|
||||
} else {
|
||||
pinfo->sccp_info = NULL;
|
||||
}
|
||||
|
||||
|
||||
if ( assoc ) {
|
||||
other_ssn = INVALID_SSN;
|
||||
|
||||
|
@ -1450,12 +1450,12 @@ dissect_sccp_data_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
other_ssn = assoc->calling_ssn;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
ssn = assoc->called_ssn;
|
||||
other_ssn = assoc->calling_ssn;
|
||||
}
|
||||
|
||||
|
||||
if (ssn != INVALID_SSN && dissector_try_port(sccp_ssn_dissector_table, ssn, tvb, pinfo, tree)) {
|
||||
return;
|
||||
}
|
||||
|
@ -1805,7 +1805,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
|
|||
guint32 source_local_ref=0;
|
||||
guint8 more;
|
||||
guint msg_offset = offset_from_real_beginning(tvb,0);
|
||||
|
||||
|
||||
/* Macro for getting pointer to mandatory variable parameters */
|
||||
#define VARIABLE_POINTER(var, hf_var, ptr_size) \
|
||||
if (ptr_size == POINTER_LENGTH) \
|
||||
|
@ -1853,7 +1853,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
|
|||
dlr = 0;
|
||||
slr = 0;
|
||||
assoc = NULL;
|
||||
|
||||
|
||||
no_assoc.calling_dpc = 0;
|
||||
no_assoc.called_dpc = 0;
|
||||
no_assoc.calling_ssn = INVALID_SSN;
|
||||
|
@ -2344,22 +2344,22 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
|
|||
if (orig_opt_ptr)
|
||||
dissect_sccp_optional_parameters(tvb, pinfo, sccp_tree, tree,
|
||||
optional_pointer);
|
||||
|
||||
|
||||
if (trace_sccp && assoc && assoc != &no_assoc) {
|
||||
proto_item* pi = proto_tree_add_uint(sccp_tree,hf_sccp_assoc_id,tvb,0,0,assoc->id);
|
||||
proto_tree* pt = proto_item_add_subtree(pi,ett_sccp_assoc);
|
||||
PROTO_ITEM_SET_GENERATED(pi);
|
||||
if (assoc->msgs) {
|
||||
sccp_msg_info_t* m;
|
||||
for(m = assoc->msgs; m ; m = m->next) {
|
||||
for(m = assoc->msgs; m ; m = m->next) {
|
||||
pi = proto_tree_add_uint( pt,hf_sccp_assoc_msg,tvb,0,0,m->framenum);
|
||||
|
||||
if (assoc->payload != SCCP_PLOAD_NONE)
|
||||
|
||||
if (assoc->payload != SCCP_PLOAD_NONE)
|
||||
proto_item_append_text(pi," %s", val_to_str(assoc->payload, assoc_protos, "Unknown"));
|
||||
|
||||
|
||||
if (m->label)
|
||||
proto_item_append_text(pi," %s", m->label);
|
||||
|
||||
|
||||
if (m->framenum == pinfo->fd->num && m->offset == msg_offset ) {
|
||||
tap_queue_packet(sccp_tap, pinfo, m);
|
||||
proto_item_append_text(pi," (current)");
|
||||
|
@ -2455,7 +2455,7 @@ dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* dissect the message */
|
||||
dissect_sccp_message(tvb, pinfo, sccp_tree, tree);
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void init_sccp(void) {
|
||||
|
@ -2899,13 +2899,13 @@ proto_register_sccp(void)
|
|||
"Whether to keep infomation about messages and their associations",
|
||||
&trace_sccp);
|
||||
|
||||
|
||||
|
||||
prefs_register_bool_preference(sccp_module, "show_more_info",
|
||||
"Show key parameters in Info Column",
|
||||
"Show SLR, DLR, and CAUSE Parameters in the Information Column of the Summary",
|
||||
&show_key_params);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
register_init_routine(&init_sccp);
|
||||
|
||||
|
|
|
@ -1070,7 +1070,6 @@ dissect_sip_authorization_item(tvbuff_t *tvb, proto_tree *tree, gint start_offse
|
|||
gchar *name;
|
||||
header_parameter_t *auth_parameter;
|
||||
guint i = 0;
|
||||
gboolean in_quoted_string = FALSE;
|
||||
|
||||
/* skip Spaces and Tabs */
|
||||
start_offset = tvb_skip_wsp(tvb, start_offset, line_end_offset - start_offset);
|
||||
|
@ -1247,7 +1246,7 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o
|
|||
while (current_offset < line_end_offset)
|
||||
{
|
||||
c = tvb_get_guint8(tvb, current_offset);
|
||||
|
||||
|
||||
if (!isdigit(c))
|
||||
{
|
||||
if (current_offset > port_offset)
|
||||
|
@ -1265,7 +1264,7 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
current_offset++;
|
||||
}
|
||||
}
|
||||
|
@ -1362,7 +1361,7 @@ static void dissect_sip_via_header(tvbuff_t *tvb, proto_tree *tree, gint start_o
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* If not matched, just add as text... */
|
||||
if (i == array_length(via_parameters_hf_array))
|
||||
{
|
||||
|
@ -1467,7 +1466,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
|
|||
guint token_1_len = 0;
|
||||
guint current_method_idx = 0;
|
||||
proto_item *ts = NULL, *ti = NULL, *th = NULL, *sip_element_item = NULL;
|
||||
proto_tree *sip_tree = NULL, *reqresp_tree = NULL , *hdr_tree = NULL,
|
||||
proto_tree *sip_tree = NULL, *reqresp_tree = NULL , *hdr_tree = NULL,
|
||||
*sip_element_tree = NULL, *message_body_tree = NULL, *cseq_tree = NULL,
|
||||
*via_tree = NULL, *reason_tree = NULL, *rack_tree = NULL;
|
||||
guchar contacts = 0, contact_is_star = 0, expires_is_0 = 0;
|
||||
|
@ -3118,7 +3117,7 @@ void proto_register_sip(void)
|
|||
FT_STRING, BASE_NONE,NULL,0x0,
|
||||
"P-User-Database Header", HFILL }
|
||||
},
|
||||
|
||||
|
||||
{ &hf_header_array[POS_P_VISITED_NETWORK_ID],
|
||||
{ "P-Visited-Network-ID", "sip.P-Visited-Network-ID",
|
||||
FT_STRING, BASE_NONE,NULL,0x0,
|
||||
|
|
|
@ -2077,7 +2077,7 @@ dissect_smb2_find_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
|
|||
}
|
||||
|
||||
static int
|
||||
dissect_smb2_negotiate_protocol_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, smb2_info_t *si _U_)
|
||||
dissect_smb2_negotiate_protocol_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, smb2_info_t *si _U_)
|
||||
{
|
||||
/* buffer code */
|
||||
offset = dissect_smb2_buffercode(tree, tvb, offset, NULL);
|
||||
|
|
Loading…
Reference in New Issue