Since I cannot use Wireshark in my SP if I am going to make it real time, I have to find some tools that I can use. I found the Jpcap, a Java library for capturing and sending network packets. From now on, I will study how to use this library for capturing packets that I will use or process in my SP.
Thank you Jpcap!