Implement some data packet handling