随笔分类 -  Linux_u_C

摘要:参考资料: https://blog.csdn.net/hudashi/article/details/7709413 Posix线程中的线程属性pthread_attr_t主要包括scope属性、detach属性、堆栈地址、堆栈大小、优先级。在pthread_create中,把第二个参数设置为NU 阅读全文

posted @ 2019-04-08 21:52 rivsidn 阅读(211) 评论(0) 推荐(0)

摘要:1.为了使收到的报文尽快给我们的处理程序,需要设置成immediate模式: 阅读全文

posted @ 2019-04-08 18:23 rivsidn 阅读(311) 评论(0) 推荐(0)

摘要: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 阅读全文

posted @ 2019-04-03 15:12 rivsidn 阅读(344) 评论(0) 推荐(0)

摘要:参考资料: https://www.ibm.com/developerworks/cn/linux/l-cn-filelock/index.html 阅读全文

posted @ 2019-04-03 11:42 rivsidn 阅读(135) 评论(0) 推荐(0)

摘要:该库的相关资料主要从源码包中获得(假设当前路径为源码包路径): ./sample 中有代码示例 ./doc/html 中html文件可以通过浏览器打开,参看函数定义 想要的基本上sample中都有了,参照着写就行了。 阅读全文

posted @ 2019-04-02 17:37 rivsidn 阅读(187) 评论(0) 推荐(0)

摘要:参考资料: http://www.tcpdump.org/manpages/pcap.3pcap.html 分类介绍了该lib的函数 Opening a capture handle for reading Selecting a link-layer header type for a live 阅读全文

posted @ 2019-04-02 17:28 rivsidn 阅读(270) 评论(0) 推荐(0)

摘要:参考资料: http://www.tcpdump.org/ DESCRIPTION The Packet Capture library provides a high level interface to packet capture systems. All packets on the net 阅读全文

posted @ 2019-04-02 15:13 rivsidn 阅读(3471) 评论(0) 推荐(1)

摘要:参考资料: https://q16964777.iteye.com/blog/2228244 知道缓冲有几种模式:无缓冲、行缓冲、全缓冲。通过判断FILTE中的 _flags 的判断可以知道究竟是那种缓冲模式。 另外要清楚,缓冲区是在执行读写操作之后才分配的。 阅读全文

posted @ 2019-03-29 10:38 rivsidn 阅读(241) 评论(0) 推荐(0)

摘要:当 readv() 时候,需要程序自己提供space,接收数据。 阅读全文

posted @ 2019-03-18 19:33 rivsidn 阅读(348) 评论(0) 推荐(0)

摘要:参考资料: https://blog.csdn.net/zqixiao_09/article/details/77131283 https://www.cnblogs.com/lopnor/p/6158800.html Netlink 是一种特殊的 socket,它是 Linux 所特有的,类似于 阅读全文

posted @ 2019-03-08 10:36 rivsidn 阅读(1129) 评论(0) 推荐(0)

摘要:有关 *(void **)(&fptr) 为什么不直接 fptr 的解释可以参考下边连接: https://stackoverflow.com/questions/29184745/what-does-void-funcp-do-in-this-line-of-code-involving-dlsy 阅读全文

posted @ 2018-09-13 11:55 rivsidn 阅读(120) 评论(0) 推荐(0)

该文被密码保护。

posted @ 2018-08-21 09:58 rivsidn 阅读(3) 评论(0) 推荐(0)

摘要: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 阅读全文

posted @ 2018-08-15 14:01 rivsidn 阅读(161) 评论(0) 推荐(0)

摘要:.. 阅读全文

posted @ 2018-07-20 08:35 rivsidn 阅读(92) 评论(0) 推荐(0)

导航