Hi Geoff,
Opendnp3 is a library for implementing compliant outstation and masters, and as such, is not oriented towards "packet capture".
If you need passive packet capture, you're way better off just using libpcap, and then analyzing the pcaps using wireshark which has a decent dissector for DNP3.
If you need programmatic analysis of DNP3 messages in C++, opendnp3 does have a decoder class:
This class is used to implement the web-based decoder found on the project homepage:
It allows you to input data at any of the 3 levels of the protocol, and receive callbacks describing the data as log statements.
I've re-purposed some of the parsing internals in the past to implement plugins for deep packet inspection firewalls:
This is beyond the scope of the public API however.
-Adam