Hi all, I am doing QoS research work on linux testbed. Let me describe my scenario first, then I have some questions to ask you. (I also send this email to stef) Scenario: 100M 100M 10M 100M ----------Ingress ---------- Core -----------Egress------------- There are 3 linux router, 4 ethernet segment (All of is 100M hub, except Core has 10M, the purpose is to creat congestion). I have 2 stream, one is video, the other is besteffort traffic by traffic generator. I want to dynamic allocation bandwidth for videp traffic. Implement plan: 1) I use prediction algorithm (such as gaussian prediction, or others..) to predict video traffic on-line, I need get measure window as sample data to eatimate the next time slot. 2) after getting the prediction rate, I will send this value to Core router, in Core I use dynamic CBQ according to the prediction value. there are two way to do dynamic CBQ (a). write "tc" script, dynamic change video rate paremeter (b). programming use TC API function all I prefer (a) scheme, I think it is easy for me. Now Question: 1) In Ingress router, I need runing prediction, video source is also linux support. How can I monitor the real traffic to get sample rates, I want to measure 1 minute, in 1 miunte window, I want to get 20 sample point rate, it means every 3 seconds I need get a sampl rate. Is there any finction to getpacketsize()? rate = (packet1 * packet size+ packet2* packet size+..)/measue time. 2) what socket I need use? UDP socket, TCP or raw socket. I am reading stevens book, and not sure do I need use raw socket to capture packet? 3) is It possible to dynamic change CBR rate for video traffic ? I really apprectiate your help. Thanks in advance yuxiao jia