eine kleine reminder
Eddie Kohler
eddietwo at cag.lcs.mit.edu
Thu Jul 27 12:15:16 EDT 2000
Hey guys, If you modify packet data -- change something in the IP header,
say, or the data -- you should always call Packet::uniqueify() first.
WRONG:
memcpy(p->data(), "xxx", 3);
RIGHT:
p = p->uniqueify();
memcpy(p->data(), "xxx", 3);
You do NOT need to call Packet::uniqueify() if all you are changing is
stuff in the packet header -- annotations, or calling Packet::pull().
lov,e
ed
More information about the click
mailing list