参考资料:
http://www.tcpdump.org/manpages/pcap.3pcap.html
分类介绍了该lib的函数
Opening a capture handle for reading
Selecting a link-layer header type for a live capture
Reading packets
Filters
Capture statistics
Opening a handle for writing captured packets
Writing packets
Injecting packets
Reporting errors
Getting library version information
总结:
注意函数是在什么时候调用,create--->active--->capature。
有些函数实在 create 之后,active 之前调用的,有些是在 active 之后 capature 之后调用的。