C# Class WebApplication4.Models.Utilitarios2

Afficher le fichier Open project: Rxcso/PrototipoSoftware

Méthodes publiques

Méthode 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

Méthode Description
GetIpNetTable ( IntPtr pIpNetTable, [ pdwSize, bool bOrder ) : int

Method Details

GetAllDevicesOnLAN() public static méthode

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
Résultat PhysicalAddress>.Dictionary

GetIPAddress() public static méthode

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

GetMacAddress() public static méthode

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

IsMulticast() public static méthode

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