Capturing bad packets

Hello,

SNMP reports from my Linux server a large number of "ipInAddrErrors" on several of my systems. According to one description, these packets are discarded datagrams due to:

How do I determine what packets these are? Can tcpdump help? If so, can anyone suggest a filter?

It might be more efficient to alter the SNMP code to include the fields you want from the IP header in the SNMP info (is this an SNMP trap?)

That is what I would do since you more-than-likely have access to the Linux source code.