Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Net.NetworkInformation;
- using System;
- public class NetworkInfo {
- public static void DisplayTypeAndAddress()
- {
- //IPGlobalProperties computerProperties = IPGlobalProperties.GetIPGlobalProperties();
- NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
- Debug.Log(nics.Length + " nics");
- //Debug.Log("Interface information for "+computerProperties.HostName+"."+computerProperties.DomainName);
- foreach (NetworkInterface adapter in nics)
- {
- IPInterfaceProperties properties = adapter.GetIPProperties();
- Debug.Log(adapter.Description);
- Debug.Log(String.Empty.PadLeft(adapter.Description.Length, '='));
- Debug.Log(" Interface type .......................... : " + adapter.NetworkInterfaceType);
- Debug.Log(" Physical Address ........................ : " + adapter.GetPhysicalAddress().ToString());
- Debug.Log(" Is receive only.......................... : " + adapter.IsReceiveOnly);
- Debug.Log(" Multicast................................ : " + adapter.SupportsMulticast);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment