[-Wmissing-prototypes]
Use explicit casts. svn path=/trunk/; revision=48319
This commit is contained in:
parent
94d102adb4
commit
54eb4a6cec
|
@ -84,6 +84,9 @@
|
|||
*/
|
||||
#define BER_MAX_NESTING 500
|
||||
|
||||
void proto_register_ber(void);
|
||||
void proto_reg_handoff_ber(void);
|
||||
|
||||
static gint proto_ber = -1;
|
||||
static gint hf_ber_id_class = -1;
|
||||
static gint hf_ber_id_pc = -1;
|
||||
|
@ -290,8 +293,8 @@ static const fragment_items octet_string_frag_items = {
|
|||
static void *
|
||||
oid_copy_cb(void *dest, const void *orig, size_t len _U_)
|
||||
{
|
||||
oid_user_t *u = dest;
|
||||
const oid_user_t *o = orig;
|
||||
oid_user_t *u = (oid_user_t *)dest;
|
||||
const oid_user_t *o = (const oid_user_t *)orig;
|
||||
|
||||
u->oid = g_strdup(o->oid);
|
||||
u->name = g_strdup(o->name);
|
||||
|
@ -303,7 +306,7 @@ oid_copy_cb(void *dest, const void *orig, size_t len _U_)
|
|||
static void
|
||||
oid_free_cb(void *r)
|
||||
{
|
||||
oid_user_t *u = r;
|
||||
oid_user_t *u = (oid_user_t *)r;
|
||||
|
||||
g_free(u->oid);
|
||||
g_free(u->name);
|
||||
|
@ -312,8 +315,8 @@ oid_free_cb(void *r)
|
|||
static int
|
||||
cmp_value_string(const void *v1, const void *v2)
|
||||
{
|
||||
value_string *vs1 = (value_string *)v1;
|
||||
value_string *vs2 = (value_string *)v2;
|
||||
const value_string *vs1 = (const value_string *)v1;
|
||||
const value_string *vs2 = (const value_string *)v2;
|
||||
|
||||
return strcmp(vs1->strptr, vs2->strptr);
|
||||
}
|
||||
|
@ -430,7 +433,7 @@ ber_decode_as(const gchar *syntax)
|
|||
static const gchar *
|
||||
get_ber_oid_syntax(const char *oid)
|
||||
{
|
||||
return g_hash_table_lookup(syntax_table, oid);
|
||||
return (const char *)g_hash_table_lookup(syntax_table, oid);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
#define CMD_GET_ID 0x30
|
||||
#define CMD_SCAN_JOB 0x32
|
||||
|
||||
void proto_register_bjnp(void);
|
||||
void proto_reg_handoff_bjnp(void);
|
||||
|
||||
static int proto_bjnp = -1;
|
||||
|
||||
static int hf_bjnp_id = -1;
|
||||
|
|
|
@ -103,7 +103,7 @@ dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
|||
|
||||
/* Needs bit-reversing. Create a new buffer, copy the message to it and bit-reverse */
|
||||
len = tvb_length(tvb);
|
||||
reversing_buffer = ep_tvb_memdup(tvb, offset, len);
|
||||
reversing_buffer = (guint8 *)ep_tvb_memdup(tvb, offset, len);
|
||||
p_rev = reversing_buffer;
|
||||
/* Entire message is bit reversed */
|
||||
for (i=0; i<len; i++, p_rev++)
|
||||
|
|
|
@ -125,6 +125,8 @@
|
|||
#include <epan/expert.h>
|
||||
#include <epan/uat.h>
|
||||
|
||||
void proto_register_bootp(void);
|
||||
void proto_reg_handoff_bootp(void);
|
||||
|
||||
static int bootp_dhcp_tap = -1;
|
||||
static int proto_bootp = -1;
|
||||
|
@ -4308,7 +4310,7 @@ static void get_opt125_tlv(tvbuff_t *tvb, guint off, guint8 *tlvtype, guint8 *tl
|
|||
/* Length */
|
||||
*tlvlen = tvb_get_guint8(tvb, off+1);
|
||||
/* Value */
|
||||
*value = ep_tvb_memdup(tvb, off + 2, *tlvlen);
|
||||
*value = (guint8 *)ep_tvb_memdup(tvb, off + 2, *tlvlen);
|
||||
}
|
||||
|
||||
static void get_opt60_tlv(tvbuff_t *tvb, guint off, guint8 *tlvtype, guint8 *tlvlen, guint8 **value)
|
||||
|
@ -4348,7 +4350,7 @@ dissect_docsis_cm_cap(proto_tree *v_tree, tvbuff_t *tvb, int voff, int len, gboo
|
|||
guint8 *val_other = NULL;
|
||||
guint off = voff;
|
||||
|
||||
asc_val = ep_alloc0(4);
|
||||
asc_val = (guint8*)ep_alloc0(4);
|
||||
|
||||
if (opt125)
|
||||
{
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
|
||||
#define BOOTPARAMS_PROGRAM 100026
|
||||
|
||||
void proto_register_bootparams(void);
|
||||
void proto_reg_handoff_bootparams(void);
|
||||
|
||||
static int proto_bootparams = -1;
|
||||
static int hf_bootparams_procedure_v1 = -1;
|
||||
static int hf_bootparams_host = -1;
|
||||
|
|
|
@ -100,6 +100,9 @@
|
|||
#define BPDU_FLAGS_PROPOSAL 0x02
|
||||
#define BPDU_FLAGS_TC 0x01
|
||||
|
||||
void proto_register_bpdu(void);
|
||||
void proto_reg_handoff_bpdu(void);
|
||||
|
||||
static int proto_bpdu = -1;
|
||||
static int hf_bpdu_proto_id = -1;
|
||||
static int hf_bpdu_version_id = -1;
|
||||
|
@ -289,7 +292,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (pinfo->dl_dst.type == AT_ETHER) {
|
||||
const guint8 *dstaddr;
|
||||
|
||||
dstaddr = pinfo->dl_dst.data;
|
||||
dstaddr = (const guint8 *)pinfo->dl_dst.data;
|
||||
if(dstaddr[0] == 0x01 && dstaddr[1] == 0x80 &&
|
||||
dstaddr[2] == 0xC2 && dstaddr[3] == 0x00 &&
|
||||
dstaddr[4] == 0x00 && ((dstaddr[5] == 0x0D) || ((dstaddr[5] & 0xF0) == 0x20))) {
|
||||
|
|
|
@ -74,6 +74,8 @@
|
|||
#define TCP_PORT_PKTCABLE_COPS 2126
|
||||
#define TCP_PORT_PKTCABLE_MM_COPS 3918
|
||||
|
||||
void proto_register_cops(void);
|
||||
|
||||
/* Preference: Variable to hold the tcp port preference */
|
||||
static guint global_cops_tcp_port = TCP_PORT_COPS;
|
||||
|
||||
|
@ -838,7 +840,7 @@ typedef struct _COPS_CNV COPS_CNV;
|
|||
|
||||
struct _COPS_CNV
|
||||
{
|
||||
guint class;
|
||||
guint ber_class;
|
||||
guint tag;
|
||||
gint syntax;
|
||||
const gchar *name;
|
||||
|
@ -869,7 +871,7 @@ static int cops_tag_cls2syntax ( guint tag, guint cls ) {
|
|||
cnv = CopsCnv;
|
||||
while (cnv->syntax != -1)
|
||||
{
|
||||
if (cnv->tag == tag && cnv->class == cls)
|
||||
if (cnv->tag == tag && cnv->ber_class == cls)
|
||||
{
|
||||
return *(cnv->hfidp);
|
||||
}
|
||||
|
@ -1354,7 +1356,7 @@ static guint redecode_oid(guint32* pprid_subids, guint pprid_subids_len, guint8*
|
|||
|
||||
for (i=0; i<encoded_len; i++) { if (! (encoded_subids[i] & 0x80 )) n++; }
|
||||
|
||||
*subids_p = subids = ep_alloc(sizeof(guint32)*(n+pprid_subids_len));
|
||||
*subids_p = subids = (guint32 *)ep_alloc(sizeof(guint32)*(n+pprid_subids_len));
|
||||
subid_overflow = subids+n+pprid_subids_len;
|
||||
for (i=0;i<pprid_subids_len;i++) subids[i] = pprid_subids[i];
|
||||
|
||||
|
@ -1409,7 +1411,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
|
|||
|
||||
encoid_len = tvb_length_remaining(oid_tvb,0);
|
||||
if (encoid_len > 0) {
|
||||
encoid = ep_tvb_memdup(oid_tvb,0,encoid_len);
|
||||
encoid = (guint8*)ep_tvb_memdup(oid_tvb,0,encoid_len);
|
||||
(*pprid_subids_len) = oid_encoded2subid(encoid, encoid_len, pprid_subids);
|
||||
}
|
||||
}
|
||||
|
@ -1437,7 +1439,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
|
|||
|
||||
/* TODO: check pc, class and tag */
|
||||
|
||||
encoid = ep_tvb_memdup(tvb,offset,encoid_len);
|
||||
encoid = (guint8*)ep_tvb_memdup(tvb,offset,encoid_len);
|
||||
|
||||
if (*pprid_subids) {
|
||||
/* Never tested this branch */
|
||||
|
@ -1485,7 +1487,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
|
|||
|
||||
if(*oid_info_p) {
|
||||
if ((*oid_info_p)->kind == OID_KIND_ROW) {
|
||||
oid_info = emem_tree_lookup32((*oid_info_p)->children,1);
|
||||
oid_info = (oid_info_t *)emem_tree_lookup32((emem_tree_t *)(*oid_info_p)->children,1);
|
||||
} else {
|
||||
oid_info = NULL;
|
||||
}
|
||||
|
@ -1518,7 +1520,7 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, packet_info *pinfo, guint3
|
|||
* -- a lazy lego
|
||||
*/
|
||||
hfid = oid_info->value_hfid;
|
||||
oid_info = emem_tree_lookup32((*oid_info_p)->children,oid_info->subid+1);
|
||||
oid_info = (oid_info_t *)emem_tree_lookup32((emem_tree_t *)(*oid_info_p)->children,oid_info->subid+1);
|
||||
} else
|
||||
hfid = cops_tag_cls2syntax( ber_tag, ber_class );
|
||||
switch (proto_registrar_get_ftype(hfid)) {
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
#include <glib.h>
|
||||
#include <epan/packet.h>
|
||||
|
||||
void proto_register_cosine(void);
|
||||
void proto_reg_handoff_cosine(void);
|
||||
|
||||
static int proto_cosine = -1;
|
||||
static int hf_pro = -1;
|
||||
static int hf_off = -1;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <epan/prefs.h>
|
||||
#include <epan/strutil.h>
|
||||
|
||||
void proto_register_cpfi(void);
|
||||
void proto_reg_handoff_cpfi(void);
|
||||
|
||||
#define CPFI_DEFAULT_UDP_PORT 5000
|
||||
|
@ -190,7 +191,7 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Make sure this is an Ethernet address. */
|
||||
DISSECTOR_ASSERT(pinfo->src.type == AT_ETHER);
|
||||
srcmac = pinfo->src.data;
|
||||
srcmac = (const guint8 *)pinfo->src.data;
|
||||
|
||||
src_instance = srcmac[2]-1;
|
||||
src_board = tda >> 4;
|
||||
|
@ -212,7 +213,7 @@ dissect_cpfi_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Make sure this is an Ethernet address. */
|
||||
DISSECTOR_ASSERT(pinfo->dst.type == AT_ETHER);
|
||||
dstmac = pinfo->dst.data;
|
||||
dstmac = (const guint8 *)pinfo->dst.data;
|
||||
|
||||
dst_instance = dstmac[2]-1;
|
||||
dst_board = tda >> 4;
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#include <epan/packet.h>
|
||||
#include <epan/ipproto.h>
|
||||
|
||||
void proto_register_chpa(void);
|
||||
void proto_reg_handoff_chpa(void);
|
||||
|
||||
static int proto_cphap = -1;
|
||||
|
||||
static int hf_magic_number = -1;
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
#define CSM_ENCAPS_TYPE_QUERY_RESPONSE 0x04
|
||||
#define CSM_ENCAPS_TYPE_INDICATION_RESPONSE 0x05
|
||||
|
||||
void proto_register_csm_encaps(void);
|
||||
void proto_reg_handoff_csm_encaps(void);
|
||||
|
||||
static const value_string opcode_vals[] = {
|
||||
{ OPCODE_NOOP, "No Operation" },
|
||||
|
|
|
@ -317,10 +317,10 @@
|
|||
static void add_vendor(const gchar* name, guint32 id, guint type_octets, guint length_octets, gboolean has_flags) {
|
||||
radius_vendor_info_t* v;
|
||||
|
||||
v = g_hash_table_lookup(dict->vendors_by_id, GUINT_TO_POINTER(id));
|
||||
v = (radius_vendor_info_t *)g_hash_table_lookup(dict->vendors_by_id, GUINT_TO_POINTER(id));
|
||||
|
||||
if (!v) {
|
||||
v = g_malloc(sizeof(radius_vendor_info_t));
|
||||
v = g_new(radius_vendor_info_t,1);
|
||||
v->attrs_by_id = g_hash_table_new(g_direct_hash,g_direct_equal);
|
||||
v->code = id;
|
||||
v->ett = -1;
|
||||
|
@ -357,7 +357,7 @@ static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_
|
|||
|
||||
if (vendor) {
|
||||
radius_vendor_info_t* v;
|
||||
v = g_hash_table_lookup(dict->vendors_by_name,vendor);
|
||||
v = (radius_vendor_info_t *)g_hash_table_lookup(dict->vendors_by_name,vendor);
|
||||
|
||||
if (! v) {
|
||||
g_string_append_printf(error, "Vendor: '%s', does not exist in %s:%i \n", vendor, fullpaths[include_stack_ptr], linenums[include_stack_ptr] );
|
||||
|
@ -372,10 +372,10 @@ static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_
|
|||
|
||||
code=strtol(codestr, NULL, 10);
|
||||
|
||||
a=g_hash_table_lookup(by_id, GUINT_TO_POINTER(code));
|
||||
a=(radius_attr_info_t*)g_hash_table_lookup(by_id, GUINT_TO_POINTER(code));
|
||||
|
||||
if (!a) {
|
||||
a = g_malloc(sizeof(radius_attr_info_t));
|
||||
a = g_new(radius_attr_info_t,1);
|
||||
a->name = NULL;
|
||||
a->dissector = NULL;
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ static void add_tlv(const gchar* name, const gchar* codestr, radius_attr_dissec
|
|||
radius_attr_info_t* s;
|
||||
guint32 code;
|
||||
|
||||
a = g_hash_table_lookup(dict->attrs_by_name, attr);
|
||||
a = (radius_attr_info_t*)g_hash_table_lookup(dict->attrs_by_name, attr);
|
||||
|
||||
if (! a) {
|
||||
g_string_append_printf(error, "Attr: '%s', does not exist in %s:%i \n", attr, fullpaths[include_stack_ptr], linenums[include_stack_ptr]);
|
||||
|
@ -434,10 +434,10 @@ static void add_tlv(const gchar* name, const gchar* codestr, radius_attr_dissec
|
|||
|
||||
code=strtol(codestr, NULL, 10);
|
||||
|
||||
s = g_hash_table_lookup(a->tlvs_by_id, GUINT_TO_POINTER(code));
|
||||
s = (radius_attr_info_t*)g_hash_table_lookup(a->tlvs_by_id, GUINT_TO_POINTER(code));
|
||||
|
||||
if (!s) {
|
||||
s = g_malloc(sizeof(radius_attr_info_t));
|
||||
s = g_new(radius_attr_info_t,1);
|
||||
s->name = NULL;
|
||||
s->dissector = NULL;
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ static void add_tlv(const gchar* name, const gchar* codestr, radius_attr_dissec
|
|||
|
||||
void add_value(const gchar* attrib_name, const gchar* repr, long value) {
|
||||
value_string v;
|
||||
GArray* a = g_hash_table_lookup(value_strings,attrib_name);
|
||||
GArray* a = (GArray*)g_hash_table_lookup(value_strings,attrib_name);
|
||||
|
||||
if (! a) {
|
||||
a = g_array_new(TRUE,TRUE,sizeof(value_string));
|
||||
|
@ -479,7 +479,7 @@ void add_value(const gchar* attrib_name, const gchar* repr, long value) {
|
|||
}
|
||||
|
||||
static void setup_tlvs(gpointer k _U_, gpointer v, gpointer p _U_) {
|
||||
radius_attr_info_t* s = v;
|
||||
radius_attr_info_t* s = (radius_attr_info_t*)v;
|
||||
gpointer key;
|
||||
|
||||
union {
|
||||
|
@ -496,7 +496,7 @@ static void setup_tlvs(gpointer k _U_, gpointer v, gpointer p _U_) {
|
|||
}
|
||||
|
||||
static void setup_attrs(gpointer k _U_, gpointer v, gpointer p _U_) {
|
||||
radius_attr_info_t* a = v;
|
||||
radius_attr_info_t* a = (radius_attr_info_t*)v;
|
||||
gpointer key;
|
||||
|
||||
union {
|
||||
|
@ -517,7 +517,7 @@ static void setup_attrs(gpointer k _U_, gpointer v, gpointer p _U_) {
|
|||
}
|
||||
|
||||
static void setup_vendors(gpointer k _U_, gpointer v, gpointer p) {
|
||||
radius_vendor_info_t* vnd = v;
|
||||
radius_vendor_info_t* vnd = (radius_vendor_info_t*)v;
|
||||
|
||||
g_hash_table_foreach(vnd->attrs_by_id,setup_attrs,p);
|
||||
}
|
||||
|
|
|
@ -313,6 +313,8 @@ _match_strval_ext_init(const guint32 val, const value_string_ext *a_vse)
|
|||
g_assert(vs_p[i].strptr != NULL);
|
||||
if ((type == VS_INDEX) && (vs_p[i].value != (i + first_value))) {
|
||||
type = VS_BIN_TREE;
|
||||
g_warning("Extended value string: %s; accessing binary (%u/%u)",
|
||||
vse->_vs_name, prev_value, vs_p[i].value);
|
||||
}
|
||||
/* XXX: Should check for dups ?? */
|
||||
if ((type == VS_BIN_TREE) &&
|
||||
|
|
Loading…
Reference in New Issue