Tracking inventory messages I am trying to connect to different nodes and keep track of the inventory messages that they send to me. I tried to do this with bitcoinj and libbitcoin, but I didn't make it. The goal is to connect to much nodes as possible and listen to inv messages.

Any help? I am sure there must be a straightforward solution.

Thanks!
Using Bitcoin Core, if you start it with -debug=net (or add debug=net to your bitcoin.conf file), every single network message will be included in the debug.log file along with the node it came from. You can then parse the debug.log file to get the information you want.