How do I output my host’s IP addresses from a C program?

后端 未结 8 660
猫巷女王i
猫巷女王i 2020-12-03 21:19

I need to display all the IP addresses from my local computer, using the C language. How can this be done?

8条回答
  •  误落风尘
    2020-12-03 21:48

    How about you simply cheat and look at the source of /sbin/ifconfig/ ? Nothing wrong with standing on the shoulders of other giants...

提交回复
热议问题