C# Class WebApplication4.Models.Utilitarios2

ファイルを表示 Open project: Rxcso/PrototipoSoftware

Public Methods

Method Description
GetAllDevicesOnLAN ( ) : PhysicalAddress>.Dictionary

Get the IP and MAC addresses of all known devices on the LAN

1) This table is not updated often - it can take some human-scale time to notice that a device has dropped off the network, or a new device has connected. 2) This discards non-local devices if they are found - these are multicast and can be discarded by IP address range.

GetIPAddress ( ) : IPAddress

Gets the IP address of the current PC

GetMacAddress ( ) : System.Net.NetworkInformation.PhysicalAddress

Gets the MAC address of the current PC.

IsMulticast ( IPAddress ip ) : bool

Returns true if the specified IP address is a multicast address

Private Methods

Method Description
GetIpNetTable ( IntPtr pIpNetTable, [ pdwSize, bool bOrder ) : int

Method Details

GetAllDevicesOnLAN() public static method

Get the IP and MAC addresses of all known devices on the LAN
1) This table is not updated often - it can take some human-scale time to notice that a device has dropped off the network, or a new device has connected. 2) This discards non-local devices if they are found - these are multicast and can be discarded by IP address range.
public static GetAllDevicesOnLAN ( ) : PhysicalAddress>.Dictionary
return PhysicalAddress>.Dictionary

GetIPAddress() public static method

Gets the IP address of the current PC
public static GetIPAddress ( ) : IPAddress
return System.Net.IPAddress

GetMacAddress() public static method

Gets the MAC address of the current PC.
public static GetMacAddress ( ) : System.Net.NetworkInformation.PhysicalAddress
return System.Net.NetworkInformation.PhysicalAddress

IsMulticast() public static method

Returns true if the specified IP address is a multicast address
public static IsMulticast ( IPAddress ip ) : bool
ip System.Net.IPAddress
return bool