mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
Yes, I do know of a possible refactor, but why not get this working? This will enable `System.Net.Sockets.Socket` to depend IPv4/IPv6 are working, and thus, fix a LOT of issues on CI; a bunch of test suites have one or two things that depend on loopback, which is currently busted unless you nop out Socket's protocol check.
Also made a note that the Mac version of the backend is actually likelier to work under other OSes. Structures are kinda ugly, but they work; it took a whole morning and night beating them into submission.
Untested under PASE, though I've marked notes for self to what's different. (My guess: it works, but not as well as it should - but good enough so that Socket starts working again.)
And hey, the Mac backend can't do this!
```
csharp> NetworkInterface.GetAllNetworkInterfaces().Select(x => $"The MTU of {x.Name} is {x.GetIPProperties().GetIPv4Properties().Mtu}");
{ "The MTU of en0 is 1500", "The MTU of lo0 is 16896" }
```
91 lines
2.4 KiB
C#
91 lines
2.4 KiB
C#
//
|
|
// System.Net.NetworkInformation.IPv4InterfaceStatistics
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
// Atsushi Enomoto ([email protected])
|
|
// Miguel de Icaza ([email protected])
|
|
//
|
|
// Copyright (c) 2006-2008 Novell, Inc. (http://www.novell.com)
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining
|
|
// a copy of this software and associated documentation files (the
|
|
// "Software"), to deal in the Software without restriction, including
|
|
// without limitation the rights to use, copy, modify, merge, publish,
|
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
|
// permit persons to whom the Software is furnished to do so, subject to
|
|
// the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be
|
|
// included in all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
//
|
|
namespace System.Net.NetworkInformation {
|
|
// dummy class
|
|
class AixIPv4InterfaceStatistics : IPv4InterfaceStatistics
|
|
{
|
|
//AixNetworkInterface aix;
|
|
|
|
public AixIPv4InterfaceStatistics (AixNetworkInterface parent)
|
|
{
|
|
//aix = parent;
|
|
}
|
|
|
|
public override long BytesReceived {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long BytesSent {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long IncomingPacketsDiscarded {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long IncomingPacketsWithErrors {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long IncomingUnknownProtocolPackets {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long NonUnicastPacketsReceived {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long NonUnicastPacketsSent {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long OutgoingPacketsDiscarded {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long OutgoingPacketsWithErrors {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long OutputQueueLength {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long UnicastPacketsReceived {
|
|
get { return 0; }
|
|
}
|
|
|
|
public override long UnicastPacketsSent {
|
|
get { return 0; }
|
|
}
|
|
}
|
|
}
|
|
|