2015年10月21日

(笔记)Linux下的ioctl()函数详解

摘要: 我这里说的ioctl函数是指驱动程序里的,因为我不知道还有没有别的场合用到了它,所以就规定了我们讨论的范围。写这篇文章是因为我前一阵子被ioctl给搞混了,这几天才弄明白它,于是在这里清理一下头脑。 一、 什么是ioctl ioctl是设备驱动程序中对设备的I/O通道进行管理的函数。所谓对I/O通... 阅读全文

posted @ 2015-10-21 08:10 tdyizhen1314 阅读(90137) 评论(6) 推荐(4)

(笔记)Linux下C语言实现静态IP地址,掩码,网关的设置

摘要: #include #include #include #include #include #include #include #include int SetIfAddr(char *ifname, char *Ipaddr, char *mask,char *gateway){ int fd; i... 阅读全文

posted @ 2015-10-21 08:00 tdyizhen1314 阅读(6739) 评论(0) 推荐(0)

导航