-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.c
152 lines (139 loc) · 6.85 KB
/
db.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* $Id: db.c,v 1.2 2003/02/22 23:17:09 d3august Exp $
*/
/* xtraceroute - graphically show traceroute information.
* Copyright (C) 1996-1998 Björn Augustsson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Database of locations/names for xtraceroute. */
/* Format is:
{ lat, lon, ip, name, info }
Positive Latitudes are on the northern hemisphere.
Positive Longitudes are on the eastern hemisphere.
*/
#include "xt.h"
#include <stdlib.h>
dbentry int_dbentries[] =
{
{ 59.33, 18.08, {}, "nordu.net", "Stockholm, Sweden" },
{ 57.5, 12.0, {}, "gbg.sunet.se","G|teborg, Sweden" },
{ 57.5, 12.0, {}, "chalmers.se", "G|teborg, Sweden" },
{ 60.5, 24.5, {}, "funet.fi", "Finland" },
{ 38.53, -77.02, {}, "-dc-", "Washington, DC, US" },
{ 39.55, -75.07, {}, "-pen-", "Pennsauken, NJ, US" },
{ 51.5, 0.0, {}, "-uk-", "London, UK" },
{ 37.52, -122.16, {}, "berkeley", "Berkeley, CA, US" },
{ 37.26, -122.08, {}, "paloalto", "Palo Alto, CA, US" },
{ 42.21, -71.06, {}, "cambridge", "Cambridge, MA, US" },
{ 42.21, -71.06, {}, "mit.edu", "Cambridge, MA, US" },
{ 40.42, -74.00, {}, "newyork", "New York, NY, US" },
{ 40.42, -74.00, {}, ".ny.", "New York, NY, US" },
{ 40.42, -74.00, {}, ".nyc.", "New York, NY, US" },
{ 40.26, -79.59, {}, "cmu.edu", "Pittsburgh, PA, US" },
{ -33.93, 18.47, {}, "iafrica.net", "South Africa" },
{ 52.35, 4.90, {}, "Amsterdam", "Amsterdam, Holland" },
{ 48.58, 7.75, {}, "strasbourg", "Strasbourg, France" },
{ 48.58, 7.75, {}, "u-strasbg.fr","Strasbourg University, France"},
{ 47.9, -1.36, {}, "nantes", "Nantes,France" },
{ 44.49, -0.42, {}, "bordeaux", "Bordeaux,France" },
{ 43.26, 5.12, {}, "marseille", "Marseille,France" },
{ 45.39, 4.54, {}, "lyon", "Lyon,France" },
{ 43.32, 1.21, {}, "toulouse", "Toulouse,France" },
{ 42.37, -71.68, {}, "ri.cox.net", "Providence, RI, US" },
/* Here starts data (72 locations) taken from Xearth: */
{ 61.17, -150.00, {}, "Anchorage", "Alaska, USA" },
{ 38.00, 23.73, {}, "Athens", "Greece" },
{ 33.40, 44.40, {}, "Baghdad", "Iraq" },
{ 13.73, 100.50,{}, "Bangkok", "Thailand" },
{ 39.92, 116.43, {}, "Beijing", "China" },
{ 52.53, 13.42, {}, "Berlin", "Germany" },
{ 32.30, -64.70,{}, "Bermuda", "Bermuda" },
{ 42.33, -71.08, {}, "Boston", "Massachusetts, USA" },
{ -15.80, -47.90, {}, "Brasilia", "Brazil" },
{ -4.20, 15.30,{}, "Brazzaville", "Congo" },
{ -34.67, -58.50, {}, "Buenos", "Aires" },
{ 31.05, 31.25, {}, "Cairo", "Egypt" },
{ 22.50, 88.30, {}, "Calcutta", "India" },
{ -33.93, 18.47, {}, "CapeTown", "South Africa" },
{ 33.60, -7.60, {}, "Casablanca", "Morocco" },
{ 41.83, -87.75, {}, "Chicago", "Illinois, USA" },
{ 32.78, -96.80, {}, "Dallas", "Texas, USA" },
{ 28.63, 77.20, {}, "NewDelhi", "India" },
{ 39.75, -105.00, {}, "Denver", "Colorado, USA" },
{ 24.23, 55.28, {}, "Dubai", "UAE" },
{ -27.10, -109.40,{}, "EasterIsland", "Easter Island" },
{ -18.00, 178.10, {}, "Fiji", "Fiji" },
{ 13.50, 144.80, {}, "Guam", "Guam" },
{ 60.13, 25.00, {}, "Helsinki", "Finland" },
{ 22.20, 114.10, {}, "HongKong", "Hong Kong" },
{ 21.32, -157.83,{}, "Honolulu", "Hawaii, USA" },
{ 52.20, 104.30, {}, "Irkutsk", "Irkutsk, Russia" },
{ 41.00, 29.00, {}, "Istanbul", "Turkey" },
{ -6.13, 106.75, {}, "Jakarta", "Indonesia" },
{ 31.80, 35.20, {}, "Jerusalem", "Israel" },
{ 34.50, 69.20,{}, "Kabul", "Afghanistan" },
{ 27.70, 85.30,{}, "Kathmandu", "Nepal" },
{ 50.40, 30.50,{}, "Kiev", "Ukraine" },
{ 3.13, 101.70, {}, "Kuala Lumpur", "Malaysia" },
{ 6.45, 3.47, {}, "Lagos", "Nigeria" },
{ -12.10, -77.05,{}, "Lima", "Peru" },
{ 51.50, -0.17, {}, "London", "UK" },
{ 40.42, -3.72, {}, "Madrid", "Spain" },
{ 14.60, 121.00, {}, "Manila", "The Phillipines" },
{ 21.50, 39.80, {}, "Mecca", "Saudi Arabia" },
{ 19.40, -99.10,{}, "Mexico City", "Mexico" },
{ 25.80, -80.20, {}, "Miami", "Florida, USA" },
{ 6.20, -10.80, {}, "Monrovia", "Liberia" },
{ 45.50, -73.50, {}, "Montreal", "Quebec, Canada" },
{ 55.75, 37.70, {}, "Moscow", "Russia" },
{ -1.28, 36.83, {}, "Nairobi", "Kenya" },
{ 59.93, 10.75, {}, "Oslo", "Norway" },
{ 48.87, 2.33, {}, "Paris", "France" },
{ -32.00, 115.90,{}, "Perth", "Australia" },
{ 45.50, -122.50,{}, "Portland", "Oregon, USA" },
{ -0.20, -78.50, {}, "Quito", "Ecuador" },
{ 64.15, -21.97, {}, "Reykjavik", "Iceland" },
{ 41.88, 12.50,{}, "Rome", "Italy" },
{ 37.75, -122.45, {}, "San Francisco", "Califonia, USA" },
{ 9.98, -84.07, {}, "San Jose", "Costa Rica" },
{ 18.50, -66.10, {}, "San Juan", "Puerto Rico" },
{ -33.50, -70.70, {}, "Santiago", "Chile" },
{ 1.20, 103.90, {}, "Singapore", "Singapore" },
{ 42.67, 23.30, {}, "Sofia", "Bulgaria" },
{ 59.33, 18.08, {}, "Stockholm", "Sweden" },
{ -33.92, 151.17, {}, "Sydney", "Australia" },
{ -17.60, -149.50,{}, "Tahiti", "Tahiti" },
{ 16.80, -3.00, {}, "Timbuktu", "Mali" },
{ 35.67, 139.75, {}, "Tokyo", "Japan" },
{ 43.70, -79.42,{}, "Toronto", "Ontario, Canada" },
{ 32.90, 13.20, {}, "Tripoli", "Libya" },
{ 47.90, 106.90, {}, "Ulan", "Bator" },
{ 49.22, -123.10, {}, "Vancouver", "B.C., Canada" },
{ 48.22, 16.37, {}, "Wien", "Austria" },
{ 38.90, -77.00, {}, "Washington", "USA" },
{ -41.28, 174.78, {}, "Wellington", "New Zealand" },
{ 62.50, -114.30, {}, "Yellowknife", "N.T., Canada" },
/* Other fun ones */
{ -78, 165, {}, "McMurdo", "Antarctica" },
};
database *init_internal_db(void)
{
database *tmp;
tmp = (database *)malloc(sizeof(database));
tmp->entries = int_dbentries;
tmp->n_entries = sizeof(int_dbentries) / sizeof(dbentry);
DPRINTF(_("Built-in database: %d\n"), tmp->n_entries);
return tmp;
}