After reading the ip_dummynet.c, I found that dummynet uses link list to store packets as the following code:
if (q->head == NULL) q->head = pkt; else DN_NEXT(q->tail) = pkt; q->tail = pkt; q->len++; q->len_bytes += len ; However, when I tried to use the following function to get the length of the queue, I get the different value to the q->len and the return is always 1. static int getQueueLen(struct dn_flow_queue *q){ struct dn_pkt * pFirst; int i; pFirst = q->head; for(i = 1 ; (pFirst != NULL); i ++){ pFirst = DN_NEXT(pFirst); } return i; } I donot know why this happens. Please help me slove this problem. Million thanks. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"