WinPcap function Comparison

Source: Internet
Author: User

1.pcap_dump () and Pcap_live_dump ()

void Pcap_dump (U_char *user, const struct PCAP_PKTHDR *h, const U_char *SP)
Saving a packet to disk

int Pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
Saving a capture to a file

The difference between pcap_live_dump () and Pcap_dump () is that, in addition to setting limits, the result is running. Pcap_live_dump () leverages the features of the WinPcap NPF Drive, (see the NPF Driver Core Manual for details), write heap files at the kernel level, and minimize the number of context exchanges and the number of memory copies. Obviously, this feature is not currently available for other operating systems because Pcap_live_dump () is one of the features of WinPcap and runs only on WIN32 platforms.

WinPcap function Comparison

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.