摘要:参考资料: https://blog.csdn.net/hudashi/article/details/7709413 Posix线程中的线程属性pthread_attr_t主要包括scope属性、detach属性、堆栈地址、堆栈大小、优先级。在pthread_create中,把第二个参数设置为NU
阅读全文
摘要:1.为了使收到的报文尽快给我们的处理程序,需要设置成immediate模式:
阅读全文
摘要:test.txt中内容如下所示: 想要将其中的ip地址等解析出来: 输出: ifname eth0 is ipv4 0 192.168.0.55-192.168.0.140 4 ifname eth2 is ipv4 1 192.168.0.2-192.168.0.150 4
阅读全文
摘要:参考资料: https://www.ibm.com/developerworks/cn/linux/l-cn-filelock/index.html
阅读全文
摘要:该库的相关资料主要从源码包中获得(假设当前路径为源码包路径): ./sample 中有代码示例 ./doc/html 中html文件可以通过浏览器打开,参看函数定义 想要的基本上sample中都有了,参照着写就行了。
阅读全文
摘要:参考资料: http://www.tcpdump.org/manpages/pcap.3pcap.html 分类介绍了该lib的函数 Opening a capture handle for reading Selecting a link-layer header type for a live
阅读全文
摘要:参考资料: http://www.tcpdump.org/ DESCRIPTION The Packet Capture library provides a high level interface to packet capture systems. All packets on the net
阅读全文
摘要:参考资料: https://q16964777.iteye.com/blog/2228244 知道缓冲有几种模式:无缓冲、行缓冲、全缓冲。通过判断FILTE中的 _flags 的判断可以知道究竟是那种缓冲模式。 另外要清楚,缓冲区是在执行读写操作之后才分配的。
阅读全文
摘要:当 readv() 时候,需要程序自己提供space,接收数据。
阅读全文
摘要:参考资料: https://blog.csdn.net/zqixiao_09/article/details/77131283 https://www.cnblogs.com/lopnor/p/6158800.html Netlink 是一种特殊的 socket,它是 Linux 所特有的,类似于
阅读全文
摘要:有关 *(void **)(&fptr) 为什么不直接 fptr 的解释可以参考下边连接: https://stackoverflow.com/questions/29184745/what-does-void-funcp-do-in-this-line-of-code-involving-dlsy
阅读全文
摘要:1.问题: fatal error: openssl/opensslv.h: No such file or directory 解决: sudo apt-get install libssl-dev 2.问题: curses.h:No such file or directory 解决: sudo
阅读全文