forked from osmocom/wireshark
packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
svn path=/trunk/; revision=39764
This commit is contained in:
parent
6de2561c69
commit
647c5c0b27
|
@ -45,7 +45,7 @@ UDPTLPacket
|
|||
val_to_str(Data_value,t38_T30_data_vals,"<unknown>"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* info for tap */
|
||||
if (primary_part)
|
||||
t38_info->data_value = Data_value;
|
||||
|
@ -55,7 +55,7 @@ UDPTLPacket
|
|||
if (primary_part) Data_Field_item_num++;
|
||||
#.END
|
||||
|
||||
#.FN_PARS Data-Field/_item/field-type
|
||||
#.FN_PARS Data-Field/_item/field-type
|
||||
EXT=(use_pre_corrigendum_asn1_specification)?FALSE:TRUE
|
||||
EXT_NUM=(use_pre_corrigendum_asn1_specification)?0:4
|
||||
VAL_PTR=&Data_Field_field_type_value
|
||||
|
@ -88,7 +88,7 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
FALSE); /* More fragments */
|
||||
if ( Data_Field_field_type_value == 7 ) {
|
||||
/* if there was packet lost or other errors during the defrag then frag_msg is NULL. This could also means
|
||||
* there are out of order packets (e.g, got the tail frame t4-non-ecm-sig-end before the last fragment),
|
||||
* there are out of order packets (e.g, got the tail frame t4-non-ecm-sig-end before the last fragment),
|
||||
* but we will assume there was packet lost instead, which is more usual. So, we are going to reassemble the packet
|
||||
* and get some stat, like packet lost and burst number of packet lost
|
||||
*/
|
||||
|
@ -98,12 +98,12 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
data_fragment_table /* list of message fragments */
|
||||
);
|
||||
} else {
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, " (t4-data Reassembled: No packet lost)");
|
||||
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, " (t4-data Reassembled: No packet lost)");
|
||||
|
||||
g_snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (p_t38_packet_conv_info->packet_lost) {
|
||||
g_snprintf(t38_info->desc_comment, MAX_T38_DESC, " Pack lost: %d, Pack burst lost: %d", p_t38_packet_conv_info->packet_lost, p_t38_packet_conv_info->burst_lost);
|
||||
} else {
|
||||
|
@ -116,7 +116,7 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
/* Now reset fragmentation information in pinfo */
|
||||
actx->pinfo->fragmented = save_fragmented;
|
||||
|
||||
t38_info->time_first_t4_data = p_t38_packet_conv_info->time_first_t4_data;
|
||||
t38_info->time_first_t4_data = p_t38_packet_conv_info->time_first_t4_data;
|
||||
t38_info->frame_num_first_t4_data = p_t38_packet_conv_info->reass_ID; /* The reass_ID is the Frame number of the first t4 fragment */
|
||||
|
||||
} else {
|
||||
|
@ -174,7 +174,7 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
if (primary_part && (Data_Field_item_num<2)) {
|
||||
tvbuff_t* new_tvb = NULL;
|
||||
fragment_data *frag_msg = NULL;
|
||||
|
||||
|
||||
/* HDLC Data or t4-non-ecm-data */
|
||||
if (Data_Field_field_type_value == 0 || Data_Field_field_type_value == 6) { /* 0=HDLC Data or 6=t4-non-ecm-data*/
|
||||
gboolean save_fragmented = actx->pinfo->fragmented;
|
||||
|
@ -235,7 +235,7 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
primary_part = TRUE;
|
||||
#.FN_FTR UDPTLPacket/primary-ifp-packet
|
||||
/* if is a valid t38 packet, add to tap */
|
||||
if (p_t38_packet_conv && (!actx->pinfo->in_error_pkt) && ((gint32) seq_number != p_t38_packet_conv_info->last_seqnum))
|
||||
if (p_t38_packet_conv && (!actx->pinfo->flags.in_error_pkt) && ((gint32) seq_number != p_t38_packet_conv_info->last_seqnum))
|
||||
tap_queue_packet(t38_tap, actx->pinfo, t38_info);
|
||||
|
||||
if (p_t38_conv) p_t38_conv_info->last_seqnum = (gint32) seq_number;
|
||||
|
|
|
@ -522,13 +522,13 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
flag, and set that flag; subdissectors may treat packets
|
||||
that are the payload of error packets differently from
|
||||
"real" packets. */
|
||||
save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
|
||||
call_dissector(clnp_handle, next_tvb, pinfo, discpdu_tree);
|
||||
|
||||
/* Restore the "we're inside an error packet" flag. */
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
}
|
||||
pinfo->fragmented = save_fragmented;
|
||||
return; /* we're done with this PDU */
|
||||
|
|
|
@ -983,7 +983,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Call sub-dissectors */
|
||||
|
||||
if (!pinfo->in_error_pkt || tvb_length_remaining(tvb, offset) > 0)
|
||||
if (!pinfo->flags.in_error_pkt || tvb_length_remaining(tvb, offset) > 0)
|
||||
decode_dccp_ports(tvb, offset, pinfo, tree, dccph->sport, dccph->dport);
|
||||
}
|
||||
|
||||
|
|
|
@ -1379,7 +1379,7 @@ static void register_dmp_id (packet_info *pinfo, guint8 reason)
|
|||
nstime_t msg_time;
|
||||
guint msg_id = 0;
|
||||
|
||||
if (pinfo->in_error_pkt) {
|
||||
if (pinfo->flags.in_error_pkt) {
|
||||
/* No analysis of error packets */
|
||||
return;
|
||||
}
|
||||
|
@ -1493,7 +1493,7 @@ static void dmp_add_seq_ack_analysis (tvbuff_t *tvb, packet_info *pinfo,
|
|||
nstime_t ns;
|
||||
|
||||
if (dmp.msg_type > ACK || (dmp.msg_type < ACK && !dmp.checksum) ||
|
||||
dmp.id_val == NULL || pinfo->in_error_pkt)
|
||||
dmp.id_val == NULL || pinfo->flags.in_error_pkt)
|
||||
{
|
||||
/* No need for seq/ack analysis */
|
||||
return;
|
||||
|
|
|
@ -940,7 +940,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (code_str)
|
||||
proto_item_append_text (ti, " (%s)", code_str);
|
||||
|
||||
if (!pinfo->fragmented && length >= reported_length && !pinfo->in_error_pkt) {
|
||||
if (!pinfo->fragmented && length >= reported_length && !pinfo->flags.in_error_pkt) {
|
||||
/* The packet isn't part of a fragmented datagram, isn't
|
||||
truncated, and isn't the payload of an error packet, so we can checksum
|
||||
it. */
|
||||
|
@ -1027,8 +1027,8 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
flag, and set that flag; subdissectors may treat packets
|
||||
that are the payload of error packets differently from
|
||||
"real" packets. */
|
||||
save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
|
||||
/* Decode the IP header and first 64 bits of data from the
|
||||
original datagram. */
|
||||
|
@ -1049,7 +1049,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(ip_handle, next_tvb, pinfo, icmp_tree);
|
||||
|
||||
/* Restore the "we're inside an error packet" flag. */
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
|
||||
/* Decode MPLS extensions if the payload has at least 128 bytes, and
|
||||
- the original packet in the ICMP payload has less than 128 bytes, or
|
||||
|
@ -1063,7 +1063,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case ICMP_ECHOREPLY:
|
||||
case ICMP_ECHO:
|
||||
if ( icmp_type == ICMP_ECHOREPLY ) {
|
||||
if ( !pinfo->in_error_pkt ) {
|
||||
if ( !pinfo->flags.in_error_pkt ) {
|
||||
conv_key[0] = (guint32)tvb_get_ntohs(tvb, 2);
|
||||
if (pinfo->flags.in_gre_pkt)
|
||||
conv_key[0] |= 0x00010000; /* set a bit for "in GRE" */
|
||||
|
@ -1072,7 +1072,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
trans = transaction_end(pinfo, icmp_tree, conv_key);
|
||||
}
|
||||
} else {
|
||||
if ( !pinfo->in_error_pkt ) {
|
||||
if ( !pinfo->flags.in_error_pkt ) {
|
||||
guint16 tmp[2];
|
||||
|
||||
tmp[0] = ~tvb_get_ntohs(tvb, 2);
|
||||
|
|
|
@ -1082,8 +1082,8 @@ dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
|
|||
flag, and set that flag; subdissectors may treat packets
|
||||
that are the payload of error packets differently from
|
||||
"real" packets. */
|
||||
save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
|
||||
|
@ -1095,7 +1095,7 @@ dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
|
|||
offset += call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
|
||||
/* Restore the "we're inside an error packet" flag. */
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -3225,7 +3225,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(icmp6_tree, hf_icmpv6_nonce, tvb, offset, 4, ENC_NA);
|
||||
offset += 4;
|
||||
} else {
|
||||
if (!pinfo->in_error_pkt) {
|
||||
if (!pinfo->flags.in_error_pkt) {
|
||||
guint32 conv_key[2];
|
||||
|
||||
conv_key[1] = (guint32)((identifier << 16) | sequence);
|
||||
|
|
|
@ -3516,7 +3516,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
""));
|
||||
|
||||
/* Queue tap info */
|
||||
if (!pinfo->in_error_pkt) {
|
||||
if (!pinfo->flags.in_error_pkt) {
|
||||
tap_queue_packet(mac_lte_tap, pinfo, tap_info);
|
||||
}
|
||||
|
||||
|
@ -3533,7 +3533,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Queue tap info.
|
||||
TODO: unfortunately DL retx detection won't get done if we return here... */
|
||||
if (!pinfo->in_error_pkt) {
|
||||
if (!pinfo->flags.in_error_pkt) {
|
||||
tap_queue_packet(mac_lte_tap, pinfo, tap_info);
|
||||
}
|
||||
|
||||
|
|
|
@ -731,8 +731,8 @@ void dissect_nhrp_mand(tvbuff_t *tvb,
|
|||
gboolean dissected;
|
||||
tvbuff_t *sub_tvb;
|
||||
|
||||
save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
sub_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
if (isErr) {
|
||||
_dissect_nhrp(sub_tvb, pinfo, ind_tree, TRUE, FALSE);
|
||||
|
@ -802,7 +802,7 @@ void dissect_nhrp_mand(tvbuff_t *tvb,
|
|||
ind_tree);
|
||||
}
|
||||
}
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
offset = mandEnd;
|
||||
}
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ static p_mul_seq_val *register_p_mul_id (packet_info *pinfo, address *addr, guin
|
|||
gboolean missing_pdu = FALSE, set_address = FALSE;
|
||||
GHashTable *pkg_list = NULL;
|
||||
|
||||
if (pinfo->in_error_pkt) {
|
||||
if (pinfo->flags.in_error_pkt) {
|
||||
/* No analysis of error packets */
|
||||
return NULL;
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ static void add_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_m
|
|||
guint32 dstIp;
|
||||
nstime_t ns;
|
||||
|
||||
if (pinfo->in_error_pkt) {
|
||||
if (pinfo->flags.in_error_pkt) {
|
||||
/* No analysis of error packets */
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3175,8 +3175,8 @@ dissect_cp( tvbuff_t *tvb, int proto_id, int proto_subtree_index,
|
|||
flag, and set that flag; subdissectors may treat packets
|
||||
that are the payload of error packets differently from
|
||||
"real" packets. */
|
||||
save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
|
||||
/* Decode the rejected packet. */
|
||||
next_tvb = tvb_new_subset(tvb, offset, length, length);
|
||||
|
@ -3186,7 +3186,7 @@ dissect_cp( tvbuff_t *tvb, int proto_id, int proto_subtree_index,
|
|||
}
|
||||
|
||||
/* Restore the "we're inside an error packet" flag. */
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1394,7 +1394,7 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case RADIUS_PKT_TYPE_COA_REQUEST:
|
||||
/* Don't bother creating conversations if we're encapsulated within
|
||||
* an error packet, such as an ICMP destination unreachable */
|
||||
if (pinfo->in_error_pkt)
|
||||
if (pinfo->flags.in_error_pkt)
|
||||
break;
|
||||
|
||||
if (tree)
|
||||
|
@ -1507,7 +1507,7 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case RADIUS_PKT_TYPE_COA_NAK:
|
||||
/* Don't bother finding conversations if we're encapsulated within
|
||||
* an error packet, such as an ICMP destination unreachable */
|
||||
if (pinfo->in_error_pkt)
|
||||
if (pinfo->flags.in_error_pkt)
|
||||
break;
|
||||
|
||||
if (tree)
|
||||
|
|
|
@ -1511,7 +1511,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|||
rtp_info->info_payload_offset = offset;
|
||||
rtp_info->info_payload_len = tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
if (!pinfo->in_error_pkt)
|
||||
if (!pinfo->flags.in_error_pkt)
|
||||
tap_queue_packet(rtp_tap, pinfo, rtp_info);
|
||||
}
|
||||
|
||||
|
|
|
@ -2475,8 +2475,8 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
|
|||
|
||||
case SCCP_MSG_TYPE_UDTS:
|
||||
{
|
||||
gboolean save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
gboolean save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
|
||||
pinfo->sccp_info = sccp_msg = new_ud_msg(pinfo,message_type);
|
||||
|
||||
|
@ -2500,7 +2500,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
|
|||
|
||||
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_DATA,
|
||||
variable_pointer3);
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2669,8 +2669,8 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
|
|||
|
||||
case SCCP_MSG_TYPE_XUDTS:
|
||||
{
|
||||
gboolean save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
gboolean save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
|
||||
pinfo->sccp_info = sccp_msg = new_ud_msg(pinfo,message_type);
|
||||
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
|
||||
|
@ -2752,7 +2752,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
|
|||
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree,
|
||||
PARAMETER_DATA, variable_pointer3);
|
||||
}
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
break;
|
||||
}
|
||||
case SCCP_MSG_TYPE_LUDT:
|
||||
|
|
|
@ -3564,7 +3564,7 @@ dissect_pktdrop_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pi
|
|||
proto_tree_add_item(chunk_tree, hf_pktdrop_chunk_queuesize, chunk_tvb, PKTDROP_CHUNK_QUEUESIZE_OFFSET, PKTDROP_CHUNK_QUEUESIZE_LENGTH, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(chunk_tree, hf_pktdrop_chunk_truncated_length, chunk_tvb, PKTDROP_CHUNK_TRUNCATED_SIZE_OFFSET, PKTDROP_CHUNK_TRUNCATED_SIZE_LENGTH, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(chunk_tree, hf_pktdrop_chunk_reserved, chunk_tvb, PKTDROP_CHUNK_RESERVED_SIZE_OFFSET, PKTDROP_CHUNK_RESERVED_SIZE_LENGTH, ENC_BIG_ENDIAN);
|
||||
/* XXX - set pinfo->in_error_pkt? */
|
||||
/* XXX - set pinfo->flags.in_error_pkt? */
|
||||
if (chunk_length > 0) {
|
||||
if (tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET) & SCTP_PKTDROP_CHUNK_T_BIT)
|
||||
proto_tree_add_item(chunk_tree, hf_pktdrop_chunk_data_field, chunk_tvb, PKTDROP_CHUNK_DATA_FIELD_OFFSET, chunk_length, ENC_NA);
|
||||
|
@ -3994,7 +3994,7 @@ dissect_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
SET_ADDRESS(&sctp_info.ip_dst, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);
|
||||
|
||||
dissect_sctp_packet(tvb, pinfo, tree, FALSE);
|
||||
if (!pinfo->in_error_pkt)
|
||||
if (!pinfo->flags.in_error_pkt)
|
||||
tap_queue_packet(sctp_tap, pinfo, &sctp_info);
|
||||
}
|
||||
|
||||
|
|
|
@ -768,9 +768,9 @@ dissect_sflow_245_sampled_header(tvbuff_t *tvb, packet_info *pinfo,
|
|||
protocols that could be carried as a payload. In the case
|
||||
of sFlow that pretty much means anything on your network.
|
||||
*/
|
||||
save_in_error_pkt = pinfo->in_error_pkt;
|
||||
save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
if (!global_analyze_samp_ip_headers) {
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
}
|
||||
|
||||
col_set_writable(pinfo->cinfo, FALSE);
|
||||
|
@ -850,7 +850,7 @@ dissect_sflow_245_sampled_header(tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
/* restore saved state */
|
||||
col_set_writable(pinfo->cinfo, save_writable);
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
|
||||
pinfo->dl_src = save_dl_src;
|
||||
pinfo->dl_dst = save_dl_dst;
|
||||
|
|
|
@ -2833,7 +2833,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
|
|||
tvb_raw_text_add(tvb, orig_offset, offset - orig_offset, tree);
|
||||
|
||||
/* Report this packet to the tap */
|
||||
if (!pinfo->in_error_pkt)
|
||||
if (!pinfo->flags.in_error_pkt)
|
||||
{
|
||||
tap_queue_packet(sip_tap, pinfo, stat_info);
|
||||
}
|
||||
|
@ -3149,7 +3149,7 @@ guint sip_is_packet_resend(packet_info *pinfo,
|
|||
|
||||
/* Don't consider packets that appear to be resent only because
|
||||
they are e.g. returned in ICMP unreachable messages. */
|
||||
if (pinfo->in_error_pkt)
|
||||
if (pinfo->flags.in_error_pkt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -3348,7 +3348,7 @@ guint sip_find_request(packet_info *pinfo,
|
|||
}
|
||||
|
||||
/* Ignore error (usually ICMP) frames */
|
||||
if (pinfo->in_error_pkt)
|
||||
if (pinfo->flags.in_error_pkt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -3463,7 +3463,7 @@ guint sip_find_invite(packet_info *pinfo,
|
|||
}
|
||||
|
||||
/* Ignore error (usually ICMP) frames */
|
||||
if (pinfo->in_error_pkt)
|
||||
if (pinfo->flags.in_error_pkt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ dissect_t38_T30_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr
|
|||
val_to_str(Data_value,t38_T30_data_vals,"<unknown>"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* info for tap */
|
||||
if (primary_part)
|
||||
t38_info->data_value = Data_value;
|
||||
|
@ -604,7 +604,7 @@ dissect_t38_T_field_type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_
|
|||
FALSE); /* More fragments */
|
||||
if ( Data_Field_field_type_value == 7 ) {
|
||||
/* if there was packet lost or other errors during the defrag then frag_msg is NULL. This could also means
|
||||
* there are out of order packets (e.g, got the tail frame t4-non-ecm-sig-end before the last fragment),
|
||||
* there are out of order packets (e.g, got the tail frame t4-non-ecm-sig-end before the last fragment),
|
||||
* but we will assume there was packet lost instead, which is more usual. So, we are going to reassemble the packet
|
||||
* and get some stat, like packet lost and burst number of packet lost
|
||||
*/
|
||||
|
@ -614,12 +614,12 @@ dissect_t38_T_field_type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_
|
|||
data_fragment_table /* list of message fragments */
|
||||
);
|
||||
} else {
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, " (t4-data Reassembled: No packet lost)");
|
||||
|
||||
col_append_str(actx->pinfo->cinfo, COL_INFO, " (t4-data Reassembled: No packet lost)");
|
||||
|
||||
g_snprintf(t38_info->desc_comment, MAX_T38_DESC, "No packet lost");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (p_t38_packet_conv_info->packet_lost) {
|
||||
g_snprintf(t38_info->desc_comment, MAX_T38_DESC, " Pack lost: %d, Pack burst lost: %d", p_t38_packet_conv_info->packet_lost, p_t38_packet_conv_info->burst_lost);
|
||||
} else {
|
||||
|
@ -632,7 +632,7 @@ dissect_t38_T_field_type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_
|
|||
/* Now reset fragmentation information in pinfo */
|
||||
actx->pinfo->fragmented = save_fragmented;
|
||||
|
||||
t38_info->time_first_t4_data = p_t38_packet_conv_info->time_first_t4_data;
|
||||
t38_info->time_first_t4_data = p_t38_packet_conv_info->time_first_t4_data;
|
||||
t38_info->frame_num_first_t4_data = p_t38_packet_conv_info->reass_ID; /* The reass_ID is the Frame number of the first t4 fragment */
|
||||
|
||||
} else {
|
||||
|
@ -700,7 +700,7 @@ dissect_t38_T_field_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_
|
|||
if (primary_part && (Data_Field_item_num<2)) {
|
||||
tvbuff_t* new_tvb = NULL;
|
||||
fragment_data *frag_msg = NULL;
|
||||
|
||||
|
||||
/* HDLC Data or t4-non-ecm-data */
|
||||
if (Data_Field_field_type_value == 0 || Data_Field_field_type_value == 6) { /* 0=HDLC Data or 6=t4-non-ecm-data*/
|
||||
gboolean save_fragmented = actx->pinfo->fragmented;
|
||||
|
@ -818,7 +818,7 @@ dissect_t38_T_primary_ifp_packet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *
|
|||
|
||||
#line 237 "../../asn1/t38/t38.cnf"
|
||||
/* if is a valid t38 packet, add to tap */
|
||||
if (p_t38_packet_conv && (!actx->pinfo->in_error_pkt) && ((gint32) seq_number != p_t38_packet_conv_info->last_seqnum))
|
||||
if (p_t38_packet_conv && (!actx->pinfo->flags.in_error_pkt) && ((gint32) seq_number != p_t38_packet_conv_info->last_seqnum))
|
||||
tap_queue_packet(t38_tap, actx->pinfo, t38_info);
|
||||
|
||||
if (p_t38_conv) p_t38_conv_info->last_seqnum = (gint32) seq_number;
|
||||
|
|
|
@ -3864,7 +3864,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
*/
|
||||
reported_len = tvb_reported_length(tvb);
|
||||
|
||||
if (!pinfo->fragmented && !pinfo->in_error_pkt) {
|
||||
if (!pinfo->fragmented && !pinfo->flags.in_error_pkt) {
|
||||
if (reported_len < tcph->th_hlen) {
|
||||
proto_item *pi;
|
||||
pi = proto_tree_add_text(tcp_tree, tvb, offset, 0,
|
||||
|
@ -4220,7 +4220,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* We're willing to desegment this. Is desegmentation enabled? */
|
||||
if (tcp_desegment) {
|
||||
/* Yes - is this segment being returned in an error packet? */
|
||||
if (!pinfo->in_error_pkt) {
|
||||
if (!pinfo->flags.in_error_pkt) {
|
||||
/* No - indicate that we will desegment.
|
||||
We do NOT want to desegment segments returned in error
|
||||
packets, as they're not part of a TCP connection. */
|
||||
|
|
|
@ -368,7 +368,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, " [BAD UDP LENGTH %u < 8]", udph->uh_ulen);
|
||||
return;
|
||||
}
|
||||
if ((udph->uh_ulen > tvb_reported_length(tvb)) && ! pinfo->fragmented && ! pinfo->in_error_pkt) {
|
||||
if ((udph->uh_ulen > tvb_reported_length(tvb)) && ! pinfo->fragmented && ! pinfo->flags.in_error_pkt) {
|
||||
/* Bogus length - it goes past the end of the IP payload */
|
||||
item = proto_tree_add_uint_format(udp_tree, hf_udp_length, tvb, offset + 4, 2,
|
||||
udph->uh_ulen, "Length: %u (bogus, payload length %u)", udph->uh_ulen, tvb_reported_length(tvb));
|
||||
|
@ -585,7 +585,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
|
|||
* We definitely don't want to do it for an error packet if there's
|
||||
* nothing left in the packet.
|
||||
*/
|
||||
if (!pinfo->in_error_pkt || tvb_length_remaining(tvb, offset) > 0)
|
||||
if (!pinfo->flags.in_error_pkt || tvb_length_remaining(tvb, offset) > 0)
|
||||
decode_udp_ports(tvb, offset, pinfo, tree, udph->uh_sport, udph->uh_dport,
|
||||
udph->uh_ulen);
|
||||
}
|
||||
|
|
|
@ -1702,15 +1702,15 @@ dissect_vines_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
* that are the payload of error packets differently from
|
||||
* "real" packets.
|
||||
*/
|
||||
save_in_error_pkt = pinfo->in_error_pkt;
|
||||
pinfo->in_error_pkt = TRUE;
|
||||
save_in_error_pkt = pinfo->flags.in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = TRUE;
|
||||
|
||||
/* Decode the first 40 bytes of the original VIP datagram. */
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
call_dissector(vines_ip_handle, next_tvb, pinfo, vines_icp_tree);
|
||||
|
||||
/* Restore the "we're inside an error packet" flag. */
|
||||
pinfo->in_error_pkt = save_in_error_pkt;
|
||||
pinfo->flags.in_error_pkt = save_in_error_pkt;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -468,7 +468,7 @@ call_dissector_work(dissector_handle_t handle, tvbuff_t *tvb,
|
|||
}
|
||||
}
|
||||
|
||||
if (pinfo->in_error_pkt) {
|
||||
if (pinfo->flags.in_error_pkt) {
|
||||
ret = call_dissector_work_error(handle, tvb, pinfo, tree);
|
||||
} else {
|
||||
/*
|
||||
|
|
|
@ -65,8 +65,8 @@ typedef struct _packet_info {
|
|||
guint32 circuit_id; /* circuit ID, for protocols with a VC identifier */
|
||||
const char *noreassembly_reason; /* reason why reassembly wasn't done, if any */
|
||||
gboolean fragmented; /* TRUE if the protocol is only a fragment */
|
||||
gboolean in_error_pkt; /* TRUE if we're inside an {ICMP,CLNP,...} error packet */
|
||||
struct {
|
||||
guint32 in_error_pkt:1; /* TRUE if we're inside an {ICMP,CLNP,...} error packet */
|
||||
guint32 in_gre_pkt:1; /* TRUE if we're encapsulated inside a GRE packet */
|
||||
} flags;
|
||||
port_type ptype; /* type of the following two port numbers */
|
||||
|
|
|
@ -1005,7 +1005,7 @@ static int Pinfo_tostring(lua_State *L) { lua_pushstring(L,"a Pinfo"); return 1;
|
|||
}
|
||||
|
||||
PINFO_GET_BOOLEAN(Pinfo_fragmented,pinfo->ws_pinfo->fragmented)
|
||||
PINFO_GET_BOOLEAN(Pinfo_in_error_pkt,pinfo->ws_pinfo->in_error_pkt)
|
||||
PINFO_GET_BOOLEAN(Pinfo_in_error_pkt,pinfo->ws_pinfo->flags.in_error_pkt)
|
||||
PINFO_GET_BOOLEAN(Pinfo_visited,pinfo->ws_pinfo->fd->flags.visited)
|
||||
|
||||
PINFO_GET_NUMBER(Pinfo_number,pinfo->ws_pinfo->fd->num)
|
||||
|
|
Loading…
Reference in New Issue