diff options
author | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-11-08 18:39:11 +0000 |
---|---|---|
committer | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-11-08 18:39:11 +0000 |
commit | 5d8957c23069a377523340956cf1ed4de1e41132 (patch) | |
tree | 1a4461ad4786db83858b22614f47a4e6d46c7942 | |
parent | e51af0a83843930616615eb2eb6ade474a8beaf0 (diff) |
packet_info's in_error_pkt is now a bitfield like in_gre_pkt.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39764 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | asn1/t38/t38.cnf | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-clnp.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-dccp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-dmp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-icmp.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-icmpv6.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-mac-lte.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-nhrp.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-p_mul.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ppp.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-radius.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-rtp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-sccp.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-sctp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-sflow.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-sip.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-t38.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-tcp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-udp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-vines.c | 6 | ||||
-rw-r--r-- | epan/packet.c | 2 | ||||
-rw-r--r-- | epan/packet_info.h | 2 | ||||
-rw-r--r-- | epan/wslua/wslua_pinfo.c | 2 |
23 files changed, 71 insertions, 71 deletions
diff --git a/asn1/t38/t38.cnf b/asn1/t38/t38.cnf index ae82680e38..6195f153b8 100644 --- a/asn1/t38/t38.cnf +++ b/asn1/t38/t38.cnf @@ -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; diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c index 0ec999eddf..af687f5f5a 100644 --- a/epan/dissectors/packet-clnp.c +++ b/epan/dissectors/packet-clnp.c @@ -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 */ diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c index 791c1bbb52..93f8784b65 100644 --- a/epan/dissectors/packet-dccp.c +++ b/epan/dissectors/packet-dccp.c @@ -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); } diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index 6eaddc15bd..d142a0b33d 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -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; diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index eb0522bb3c..db227547b3 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -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); diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index 9937601ae1..3b2b5ee474 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -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); diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index 0266b03a00..bc04f31119 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -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); } diff --git a/epan/dissectors/packet-nhrp.c b/epan/dissectors/packet-nhrp.c index 416d14a570..94009dcb05 100644 --- a/epan/dissectors/packet-nhrp.c +++ b/epan/dissectors/packet-nhrp.c @@ -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; } diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c index 69964ae59d..ead478868b 100644 --- a/epan/dissectors/packet-p_mul.c +++ b/epan/dissectors/packet-p_mul.c @@ -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; } diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index 37476e921b..fe6b842db0 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -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; diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index 4ab236a5b5..054393b53c 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -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) diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index a8f9fdf21b..614dc21ebb 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -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); } diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c index 09dfec9ad7..e7c0377ec8 100644 --- a/epan/dissectors/packet-sccp.c +++ b/epan/dissectors/packet-sccp.c @@ -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: diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 0f367cd0a0..077d14d5e7 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -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); } diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c index 265defc7ef..1cafea508f 100644 --- a/epan/dissectors/packet-sflow.c +++ b/epan/dissectors/packet-sflow.c @@ -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; diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 682cbf853f..8eaf3112ea 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -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; } diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index b2e1eeb2ce..3a76d0cc7f 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -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; diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 2171adcbf7..7c3f705e6d 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -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. */ diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index 1cb2c57492..575c0ddf9e 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -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); } diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c index 529af356e1..16984a5204 100644 --- a/epan/dissectors/packet-vines.c +++ b/epan/dissectors/packet-vines.c @@ -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 diff --git a/epan/packet.c b/epan/packet.c index b569ff1ec7..26656de050 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -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 { /* diff --git a/epan/packet_info.h b/epan/packet_info.h index c0a7c3f4b0..95e1045f46 100644 --- a/epan/packet_info.h +++ b/epan/packet_info.h @@ -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 */ diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c index 252f2aeb02..d5fd5750aa 100644 --- a/epan/wslua/wslua_pinfo.c +++ b/epan/wslua/wslua_pinfo.c @@ -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) |