void link_PendingLowPriorityData(struct link *l, size_t *pkts, size_t *octets) { struct mqueue *queue, *highest; struct mbuf *m; size_t len; /* * This is all rfc1989 stuff... because our LQR packet is going to bypass * everything that's not in the highest priority queue, we must be able to * subtract that data from our outgoing packet/octet counts. However, * we've already async-encoded our data at this point, but the async * encodings MUSTn't be a part of the LQR-reported payload :( So, we have * the async layer record how much it's padded the packet in the mbuf's * priv field, and when we calculate our outgoing LQR values we subtract * this value for each packet from the octet count sent. */ highest = LINK_HIGHQ(l); *pkts = *octets = 0; for (queue = l->Queue; queue < highest; queue++) { len = queue->len; *pkts += len; for (m = queue->top; len--; m = m->m_nextpkt) *octets += m_length(m) - m->priv; } }
void link_DeleteQueue(struct link *l) { struct mqueue *queue, *highest; highest = LINK_HIGHQ(l); for (queue = l->Queue; queue <= highest; queue++) while (queue->top) m_freem(m_dequeue(queue)); }
void link_SequenceQueue(struct link *l) { struct mqueue *queue, *highest; log_Printf(LogDEBUG, "link_SequenceQueue\n"); highest = LINK_HIGHQ(l); for (queue = l->Queue; queue < highest; queue++) while (queue->len) m_enqueue(highest, m_dequeue(queue)); }
void link_SequenceQueue(struct link *l) { struct ppp_mqueue *queue, *highest; PPP_MNTN_LOG(PS_PID_APP_PPP, 0, PS_PRINT_NORMAL, "link_SequenceQueue\r\n"); highest = LINK_HIGHQ(l); for (queue = l->Queue; queue < highest; queue++) { while (queue->len) { ppp_m_enqueue(highest, ppp_m_dequeue(queue)); } } }