Add some additional sanity checking.
[obnox/wireshark/wip.git] / t35.c
1 /* t35.c
2  * T.35 and H.221 tables
3  * 2003  Tomas Kukosa
4  *
5  * $Id: t35.c,v 1.4 2003/10/10 10:02:31 guy Exp $
6  *
7  * Ethereal - Network traffic analyzer
8  * By Gerald Combs <gerald@ethereal.com>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  */
25
26 #include "t35.h"
27
28 /* Recommendation T.35 (02/2000) */
29 /* Annex to ITU Operational Bulletin No. 766 - 15.VI.2002 */
30 const value_string T35CountryCode_vals[] = {
31         { 0x00, "Japan"},
32         { 0x01, "Albania"},
33         { 0x02, "Algeria"},
34         { 0x03, "American Samoa"},
35         { 0x04, "Germany"},
36         { 0x05, "Anguilla"},
37         { 0x06, "Antigua and Barbuda"},
38         { 0x07, "Argentina"},
39         { 0x08, "Ascension (see S. Helena)"},
40         { 0x09, "Australia"},
41         { 0x0a, "Austria"},
42         { 0x0b, "Bahamas"},
43         { 0x0c, "Bahrain"},
44         { 0x0d, "Bangladesh"},
45         { 0x0e, "Barbados"},
46         { 0x0f, "Belgium"},
47         { 0x10, "Belize"},
48         { 0x11, "Benin"},
49         { 0x12, "Bermuda"},
50         { 0x13, "Bhutan"},
51         { 0x14, "Bolivia"},
52         { 0x15, "Botswana"},
53         { 0x16, "Brazil"},
54         { 0x17, "British Antarctic Territory"},
55         { 0x18, "British Indian Ocean Territory"},
56         { 0x19, "British Virgin Islands"},
57         { 0x1a, "Brunei Darussalam"},
58         { 0x1b, "Bulgaria"},
59         { 0x1c, "Myanmar"},
60         { 0x1d, "Burundi"},
61         { 0x1e, "Belarus"},
62         { 0x1f, "Cameroon"},
63         { 0x20, "Canada"},
64         { 0x21, "Cape Verde"},
65         { 0x22, "Cayman Islands"},
66         { 0x23, "Central African Rep."},
67         { 0x24, "Chad"},
68         { 0x25, "Chile"},
69         { 0x26, "China"},
70         { 0x27, "Colombia"},
71         { 0x28, "Comoros"},
72         { 0x29, "Congo"},
73         { 0x2a, "Cook Islands"},
74         { 0x2b, "Costa Rica"},
75         { 0x2c, "Cuba"},
76         { 0x2d, "Cyprus"},
77         { 0x2e, "Czech Rep."},
78         { 0x2f, "Cambodia"},
79         { 0x30, "Dem. People's Rep. of Korea"},
80         { 0x31, "Denmark"},
81         { 0x32, "Djibouti"},
82         { 0x33, "Dominican Rep."},
83         { 0x34, "Dominica"},
84         { 0x35, "Ecuador"},
85         { 0x36, "Egypt"},
86         { 0x37, "El Salvador"},
87         { 0x38, "Equatorial Guinea"},
88         { 0x39, "Ethiopia"},
89         { 0x3a, "Falkland Islands (Malvinas)"},
90         { 0x3b, "Fiji"},
91         { 0x3c, "Finland"},
92         { 0x3d, "France"},
93         { 0x3e, "French Polynesia"},
94         /* { 0x3f, "(Available)"}, */
95         { 0x40, "Gabon"},
96         { 0x41, "Gambia"},
97         { 0x42, "Germany"},
98         { 0x43, "Angola"},
99         { 0x44, "Ghana"},
100         { 0x45, "Gibraltar"},
101         { 0x46, "Greece"},
102         { 0x47, "Grenada"},
103         { 0x48, "Guam"},
104         { 0x49, "Guatemala"},
105         { 0x4a, "Guernsey"},
106         { 0x4b, "Guinea"},
107         { 0x4c, "Guinea-Bissau"},
108         { 0x4d, "Guayana"},
109         { 0x4e, "Haiti"},
110         { 0x4f, "Honduras"},
111         { 0x50, "Hong Kong, China"},
112         { 0x51, "Hungary"},
113         { 0x52, "Iceland"},
114         { 0x53, "India"},
115         { 0x54, "Indonesia"},
116         { 0x55, "Iran (Islamic Republic of)"},
117         { 0x56, "Iraq"},
118         { 0x57, "Ireland"},
119         { 0x58, "Israel"},
120         { 0x59, "Italy"},
121         { 0x5a, "Côte d'Ivoire"},
122         { 0x5b, "Jamaica"},
123         { 0x5c, "Afghanistan"},
124         { 0x5d, "Jersey"},
125         { 0x5e, "Jordan"},
126         { 0x5f, "Kenya"},
127         { 0x60, "Kiribati"},
128         { 0x61, "Korea (Rep. of)"},
129         { 0x62, "Kuwait"},
130         { 0x63, "Lao P.D.R."},
131         { 0x64, "Lebanon"},
132         { 0x65, "Lesotho"},
133         { 0x66, "Liberia"},
134         { 0x67, "Libya"},
135         { 0x68, "Liechtenstein"},
136         { 0x69, "Luxembourg"},
137         { 0x6a, "Macao, China"},
138         { 0x6b, "Madagascar"},
139         { 0x6c, "Malaysia"},
140         { 0x6d, "Malawi"},
141         { 0x6e, "Maldives"},
142         { 0x6f, "Mali"},
143         { 0x70, "Malta"},
144         { 0x71, "Mauritania"},
145         { 0x72, "Mauritius"},
146         { 0x73, "Mexico"},
147         { 0x74, "Monaco"},
148         { 0x75, "Mongolia"},
149         { 0x76, "Montserrat"},
150         { 0x77, "Morocco"},
151         { 0x78, "Mozambique"},
152         { 0x79, "Nauru"},
153         { 0x7a, "Nepal"},
154         { 0x7b, "Netherlands"},
155         { 0x7c, "Netherlands Antilles"},
156         { 0x7d, "New Caledonia"},
157         { 0x7e, "New Zealand"},
158         { 0x7f, "Nicaragua"},
159         { 0x80, "Niger"},
160         { 0x81, "Nigeria"},
161         { 0x82, "Norway"},
162         { 0x83, "Oman"},
163         { 0x84, "Pakistan"},
164         { 0x85, "Panama"},
165         { 0x86, "Papua New Guinea"},
166         { 0x87, "Paraguay"},
167         { 0x88, "Peru"},
168         { 0x89, "Philippines"},
169         { 0x8a, "Poland"},
170         { 0x8b, "Portugal"},
171         { 0x8c, "Puerto Rico"},
172         { 0x8d, "Qatar"},
173         { 0x8e, "Romania"},
174         { 0x8f, "Rwanda"},
175         { 0x90, "Saint Kitts and Nevis"},
176         { 0x91, "Saint Croix"},
177         { 0x92, "Saint Helena and Ascension"},
178         { 0x93, "Saint Lucia"},
179         { 0x94, "San Marino"},
180         { 0x95, "Saint Thomas"},
181         { 0x96, "Sao Tome and Principe"},
182         { 0x97, "Saint Vincent and the Grenadines"},
183         { 0x98, "Saudi Arabia"},
184         { 0x99, "Senegal"},
185         { 0x9a, "Seychelles"},
186         { 0x9b, "Sierra Leone"},
187         { 0x9c, "Singapore"},
188         { 0x9d, "Solomon"},
189         { 0x9e, "Somalia"},
190         { 0x9f, "South Africa"},
191         { 0xa0, "Spain"},
192         { 0xa1, "Sri Lanka"},
193         { 0xa2, "Sudan"},
194         { 0xa3, "Suriname"},
195         { 0xa4, "Swaziland"},
196         { 0xa5, "Sweden"},
197         { 0xa6, "Switzerland"},
198         { 0xa7, "Syria"},
199         { 0xa8, "Tanzania"},
200         { 0xa9, "Thailand"},
201         { 0xaa, "Togo"},
202         { 0xab, "Tonga"},
203         { 0xac, "Trinidad and Tobago"},
204         { 0xad, "Tunisia"},
205         { 0xae, "Turkey"},
206         { 0xaf, "Turks and Caicos Islands"},
207         { 0xb0, "Tuvalu"},
208         { 0xb1, "Uganda"},
209         { 0xb2, "Ukraine"},
210         { 0xb3, "United Arab Emirates"},
211         { 0xb4, "United Kingdom"},
212         { 0xb5, "United States"},
213         { 0xb6, "Burkina Faso"},
214         { 0xb7, "Uruguay"},
215         { 0xb8, "Russia"},
216         { 0xb9, "Vanuatu"},
217         { 0xba, "Vatican"},
218         { 0xbb, "Venezuela"},
219         { 0xbc, "Viet Nam"},
220         { 0xbd, "Wallis and Futuna"},
221         { 0xbe, "Samoa"},
222         { 0xbf, "Yemen"},
223         { 0xc0, "Yemen"},
224         { 0xc1, "Yugoslavia"},
225         { 0xc2, "Dem. Rep. of the Congo"},
226         { 0xc3, "Zambia"},
227         { 0xc4, "Zimbabwe"},
228         { 0xc5, "Slovakia"},
229         { 0xc6, "Slovenia"},
230         {  0, NULL }
231 };
232
233
234 const value_string T35Extension_vals[] = {
235         {  0, NULL }
236 };
237
238 const value_string H221ManufacturerCode_vals[] = {
239         {  0x04000042, "Deutsche Telekom AG" },                             /* From Ref. 3 */
240         {  0x04000043, "Deutsche Telekom AG" },                             /* From Ref. 3 */
241         {  0x04000082, "Siemens AG" },                                      /* From Ref. 3 */
242         {  0x04000084, "ITO Communication" },                               /* From Ref. 3 */
243         {  0x04000086, "Hauni Elektronik" },                                /* From Ref. 3 */
244         {  0x04000088, "Dr.Neuhaus Mikroelektronik" },                      /* From Ref. 3 */
245         {  0x0400008a, "mps Software" },                                    /* From Ref. 3 */
246         {  0x0400008b, "Ferrari electronik GmbH" },                         /* From Ref. 3 */
247         {  0x0400008c, "mbp Kommunikationssysteme GmbH" },                  /* From Ref. 3 */
248         {  0x0400008d, "Schneider Rundfunkwerke AG" },                      /* From Ref. 3 */
249         {  0x0400008e, "Digitronic computersysteme gmbh" },                 /* From Ref. 3 */
250         {  0x0400008f, "DeTeWe - Deutsche Telephonwerke AG &Co" },          /* From Ref. 3 */
251         {  0x04000082, "SITK Institut für Telekommunikation GmbH & Co KG" },/* From Ref. 3 */
252         {  0x0900003D, "Equivalence (OpenH323)" },                          /* From captures */
253         {  0x20000081, "Mediatrix Telecom" },                               /* From Ref. 1 */
254         {  0x82000002, "Ericsson" },                                        /* From captures */
255         {  0xa5000001, "Ericsson" },                                        /* From captures */
256         {  0xb4000000, "British Telecommunications" },                      /* From Ref. 2 */
257         {  0xb4000001, "British Telecommunications" },                      /* From Ref. 2 */
258         {  0xb4000002, "British Telecommunications" },                      /* From Ref. 2 */
259         {  0xb4000003, "British Telecommunications" },                      /* From Ref. 2 */
260         {  0xb4000004, "British Telecommunications" },                      /* From Ref. 2 */
261         {  0xb4000005, "British Telecommunications" },                      /* From Ref. 2 */
262         {  0xb4000006, "British Telecommunications" },                      /* From Ref. 2 */
263         {  0xb4000007, "British Telecommunications" },                      /* From Ref. 2 */
264         {  0xb4000008, "British Telecommunications" },                      /* From Ref. 2 */
265         {  0xb4000009, "British Telecommunications" },                      /* From Ref. 2 */
266         {  0xb400000a, "British Telecommunications" },                      /* From Ref. 2 */
267         {  0xb400000b, "British Telecommunications" },                      /* From Ref. 2 */
268         {  0xb400000c, "British Telecommunications" },                      /* From Ref. 2 */
269         {  0xb400000d, "British Telecommunications" },                      /* From Ref. 2 */
270         {  0xb400000e, "British Telecommunications" },                      /* From Ref. 2 */
271         {  0xb400000f, "British Telecommunications" },                      /* From Ref. 2 */
272         {  0xb4000010, "GPT Video Systems" },                               /* From Ref. 2 */
273         {  0xb4000011, "GPT Video Systems" },                               /* From Ref. 2 */
274         {  0xb4000012, "GPT Video Systems" },                               /* From Ref. 2 */
275         {  0xb4000013, "GPT Video Systems" },                               /* From Ref. 2 */
276         {  0xb4000014, "GPT Video Systems" },                               /* From Ref. 2 */
277         {  0xb4000015, "GPT Video Systems" },                               /* From Ref. 2 */
278         {  0xb4000016, "GPT Video Systems" },                               /* From Ref. 2 */
279         {  0xb4000017, "GPT Video Systems" },                               /* From Ref. 2 */
280         {  0xb4000018, "GPT Video Systems" },                               /* From Ref. 2 */
281         {  0xb4000019, "GPT Video Systems" },                               /* From Ref. 2 */
282         {  0xb400001a, "GPT Video Systems" },                               /* From Ref. 2 */
283         {  0xb400001b, "GPT Video Systems" },                               /* From Ref. 2 */
284         {  0xb400001c, "GPT Video Systems" },                               /* From Ref. 2 */
285         {  0xb400001d, "GPT Video Systems" },                               /* From Ref. 2 */
286         {  0xb400001e, "GPT Video Systems" },                               /* From Ref. 2 */
287         {  0xb400001f, "GPT Video Systems" },                               /* From Ref. 2 */
288         {  0xb4000020, "Marconi Communications" },                          /* From Ref. 2 */ 
289         {  0xb4000021, "Indigo Active Vision Systems" },                    /* From Ref. 2 */ 
290         {  0xb4000022, "LiveWorks Limited" },                               /* From Ref. 2 */ 
291         {  0xb4000023, "ATL Telecom Limited" },                             /* From Ref. 2 */ 
292         {  0xb400002a, "Network Alchemy Limited" },                         /* From Ref. 2 */ 
293         {  0xb4000042, "Motion Media Technology" },                         /* From Ref. 2 */ 
294         {  0xb4000044, "Data Connection" },                                 /* From Ref. 2 */ 
295         {  0xb4000045, "Westbay Engineers" },                               /* From Ref. 2 */ 
296         {  0xb4000049, "ImageCom" },                                        /* From Ref. 2 */ 
297         {  0xb400004d, "Madge Networks" },                                  /* From Ref. 2 */ 
298         {  0xb4000052, "Ridgeway Systems and Software" },                   /* From Ref. 2 */ 
299         {  0xb4000053, "SpliceCom" },                                       /* From Ref. 2 */ 
300         {  0xb4000054, "TeleWare" },                                        /* From Ref. 2 */ 
301         {  0xb4000056, "Vegastream" },                                      /* From Ref. 2 */ 
302         {  0xb4000066, "Westell" },                                         /* From Ref. 2 */ 
303         {  0xb4000069, "ISDN Communications" },                             /* From Ref. 2 */ 
304         {  0xb40000c0, "Codian" },                                          /* From Ref. 2 */ 
305
306         {  0xb5000000, "Compression Labs" },                                /* From Ref. 1 */
307         {  0xb5000001, "PictureTel" },                                      /* From Ref. 1 */
308         {  0xb5000002, "Compression Labs" },                                /* From Ref. 1 */
309         {  0xb5000003, "VTEL" },                                            /* From Ref. 1 */
310         {  0xb5000005, "ERIS" },                                            /* From Ref. 1 */
311         {  0xb5000007, "AT&T Worldworx" },                                  /* From Ref. 1 */
312         {  0xb5000009, "VideoServer" },                                     /* From Ref. 1 */
313         {  0xb500000b, "3Com Corporation" },                                /* From Ref. 1 */
314         {  0xb500000c, "Clarent Corporation" },                             /* From Ref. 1 */
315         {  0xb500000d, "Genesys Telecommunications Labs Inc" },             /* From Ref. 1 */
316         {  0xb500000e, "C-Phone Corporation." },                            /* From Ref. 1 */
317         {  0xb500000f, "Science Dynamics Corporation" },                    /* From Ref. 1 */
318         {  0xb5000010, "AT&T Starpoint" },                                  /* From Ref. 1 */
319         {  0xb5000011, "Netscape Conference" },                             /* From Ref. 1 */
320         {  0xb5000012, "Cisco" },                                           /* From Ref. 1 */
321         {  0xb5000013, "Cirilium, Inc." },                                  /* From Ref. 1 */
322         {  0xb5000014, "Ascend Communications, Inc." },                     /* From Ref. 1 */
323         {  0xb5000015, "RADVision, Inc." },                                 /* From Ref. 1 */
324         {  0xb5000016, "Objective Communications" },                        /* From Ref. 1 */
325         {  0xb5000017, "VocalTec Communications, Inc." },                   /* From Ref. 1 */
326         {  0xb5000018, "Serome Technology, Inc." },                         /* From Ref. 1 */
327         {  0xb5000019, "Aspect Communications" },                           /* From Ref. 1 */
328         {  0xb500001a, "Cintech Tele-Management" },                         /* From Ref. 1 */
329         {  0xb500001b, "Philips Video Conferencing Systems" },              /* From Ref. 1 */
330         {  0xb500001c, "Vertical Networks, Inc." },                         /* From Ref. 1 */
331         {  0xb500001d, "Syndeo Corp." },                                    /* From Ref. 1 */
332         {  0xb500001e, "Telxon Corporation" },                              /* From Ref. 1 */
333         {  0xb500001f, "Network Equipment Technologies" },                  /* From Ref. 1 */
334         {  0xb5000020, "Pagoo, Inc." },                                     /* From Ref. 1 */
335         {  0xb5000021, "General Dynamics" },                                /* From Ref. 1 */
336         {  0xb5000022, "Vanguard Managed Solutions" },                      /* From Ref. 1 */
337         {  0xb5000023, "TeleStream Technologies, Inc." },                   /* From Ref. 1 */
338         {  0xb5000024, "Spirent Communications" },                          /* From Ref. 1 */
339         {  0xb5000025, "CrystalVoice Communications" },                     /* From Ref. 1 */
340         {  0xb5000026, "Xiph.org" },                                        /* From Ref. 1 */
341         {  0xb5000027, "NACT Telecommunications" },                         /* From Ref. 1 */
342         {  0xb5000028, "AudioCodes, Inc." },                                /* From Ref. 1 */
343         {  0xb5000120, "AT&T - GBCS" },                                     /* From Ref. 1 */
344         {  0xb5000168, "Leadtek Research Inc." },                           /* From Ref. 1 */
345         {  0xb5000247, "Lucent Technologies" },                             /* From Ref. 1 */
346         {  0xb500029a, "Symbol Technologies Inc." },                        /* From Ref. 1 */
347         {  0xb5000378, "StarVox, Inc." },                                   /* From Ref. 1 */
348         {  0xb50003f7, "Inari Inc." },                                      /* From Ref. 1 */
349         {  0xb5000727, "Quintum Technologies, Inc." },                      /* From Ref. 1 */
350         {  0xb5000918, "Netrix Corporation" },                              /* From Ref. 1 */
351         {  0xb500101e, "SysMaster Corporation" },                           /* From Ref. 1 */
352         {  0xb5001a1a, "Alpha Telecom, Inc. U.S.A." },                      /* From Ref. 1 */
353         {  0xb5002331, "ViaVideo" },                                        /* From Ref. 1 */
354         {  0xb500301c, "Congruency, Inc." },                                /* From Ref. 1 */
355         {  0xb5003039, "MiBridge Inc." },                                   /* From Ref. 1 */
356         {  0xb5003838, "8x8 Inc." },                                        /* From Ref. 1 */
357         {  0xb5004147, "Agere Systems" },                                   /* From Ref. 1 */
358         {  0xb5004153, "Artisoft Inc." },                                   /* From Ref. 1 */
359         {  0xb5004156, "Avaya" },                                           /* From Ref. 1 */
360         {  0xb5004242, "IBM." },                                            /* From Ref. 1 */
361         {  0xb5004257, "StreamComm" },                                      /* From Ref. 1 */
362
363         {  0xb5004c54, "Lucent Technologies" },                             /* From Ref. 1 */
364         {  0xb5004d47, "MediaGate" },                                       /* From Ref. 1 */
365         {  0xb5004e54, "Nortel Networks" },                                 /* From Ref. 1 */
366
367         {  0xb5005243, "Siemens Business Communication Systems" },          /* From Ref. 1 */
368         {  0xb500534c, "Microsoft" },                                       /* From Ref. 1 */
369
370         {  0xb500600d, "Lucent Technologies" },                             /* From Ref. 1 */
371
372         {  0xb5008080, "Intel" },                                           /* From Ref. 1 */
373         {  0xa5000001, "Ericsson" },                                        /* From captures */
374         {  0, NULL }
375 };
376 /* Ref 1 http://www.delta-info.com/Protocol_Test/Manufacturer_codes.html        */
377 /* Ref 2 http://www.cix.co.uk/~bpechey/H221/h221code.htm                        */
378 /* Ref 3 http://www.regtp.de/reg_tele/start/in_05-06-03-11-00_m/index.html      */
379