(This paper analyzes the principle, function and usage of WinPcap, a free packet capture tool implemented on Windows platform, introduces the basic principle of network sniffing, the composition of sniffing program, and the basic knowledge of protocol analysis module. It also uses an IP packet capture and store-and-forward program based on network sniffing developed by Microsoft Visual C .)