Skip to Content
[CAIDA - Center for Applied Internet Data Analysis logo]
The Center for Applied Internet Data Analysis
corsaro_geodb.h
1 /*
2  * corsaro
3  *
4  * Alistair King, CAIDA, UC San Diego
5  * corsaro-info@caida.org
6  *
7  * Copyright (C) 2012 The Regents of the University of California.
8  *
9  * This file is part of corsaro.
10  *
11  * corsaro is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * corsaro 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 corsaro. If not, see <http://www.gnu.org/licenses/>.
23  *
24  */
25 
26 
27 #ifndef __CORSARO_GEODB_H
28 #define __CORSARO_GEODB_H
29 
30 #include "corsaro_plugin.h"
31 
32 CORSARO_PLUGIN_GENERATE_PROTOS(corsaro_geodb)
33 
34 #ifdef WITH_PLUGIN_SIXT
35 CORSARO_PLUGIN_GENERATE_FT_PROTO(corsaro_geodb)
36 #endif
37 
40 {
44  uint32_t id;
45 
49  uint16_t country_code;
50 
52  char region[3];
53 
55  char *city;
56 
61  char *post_code;
62 
64  double latitude;
65 
67  double longitude;
68 
70  uint32_t metro_code;
71 
73  uint32_t area_code;
74 };
75 
76 #endif /* __CORSARO_GEODB_H */
Header file dealing with the corsaro plugin manager.
char * post_code
String which contains the postal code Note, this cannot be an int as some countries (I'm looking at y...
Definition: corsaro_geodb.h:61
double longitude
Longitude of the city.
Definition: corsaro_geodb.h:67
uint16_t country_code
16bit value which represents the ISO2 country code treat each byte as a character to convert to ASCII...
Definition: corsaro_geodb.h:49
char region[3]
2 character string which represents the region the city is in
Definition: corsaro_geodb.h:52
Structure which contains a Maxmind GeoLite City record.
Definition: corsaro_geodb.h:39
uint32_t area_code
Area code.
Definition: corsaro_geodb.h:73
uint32_t metro_code
Metro code.
Definition: corsaro_geodb.h:70
uint32_t id
A unique ID for this record (used to join the Blocks and Locations Files)
Definition: corsaro_geodb.h:44
char * city
String which contains the city name.
Definition: corsaro_geodb.h:55
#define CORSARO_PLUGIN_GENERATE_PROTOS(plugin)
Convenience macro that defines all the function prototypes for the corsaro plugin API...
double latitude
Latitude of the city.
Definition: corsaro_geodb.h:64