WritablePacket
Eddie Kohler
eddietwo at cag.lcs.mit.edu
Thu Jul 27 15:22:15 EDT 2000
Hi,
I thought about this Packet cloning issue and came up with a kind of
solution that will make it harder to screw up.
There are now two kinds of packet: Packet has non-writable data, and
WritablePacket has writable data.
When you uniqueify() a Packet, you get back a WritablePacket.
When you push(), put() or take() a Packet, you also get back a
WritablePacket.
If you try to write into a Packet's data or IP header, you should get a
type error, unless you are doing a cast. If you try to write into a
WritablePacket's data or IP header, it should work fine.
This required a lot of changes. Sorry.
love,
ed
More information about the click
mailing list