Bark Beetle (Scolytinae) Gallery

2007-07-03: Mono/C#: Get all interface addresses

Due to some miss­ing parts of System.Net.NetworkInformation, I’ve writ­ten a (very basic and libc-based) wrap­per to col­lect net­work inter­face address inform­a­tion from the sys­tem. It calls getifaddrs, walks through the ifaddrs struc­ture and cre­ates a man­aged counterpart.

NetworkInterfaceAddress.cs

Even though it may be imple­men­ted way too com­plic­ated or con­fus­ing, it might be use­ful for someone out there.

Update 2009-01-01: Well… first, the down­load didn’t work any­more. Second, there was a bug in the code :) Both short­com­ings are fixed now :)

  • Identi.ca

Bookmarks

Meta