private string ipToString(ulong ulngIP)
{
var strIp = "";
strIp = strIp + (strIp >> 24)+".";
strIp = strIp + ((strIp & 0x00FFFFFF) >> 16) + ".";
strIp = strIp + ((strIp & 0x0000FFFF) >> 8) + ".";
strIp = strIp + (strIp & 0x000000FF);
return strIp;
}
private ulong ipToULong(string strIP)
{
var ip = new ulong[4];
string[] s = strIP.Split('.');
ip[0] = ulong.Parse(s[0]);
ip[1] = ulong.Parse(s[1]);
ip[2] = ulong.Parse(s[2]);
ip[3] = ulong.Parse(s[3]);
return (ip[0] << 24) + (ip[1] << 16) + (ip[2] << 8) + ip[3];
}