翻译:How to detect IP address change programmatically in Linux?
Stackoverflow地址:c++-HowtodetectIPaddresschangeprogrammaticallyinLinux?-StackOverflow翻译:有监测本机IP地址修改的,使用C++在Linux上编程的方法吗?Answers1:在C语言中,我使用的获取当前IP的方法:ints;structifreqifr={};s=socket(PF_INET,SOCK_DGRAM,0