FreeBSD Bugzilla – Attachment 149739 Details for
Bug 194660
lang/mono Add mono/metadata/mono-route.c for non-Linux ParseRouteInfo_local
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test.cs: Test C# program to print list of network interfaces and associated gateways to console
test.cs (text/plain), 827 bytes, created by
Ben Woods
on 2014-11-23 02:33:59 UTC
(
hide
)
Description:
test.cs: Test C# program to print list of network interfaces and associated gateways to console
Filename:
MIME Type:
Creator:
Ben Woods
Created:
2014-11-23 02:33:59 UTC
Size:
827 bytes
patch
obsolete
>using System; >using System.Net; >using System.Net.NetworkInformation; > >public class Test >{ > public static void Main() > { > DisplayGatewayAddresses(); > } > > public static void DisplayGatewayAddresses() > { > Console.WriteLine("Gateways"); > NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); > foreach (NetworkInterface adapter in adapters) > { > IPInterfaceProperties adapterProperties = adapter.GetIPProperties(); > GatewayIPAddressInformationCollection addresses = adapterProperties.GatewayAddresses; > Console.WriteLine(adapter.Description); > if (addresses.Count >0) > { > foreach (GatewayIPAddressInformation address in addresses) > { > Console.WriteLine(" Gateway Address ......................... : {0}", > address.Address.ToString()); > } > Console.WriteLine(); > } > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 194660
:
148734
|
149029
|
149451
|
149452
| 149739 |
150260