shared: add independent IPv4 and IPv6 collection [CI]
This commit is contained in:
1 parent
c974a7dddb
commit
0eda0600cc
60 files changed
+699
-137
No files matched your search
@@ -0,0 +1,13 @@
|
||||
namespace MoShiro.Protocol;
|
||||
|
||||
/// <summary>测量路径的地址族。旧契约缺省为 IPv4;IPv6 使用独立的线路和序列。</summary>
|
||||
public static class IpVersions
|
||||
{
|
||||
public const string V4 = "ipv4";
|
||||
public const string V6 = "ipv6";
|
||||
|
||||
public static bool IsValid(string? value) => value is V4 or V6;
|
||||
|
||||
public static string LineSeries(string probeId, string ipVersion) =>
|
||||
RawChunkHeader.LinePrefix + probeId + (ipVersion == V6 ? ":ipv6" : "");
|
||||
}
|
||||
Reference in new issue
Block a user