1 /* 2 * Copyright (c) 2020 Synopsys, Inc. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/kernel.h> 8 #include <stdio.h> 9 #include <zephyr/sys/crc.h> 10 #include <zephyr/random/random.h> 11 12 struct phdr_desc { 13 struct phdr_desc *next; /* Next pkt descriptor in respective queue */ 14 uint8_t *ptr; /* Pointer to header */ 15 }; 16 17 struct phdr_desc_queue { 18 struct phdr_desc *head; /* packet headers are removed from here */ 19 struct phdr_desc *tail; /* packet headers are added here*/ 20 int count; 21 }; 22 23 void phdr_desc_enqueue(struct phdr_desc_queue *queue, struct phdr_desc *desc, 24 struct k_mutex *mutex); 25 26 struct phdr_desc *phdr_desc_dequeue(struct phdr_desc_queue *queue, 27 struct k_mutex *mutex); 28