2015年7月26日

libpcap和pfring应用程序--Pcap_open_live(二)

摘要: 原文链接:http://blog.csdn.net/smilestone_322/article/details/8451612首先以libpcap为主线,先通过pcap_open_live函数,做一些初始化的操作,比如打开网卡,设置好读取数据包的回调函数等等,然后就可以通过pcap_next,pc... 阅读全文

posted @ 2015-07-26 15:59 CasperWu 阅读(3032) 评论(0) 推荐(0)

libpcap+PF_RING源码分析---前言(一)

摘要: 原文链接:http://blog.csdn.net/smilestone_322/article/details/8451604Libpcap是linux下用来捕获数据包的抓包库,它主要是基于socket的,和winpcap的本质的不同是,winpcap是和tcp/ip协议同层的,而libpcap是... 阅读全文

posted @ 2015-07-26 15:57 CasperWu 阅读(908) 评论(0) 推荐(0)

2015年7月25日

poll机制分析

摘要: 原作者:韦东山int poll(struct pollfd *fds, nfds_t nfds, int timeout) 的时候可以通过把timeout设置成0的方式避免线程睡眠(busy wait),从而避免线程上下文切换造成的latency。不过这种方式会导致CPU使用率到达100%。所以如果... 阅读全文

posted @ 2015-07-25 16:35 CasperWu 阅读(248) 评论(0) 推荐(0)

2015年7月16日

使用 Linux 大页面内存 (hugepages) 提高内存访问性能

摘要: 原文链接:http://linux.cloudibee.com/2007/09/linux-hugepages/http://linuxgazette.net/155/krishnakumar.html配置Linux系统大内存Hugepages is a mechanism that allows ... 阅读全文

posted @ 2015-07-16 12:15 CasperWu 阅读(1902) 评论(0) 推荐(0)

常用 Linux 命令

摘要: Check page size: getconf PAGESIZECheck memory information: cat /proc/meminfoCheck number of hugepages seting: cat /proc/sys/vm/nr_hugepagesSet number ... 阅读全文

posted @ 2015-07-16 11:54 CasperWu 阅读(158) 评论(0) 推荐(0)

2015年5月31日

program_options禁止命令行短参数

摘要: 典型的 boost program_options的用法如下:#include using namespace boost::program_options;using namespace std;int main(int argc, char* argv[]) // 需要命令行参数{ int ... 阅读全文

posted @ 2015-05-31 15:52 CasperWu 阅读(1043) 评论(0) 推荐(0)

增量式修改检验和(IP, TCP, UDP)算法的研究和实现

摘要: 原文链接:http://blog.csdn.net/force_eagle/article/details/38546009/** Author: Godbach* E-mail:nylzhaowei@163.com* 本文可以自由转载,但请标明出处,并保证本文的完整性。*/对于数据包中检验和的计算... 阅读全文

posted @ 2015-05-31 13:55 CasperWu 阅读(1059) 评论(0) 推荐(0)

2015年5月4日

网络编程:Linux socket第13部分:多播

摘要: 中文网站上有大量关于多播服务器和客户端的源代码和详细解释,可是找遍了网络都找不到关于在多网卡环境下怎么指定网卡发送和接收多播消息的说明。于是改用英文在Google上搜索了一下,终于有眉目了。分享给需要的攻城师们。如果有什么问题的大家可以留言。原文地址:http://www.tenouk.com/Mo... 阅读全文

posted @ 2015-05-04 20:04 CasperWu 阅读(555) 评论(0) 推荐(0)

2015年3月24日

GNU Binutils

摘要: GNU BinutilsThe GNU Binutils are a collection of binary tools. The main ones are:ld- the GNU linker.as- the GNU assembler.But they also include:addr2l... 阅读全文

posted @ 2015-03-24 22:55 CasperWu 阅读(196) 评论(0) 推荐(0)

2015年3月1日

基于 libpcap库的sniffer程序

摘要: 基于 libpcap库的sniffer程序Libpcap库是WireSharek和Tcpdump抓包程序的基础,利用libcap我们自己也可以实现自己的抓包程序,在网络上实时抓包分析,或者利用处理的结果用作业务用途。1. Libpcap抓取的数据包的结构在实现我们的基于libcap的程序之前,我们先... 阅读全文

posted @ 2015-03-01 00:17 CasperWu 阅读(903) 评论(0) 推荐(0)

导航