Dump Connections to File

Does anyone know if it is possible to dump all the packets associated
with a specific connection to a file? It would be nice to be able to
check during connection_state_remove if a connection was interesting
or not and write it to disk.

-AK