This repository has been archived by the owner on Jul 4, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throws an exception if the dbfile is not found.
- LookupService throws an exception if the database file is not found. ( Guenter Knauf ) - Cleanup the example files ( Guenter Knauf ) - Add new example infoExample.cs ( Guenter Knauf )
- Loading branch information
Showing
12 changed files
with
54 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//an example of how to lookup the database info | ||
using System; | ||
using System.IO; | ||
class Appa0{ | ||
public static void Main(String[] args){ | ||
string GeoipDbPath = "/usr/local/share/GeoIP/"; | ||
string GeoipDb = GeoipDbPath + "GeoIPCity.dat"; | ||
if (args.Length > 0) { | ||
GeoipDb = args[0]; | ||
} | ||
//open the database | ||
LookupService ls = new LookupService(GeoipDb, LookupService.GEOIP_STANDARD); | ||
//get the database info | ||
DatabaseInfo dbinfo = ls.getDatabaseInfo(); | ||
Console.Write(" dbinfo string: " + dbinfo.toString() + "\n"); | ||
Console.Write(" dbinfo type: " + dbinfo.getType() + "\n"); | ||
Console.Write(" dbinfo date: " + dbinfo.getDate() + "\n"); | ||
} | ||
} |