[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: where to add marker for packets (for diff-serv)
thuerman@ibr.cs.tu-bs.de (Urs Thuermann) writes:
> I think of writing a Tcl proc that creates a new node, creates and
> instance of the marker, sets the target_ of the marker to the
> node's entry{} and then sets the node's entry{} to point to the
> marker. Any thoughts on this?
Since in contrast to the ns documnetation a node has no entry_
instance variable, I tried to insert my packet marker in place of the
node's classifier:
set n [$ns node]
set m [new Marker]
$m target [$n set classifier_]
$n set classifier_ $m
This does't work however since then the node will later try to install
into the classifier's slot using the classifier_ instance variable
which now points to my packet marker.
Is there another way to insert the packet marker between the node's
entry point and the classifer?
Or do I have to define a special subclass of Node that will allow
this?
BTW, the packet marker is defined like
class Marker : public Connector { ... };
void Maker::recv(Packet *p, Handler *h) {
/* determine flow aggregate for this packet,
measure average bandwidth and compare to porfile
then mark packet accordingly.
*/
...
send(p,h);
}
Like you might guess from this, I want to simulate diff-serv
mechanisms. If someone has code to share or other suggestions I'd
really appreciate your answers.
TIA
urs