Make all enum_val_t's const.

svn path=/trunk/; revision=46292
This commit is contained in:
Jeff Morriss 2012-11-29 20:15:37 +00:00
parent c33b0ad215
commit 0266cceef3
57 changed files with 217 additions and 218 deletions

View File

@ -5269,7 +5269,7 @@ void proto_register_ansi_map(void) {
#include "packet-ansi_map-ettarr.c"
};
static enum_val_t ansi_map_response_matching_type_values[] = {
static const enum_val_t ansi_map_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
{"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", 2},

View File

@ -77,7 +77,7 @@ static gboolean tcap_subdissector_used=FALSE;
static struct tcaphash_context_t * gp_tcap_context=NULL;
/* Note the high bit should be masked off when registering in this table (0x7fff)*/
static dissector_table_t ansi_tcap_national_opcode_table; /* National Operation Codes */
static dissector_table_t ansi_tcap_national_opcode_table; /* National Operation Codes */
#include "packet-ansi_tcap-ett.c"
@ -193,17 +193,17 @@ save_invoke_data(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U_){
/* Only do this once XXX I hope its the right thing to do */
/* The hash string needs to contain src and dest to distiguish differnt flows */
switch(ansi_tcap_response_matching_type){
case 0:
buf = ep_strdup(ansi_tcap_private.TransactionID_str);
break;
case 1:
buf = ep_strdup_printf("%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src));
break;
default:
buf = ep_strdup_printf("%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src),ep_address_to_str(dst));
break;
}
switch(ansi_tcap_response_matching_type){
case 0:
buf = ep_strdup(ansi_tcap_private.TransactionID_str);
break;
case 1:
buf = ep_strdup_printf("%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src));
break;
default:
buf = ep_strdup_printf("%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src),ep_address_to_str(dst));
break;
}
/* If the entry allready exists don't owervrite it */
ansi_tcap_saved_invokedata = (struct ansi_tcap_invokedata_t *)g_hash_table_lookup(TransactionId_table,buf);
@ -243,16 +243,16 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U
ansi_tcap_private.TransactionID_str, ep_address_to_str(dst),
ep_address_to_str(src));
switch(ansi_tcap_response_matching_type){
case 0:
g_snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str);
break;
case 1:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst));
break;
default:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst),ep_address_to_str(src));
break;
}
case 0:
g_snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str);
break;
case 1:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst));
break;
default:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst),ep_address_to_str(src));
break;
}
ansi_tcap_saved_invokedata = (struct ansi_tcap_invokedata_t *)g_hash_table_lookup(TransactionId_table, buf);
if(ansi_tcap_saved_invokedata){
@ -310,23 +310,23 @@ find_tcap_subdissector(tvbuff_t *tvb, asn1_ctx_t *actx, proto_tree *tree){
}
if(ansi_tcap_private.d.OperationCode == 0){
/* national */
guint8 family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
guint8 specifier = (guint8)(ansi_tcap_private.d.OperationCode_national & 0xff);
if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, tcap_top_tree)){
item = proto_tree_add_text(tree, tvb, 0, -1,
"Dissector for ANSI TCAP NATIONAL code:0x%x(Family %u, Specifier %u) \n"
"not implemented. Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_national, family, specifier);
PROTO_ITEM_SET_GENERATED(item);
return FALSE;
}
return TRUE;
guint8 family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
guint8 specifier = (guint8)(ansi_tcap_private.d.OperationCode_national & 0xff);
if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, tcap_top_tree)){
item = proto_tree_add_text(tree, tvb, 0, -1,
"Dissector for ANSI TCAP NATIONAL code:0x%x(Family %u, Specifier %u) \n"
"not implemented. Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_national, family, specifier);
PROTO_ITEM_SET_GENERATED(item);
return FALSE;
}
return TRUE;
}else if(ansi_tcap_private.d.OperationCode == 1){
/* private */
if((ansi_tcap_private.d.OperationCode_private & 0x0900) != 0x0900){
item = proto_tree_add_text(tree, tvb, 0, -1,
"Dissector for ANSI TCAP PRIVATE code:%u not implemented.\n"
"Contact Wireshark developers if you want this supported(Spec required)",
"Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_private);
PROTO_ITEM_SET_GENERATED(item);
return FALSE;
@ -466,18 +466,18 @@ proto_register_ansi_tcap(void)
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_ansi_tcap_bit_h,
{ &hf_ansi_tcap_bit_h,
{ "Require Reply", "ansi_tcap.req_rep",
FT_BOOLEAN, 16, NULL, 0x8000,
NULL, HFILL }
},
{ &hf_ansi_tcap_op_family,
{ &hf_ansi_tcap_op_family,
{ "Family",
"ansi_tcap.op_family",
FT_UINT16, BASE_DEC, VALS(ansi_tcap_national_op_code_family_vals), 0x7f00,
NULL, HFILL }
},
{ &hf_ansi_tcap_op_specifier,
{ &hf_ansi_tcap_op_specifier,
{ "Specifier",
"ansi_tcap.op_specifier",
FT_UINT16, BASE_DEC, NULL, 0x00ff,
@ -493,16 +493,16 @@ proto_register_ansi_tcap(void)
&ett_otid,
&ett_dtid,
&ett_ansi_tcap_stat,
&ett_ansi_tcap_op_code_nat,
&ett_ansi_tcap_op_code_nat,
#include "packet-ansi_tcap-ettarr.c"
};
static enum_val_t ansi_tcap_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
{"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", 2},
{NULL, NULL, -1}
};
static const enum_val_t ansi_tcap_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
{"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", 2},
{NULL, NULL, -1}
};
/* Register the protocol name and description */

View File

@ -173,7 +173,7 @@ static const true_false_string camel_extension_value = {
#define AMERICAN_DATE 2
#define CAMEL_DATE_AND_TIME_LEN 20 /* 2*5 + 4 + 5 + 1 (HH:MM:SS;mm/dd/yyyy) */
static enum_val_t date_options[] = {
static const enum_val_t date_options[] = {
{ "european", "DD/MM/YYYY", EUROPEAN_DATE },
{ "american", "MM/DD/YYYY", AMERICAN_DATE },
{ NULL, NULL, 0 }

View File

@ -140,7 +140,7 @@ static int hf_gsm_apn_str = -1;
static int hf_gsm_map_locationnumber_odd_even = -1;
static int hf_gsm_map_locationnumber_nai = -1;
static int hf_gsm_map_locationnumber_inn = -1;
static int hf_gsm_map_locationnumber_npi = -1;
static int hf_gsm_map_locationnumber_npi = -1;
static int hf_gsm_map_locationnumber_apri = -1;
static int hf_gsm_map_locationnumber_screening_ind = -1;
static int hf_gsm_map_locationnumber_digits = -1;
@ -2637,7 +2637,7 @@ void proto_register_gsm_map(void) {
#include "packet-gsm_map-ettarr.c"
};
static enum_val_t application_context_modes[] = {
static const enum_val_t application_context_modes[] = {
{"Use Application Context from the trace", "Use application context from the trace", APPLICATON_CONTEXT_FROM_TRACE},
{"Treat as AC 1", "Treat as AC 1", 1},
{"Treat as AC 2", "Treat as AC 2", 2},

View File

@ -728,7 +728,7 @@ proto_register_amr(void)
&ett_amr,
&ett_amr_toc,
};
static enum_val_t encoding_types[] = {
static const enum_val_t encoding_types[] = {
{"RFC 3267 Byte aligned", "RFC 3267 octet aligned", 0},
{"RFC 3267 Bandwidth-efficient", "RFC 3267 BW-efficient", 1},
{"AMR IF1", "AMR IF1", 2},
@ -736,7 +736,7 @@ proto_register_amr(void)
{NULL, NULL, -1}
};
static enum_val_t modes[] = {
static const enum_val_t modes[] = {
{"AMR-NB", "Narrowband AMR", AMR_NB},
{"AMR-WB", "Wideband AMR", AMR_WB},
{NULL, NULL, -1}

View File

@ -12062,7 +12062,7 @@ proto_register_ansi_a(void)
}
};
static enum_val_t a_variant_options[] = {
static const enum_val_t a_variant_options[] = {
{ "is-634-rev0", "IS-634 rev. 0", A_VARIANT_IS634 },
{ "tsb-80", "TSB-80", A_VARIANT_TSB80 },
{ "is-634-a", "IS-634-A", A_VARIANT_IS634A },

View File

@ -19568,7 +19568,7 @@ void proto_register_ansi_map(void) {
#line 5270 "../../asn1/ansi_map/packet-ansi_map-template.c"
};
static enum_val_t ansi_map_response_matching_type_values[] = {
static const enum_val_t ansi_map_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
{"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", 2},

View File

@ -141,7 +141,7 @@ static gboolean tcap_subdissector_used=FALSE;
static struct tcaphash_context_t * gp_tcap_context=NULL;
/* Note the high bit should be masked off when registering in this table (0x7fff)*/
static dissector_table_t ansi_tcap_national_opcode_table; /* National Operation Codes */
static dissector_table_t ansi_tcap_national_opcode_table; /* National Operation Codes */
/*--- Included file: packet-ansi_tcap-ett.c ---*/
@ -284,17 +284,17 @@ save_invoke_data(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U_){
/* Only do this once XXX I hope its the right thing to do */
/* The hash string needs to contain src and dest to distiguish differnt flows */
switch(ansi_tcap_response_matching_type){
case 0:
buf = ep_strdup(ansi_tcap_private.TransactionID_str);
break;
case 1:
buf = ep_strdup_printf("%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src));
break;
default:
buf = ep_strdup_printf("%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src),ep_address_to_str(dst));
break;
}
switch(ansi_tcap_response_matching_type){
case 0:
buf = ep_strdup(ansi_tcap_private.TransactionID_str);
break;
case 1:
buf = ep_strdup_printf("%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src));
break;
default:
buf = ep_strdup_printf("%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(src),ep_address_to_str(dst));
break;
}
/* If the entry allready exists don't owervrite it */
ansi_tcap_saved_invokedata = (struct ansi_tcap_invokedata_t *)g_hash_table_lookup(TransactionId_table,buf);
@ -334,16 +334,16 @@ find_saved_invokedata(packet_info *pinfo, proto_tree *tree _U_, tvbuff_t *tvb _U
ansi_tcap_private.TransactionID_str, ep_address_to_str(dst),
ep_address_to_str(src));
switch(ansi_tcap_response_matching_type){
case 0:
g_snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str);
break;
case 1:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst));
break;
default:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst),ep_address_to_str(src));
break;
}
case 0:
g_snprintf(buf,MAX_TID_STR_LEN,"%s",ansi_tcap_private.TransactionID_str);
break;
case 1:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst));
break;
default:
g_snprintf(buf,MAX_TID_STR_LEN,"%s%s%s",ansi_tcap_private.TransactionID_str,ep_address_to_str(dst),ep_address_to_str(src));
break;
}
ansi_tcap_saved_invokedata = (struct ansi_tcap_invokedata_t *)g_hash_table_lookup(TransactionId_table, buf);
if(ansi_tcap_saved_invokedata){
@ -401,23 +401,23 @@ find_tcap_subdissector(tvbuff_t *tvb, asn1_ctx_t *actx, proto_tree *tree){
}
if(ansi_tcap_private.d.OperationCode == 0){
/* national */
guint8 family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
guint8 specifier = (guint8)(ansi_tcap_private.d.OperationCode_national & 0xff);
if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, tcap_top_tree)){
item = proto_tree_add_text(tree, tvb, 0, -1,
"Dissector for ANSI TCAP NATIONAL code:0x%x(Family %u, Specifier %u) \n"
"not implemented. Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_national, family, specifier);
PROTO_ITEM_SET_GENERATED(item);
return FALSE;
}
return TRUE;
guint8 family = (ansi_tcap_private.d.OperationCode_national & 0x7f00)>>8;
guint8 specifier = (guint8)(ansi_tcap_private.d.OperationCode_national & 0xff);
if(!dissector_try_uint(ansi_tcap_national_opcode_table, ansi_tcap_private.d.OperationCode_national, tvb, actx->pinfo, tcap_top_tree)){
item = proto_tree_add_text(tree, tvb, 0, -1,
"Dissector for ANSI TCAP NATIONAL code:0x%x(Family %u, Specifier %u) \n"
"not implemented. Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_national, family, specifier);
PROTO_ITEM_SET_GENERATED(item);
return FALSE;
}
return TRUE;
}else if(ansi_tcap_private.d.OperationCode == 1){
/* private */
if((ansi_tcap_private.d.OperationCode_private & 0x0900) != 0x0900){
item = proto_tree_add_text(tree, tvb, 0, -1,
"Dissector for ANSI TCAP PRIVATE code:%u not implemented.\n"
"Contact Wireshark developers if you want this supported(Spec required)",
"Contact Wireshark developers if you want this supported(Spec required)",
ansi_tcap_private.d.OperationCode_private);
PROTO_ITEM_SET_GENERATED(item);
return FALSE;
@ -1512,18 +1512,18 @@ proto_register_ansi_tcap(void)
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_ansi_tcap_bit_h,
{ &hf_ansi_tcap_bit_h,
{ "Require Reply", "ansi_tcap.req_rep",
FT_BOOLEAN, 16, NULL, 0x8000,
NULL, HFILL }
},
{ &hf_ansi_tcap_op_family,
{ &hf_ansi_tcap_op_family,
{ "Family",
"ansi_tcap.op_family",
FT_UINT16, BASE_DEC, VALS(ansi_tcap_national_op_code_family_vals), 0x7f00,
NULL, HFILL }
},
{ &hf_ansi_tcap_op_specifier,
{ &hf_ansi_tcap_op_specifier,
{ "Specifier",
"ansi_tcap.op_specifier",
FT_UINT16, BASE_DEC, NULL, 0x00ff,
@ -1748,7 +1748,7 @@ proto_register_ansi_tcap(void)
&ett_otid,
&ett_dtid,
&ett_ansi_tcap_stat,
&ett_ansi_tcap_op_code_nat,
&ett_ansi_tcap_op_code_nat,
/*--- Included file: packet-ansi_tcap-ettarr.c ---*/
#line 1 "../../asn1/ansi_tcap/packet-ansi_tcap-ettarr.c"
@ -1779,12 +1779,12 @@ proto_register_ansi_tcap(void)
#line 498 "../../asn1/ansi_tcap/packet-ansi_tcap-template.c"
};
static enum_val_t ansi_tcap_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
{"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", 2},
{NULL, NULL, -1}
};
static const enum_val_t ansi_tcap_response_matching_type_values[] = {
{"Only Transaction ID will be used in Invoke/response matching", "Transaction ID only", 0},
{"Transaction ID and Source will be used in Invoke/response matching", "Transaction ID and Source", 1},
{"Transaction ID Source and Destination will be used in Invoke/response matching", "Transaction ID Source and Destination", 2},
{NULL, NULL, -1}
};
/* Register the protocol name and description */

View File

@ -1979,7 +1979,7 @@ proto_register_atm(void)
&ett_atm_lane_lc_tlv,
};
static enum_val_t unknown_aal2_options[] = {
static const enum_val_t unknown_aal2_options[] = {
{ "raw", "Raw data", TRAF_UNKNOWN },
{ "umts_fp", "UMTS FP", TRAF_UMTS_FP },
{ NULL, NULL, 0 }

View File

@ -1172,7 +1172,7 @@ decode_mdt_safi(proto_tree *tree, tvbuff_t *tvb, gint offset)
guint length; /* length in bits */
gint orig_offset = offset;
proto_item *item;
length = tvb_get_guint8(tvb, offset);
if (length != mdt_safi_nlri_length_bits)
return -1;
@ -1516,15 +1516,15 @@ decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6,
tvb_get_ntohs(tvb, offset + 1 + 10));
break;
case BGP_EXT_COM_RT_2:
ep_strbuf_printf(comm_strbuf, "%u:%u",
tvb_get_ntohl(tvb, 6),
ep_strbuf_printf(comm_strbuf, "%u:%u",
tvb_get_ntohl(tvb, 6),
tvb_get_ntohs(tvb, offset + 1 + 10));
break;
default:
ep_strbuf_printf(comm_strbuf, "Invalid RT type");
break;
}
ti = proto_tree_add_text(tree, tvb, offset + 1, length, "%s %u:%s/%u",
ti = proto_tree_add_text(tree, tvb, offset + 1, length, "%s %u:%s/%u",
tag, tvb_get_ntohl(tvb, offset + 1 + 0),
comm_strbuf->str,
plen);
@ -4407,7 +4407,7 @@ proto_register_bgp(void)
&ett_bgp_tunnel_subtlv_subtree,
};
module_t *bgp_module;
static enum_val_t asn_len[] = {
static const enum_val_t asn_len[] = {
{"auto-detect", "Auto-detect", 0},
{"2", "2 octet", 2},
{"4", "4 octet", 4},

View File

@ -743,7 +743,7 @@ static const true_false_string flag_set_broadcast = {
#define PACKETCABLE_CCC_DRAFT5 2
#define PACKETCABLE_CCC_RFC_3495 3
static enum_val_t pkt_ccc_protocol_versions[] = {
static const enum_val_t pkt_ccc_protocol_versions[] = {
{ "ccc_i05", "PKT-SP-PROV-I05-021127", PACKETCABLE_CCC_I05 },
{ "ccc_draft_5", "IETF Draft 5", PACKETCABLE_CCC_DRAFT5 },
{ "rfc_3495", "RFC 3495", PACKETCABLE_CCC_RFC_3495 },

View File

@ -2546,13 +2546,13 @@ proto_register_bssap(void)
&ett_bssap_plmn,
};
static enum_val_t gsm_or_lb_interface_options[] = {
static const enum_val_t gsm_or_lb_interface_options[] = {
{ "gsm a", "GSM A", GSM_INTERFACE },
{ "lb", "Lb", LB_INTERFACE },
{ NULL, NULL, 0 }
};
static enum_val_t bssap_or_bsap_options[] = {
static const enum_val_t bssap_or_bsap_options[] = {
{ "bssap", "BSSAP", BSSAP },
{ "bsap", "BSAP", BSAP },
{ NULL, NULL, 0 }

View File

@ -162,7 +162,7 @@ static const value_string status_change_vals[] = {
{ 0, NULL }
};
static enum_val_t pref_top_dissect[] = {
static const enum_val_t pref_top_dissect[] = {
{ "off", "off", TOP_DISSECT_OFF },
{ "internal", "Put higher dissectors under this one", TOP_DISSECT_INTERNAL },
{ "top", "On top", TOP_DISSECT_TOP },

View File

@ -869,7 +869,7 @@ static const true_false_string camel_extension_value = {
#define AMERICAN_DATE 2
#define CAMEL_DATE_AND_TIME_LEN 20 /* 2*5 + 4 + 5 + 1 (HH:MM:SS;mm/dd/yyyy) */
static enum_val_t date_options[] = {
static const enum_val_t date_options[] = {
{ "european", "DD/MM/YYYY", EUROPEAN_DATE },
{ "american", "MM/DD/YYYY", AMERICAN_DATE },
{ NULL, NULL, 0 }

View File

@ -92,7 +92,7 @@ static gint ett_ccsds_checkword = -1;
/* Generic data handle */
static dissector_handle_t data_handle;
static enum_val_t dissect_checkword[] = {
static const enum_val_t dissect_checkword[] = {
{ "hdr", "Use header flag", 2 },
{ "no", "Override header flag to be false", 0 },
{ "yes", "Override header flag to be true", 1 },

View File

@ -5729,9 +5729,9 @@ cigi3_3_add_short_symbol_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
} else {
if (select1 >= 5 && select1 <= 11) {
proto_tree_add_item(tree, hf_cigi3_3_short_symbol_control_attribute_value1f, tvb, offset, 4, cigi_byte_order);
} else {
} else {
proto_tree_add_item(tree, hf_cigi3_3_short_symbol_control_attribute_value1, tvb, offset, 4, cigi_byte_order);
}
}
offset += 4;
}
@ -5765,9 +5765,9 @@ cigi3_3_add_short_symbol_control(tvbuff_t *tvb, proto_tree *tree, gint offset)
} else {
if (select2 >= 5 && select2 <= 11) {
proto_tree_add_item(tree, hf_cigi3_3_short_symbol_control_attribute_value2f, tvb, offset, 4, cigi_byte_order);
} else {
} else {
proto_tree_add_item(tree, hf_cigi3_3_short_symbol_control_attribute_value2, tvb, offset, 4, cigi_byte_order);
}
}
offset += 4;
}
@ -11909,14 +11909,14 @@ proto_register_cigi(void)
};
/* CIGI preferences */
static enum_val_t cigi_versions[] = {
static const enum_val_t cigi_versions[] = {
{ "from_packet", "From Packet", CIGI_VERSION_FROM_PACKET },
{ "cigi2", "CIGI 2", CIGI_VERSION_2 },
{ "cigi3", "CIGI 3", CIGI_VERSION_3 },
{ NULL, NULL, 0 }
};
static enum_val_t cigi_byte_orders[] = {
static const enum_val_t cigi_byte_orders[] = {
{ "from_packet", "From Packet", CIGI_BYTE_ORDER_FROM_PACKET },
{ "big_endian", "Big-Endian", CIGI_BYTE_ORDER_BIG_ENDIAN },
{ "little_endian", "Little-Endian", CIGI_BYTE_ORDER_LITTLE_ENDIAN },

View File

@ -778,7 +778,7 @@ static value_string nat_pol_id[MAX_NATIONAL_VALUES+1];
* for description we use the Country Name and
* for value we use the DMP value for National Policy Identifier.
*/
static enum_val_t dmp_national_values[MAX_NATIONAL_VALUES+1] = {
static const enum_val_t dmp_national_values[MAX_NATIONAL_VALUES+1] = {
{ "???", "None", 0x00 },
{ "alb", "Albania", 0x1B },
{ "arm", "Armenia", 0x20 },
@ -967,7 +967,7 @@ static const value_string ack_msg_type [] = {
{ ACK, " (ack)" },
{ 0, NULL } };
static enum_val_t struct_id_options[] = {
static const enum_val_t struct_id_options[] = {
{ "none", "None", STRUCT_ID_NONE },
{ "1byte", "1 Byte value", STRUCT_ID_UINT8 },
{ "2byte", "2 Byte value", STRUCT_ID_UINT16 },
@ -978,7 +978,7 @@ static enum_val_t struct_id_options[] = {
{ NULL, NULL, 0 }
};
static enum_val_t national_decoding[] = {
static const enum_val_t national_decoding[] = {
{ "none", "None (raw data)", NAT_DECODE_NONE },
{ "dmp", "As for regular", NAT_DECODE_DMP },
{ "thales", "Thales XOmail", NAT_DECODE_THALES },

View File

@ -139,20 +139,20 @@ proto_register_dmx_chan(void)
module_t *dmx_chan_module;
static enum_val_t disp_chan_val_types[] = {
static const enum_val_t disp_chan_val_types[] = {
{ "pro", "Percent", 0 },
{ "hex", "Hexadecimal", 1 },
{ "dec", "Decimal", 2 },
{ NULL, NULL, 0 }
};
static enum_val_t disp_chan_nr_types[] = {
static const enum_val_t disp_chan_nr_types[] = {
{ "hex", "Hexadecimal", 0 },
{ "dec", "Decimal", 1 },
{ NULL, NULL, 0 }
};
static enum_val_t col_count[] = {
static const enum_val_t col_count[] = {
{ "6", "6", 6 },
{ "10", "10", 10 },
{ "12", "12", 12 },

View File

@ -329,12 +329,11 @@ static int hf_dlr_soreserved = -1;
static gint ett_dlr = -1;
static enum_val_t enip_io_dissector_types[] = {
static const enum_val_t enip_io_dissector_types[] = {
{ "Off", "Regular Ethernet/IP I/O data", ENIP_IO_OFF},
{ "CIP Safety", "CIP Safety", ENIP_IO_SAFETY },
{ "CIP Motion", "CIP Motion", ENIP_IO_MOTION },
{ NULL, NULL, 0 }
{ NULL, NULL, 0 }
};
/* decode I/O traffic as this type if ForwardOpen isn't captured */
@ -1984,7 +1983,7 @@ dissect_enip_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item( header_tree, hf_enip_length, tvb, 2, 2, ENC_LITTLE_ENDIAN );
proto_tree_add_item( header_tree, hf_enip_session, tvb, 4, 4, ENC_LITTLE_ENDIAN );
proto_tree_add_item( header_tree, hf_enip_status, tvb, 8, 4, ENC_LITTLE_ENDIAN );
if ((encap_cmd == LIST_IDENTITY) &&
if ((encap_cmd == LIST_IDENTITY) &&
/* Length of 0 probably indicates a request */
((encap_data_length == 0) || (packet_type == ENIP_REQUEST_PACKET)))
{
@ -2178,7 +2177,7 @@ dissect_dlr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
proto_tree_add_item( dlr_tree, hf_dlr_sequenceid, tvb, DLR_MPF_SEQUENCE_ID, 4, ENC_BIG_ENDIAN );
/* Add frame type to col info */
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
val_to_str(dlr_frametype, dlr_frame_type_vals, "Unknown (0x%04x)") );
if( dlr_frametype == DLR_FT_BEACON )
@ -3068,7 +3067,7 @@ proto_register_enip(void)
FT_BOOLEAN, 32, TFS(&tfs_true_false), 0x00000020,
NULL, HFILL }},
{ &hf_dlr_capflags_reserved2,
{ &hf_dlr_capflags_reserved2,
{ "Reserved", "cip.dlr.capflags.reserved2",
FT_BOOLEAN, 32, NULL, 0xFFFFFFC0,
NULL, HFILL }}

View File

@ -478,20 +478,20 @@ proto_register_enttec(void)
module_t *enttec_module;
static enum_val_t disp_chan_val_types[] = {
static const enum_val_t disp_chan_val_types[] = {
{ "pro", "Percent", 0 },
{ "hex", "Hexadecimal", 1 },
{ "dec", "Decimal", 2 },
{ NULL, NULL, 0 }
};
static enum_val_t disp_chan_nr_types[] = {
static const enum_val_t disp_chan_nr_types[] = {
{ "hex", "Hexadecimal", 0 },
{ "dec", "Decimal", 1 },
{ NULL, NULL, 0 }
};
static enum_val_t col_count[] = {
static const enum_val_t col_count[] = {
{ "6", "6", 6 },
{ "10", "10", 10 },
{ "12", "12", 12 },

View File

@ -1872,7 +1872,7 @@ proto_register_erf(void)
&ett_erf_eth
};
static enum_val_t erf_hdlc_options[] = {
static const enum_val_t erf_hdlc_options[] = {
{ "chdlc", "Cisco HDLC", ERF_HDLC_CHDLC },
{ "ppp", "PPP serial", ERF_HDLC_PPP },
{ "frelay", "Frame Relay", ERF_HDLC_FRELAY },
@ -1881,7 +1881,7 @@ proto_register_erf(void)
{ NULL, NULL, 0 }
};
static enum_val_t erf_aal5_options[] = {
static const enum_val_t erf_aal5_options[] = {
{ "guess", "Attempt to guess", ERF_AAL5_GUESS },
{ "llc", "LLC multiplexed", ERF_AAL5_LLC },
{ "unspec", "Unspecified", ERF_AAL5_UNSPEC },

View File

@ -129,7 +129,7 @@ static guint gPREF_QP[2] = {0};
static address manual_addr[2];
static void *manual_addr_data[2];
static enum_val_t pref_address_types[] = {
static const enum_val_t pref_address_types[] = {
{"lid", "LID", 0},
{"gid", "GID", 1},
{NULL, NULL, -1}

View File

@ -108,7 +108,7 @@ static const value_string flip_etype[] = {
#define FLIP_PAYLOAD_DECODING_MODE_HEURISTIC (1)
#define FLIP_PAYLOAD_DECODING_MODE_FORCED (2)
static enum_val_t flip_payload_decoding_modes[] = {
static const enum_val_t flip_payload_decoding_modes[] = {
{"none", "no decoding", FLIP_PAYLOAD_DECODING_MODE_NONE},
{"heuristic", "heuristic", FLIP_PAYLOAD_DECODING_MODE_HEURISTIC},
{"forced", "forced", FLIP_PAYLOAD_DECODING_MODE_FORCED},

View File

@ -958,7 +958,7 @@ proto_register_fr(void)
&ett_fr_address,
&ett_fr_control,
};
static enum_val_t fr_encap_options[] = {
static const enum_val_t fr_encap_options[] = {
{ "frf-3.2", "FRF 3.2/Cisco HDLC", FRF_3_2 },
{ "gprs-ns", "GPRS Network Service", GPRS_NS },
{ "ethernet", "Raw Ethernet", RAW_ETHER },

View File

@ -148,7 +148,7 @@ static int hf_gsm_apn_str = -1;
static int hf_gsm_map_locationnumber_odd_even = -1;
static int hf_gsm_map_locationnumber_nai = -1;
static int hf_gsm_map_locationnumber_inn = -1;
static int hf_gsm_map_locationnumber_npi = -1;
static int hf_gsm_map_locationnumber_npi = -1;
static int hf_gsm_map_locationnumber_apri = -1;
static int hf_gsm_map_locationnumber_screening_ind = -1;
static int hf_gsm_map_locationnumber_digits = -1;
@ -26634,7 +26634,7 @@ void proto_register_gsm_map(void) {
#line 2638 "../../asn1/gsm_map/packet-gsm_map-template.c"
};
static enum_val_t application_context_modes[] = {
static const enum_val_t application_context_modes[] = {
{"Use Application Context from the trace", "Use application context from the trace", APPLICATON_CONTEXT_FROM_TRACE},
{"Treat as AC 1", "Treat as AC 1", 1},
{"Treat as AC 2", "Treat as AC 2", 2},

View File

@ -3872,7 +3872,7 @@ static const fragment_items frag_items = {
"fragments"
};
static enum_val_t wlan_ignore_wep_options[] = {
static const enum_val_t wlan_ignore_wep_options[] = {
{ "no", "No", WLAN_IGNORE_WEP_NO },
{ "without_iv", "Yes - without IV", WLAN_IGNORE_WEP_WO_IV },
{ "with_iv", "Yes - with IV", WLAN_IGNORE_WEP_W_IV },
@ -7839,10 +7839,10 @@ dissect_vht_capability_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
/* B16 - B18 */
proto_tree_add_item(cap_tree, hf_ieee80211_vht_sounding_dimensions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
/* B19 */
/* B19 */
proto_tree_add_item(cap_tree, hf_ieee80211_vht_mu_beamformer_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
/* B20 - B22 2x 1 bit fields */
/* B20 - B22 2x 1 bit fields */
proto_tree_add_item(cap_tree, hf_ieee80211_vht_mu_beamformee_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cap_tree, hf_ieee80211_vht_txop_ps, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cap_tree, hf_ieee80211_vht_var_htc_field, tvb, offset, 4, ENC_LITTLE_ENDIAN);
@ -8493,7 +8493,7 @@ dissect_ht_capability_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
proto_tree_add_item(cap_tree, hf_ieee80211_ht_psmp, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cap_tree, hf_ieee80211_ht_40_mhz_intolerant, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cap_tree, hf_ieee80211_ht_l_sig, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
offset += 2;
/* 1 byte A-MPDU Parameters */
if(vs)

View File

@ -344,7 +344,7 @@ static const true_false_string ieee802154_gts_direction_tfs = {
/* The 802.15.4-2003 security suites for the security preferences (only AES-CCM suites are supported). */
/* NOTE: The equivalent 2006 security level identifer enumerations are used to simplify 2003 & 2006 integration! */
static enum_val_t ieee802154_2003_sec_suite_enums[] = {
static const enum_val_t ieee802154_2003_sec_suite_enums[] = {
{ "AES-CCM-128", "AES-128 Encryption, 128-bit Integrity Protection", SECURITY_LEVEL_ENC_MIC_128 },
{ "AES-CCM-64", "AES-128 Encryption, 64-bit Integrity Protection", SECURITY_LEVEL_ENC_MIC_64 },
{ "AES-CCM-32", "AES-128 Encryption, 32-bit Integrity Protection", SECURITY_LEVEL_ENC_MIC_32 },

View File

@ -117,7 +117,7 @@ static guint gPREF_QP[2] = {0};
address manual_addr[2];
void *manual_addr_data[2];
static enum_val_t pref_address_types[] = {
static const enum_val_t pref_address_types[] = {
{"lid", "LID", 0},
{"gid", "GID", 1},
{NULL, NULL, -1}

View File

@ -57,7 +57,7 @@
#define ISCSI_PROTOCOL_DRAFT12 4
#define ISCSI_PROTOCOL_DRAFT13 5
static enum_val_t iscsi_protocol_versions[] = {
static const enum_val_t iscsi_protocol_versions[] = {
{ "draft-08", "Draft 08", ISCSI_PROTOCOL_DRAFT08 },
{ "draft-09", "Draft 09", ISCSI_PROTOCOL_DRAFT09 },
{ "draft-11", "Draft 11", ISCSI_PROTOCOL_DRAFT11 },

View File

@ -40,7 +40,7 @@ static gint ett_isdn = -1;
#define DCHANNEL_LAPD 0 /* LAPD */
#define DCHANNEL_DPNSS 1 /* DPNSS link layer */
static enum_val_t dchannel_protocol_options[] = {
static const enum_val_t dchannel_protocol_options[] = {
{ "lapd", "LAPD", DCHANNEL_LAPD },
{ "DPNSS", "DPNSS", DCHANNEL_DPNSS },
{ NULL, NULL, 0 }

View File

@ -841,13 +841,13 @@ void proto_register_ismacryp (void)
&ett_ismacryp_message
};
static enum_val_t version_types[] = {
static const enum_val_t version_types[] = {
{PROTO_TAG_ISMACRYP_11, "ISMACryp v1.1", V11},
{PROTO_TAG_ISMACRYP_20, "ISMACryp v2.0", V20},
{NULL, NULL, -1}
};
static enum_val_t mode_types[] = {
static const enum_val_t mode_types[] = {
{"aac-hbr", "aac-hbr", AAC_HBR_MODE},
{"mpeg4-video", "mpeg4-video", MPEG4_VIDEO_MODE},
{"avc-video", "avc-video", AVC_VIDEO_MODE},

View File

@ -41,7 +41,7 @@
* French ISUP Specification: SPIROU 1998 - 002-005 edition 1 ( Info found here http://www.icg-corp.com/docs/ISUP.pdf ).
* Israeli ISUP Specification: excertp (for BCM messsage) found in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4231 .
* Russian national ISUP-R 2000: RD 45.217-2001 book 4
* Japan ISUP http://www.ttc.or.jp/jp/document_list/sum/sum_JT-Q763v21.1.pdf
* Japan ISUP http://www.ttc.or.jp/jp/document_list/sum/sum_JT-Q763v21.1.pdf
*/
#include "config.h"
@ -6348,7 +6348,7 @@ static const value_string isup_jpn_redirect_capabilit_vals[] = {
static void
dissect_isup_redirect_capability_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item, guint8 itu_isup_variant)
{
{
guint length = tvb_length(parameter_tvb);
switch(itu_isup_variant) {
@ -6891,7 +6891,7 @@ Information Type Tag
00000100 Invoking redirect reason
00000101
to Spare
11111111
11111111
Note: In standard this value is marked as -Not used-,
here is treated as reserved.
@ -6902,7 +6902,7 @@ Performing redirect indicator
+-----+-----+-----+-----+-----+-----+-----+-----+
- ext - Performing redirect reason - 1
+-----+-----------------------------------------+
- -Redirect possible-
- -Redirect possible-
- Spare - indicator at - 2
- - performing -
- - exchange -
@ -6912,7 +6912,7 @@ Performing redirect indicator
+-----------------------------------------------+
- ext - Performing redirect reason - 2n|1
+-----+-----------------------|-----------------+ Reason n
- -Redirect possible-
- -Redirect possible-
- Spare - indicator at - 2n
- - performing -
- - exchange -
@ -6956,7 +6956,7 @@ to Spare
0111111
1000000
to Reserved for national use
1111101
1111101
1111110 Local number portability / Mobile number
portability
1111111 Reserved for national use
@ -11266,7 +11266,7 @@ proto_register_isup(void)
{"Redirect possible indicator at performing exchange", "isup.rfi.redir_pos_ind",
FT_UINT8, BASE_DEC, VALS(redir_pos_ind_vals), 0x07,
NULL, HFILL }},
/* Value string values the same as perf_redir_reason_vals */
/* Value string values the same as perf_redir_reason_vals */
{ &hf_japan_isup_inv_redir_reason,
{"Invoking redirect reason", "isup.rfi.inv_redir_reason",
FT_UINT8, BASE_DEC, VALS(perf_redir_reason_vals), 0x7f,
@ -11434,7 +11434,7 @@ proto_register_isup(void)
&ett_isup_apm_msg_fragments,
};
static enum_val_t isup_variants[] = {
static const enum_val_t isup_variants[] = {
{"ITU Standard", "ITU Standard", ISUP_ITU_STANDARD_VARIANT},
{"French National Standard", "French National Standard", ISUP_FRENCH_VARIANT},
{"Israeli National Standard", "Israeli National Standard", ISUP_ISRAELI_VARIANT},

View File

@ -142,7 +142,7 @@ static gint ett_l2tp_avp_sub = -1;
static gint ett_l2tp_lcp = -1;
static gint ett_l2tp_l2_spec = -1;
static enum_val_t l2tpv3_cookies[] = {
static const enum_val_t l2tpv3_cookies[] = {
{"detect", "Detect", -1},
{"cookie0", "None", 0},
{"cookie4", "4 Byte Cookie", 4},
@ -150,7 +150,7 @@ static enum_val_t l2tpv3_cookies[] = {
{NULL, NULL, 0}
};
#define L2TPv3_COOKIE_DEFAULT 0
#define L2TPv3_COOKIE_DEFAULT 0
#define L2TPv3_PROTOCOL_ETH 0
#define L2TPv3_PROTOCOL_CHDLC 1
@ -166,7 +166,7 @@ static enum_val_t l2tpv3_cookies[] = {
#define L2TPv3_PROTOCOL_DEFAULT L2TPv3_PROTOCOL_CHDLC
static enum_val_t l2tpv3_protocols[] = {
static const enum_val_t l2tpv3_protocols[] = {
{"detect", "Detect", -1},
{"eth", "Ethernet", L2TPv3_PROTOCOL_ETH},
{"chdlc", "Cisco HDLC", L2TPv3_PROTOCOL_CHDLC},
@ -188,7 +188,7 @@ static enum_val_t l2tpv3_protocols[] = {
#define L2TPv3_L2_SPECIFIC_DOCSIS_DMPT 4
#define L2TPv3_L2_SPECIFIC_MAX (L2TPv3_L2_SPECIFIC_DOCSIS_DMPT + 1)
static enum_val_t l2tpv3_l2_specifics[] = {
static const enum_val_t l2tpv3_l2_specifics[] = {
{"detect", "Detect", -1},
{"none", "None", L2TPv3_L2_SPECIFIC_NONE},
{"default", "Default L2-Specific", L2TPv3_L2_SPECIFIC_DEFAULT},
@ -895,7 +895,7 @@ static l2tpv3_session_t *find_session(l2tpv3_tunnel_t *tunnel,
(session->lcce2.id == lcce2_id)) {
return session;
}
iterator = g_slist_next(iterator);
}
@ -1015,18 +1015,18 @@ static l2tpv3_session_t *store_pw_type(l2tpv3_session_t *_session,
l2tpv3_session_t *session = _session;
gint result = l2tpv3_protocol;
guint16 pw_type;
switch (msg_type) {
case MESSAGE_TYPE_ICRQ:
case MESSAGE_TYPE_OCRQ:
break;
default:
return session;
}
}
if (session == NULL)
session = alloc_session();
pw_type = tvb_get_ntohs(tvb, offset);
switch (pw_type) {
case 0x0007:
@ -1042,9 +1042,9 @@ static l2tpv3_session_t *store_pw_type(l2tpv3_session_t *_session,
default:
break;
}
session->pw_type = result;
return session;
}
@ -1056,7 +1056,7 @@ static l2tpv3_session_t *store_l2_sublayer(l2tpv3_session_t *_session,
l2tpv3_session_t *session = _session;
gint result = l2tpv3_l2_specific;
guint16 l2_sublayer;
switch (msg_type) {
case MESSAGE_TYPE_ICRQ:
case MESSAGE_TYPE_OCRQ:
@ -1067,11 +1067,11 @@ static l2tpv3_session_t *store_l2_sublayer(l2tpv3_session_t *_session,
break;
default:
return session;
}
}
if (session == NULL)
session = alloc_session();
l2_sublayer = tvb_get_ntohs(tvb, offset);
switch (l2_sublayer) {
case 0x0000:
@ -1096,8 +1096,8 @@ static l2tpv3_session_t *store_l2_sublayer(l2tpv3_session_t *_session,
case MESSAGE_TYPE_OCRP:
session->lcce2.l2_specific = result;
break;
}
}
return session;
}
@ -1338,7 +1338,7 @@ static void process_control_avps(tvbuff_t *tvb,
idx += avp_len;
continue;
} else {
} else {
/* Vendor-Specific AVP */
tf = proto_tree_add_text(l2tp_tree, tvb, idx,
avp_len, "Vendor %s AVP Type %u",

View File

@ -583,7 +583,7 @@ proto_register_m2pa(void)
&ett_m2pa_li
};
static enum_val_t m2pa_version_options[] = {
static const enum_val_t m2pa_version_options[] = {
{ "draft-2", "Internet Draft version 2", M2PA_V02 },
{ "draft-8", "Internet Draft version 8", M2PA_V08 },
{ "RFC4165", "RFC 4165", M2PA_RFC4165 },

View File

@ -1118,7 +1118,7 @@ proto_register_m2ua(void)
&ett_m2ua_parameter,
};
static enum_val_t protocol_data_1_options[] = {
static const enum_val_t protocol_data_1_options[] = {
{ "draft-7", "0x000e (Draft 7)", PROTOCOL_DATA_1_DRAFT_7 },
{ "rfc3331", "0x0300 (RFC3331)", PROTOCOL_DATA_1_PARAMETER_TAG },
{ NULL, NULL, 0 }

View File

@ -2053,7 +2053,7 @@ proto_register_m3ua(void)
&ett_q708_dpc,
};
static enum_val_t options[] = {
static const enum_val_t options[] = {
{ "draft-5", "Internet Draft version 5", M3UA_V5 },
{ "draft-6", "Internet Draft version 6", M3UA_V6 },
{ "draft-7", "Internet Draft version 7", M3UA_V7 },

View File

@ -5741,14 +5741,14 @@ void proto_register_mac_lte(void)
&ett_mac_lte_oob
};
static enum_val_t show_info_col_vals[] = {
static const enum_val_t show_info_col_vals[] = {
{"show-phy", "PHY Info", ShowPHYLayer},
{"show-mac", "MAC Info", ShowMACLayer},
{"show-rlc", "RLC Info", ShowRLCLayer},
{NULL, NULL, -1}
};
static enum_val_t lcid_drb_source_vals[] = {
static const enum_val_t lcid_drb_source_vals[] = {
{"from-static-stable", "From static table", FromStaticTable},
{"from-configuration-protocol", "From configuration protocol", FromConfigurationProtocol},
{NULL, NULL, -1}

View File

@ -23,8 +23,8 @@
* Nikitha Malgi <malgi.nikitha@ipinfusion.com>
* - Identification of BFD CC, BFD CV and ON-Demand CV ACH types as per RFC 6428, RFC 6426
* respectively and the corresponding decoding of messages
* - Decoding support for MPLS-TP Lock Instruct as per RFC 6435
* - Decoding support for MPLS-TP Fault-Management as per RFC 6427
* - Decoding support for MPLS-TP Lock Instruct as per RFC 6435
* - Decoding support for MPLS-TP Fault-Management as per RFC 6427
*
* (c) Copyright 2012, Aditya Ambadkar and Diana Chris <arambadk,dvchris@ncsu.edu>
* - Added preference to select BOS label as flowlabel as per RFC 6391
@ -138,7 +138,7 @@ enum mpls_default_dissector_t {
* this way, mpls_default_payload will be automatically filled up when
* new mpls-specific dissector added.
*/
static enum_val_t mpls_default_payload_defs[] = {
static const enum_val_t mpls_default_payload_defs[] = {
{
"pw satop"
,pwc_longname_pw_satop

View File

@ -822,15 +822,15 @@ proto_register_mtp3(void)
&ett_mtp3_label_opc
};
static enum_val_t mtp3_options[] = {
static const enum_val_t mtp3_options[] = {
{ "itu", "ITU", ITU_STANDARD },
{ "ansi", "ANSI", ANSI_STANDARD },
{ "chinese-itu", "Chinese ITU", CHINESE_ITU_STANDARD },
{ "japan", "Japan", JAPAN_STANDARD },
{ NULL, NULL, 0 }
{ NULL, NULL, 0 }
};
static enum_val_t mtp3_addr_fmt_str_e[] = {
static const enum_val_t mtp3_addr_fmt_str_e[] = {
{ "decimal", "Decimal", MTP3_ADDR_FMT_DEC },
{ "hexadecimal", "Hexadecimal", MTP3_ADDR_FMT_HEX },
{ "ni-decimal", "NI-Decimal", MTP3_ADDR_FMT_NI_DEC },
@ -839,14 +839,14 @@ proto_register_mtp3(void)
{ NULL, NULL, 0 }
};
static enum_val_t itu_pc_structures[] = {
static const enum_val_t itu_pc_structures[] = {
{ "unstructured", "Unstructured", ITU_PC_STRUCTURE_NONE},
{ "3-8-3", "3-8-3", ITU_PC_STRUCTURE_3_8_3 },
{ "4-3-4-3", "4-3-4-3", ITU_PC_STRUCTURE_4_3_4_3 },
{ NULL, NULL, 0 }
};
static enum_val_t japan_pc_structures[] = {
static const enum_val_t japan_pc_structures[] = {
{ "unstructured", "Unstructured", JAPAN_PC_STRUCTURE_NONE},
{ "7-4-5", "7-4-5", JAPAN_PC_STRUCTURE_7_4_5 },
{ "3-4-4-5", "3-4-4-5", JAPAN_PC_STRUCTURE_3_4_4_5 },

View File

@ -293,7 +293,7 @@ static GHashTable *ndmp_reassembled_table = NULL;
#define NDMP_PROTOCOL_V3 3
#define NDMP_PROTOCOL_V4 4
#define NDMP_PROTOCOL_V5 5
static enum_val_t ndmp_protocol_versions[] = {
static const enum_val_t ndmp_protocol_versions[] = {
{ "version2", "Version 2", NDMP_PROTOCOL_V2 },
{ "version3", "Version 3", NDMP_PROTOCOL_V3 },
{ "version4", "Version 4", NDMP_PROTOCOL_V4 },

View File

@ -57,7 +57,7 @@ enum ws_nfulnl_attr_type {
#define BYTE_ORDER_LE 2
#define BYTE_ORDER_HOST 3
static enum_val_t byte_order_types[] = {
static const enum_val_t byte_order_types[] = {
{ "Auto", "Auto", BYTE_ORDER_AUTO },
{ "Host", "Host", BYTE_ORDER_HOST },
{ "LE", "Little Endian", BYTE_ORDER_LE },

View File

@ -710,7 +710,7 @@ static dissector_table_t nfs_fhandle_table;
#define FHT_CELERRA 8
static enum_val_t nfs_fhandle_types[] = {
static const enum_val_t nfs_fhandle_types[] = {
{ "unknown", "Unknown", FHT_UNKNOWN },
{ "svr4", "SVR4", FHT_SVR4 },
{ "knfsd_le", "KNFSD_LE", FHT_LINUX_KNFSD_LE },

View File

@ -245,7 +245,7 @@ static const value_string pdu_vals[] = {
{ 0, NULL }
};
static enum_val_t decode_options[] = {
static const enum_val_t decode_options[] = {
{ "none", "No decoding", DECODE_NONE },
{ "ber", "BER encoded ASN.1", DECODE_BER },
{ "cdt", "Compressed Data Type", DECODE_CDT },

View File

@ -1670,14 +1670,14 @@ void proto_register_pdcp(void)
&ett_pdcp_report_bitmap
};
static enum_val_t sequence_analysis_vals[] = {
static const enum_val_t sequence_analysis_vals[] = {
{"no-analysis", "No-Analysis", FALSE},
{"rlc-only", "Only-RLC-frames", SEQUENCE_ANALYSIS_RLC_ONLY},
{"pdcp-only", "Only-PDCP-frames", SEQUENCE_ANALYSIS_PDCP_ONLY},
{NULL, NULL, -1}
};
static enum_val_t show_info_col_vals[] = {
static const enum_val_t show_info_col_vals[] = {
{"show-rlc", "RLC Info", ShowRLCLayer},
{"show-pdcp", "PDCP Info", ShowPDCPLayer},
{"show-traffic", "Traffic Info", ShowTrafficLayer},

View File

@ -64,7 +64,7 @@ static gint global_rlc_lte_um_sequence_analysis = FALSE;
static gboolean global_rlc_lte_call_pdcp_for_srb = FALSE;
enum pdcp_for_drb { PDCP_drb_off, PDCP_drb_SN_7, PDCP_drb_SN_12, PDCP_drb_SN_signalled, PDCP_drb_SN_15};
static enum_val_t pdcp_drb_col_vals[] = {
static const enum_val_t pdcp_drb_col_vals[] = {
{"pdcp-drb-off", "Off", PDCP_drb_off},
{"pdcp-drb-sn-7", "7-bit SN", PDCP_drb_SN_7},
{"pdcp-drb-sn-12", "12-bit SN", PDCP_drb_SN_12},
@ -382,7 +382,7 @@ static GHashTable *sequence_analysis_channel_hash = NULL;
/* for context information before the dissector is called */
/* Info to attach to frame when first read, recording what to show about sequence */
typedef enum {
typedef enum {
SN_OK, SN_Repeated, SN_MAC_Retx, SN_Retx, SN_Missing, ACK_Out_of_Window, SN_Error
} sequence_analysis_state;
@ -3282,7 +3282,7 @@ void proto_register_rlc_lte(void)
&ett_rlc_lte_reassembly_source_segment
};
static enum_val_t sequence_analysis_vals[] = {
static const enum_val_t sequence_analysis_vals[] = {
{"no-analysis", "No-Analysis", FALSE},
{"mac-only", "Only-MAC-frames", SEQUENCE_ANALYSIS_MAC_ONLY},
{"rlc-only", "Only-RLC-frames", SEQUENCE_ANALYSIS_RLC_ONLY},

View File

@ -380,7 +380,7 @@ static gint ett_treelist[TT_MAX];
static gboolean rsvp_bundle_dissect = TRUE;
/* FF: How should we dissect generalized label? */
static enum_val_t rsvp_generalized_label_options[] = {
static const enum_val_t rsvp_generalized_label_options[] = {
/* see RFC 3471 Section 3.2.1.2 */
{ "data", "data (no interpretation)", 1 },
/* see RFC 4606 Section 3 */
@ -4210,7 +4210,7 @@ dissect_rsvp_session_attribute(proto_item *ti, proto_tree *rsvp_object_tree,
}
/*------------------------------------------------------------------------------
* EXPLICIT ROUTE AND RECORD ROUTE SUBOBJECTS,
* EXPLICIT ROUTE AND RECORD ROUTE SUBOBJECTS,
* RFC 3209, RFC 3473, RFC 5420, RFC 4873, RFC 5553
*------------------------------------------------------------------------------*/
static void

View File

@ -216,7 +216,7 @@ static int hf_rtp_ext_rfc5285_data = -1;
#define RTP0_T38 2
#define RTP0_SPRT 3
static enum_val_t rtp_version0_types[] = {
static const enum_val_t rtp_version0_types[] = {
{ "invalid", "Invalid or ZRTP packets", RTP0_INVALID },
{ "classicstun", "CLASSIC-STUN packets", RTP0_CLASSICSTUN },
{ "t38", "T.38 packets", RTP0_T38 },

View File

@ -4215,7 +4215,7 @@ proto_register_sctp(void)
&ett_sctp_tsn_retransmitted
};
static enum_val_t sctp_checksum_options[] = {
static const enum_val_t sctp_checksum_options[] = {
{ "none", "None", SCTP_CHECKSUM_NONE },
{ "adler-32", "Adler 32", SCTP_CHECKSUM_ADLER32 },
{ "crc-32c", "CRC 32c", SCTP_CHECKSUM_CRC32C },

View File

@ -68,7 +68,7 @@ static dissector_handle_t data_handle;
static gint sdh_data_rate = 1;
static enum_val_t data_rates[] = {
static const enum_val_t data_rates[] = {
{"Attempt to guess", "Attempt to guess", -1},
{"OC-3", "OC-3", 1},
{"OC-12", "OC-12", 4},
@ -97,21 +97,21 @@ const value_string sdh_s1_vals[] = {
{ 0, NULL }
};
static int
static int
get_sdh_level(tvbuff_t *tvb, packet_info *pinfo)
{
/*data rate has been set in the SDH options*/
if(sdh_data_rate != -1) return sdh_data_rate;
/*ERF specifies data rate*/
switch((pinfo->pseudo_header->erf.ehdr_list[0].ehdr & 0xff00) >> 8){
switch((pinfo->pseudo_header->erf.ehdr_list[0].ehdr & 0xff00) >> 8){
case 1: /*OC-3*/
return 1;
case 2: /*OC-12*/
return 4;
case 3: /*OC-48*/
return 16;
return 16;
default: /*drop through and try the next method*/
;
;
}
/*returns the multiplier for each data level*/
switch(tvb_reported_length(tvb)){
@ -122,7 +122,7 @@ get_sdh_level(tvbuff_t *tvb, packet_info *pinfo)
case 19440: /*OC-24*/
return 8;
case 38880: /*OC-48*/
return 16;
return 16;
}
return 1;

View File

@ -2581,12 +2581,12 @@ proto_register_sigcomp(void)
};
module_t *sigcomp_module;
static enum_val_t udvm_detail_vals[] = {
{"no-printout", "No-Printout", 0},
{"low-detail", "Low-detail", 1},
{"medium-detail", "Medium-detail", 2},
{"high-detail", "High-detail", 3},
{NULL, NULL, -1}
static const enum_val_t udvm_detail_vals[] = {
{"no-printout", "No-Printout", 0},
{"low-detail", "Low-detail", 1},
{"medium-detail", "Medium-detail", 2},
{"high-detail", "High-detail", 3},
{NULL, NULL, -1}
};

View File

@ -69,7 +69,7 @@ typedef enum {
CAN_CANOPEN_DISSECTOR = 2
} Dissector_Option;
static enum_val_t can_high_level_protocol_dissector_options[] = {
static const enum_val_t can_high_level_protocol_dissector_options[] = {
{ "raw", "Raw data (no further dissection)", CAN_DATA_DISSECTOR },
{ "CANopen", "CANopen protocol", CAN_CANOPEN_DISSECTOR },
{ NULL, NULL, 0 }

View File

@ -58,7 +58,7 @@ static range_t *global_udp_port_range;
static dissector_handle_t sscop_handle;
static enum_val_t sscop_payload_dissector_options[] = {
static const enum_val_t sscop_payload_dissector_options[] = {
{ "data", "Data (no further dissection)", DATA_DISSECTOR },
{ "Q.2931", "Q.2931", Q2931_DISSECTOR },
{ "SSCF-NNI", "SSCF-NNI (MTP3-b)", SSCF_NNI_DISSECTOR },

View File

@ -2398,7 +2398,7 @@ proto_register_sua(void)
module_t *sua_module;
static enum_val_t options[] = {
static const enum_val_t options[] = {
{ "draft-08", "Internet Draft version 08", SUA_V08 },
{ "rfc3868", "RFC 3868", SUA_RFC },
{ NULL, NULL, 0 }

View File

@ -5604,7 +5604,7 @@ proto_register_tcp(void)
&ett_tcp_process_info
};
static enum_val_t window_scaling_vals[] = {
static const enum_val_t window_scaling_vals[] = {
{"not-known", "Not known", WindowScaling_NotKnown},
{"0", "0 (no scaling)", WindowScaling_0},
{"1", "1 (multiply by 2)", WindowScaling_1},

View File

@ -32,7 +32,7 @@
#include <epan/prefs.h>
static enum_val_t time_display_types[] = {
static const enum_val_t time_display_types[] = {
{ "UTC", "UTC", ABSOLUTE_TIME_UTC },
{ "Local", "Local", ABSOLUTE_TIME_LOCAL},
{ NULL, NULL, 0 }

View File

@ -2883,11 +2883,11 @@ proto_register_tipc(void)
module_t *tipc_module;
/* options for the enum in the protocol preferences */
static enum_val_t handle_v2_as_options[] = {
static const enum_val_t handle_v2_as_options[] = {
{ "all", "ALL", V2_AS_ALL },
{ "tipc l.5/1.6", "TIPC 1.5/1.6", V2_AS_1_6 },
{ "tipc 1.7", "TIPC 1.7", V2_AS_1_7 },
{ NULL, NULL, 0 }
{ NULL, NULL, 0 }
};
/* Register the protocol name and description */

View File

@ -101,7 +101,7 @@ static const value_string zbee_sec_level_names[] = {
#endif
/* The ZigBee security level, in enum_val_t for the security preferences. */
static enum_val_t zbee_sec_level_enums[] = {
static const enum_val_t zbee_sec_level_enums[] = {
{ "None", "No Security", ZBEE_SEC_NONE },
{ "MIC32", "No Encryption, 32-bit Integrity Protection", ZBEE_SEC_MIC32 },
{ "MIC64", "No Encryption, 64-bit Integrity Protection", ZBEE_SEC_MIC64 },