Signed-off-by: Yuichi Ito <[email protected]>
---
ryu/lib/packet/sctp.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ryu/lib/packet/sctp.py b/ryu/lib/packet/sctp.py
index 6ecefd0..c5bb9ed 100644
--- a/ryu/lib/packet/sctp.py
+++ b/ryu/lib/packet/sctp.py
@@ -139,6 +139,13 @@ class sctp(packet_base.PacketBase):
struct.pack_into('!I', buf, 8, self.csum)
return str(buf)
+ def __len__(self):
+ length = self._MIN_LEN
+ if self.chunks is not None:
+ for one in self.chunks:
+ length += len(one)
+ return length
+
def _checksum(self, data):
# from RFC 3309
crc_c = [
--
1.7.10.4
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel