LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Network (card) information (https://www.linuxquestions.org/questions/programming-9/network-card-information-539318/)

v8hadas 03-21-2007 08:19 AM

Network (card) information
 
Hi There,

I look for a way to retrieve the following things from a system where multiple network can be present at the same time:
1) IP address (IPv4 is enough for now)
2) Subnet mask
3) Macaddress
per network adapter.

I tried quite a few thing (practically all day today with SIOCGIFCONF, SIOCGIFFLAGS and so forth and somehow I did not make it. Is there a working example somewhere which would be usable probably?

Thanks,
Sandor

{BBI}Nexus{BBI} 03-21-2007 08:51 AM

Try typing as root: ifconfig

v8hadas 03-22-2007 03:18 AM

Thank you.

Actually I found how to code it in c++ here in thread #542222.

Sandor


All times are GMT -5. The time now is 12:42 PM.