[Mono-dev] [PATCH] Simple implementation of network interface properties for Mac OS X

Alex Shulgin alexander.shulgin at yessoftware.com
Fri May 15 10:58:32 EDT 2009


Hi,

In the current version System.Net.NetworkInformation.NetworkInterface 
provides limited information about network interfaces on the system 
(their names only).

The attached patch adds support for NetworkInterfaceType and 
GetPhysicalAddress() on Mac OS.

The outline of the changes is as follows:

- Used the same trick with uname as in MWF XplatUI to detect if running 
Mac OS.

- In several places I've added base classes like UnixNetworkInterface to 
derive Linux- and MacOs- implementation classes from them.  Where 
possible, common code moved to Unix- classes; in some places dummy 
methods are used to return default "don't know" values (0, false, "").

- Added new file MacOsNetworkInterfaceMarshal to define MacOs-specific 
(BSD) structs like sockaddr as they're slightly different from those 
used in Linux.

Comments are welcome! :)

--
Cheers,
Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macos-network-interfaces-impl.patch
Type: text/x-patch
Size: 19288 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090515/0ddb354a/attachment.bin 


More information about the Mono-devel-list mailing list