Date: Wed, 26 Nov 2003 22:13:30 +0800 (CST) From: =?gb2312?q?villy=20Luo?= <lxp_welcome@yahoo.com.cn> To: freebsd-net@freebsd.org Subject: problem on dummynet, please help me Message-ID: <20031126141330.47580.qmail@web15311.mail.bjs.yahoo.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031126141330.47580.qmail>