Wireshark is the packet sniffer free and open source. It is used for network troubleshooting, analysis, software development and communications protocol, and education. Originally called Ethereal, in May 2006 project was renamed Wireshark due to trademark problems.
Wireshark is software that "understands" structure of different network protocols. Therefore, it is able to display encapsulation and fields along with their meanings of different packages specified by different network protocols. Wireshark uses pcap to capture packets, so it can only capture packets on types of networks that support pcap.