Separated packet casting from packet handeling in slave