• 中国精品科技期刊
  • CCF推荐A类中文期刊
  • 计算领域高质量科技期刊T1类
Advanced Search
Wen Shuguang, Xie Gaogang. libpcap-MT: A General Purpose Packet Capture Library with Multi-Thread[J]. Journal of Computer Research and Development, 2011, 48(5): 756-764.
Citation: Wen Shuguang, Xie Gaogang. libpcap-MT: A General Purpose Packet Capture Library with Multi-Thread[J]. Journal of Computer Research and Development, 2011, 48(5): 756-764.

libpcap-MT: A General Purpose Packet Capture Library with Multi-Thread

More Information
  • Published Date: May 14, 2011
  • libpcap is a packet capture library providing the upper APIs for packet capture, filter and other functionalities, and being used widely in network protocol analysis, intrusion detection and other packet processing systems. It is feasible to perform high-speed packet processing with multi-core and multi-CPU architecture on general purpose computing platform, but it is difficult to take full advantage of the capability of multi-core and multi-CPU for applications based on libpcap because of its single thread model. In this paper, we design and implement a multi-thread packet capture library named libpcap-MT based on libpcap. libpcap-MT can capture and dispatch packets to multiple buffer queues very efficiently in kernel mode. In kernel capturing and dispatching reduces synchronization and memory copy overhead. Lockless multiple buffer queuing allows kernel and threads write and read packets in parallel. libpcap-MT provides a flexible dispatching strategy description method like C language. Its API extends libpcaps API with multi-thread operations and is compatible. Each thread can register with a buffer queue and get packets by traditional read() to copy from it, or mmap() to setup memory map then access the packet directly. Experimental results also indicate that it is easy to migrate current systems to multi-thread model with better performance and scalability using libpcap-MT.
  • Related Articles

    [1]Ma Zhaojia, Shao En, Di Zhanyuan, Ma Lixian. Porting and Parallel Optimization of Common Operators Based on Heterogeneous Programming Models[J]. Journal of Computer Research and Development. DOI: 10.7544/issn1000-1239.202330869
    [2]Pan Jianwen, Cui Zhanqi, Lin Gaoyi, Chen Xiang, Zheng Liwei. A Review of Static Detection Methods for Android Malicious Application[J]. Journal of Computer Research and Development, 2023, 60(8): 1875-1894. DOI: 10.7544/issn1000-1239.202220297
    [3]Guo Jinyang, Shao Chuanming, Wang Jing, Li Chao, Zhu Haojin, Guo Minyi. Programming and Developing Environment for FPGA Graph Processing: Survey and Exploration[J]. Journal of Computer Research and Development, 2020, 57(6): 1164-1178. DOI: 10.7544/issn1000-1239.2020.20200106
    [4]Wang Bohong, Liu Yi, Zhang Guozhen, Qian Depei. Debugging Multi-Core Parallel Programs by Gradually Refined Snapshot Sequences[J]. Journal of Computer Research and Development, 2017, 54(4): 821-831. DOI: 10.7544/issn1000-1239.2017.20151060
    [5]Liu Song, Wu Weiguo, Zhao Bo, Jiang Qing. Loop Tiling for Optimization of Locality and Parallelism[J]. Journal of Computer Research and Development, 2015, 52(5): 1160-1176. DOI: 10.7544/issn1000-1239.2015.20131387
    [6]Lü Huiwei, Cheng Yuan, Bai Lu, Chen Mingyu, Fan Dongrui, Sun Ninghui. Parallel Simulation of Many-Core Processor and Many-Core Clusters[J]. Journal of Computer Research and Development, 2013, 50(5): 1110-1117.
    [7]Tang Yixuan, Wu Junmin, Chen Guoliang, Sui Xiufeng, Huang Jing. A Utility Based Cache Optimization Mechanism for Multi-Thread Workloads[J]. Journal of Computer Research and Development, 2013, 50(1): 170-180.
    [8]Liu Lei, Huang He, Tang Zhimin. High Efficient Memory Race Recording Scheme for Parallel Program Deterministic Replay Under Multi-Core Architecture[J]. Journal of Computer Research and Development, 2012, 49(1): 64-75.
    [9]Wang Peng, Meng Dan, Zhan Jianfeng, Tu Bibo. Review of Programming Models for Data-Intensive Computing[J]. Journal of Computer Research and Development, 2010, 47(11): 1993-2002.
    [10]Sun Xiaojuan, Sun Ninghui, Chen Mingyu. Optimization of B-NIDS for Multicore[J]. Journal of Computer Research and Development, 2007, 44(10): 1733-1740.

Catalog

    Article views (2560) PDF downloads (816) Cited by()

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return