#pragma warning disable CS1591 #pragma warning disable SA1600 using System; using System.Collections.Generic; using System.Net; using System.Net.NetworkInformation; namespace MediaBrowser.Common.Net { public interface INetworkManager { event EventHandler NetworkChanged; Func LocalSubnetsFn { get; set; } /// /// Gets a random port number that is currently available. /// /// System.Int32. int GetRandomUnusedTcpPort(); int GetRandomUnusedUdpPort(); /// /// Returns the MAC Address from first Network Card in Computer. /// /// The MAC Address. List GetMacAddresses(); /// /// Determines whether [is in private address space] [the specified endpoint]. /// /// The endpoint. /// true if [is in private address space] [the specified endpoint]; otherwise, false. bool IsInPrivateAddressSpace(string endpoint); /// /// Determines whether [is in local network] [the specified endpoint]. /// /// The endpoint. /// true if [is in local network] [the specified endpoint]; otherwise, false. bool IsInLocalNetwork(string endpoint); IPAddress[] GetLocalIpAddresses(bool ignoreVirtualInterface); bool IsAddressInSubnets(string addressString, string[] subnets); bool IsInSameSubnet(IPAddress address1, IPAddress address2, IPAddress subnetMask); IPAddress GetLocalIpSubnetMask(IPAddress address); } }