diff options
Diffstat (limited to 'epan/dissectors/asn1/h245')
-rw-r--r-- | epan/dissectors/asn1/h245/h245.cnf | 136 | ||||
-rw-r--r-- | epan/dissectors/asn1/h245/packet-h245-template.c | 95 | ||||
-rw-r--r-- | epan/dissectors/asn1/h245/packet-h245-template.h | 22 |
3 files changed, 127 insertions, 126 deletions
diff --git a/epan/dissectors/asn1/h245/h245.cnf b/epan/dissectors/asn1/h245/h245.cnf index 1610861d..d4d7bf35 100644 --- a/epan/dissectors/asn1/h245/h245.cnf +++ b/epan/dissectors/asn1/h245/h245.cnf @@ -62,7 +62,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.FN_PARS MultiplexTableEntryNumber VAL_PTR = &value #.FN_BODY MultiplexTableEntryNumber - guint32 value; + uint32_t value; %(DEFAULT_BODY)s h223_mc = value & 0xf; #.END @@ -90,7 +90,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format VAL_PTR = &value #.FN_BODY MultiplexElement/type/logicalChannelNumber /*MultiplexElement/type/logicalChannelNumber*/ - guint32 value; + uint32_t value; %(DEFAULT_BODY)s h223_me->sublist = NULL; h223_me->vc = value & 0xffff; @@ -113,20 +113,20 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.FN_PARS MultiplexElement/repeatCount/finite VAL_PTR = &value #.FN_BODY MultiplexElement/repeatCount/finite - guint32 value; + uint32_t value; %(DEFAULT_BODY)s h223_me->repeat_count = value & 0xffff; #.END #---------------------------------------------------------------------------------------- #.FN_BODY LogicalChannelNumber VAL_PTR = &value - guint32 value; + uint32_t value; %(DEFAULT_BODY)s h245_lc_temp = value & 0xfff; #.END #=== OpenLogicalChannel ================================================================= #.FN_BODY OpenLogicalChannel - gint32 temp; + int32_t temp; upcoming_olc = (!actx->pinfo->fd->visited) ? wmem_new0(wmem_file_scope(), olc_info_t) : NULL; @@ -215,10 +215,10 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #=== OpenLogicalChannelAck ============================================================== #.FN_BODY OpenLogicalChannelAck - guint32 temp; + uint32_t temp; int p2p_dir; h223_pending_olc *pend; - const gchar *olc_key; + const char *olc_key; olc_info_t *olc_req; upcoming_olc = (!actx->pinfo->fd->visited) ? wmem_new0(actx->pinfo->pool, olc_info_t) : NULL; @@ -320,7 +320,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.FN_PARS Al3/controlFieldOctets VAL_PTR = &value #.FN_BODY Al3/controlFieldOctets - guint32 value; + uint32_t value; %(DEFAULT_BODY)s if(h223_lc_params_temp && h223_lc_params_temp->al_params) ((h223_al3_params*)h223_lc_params_temp->al_params)->control_field_octets = value & 3 ; @@ -329,7 +329,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.FN_PARS Al3/sendBufferSize VAL_PTR = &value #.FN_BODY Al3/sendBufferSize - guint32 value; + uint32_t value; %(DEFAULT_BODY)s if(h223_lc_params_temp && h223_lc_params_temp->al_params) ((h223_al3_params*)h223_lc_params_temp->al_params)->send_buffer_size = value & 0xfffff; @@ -353,7 +353,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.FN_PARS H223LogicalChannelParameters/segmentableFlag VAL_PTR = &value #.FN_BODY H223LogicalChannelParameters/segmentableFlag - gboolean value; + bool value; %(DEFAULT_BODY)s if(h223_lc_params_temp) h223_lc_params_temp->segmentable = value; @@ -364,7 +364,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.END #---------------------------------------------------------------------------------------- #.FN_BODY RequestMessage VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s print_info_column(%(ACTX)s->pinfo->cinfo, &value, h245_RequestMessage_vals, h245_RequestMessage_short_vals); @@ -381,7 +381,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format if (strlen(h245_pi->frame_label) == 0) { - snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_RequestMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str_const(value, h245_RequestMessage_short_vals, "UKN")); /* if it is OLC or RM*/ if ((codec_type != NULL) && (( value == RequestMessage_openLogicalChannel) || ( value == RequestMessage_requestMode))) @@ -391,11 +391,11 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format (void) g_strlcat(h245_pi->frame_label, ")", 50); } } - (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"), 50); + (void) g_strlcat(h245_pi->comment, val_to_str_const(value, h245_RequestMessage_vals, "<unknown>"), 50); #.END #---------------------------------------------------------------------------------------- #.FN_BODY ResponseMessage VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s print_info_column(%(ACTX)s->pinfo->cinfo, &value, h245_ResponseMessage_vals, h245_ResponseMessage_short_vals); @@ -404,15 +404,15 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format if (h245_pi != NULL){ /* Add to packet info */ if ( strlen(h245_pi->frame_label) == 0 ){ - snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_ResponseMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str_const(value, h245_ResponseMessage_short_vals, "UKN")); } - (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50); + (void) g_strlcat(h245_pi->comment, val_to_str_const(value, h245_ResponseMessage_vals, "<unknown>"), 50); } #.END #---------------------------------------------------------------------------------------- #.FN_BODY IndicationMessage VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s print_info_column(%(ACTX)s->pinfo->cinfo, &value, h245_IndicationMessage_vals, h245_IndicationMessage_short_vals); @@ -421,16 +421,16 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format /* Add to packet info */ if (h245_pi !=NULL){ if ( strlen(h245_pi->frame_label) == 0 ){ - snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_IndicationMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str_const(value, h245_IndicationMessage_short_vals, "UKN")); } - (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50); + (void) g_strlcat(h245_pi->comment, val_to_str_const(value, h245_IndicationMessage_vals, "<unknown>"), 50); } #.END #---------------------------------------------------------------------------------------- #.FN_BODY CommandMessage VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s print_info_column(%(ACTX)s->pinfo->cinfo, &value, h245_CommandMessage_vals, h245_CommandMessage_short_vals); @@ -439,54 +439,54 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format /* Add to packet info */ if (h245_pi != NULL){ if ( strlen(h245_pi->frame_label) == 0 ){ - snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(value, h245_CommandMessage_short_vals, "UKN")); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str_const(value, h245_CommandMessage_short_vals, "UKN")); } - (void) g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50); + (void) g_strlcat(h245_pi->comment, val_to_str_const(value, h245_CommandMessage_vals, "<unknown>"), 50); } #.END #---------------------------------------------------------------------------------------- #.FN_BODY AudioCapability VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s - codec_type = val_to_str(value, h245_AudioCapability_short_vals, "<unknown>"); + codec_type = val_to_str_const(value, h245_AudioCapability_short_vals, "<unknown>"); #.END #---------------------------------------------------------------------------------------- #.FN_BODY VideoCapability VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s - codec_type = val_to_str(value, h245_VideoCapability_vals, "<unknown>"); + codec_type = val_to_str_const(value, h245_VideoCapability_vals, "<unknown>"); #.END #---------------------------------------------------------------------------------------- #.FN_BODY Application VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s - codec_type = val_to_str(value, h245_Application_vals, "<unknown>"); + codec_type = val_to_str_const(value, h245_Application_vals, "<unknown>"); #.END #---------------------------------------------------------------------------------------- #.FN_BODY AudioMode VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s - codec_type = val_to_str(value, h245_AudioMode_vals, "<unknown>"); + codec_type = val_to_str_const(value, h245_AudioMode_vals, "<unknown>"); #.END #---------------------------------------------------------------------------------------- #.FN_BODY VideoMode VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s - codec_type = val_to_str(value, h245_VideoMode_vals, "<unknown>"); + codec_type = val_to_str_const(value, h245_VideoMode_vals, "<unknown>"); #.END #---------------------------------------------------------------------------------------- #.FN_BODY DataMode/application VAL_PTR = &value - gint32 value; + int32_t value; %(DEFAULT_BODY)s - codec_type = val_to_str(value, h245_DataModeApplication_vals, "<unknown>"); + codec_type = val_to_str_const(value, h245_DataModeApplication_vals, "<unknown>"); #.END #---------------------------------------------------------------------------------------- #.FN_FTR MasterSlaveDeterminationAck @@ -579,7 +579,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.END #.FN_BODY GenericMessage/subMessageIdentifier VAL_PTR = &subMessageIdentifier - guint32 subMessageIdentifier; + uint32_t subMessageIdentifier; gef_ctx_t *gefx; gefx = gef_ctx_get(actx->private_data); @@ -599,8 +599,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format } if (hf_index == hf_h245_subMessageIdentifier_standard) { - col_append_str(actx->pinfo->cinfo, COL_INFO, val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>") ); - snprintf(h245_pi->frame_label, 50, "%%s", val_to_str(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>")); + col_append_str(actx->pinfo->cinfo, COL_INFO, val_to_str_const(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>") ); + snprintf(h245_pi->frame_label, 50, "%%s", val_to_str_const(subMessageIdentifier, h245_h239subMessageIdentifier_vals, "<unknown>")); } #.END @@ -690,7 +690,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.END #.FN_BODY CapabilityIdentifier/standard FN_VARIANT = _str VAL_PTR = &standard_oid_str - const gchar *standard_oid_str = NULL; + const char *standard_oid_str = NULL; gef_ctx_t *gefx; %(DEFAULT_BODY)s @@ -699,7 +699,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format if(strcmp(standard_oid_str,"0.0.8.235.0.3.76") == 0) { /* MIKEY */ if (upcoming_channel) - upcoming_channel->srtp_flag = TRUE; + upcoming_channel->srtp_flag = true; } if(!h245_lc_dissector && strcmp(standard_oid_str,"0.0.8.245.1.1.1") == 0) @@ -715,13 +715,13 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format if (gefx) { ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); proto_item_set_hidden(ti); - dissector_try_string_new(gef_name_dissector_table, gefx->key, tvb_new_subset_length_caplen(tvb, offset>>3, 0, 0), actx->pinfo, tree, FALSE, actx); + dissector_try_string_new(gef_name_dissector_table, gefx->key, tvb_new_subset_length_caplen(tvb, offset>>3, 0, 0), actx->pinfo, tree, false, actx); } actx->private_data = gefx; /* subdissector could overwrite it */ #.END #.FN_BODY ParameterIdentifier/standard VAL_PTR = &value_int - guint32 value_int = (guint32)-1; + uint32_t value_int = (uint32_t)-1; gef_ctx_t *gefx; %(DEFAULT_BODY)s @@ -730,8 +730,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.END #---------------------------------------------------------------------------------------- #.FN_BODY ParameterValue/booleanArray VAL_PTR = &value - guint32 value; - guint8 *buf; + uint32_t value; + uint8_t *buf; tvbuff_t *value_tvb; gef_ctx_t *gefx; proto_item* ti; @@ -739,18 +739,18 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = wmem_new(actx->pinfo->pool, guint8); + buf = wmem_new(actx->pinfo->pool, uint8_t); buf[0] = value; - value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint8), sizeof(guint8)); + value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(uint8_t), sizeof(uint8_t)); ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); proto_item_set_hidden(ti); add_new_data_source(%(ACTX)s->pinfo, value_tvb, "booleanArray"); - dissector_try_string_new(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, FALSE, %(ACTX)s); + dissector_try_string_new(gef_content_dissector_table, gefx->key, value_tvb, %(ACTX)s->pinfo, %(TREE)s, false, %(ACTX)s); } #.END #.FN_BODY ParameterValue/unsignedMin VAL_PTR = &value - guint32 value; - guint8 *buf; + uint32_t value; + uint8_t *buf; tvbuff_t *value_tvb; gef_ctx_t *gefx; proto_item* ti; @@ -758,9 +758,9 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)wmem_new(actx->pinfo->pool, guint16); + buf = (uint8_t *)wmem_new(actx->pinfo->pool, uint16_t); phton16(buf, value); - value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16)); + value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(uint16_t), sizeof(uint16_t)); ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); proto_item_set_hidden(ti); add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsignedMin"); @@ -768,8 +768,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format } #.END #.FN_BODY ParameterValue/unsignedMax VAL_PTR = &value - guint32 value; - guint8 *buf; + uint32_t value; + uint8_t *buf; tvbuff_t *value_tvb; gef_ctx_t *gefx; proto_item* ti; @@ -777,9 +777,9 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)wmem_new(actx->pinfo->pool, guint16); + buf = (uint8_t *)wmem_new(actx->pinfo->pool, uint16_t); phton16(buf, value); - value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint16), sizeof(guint16)); + value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(uint16_t), sizeof(uint16_t)); ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); proto_item_set_hidden(ti); add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsignedMax"); @@ -787,8 +787,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format } #.END #.FN_BODY ParameterValue/unsigned32Min VAL_PTR = &value - guint32 value; - guint8 *buf; + uint32_t value; + uint8_t *buf; tvbuff_t *value_tvb; gef_ctx_t *gefx; proto_item* ti; @@ -796,9 +796,9 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)wmem_new(actx->pinfo->pool, guint32); + buf = (uint8_t *)wmem_new(actx->pinfo->pool, uint32_t); phton32(buf, value); - value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32)); + value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(uint32_t), sizeof(uint32_t)); ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); proto_item_set_hidden(ti); add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsigned32Min"); @@ -806,8 +806,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format } #.END #.FN_BODY ParameterValue/unsigned32Max VAL_PTR = &value - guint32 value; - guint8 *buf; + uint32_t value; + uint8_t *buf; tvbuff_t *value_tvb; gef_ctx_t *gefx; proto_item* ti; @@ -815,9 +815,9 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format %(DEFAULT_BODY)s gefx = gef_ctx_get(actx->private_data); if (gefx) { - buf = (guint8 *)wmem_new(actx->pinfo->pool, guint32); + buf = (uint8_t *)wmem_new(actx->pinfo->pool, uint32_t); phton32(buf, value); - value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(guint32), sizeof(guint32)); + value_tvb = tvb_new_child_real_data(tvb, buf, sizeof(uint32_t), sizeof(uint32_t)); ti = proto_tree_add_string(tree, hf_h245_debug_dissector_try_string, tvb, offset>>3, 0, gefx->key); proto_item_set_hidden(ti); add_new_data_source(%(ACTX)s->pinfo, value_tvb, "unsigned32Max"); @@ -853,7 +853,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.END #---------------------------------------------------------------------------------------- #.FN_BODY UnicastAddress/iPAddress/tsapIdentifier VAL_PTR = &tsapIdentifier - guint32 tsapIdentifier; + uint32_t tsapIdentifier; %(DEFAULT_BODY)s @@ -874,7 +874,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format #.END #---------------------------------------------------------------------------------------- #.FN_BODY UnicastAddress/iP6Address/tsapIdentifier VAL_PTR = &tsapIdentifier - guint32 tsapIdentifier; + uint32_t tsapIdentifier; %(DEFAULT_BODY)s @@ -944,7 +944,7 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format NonStandardIdentifier/object FN_VARIANT = _str VAL_PTR = &nsiOID #.END #.FN_BODY NonStandardIdentifier VAL_PTR = &value - gint32 value; + int32_t value; nsiOID = ""; h221NonStandard = 0; @@ -1004,15 +1004,15 @@ NonStandardIdentifier/h221NonStandard/manufacturerCode VAL_PTR = &manufacturerC } #.FN_BODY DataType VAL_PTR = &choice_index -gint choice_index; +int choice_index; %(DEFAULT_BODY)s if (upcoming_channel){ if (choice_index==2){ - upcoming_channel->is_video=TRUE; + upcoming_channel->is_video=true; }else{ - upcoming_channel->is_video=FALSE; + upcoming_channel->is_video=false; } } diff --git a/epan/dissectors/asn1/h245/packet-h245-template.c b/epan/dissectors/asn1/h245/packet-h245-template.c index 7950ca14..41d15b32 100644 --- a/epan/dissectors/asn1/h245/packet-h245-template.c +++ b/epan/dissectors/asn1/h245/packet-h245-template.c @@ -31,6 +31,7 @@ #include <epan/proto_data.h> #include <epan/tap.h> #include <wsutil/pint.h> +#include <wsutil/array.h> #include "packet-tpkt.h" #include "packet-per.h" #include "packet-h323.h" @@ -46,7 +47,7 @@ void proto_register_h245(void); void proto_reg_handoff_h245(void); -static dissector_handle_t rtcp_handle=NULL; +static dissector_handle_t rtcp_handle; static dissector_table_t nsp_object_dissector_table; static dissector_table_t nsp_h221_dissector_table; static dissector_table_t gef_name_dissector_table; @@ -55,22 +56,22 @@ static dissector_handle_t h245_handle; static dissector_handle_t nsp_handle; static dissector_handle_t data_handle; static dissector_handle_t MultimediaSystemControlMessage_handle; -static dissector_handle_t h263_handle = NULL; -static dissector_handle_t amr_handle = NULL; +static dissector_handle_t h263_handle; +static dissector_handle_t amr_handle; static void init_h245_packet_info(h245_packet_info *pi); -static int hf_h245_pdu_type = -1; -static int hf_h245Manufacturer = -1; -static int hf_h245_subMessageIdentifier_standard = -1; -static int h245_tap = -1; -static int h245dg_tap = -1; -static int hf_h245_debug_dissector_try_string = -1; +static int hf_h245_pdu_type; +static int hf_h245Manufacturer; +static int hf_h245_subMessageIdentifier_standard; +static int h245_tap; +static int h245dg_tap; +static int hf_h245_debug_dissector_try_string; h245_packet_info *h245_pi=NULL; -static gboolean h245_reassembly = TRUE; -static gboolean h245_shorttypes = FALSE; -static gboolean info_col_fmt_prepend = FALSE; +static bool h245_reassembly = true; +static bool h245_shorttypes; +static bool info_col_fmt_prepend; #include "packet-h245-val.h" @@ -196,42 +197,42 @@ static const value_string h245_AudioCapability_short_vals[] = { /* To put the codec type only in COL_INFO when an OLC is read */ -const char* codec_type = NULL; -static guint32 rfc_number; +const char* codec_type; +static uint32_t rfc_number; typedef struct _unicast_addr_t { address addr; - guint8 addr_buf[16]; - guint32 port; + uint8_t addr_buf[16]; + uint32_t port; } unicast_addr_t; typedef struct _channel_info_t { - gchar data_type_str[32]; + char data_type_str[32]; unicast_addr_t *upcoming_addr; unicast_addr_t media_addr; unicast_addr_t media_control_addr; unsigned int rfc2198; - gboolean srtp_flag; - gboolean is_video; + bool srtp_flag; + bool is_video; } channel_info_t; typedef struct _olc_info_t { - guint16 fwd_lc_num; + uint16_t fwd_lc_num; channel_info_t fwd_lc; channel_info_t rev_lc; } olc_info_t; -static wmem_map_t* h245_pending_olc_reqs = NULL; -static gboolean fast_start = FALSE; -static olc_info_t *upcoming_olc = NULL; -static channel_info_t *upcoming_channel = NULL; +static wmem_map_t* h245_pending_olc_reqs; +static bool fast_start; +static olc_info_t *upcoming_olc; +static channel_info_t *upcoming_channel; /* NonStandardParameter */ static const char *nsiOID; -static guint32 h221NonStandard; -static guint32 t35CountryCode; -static guint32 t35Extension; -static guint32 manufacturerCode; +static uint32_t h221NonStandard; +static uint32_t t35CountryCode; +static uint32_t t35Extension; +static uint32_t manufacturerCode; static const value_string h245_RFC_number_vals[] = { { 2190, "RFC 2190 - H.263 Video Streams" }, @@ -256,9 +257,9 @@ static const value_string h245_h239subMessageIdentifier_vals[] = { /* h223 multiplex codes */ -static h223_set_mc_handle_t h223_set_mc_handle = NULL; +static h223_set_mc_handle_t h223_set_mc_handle; h223_mux_element *h223_me=NULL; -guint8 h223_mc=0; +uint8_t h223_mc=0; void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ) { h223_set_mc_handle = handle; @@ -270,15 +271,15 @@ typedef struct { h223_lc_params *rev_channel_params; } h223_pending_olc; -static wmem_map_t* h223_pending_olc_reqs[] = { NULL, NULL }; +static wmem_map_t* h223_pending_olc_reqs[2]; static dissector_handle_t h245_lc_dissector; -static guint16 h245_lc_temp; -static guint16 h223_fw_lc_num; -static guint16 h223_rev_lc_num; +static uint16_t h245_lc_temp; +static uint16_t h223_fw_lc_num; +static uint16_t h223_rev_lc_num; static h223_lc_params *h223_lc_params_temp; static h223_lc_params *h223_fw_lc_params; static h223_lc_params *h223_rev_lc_params; -static h223_add_lc_handle_t h223_add_lc_handle = NULL; +static h223_add_lc_handle_t h223_add_lc_handle; static void h223_lc_init( void ) { @@ -292,7 +293,7 @@ void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle ) h223_add_lc_handle = handle; } -static const gchar *gen_olc_key(guint16 lc_num, address *dst_addr, address *src_addr, wmem_allocator_t *scope) +static const char *gen_olc_key(uint16_t lc_num, address *dst_addr, address *src_addr, wmem_allocator_t *scope) { return wmem_strdup_printf(scope, "%s/%s/%u", address_to_str(scope, dst_addr), @@ -352,18 +353,18 @@ static void h245_setup_channels(packet_info *pinfo, channel_info_t *upcoming_cha /* Prints formated information column of h245 messages. Note that global variables * "h245_shorttypes" and "info_col_fmt_prepend" are used to decide formating preferences */ -static void print_info_column(column_info *cinfo, const gint32 *value, +static void print_info_column(column_info *cinfo, const int32_t *value, const value_string *msg_vals, const value_string *short_msg_vals) { const value_string *vals; - if (h245_shorttypes == FALSE || short_msg_vals == NULL) { + if (h245_shorttypes == false || short_msg_vals == NULL) { vals = msg_vals; } else { vals = short_msg_vals; } - if (info_col_fmt_prepend == FALSE) { + if (info_col_fmt_prepend == false) { col_append_fstr(cinfo, COL_INFO, "%s ", val_to_str_const(*value, vals, "<unknown>")); } else { col_prepend_fstr(cinfo, COL_INFO, "%s ", val_to_str_const(*value, vals, "<unknown>")); @@ -371,12 +372,12 @@ static void print_info_column(column_info *cinfo, const gint32 *value, } /* Initialize the protocol and registered fields */ -static int proto_h245 = -1; +static int proto_h245; #include "packet-h245-hf.c" /* Initialize the subtree pointers */ -static int ett_h245 = -1; -static int ett_h245_returnedFunction = -1; +static int ett_h245; +static int ett_h245_returnedFunction; #include "packet-h245-ett.c" /* Forward declarations */ @@ -405,10 +406,10 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo { proto_item *it; proto_tree *tr; - guint32 offset=0; + uint32_t offset=0; asn1_ctx_t asn1_ctx; - fast_start = FALSE; + fast_start = false; /* Clean up from any previous packet dissection */ upcoming_olc = NULL; upcoming_channel = NULL; @@ -424,7 +425,7 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo CLEANUP_PUSH(reset_h245_pi, NULL); h245_pi=wmem_new(pinfo->pool, h245_packet_info); init_h245_packet_info(h245_pi); - asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, true, pinfo); offset = dissect_h245_MultimediaSystemControlMessage(tvb, offset, &asn1_ctx, tr, hf_h245_pdu_type); tap_queue_packet(h245dg_tap, pinfo, h245_pi); offset = (offset+0x07) & 0xfffffff8; @@ -436,7 +437,7 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo void dissect_h245_FastStart_OLC(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, char *codec_str) { - fast_start = TRUE; + fast_start = true; /* Clean up from any previous packet dissection */ upcoming_olc = NULL; upcoming_channel = NULL; @@ -476,7 +477,7 @@ void proto_register_h245(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_h245, &ett_h245_returnedFunction, #include "packet-h245-ettarr.c" diff --git a/epan/dissectors/asn1/h245/packet-h245-template.h b/epan/dissectors/asn1/h245/packet-h245-template.h index 9edd1159..3193c783 100644 --- a/epan/dissectors/asn1/h245/packet-h245-template.h +++ b/epan/dissectors/asn1/h245/packet-h245-template.h @@ -34,8 +34,8 @@ typedef enum _h245_msg_type { typedef struct _h245_packet_info { h245_msg_type msg_type; /* type of message */ - gchar frame_label[50]; /* the Frame label used by graph_analysis, what is a abreviation of cinfo */ - gchar comment[50]; /* the Frame Comment used by graph_analysis, what is a message desc */ + char frame_label[50]; /* the Frame label used by graph_analysis, what is an abbreviation of cinfo */ + char comment[50]; /* the Frame Comment used by graph_analysis, what is a message desc */ } h245_packet_info; /* @@ -57,14 +57,14 @@ typedef enum { } h223_al_type; typedef struct { - guint8 control_field_octets; - guint32 send_buffer_size; + uint8_t control_field_octets; + uint32_t send_buffer_size; } h223_al3_params; typedef struct { h223_al_type al_type; - gpointer al_params; - gboolean segmentable; + void *al_params; + bool segmentable; dissector_handle_t subdissector; } h223_lc_params; @@ -86,7 +86,7 @@ typedef enum { typedef struct { h245_lc_data_type_enum data_type; - gpointer params; + void * params; } h245_lc_data_type; /* @@ -96,18 +96,18 @@ typedef struct { typedef struct _h223_mux_element h223_mux_element; struct _h223_mux_element { h223_mux_element* sublist; /* if NULL, use vc instead */ - guint16 vc; - guint16 repeat_count; /* 0 == untilClosingFlag */ + uint16_t vc; + uint16_t repeat_count; /* 0 == untilClosingFlag */ h223_mux_element* next; }; #include <epan/packet_info.h> #include "packet-per.h" -typedef void (*h223_set_mc_handle_t) ( packet_info* pinfo, guint8 mc, h223_mux_element* me); +typedef void (*h223_set_mc_handle_t) ( packet_info* pinfo, uint8_t mc, h223_mux_element* me); WS_DLL_PUBLIC void h245_set_h223_set_mc_handle( h223_set_mc_handle_t handle ); -typedef void (*h223_add_lc_handle_t) ( packet_info* pinfo, guint16 lc, h223_lc_params* params); +typedef void (*h223_add_lc_handle_t) ( packet_info* pinfo, uint16_t lc, h223_lc_params* params); WS_DLL_PUBLIC void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle ); #include "packet-h245-exp.h" |