Jinan’s Function Library: NetworkingFiled Under: Programming
This is my first attempt at a custom function library. I find myself using some of the same functions through out my apps that I just decided to put it in just one small package.
Here is the networking side of it:
IsIP(IPAddress as String)
IPAddress: A String with an IP address in it.
Returns: True or False
IsSubnet(SubnetMask as String)
SubnetMask: Takes a string with a valid SubnetMask or CIDR Notation.
Returns: True or False
CIDRtoSubnet(CIDRNotation as String)
CIDRNotation: A string with a valid CIDR notation.
Returns: Returns a SubnetMask, or false if invalid.
GetIPRanges(NetworkAddress as String)
NetworkAddress: Takes a string with a valid IP address and SubnetMask.
Returns: An array with the beginning and ending IP address range. Returns false if its invalid.
IsInIPRange(IPAddress as String, SubnetMask as String, IPtoCheck as String)
IPAddress: String with a valid IP address.
SubnetMask: String with a valid IP address.
IPtoCheck: String of the IP address to check.
Returns: True or False
IPIncrement(IPAddress as String, Increment as Double, Optional SubnetMask as String)
IPAddress: A String with a valid IP address.
Increment: A positive numeric value to increase the IP address.
SubnetMask (optional): To check if the incremented IP address is in a valid network range.
Returns: Returns a valid IP address. (Returns False if SubnetMask is used and the IP address is out of range.)
Tags: Functions, Jinan, Library, Networking, VB.NET
- Read More
- Jinan
- 8 Feb 2009 8:16 PM
- Comments (0)