Added callbacks for packet generation/consumption.