[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] How to set fid_ of HTTP flow?



Every connection is uniquely idenfied by a non-negative number, which is a
globaly sequenced object id. If all you want is to identify each flow by a
unique id, I don't see why you can't do it using this object id.

If you want to have completely control over fid, read
webcache/webtraf.{h,cc} and tcl/webcache/webtraf.tcl; they are altogether
600 lines. If you don't understand any part, speak out, don't complain.

On Fri, 8 Sep 2000, Kennypounds wrote:

> Hi, dear users,
> 
> I go through the HTTP related script. But I can't find what i want.
> I don't know why the HTTP related codes are all hard to understand
> and use.
> 
> Simply, I need to define a "proc build-http { src dest fid }" to create a
> http connection. I found that the code
> "set httpSession1 [new HttpSession $ns $numPage [$ns picksrc]]"
> in ~/tcl/ex/web-traffic.tcl is most simple to use. But it pick a source randomly
> and no fixed fid_ assigned no fixed destination for a connection. fid_ is
> important for me to seperate flows. But when I use 
> 	hdr_ip* hip = (hdr_ip*)p->access(off_ip_);
> 	int flowid  = hip->flowid();
> to get flowid, i can only get the objectId_ not fid_. 
> 
> Who can tell me how to achieve my goal. Or who are so kind to send me 
> some Web simulation code?
> 
> I appreciate your help very much.
>