public ByteBuffer toBuffer()
	{
		short messageSize = (short) (numberOfNeighbors*4 + 12);
		ByteBuffer buffer = ByteBuffer.allocate(messageSize);
		buffer.put(MessageThread.lsaType);
		buffer.put((byte)0);
		buffer.putShort(messageSize);
		buffer.put(sourceAddress.toBytes());
		buffer.putShort(sequenceNumber);
		buffer.putShort(numberOfNeighbors);
		for (IP address : neighborsAddresses)
			buffer.put(address.toBytes());
		return buffer;
		
	}