Linux 接口地址的获取-暨获取本地IP地址(所有地址,包括IPv4,IPV6,MAC 地址)
摘要:
本文没有使用ioctl 函数,未使用socket ,直接获取本地的所有地址,包括IPv4,IPV6,MAC 地址:核心函数是:getifaddrs() & freeifaddrs()代码如下:#include #include #include #include #include /*-------... 阅读全文
posted @ 2013-04-20 17:45 存在的存在 阅读(629) 评论(0) 推荐(0) 编辑