Create save packets in memory

Save tcp and udp packets in memory using arraylist.