summaryrefslogtreecommitdiff
path: root/windows/WinUI/ZeroTierPeer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'windows/WinUI/ZeroTierPeer.cs')
-rw-r--r--windows/WinUI/ZeroTierPeer.cs66
1 files changed, 66 insertions, 0 deletions
diff --git a/windows/WinUI/ZeroTierPeer.cs b/windows/WinUI/ZeroTierPeer.cs
new file mode 100644
index 00000000..3153f7e2
--- /dev/null
+++ b/windows/WinUI/ZeroTierPeer.cs
@@ -0,0 +1,66 @@
+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")]
+ public UInt64 LastUnicastFrame { get; set; }
+
+ [JsonProperty("lastMulticastFrame")]
+ public UInt64 LastMulticastFrame { get; set; }
+
+ [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; }
+
+ public string VersionString
+ {
+ get
+ {
+ if (Version == "-1.-1.-1")
+ return "-";
+ else
+ return Version;
+ }
+ }
+
+ [JsonProperty("latency")]
+ public string Latency { get; set; }
+
+ [JsonProperty("role")]
+ public string Role { get; set; }
+
+ [JsonProperty("paths")]
+ public List<ZeroTierPeerPhysicalPath> Paths { get; set; }
+
+ public string DataPaths
+ {
+ get
+ {
+ string pathStr = "";
+ foreach(ZeroTierPeerPhysicalPath path in Paths)
+ {
+ pathStr += path.Address + "\n";
+ }
+ return pathStr;
+ }
+ }
+ }
+}