mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 12:26:11 +02:00
packet lib: implement ryu.lib.packet.lldp.lldp.__len__
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
39c9718210
commit
ce4a758fc7
@ -167,6 +167,9 @@ class lldp(packet_base.PacketBase):
|
||||
return tlv_cls
|
||||
return _set_type
|
||||
|
||||
def __len__(self):
|
||||
return sum(LLDP_TLV_SIZE + tlv.len for tlv in self.tlvs)
|
||||
|
||||
|
||||
@lldp.set_tlv_type(LLDP_TLV_END)
|
||||
class End(LLDPBasicTLV):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user