Skip to content

Commit

Permalink
Add Known Multicast IPv6 Addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-dmxc committed Jul 5, 2024
1 parent c8609e7 commit 7a7a832
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WellKnownDataTypes/Network/IPv6Address.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace org.dmxc.wkdt.Network
{
public static IPv6Address Empty { get => new IPv6Address("::"); }
public static IPv6Address LocalHost { get => new IPv6Address("::1"); }
public static IPv6Address LinkLocalMulticast { get => new IPv6Address("ff02::1"); }
public static IPv6Address SiteLocalMulticast { get => new IPv6Address("ff05::1"); }
public static IPv6Address GlobalMulticast { get => new IPv6Address("ff0e::1"); }

private static readonly Regex regex = new Regex(@"(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$");

Expand Down

0 comments on commit 7a7a832

Please sign in to comment.