+ return (_getq_flow_or_scidx(q, flow, TRUE));
+}
+
+/* Get a packet whose MBUF_SCIDX() < scidx from head of queue */
+void *
+_getq_scidx_lt(class_queue_t *q, u_int32_t scidx)
+{
+ return (_getq_flow_or_scidx(q, scidx, FALSE));
+}
+
+/* get all packets (chained) starting from the head of the queue */
+void *
+_getq_all(class_queue_t *q, void **last, u_int32_t *qlenp,
+ u_int64_t *qsizep)
+{
+ void *pkt = NULL;
+
+ switch (qptype(q)) {
+ case QP_MBUF:
+ pkt = MBUFQ_FIRST(&qmbufq(q));
+ if (last != NULL)
+ *last = MBUFQ_LAST(&qmbufq(q));
+ MBUFQ_INIT(&qmbufq(q));
+ break;
+
+
+ default:
+ VERIFY(0);
+ /* NOTREACHED */
+ }
+
+ if (qlenp != NULL)
+ *qlenp = qlen(q);
+ if (qsizep != NULL)
+ *qsizep = qsize(q);