C# 클래스 fCraft.IPAddressUtil

Provides utility methods for working with IP addresses and ranges.
파일 보기 프로젝트 열기: fragmer/fCraft 1 사용 예제들

공개 메소드들

메소드 설명
AsInt ( [ thisAddr ) : int

Represents an IPv4 address as a signed integer.

AsUInt ( [ thisAddr ) : uint

Represents an IPv4 address as an unsigned integer.

IsIP ( [ ipString ) : bool

Checks to see if the specified string is a valid IPv4 address.

IsLocal ( [ addr ) : bool

Checks whether an IP address may belong to LAN or localhost (192.168.0.0/16, 10.0.0.0/24, or 127.0.0.0/24).

Match ( [ thisAddr, uint otherAddr, uint mask ) : bool
NetMask ( byte range ) : uint

Creates an IPv4 mask for the given CIDR range.

비공개 메소드들

메소드 설명
RangeMax ( [ thisAddr, byte range ) : IPAddress
RangeMin ( [ thisAddr, byte range ) : IPAddress

메소드 상세

AsInt() 공개 정적인 메소드

Represents an IPv4 address as a signed integer.
thisAddr is null.
public static AsInt ( [ thisAddr ) : int
thisAddr [
리턴 int

AsUInt() 공개 정적인 메소드

Represents an IPv4 address as an unsigned integer.
thisAddr is null.
public static AsUInt ( [ thisAddr ) : uint
thisAddr [
리턴 uint

IsIP() 공개 정적인 메소드

Checks to see if the specified string is a valid IPv4 address.
public static IsIP ( [ ipString ) : bool
ipString [ String representation of the IPv4 address.
리턴 bool

IsLocal() 공개 정적인 메소드

Checks whether an IP address may belong to LAN or localhost (192.168.0.0/16, 10.0.0.0/24, or 127.0.0.0/24).
addr is null.
public static IsLocal ( [ addr ) : bool
addr [ IPv4 address to check.
리턴 bool

Match() 공개 정적인 메소드

public static Match ( [ thisAddr, uint otherAddr, uint mask ) : bool
thisAddr [
otherAddr uint
mask uint
리턴 bool

NetMask() 공개 정적인 메소드

Creates an IPv4 mask for the given CIDR range.
range is over 32
public static NetMask ( byte range ) : uint
range byte
리턴 uint