Add broadcastPacket function