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
Показать файл Открыть проект

Открытые методы

Метод Описание
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