C# 클래스 DNSManagement.Extensions.IPHelper

IP Parsing helper

Converts from uint32 to string and back

http://stackoverflow.com/questions/461742/how-to-convert-an-ipv4-address-into-a-integer-in-c
파일 보기 프로젝트 열기: drorgl/MSDNSWebAdmin

공개 메소드들

메소드 설명
FixHostnames ( string hostname ) : string

Fixes hostnames to have a dot in the end, most dns records has that standard.

GetProtoByName ( string name ) : int

Gets protocol number by name (tcp/udp/icmp etc')

GetServByName ( string name, string protocol ) : int

Gets service port number by name/protocol

http://stackoverflow.com/questions/3457977/convert-service-name-to-port

ParseIP ( string ipaddr ) : IPAddress

ParseIP or return IPAddress without exceptions

ToString ( UInt32 address ) : string

Converts bytes (uint) to ip dot notation

ToUint32 ( string address ) : UInt32

Parses a string and returns uint

비공개 메소드들

메소드 설명
CreateWSAException ( ) : Win32Exception

메소드 상세

FixHostnames() 공개 정적인 메소드

Fixes hostnames to have a dot in the end, most dns records has that standard.
public static FixHostnames ( string hostname ) : string
hostname string
리턴 string

GetProtoByName() 공개 정적인 메소드

Gets protocol number by name (tcp/udp/icmp etc')
public static GetProtoByName ( string name ) : int
name string protocol name
리턴 int

GetServByName() 공개 정적인 메소드

Gets service port number by name/protocol
http://stackoverflow.com/questions/3457977/convert-service-name-to-port
public static GetServByName ( string name, string protocol ) : int
name string name of service
protocol string protocol the service is using
리턴 int

ParseIP() 공개 정적인 메소드

ParseIP or return IPAddress without exceptions
public static ParseIP ( string ipaddr ) : IPAddress
ipaddr string
리턴 System.Net.IPAddress

ToString() 공개 정적인 메소드

Converts bytes (uint) to ip dot notation
public static ToString ( UInt32 address ) : string
address System.UInt32
리턴 string

ToUint32() 공개 정적인 메소드

Parses a string and returns uint
public static ToUint32 ( string address ) : UInt32
address string ipv4 address
리턴 System.UInt32