Set up packet handling framework