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.
Added support for GeoIP Netspeed lookups
- Loading branch information
Thomas J Mather
committed
Jan 19, 2006
1 parent
5747e00
commit 93bab71
Showing
4 changed files
with
58 additions
and
3 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
using System; | |||
using System.IO; | |||
class Appa0{ | |||
public static void Main(String[] args){ | |||
LookupService ls = new LookupService("/usr/local/share/GeoIP/GeoIPNetSpeed.dat", LookupService.GEOIP_STANDARD); | |||
int id = ls.getID(args[0]); | |||
int speed = id; | |||
if (speed == LookupService.GEOIP_UNKNOWN_SPEED){ | |||
Console.Write("Unknown \n"); | |||
} else if (speed == LookupService.GEOIP_DIALUP_SPEED){ | |||
Console.Write("Dialup \n"); | |||
} else if (speed == LookupService.GEOIP_CABLEDSL_SPEED){ | |||
Console.Write("Cable/DSL \n"); | |||
} else if (speed == LookupService.GEOIP_CORPORATE_SPEED){ | |||
Console.Write("Corporate \n"); | |||
} | |||
} | |||
} |