summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/t38
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/asn1/t38
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/t38')
-rw-r--r--epan/dissectors/asn1/t38/packet-t38-template.c137
-rw-r--r--epan/dissectors/asn1/t38/packet-t38-template.h42
-rw-r--r--epan/dissectors/asn1/t38/t38.cnf56
3 files changed, 118 insertions, 117 deletions
diff --git a/epan/dissectors/asn1/t38/packet-t38-template.c b/epan/dissectors/asn1/t38/packet-t38-template.c
index 852885c1..8244444d 100644
--- a/epan/dissectors/asn1/t38/packet-t38-template.c
+++ b/epan/dissectors/asn1/t38/packet-t38-template.c
@@ -14,12 +14,12 @@
/* Depending on what ASN.1 specification is used you may have to change
* the preference setting regarding Pre-Corrigendum ASN.1 specification:
- * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/1998/T38.html (Pre-Corrigendum=TRUE)
- * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2003/T38(1998).html (Pre-Corrigendum=TRUE)
+ * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/1998/T38.html (Pre-Corrigendum=true)
+ * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2003/T38(1998).html (Pre-Corrigendum=true)
*
- * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2003/T38(2002).html (Pre-Corrigendum=FALSE)
- * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2002/t38.html (Pre-Corrigendum=FALSE)
- * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2002-Amd1/T38.html (Pre-Corrigendum=FALSE)
+ * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2003/T38(2002).html (Pre-Corrigendum=false)
+ * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2002/t38.html (Pre-Corrigendum=false)
+ * http://www.itu.int/ITU-T/asn1/database/itu-t/t/t38/2002-Amd1/T38.html (Pre-Corrigendum=false)
*/
/* TO DO:
@@ -42,6 +42,7 @@
#include <epan/ipproto.h>
#include <epan/asn1.h>
#include <epan/proto_data.h>
+#include <wsutil/array.h>
#include "packet-t38.h"
#include "packet-per.h"
@@ -50,20 +51,20 @@
void proto_register_t38(void);
-static int t38_tap = -1;
+static int t38_tap;
/* dissect using the Pre Corrigendum T.38 ASN.1 specification (1998) */
-static gboolean use_pre_corrigendum_asn1_specification = TRUE;
+static bool use_pre_corrigendum_asn1_specification = true;
/* dissect packets that looks like RTP version 2 packets as RTP */
/* instead of as T.38. This may result in that some T.38 UPTL */
/* packets with sequence number values higher than 32767 may be */
/* shown as RTP packets. */
-static gboolean dissect_possible_rtpv2_packets_as_rtp = FALSE;
+static bool dissect_possible_rtpv2_packets_as_rtp;
/* Reassembly of T.38 PDUs over TPKT over TCP */
-static gboolean t38_tpkt_reassembly = TRUE;
+static bool t38_tpkt_reassembly = true;
/* Preference setting whether TPKT header is used when sending T.38 over TCP.
* The default setting is Maybe where the dissector will look on the first
@@ -74,7 +75,7 @@ static gboolean t38_tpkt_reassembly = TRUE;
#define T38_TPKT_NEVER 0 /* Assume that there is never a TPKT header */
#define T38_TPKT_ALWAYS 1 /* Assume that there is always a TPKT header */
#define T38_TPKT_MAYBE 2 /* Assume TPKT if first octets are 03-00-xx-xx */
-static gint t38_tpkt_usage = T38_TPKT_MAYBE;
+static int t38_tpkt_usage = T38_TPKT_MAYBE;
static const enum_val_t t38_tpkt_options[] = {
{"never", "Never", T38_TPKT_NEVER},
@@ -93,44 +94,44 @@ static dissector_handle_t rtp_handle;
static dissector_handle_t t30_hdlc_handle;
static dissector_handle_t data_handle;
-static gint32 Type_of_msg_value;
-static guint32 Data_Field_field_type_value;
-static guint32 Data_value;
-static guint32 T30ind_value;
-static guint32 Data_Field_item_num;
+static int32_t Type_of_msg_value;
+static uint32_t Data_Field_field_type_value;
+static uint32_t Data_value;
+static uint32_t T30ind_value;
+static uint32_t Data_Field_item_num;
-static int proto_t38 = -1;
-static int proto_acdr = -1;
+static int proto_t38;
+static int proto_acdr;
#include "packet-t38-hf.c"
/* T38 setup fields */
-static int hf_t38_setup = -1;
-static int hf_t38_setup_frame = -1;
-static int hf_t38_setup_method = -1;
+static int hf_t38_setup;
+static int hf_t38_setup_frame;
+static int hf_t38_setup_method;
/* T38 Data reassemble fields */
-static int hf_t38_fragments = -1;
-static int hf_t38_fragment = -1;
-static int hf_t38_fragment_overlap = -1;
-static int hf_t38_fragment_overlap_conflicts = -1;
-static int hf_t38_fragment_multiple_tails = -1;
-static int hf_t38_fragment_too_long_fragment = -1;
-static int hf_t38_fragment_error = -1;
-static int hf_t38_fragment_count = -1;
-static int hf_t38_reassembled_in = -1;
-static int hf_t38_reassembled_length = -1;
-
-static gint ett_t38 = -1;
+static int hf_t38_fragments;
+static int hf_t38_fragment;
+static int hf_t38_fragment_overlap;
+static int hf_t38_fragment_overlap_conflicts;
+static int hf_t38_fragment_multiple_tails;
+static int hf_t38_fragment_too_long_fragment;
+static int hf_t38_fragment_error;
+static int hf_t38_fragment_count;
+static int hf_t38_reassembled_in;
+static int hf_t38_reassembled_length;
+
+static int ett_t38;
#include "packet-t38-ett.c"
-static gint ett_t38_setup = -1;
+static int ett_t38_setup;
-static gint ett_data_fragment = -1;
-static gint ett_data_fragments = -1;
+static int ett_data_fragment;
+static int ett_data_fragments;
-static expert_field ei_t38_malformed = EI_INIT;
+static expert_field ei_t38_malformed;
-static gboolean primary_part = TRUE;
-static guint32 seq_number = 0;
+static bool primary_part = true;
+static uint32_t seq_number;
/* Tables for reassembly of Data fragments. */
static reassembly_table data_reassembly_table;
@@ -161,14 +162,14 @@ static const fragment_items data_frag_items = {
typedef struct _fragment_key {
address src;
address dst;
- guint32 id;
+ uint32_t id;
} fragment_key;
-static conversation_t *p_conv= NULL;
-static t38_conv *p_t38_conv = NULL;
-static t38_conv *p_t38_packet_conv = NULL;
-static t38_conv_info *p_t38_conv_info = NULL;
-static t38_conv_info *p_t38_packet_conv_info = NULL;
+static conversation_t *p_conv;
+static t38_conv *p_t38_conv;
+static t38_conv *p_t38_packet_conv;
+static t38_conv_info *p_t38_conv_info;
+static t38_conv_info *p_t38_packet_conv_info;
/* RTP Version is the first 2 bits of the first octet in the UDP payload*/
#define RTP_VERSION(octet) ((octet) >> 6)
@@ -177,21 +178,21 @@ void proto_reg_handoff_t38(void);
static void show_setup_info(tvbuff_t *tvb, proto_tree *tree, t38_conv *p_t38_conv);
/* Preferences bool to control whether or not setup info should be shown */
-static gboolean global_t38_show_setup_info = TRUE;
+static bool global_t38_show_setup_info = true;
/* Can tap up to 4 T38 packets within same packet */
/* We only tap the primary part, not the redundancy */
#define MAX_T38_MESSAGES_IN_PACKET 4
static t38_packet_info t38_info_arr[MAX_T38_MESSAGES_IN_PACKET];
static int t38_info_current=0;
-static t38_packet_info *t38_info=NULL;
+static t38_packet_info *t38_info;
/* Set up an T38 conversation */
void t38_add_address(packet_info *pinfo,
address *addr, int port,
int other_port,
- const gchar *setup_method, guint32 setup_frame_number)
+ const char *setup_method, uint32_t setup_frame_number)
{
address null_addr;
conversation_t* p_conversation;
@@ -221,7 +222,7 @@ void t38_add_address(packet_info *pinfo,
*/
if ( !p_conversation || p_conversation->setup_frame != setup_frame_number) {
p_conversation = conversation_new( setup_frame_number, addr, &null_addr, CONVERSATION_UDP,
- (guint32)port, (guint32)other_port,
+ (uint32_t)port, (uint32_t)other_port,
NO_ADDR2 | (!other_port ? NO_PORT2 : 0));
}
@@ -275,13 +276,13 @@ void t38_add_address(packet_info *pinfo,
static fragment_head *
-force_reassemble_seq(reassembly_table *table, packet_info *pinfo, guint32 id)
+force_reassemble_seq(reassembly_table *table, packet_info *pinfo, uint32_t id)
{
fragment_head *fd_head;
fragment_item *fd_i;
fragment_item *last_fd;
- guint32 dfpos, size, packet_lost, burst_lost, seq_num;
- guint8 *data;
+ uint32_t dfpos, size, packet_lost, burst_lost, seq_num;
+ uint8_t *data;
fd_head = fragment_get(table, pinfo, id, NULL);
@@ -325,7 +326,7 @@ force_reassemble_seq(reassembly_table *table, packet_info *pinfo, guint32 id)
last_fd=fd_i;
}
- data = (guint8 *) g_malloc(size);
+ data = (uint8_t *) g_malloc(size);
fd_head->tvb_data = tvb_new_real_data(data, size, size);
tvb_set_free_cb(fd_head->tvb_data, g_free);
fd_head->len = size; /* record size for caller */
@@ -416,7 +417,7 @@ init_t38_info_conv(packet_info *pinfo)
conversation_pt_to_conversation_type(pinfo->ptype),
pinfo->destport, pinfo->srcport, NO_ADDR_B | NO_PORT_B);
- /* create a conv if it doen't exist */
+ /* create a conv if it doesn't exist */
if (!p_conv) {
p_conv = conversation_new(pinfo->num, &pinfo->net_src, &pinfo->net_dst,
conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2 | NO_PORT2);
@@ -488,16 +489,16 @@ init_t38_info_conv(packet_info *pinfo)
static int
dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint8 octet1;
+ uint8_t octet1;
proto_item *it;
proto_tree *tr;
- guint32 offset=0;
+ uint32_t offset=0;
/*
* XXX - heuristic to check for misidentified packets.
*/
if (dissect_possible_rtpv2_packets_as_rtp){
- octet1 = tvb_get_guint8(tvb, offset);
+ octet1 = tvb_get_uint8(tvb, offset);
if (RTP_VERSION(octet1) == 2){
return call_dissector(rtp_handle,tvb,pinfo,tree);
}
@@ -506,7 +507,7 @@ dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.38");
col_clear(pinfo->cinfo, COL_INFO);
- primary_part = TRUE;
+ primary_part = true;
/* This indicate the item number in the primary part of the T38 message, it is used for the reassemble of T30 packets */
Data_Field_item_num = 0;
@@ -539,14 +540,14 @@ dissect_t38_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
{
proto_item *it;
proto_tree *tr;
- guint32 offset=0;
+ uint32_t offset=0;
tvbuff_t *next_tvb;
- guint16 ifp_packet_number=1;
+ uint16_t ifp_packet_number=1;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.38");
col_clear(pinfo->cinfo, COL_INFO);
- primary_part = TRUE;
+ primary_part = true;
/* This indicate the item number in the primary part of the T38 message, it is used for the reassemble of T30 packets */
Data_Field_item_num = 0;
@@ -588,7 +589,7 @@ dissect_t38_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
static int
dissect_t38_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- primary_part = TRUE;
+ primary_part = true;
if(t38_tpkt_usage == T38_TPKT_ALWAYS){
dissect_tpkt_encap(tvb,pinfo,tree,t38_tpkt_reassembly,t38_tcp_pdu_handle);
@@ -634,13 +635,13 @@ show_setup_info(tvbuff_t *tvb, proto_tree *tree, t38_conv *p_t38_conversation)
}
/* This function tries to understand if the payload is sitting on top of AC DR */
-static gboolean
-dissect_t38_acdr_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+static bool
+dissect_t38_acdr_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- guint acdr_prot = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_acdr, 0));
+ unsigned acdr_prot = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_acdr, 0));
if (acdr_prot == ACDR_T38)
- return dissect_t38_udp(tvb, pinfo, tree, NULL);
- return FALSE;
+ return dissect_t38_udp(tvb, pinfo, tree, data);
+ return false;
}
@@ -694,7 +695,7 @@ proto_register_t38(void)
FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_t38,
#include "packet-t38-ettarr.c"
@@ -747,7 +748,7 @@ proto_register_t38(void)
prefs_register_enum_preference(t38_module, "tpkt_usage",
"TPKT used over TCP",
"Whether T.38 is used with TPKT for TCP",
- (gint *)&t38_tpkt_usage,t38_tpkt_options,FALSE);
+ (int *)&t38_tpkt_usage,t38_tpkt_options,false);
prefs_register_bool_preference(t38_module, "show_setup_info",
"Show stream setup information",
diff --git a/epan/dissectors/asn1/t38/packet-t38-template.h b/epan/dissectors/asn1/t38/packet-t38-template.h
index 82ff1483..fa316867 100644
--- a/epan/dissectors/asn1/t38/packet-t38-template.h
+++ b/epan/dissectors/asn1/t38/packet-t38-template.h
@@ -17,17 +17,17 @@
#define MAX_T38_DESC 128
typedef struct _t38_packet_info {
- guint16 seq_num; /* UDPTLPacket sequence number */
- gint32 type_msg; /* 0=t30-indicator 1=data */
- guint32 t30ind_value;
- guint32 data_value; /* standard and speed */
- guint32 setup_frame_number;
- guint32 Data_Field_field_type_value;
- guint8 t30_Facsimile_Control;
- gchar desc[MAX_T38_DESC]; /* Description used to be displayed in the frame label Graph Anlaysis */
- gchar desc_comment[MAX_T38_DESC]; /* Description used to be displayed in the Comment Graph Anlaysis */
+ uint16_t seq_num; /* UDPTLPacket sequence number */
+ int32_t type_msg; /* 0=t30-indicator 1=data */
+ uint32_t t30ind_value;
+ uint32_t data_value; /* standard and speed */
+ uint32_t setup_frame_number;
+ uint32_t Data_Field_field_type_value;
+ uint8_t t30_Facsimile_Control;
+ char desc[MAX_T38_DESC]; /* Description used to be displayed in the frame label Graph Analysis */
+ char desc_comment[MAX_T38_DESC]; /* Description used to be displayed in the Comment Graph Analysis */
double time_first_t4_data;
- guint32 frame_num_first_t4_data;
+ uint32_t frame_num_first_t4_data;
} t38_packet_info;
@@ -39,16 +39,16 @@ typedef struct _t38_conv_info t38_conv_info;
struct _t38_conv_info {
- guint32 reass_ID;
+ uint32_t reass_ID;
int reass_start_seqnum;
- guint32 reass_start_data_field;
- guint32 reass_data_type;
- gint32 last_seqnum; /* used to avoid duplicated seq num shown in the Graph Analysis */
- guint32 packet_lost;
- guint32 burst_lost;
+ uint32_t reass_start_data_field;
+ uint32_t reass_data_type;
+ int32_t last_seqnum; /* used to avoid duplicated seq num shown in the Graph Analysis */
+ uint32_t packet_lost;
+ uint32_t burst_lost;
double time_first_t4_data;
- guint32 additional_hdlc_data_field_counter;
- gint32 seqnum_prev_data_field;
+ uint32_t additional_hdlc_data_field_counter;
+ int32_t seqnum_prev_data_field;
t38_conv_info *next;
};
@@ -56,8 +56,8 @@ struct _t38_conv_info {
/* Info to save the State to reassemble Data (e.g. HDLC) and the Setup (e.g. SDP) in T38 conversations */
typedef struct _t38_conv
{
- gchar setup_method[MAX_T38_SETUP_METHOD_SIZE + 1];
- guint32 setup_frame_number;
+ char setup_method[MAX_T38_SETUP_METHOD_SIZE + 1];
+ uint32_t setup_frame_number;
t38_conv_info src_t38_info;
t38_conv_info dst_t38_info;
} t38_conv;
@@ -67,7 +67,7 @@ WS_DLL_PUBLIC
void t38_add_address(packet_info *pinfo,
address *addr, int port,
int other_port,
- const gchar *setup_method, guint32 setup_frame_number);
+ const char *setup_method, uint32_t setup_frame_number);
#include "packet-t38-exp.h"
diff --git a/epan/dissectors/asn1/t38/t38.cnf b/epan/dissectors/asn1/t38/t38.cnf
index 7b8fad22..d788f76f 100644
--- a/epan/dissectors/asn1/t38/t38.cnf
+++ b/epan/dissectors/asn1/t38/t38.cnf
@@ -28,7 +28,7 @@ UDPTLPacket
#.FN_FTR Type-of-msg/t30-indicator
if (primary_part){
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " t30ind: %s",
- val_to_str(T30ind_value,t38_T30_indicator_vals,"<unknown>"));
+ val_to_str_const(T30ind_value,t38_T30_indicator_vals,"<unknown>"));
}
/* info for tap */
@@ -40,7 +40,7 @@ UDPTLPacket
#.FN_FTR Type-of-msg/t30-data
if (primary_part){
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " data:%s:",
- val_to_str(Data_value,t38_T30_data_vals,"<unknown>"));
+ val_to_str_const(Data_value,t38_T30_data_vals,"<unknown>"));
}
@@ -54,30 +54,30 @@ UDPTLPacket
#.END
#.FN_PARS Data-Field/_item/field-type
-EXT=(use_pre_corrigendum_asn1_specification)?FALSE:TRUE
+EXT=(use_pre_corrigendum_asn1_specification)?false:true
EXT_NUM=(use_pre_corrigendum_asn1_specification)?0:4
VAL_PTR=&Data_Field_field_type_value
#.FN_FTR Data-Field/_item/field-type
if (primary_part){
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s",
- val_to_str(Data_Field_field_type_value,t38_T_field_type_vals,"<unknown>"));
+ val_to_str_const(Data_Field_field_type_value,t38_T_field_type_vals,"<unknown>"));
}
if (primary_part) {
if (Data_Field_field_type_value == 2 || Data_Field_field_type_value == 4 || Data_Field_field_type_value == 7) {/* hdlc-fcs-OK or hdlc-fcs-OK-sig-end or t4-non-ecm-sig-end*/
fragment_head *frag_msg = NULL;
tvbuff_t* new_tvb = NULL;
- gboolean save_fragmented = actx->pinfo->fragmented;
+ bool save_fragmented = actx->pinfo->fragmented;
- actx->pinfo->fragmented = TRUE;
+ actx->pinfo->fragmented = true;
/* if reass_start_seqnum=-1 it means we have received the end of the fragmente, without received any fragment data */
if (p_t38_packet_conv_info->reass_start_seqnum != -1) {
- guint32 frag_seq_num;
- if (seq_number == (guint32)p_t38_packet_conv_info->reass_start_seqnum) {
- frag_seq_num = (guint32)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num - p_t38_packet_conv_info->reass_start_data_field;
+ uint32_t frag_seq_num;
+ if (seq_number == (uint32_t)p_t38_packet_conv_info->reass_start_seqnum) {
+ frag_seq_num = (uint32_t)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num - p_t38_packet_conv_info->reass_start_data_field;
} else {
- frag_seq_num = seq_number - (guint32)p_t38_packet_conv_info->reass_start_seqnum + (guint32)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num;
+ frag_seq_num = seq_number - (uint32_t)p_t38_packet_conv_info->reass_start_seqnum + (uint32_t)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num;
}
frag_msg = fragment_add_seq(&data_reassembly_table, /* reassembly table */
tvb, offset, actx->pinfo,
@@ -86,7 +86,7 @@ VAL_PTR=&Data_Field_field_type_value
frag_seq_num, /* fragment sequence number */
/*0,*/
0, /* fragment length */
- FALSE, /* More fragments */
+ false, /* More fragments */
0);
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
@@ -135,7 +135,7 @@ VAL_PTR=&Data_Field_field_type_value
* (i.e., a retransmission), we don't expect to have any
* fragment data (we reassembled it in the previous packet).
*/
- if (p_t38_packet_conv && ((gint32) seq_number != p_t38_packet_conv_info->last_seqnum)) {
+ if (p_t38_packet_conv && ((int32_t) seq_number != p_t38_packet_conv_info->last_seqnum)) {
proto_tree_add_expert_format(tree, actx->pinfo, &ei_t38_malformed, tvb, offset, tvb_reported_length_remaining(tvb, offset),
"[RECEIVED END OF FRAGMENT W/OUT ANY FRAGMENT DATA]");
col_append_str(actx->pinfo->cinfo, COL_INFO, " [Malformed?]");
@@ -164,7 +164,7 @@ VAL_PTR=&Data_Field_field_type_value
#.FN_BODY Data-Field/_item/field-data VAL_PTR=&value_tvb
tvbuff_t *value_tvb = NULL;
- guint32 value_len;
+ uint32_t value_len;
%(DEFAULT_BODY)s
value_len = tvb_reported_length(value_tvb);
@@ -186,9 +186,9 @@ VAL_PTR=&Data_Field_field_type_value
/* 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;
+ bool save_fragmented = actx->pinfo->fragmented;
- actx->pinfo->fragmented = TRUE;
+ actx->pinfo->fragmented = true;
/* if we have not reassembled this packet and it is the first fragment, reset the reassemble ID and the start seq number*/
if (p_t38_packet_conv && p_t38_conv && (p_t38_packet_conv_info->reass_start_seqnum == -1)) {
@@ -208,16 +208,16 @@ VAL_PTR=&Data_Field_field_type_value
p_t38_packet_conv_info->additional_hdlc_data_field_counter = p_t38_conv_info->additional_hdlc_data_field_counter;
p_t38_packet_conv_info->time_first_t4_data = p_t38_conv_info->time_first_t4_data;
}
- if (seq_number == (guint32)p_t38_packet_conv_info->seqnum_prev_data_field){
+ if (seq_number == (uint32_t)p_t38_packet_conv_info->seqnum_prev_data_field){
if(p_t38_conv){
p_t38_conv_info->additional_hdlc_data_field_counter++;
}
}
- guint32 frag_seq_num;
- if (seq_number == (guint32)p_t38_packet_conv_info->reass_start_seqnum) {
- frag_seq_num = (guint32)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num - (guint32)p_t38_packet_conv_info->reass_start_data_field;
+ uint32_t frag_seq_num;
+ if (seq_number == (uint32_t)p_t38_packet_conv_info->reass_start_seqnum) {
+ frag_seq_num = (uint32_t)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num - (uint32_t)p_t38_packet_conv_info->reass_start_data_field;
} else {
- frag_seq_num = seq_number - (guint32)p_t38_packet_conv_info->reass_start_seqnum + (guint32)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num;
+ frag_seq_num = seq_number - (uint32_t)p_t38_packet_conv_info->reass_start_seqnum + (uint32_t)p_t38_packet_conv_info->additional_hdlc_data_field_counter + Data_Field_item_num;
}
frag_msg = fragment_add_seq(&data_reassembly_table,
value_tvb, 0,
@@ -226,9 +226,9 @@ VAL_PTR=&Data_Field_field_type_value
NULL,
frag_seq_num, /* fragment sequence number */
value_len, /* fragment length */
- TRUE, /* More fragments */
+ true, /* More fragments */
0);
- p_t38_packet_conv_info->seqnum_prev_data_field = (gint32)seq_number;
+ p_t38_packet_conv_info->seqnum_prev_data_field = (int32_t)seq_number;
process_reassembled_data(tvb, offset, actx->pinfo,
"Reassembled T38", frag_msg, &data_frag_items, NULL, tree);
@@ -236,7 +236,7 @@ VAL_PTR=&Data_Field_field_type_value
if (Data_Field_field_type_value == 0) {
col_append_fstr(actx->pinfo->cinfo, COL_INFO," (HDLC fragment %u)", frag_seq_num);
} else {
- col_append_fstr(actx->pinfo->cinfo, COL_INFO," (t4-data fragment %u)", seq_number - (guint32)p_t38_packet_conv_info->reass_start_seqnum);
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO," (t4-data fragment %u)", seq_number - (uint32_t)p_t38_packet_conv_info->reass_start_seqnum);
}
}
@@ -262,19 +262,19 @@ VAL_PTR=&Data_Field_field_type_value
#.END
#.FN_HDR UDPTLPacket/primary-ifp-packet
- primary_part = TRUE;
+ primary_part = true;
#.FN_FTR UDPTLPacket/primary-ifp-packet
/* if is a valid t38 packet, add to tap */
/* Note that t4-non-ecm-sig-end without first_t4_data is not valid */
- if (p_t38_packet_conv && (!actx->pinfo->flags.in_error_pkt) && ((gint32) seq_number != p_t38_packet_conv_info->last_seqnum) &&
+ if (p_t38_packet_conv && (!actx->pinfo->flags.in_error_pkt) && ((int32_t) seq_number != p_t38_packet_conv_info->last_seqnum) &&
!(t38_info->type_msg == 1 && t38_info->Data_Field_field_type_value == 7 && t38_info->frame_num_first_t4_data == 0))
tap_queue_packet(t38_tap, actx->pinfo, t38_info);
- if (p_t38_conv) p_t38_conv_info->last_seqnum = (gint32) seq_number;
+ if (p_t38_conv) p_t38_conv_info->last_seqnum = (int32_t) seq_number;
#.END
#.FN_HDR UDPTLPacket/error-recovery
- primary_part = FALSE;
+ primary_part = false;
#.FN_FTR UDPTLPacket/error-recovery
- primary_part = TRUE;
+ primary_part = true;
#.END