built the packet queue structure from linked list