private void consumeData(Packet dataPacket) {
		Log.i(TAG, "Consuming DATA packet");
		
		// If buffer is full, ignore new packets
		if(mRecvData.remainingCapacity() == 0) {
			Log.e(TAG, 
				  "Incoming data packet queue is full, ignoring a new data packet");
			return;
		}
		
		Short lastSeqNum = mLastSeqs.get(dataPacket.getSrcAddr());
		if(lastSeqNum == null)
			lastSeqNum = -1;
		
		short packetSeqNum = dataPacket.getSequenceNumber();
		short packetSrcAddr = dataPacket.getSrcAddr();
		// Check if we've already received this packet. We ignore duplicate data, 
		// defined as any packet with a sequence number less than the value 
		// we're expecting from the host.
		if(lastSeqNum >= packetSeqNum) {
			Log.e(TAG, "Discarding a duplicate data packet from address " 
					+ packetSrcAddr +	", seq num " + packetSeqNum);
		} else {
			// Increment expected sequence number
			short nextSeqNum = (short) (lastSeqNum + 1);
			if(nextSeqNum > Packet.MAX_SEQ_NUM)
				nextSeqNum = 0;
			// Check if sender has retired a packet without this system ACKing
			// and moved on. This will be indicated by a gap in sequence numbers.
			// Log an error but queue anyway.
			if(nextSeqNum < packetSeqNum || 
					(nextSeqNum == 0 && packetSeqNum < Packet.MAX_SEQ_NUM)) {
				Log.e(TAG, "Gap in sequence numbers from host " + packetSrcAddr
						+ ". Expecting " + nextSeqNum + ", got " + packetSeqNum);
			}
			
			// Queue packet for delivery
			try {
				mRecvData.put(dataPacket);
			} catch (InterruptedException e) {
				Log.e(TAG, "Interrupted when blocking on the receive data queue");
			}
			
			// Update last sequence number
			mLastSeqs.put(packetSrcAddr, nextSeqNum);
		}
			
		try {
			// Prepare and queue ACK
			Packet ack = new Packet(Packet.CTRL_ACK_CODE, packetSrcAddr, 
					mHostAddr, new byte[0], 0, packetSeqNum, mClock.time());
			mSendAckQueue.put(ack);
			Log.d(TAG, "Queueing ack seq num " + packetSeqNum);
		} catch (InterruptedException e) {
			Log.e(TAG, "RecvTask interrupted when blocking on the send queue");
		}
	}