I've coded my sniffer using raw sockets and promiscuous mode, it works fine, sniffing all incoming and outoging traffic. However, I want it to be able to capture packets from my local loopback address 127.0.0.1 as well, because I have both client and server applications running on my local machine and I want to see the traffic between them.
So basicly I want to add that feature that RawCap has into my own sniffer. How do I configure my raw socket to capture local loopback traffic? All I can really find are tools to intercept this kind of traffic, but nothing that says how to do it yourself