First step for extracting the packet scanning pipeline into a macro.