public void acquirePackets(final List<Packet> buffer, final int count) { //Method to hold the received packets in an arrayList of packets

		//ArrayList of packets called List
		
		final PacketReceiver receiver = new PacketReceiver() { //Declaration of a new packetReciever called receiver
			
			@Override
			public void receivePacket(Packet packet) { //Method to process the packet

				System.out.println("received packet.."); //Prints a line to confirm packet was received 
				synchronized (buffer) {
					buffer.add(packet); //Adds the packet to the ArrayList					
				}
				packetsRecieved++;
				if (done || packetsRecieved == count)
					captor.breakLoop();
			}
		}; //End of InnerClass
		
		//captor.loopPacket(count, receiver);
		Runnable runnable = new Runnable(){

			@Override
			public void run() {
				//AG_Captor test = new AG_Captor(); //Temporary calling object
				//test.openDevice(0); //opens the device
				try {
					Thread.sleep(4000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				captor.loopPacket(count, receiver); //Loop for packets until closed
			}
			
		};
		Thread snifferThread = new Thread(runnable);
		snifferThread.setName("Sniffer");
		snifferThread.start();
		System.out.println(snifferThread.getState());
	}