On Friday 24 March 2006 21:13, Adam Tauno Williams wrote:
Can't this information be acquired just by reading some file in /proc?
I had a quick look but I couldn't see anything and I'm not sure where you
would find out. Maybe this is something missing from the /proc filesystem -
maybe it's
You can get the address using the SIOCGIFADDR ioctl. You'd probably have to
do this in C. Your best bet might be to parse the output from ifconfig.
-- Colin
On Thursday 23 March 2006 17:06, Stephan Eberle wrote:
Hi El,
That's a good start. Do you know of any possibility to point out the
On Fri, 2006-03-24 at 12:08 +, Colin JN Breame wrote:
You can get the address using the SIOCGIFADDR ioctl. You'd probably have to
do this in C. Your best bet might be to parse the output from ifconfig.
Can't this information be acquired just by reading some file in /proc?
signature.asc
Hi!
How can I enumerate my machines IP addresses with mono on a linux box?
Any info desperately needed! :)
Thank's in advance,
Stevie
___
Mono-list maillist - Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
Hi there,
Add a reference to System.Net to the top of your code file (using System.Net;
), and then try this:
foreach(IPAddress address in
Dns.GetHostByName(Environment.MachineName).AddressList) {
Console.WriteLine(address.ToString());
}
That simply prints out each IP address for your local
Hi El,
That's a good start. Do you know of any possibility to point out the device
(eth0, eth1, wlan0, ...) behind each address?
Thank's,
Stevie
On Thursday 23 March 2006 18:03, Elliott Draper wrote:
Hi there,
Add a reference to System.Net to the top of your code file (using
System.Net; ),
One ugly hack is to use Process.Start, use ifconfig as the process;
On 3/23/06, Elliott Draper [EMAIL PROTECTED] wrote:
Hmm, I can't think of an easy way to retrieve that information from within
the .Net/Mono class library, anyone else have any ideas or come across this
before?
Cheers,
-=