static gint
insert_sorted_by_table_name(gconstpointer aparam, gconstpointer bparam)
{
- const register_ct_t *a = (register_ct_t *)aparam;
- const register_ct_t *b = (register_ct_t *)bparam;
+ const register_ct_t *a = (const register_ct_t *)aparam;
+ const register_ct_t *b = (const register_ct_t *)bparam;
return g_ascii_strcasecmp(proto_get_protocol_short_name(find_protocol_by_id(a->proto_id)), proto_get_protocol_short_name(find_protocol_by_id(b->proto_id)));
}
const void *data)
{
dcerpc_fragment_key *key = g_slice_new(dcerpc_fragment_key);
- e_dce_dg_common_hdr_t *hdr = (e_dce_dg_common_hdr_t *)data;
+ const e_dce_dg_common_hdr_t *hdr = (const e_dce_dg_common_hdr_t *)data;
key->src = pinfo->src;
key->dst = pinfo->dst;
const void *data)
{
dcerpc_fragment_key *key = g_slice_new(dcerpc_fragment_key);
- e_dce_dg_common_hdr_t *hdr = (e_dce_dg_common_hdr_t *)data;
+ const e_dce_dg_common_hdr_t *hdr = (const e_dce_dg_common_hdr_t *)data;
copy_address(&key->src, &pinfo->src);
copy_address(&key->dst, &pinfo->dst);
guint i = 0;
srt_stat_table *dcerpc_srt_table;
srt_data_t *data = (srt_data_t *)pss;
- const dcerpc_info *ri = (dcerpc_info *)prv;
+ const dcerpc_info *ri = (const dcerpc_info *)prv;
dcerpcstat_tap_data_t* tap_data;
dcerpc_srt_table = g_array_index(data->srt_array, srt_stat_table*, i);
static int devicenet_addr_to_str(const address* addr, gchar *buf, int buf_len _U_)
{
- guint8 addrdata = *((guint8*)addr->data) & 0x3F;
+ guint8 addrdata = *((const guint8*)addr->data) & 0x3F;
gchar *start_buf = buf;
buf = uint_to_str_back(buf, addrdata);
static int dns_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
{
- struct DnsTap *pi = (struct DnsTap *)p;
+ const struct DnsTap *pi = (const struct DnsTap *)p;
tick_stat_node(st, st_str_packets, 0, FALSE);
stats_tree_tick_pivot(st, st_node_packet_qr,
val_to_str(pi->packet_qr, dns_qr_vals, "Unknown qr (%d)"));
static guint
epl_duplication_hash(gconstpointer k)
{
- duplication_key *key = (duplication_key*)k;
+ const duplication_key *key = (const duplication_key*)k;
guint hash;
hash = ((key->src)<<24) | ((key->dest)<<16)|
static gint
epl_duplication_equal(gconstpointer k1, gconstpointer k2)
{
- duplication_key *key1 = (duplication_key*)k1;
- duplication_key *key2 = (duplication_key*)k2;
+ const duplication_key *key1 = (const duplication_key*)k1;
+ const duplication_key *key2 = (const duplication_key*)k2;
gint hash;
hash = (key1->src == key2->src)&&(key1->dest == key2->dest)&&
static int hpfeeds_stats_tree_packet(stats_tree* st _U_, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* p)
{
- struct HpfeedsTap *pi = (struct HpfeedsTap *)p;
+ const struct HpfeedsTap *pi = (const struct HpfeedsTap *)p;
wmem_list_frame_t* head = wmem_list_head(channels_list);
wmem_list_frame_t* cur = head;
struct channel_node* ch_node;
{
col_add_fstr(pinfo->cinfo, COL_INFO,
"Who is \"%s.%s\"? Tell \"%s.%s\"@%02x:%02x:%02x:%02x:%02x:%02x",
- name[3] ? (char*)name[3] : "?", name[4] ? (char*)name[4] : "?",
- name[0] ? (char*)name[0] : "?", name[1] ? (char*)name[1] : "?",
+ name[3] ? (const char*)name[3] : "?", name[4] ? (const char*)name[4] : "?",
+ name[0] ? (const char*)name[0] : "?", name[1] ? (const char*)name[1] : "?",
*(p + 2), *(p + 3), *(p + 4),
*(p + 5), *(p + 6), *(p + 7));
}
{
col_add_fstr(pinfo->cinfo, COL_INFO,
"To \"%s.%s\", \"%s.%s\" is at %02x:%02x:%02x:%02x:%02x:%02x",
- name[3] ? (char*)name[3] : "?", name[4] ? (char*)name[4] : "?",
- name[0] ? (char*)name[0] : "?", name[1] ? (char*)name[1] : "?",
+ name[3] ? (const char*)name[3] : "?", name[4] ? (const char*)name[4] : "?",
+ name[0] ? (const char*)name[0] : "?", name[1] ? (const char*)name[1] : "?",
*(p + 2), *(p + 3), *(p + 4),
*(p + 5), *(p + 6), *(p + 7));
}
{
rtd_data_t* rtd_data = (rtd_data_t*)prs;
rtd_stat_table* rs = &rtd_data->stat_table;
- const radius_info_t *ri = (radius_info_t *)pri;
+ const radius_info_t *ri = (const radius_info_t *)pri;
nstime_t delta;
radius_category radius_cat = RADIUS_CAT_OTHERS;
int ret = 0;
}
}
static guint hash_by_guid(gconstpointer key) {
- endpoint_guid * guid = (endpoint_guid *) key;
+ const endpoint_guid * guid = (const endpoint_guid *) key;
return g_int_hash(&(guid->app_id));
}
static gboolean compare_by_guid(gconstpointer a, gconstpointer b) {
- endpoint_guid * guid_a = (endpoint_guid *) a;
- endpoint_guid * guid_b = (endpoint_guid *) b;
+ const endpoint_guid * guid_a = (const endpoint_guid *) a;
+ const endpoint_guid * guid_b = (const endpoint_guid *) b;
return memcmp(guid_a, guid_b, sizeof(endpoint_guid)) == 0;
}