in reply to
Re: Using socket instead of pcap
in thread Using socket instead of pcap
I suppose it might be theoretically possible to write a pure Perl replacement for libpcap. Of course, you'd have to know all the intimate details of network protocols and *nix and even then you would likely find that your Perl ran too slow to be useful in real time analysis of busy networks. So, you profile and find the slow parts which you convert to XS aka C and when you're done, you'll probably find that you've recreated a vastly inferior version of libpcap.
If you know the protocols, OS details and Perl well enough to pull this off, you should already know the answer to this question. Use libpcap and enjoy standing on the shoulders of giants.