문제

I'm trying to implement a application that uses the getifaddrs() function from <ifaddrs.h> across multiple platforms. My goal is to retrieve network interface related info (IP, IPv6, Netmask, Broadcast, Scope, and HWAddress).

I have successfully implemented it on Linux, but it seems that the ifaddrs.h header isn't present on the above platforms (HP-UX, AIX, Solaris).

What is the recommended approach for these platforms?

도움이 되었습니까?

해결책

Solaris 11 and later have getifaddrs() already in libsocket. For older Solaris releases, see the answer to Solaris: Programmatic interface to ifconfig? here on StackOverflow.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top