Wrote packet callback function, it compiles