Add function to manage incoming pkt