Added a value_string for the countreis which have their MS contry code listed
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 14 Mar 2002 10:04:02 +0000 (10:04 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 14 Mar 2002 10:04:02 +0000 (10:04 +0000)
at www.unicode.org and made samr and netlogon use it.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4943 f5534014-38df-0310-8fa8-9805f1628bb7

packet-dcerpc-netlogon.c
packet-dcerpc-nt.c
packet-dcerpc-nt.h
packet-dcerpc-samr.c

index e84f781fe66df583d89e564404062606768c933e..c5e700df83a4f52983eb68561b15a71c8dffd945 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001, Tim Potter <tpot@samba.org>
  *  2002 structure and command dissectors by Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-netlogon.c,v 1.9 2002/03/14 09:19:17 sahlberg Exp $
+ * $Id: packet-dcerpc-netlogon.c,v 1.10 2002/03/14 10:04:02 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -5455,7 +5455,7 @@ static hf_register_info hf[] = {
 
        { &hf_netlogon_country,
                { "Country", "netlogon.country", FT_UINT16, BASE_DEC, 
-               NULL, 0x0, "Country setting for this account", HFILL }},
+               VALS(ms_country_codes), 0x0, "Country setting for this account", HFILL }},
 
        { &hf_netlogon_codepage,
                { "Codepage", "netlogon.codepage", FT_UINT16, BASE_DEC, 
index 5cdc91b30dd21aab9187d87a6657a42034bd5a34..9dc30a896fa9cd7c7862c49d0b863c0a2f854a06 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC over SMB packet disassembly
  * Copyright 2001, Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-nt.c,v 1.15 2002/03/13 07:38:34 sahlberg Exp $
+ * $Id: packet-dcerpc-nt.c,v 1.16 2002/03/14 10:04:02 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -663,3 +663,113 @@ dissect_ndr_nt_NTTIME (tvbuff_t *tvb, int offset,
        return offset;
 }
 
+
+/* These are the MS country codes from www.unicode.org/unicode/onlinedat/countries.html
+   For countries that share teh same number I choose to use only the name of the largest
+   country. Appologies for this. If this offends you, here is the table to change that.
+
+  There might be more info in winnls.h for those that have wincompilers
+*/
+const value_string ms_country_codes[] = {
+       {  1,   "USA"},
+       {  2,   "Canada"},
+       {  7,   "Russia"},
+       { 20,   "Egypt"},
+       { 27,   "South Africa"},
+       { 30,   "Greece"},
+       { 31,   "Netherlands"},
+       { 32,   "Belgium"},
+       { 33,   "France"},
+       { 34,   "Spain"},
+       { 36,   "Hungary"},
+       { 39,   "Italy"},
+       { 40,   "Romania"},
+       { 41,   "Switzerland"},
+       { 43,   "Austria"},
+       { 44,   "United Kingdom"},
+       { 45,   "Denmark"},
+       { 46,   "Sweden"},
+       { 47,   "Norway"},
+       { 48,   "Poland"},
+       { 49,   "Germany"},
+       { 51,   "Peru"},
+       { 52,   "Mexico"},
+       { 54,   "Argentina"},
+       { 55,   "Brazil"},
+       { 56,   "Chile"},
+       { 57,   "Colombia"},
+       { 58,   "Venezuela"},
+       { 60,   "Malaysia"},
+       { 62,   "Australia"},
+       { 63,   "Philippines"},
+       { 64,   "New Zealand"},
+       { 65,   "Singapore"},
+       { 66,   "Thailand"},
+       { 81,   "Japan"},
+       { 82,   "South Korea"},
+       { 84,   "Viet Nam"},
+       { 86,   "China"},
+       { 90,   "Turkey"},
+       { 91,   "India"},
+       { 92,   "Pakistan"},
+       {212,   "Morocco"},
+       {213,   "Algeria"},
+       {216,   "Tunisia"},
+       {218,   "Libya"},
+       {254,   "Kenya"},
+       {263,   "Zimbabwe"},
+       {298,   "Faroe Islands"},
+       {351,   "Portugal"},
+       {352,   "Luxembourg"},
+       {353,   "Ireland"},
+       {354,   "Iceland"},
+       {355,   "Albania"},
+       {358,   "Finland"},
+       {359,   "Bulgaria"},
+       {370,   "Lithuania"},
+       {371,   "Latvia"},
+       {372,   "Estonia"},
+       {374,   "Armenia"},
+       {375,   "Belarus"},
+       {380,   "Ukraine"},
+       {381,   "Serbia"},
+       {385,   "Croatia"},
+       {386,   "Slovenia"},
+       {389,   "Macedonia"},
+       {420,   "Czech Republic"},
+       {421,   "Slovak Republic"},
+       {501,   "Belize"},
+       {502,   "Guatemala"},
+       {503,   "El Salvador"},
+       {504,   "Honduras"},
+       {505,   "Nicaragua"},
+       {506,   "Costa Rica"},
+       {507,   "Panama"},
+       {591,   "Bolivia"},
+       {593,   "Ecuador"},
+       {595,   "Paraguay"},
+       {598,   "Uruguay"},
+       {673,   "Brunei Darussalam"},
+       {852,   "Hong Kong"},
+       {853,   "Macau"},
+       {886,   "Taiwan"},
+       {960,   "Maldives"},
+       {961,   "Lebanon"},
+       {962,   "Jordan"},
+       {963,   "Syria"},
+       {964,   "Iraq"},
+       {965,   "Kuwait"},
+       {966,   "Saudi Arabia"},
+       {967,   "Yemen"},
+       {968,   "Oman"},
+       {972,   "Israel"},
+       {973,   "Bahrain/United Arab Emirates"},
+       {974,   "Qatar"},
+       {976,   "Mongolia"},
+       {981,   "Iran"},
+       {994,   "Azerbaijan"},
+       {995,   "Georgia"},
+       {996,   "Kyrgyzstan"},
+
+       {0,     NULL}
+};
index d1af9aa1065120c945d1bf82f1eb00a6c4051eec..bcdc4cadca7e4a991c3db06f17bd5130007c8815 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for DCERPC over SMB packet disassembly
  * Copyright 2001, Tim Potter <tpot@samba.org>
  *
- * $Id: packet-dcerpc-nt.h,v 1.11 2002/03/11 00:28:21 sahlberg Exp $
+ * $Id: packet-dcerpc-nt.h,v 1.12 2002/03/14 10:04:02 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -74,6 +74,9 @@ int prs_push_ptr(tvbuff_t *tvb, int offset, packet_info *pinfo,
 guint32 prs_pop_ptr(GList **ptr_list, char *name);
 
 
+
+extern const value_string ms_country_codes[];
+
 #define ALIGN_TO_4_BYTES       {if(offset&0x03)offset=(offset&0xfffffffc)+4;}
 
 int
index edaa7bad4c3e5aadc1ebb45dd93575b2d4a361bf..54b51163e5db68a85f7f1e211a872af1f3d50c71 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2001, Tim Potter <tpot@samba.org>
  *   2002 Added all command dissectors  Ronnie Sahlberg
  *
- * $Id: packet-dcerpc-samr.c,v 1.24 2002/03/11 00:28:21 sahlberg Exp $
+ * $Id: packet-dcerpc-samr.c,v 1.25 2002/03/14 10:04:02 sahlberg Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -3756,7 +3756,7 @@ proto_register_dcerpc_samr(void)
                NULL, 0, "Resume handle", HFILL }},
        { &hf_samr_country, {
                "Country", "samr.country", FT_UINT16, BASE_DEC,
-               NULL, 0, "Country setting for this user", HFILL }},
+               VALS(ms_country_codes), 0, "Country setting for this user", HFILL }},
        { &hf_samr_codepage, {
                "Codepage", "samr.codepage", FT_UINT16, BASE_DEC,
                NULL, 0, "Codepage setting for this user", HFILL }},