Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the subnet of a network interface?

Status
Not open for further replies.

vkarthik

Programmer
Aug 30, 2001
126
US
I need to retrieve the subnet mask of the default network interface of a PC, using C. The OS is linux.

Does anybody know some C function that does this? I know that there are some files storing the interface details, and they can be read and parsed. But is there a simpler way out?

LOL A ship is safe in the harbour, but that's not what it is meant for!!! LOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top