Lines Matching defs:fifo
124 /* Add new packet to fifo. */
126 ospf_fifo_push (struct ospf_fifo *fifo, struct ospf_packet *op)
128 if (fifo->tail)
129 fifo->tail->next = op;
131 fifo->head = op;
133 fifo->tail = op;
135 fifo->count++;
138 /* Delete first packet from fifo. */
140 ospf_fifo_pop (struct ospf_fifo *fifo)
144 op = fifo->head;
148 fifo->head = op->next;
150 if (fifo->head == NULL)
151 fifo->tail = NULL;
153 fifo->count--;
159 /* Return first fifo entry. */
161 ospf_fifo_head (struct ospf_fifo *fifo)
163 return fifo->head;
166 /* Flush ospf packet fifo. */
168 ospf_fifo_flush (struct ospf_fifo *fifo)
173 for (op = fifo->head; op; op = next)
178 fifo->head = fifo->tail = NULL;
179 fifo->count = 0;
182 /* Free ospf packet fifo. */
184 ospf_fifo_free (struct ospf_fifo *fifo)
186 ospf_fifo_flush (fifo);
188 XFREE (MTYPE_OSPF_FIFO, fifo);
197 /* Debug of packet fifo*/