Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SystemIPv6InterfaceProperties.cs
Go to the documentation of this file.
2
4{
5 private readonly uint _index;
6
7 private readonly uint _mtu;
8
9 private readonly uint[] _zoneIndices;
10
11 public override int Index => (int)_index;
12
13 public override int Mtu => (int)_mtu;
14
15 internal SystemIPv6InterfaceProperties(uint index, uint mtu, uint[] zoneIndices)
16 {
17 _index = index;
18 _mtu = mtu;
19 _zoneIndices = zoneIndices;
20 }
21
22 public override long GetScopeId(ScopeLevel scopeLevel)
23 {
24 if (scopeLevel < ScopeLevel.None || (int)scopeLevel >= _zoneIndices.Length)
25 {
26 throw new ArgumentOutOfRangeException("scopeLevel");
27 }
28 return _zoneIndices[(int)scopeLevel];
29 }
30}