aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/sctp_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gtk/sctp_stat.c')
-rw-r--r--ui/gtk/sctp_stat.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/ui/gtk/sctp_stat.c b/ui/gtk/sctp_stat.c
index a4cf82c53b..20eec2a8a6 100644
--- a/ui/gtk/sctp_stat.c
+++ b/ui/gtk/sctp_stat.c
@@ -138,7 +138,7 @@ static void tsn_free(gpointer data, gpointer user_data _U_)
static void reset(void *arg)
{
- sctp_allassocs_info_t *tapdata = arg;
+ sctp_allassocs_info_t *tapdata = (sctp_allassocs_info_t *)arg;
GList* list;
sctp_assoc_info_t * info;
@@ -471,12 +471,12 @@ static sctp_assoc_info_t * add_chunk_count(address * vadd, sctp_assoc_info_t * i
else
list = g_list_next(list);
}
- ch = g_malloc(sizeof(sctp_addr_chunk));
+ ch = (sctp_addr_chunk *)g_malloc(sizeof(sctp_addr_chunk));
ch->direction = direction;
- ch->addr = g_malloc(sizeof(address));
+ ch->addr = (address *)g_malloc(sizeof(address));
ch->addr->type = vadd->type;
ch->addr->len = vadd->len;
- dat = g_malloc(vadd->len);
+ dat = (guint8 *)g_malloc(vadd->len);
memcpy(dat, vadd->data, vadd->len);
ch->addr->data = dat;
for (i=0; i < NUM_CHUNKS; i++)
@@ -561,7 +561,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
tmp_info.src.len = 0;
}
- addr = g_malloc(tmp_info.src.len);
+ addr = (guint8 *)g_malloc(tmp_info.src.len);
memcpy(addr, sctp_info->ip_src.data, tmp_info.src.len);
tmp_info.src.data = addr;
@@ -583,7 +583,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
tmp_info.dst.len = 0;
}
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, sctp_info->ip_dst.data, tmp_info.dst.len);
tmp_info.dst.data = addr;
@@ -618,16 +618,16 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
if (sctp_info->number_of_tvbs > 0)
{
- info = g_malloc(sizeof(sctp_assoc_info_t));
+ info = (sctp_assoc_info_t *)g_malloc(sizeof(sctp_assoc_info_t));
memset(info, 0, sizeof(sctp_assoc_info_t));
info->src.type = tmp_info.src.type;
info->src.len = tmp_info.src.len;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr,(tmp_info.src.data), tmp_info.src.len);
info->src.data = addr;
info->dst.type = tmp_info.dst.type;
info->dst.len = tmp_info.dst.len;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, (tmp_info.dst.data), tmp_info.dst.len);
info->dst.data = addr;
info->port1 = tmp_info.port1;
@@ -684,26 +684,26 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID))
{
- tsn = g_malloc(sizeof(tsn_t));
- sack = g_malloc(sizeof(tsn_t));
+ tsn = (tsn_t *)g_malloc(sizeof(tsn_t));
+ sack = (tsn_t *)g_malloc(sizeof(tsn_t));
tsn->tsns = NULL;
tsn->first_tsn = 0;
sack->tsns = NULL;
sack->first_tsn = 0;
sack->src.type=tsn->src.type = tmp_info.src.type;
sack->src.len=tsn->src.len = tmp_info.src.len;
- addr = g_malloc(tmp_info.src.len);
+ addr = (guint8 *)g_malloc(tmp_info.src.len);
memcpy(addr, tmp_info.src.data, tmp_info.src.len);
tsn->src.data = addr;
- addr = g_malloc(tmp_info.src.len);
+ addr = (guint8 *)g_malloc(tmp_info.src.len);
memcpy(addr, tmp_info.src.data, tmp_info.src.len);
sack->src.data = addr;
sack->dst.type = tsn->dst.type = tmp_info.dst.type;
sack->dst.len =tsn->dst.len = tmp_info.dst.len;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, tmp_info.dst.data, tmp_info.dst.len);
tsn->dst.data = addr;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, tmp_info.dst.data, tmp_info.dst.len);
sack->dst.data = addr;
sack->secs=tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
@@ -742,7 +742,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
type = tvb_get_ntohs(sctp_info->tvb[chunk_number],0);
if (type == IPV4ADDRESS_PARAMETER_ID)
{
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = AT_IPv4;
store->len = 4;
store->data = g_malloc(4);
@@ -751,7 +751,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
else if (type == IPV6ADDRESS_PARAMETER_ID)
{
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = AT_IPv6;
store->len = 16;
store->data = g_malloc(16);
@@ -786,8 +786,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_SACK_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_NR_SACK_CHUNK_ID))
{
- tsn = g_malloc(sizeof(tsn_t));
- sack = g_malloc(sizeof(tsn_t));
+ tsn = (tsn_t *)g_malloc(sizeof(tsn_t));
+ sack = (tsn_t *)g_malloc(sizeof(tsn_t));
tsn->tsns = NULL;
sack->tsns = NULL;
tsn->first_tsn = 0;
@@ -821,11 +821,11 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
if (tsn->first_tsn == 0)
tsn->first_tsn = tsnumber;
- t_s_n = g_malloc(16);
+ t_s_n = (guint8 *)g_malloc(16);
tvb_memcpy(sctp_info->tvb[chunk_number], (guint8 *)(t_s_n),0, 16);
tsn->tsns = g_list_append(tsn->tsns, t_s_n);
datachunk = TRUE;
- tsn_s = g_malloc(sizeof(struct tsn_sort));
+ tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
@@ -861,11 +861,11 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
length = tvb_get_ntohs(sctp_info->tvb[chunk_number], CHUNK_LENGTH_OFFSET);
if (sack->first_tsn == 0)
sack->first_tsn = tsnumber;
- t_s_n = g_malloc(length);
+ t_s_n = (guint8 *)g_malloc(length);
tvb_memcpy(sctp_info->tvb[chunk_number], (guint8 *)(t_s_n),0, length);
sack->tsns = g_list_append(sack->tsns, t_s_n);
sackchunk = TRUE;
- tsn_s = g_malloc(sizeof(struct tsn_sort));
+ tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
@@ -896,17 +896,17 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
if (info->verification_tag1 != 0 || info->verification_tag2 != 0)
{
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = tmp_info.src.type;
store->len = tmp_info.src.len;
- addr = g_malloc(tmp_info.src.len);
+ addr = (guint8 *)g_malloc(tmp_info.src.len);
memcpy(addr,(tmp_info.src.data),tmp_info.src.len);
store->data = addr;
info = add_address(store, info, 1);
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = tmp_info.dst.type;
store->len = tmp_info.dst.len;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr,(tmp_info.dst.data),tmp_info.dst.len);
store->data = addr;
info = add_address(store, info, 2);
@@ -919,7 +919,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
else
{
- error = g_malloc(sizeof(sctp_error_info_t));
+ error = (sctp_error_info_t *)g_malloc(sizeof(sctp_error_info_t));
error->frame_number = pinfo->fd->num;
error->chunk_info[0] = '\0';
if ((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_INIT_CHUNK_ID)
@@ -941,26 +941,26 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID))
{
- tsn = g_malloc(sizeof(tsn_t));
- sack = g_malloc(sizeof(tsn_t));
+ tsn = (tsn_t *)g_malloc(sizeof(tsn_t));
+ sack = (tsn_t *)g_malloc(sizeof(tsn_t));
tsn->tsns = NULL;
tsn->first_tsn = 0;
sack->tsns = NULL;
sack->first_tsn = 0;
sack->src.type = tsn->src.type = tmp_info.src.type;
sack->src.len = tsn->src.len = tmp_info.src.len;
- addr = g_malloc(tmp_info.src.len);
+ addr = (guint8 *)g_malloc(tmp_info.src.len);
memcpy(addr, tmp_info.src.data, tmp_info.src.len);
tsn->src.data = addr;
- addr = g_malloc(tmp_info.src.len);
+ addr = (guint8 *)g_malloc(tmp_info.src.len);
memcpy(addr, tmp_info.src.data, tmp_info.src.len);
sack->src.data = addr;
sack->dst.type = tsn->dst.type = tmp_info.dst.type;
sack->dst.len = tsn->dst.len = tmp_info.dst.len;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, tmp_info.dst.data, tmp_info.dst.len);
tsn->dst.data = addr;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, tmp_info.dst.data, tmp_info.dst.len);
sack->dst.data = addr;
sack->secs=tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
@@ -989,10 +989,10 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
info->frame_numbers = g_list_prepend(info->frame_numbers,&(pinfo->fd->num));
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = tmp_info.src.type;
store->len = tmp_info.src.len;
- addr = g_malloc(tmp_info.src.len);
+ addr = (guint8 *)g_malloc(tmp_info.src.len);
memcpy(addr,(tmp_info.src.data),tmp_info.src.len);
store->data = addr;
@@ -1001,10 +1001,10 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
else if (info->direction == 2)
info = add_address(store, info, 2);
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = tmp_info.dst.type;
store->len = tmp_info.dst.len;
- addr = g_malloc(tmp_info.dst.len);
+ addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr,(tmp_info.dst.data),tmp_info.dst.len);
store->data = addr;
@@ -1055,7 +1055,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
type = tvb_get_ntohs(sctp_info->tvb[chunk_number],0);
if (type == IPV4ADDRESS_PARAMETER_ID)
{
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = AT_IPv4;
store->len = 4;
store->data = g_malloc(4);
@@ -1064,7 +1064,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
else if (type == IPV6ADDRESS_PARAMETER_ID)
{
- store = g_malloc(sizeof (address));
+ store = (address *)g_malloc(sizeof (address));
store->type = AT_IPv6;
store->len = 16;
store->data = g_malloc(16);
@@ -1090,10 +1090,10 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_SACK_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_NR_SACK_CHUNK_ID))
{
- sack = g_malloc(sizeof(tsn_t));
+ sack = (tsn_t *)g_malloc(sizeof(tsn_t));
sack->tsns = NULL;
sack->first_tsn = 0;
- tsn = g_malloc(sizeof(tsn_t));
+ tsn = (tsn_t *)g_malloc(sizeof(tsn_t));
tsn->tsns = NULL;
tsn->first_tsn = 0;
}
@@ -1115,14 +1115,14 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
tsnumber = tvb_get_ntohl((sctp_info->tvb)[chunk_number], DATA_CHUNK_TSN_OFFSET);
if (tsn->first_tsn == 0)
tsn->first_tsn = tsnumber;
- t_s_n = g_malloc(16);
+ t_s_n = (guint8 *)g_malloc(16);
tvb_memcpy(sctp_info->tvb[chunk_number], (guint8 *)(t_s_n),0, 16);
tsn->tsns = g_list_append(tsn->tsns, t_s_n);
datachunk = TRUE;
length=tvb_get_ntohs(sctp_info->tvb[chunk_number], CHUNK_LENGTH_OFFSET)-DATA_CHUNK_HEADER_LENGTH;
info->n_data_chunks++;
info->n_data_bytes+=length;
- tsn_s = g_malloc(sizeof(struct tsn_sort));
+ tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
@@ -1206,11 +1206,11 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
length = tvb_get_ntohs(sctp_info->tvb[chunk_number], CHUNK_LENGTH_OFFSET);
if (sack->first_tsn == 0)
sack->first_tsn = tsnumber;
- t_s_n = g_malloc(length);
+ t_s_n = (guint8 *)g_malloc(length);
tvb_memcpy(sctp_info->tvb[chunk_number], (guint8 *)(t_s_n),0, length);
sack->tsns = g_list_append(sack->tsns, t_s_n);
sackchunk = TRUE;
- tsn_s = g_malloc(sizeof(struct tsn_sort));
+ tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;