diff options
Diffstat (limited to 'plugins/mate')
-rw-r--r-- | plugins/mate/mate.h | 4 | ||||
-rw-r--r-- | plugins/mate/mate_grammar.lemon | 4 | ||||
-rw-r--r-- | plugins/mate/mate_parser.l | 2 | ||||
-rw-r--r-- | plugins/mate/mate_setup.c | 8 | ||||
-rw-r--r-- | plugins/mate/mate_util.c | 22 | ||||
-rw-r--r-- | plugins/mate/mate_util.h | 20 | ||||
-rw-r--r-- | plugins/mate/packet-mate.c | 8 |
7 files changed, 34 insertions, 34 deletions
diff --git a/plugins/mate/mate.h b/plugins/mate/mate.h index 61060dbdcb..7b12625aa0 100644 --- a/plugins/mate/mate.h +++ b/plugins/mate/mate.h @@ -372,7 +372,7 @@ extern mate_pdu* mate_get_pdus(guint32 framenum); extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree); /* from mate_setup.c */ -extern mate_config* mate_make_config(gchar* filename, int mate_hfid); +extern mate_config* mate_make_config(const gchar* filename, int mate_hfid); extern mate_config* mate_cfg(void); extern mate_cfg_pdu* new_pducfg(gchar* name); @@ -384,6 +384,6 @@ extern gchar* add_ranges(gchar* range, GPtrArray* range_ptr_arr); /* from mate_parser.l */ -extern gboolean mate_load_config(gchar* filename, mate_config* mc); +extern gboolean mate_load_config(const gchar* filename, mate_config* mc); #endif diff --git a/plugins/mate/mate_grammar.lemon b/plugins/mate/mate_grammar.lemon index 837a66e3e9..54dc221d7d 100644 --- a/plugins/mate/mate_grammar.lemon +++ b/plugins/mate/mate_grammar.lemon @@ -94,9 +94,9 @@ typedef struct _gog_statements { LoAL* current_gogkeys; } gog_statement_t; -static void configuration_error(mate_config* mc, gchar* fmt, ...) { +static void configuration_error(mate_config* mc, const gchar* fmt, ...) { static gchar error_buffer[256]; - gchar* incl; + const gchar* incl; gint i; mate_config_frame* current_frame; va_list list; diff --git a/plugins/mate/mate_parser.l b/plugins/mate/mate_parser.l index f8d3076403..1cd0730528 100644 --- a/plugins/mate/mate_parser.l +++ b/plugins/mate/mate_parser.l @@ -245,7 +245,7 @@ blk_cmnt_stop "*/" %% -extern gboolean mate_load_config(gchar* filename, mate_config* matecfg) { +extern gboolean mate_load_config(const gchar* filename, mate_config* matecfg) { gboolean state; mc = matecfg; diff --git a/plugins/mate/mate_setup.c b/plugins/mate/mate_setup.c index c54f18d7e5..07b7af8597 100644 --- a/plugins/mate/mate_setup.c +++ b/plugins/mate/mate_setup.c @@ -30,7 +30,7 @@ static mate_config* matecfg = NULL; /* appends the formatted string to the current error log */ -static void report_error(gchar* fmt, ...) { +static void report_error(const gchar* fmt, ...) { static gchar error_buffer[DEBUG_BUFFER_SIZE]; va_list list; @@ -679,8 +679,8 @@ static void print_hfid_hash(gpointer k, gpointer v, gpointer p _U_) { static void print_pdu_config(mate_cfg_pdu* cfg, GString* s) { guint i; int hfid; - gchar* discard; - gchar* stop; + const gchar* discard; + const gchar* stop; discard = cfg->discard ? "TRUE": "FALSE"; stop = cfg->last_extracted ? "TRUE" : "FALSE"; @@ -858,7 +858,7 @@ static void print_config(void) { g_string_free(config_text,TRUE); } -extern mate_config* mate_make_config(gchar* filename, int mate_hfid) { +extern mate_config* mate_make_config(const gchar* filename, int mate_hfid) { gint* ett; avp_init(); diff --git a/plugins/mate/mate_util.c b/plugins/mate/mate_util.c index 1020046ad4..8137f0cd56 100644 --- a/plugins/mate/mate_util.c +++ b/plugins/mate/mate_util.c @@ -130,7 +130,7 @@ extern SCS_collection* scs_init(void) { * * Return value: a pointer to the subscribed string. **/ -gchar* scs_subscribe(SCS_collection* c, gchar* s) { +gchar* scs_subscribe(SCS_collection* c, const gchar* s) { gchar* orig = NULL; guint* ip = NULL; size_t len = 0; @@ -346,7 +346,7 @@ extern void avp_init(void) { * Return value: a pointer to the newly created avp. * **/ -extern AVP* new_avp_from_finfo(gchar* name, field_info* finfo) { +extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo) { AVP* new = g_mem_chunk_alloc(avp_chunk); gchar* value; @@ -397,7 +397,7 @@ extern AVP* new_avp_from_finfo(gchar* name, field_info* finfo) { * Return value: a pointer to the newly created avp. * **/ -extern AVP* new_avp(gchar* name, gchar* value, gchar o) { +extern AVP* new_avp(const gchar* name, const gchar* value, gchar o) { AVP* new = g_mem_chunk_alloc(avp_chunk); new->n = scs_subscribe(avp_strings, name); @@ -468,7 +468,7 @@ extern void rename_avp(AVP* avp, gchar* name) { * Return value: a pointer to the newly created avpl. * **/ -extern AVPL* new_avpl(gchar* name) { +extern AVPL* new_avpl(const gchar* name) { AVPL* new_avpl = g_mem_chunk_alloc(avp_chunk); #ifdef _AVP_DEBUGGING @@ -913,7 +913,7 @@ extern void merge_avpl(AVPL* dst, AVPL* src, gboolean copy_avps) { * Return value: a pointer to the newly allocated string. * **/ -extern AVPL* new_avpl_from_avpl(gchar* name, AVPL* avpl, gboolean copy_avps) { +extern AVPL* new_avpl_from_avpl(const gchar* name, AVPL* avpl, gboolean copy_avps) { AVPL* newavpl = new_avpl(name); void* cookie = NULL; AVP* avp; @@ -1043,7 +1043,7 @@ extern AVP* match_avp(AVP* src, AVP* op) { * Return value: a pointer to the newly created avpl containing the * matching avps. **/ -extern AVPL* new_avpl_loose_match(gchar* name, +extern AVPL* new_avpl_loose_match(const gchar* name, AVPL* src, AVPL* op, gboolean copy_avps) { @@ -1121,7 +1121,7 @@ extern AVPL* new_avpl_loose_match(gchar* name, * Return value: a pointer to the newly created avpl containing the * matching avps. **/ -extern AVPL* new_avpl_every_match(gchar* name, AVPL* src, AVPL* op, gboolean copy_avps) { +extern AVPL* new_avpl_every_match(const gchar* name, AVPL* src, AVPL* op, gboolean copy_avps) { AVPL* newavpl; AVPN* co = NULL; AVPN* cs = NULL; @@ -1212,7 +1212,7 @@ extern AVPL* new_avpl_every_match(gchar* name, AVPL* src, AVPL* op, gboolean cop * Return value: a pointer to the newly created avpl containing the * matching avps. **/ -extern AVPL* new_avpl_exact_match(gchar* name,AVPL* src, AVPL* op, gboolean copy_avps) { +extern AVPL* new_avpl_exact_match(const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps) { AVPL* newavpl = new_avpl(name); AVPN* co = NULL; AVPN* cs = NULL; @@ -1283,7 +1283,7 @@ extern AVPL* new_avpl_exact_match(gchar* name,AVPL* src, AVPL* op, gboolean copy return NULL; } -extern AVPL* new_avpl_from_match(avpl_match_mode mode, gchar* name,AVPL* src, AVPL* op, gboolean copy_avps) { +extern AVPL* new_avpl_from_match(avpl_match_mode mode, const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps) { AVPL* avpl = NULL; switch (mode) { @@ -1435,7 +1435,7 @@ extern void avpl_transform(AVPL* src, AVPL_Transf* op) { * * Return value: a pointer to the newly created loal. **/ -extern LoAL* new_loal(gchar* name) { +extern LoAL* new_loal(const gchar* name) { LoAL* new_loal = g_mem_chunk_alloc(avp_chunk); if (! name) { @@ -1614,7 +1614,7 @@ extern void delete_loal(LoAL* loal, gboolean avpls_too, gboolean avps_too) { * load_loal_error: * Used by loal_from_file to handle errors while loading. **/ -LoAL* load_loal_error(FILE* fp, LoAL* loal, AVPL* curr, int linenum, gchar* fmt, ...) { +LoAL* load_loal_error(FILE* fp, LoAL* loal, AVPL* curr, int linenum, const gchar* fmt, ...) { va_list list; gchar* desc; LoAL* ret = NULL; diff --git a/plugins/mate/mate_util.h b/plugins/mate/mate_util.h index 27af4fdccb..01eb9fa9bb 100644 --- a/plugins/mate/mate_util.h +++ b/plugins/mate/mate_util.h @@ -56,7 +56,7 @@ typedef struct _scs_collection SCS_collection; extern void destroy_scs_collection(SCS_collection* c); extern SCS_collection* scs_init(void); -extern gchar* scs_subscribe(SCS_collection* collection, gchar* s); +extern gchar* scs_subscribe(SCS_collection* collection, const gchar* s); extern void scs_unsubscribe(SCS_collection* collection, gchar* s); extern gchar* scs_subscribe_printf(SCS_collection* collection, gchar* fmt, ...); @@ -157,13 +157,13 @@ extern void setup_avp_debug(FILE* fp, int* general, int* avp, int* avp_op, int* */ /* creates a new avp */ -extern AVP* new_avp(gchar* name, gchar* value, gchar op); +extern AVP* new_avp(const gchar* name, const gchar* value, gchar op); /* creates a copy od an avp */ extern AVP* avp_copy(AVP* from); /* creates an avp from a field_info record */ -extern AVP* new_avp_from_finfo(gchar* name, field_info* finfo); +extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo); /* * avp destructor @@ -185,26 +185,26 @@ extern AVP* match_avp(AVP* src, AVP* op); */ /* creates an empty avp list */ -extern AVPL* new_avpl(gchar* name); +extern AVPL* new_avpl(const gchar* name); /* creates a copy of an avp list */ -extern AVPL* new_avpl_from_avpl(gchar* name, AVPL* avpl, gboolean copy_avps); +extern AVPL* new_avpl_from_avpl(const gchar* name, AVPL* avpl, gboolean copy_avps); /* creates an avp list containing any avps in src matching any avps in op it will eventually create an empty list in none match */ -extern AVPL* new_avpl_loose_match(gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); +extern AVPL* new_avpl_loose_match(const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); /* creates an avp list containing any avps in src matching every avp in op it will not create a list if there is not a match for every attribute in op */ -extern AVPL* new_avpl_every_match(gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); +extern AVPL* new_avpl_every_match(const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); /* creates an avp list containing every avp in src matching every avp in op it will not create a list unless every avp in op is matched only once to avery avp in op */ -extern AVPL* new_avpl_exact_match(gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); +extern AVPL* new_avpl_exact_match(const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); /* uses mode to call one of the former matches. NO_MATCH = merge(merge(copy(src),op)) */ -extern AVPL* new_avpl_from_match(avpl_match_mode mode, gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); +extern AVPL* new_avpl_from_match(avpl_match_mode mode, const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps); @@ -262,7 +262,7 @@ extern void avpl_transform(AVPL* src, AVPL_Transf* op); */ /* creates an empty list of avp lists */ -extern LoAL* new_loal(gchar* name); +extern LoAL* new_loal(const gchar* name); /* given a file loads all the avpls contained in it every line is formatted as it is the output of avplist_to_string */ diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c index dbf749c0f2..abd941f8ab 100644 --- a/plugins/mate/packet-mate.c +++ b/plugins/mate/packet-mate.c @@ -37,8 +37,8 @@ static mate_config* mc = NULL; static int proto_mate = -1; -static gchar* pref_mate_config_filename = ""; -static gchar* current_mate_config_filename = NULL; +static const gchar* pref_mate_config_filename = ""; +static const gchar* current_mate_config_filename = NULL; static proto_item *mate_i = NULL; @@ -196,8 +196,8 @@ void mate_gop_tree(proto_tree* tree, tvbuff_t *tvb, mate_gop* gop) { float rel_time; float gop_time; float pdu_rel_time; - gchar* pdu_str; - gchar* type_str; + const gchar* pdu_str; + const gchar* type_str; guint32 pdu_item; gop_item = proto_tree_add_uint(tree,gop->cfg->hfid,tvb,0,0,gop->id); |