scripts
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace System.Net.NetworkInformation
|
||||
{
|
||||
// Token: 0x02000176 RID: 374
|
||||
internal sealed class LinuxIPv4InterfaceProperties : UnixIPv4InterfaceProperties
|
||||
{
|
||||
// Token: 0x06000CB2 RID: 3250 RVA: 0x00025E1C File Offset: 0x0002401C
|
||||
public LinuxIPv4InterfaceProperties(LinuxNetworkInterface iface)
|
||||
: base(iface)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000381 RID: 897
|
||||
// (get) Token: 0x06000CB3 RID: 3251 RVA: 0x00025E28 File Offset: 0x00024028
|
||||
public override bool IsForwardingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
string text = "/proc/sys/net/ipv4/conf/" + this.iface.Name + "/forwarding";
|
||||
if (File.Exists(text))
|
||||
{
|
||||
string text2 = NetworkInterface.ReadLine(text);
|
||||
return text2 != "0";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000382 RID: 898
|
||||
// (get) Token: 0x06000CB4 RID: 3252 RVA: 0x00025E70 File Offset: 0x00024070
|
||||
public override int Mtu
|
||||
{
|
||||
get
|
||||
{
|
||||
string text = (this.iface as LinuxNetworkInterface).IfacePath + "mtu";
|
||||
int num = 0;
|
||||
if (File.Exists(text))
|
||||
{
|
||||
string text2 = NetworkInterface.ReadLine(text);
|
||||
try
|
||||
{
|
||||
num = int.Parse(text2);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user