From: Jan Svitok Date: 2006-12-19T23:50:39+09:00 Subject: Re: Get the subnet mask On 12/19/06, David Corticchiato wrote: > Hi, > > Is there another way of getting my subnet mask without parsing > ipconfig/ifconfig ? > > David. On linux, look somewhere in the /proc On windows there's some WINAPI for sure, but it could be PITA to go through all the structures. Or try WMI (through Win32OLE) -- have look at msdn. It depends on your needs, but parsing ipconfig is the easiest way (be sure to take care of localisation, we had problems when we moved from english to, say italian windows.) You can guess the netmask from the address class, but most probably that won't work.