dpkt
dpkt copied to clipboard
please calculate the length of BGP-4 BGP packets automatically
From [email protected] on August 04, 2010 23:15:16
The length of BGP objects is not automatically calculated (the 'len' field'). Please calculate the length automatically when encoding a BGP object.
As a workaround, I have to calculate the length manually this way:
msg = ... msg_with_headers = dpkt.bgp.BGP(len=dpkt.bgp.BGP.hdr_len + len(msg), type=msg_type) msg_with_headers.data = msg
Original issue: http://code.google.com/p/dpkt/issues/detail?id=44