1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 20:24:26 +01:00

add advertised_size method

This commit is contained in:
Jens Keim
2019-01-15 12:52:02 +01:00
committed by pepper-jk
parent 776ae4e83b
commit 2a8101eef3
3 changed files with 18 additions and 0 deletions

View File

@@ -85,6 +85,14 @@ uint32_t PDU::size() const {
return sz;
}
uint32_t PDU::advertised_size() const {
uint32_t result = header_size() + trailer_size();
if (inner_pdu_) {
result += inner_pdu()->advertised_size();
}
return result;
}
void PDU::send(PacketSender &, const NetworkInterface &) {
}