how to programatically obtain informations about existing NICs on the system

hi,
i would like to know how to programatically obtain informations about existing NICs (both configured and non-configured if possible) on *NIX?
i need to write simple *NIX C/C++ program that will have these informations. i have tried to search forums (and also google) with no luck. any help will be more than welcomme.

cheers

In Linux you have the /proc filesystem that stores information about that. You just have to read /proc/net/dev (for example) and handle the strings. Try searching for ifconfig source code, it might come in handy.

many 10X for that! does anyone knows how to do that on solaris, HP-UX and Tru64?
also, i am generally very interested in *NIX system programming, can You please point some good book(s) on the subject of handling processes, users, devices, file systems, etc? 10x in advance