2015-10-23 22:36:42 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace WinUI
|
|
|
|
|
{
|
|
|
|
|
public class ZeroTierPeer
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty("address")]
|
|
|
|
|
public string Address { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("lastUnicastFrame")]
|
2015-10-27 02:01:59 +00:00
|
|
|
|
public UInt64 LastUnicastFrame { get; set; }
|
2015-10-23 22:36:42 +00:00
|
|
|
|
|
|
|
|
|
[JsonProperty("lastMulticastFrame")]
|
2015-10-27 02:01:59 +00:00
|
|
|
|
public UInt64 LastMulticastFrame { get; set; }
|
2015-10-23 22:36:42 +00:00
|
|
|
|
|
|
|
|
|
[JsonProperty("versionMajor")]
|
|
|
|
|
public int VersionMajor { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("versionMinor")]
|
|
|
|
|
public int VersionMinor { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("versionRev")]
|
|
|
|
|
public int Versionrev { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("version")]
|
|
|
|
|
public string Version { get; set; }
|
|
|
|
|
|
2015-10-27 02:21:21 +00:00
|
|
|
|
public string VersionString
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (Version == "-1.-1.-1")
|
|
|
|
|
return "-";
|
|
|
|
|
else
|
|
|
|
|
return Version;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-10-23 22:36:42 +00:00
|
|
|
|
[JsonProperty("latency")]
|
|
|
|
|
public string Latency { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("role")]
|
|
|
|
|
public string Role { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("paths")]
|
|
|
|
|
public List<ZeroTierPeerPhysicalPath> Paths { get; set; }
|
2015-10-27 02:21:21 +00:00
|
|
|
|
|
|
|
|
|
public string DataPaths
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
string pathStr = "";
|
|
|
|
|
foreach(ZeroTierPeerPhysicalPath path in Paths)
|
|
|
|
|
{
|
|
|
|
|
pathStr += path.Address + "\n";
|
|
|
|
|
}
|
|
|
|
|
return pathStr;
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-10-23 22:36:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|