[Click] packet annotations not set

Eddie Kohler kohler at cs.ucla.edu
Thu Feb 25 21:00:39 EST 2010


Hi Mustafa, from the distant past,

Packet annotations are not transmitted over the wire.  They are only 
meaningful within a single configuration.  If you want to transmit annoations 
from one computer to another you must include them in the packet data.

E


Mustafa Arslan wrote:
> Hi all,
> 
> I have a problem setting the user annotations of a packet. Specifically, I
> am using the DSR implementation
> in the grid directory. I set the packet annotations at the sender however I
> am not able to read them properly
> at the receiver because annotation bytes are not set (all zeros). It would
> be wonderful if someone could give
> a pointer. Thanks.
> 
> This is what I use at the sender:
> 
>             WritablePacket *tunPacket = Packet::make(p_in->length());
>             memcpy(tunPacket->data(), p_in->data(), p_in->length());
>             IPAddress anno = IPAddress(DSR_LAST_HOP_IP_ANNO(p_in));
>             SET_DSR_LAST_HOP_IP_ANNO(tunPacket, anno.addr());
>             click_chatter("sent packet annotation: %s",
> anno.unparse().c_str());
>             click_chatter("I am sending length %i data",
> tunPacket->length());
>             output(3).push(tunPacket);
> 
> This is how I read at the receiver:
> 
>             IPAddress anno = IPAddress(DSR_LAST_HOP_IP_ANNO(p_in));
>             click_chatter("received packet annotation: %s",
> anno.unparse().c_str());
> 
> 
> I support this with Print statements at the configurations like the
> following:
> 
> sender configuration:
> 
> dsr_rt[3] -> Print(baban, CONTENTS true, PRINTANNO true, NBYTES 200) ->
> EtherEncap(0x0800, 00:00:24:cb:01:0c, 00:00:24:cb:00:d4) -> SimpleQueue(10)
> -> ToDevice(eth0);
> 
> receiver configuration:
> 
> in2 :: FromDevice(eth0) -> eth_cl :: Classifier(12/0800, -)[0] ->
> Strip(14)-> MarkIPHeader -> IPClassifier(ip proto 200) -> Print(anan,
> CONTENTS true, PRINTANNO true, NBYTES 200)
> 
> and finally this is the output I get :(
> 
> sent packet annotation: 192.168.2.20
> baban:   32 | 00000000c0a8021400000000000000000000000000000000 | 45000020
> 881c0000 ffc8703d c0a80214 ffffffff 00000008 0206881c c0a80218
> anan:   46 | 000000000000000000000000000000000000000000000000 | 45000020
> 881c0000 ffc8703d c0a80214 ffffffff 00000008 0206881c c0a80218 00000000
> 00000000 00000000 0000
> received packet annotation: 0.0.0.0
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list