摘要: #include <signal.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <ne 阅读全文
posted @ 2015-10-26 12:15 SandKing 阅读(8) 评论(0) 推荐(0)
摘要: 结构原型: struct ifreq { #define IFHWADDRLEN 6 union { char ifrn_name[IFNAMSIZ]; } ifr_ifrn; union { struct sockaddr ifru_addr; struct sockaddr ifru_dstad 阅读全文
posted @ 2015-10-26 12:14 SandKing 阅读(43) 评论(0) 推荐(0)
摘要: 转自:http://blog.csdn.net/shanshanpt/article/details/19897897 我这里说的ioctl函数是指驱动程序里的,因为我不知道还有没有别的场合用到了它,所以就规定了我们讨论的范围。写这篇文章是因为我前一阵子被ioctl给搞混了,这几天才弄明白它,于是在 阅读全文
posted @ 2015-10-26 12:13 SandKing 阅读(23) 评论(0) 推荐(0)
摘要: 转自:http://blog.csdn.net/apengjiang/article/details/7056295 关于使用TEMP_FAILURE_RETRY #define TEMP_FAILURE_RETRY(expression) \ (__extension__\ ({ long int 阅读全文
posted @ 2015-10-26 12:09 SandKing 阅读(18) 评论(0) 推荐(0)