Split packet stuff into a shared library.