packet: add a method to set the size
This commit is contained in:
@@ -590,6 +590,15 @@ class Packet : public FastAlloc, public Printable
|
||||
setDest(Broadcast);
|
||||
}
|
||||
|
||||
void
|
||||
setSize(unsigned size)
|
||||
{
|
||||
assert(!flags.isSet(VALID_SIZE));
|
||||
|
||||
this->size = size;
|
||||
flags.set(VALID_SIZE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the data pointer to the following value that should not be
|
||||
|
||||
Reference in New Issue
Block a user