aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-e164.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-04-02 21:56:40 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-04-02 21:56:40 +0000
commita9833c921ffac96554a41438c2f08fab85d1e65d (patch)
tree5cae96274eeb164a22954ae30e622c24bdb83cde /epan/dissectors/packet-e164.c
parentf28a077f9757419cd483b4595d39987c4ed836d5 (diff)
Use extended value strings
svn path=/trunk/; revision=48714
Diffstat (limited to 'epan/dissectors/packet-e164.c')
-rw-r--r--epan/dissectors/packet-e164.c94
1 files changed, 48 insertions, 46 deletions
diff --git a/epan/dissectors/packet-e164.c b/epan/dissectors/packet-e164.c
index 5d02aaa15e..9f814bce4f 100644
--- a/epan/dissectors/packet-e164.c
+++ b/epan/dissectors/packet-e164.c
@@ -38,7 +38,51 @@ void proto_register_e164(void);
const value_string E164_country_code_value[] = {
{ 0x00, "Reserved"},
{ 0x01, "Americas"},
+ { 0x07,"Russian Federation, Kazakstan (Republic of)"},
{ 0x020,"Egypt (Arab Republic of)"},
+ { 0x027,"South Africa (Republic of)"},
+ { 0x030,"Greece"},
+ { 0x031,"Netherlands (Kingdom of the)"},
+ { 0x032,"Belgium"},
+ { 0x033,"France"},
+ { 0x034,"Spain"},
+ { 0x036,"Hungary (Republic of)"},
+ { 0x039,"Italy"},
+ { 0x040,"Romania"},
+ { 0x041,"Switzerland (Confederation of)"},
+ { 0x043,"Austria"},
+ { 0x044,"United Kingdom of Great Britain and Northern Ireland"},
+ { 0x045,"Denmark"},
+ { 0x046,"Sweden"},
+ { 0x047,"Norway"},
+ { 0x048,"Poland (Republic of)"},
+ { 0x049,"Germany (Federal Republic of)"},
+ { 0x051,"Peru"},
+ { 0x052,"Mexico"},
+ { 0x053,"Cuba"},
+ { 0x054,"Argentine Republic"},
+ { 0x055,"Brazil (Federative Republic of)"},
+ { 0x056,"Chile"},
+ { 0x057,"Colombia (Republic of)"},
+ { 0x058,"Venezuela(Bolivarian Republic of)"},
+ { 0x060,"Malaysia"},
+ { 0x061,"Australia"},
+ { 0x062,"Indonesia (Republic of)"},
+ { 0x063,"Philippines (Republic of the)"},
+ { 0x064,"New Zealand"},
+ { 0x065,"Singapore (Republic of)"},
+ { 0x066,"Thailand"},
+ { 0x081,"Japan"},
+ { 0x082,"Korea (Republic of)"},
+ { 0x084,"Viet Nam (Socialist Republic of)"},
+ { 0x086,"China (People's Republic of)"},
+ { 0x090,"Turkey"},
+ { 0x091,"India (Republic of)"},
+ { 0x092,"Pakistan (Islamic Republic of)"},
+ { 0x093,"Afghanistan"},
+ { 0x094,"Sri Lanka (Democratic Socialist Republic of)"},
+ { 0x095,"Myanmar (the Republic of the Union of)"},
+ { 0x098,"Iran (Islamic Republic of)"},
{ 0x0210,"Spare code"},
{ 0x0211,"South Sudan (Republic of)"},
{ 0x0212,"Morocco (Kingdom of)"},
@@ -99,7 +143,6 @@ const value_string E164_country_code_value[] = {
{ 0x0267,"Botswana (Republic of)"},
{ 0x0268,"Swaziland (Kingdom of)"},
{ 0x0269,"Comoros (Union of the)"},
- { 0x027,"South Africa (Republic of)"},
{ 0x0280,"Spare code"},
{ 0x0281,"Spare code"},
{ 0x0282,"Spare code"},
@@ -120,11 +163,6 @@ const value_string E164_country_code_value[] = {
{ 0x0297,"Aruba"},
{ 0x0298,"Faroe Islands"},
{ 0x0299,"Greenland (Denmark)"},
- { 0x030,"Greece"},
- { 0x031,"Netherlands (Kingdom of the)"},
- { 0x032,"Belgium"},
- { 0x033,"France"},
- { 0x034,"Spain"},
{ 0x0350,"Gibraltar"},
{ 0x0351,"Portugal"},
{ 0x0352,"Luxembourg"},
@@ -135,7 +173,6 @@ const value_string E164_country_code_value[] = {
{ 0x0357,"Cyprus (Republic of)"},
{ 0x0358,"Finland"},
{ 0x0359,"Bulgaria (Republic of)"},
- { 0x036,"Hungary (Republic of)"},
{ 0x0370,"Lithuania (Republic of)"},
{ 0x0371,"Latvia (Republic of)"},
{ 0x0372,"Estonia (Republic of)"},
@@ -156,9 +193,6 @@ const value_string E164_country_code_value[] = {
{ 0x0387,"Bosnia and Herzegovina"},
{ 0x0388,"Group of countries, shared code"},
{ 0x0389,"The Former Yugoslav Republic of Macedonia"},
- { 0x039,"Italy"},
- { 0x040,"Romania"},
- { 0x041,"Switzerland (Confederation of)"},
{ 0x0420,"Czech Republic"},
{ 0x0421,"Slovak Republic"},
{ 0x0422,"Spare code"},
@@ -169,13 +203,6 @@ const value_string E164_country_code_value[] = {
{ 0x0427,"Spare code"},
{ 0x0428,"Spare code"},
{ 0x0429,"Spare code"},
- { 0x043,"Austria"},
- { 0x044,"United Kingdom of Great Britain and Northern Ireland"},
- { 0x045,"Denmark"},
- { 0x046,"Sweden"},
- { 0x047,"Norway"},
- { 0x048,"Poland (Republic of)"},
- { 0x049,"Germany (Federal Republic of)"},
{ 0x0500,"Falkland Islands (Malvinas)"},
{ 0x0501,"Belize"},
{ 0x0502,"Guatemala (Republic of)"},
@@ -186,14 +213,6 @@ const value_string E164_country_code_value[] = {
{ 0x0507,"Panama (Republic of)"},
{ 0x0508,"Saint Pierre and Miquelon (Collectivite territoriale de la Republique francaise)"},
{ 0x0509,"Haiti (Republic of)"},
- { 0x051,"Peru"},
- { 0x052,"Mexico"},
- { 0x053,"Cuba"},
- { 0x054,"Argentine Republic"},
- { 0x055,"Brazil (Federative Republic of)"},
- { 0x056,"Chile"},
- { 0x057,"Colombia (Republic of)"},
- { 0x058,"Venezuela(Bolivarian Republic of)"},
{ 0x0590,"Guadeloupe (French Department of)"},
{ 0x0591,"Bolivia (Plurinational State of)"},
{ 0x0592,"Guyana"},
@@ -204,13 +223,6 @@ const value_string E164_country_code_value[] = {
{ 0x0597,"Suriname (Republic of)"},
{ 0x0598,"Uruguay (Eastern Republic of)"},
{ 0x0599,"Bonaire, Saint Eustatius and Saba, Curacao"},
- { 0x060,"Malaysia"},
- { 0x061,"Australia"},
- { 0x062,"Indonesia (Republic of)"},
- { 0x063,"Philippines (Republic of the)"},
- { 0x064,"New Zealand"},
- { 0x065,"Singapore (Republic of)"},
- { 0x066,"Thailand"},
{ 0x0670,"Democratic Republic of Timor-Leste"},
{ 0x0671,"Spare code"},
{ 0x0672,"Australian External Territories"},
@@ -241,7 +253,6 @@ const value_string E164_country_code_value[] = {
{ 0x0697,"Spare code"},
{ 0x0698,"Spare code"},
{ 0x0699,"Spare code"},
- { 0x07,"Russian Federation, Kazakstan (Republic of)"},
{ 0x0800,"International Freephone Service"},
{ 0x0801,"Spare code"},
{ 0x0802,"Spare code"},
@@ -252,8 +263,6 @@ const value_string E164_country_code_value[] = {
{ 0x0807,"Spare code"},
{ 0x0808,"International Shared Cost Service (ISCS)"},
{ 0x0809,"Spare code"},
- { 0x081,"Japan"},
- { 0x082,"Korea (Republic of)"},
{ 0x0830,"Spare code"},
{ 0x0831,"Spare code"},
{ 0x0832,"Spare code"},
@@ -264,7 +273,6 @@ const value_string E164_country_code_value[] = {
{ 0x0837,"Spare code"},
{ 0x0838,"Spare code"},
{ 0x0839,"Spare code"},
- { 0x084,"Viet Nam (Socialist Republic of)"},
{ 0x0850,"Democratic People's Republic of Korea"},
{ 0x0851,"Spare code"},
{ 0x0852,"Hong Kong, China"},
@@ -275,7 +283,6 @@ const value_string E164_country_code_value[] = {
{ 0x0857,"Spare code"},
{ 0x0858,"Spare code"},
{ 0x0859,"Spare code"},
- { 0x086,"China (People's Republic of)"},
{ 0x0870,"Inmarsat SNAC"},
{ 0x0871,"Spare code"},
{ 0x0872,"Spare code"},
@@ -306,12 +313,6 @@ const value_string E164_country_code_value[] = {
{ 0x0897,"Spare code"},
{ 0x0898,"Spare code"},
{ 0x0899,"Spare code"},
- { 0x090,"Turkey"},
- { 0x091,"India (Republic of)"},
- { 0x092,"Pakistan (Islamic Republic of)"},
- { 0x093,"Afghanistan"},
- { 0x094,"Sri Lanka (Democratic Socialist Republic of)"},
- { 0x095,"Myanmar (the Republic of the Union of)"},
{ 0x0960,"Maldives (Republic of)"},
{ 0x0961,"Lebanon"},
{ 0x0962,"Jordan (Hashemite Kingdom of)"},
@@ -332,7 +333,6 @@ const value_string E164_country_code_value[] = {
{ 0x0977,"Nepal (Federal Democratic Republic of)"},
{ 0x0978,"Spare code"},
{ 0x0979,"International Premium Rate Service (IPRS)"},
- { 0x098,"Iran (Islamic Republic of)"},
{ 0x0990,"Spare code"},
{ 0x0991,"Trial of a proposed new international telecommunication public correspondence service, shared code"},
{ 0x0992,"Tajikstan (Republic of)"},
@@ -345,6 +345,7 @@ const value_string E164_country_code_value[] = {
{ 0x0999,"Reserved for future global service"},
{ 0, NULL }
};
+static value_string_ext E164_country_code_value_ext = VALUE_STRING_EXT_INIT(E164_country_code_value);
const value_string E164_GMSS_vals[] = {
{ 0x6, "Iridium Satellite LLC"},
{ 0x7, "Iridium Satellite LLC"},
@@ -381,6 +382,7 @@ const value_string E164_International_Networks_882_vals[] = {
{ 0x99, "Telenor GSM network - services in aircraft"},
{ 0, NULL }
};
+static value_string_ext E164_International_Networks_882_vals_ext = VALUE_STRING_EXT_INIT(E164_International_Networks_882_vals);
const value_string E164_International_Networks_883_vals[] = {
{ 0x100, "MediaLincc Ltd"},
{ 0x110, "Aicent Inc"},
@@ -581,7 +583,7 @@ dissect_e164_cc(tvbuff_t *tvb, proto_tree *tree, int offset, gboolean bcd_coded)
}/* end switch cc_length */
proto_tree_add_text(tree, tvb, cc_offset, length,"Country Code: %x %s (length %u)", cc,
- val_to_str_const(cc,E164_country_code_value,"Unknown"), cc_length);
+ val_to_str_ext_const(cc,&E164_country_code_value_ext,"Unknown"), cc_length);
switch ( cc ) {
case 0x881 :
@@ -602,7 +604,7 @@ dissect_e164_cc(tvbuff_t *tvb, proto_tree *tree, int offset, gboolean bcd_coded)
id_code |= tvb_get_guint8(tvb, cc_offset + 2) & 0x0f;
}
proto_tree_add_text(tree,tvb, (cc_offset + 1), 2,"Identification Code: %x %s ",id_code,
- val_to_str_const(id_code,E164_International_Networks_882_vals,"Unknown"));
+ val_to_str_ext_const(id_code,&E164_International_Networks_882_vals_ext,"Unknown"));
break;
case 0x883 :
if (!bcd_coded) {