packet: add a method to set the size
This commit is contained in:
parent
671faf3316
commit
c8f296bca0
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue