From beroset:
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48425
This commit is contained in:
parent
089dfcd108
commit
3eb06be97d
|
@ -272,7 +272,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (ones == 5 && state == DATA) {
|
||||
/* we don't increase bit_offset, it is an inserted zero */
|
||||
} else if (ones == 6 && state == DATA) { /* probably starting flag sequence */
|
||||
buff = g_memdup(data, data_len);
|
||||
buff = (guint8 *)g_memdup(data, data_len);
|
||||
/* Allocate new tvb for the LAPD frame */
|
||||
new_tvb = tvb_new_child_real_data(tvb, buff, data_len, data_len);
|
||||
tvb_set_free_cb(new_tvb, g_free);
|
||||
|
@ -334,7 +334,7 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
} else { /* finished processing LAPD frame(s) */
|
||||
if (NULL == p_get_proto_data(pinfo->fd, proto_lapd)) {
|
||||
/* Per packet information */
|
||||
lapd_ppi = se_alloc(sizeof(lapd_ppi_t));
|
||||
lapd_ppi = se_new(lapd_ppi_t);
|
||||
lapd_ppi->has_crc = TRUE;
|
||||
if (prev_byte_state)
|
||||
fill_lapd_byte_state(&lapd_ppi->start_byte_state, prev_byte_state->state,
|
||||
|
@ -354,13 +354,13 @@ dissect_lapd_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
fill_lapd_byte_state(convo_data->byte_state_a, state, full_byte, bit_offset, ones);
|
||||
else {
|
||||
if (!convo_data->byte_state_b)
|
||||
convo_data->byte_state_b = se_alloc(sizeof(lapd_byte_state_t));
|
||||
convo_data->byte_state_b = se_new(lapd_byte_state_t);
|
||||
fill_lapd_byte_state(convo_data->byte_state_b, state, full_byte, bit_offset, ones);
|
||||
}
|
||||
} else { /* lapd convo data has to be created */
|
||||
lapd_byte_state = se_alloc(sizeof(lapd_byte_state_t));
|
||||
lapd_byte_state = se_new(lapd_byte_state_t);
|
||||
fill_lapd_byte_state(lapd_byte_state, state, full_byte, bit_offset, ones);
|
||||
convo_data = se_alloc(sizeof(lapd_convo_data_t));
|
||||
convo_data = se_new(lapd_convo_data_t);
|
||||
COPY_ADDRESS(&convo_data->addr_a, &pinfo->src);
|
||||
COPY_ADDRESS(&convo_data->addr_b, &pinfo->dst);
|
||||
convo_data->port_a = pinfo->srcport;
|
||||
|
|
|
@ -269,7 +269,7 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int is_
|
|||
const char *frame_type;
|
||||
char *info;
|
||||
|
||||
info = ep_alloc(80);
|
||||
info = (char *)ep_alloc(80);
|
||||
|
||||
/* Grab complete control field */
|
||||
ctl = tvb_get_ntohs(tvb, 1) >> 4;
|
||||
|
@ -506,7 +506,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if ((plen + hlen) == tvb_length(tvb)) {
|
||||
/* Need to integrate the last nibble */
|
||||
guint8 *data = ep_alloc(plen);
|
||||
guint8 *data = (guint8 *)ep_alloc(plen);
|
||||
tvb_memcpy(tvb, data, hlen, plen);
|
||||
data[plen-1] |= tvb_get_guint8(tvb, 2) << 4;
|
||||
payload = tvb_new_child_real_data(tvb, data, plen, plen);
|
||||
|
|
|
@ -977,7 +977,7 @@ dissect_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem)
|
|||
break;
|
||||
}
|
||||
|
||||
addr=ep_alloc0(addr_size);
|
||||
addr=(guint8 *)ep_alloc0(addr_size);
|
||||
|
||||
for(ax=0; ax+1 <= prefix_len_octets; ax++)
|
||||
addr[ax]=tvb_get_guint8(tvb, offset+ax);
|
||||
|
@ -1052,7 +1052,7 @@ dissect_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem)
|
|||
break;
|
||||
}
|
||||
|
||||
addr=ep_alloc0(addr_size);
|
||||
addr=(guint8 *)ep_alloc0(addr_size);
|
||||
|
||||
for(ax=0; ax+1 <= host_len; ax++)
|
||||
addr[ax]=tvb_get_guint8(tvb, offset+ax);
|
||||
|
@ -1315,7 +1315,7 @@ dissect_tlv_address_list(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem)
|
|||
ti=proto_tree_add_text(tree, tvb, offset, rem, "Addresses");
|
||||
val_tree=proto_item_add_subtree(ti, ett_ldp_tlv_val);
|
||||
|
||||
addr=ep_alloc(addr_size);
|
||||
addr=(guint8 *)ep_alloc(addr_size);
|
||||
|
||||
for(ix=1; rem >= addr_size; ix++, offset += addr_size,
|
||||
rem -= addr_size) {
|
||||
|
|
|
@ -262,7 +262,7 @@ llc_add_oui(guint32 oui, const char *table_name, const char *table_ui_name,
|
|||
{
|
||||
oui_info_t *new_info;
|
||||
|
||||
new_info = g_malloc(sizeof (oui_info_t));
|
||||
new_info = (oui_info_t *)g_malloc(sizeof (oui_info_t));
|
||||
new_info->table = register_dissector_table(table_name,
|
||||
table_ui_name, FT_UINT16, BASE_HEX);
|
||||
new_info->field_info = hf_item;
|
||||
|
@ -782,7 +782,7 @@ oui_info_t *
|
|||
get_snap_oui_info(guint32 oui)
|
||||
{
|
||||
if (oui_info_table != NULL) {
|
||||
return g_hash_table_lookup(oui_info_table,
|
||||
return (oui_info_t *)g_hash_table_lookup(oui_info_table,
|
||||
GUINT_TO_POINTER(oui));
|
||||
} else
|
||||
return NULL;
|
||||
|
@ -924,7 +924,7 @@ proto_register_basicxid(void)
|
|||
static void
|
||||
register_hf(gpointer key _U_, gpointer value, gpointer user_data _U_)
|
||||
{
|
||||
oui_info_t *info = value;
|
||||
oui_info_t *info = (oui_info_t *)value;
|
||||
|
||||
proto_register_field_array(proto_llc, info->field_info, 1);
|
||||
}
|
||||
|
|
|
@ -1160,7 +1160,7 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, pro
|
|||
guint16 ulp_length;
|
||||
tvbuff_t *payload_tvb;
|
||||
proto_item *item, *gen_item;
|
||||
mtp3_tap_rec_t* mtp3_tap = ep_alloc0(sizeof(mtp3_tap_rec_t));
|
||||
mtp3_tap_rec_t* mtp3_tap = ep_new0(mtp3_tap_rec_t);
|
||||
proto_tree *q708_tree;
|
||||
gint heuristic_standard;
|
||||
guint8 si;
|
||||
|
@ -1191,13 +1191,13 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, pro
|
|||
PROTO_ITEM_SET_GENERATED(gen_item);
|
||||
}
|
||||
|
||||
mtp3_tap->addr_dpc.type = mtp3_standard;
|
||||
mtp3_tap->addr_dpc.type = (Standard_Type)mtp3_standard;
|
||||
mtp3_tap->addr_dpc.pc = dpc;
|
||||
mtp3_tap->addr_dpc.ni = tvb_get_guint8(parameter_tvb, DATA_NI_OFFSET);
|
||||
SET_ADDRESS(&pinfo->dst, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) &mtp3_tap->addr_dpc);
|
||||
|
||||
|
||||
mtp3_tap->addr_opc.type = mtp3_standard;
|
||||
mtp3_tap->addr_opc.type = (Standard_Type)mtp3_standard;
|
||||
mtp3_tap->addr_opc.pc = opc;
|
||||
mtp3_tap->addr_opc.ni = tvb_get_guint8(parameter_tvb, DATA_NI_OFFSET);
|
||||
SET_ADDRESS(&pinfo->src, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) &mtp3_tap->addr_opc);
|
||||
|
|
|
@ -166,7 +166,7 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
* widen it past 8 bits, so there shouldn't
|
||||
* be an overflow.
|
||||
*/
|
||||
data = ep_alloc((guint)length + 1);
|
||||
data = (guint8 *)ep_alloc((guint)length + 1);
|
||||
tvb_memcpy(tvb, data, ++offset, length);
|
||||
offset += length;
|
||||
|
||||
|
|
|
@ -457,7 +457,7 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
p_remove_proto_data(pinfo->fd, proto_modbus);
|
||||
|
||||
/* Create enough context for Modbus dissector */
|
||||
request_info = ep_alloc(sizeof(modbus_request_info_t));
|
||||
request_info = ep_new(modbus_request_info_t);
|
||||
request_info->packet_type = (guint8)packet_type;
|
||||
request_info->register_addr_type = (guint8)global_mbus_tcp_register_addr_type;
|
||||
request_info->register_format = (guint8)global_mbus_tcp_register_format;
|
||||
|
@ -601,7 +601,7 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
p_remove_proto_data(pinfo->fd, proto_modbus);
|
||||
|
||||
/* Create enough context for Modbus dissector */
|
||||
request_info = ep_alloc(sizeof(modbus_request_info_t));
|
||||
request_info = ep_new(modbus_request_info_t);
|
||||
request_info->packet_type = (guint8)packet_type;
|
||||
request_info->register_addr_type = (guint8)global_mbus_rtu_register_addr_type;
|
||||
request_info->register_format = (guint8)global_mbus_rtu_register_format;
|
||||
|
@ -840,7 +840,7 @@ dissect_modbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
|||
}
|
||||
|
||||
/* See if we have any context */
|
||||
request_info = p_get_proto_data( pinfo->fd, proto_modbus );
|
||||
request_info = (modbus_request_info_t *)p_get_proto_data( pinfo->fd, proto_modbus );
|
||||
if (request_info != NULL)
|
||||
{
|
||||
packet_type = request_info->packet_type;
|
||||
|
|
|
@ -605,7 +605,7 @@ struct mikey_dissector_entry {
|
|||
|
||||
/* Forward declaration we need below */
|
||||
void proto_reg_handoff_mikey(void);
|
||||
static int dissect_payload(enum payload_t payload, mikey_t *mikey, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
||||
static int dissect_payload(int payload, mikey_t *mikey, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
||||
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
|
@ -675,7 +675,7 @@ static const struct mikey_dissector_entry cs_id_map[] = {
|
|||
};
|
||||
|
||||
static int
|
||||
dissect_payload_cs_id(enum cs_id_map_t type, mikey_t *mikey, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
dissect_payload_cs_id(int type, mikey_t *mikey, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
const struct mikey_dissector_entry *entry;
|
||||
|
||||
|
@ -1094,7 +1094,7 @@ dissect_payload_sp(mikey_t *mikey _U_, tvbuff_t *tvb, packet_info *pinfo _U_, pr
|
|||
tvb_ensure_bytes_exist(tvb, offset+0, 5);
|
||||
length = tvb_get_ntohs(tvb, offset+3);
|
||||
no = tvb_get_guint8(tvb, offset+1);
|
||||
type = tvb_get_guint8(tvb, offset+2);
|
||||
type = (enum sp_prot_t)tvb_get_guint8(tvb, offset+2);
|
||||
|
||||
if (tree) {
|
||||
proto_item *parent;
|
||||
|
@ -1328,7 +1328,7 @@ static const struct mikey_dissector_entry payload_map[] = {
|
|||
};
|
||||
|
||||
static int
|
||||
dissect_payload(enum payload_t payload, mikey_t *mikey, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
dissect_payload(int payload, mikey_t *mikey, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
const struct mikey_dissector_entry *entry;
|
||||
|
||||
|
@ -1352,10 +1352,10 @@ dissect_mikey(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
|
|||
int payload;
|
||||
mikey_t *mikey;
|
||||
|
||||
mikey = p_get_proto_data(pinfo->fd, proto_mikey);
|
||||
mikey = (mikey_t *)p_get_proto_data(pinfo->fd, proto_mikey);
|
||||
|
||||
if (!mikey) {
|
||||
mikey = se_alloc0(sizeof(mikey_t));
|
||||
mikey = se_new0(mikey_t);
|
||||
mikey->type = -1;
|
||||
p_add_proto_data(pinfo->fd, proto_mikey, mikey);
|
||||
}
|
||||
|
|
|
@ -459,9 +459,9 @@ get_text_string(tvbuff_t *tvb, guint offset, const char **strval)
|
|||
len = tvb_strsize(tvb, offset);
|
||||
DebugLog((" [1] tvb_strsize(tvb, offset) == %u\n", len));
|
||||
if (tvb_get_guint8(tvb, offset) == MM_QUOTE)
|
||||
*strval = ep_tvb_memdup(tvb, offset+1, len-1);
|
||||
*strval = (const char *)ep_tvb_memdup(tvb, offset+1, len-1);
|
||||
else
|
||||
*strval = ep_tvb_memdup(tvb, offset, len);
|
||||
*strval = (const char *)ep_tvb_memdup(tvb, offset, len);
|
||||
DebugLog((" [3] Return(len) == %u\n", len));
|
||||
return len;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ static const ext_value_string mndp_body_tlv_vals[] = {
|
|||
{ 5, "Identity", &hf_mndp_identity, NULL, NULL },
|
||||
{ 7, "Version", &hf_mndp_version, NULL, NULL },
|
||||
{ 8, "Platform", &hf_mndp_platform, NULL, NULL },
|
||||
{ 10, "Uptime", &hf_mndp_uptime, NULL, (void *)TRUE },
|
||||
{ 10, "Uptime", &hf_mndp_uptime, NULL, (ext_value_string *)TRUE },
|
||||
{ 11, "Software-ID", &hf_mndp_softwareid, NULL, NULL },
|
||||
{ 12, "Board", &hf_mndp_board, NULL, NULL },
|
||||
{ 14, "Unpack", &hf_mndp_unpack, NULL, NULL },
|
||||
|
|
|
@ -162,7 +162,7 @@ dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
const char *mountpoint=NULL;
|
||||
|
||||
if((!pinfo->fd->flags.visited) && nfs_file_name_snooping){
|
||||
rpc_call_info_value *civ=pinfo->private_data;
|
||||
rpc_call_info_value *civ=(rpc_call_info_value *)pinfo->private_data;
|
||||
|
||||
if(civ->request && (civ->proc==1)){
|
||||
const gchar *host;
|
||||
|
@ -170,12 +170,12 @@ dissect_mount_dirpath_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
guint32 len;
|
||||
unsigned char *ptr;
|
||||
|
||||
host=ip_to_str(pinfo->dst.data);
|
||||
host=ip_to_str((guint8 *)pinfo->dst.data);
|
||||
len=tvb_get_ntohl(tvb, offset);
|
||||
if (len >= ITEM_LABEL_LENGTH)
|
||||
THROW(ReportedBoundsError);
|
||||
|
||||
name=g_malloc(strlen(host)+1+len+1+200);
|
||||
name=(unsigned char *)g_malloc(strlen(host)+1+len+1+200);
|
||||
ptr=name;
|
||||
memcpy(ptr, host, strlen(host));
|
||||
ptr+=strlen(host);
|
||||
|
|
|
@ -100,7 +100,7 @@ static const value_string y1711_defect_type_vals[] = {
|
|||
static int
|
||||
dissect_mpls_y1711(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
struct mplsinfo *mplsinfo = pinfo->private_data;
|
||||
struct mplsinfo *mplsinfo = (struct mplsinfo *)pinfo->private_data;
|
||||
int offset = 0;
|
||||
proto_item *ti;
|
||||
proto_tree *mpls_y1711_tree;
|
||||
|
|
|
@ -210,7 +210,7 @@ dissect_mqpcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree *mqroot_tree = NULL;
|
||||
proto_item *ti = NULL;
|
||||
gint offset = 0;
|
||||
struct mqinfo* mqinfo = pinfo->private_data;
|
||||
struct mqinfo* mqinfo = (struct mqinfo *)pinfo->private_data;
|
||||
gboolean bLittleEndian;
|
||||
bLittleEndian = ((mqinfo->encoding & MQ_ENC_INTEGER_REVERSED) != 0) ? TRUE : FALSE;
|
||||
|
||||
|
@ -254,7 +254,7 @@ dissect_mqpcf_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
|
|||
{
|
||||
if (tvb_length(tvb) >= 36)
|
||||
{
|
||||
struct mqinfo* mqinfo = pinfo->private_data;
|
||||
struct mqinfo* mqinfo = (struct mqinfo *)pinfo->private_data;
|
||||
if (strncmp((const char*)mqinfo->format, MQ_FMT_ADMIN, 8) == 0
|
||||
|| strncmp((const char*)mqinfo->format, MQ_FMT_EVENT, 8) == 0
|
||||
|| strncmp((const char*)mqinfo->format, MQ_FMT_PCF, 8) == 0)
|
||||
|
|
|
@ -637,7 +637,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
if (strncmp(p->strptr, header_name, strlen(p->strptr)) == 0)
|
||||
{
|
||||
header_type = p->value;
|
||||
header_type = (HEADER_TYPE)p->value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ static void msproxy_sub_dissector( tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
DISSECTOR_ASSERT( conversation); /* should always find a conversation */
|
||||
|
||||
redirect_info = conversation_get_proto_data(conversation,
|
||||
redirect_info = (redirect_entry_t *)conversation_get_proto_data(conversation,
|
||||
proto_msproxy);
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MS Proxy");
|
||||
|
@ -277,17 +277,17 @@ static void add_msproxy_conversation( packet_info *pinfo,
|
|||
}
|
||||
|
||||
conversation = find_conversation( pinfo->fd->num, &pinfo->src,
|
||||
&pinfo->dst, hash_info->proto, hash_info->server_int_port,
|
||||
&pinfo->dst, (port_type)hash_info->proto, hash_info->server_int_port,
|
||||
hash_info->clnt_port, 0);
|
||||
|
||||
if ( !conversation) {
|
||||
conversation = conversation_new( pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
||||
hash_info->proto, hash_info->server_int_port,
|
||||
(port_type)hash_info->proto, hash_info->server_int_port,
|
||||
hash_info->clnt_port, 0);
|
||||
}
|
||||
conversation_set_dissector(conversation, msproxy_sub_handle);
|
||||
|
||||
new_conv_info = se_alloc(sizeof(redirect_entry_t));
|
||||
new_conv_info = se_new(redirect_entry_t);
|
||||
|
||||
new_conv_info->remote_addr = hash_info->dst_addr;
|
||||
new_conv_info->clnt_port = hash_info->clnt_port;
|
||||
|
@ -1085,9 +1085,9 @@ static void dissect_msproxy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
conversation = find_or_create_conversation(pinfo);
|
||||
|
||||
hash_info = conversation_get_proto_data(conversation, proto_msproxy);
|
||||
hash_info = (hash_entry_t *)conversation_get_proto_data(conversation, proto_msproxy);
|
||||
if ( !hash_info) {
|
||||
hash_info = se_alloc(sizeof(hash_entry_t));
|
||||
hash_info = se_new(hash_entry_t);
|
||||
conversation_add_proto_data(conversation, proto_msproxy,
|
||||
hash_info);
|
||||
}
|
||||
|
|
|
@ -192,14 +192,14 @@ msrp_add_address( packet_info *pinfo,
|
|||
/*
|
||||
* Check if the conversation has data associated with it.
|
||||
*/
|
||||
p_conv_data = conversation_get_proto_data(p_conv, proto_msrp);
|
||||
p_conv_data = (struct _msrp_conversation_info *)conversation_get_proto_data(p_conv, proto_msrp);
|
||||
|
||||
/*
|
||||
* If not, add a new data item.
|
||||
*/
|
||||
if (!p_conv_data) {
|
||||
/* Create conversation data */
|
||||
p_conv_data = se_alloc0(sizeof(struct _msrp_conversation_info));
|
||||
p_conv_data = se_new0(struct _msrp_conversation_info);
|
||||
conversation_add_proto_data(p_conv, proto_msrp, p_conv_data);
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
struct _msrp_conversation_info *p_conv_data = NULL;
|
||||
|
||||
/* Use existing packet data if available */
|
||||
p_conv_data = p_get_proto_data(pinfo->fd, proto_msrp);
|
||||
p_conv_data = (struct _msrp_conversation_info *)p_get_proto_data(pinfo->fd, proto_msrp);
|
||||
|
||||
if (!p_conv_data)
|
||||
{
|
||||
|
@ -235,12 +235,12 @@ show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
/* Look for data in conversation */
|
||||
struct _msrp_conversation_info *p_conv_packet_data;
|
||||
p_conv_data = conversation_get_proto_data(p_conv, proto_msrp);
|
||||
p_conv_data = (struct _msrp_conversation_info *)conversation_get_proto_data(p_conv, proto_msrp);
|
||||
|
||||
if (p_conv_data)
|
||||
{
|
||||
/* Save this conversation info into packet info */
|
||||
p_conv_packet_data = se_memdup(p_conv_data,
|
||||
p_conv_packet_data = (struct _msrp_conversation_info *)se_memdup(p_conv_data,
|
||||
sizeof(struct _msrp_conversation_info));
|
||||
|
||||
p_add_proto_data(pinfo->fd, proto_msrp, p_conv_packet_data);
|
||||
|
|
|
@ -289,7 +289,7 @@ mtp3_pc_to_str(const guint32 pc)
|
|||
{
|
||||
gchar *str;
|
||||
|
||||
str=ep_alloc(MAX_STRUCTURED_PC_LENGTH);
|
||||
str=(gchar *)ep_alloc(MAX_STRUCTURED_PC_LENGTH);
|
||||
mtp3_pc_to_str_buf(pc, str, MAX_STRUCTURED_PC_LENGTH);
|
||||
return str;
|
||||
}
|
||||
|
@ -611,11 +611,11 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
|
|||
DISSECTOR_ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
mtp3_addr_opc->type = mtp3_standard;
|
||||
mtp3_addr_opc->type = (Standard_Type)mtp3_standard;
|
||||
mtp3_addr_opc->pc = opc;
|
||||
SET_ADDRESS(&pinfo->src, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) mtp3_addr_opc);
|
||||
|
||||
mtp3_addr_dpc->type = mtp3_standard;
|
||||
mtp3_addr_dpc->type = (Standard_Type)mtp3_standard;
|
||||
mtp3_addr_dpc->pc = dpc;
|
||||
SET_ADDRESS(&pinfo->dst, AT_SS7PC, sizeof(mtp3_addr_pc_t), (guint8 *) mtp3_addr_dpc);
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ reset_mtp3_standard(void)
|
|||
static void
|
||||
dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
mtp3_tap_rec_t* tap_rec = ep_alloc0(sizeof(mtp3_tap_rec_t));
|
||||
mtp3_tap_rec_t* tap_rec = ep_new0(mtp3_tap_rec_t);
|
||||
gint heuristic_standard;
|
||||
guint8 si;
|
||||
|
||||
|
@ -752,8 +752,8 @@ dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
mtp3_tree = proto_item_add_subtree(mtp3_item, ett_mtp3);
|
||||
}
|
||||
|
||||
mtp3_addr_opc = wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
|
||||
mtp3_addr_dpc = wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
|
||||
mtp3_addr_opc = (mtp3_addr_pc_t *)wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
|
||||
mtp3_addr_dpc = (mtp3_addr_pc_t *)wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
|
||||
|
||||
/* Dissect the packet (even if !tree so can call sub-dissectors and update
|
||||
* the source and destination address columns) */
|
||||
|
|
|
@ -1012,7 +1012,7 @@ unpack_eps_mid_digits(tvbuff_t *tvb) {
|
|||
|
||||
length = tvb_length(tvb);
|
||||
|
||||
digit_str = ep_alloc(length*2);
|
||||
digit_str = (char *)ep_alloc(length*2);
|
||||
|
||||
/* Get identity digit 1 */
|
||||
octet = tvb_get_guint8(tvb,offset);
|
||||
|
|
|
@ -204,7 +204,7 @@ nmas_string(tvbuff_t* tvb, int hfinfo, proto_tree *nmas_tree, int offset, gboole
|
|||
guint16 c_char;
|
||||
guint32 length_remaining = 0;
|
||||
|
||||
buffer=ep_alloc(ITEM_LABEL_LENGTH+1);
|
||||
buffer=(char *)ep_alloc(ITEM_LABEL_LENGTH+1);
|
||||
if (little) {
|
||||
str_length = tvb_get_letohl(tvb, foffset);
|
||||
}
|
||||
|
|
|
@ -263,12 +263,12 @@ mncp_hash_insert(conversation_t *conversation, guint32 nwconnection, guint8 nwta
|
|||
/* Now remember the request, so we can find it if we later
|
||||
a reply to it. Track by conversation, connection, and task number.
|
||||
in NetWare these values determine each unique session */
|
||||
key = se_alloc(sizeof(mncp_rhash_key));
|
||||
key = se_new(mncp_rhash_key);
|
||||
key->conversation = conversation;
|
||||
key->nwconnection = nwconnection;
|
||||
key->nwtask = nwtask;
|
||||
|
||||
value = se_alloc(sizeof(mncp_rhash_value));
|
||||
value = se_new(mncp_rhash_value);
|
||||
|
||||
g_hash_table_insert(mncp_rhash, key, value);
|
||||
|
||||
|
@ -290,7 +290,7 @@ mncp_hash_lookup(conversation_t *conversation, guint32 nwconnection, guint8 nwta
|
|||
key.nwconnection = nwconnection;
|
||||
key.nwtask = nwtask;
|
||||
|
||||
return g_hash_table_lookup(mncp_rhash, &key);
|
||||
return (mncp_rhash_value *)g_hash_table_lookup(mncp_rhash, &key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -279,7 +279,7 @@ dissect_ndp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (check_col(pinfo->cinfo, COL_INFO)) {
|
||||
hello_type = "";
|
||||
if (pinfo->dl_dst.type == AT_ETHER) {
|
||||
const guint8 *dstmac = pinfo->dl_dst.data;
|
||||
const guint8 *dstmac = (const guint8 *)pinfo->dl_dst.data;
|
||||
|
||||
switch (dstmac[5]) {
|
||||
|
||||
|
|
|
@ -4135,11 +4135,11 @@ ndps_hash_insert(conversation_t *conversation, guint32 ndps_xport)
|
|||
|
||||
/* Now remember the request, so we can find it if we later
|
||||
a reply to it. */
|
||||
request_key = se_alloc(sizeof(ndps_req_hash_key));
|
||||
request_key = se_new(ndps_req_hash_key);
|
||||
request_key->conversation = conversation;
|
||||
request_key->ndps_xport = ndps_xport;
|
||||
|
||||
request_value = se_alloc(sizeof(ndps_req_hash_value));
|
||||
request_value = se_new(ndps_req_hash_value);
|
||||
request_value->ndps_prog = 0;
|
||||
request_value->ndps_func = 0;
|
||||
request_value->ndps_frame_num = 0;
|
||||
|
@ -4160,7 +4160,7 @@ ndps_hash_lookup(conversation_t *conversation, guint32 ndps_xport)
|
|||
request_key.conversation = conversation;
|
||||
request_key.ndps_xport = ndps_xport;
|
||||
|
||||
return g_hash_table_lookup(ndps_req_hash, &request_key);
|
||||
return (ndps_req_hash_value *)g_hash_table_lookup(ndps_req_hash, &request_key);
|
||||
}
|
||||
|
||||
/* ================================================================= */
|
||||
|
@ -4338,7 +4338,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
conversation_t *conversation;
|
||||
|
||||
/* Get SPX info from SPX dissector */
|
||||
spx_info_p = pinfo->private_data;
|
||||
spx_info_p = (spx_info *)pinfo->private_data;
|
||||
/* Check to see if defragmentation is enabled in the dissector */
|
||||
if (!ndps_defragment) {
|
||||
dissect_ndps(tvb, pinfo, tree);
|
||||
|
@ -4371,7 +4371,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
else
|
||||
{
|
||||
/* Get request value data */
|
||||
request_value = p_get_proto_data(pinfo->fd, proto_ndps);
|
||||
request_value = (ndps_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ndps);
|
||||
}
|
||||
if (!request_value)
|
||||
{
|
||||
|
@ -6989,7 +6989,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
|
|||
/* else... we haven't seen an NDPS Request for that conversation. */
|
||||
}
|
||||
else {
|
||||
request_value = p_get_proto_data(pinfo->fd, proto_ndps);
|
||||
request_value = (ndps_req_hash_value *)p_get_proto_data(pinfo->fd, proto_ndps);
|
||||
}
|
||||
if (request_value) {
|
||||
ndps_prog = request_value->ndps_prog;
|
||||
|
|
|
@ -267,7 +267,7 @@ dissect_netanalyzer_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
(tvb_get_guint8(tvb, INFO_TYPE_OFFSET) == 0x00) )
|
||||
{
|
||||
#define MAX_BUFFER 255
|
||||
szTemp=ep_alloc(MAX_BUFFER);
|
||||
szTemp=(guchar *)ep_alloc(MAX_BUFFER);
|
||||
|
||||
/* everything ok */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "netANALYZER");
|
||||
|
|
|
@ -307,8 +307,8 @@ dissect_nfsacl2_access_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
|||
|
||||
/* Get access mask to check and save it for comparison to the access reply. */
|
||||
amask = tvb_get_ntohl(tvb, offset);
|
||||
acc_request = se_memdup( &amask, sizeof(guint32));
|
||||
civ = pinfo->private_data;
|
||||
acc_request = (guint32 *)se_memdup( &amask, sizeof(guint32));
|
||||
civ = (rpc_call_info_value *)pinfo->private_data;
|
||||
civ->private_data = acc_request;
|
||||
|
||||
display_access_items(tvb, offset, pinfo, tree, amask, 'C', 3, NULL, "Check") ;
|
||||
|
|
|
@ -856,7 +856,7 @@ static char *decode_key_name(int unicode)
|
|||
{
|
||||
char *key_name;
|
||||
|
||||
key_name = ep_alloc(10);
|
||||
key_name = (char *)ep_alloc(10);
|
||||
|
||||
if ((unicode <= 0x20)
|
||||
|| (unicode == 0x7F)
|
||||
|
@ -1116,7 +1116,7 @@ static void decode_evt(proto_tree *tree,
|
|||
pt_length -= 1;
|
||||
}
|
||||
unicode_value = decode_utf8(utf8_value);
|
||||
key_name = ep_alloc(30);
|
||||
key_name = (char *)ep_alloc(30);
|
||||
g_snprintf(key_name, 30, "\"%s\"", decode_key_name((int)unicode_value));
|
||||
|
||||
/* add text to the frame "INFO" column */
|
||||
|
@ -1207,22 +1207,22 @@ static void decode_mtd(proto_tree *tree,
|
|||
guint offset,
|
||||
guint length)
|
||||
{
|
||||
guint8 class = tvb_get_guint8(tvb, offset);
|
||||
guint8 noe_class = tvb_get_guint8(tvb, offset);
|
||||
|
||||
proto_tree_add_item(tree, hf_noe_class, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
/* add text to the frame "INFO" column */
|
||||
if (check_col(pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
|
||||
val_to_str_ext_const(class, &val_str_class_ext, "Unknown"));
|
||||
val_to_str_ext_const(noe_class, &val_str_class_ext, "Unknown"));
|
||||
/* update text of the main proto item */
|
||||
proto_item_append_text(tree, ", %s",
|
||||
val_to_str_ext_const(class, &val_str_class_ext, "Unknown"));
|
||||
val_to_str_ext_const(noe_class, &val_str_class_ext, "Unknown"));
|
||||
|
||||
offset += 1;
|
||||
length -= 1;
|
||||
|
||||
if (class >= C_DYNAMIC)
|
||||
if (noe_class >= C_DYNAMIC)
|
||||
{
|
||||
proto_tree_add_item(tree, hf_noe_objectid, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
|
|
|
@ -613,7 +613,7 @@ tvb_mip6_fmt_ts(tvbuff_t *tvb, gint offset)
|
|||
}
|
||||
|
||||
fractime = bd->tm_sec + tempfrac / NTP_FLOAT_DENOM;
|
||||
buff=ep_alloc(NTP_TS_SIZE);
|
||||
buff=(char *)ep_alloc(NTP_TS_SIZE);
|
||||
g_snprintf(buff, NTP_TS_SIZE,
|
||||
"%s %2d, %d %02d:%02d:%07.4f UTC",
|
||||
mon_names[bd->tm_mon],
|
||||
|
@ -655,7 +655,7 @@ tvb_ntp_fmt_ts(tvbuff_t *tvb, gint offset)
|
|||
}
|
||||
|
||||
fractime = bd->tm_sec + tempfrac / NTP_FLOAT_DENOM;
|
||||
buff=ep_alloc(NTP_TS_SIZE);
|
||||
buff=(char *)ep_alloc(NTP_TS_SIZE);
|
||||
g_snprintf(buff, NTP_TS_SIZE,
|
||||
"%s %2d, %d %02d:%02d:%09.6f UTC",
|
||||
mon_names[bd->tm_mon],
|
||||
|
@ -831,7 +831,7 @@ dissect_ntp_std(tvbuff_t *tvb, proto_tree *ntp_tree, guint8 flags)
|
|||
* But, all V3 and V4 servers set this to IP address of their
|
||||
* higher level server. My decision was to resolve this address.
|
||||
*/
|
||||
buff = ep_alloc(NTP_TS_SIZE);
|
||||
buff = (gchar *)ep_alloc(NTP_TS_SIZE);
|
||||
if (stratum <= 1) {
|
||||
g_snprintf (buff, NTP_TS_SIZE, "Unidentified reference source '%.4s'",
|
||||
tvb_get_ephemeral_string(tvb, 12, 4));
|
||||
|
|
|
@ -1063,11 +1063,11 @@ dissect_opensafety_snmt_message(tvbuff_t *message_tvb, packet_info *pinfo , prot
|
|||
|
||||
if ( global_scm_udid_autoset == TRUE )
|
||||
{
|
||||
tempString = ep_alloc0(128 * sizeof(char));
|
||||
tempString = (char *)ep_alloc0(128 * sizeof(char));
|
||||
g_snprintf ( tempString, 18, "%s", tvb_bytes_to_str_punct(message_tvb, OSS_FRAME_POS_DATA + frameStart1 + 1, 6, ':' ) );
|
||||
if ( memcmp ( global_scm_udid, tempString, 17 ) != 0 )
|
||||
{
|
||||
local_scm_udid = se_alloc0(18 * sizeof(char));
|
||||
local_scm_udid = (char *)se_alloc0(18 * sizeof(char));
|
||||
g_snprintf(local_scm_udid, 18, "%s", tempString );
|
||||
expert_add_info_format(pinfo, item, PI_PROTOCOL, PI_NOTE, "Auto detected payload as SCM UDID [%s].", tempString);
|
||||
}
|
||||
|
@ -1094,11 +1094,11 @@ dissect_opensafety_snmt_message(tvbuff_t *message_tvb, packet_info *pinfo , prot
|
|||
|
||||
if ( global_scm_udid_autoset == TRUE )
|
||||
{
|
||||
tempString = ep_alloc0(18 * sizeof(char));
|
||||
tempString = (char *)ep_alloc0(18 * sizeof(char));
|
||||
g_snprintf ( tempString, 18, "%s", tvb_bytes_to_str_punct(message_tvb, OSS_FRAME_POS_DATA + frameStart1 + 1, 6, ':' ) );
|
||||
if ( memcmp ( global_scm_udid, tempString, 17 ) != 0 )
|
||||
{
|
||||
local_scm_udid = se_alloc0(18 * sizeof(char));
|
||||
local_scm_udid = (char *)se_alloc0(18 * sizeof(char));
|
||||
g_snprintf(local_scm_udid, 18, "%s", tempString );
|
||||
expert_add_info_format(pinfo, item, PI_PROTOCOL, PI_NOTE, "Auto detected payload as SCM UDID [%s].", tempString);
|
||||
}
|
||||
|
|
|
@ -600,7 +600,7 @@ detect_protocol_options(tvbuff_t *tvb, packet_info *pinfo, int offset, int iComm
|
|||
type = tvb_get_guint8(tvb, offset + 11);
|
||||
command_id = tvb_get_ntohl(tvb, offset + 5);
|
||||
|
||||
cd = se_alloc(sizeof(openwire_conv_data));
|
||||
cd = se_new(openwire_conv_data);
|
||||
cd->caching = FALSE;
|
||||
cd->tight = FALSE;
|
||||
if (command_id > (1 << 24))
|
||||
|
@ -636,7 +636,7 @@ detect_protocol_options(tvbuff_t *tvb, packet_info *pinfo, int offset, int iComm
|
|||
cd = (openwire_conv_data*)conversation_get_proto_data(conv, proto_openwire);
|
||||
if (!cd)
|
||||
{
|
||||
cd = se_alloc(sizeof(openwire_conv_data));
|
||||
cd = se_new(openwire_conv_data);
|
||||
cd->tight = TRUE;
|
||||
cd->caching = FALSE; /* Dummy value */
|
||||
conversation_add_proto_data(conv, proto_openwire, cd);
|
||||
|
|
|
@ -990,7 +990,7 @@ dissect_ospf_bitfield (proto_tree *parent_tree, tvbuff_t *tvb, int offset,
|
|||
item = proto_tree_add_uint(parent_tree, hfindex, tvb, offset, length, flags);
|
||||
tree = proto_item_add_subtree(item, *bfinfo->ett);
|
||||
|
||||
str = ep_alloc(MAX_OPTIONS_LEN);
|
||||
str = (char *)ep_alloc(MAX_OPTIONS_LEN);
|
||||
str[0] = 0;
|
||||
for (i = 0, pos = 0; i < bfinfo->num; i++) {
|
||||
idx = hf_ospf_filter[bfinfo->idx[i]];
|
||||
|
@ -1199,9 +1199,9 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
and a prepended IPv6 pseudo-header. */
|
||||
|
||||
/* Set up the fields of the pseudo-header. */
|
||||
cksum_vec[0].ptr = pinfo->src.data;
|
||||
cksum_vec[0].ptr = (guint8 *)pinfo->src.data;
|
||||
cksum_vec[0].len = pinfo->src.len;
|
||||
cksum_vec[1].ptr = pinfo->dst.data;
|
||||
cksum_vec[1].ptr = (guint8 *)pinfo->dst.data;
|
||||
cksum_vec[1].len = pinfo->dst.len;
|
||||
cksum_vec[2].ptr = (const guint8 *)&phdr;
|
||||
phdr[0] = g_htonl(ospflen);
|
||||
|
|
|
@ -541,12 +541,12 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/*
|
||||
* Do we already have a state structure for this conv
|
||||
*/
|
||||
pana_info = conversation_get_proto_data(conversation, proto_pana);
|
||||
pana_info = (pana_conv_info_t *)conversation_get_proto_data(conversation, proto_pana);
|
||||
if (!pana_info) {
|
||||
/* No. Attach that information to the conversation, and add
|
||||
* it to the list of information structures.
|
||||
*/
|
||||
pana_info = se_alloc(sizeof(pana_conv_info_t));
|
||||
pana_info = se_new(pana_conv_info_t);
|
||||
pana_info->pdus=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "pana_pdus");
|
||||
|
||||
conversation_add_proto_data(conversation, proto_pana, pana_info);
|
||||
|
@ -555,24 +555,24 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if(!pinfo->fd->flags.visited){
|
||||
if(flags&PANA_FLAG_R){
|
||||
/* This is a request */
|
||||
pana_trans=se_alloc(sizeof(pana_transaction_t));
|
||||
pana_trans=se_new(pana_transaction_t);
|
||||
pana_trans->req_frame=pinfo->fd->num;
|
||||
pana_trans->rep_frame=0;
|
||||
pana_trans->req_time=pinfo->fd->abs_ts;
|
||||
se_tree_insert32(pana_info->pdus, seq_num, (void *)pana_trans);
|
||||
} else {
|
||||
pana_trans=se_tree_lookup32(pana_info->pdus, seq_num);
|
||||
pana_trans=(pana_transaction_t *)se_tree_lookup32(pana_info->pdus, seq_num);
|
||||
if(pana_trans){
|
||||
pana_trans->rep_frame=pinfo->fd->num;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pana_trans=se_tree_lookup32(pana_info->pdus, seq_num);
|
||||
pana_trans=(pana_transaction_t *)se_tree_lookup32(pana_info->pdus, seq_num);
|
||||
}
|
||||
|
||||
if(!pana_trans){
|
||||
/* create a "fake" pana_trans structure */
|
||||
pana_trans=ep_alloc(sizeof(pana_transaction_t));
|
||||
pana_trans=ep_new(pana_transaction_t);
|
||||
pana_trans->req_frame=0;
|
||||
pana_trans->rep_frame=0;
|
||||
pana_trans->req_time=pinfo->fd->abs_ts;
|
||||
|
|
|
@ -176,7 +176,7 @@ pcnfsd_decode_obscure(const char* data, int len)
|
|||
char *decoded_buf;
|
||||
char *decoded_data;
|
||||
|
||||
decoded_buf = ep_alloc(len);
|
||||
decoded_buf = (char *)ep_alloc(len);
|
||||
decoded_data = decoded_buf;
|
||||
for ( ; len>0 ; len--, data++, decoded_data++) {
|
||||
*decoded_data = (*data ^ 0x5b) & 0x7f;
|
||||
|
|
|
@ -908,11 +908,11 @@ static gboolean dissect_pdcp_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
|
|||
offset++;
|
||||
break;
|
||||
case PDCP_LTE_LOG_CHAN_TYPE_TAG:
|
||||
p_pdcp_lte_info->channelType = tvb_get_guint8(tvb, offset);
|
||||
p_pdcp_lte_info->channelType = (LogicalChannelType)tvb_get_guint8(tvb, offset);
|
||||
offset++;
|
||||
break;
|
||||
case PDCP_LTE_BCCH_TRANSPORT_TYPE_TAG:
|
||||
p_pdcp_lte_info->BCCHTransport = tvb_get_guint8(tvb, offset);
|
||||
p_pdcp_lte_info->BCCHTransport = (BCCHTransportType)tvb_get_guint8(tvb, offset);
|
||||
offset++;
|
||||
break;
|
||||
case PDCP_LTE_ROHC_IP_VERSION_TAG:
|
||||
|
@ -928,7 +928,7 @@ static gboolean dissect_pdcp_lte_heur(tvbuff_t *tvb, packet_info *pinfo,
|
|||
offset++;
|
||||
break;
|
||||
case PDCP_LTE_ROHC_MODE_TAG:
|
||||
p_pdcp_lte_info->mode = tvb_get_guint8(tvb, offset);
|
||||
p_pdcp_lte_info->mode = (enum rohc_mode)tvb_get_guint8(tvb, offset);
|
||||
offset++;
|
||||
break;
|
||||
case PDCP_LTE_ROHC_RND_TAG:
|
||||
|
@ -991,7 +991,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PDCP-LTE");
|
||||
|
||||
/* Look for attached packet info! */
|
||||
p_pdcp_info = p_get_proto_data(pinfo->fd, proto_pdcp_lte);
|
||||
p_pdcp_info = (struct pdcp_lte_info *)p_get_proto_data(pinfo->fd, proto_pdcp_lte);
|
||||
/* Can't dissect anything without it... */
|
||||
if (p_pdcp_info == NULL) {
|
||||
return;
|
||||
|
|
|
@ -163,7 +163,7 @@ static tvbuff_t *new_octet_aligned_subset(tvbuff_t *tvb, guint32 offset, asn1_ct
|
|||
if (offset & 0x07) { /* unaligned */
|
||||
shift1 = offset & 0x07;
|
||||
shift0 = 8 - shift1;
|
||||
buf = g_malloc(actual_length);
|
||||
buf = (guint8 *)g_malloc(actual_length);
|
||||
octet0 = tvb_get_guint8(tvb, boffset);
|
||||
for (i=0; i<actual_length; i++) {
|
||||
octet1 = octet0;
|
||||
|
@ -304,7 +304,7 @@ dissect_per_length_determinant(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx _
|
|||
|
||||
/* prepare the string (max number of bits + quartet separators + prepended space) */
|
||||
str_length = 256+64+1;
|
||||
str=ep_alloc(str_length+1);
|
||||
str=(char *)ep_alloc(str_length+1);
|
||||
str_index = 0;
|
||||
|
||||
str_length = g_snprintf(str, str_length+1, " ");
|
||||
|
@ -635,7 +635,7 @@ DEBUG_ENTRY("dissect_per_restricted_character_string");
|
|||
}
|
||||
|
||||
|
||||
buf = g_malloc(length+1);
|
||||
buf = (guint8 *)g_malloc(length+1);
|
||||
old_offset=offset;
|
||||
for(char_pos=0;char_pos<length;char_pos++){
|
||||
guchar val;
|
||||
|
@ -1382,7 +1382,7 @@ DEBUG_ENTRY("dissect_per_constrained_integer_64b");
|
|||
|
||||
/* prepare the string (max number of bits + quartet separators + field name + ": ") */
|
||||
str_length = 512+128+(int)strlen(hfi->name)+2;
|
||||
str = ep_alloc(str_length+1);
|
||||
str = (char *)ep_alloc(str_length+1);
|
||||
str_index = 0;
|
||||
str_index = g_snprintf(str, str_length+1, "%s: ", hfi->name);
|
||||
for(bit=0;bit<((int)(offset&0x07));bit++){
|
||||
|
|
|
@ -257,7 +257,7 @@ optsstr(guint8 opts)
|
|||
if (opts == 0)
|
||||
return("");
|
||||
|
||||
msg=ep_alloc(MAX_STR_LEN);
|
||||
msg=(char *)ep_alloc(MAX_STR_LEN);
|
||||
if (opts & PGM_OPT){
|
||||
returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "Present");
|
||||
idx += MIN(returned_length, MAX_STR_LEN-idx);
|
||||
|
@ -289,7 +289,7 @@ paritystr(guint8 parity)
|
|||
if (parity == 0)
|
||||
return("");
|
||||
|
||||
msg=ep_alloc(MAX_STR_LEN);
|
||||
msg=(char *)ep_alloc(MAX_STR_LEN);
|
||||
if (parity & PGM_OPT_PARITY_PRM_PRO){
|
||||
returned_length = g_snprintf(&msg[idx], MAX_STR_LEN-idx, "Pro-active");
|
||||
idx += MIN(returned_length, MAX_STR_LEN-idx);
|
||||
|
@ -506,7 +506,7 @@ dissect_pgmopts(ptvcursor_t* cursor, const char *pktname)
|
|||
firsttime = TRUE;
|
||||
soffset = 0;
|
||||
naks = (int)(optdata_len/sizeof(guint32));
|
||||
nakbuf = ep_alloc(8192);
|
||||
nakbuf = (unsigned char *)ep_alloc(8192);
|
||||
j = 0;
|
||||
/*
|
||||
* Print out 8 per line
|
||||
|
|
|
@ -708,9 +708,9 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
break;
|
||||
case AT_IPv6:
|
||||
/* Set up the fields of the pseudo-header. */
|
||||
cksum_vec[0].ptr = pinfo->src.data;
|
||||
cksum_vec[0].ptr = (guint8 *)pinfo->src.data;
|
||||
cksum_vec[0].len = pinfo->src.len;
|
||||
cksum_vec[1].ptr = pinfo->dst.data;
|
||||
cksum_vec[1].ptr = (guint8 *)pinfo->dst.data;
|
||||
cksum_vec[1].len = pinfo->dst.len;
|
||||
cksum_vec[2].ptr = (const guint8 *)&phdr;
|
||||
phdr[0] = g_htonl(pim_length);
|
||||
|
|
|
@ -143,16 +143,16 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "POP");
|
||||
|
||||
frame_data_p = p_get_proto_data(pinfo->fd, proto_pop);
|
||||
frame_data_p = (struct pop_proto_data *)p_get_proto_data(pinfo->fd, proto_pop);
|
||||
|
||||
conversation = find_or_create_conversation(pinfo);
|
||||
data_val = conversation_get_proto_data(conversation, proto_pop);
|
||||
data_val = (struct pop_data_val *)conversation_get_proto_data(conversation, proto_pop);
|
||||
if (!data_val) {
|
||||
|
||||
/*
|
||||
* No conversation - create one and attach it.
|
||||
*/
|
||||
data_val = se_alloc0(sizeof(struct pop_data_val));
|
||||
data_val = se_new0(struct pop_data_val);
|
||||
|
||||
conversation_add_proto_data(conversation, proto_pop, data_val);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
data_val->msg_read_len += tvb_length(tvb);
|
||||
|
||||
frame_data_p = se_alloc(sizeof(struct pop_proto_data));
|
||||
frame_data_p = se_new(struct pop_proto_data);
|
||||
|
||||
frame_data_p->conversation_id = conversation->index;
|
||||
frame_data_p->more_frags = data_val->msg_read_len < data_val->msg_tot_len;
|
||||
|
|
|
@ -80,7 +80,7 @@ dissect_getport_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
|||
|
||||
/* make sure we remember protocol type until the reply packet */
|
||||
if(!pinfo->fd->flags.visited){
|
||||
rpc_call_info_value *rpc_call=pinfo->private_data;
|
||||
rpc_call_info_value *rpc_call=(rpc_call_info_value *)pinfo->private_data;
|
||||
if(rpc_call){
|
||||
proto = tvb_get_ntohl(tvb, offset+8);
|
||||
if(proto==IP_PROTO_UDP){ /* only do this for UDP */
|
||||
|
@ -138,7 +138,7 @@ dissect_getport_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
|||
|
||||
/* we might have learnt a <ipaddr><protocol><port> mapping for ONC-RPC*/
|
||||
if(!pinfo->fd->flags.visited){
|
||||
rpc_call_info_value *rpc_call=pinfo->private_data;
|
||||
rpc_call_info_value *rpc_call=(rpc_call_info_value *)pinfo->private_data;
|
||||
/* only do this for UDP, TCP does not need anything like this */
|
||||
if(rpc_call && (GPOINTER_TO_UINT(rpc_call->private_data)==PT_UDP) ){
|
||||
guint32 port;
|
||||
|
|
|
@ -3600,7 +3600,7 @@ dissect_vsncp_pdnaddress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
|
|||
|
||||
case 2:
|
||||
{
|
||||
struct e_in6_addr *ad = ep_alloc0(sizeof (struct e_in6_addr));
|
||||
struct e_in6_addr *ad = ep_new0(struct e_in6_addr);
|
||||
|
||||
tvb_memcpy(tvb, &ad->bytes[8], offset + 3, 8);
|
||||
proto_tree_add_text(field_tree, tvb, offset + 3, length - 3, "%s: %s",
|
||||
|
@ -3611,7 +3611,7 @@ dissect_vsncp_pdnaddress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
|
|||
|
||||
case 3:
|
||||
{
|
||||
struct e_in6_addr *ad = ep_alloc0(sizeof (struct e_in6_addr));
|
||||
struct e_in6_addr *ad = ep_new0(struct e_in6_addr);
|
||||
|
||||
tvb_memcpy(tvb, &ad->bytes[8], offset + 3, 8);
|
||||
proto_tree_add_text(field_tree, tvb, offset + 3, length - 3, "%s: %s",
|
||||
|
@ -4548,7 +4548,7 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tvb_ensure_bytes_exist (tvb, 0, hdr_len); /* ip_hdr_len + 8 */
|
||||
|
||||
/* allocate a copy of the IP packet */
|
||||
ip_packet = tvb_memdup(tvb, 0, length);
|
||||
ip_packet = (guchar *)tvb_memdup(tvb, 0, length);
|
||||
|
||||
/* restore the proper values to the IP and UDP length fields */
|
||||
ip_packet[2] = length >> 8;
|
||||
|
@ -4904,7 +4904,7 @@ remove_escape_chars(tvbuff_t *tvb, int offset, int length)
|
|||
guint8 octet;
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
buff = g_malloc(length);
|
||||
buff = (guint8 *)g_malloc(length);
|
||||
i = 0;
|
||||
while (scanned_len < length) {
|
||||
octet = tvb_get_guint8(tvb, offset);
|
||||
|
|
|
@ -847,7 +847,7 @@ dissect_pvfs_opaque_data(tvbuff_t *tvb, int offset,
|
|||
tmpstr = (char *) tvb_get_ephemeral_string(tvb, data_offset,
|
||||
string_length_copy);
|
||||
|
||||
string_buffer = memcpy(ep_alloc(string_length_copy+1), tmpstr, string_length_copy);
|
||||
string_buffer = (char *)memcpy(ep_alloc(string_length_copy+1), tmpstr, string_length_copy);
|
||||
} else {
|
||||
string_buffer = (char *) tvb_memcpy(tvb,
|
||||
ep_alloc(string_length_copy+1), data_offset, string_length_copy);
|
||||
|
@ -3084,10 +3084,10 @@ pvfs2_io_tracking_new_with_tag(guint64 tag, guint32 num)
|
|||
pvfs2_io_tracking_value_t *value;
|
||||
pvfs2_io_tracking_key_t *newkey;
|
||||
|
||||
newkey = (pvfs2_io_tracking_key_t *) se_alloc0(sizeof(*newkey));
|
||||
newkey = se_new0(pvfs2_io_tracking_key_t);
|
||||
newkey->tag = tag;
|
||||
|
||||
value = se_alloc0(sizeof(*value));
|
||||
value = se_new0(pvfs2_io_tracking_value_t);
|
||||
|
||||
g_hash_table_insert(pvfs2_io_tracking_value_table, newkey, value);
|
||||
|
||||
|
@ -3159,7 +3159,7 @@ dissect_pvfs_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
|||
memset(&key, 0, sizeof(key));
|
||||
key.tag = tag;
|
||||
|
||||
val = g_hash_table_lookup(pvfs2_io_tracking_value_table, &key);
|
||||
val = (pvfs2_io_tracking_value_t *)g_hash_table_lookup(pvfs2_io_tracking_value_table, &key);
|
||||
|
||||
/* If this frame contains a known PVFS_SERV_IO tag, track it */
|
||||
if (val && !pinfo->fd->flags.visited)
|
||||
|
|
|
@ -71,14 +71,15 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree )
|
|||
gint payload_size;
|
||||
gint payload_padding;
|
||||
const int encaps_size = 4; /*encapsulation consists of mandatory CW only*/
|
||||
enum {
|
||||
typedef enum {
|
||||
PQ_CW_BAD = 0x001
|
||||
,PQ_CW_BAD_BITS03 = 0x002
|
||||
,PQ_CW_BAD_LEN_GT_PACKET = 0x004
|
||||
,PQ_CW_BAD_LEN_MUST_BE_ZERO = 0x008
|
||||
,PQ_CW_BAD_LEN_MUST_BE_NONZERO = 0x010
|
||||
,PQ_PAYLOAD_SIZE_ZERO = 0x020
|
||||
} packet_quality;
|
||||
} packet_quality_e;
|
||||
int packet_quality;
|
||||
|
||||
packet_size = tvb_reported_length_remaining(tvb, 0);
|
||||
if (packet_size < encaps_size)
|
||||
|
|
|
@ -2579,7 +2579,7 @@ dissect_q931_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
fragment_data *fd_head;
|
||||
tvbuff_t *next_tvb = NULL;
|
||||
|
||||
q931_pi=ep_alloc(sizeof(q931_packet_info));
|
||||
q931_pi=ep_new(q931_packet_info);
|
||||
|
||||
/* Init struct for collecting q931_packet_info */
|
||||
reset_q931_packet_info(q931_pi);
|
||||
|
|
|
@ -76,7 +76,7 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
proto_tree *qllc_tree = NULL;
|
||||
proto_item *qllc_ti = NULL;
|
||||
gboolean *q_bit_set = pinfo->private_data;
|
||||
gboolean *q_bit_set = (gboolean *)pinfo->private_data;
|
||||
guint8 addr, ctrl;
|
||||
gboolean command = FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue