From: Reid Thompson Date: 2007-06-14T08:30:28+09:00 Subject: Re: How can I get the local machine's netmask programmatically? On Thu, 2007-06-14 at 07:45 +0900, wolfram wrote: > > what operating system? windows/linux(distribution?)/osx? > > how many network adapters are in the machine? > > Linux. > > > on windows use `ipconfig /all` and parse output or WMI through Win32OLE > > on unix `/sbin/ifconfig -a` > > I know about the system commands. Is there a library/API to get these > programmatically without having to parse output from a sytem command? > > Thanks, > W. > Create a socket and pull it from the socket structure.