Zero-copy mmap of libpcap

1. User space After creating fd through socket(AF_PACKET,…), establish the receiving queue //pcap-linux.c static int pcap_activate_linux(pcap_t *handle) {<!– –> … ret = setup_mmapped(handle, & amp;status); … } 1.1 Set the default ring bufer size static int setup_mmapped(pcap_t *handle, int *status) {<!– –> … \t//1. if (handle->opt.buffer_size == 0) {<!– –> /* by default request 2M […]

Libpcap and Qt installation and data packet capture, filtering and saving

This experiment is based on the ubuntu virtual machine. Purpose of the experiment (1) Prepare the experimental environment; (2) libpcap related functions; (3) Master the packet capture process of data packets (Two)Experiment Content Install libpcap; Install the QT software in the virtual machine; Use libpcap encoding to capture, filter and save data Experimental steps Install […]