Design and Implementation of the packet capture Module Based on Linux

Source: Internet
Author: User
Design and Implementation of the packet capture module based on Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. 1. Data Packet capture module design Flowchart

In the packet capture program, network links are monitored and data packets are collected by setting the network adapter to work in a hybrid State to obtain the packet header information.

2. Data Packet capture module implementation

This data packet capture program is written in C language and uses many functions in Linux network programming.

(1) set network interfaces to hybrid mode

The hybrid mode of network interfaces enables a network interface device to read only data packets with a 6-byte MAC address from the target address to all data packets in the network broadcast media. This part is implemented through two ioctl function calls:

QUOTE:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.