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

Re: where to add marker for packets





If you look at packet.h, there is struct hdr_cmn. You can include
your own field or you can use one of them if you want.

Also look flowmon.cc and find out void setfields(Packet *p) 


	Hyeong Soo Chang.

> 
> I want to add an instance to some nodes in a ns-2 simulation that is
> able to mark packets depending on src and dst addresses and/or type of
> the packet.
> 
> I have 2 questions on this:
> 
> 1. What field in the packet is appropriate to do the marking?  Should
>    I define a new packet type containing a field for the mark or can I
>    use some existing field.  One byte would be enough for my purposes.
> 
> 2. How should implement the marker and how install it at the node?  I
>    think it should be a descendant of the Connector class and be
>    inserted between the node's entry and the classifier.  Or is there
>    a better way?
> 
>    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?
> 
> TIA
> 
> urs
>