diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-03-18 23:01:22 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-19 05:13:30 +0000 |
commit | 488f2a097402b1bfb941547939d13fbcbb90c6c9 (patch) | |
tree | 9d7b38d10b565d2928282517aa270ab5929cef11 /epan/dissectors | |
parent | 30ba425e7e95f7b61b3a3e5ff0c46e4be9d3d8d7 (diff) |
Exported PDU: add support for data length on the wire
Change-Id: Iff14ec4d0297ec85f3597b33871fb0ab5256a597
Reviewed-on: https://code.wireshark.org/review/728
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-credssp.c | 7 | ||||
-rw-r--r-- | epan/dissectors/packet-diameter.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-dtls.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-dvbci.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-ipsec.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-logcat.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-reload-framing.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-sctp.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-sip.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-ssl.c | 3 |
10 files changed, 23 insertions, 13 deletions
diff --git a/epan/dissectors/packet-credssp.c b/epan/dissectors/packet-credssp.c index 240e0c56cc..2f01b59e80 100644 --- a/epan/dissectors/packet-credssp.c +++ b/epan/dissectors/packet-credssp.c @@ -383,7 +383,8 @@ dissect_credssp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = tvb_length(tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); @@ -506,7 +507,7 @@ void proto_register_credssp(void) { "OCTET_STRING", HFILL }}, /*--- End of included file: packet-credssp-hfarr.c ---*/ -#line 149 "../../asn1/credssp/packet-credssp-template.c" +#line 150 "../../asn1/credssp/packet-credssp-template.c" }; /* List of subtrees */ @@ -524,7 +525,7 @@ void proto_register_credssp(void) { &ett_credssp_TSRequest, /*--- End of included file: packet-credssp-ettarr.c ---*/ -#line 155 "../../asn1/credssp/packet-credssp-template.c" +#line 156 "../../asn1/credssp/packet-credssp-template.c" }; diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index 29f6cd61b5..1b20ee547c 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -340,7 +340,8 @@ export_diameter_pdu(packet_info *pinfo, tvbuff_t *tvb) exp_pdu_data = load_export_pdu_tags(pinfo, "diameter", -1, tags_bit_field); - exp_pdu_data->tvb_length = tvb_length(tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index 67d53e230b..628ba19f04 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -1040,7 +1040,8 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo, (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = tvb_length(next_tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(next_tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(next_tvb); exp_pdu_data->pdu_tvb = next_tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index 1a74095e21..9c1a427ac4 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -3417,7 +3417,8 @@ dissect_sac_msg(guint32 tag, tvbuff_t *tvb, gint offset, exp_pdu_data = load_export_pdu_tags( pinfo, EXPORTED_SAC_MSG_PROTO, -1, EXP_PDU_TAG_DVBCI_EVT_BIT); - exp_pdu_data->tvb_length = tvb_length(clear_sac_msg_tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(clear_sac_msg_tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(clear_sac_msg_tvb); exp_pdu_data->pdu_tvb = clear_sac_msg_tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); } diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c index a07281c398..7ff497e04e 100644 --- a/epan/dissectors/packet-ipsec.c +++ b/epan/dissectors/packet-ipsec.c @@ -868,7 +868,8 @@ export_ipsec_pdu(dissector_handle_t dissector_handle, packet_info *pinfo, tvbuff (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = tvb_length(tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-logcat.c b/epan/dissectors/packet-logcat.c index 9e7660d778..1a0b5e2b5e 100644 --- a/epan/dissectors/packet-logcat.c +++ b/epan/dissectors/packet-logcat.c @@ -179,7 +179,8 @@ dissect_logcat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ exp_pdu_data_t *exp_pdu_data; exp_pdu_data = load_export_pdu_tags(pinfo, "logcat", -1, EXP_PDU_TAG_END_OF_OPT); - exp_pdu_data->tvb_length = tvb_length(tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); } diff --git a/epan/dissectors/packet-reload-framing.c b/epan/dissectors/packet-reload-framing.c index c60378bd66..000a1ed190 100644 --- a/epan/dissectors/packet-reload-framing.c +++ b/epan/dissectors/packet-reload-framing.c @@ -129,7 +129,7 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr guint8 type; offset = 0; - effective_length = tvb_length(tvb); + effective_length = tvb_captured_length(tvb); /* First, make sure we have enough data to do the check. */ if (effective_length < MIN_HDR_LENGTH) @@ -180,7 +180,8 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = effective_length; + exp_pdu_data->tvb_captured_length = effective_length; + exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 2653d5ff23..5c0e3e9067 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -3046,7 +3046,8 @@ export_sctp_data_chunk(packet_info *pinfo, tvbuff_t *tvb, const gchar *proto_nam exp_pdu_data = load_export_pdu_tags(pinfo, proto_name, -1, tags_bit_field); - exp_pdu_data->tvb_length = tvb_captured_length(tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 09bec53be8..399a4a7f60 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -994,7 +994,8 @@ export_sip_pdu(packet_info *pinfo, tvbuff_t *tvb) exp_pdu_data = load_export_pdu_tags(pinfo, "sip", -1, tags_bit_field); - exp_pdu_data->tvb_length = tvb_length(tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb); exp_pdu_data->pdu_tvb = tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index 0e54dfc6c1..8cb95714f5 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -1369,7 +1369,8 @@ process_ssl_payload(tvbuff_t *tvb, volatile int offset, packet_info *pinfo, (EXP_PDU_TAG_IP_SRC_BIT | EXP_PDU_TAG_IP_DST_BIT | EXP_PDU_TAG_SRC_PORT_BIT | EXP_PDU_TAG_DST_PORT_BIT | EXP_PDU_TAG_ORIG_FNO_BIT)); - exp_pdu_data->tvb_length = tvb_length(next_tvb); + exp_pdu_data->tvb_captured_length = tvb_captured_length(next_tvb); + exp_pdu_data->tvb_reported_length = tvb_reported_length(next_tvb); exp_pdu_data->pdu_tvb = next_tvb; tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); |