Factor packet processing into packet-builder.