BackupGGCode / dpkt

Python packet creation / parsing library
Other
1 stars 0 forks source link

please calculate the length of BGP-4 BGP packets automatically #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 reported on code.google.com by lengletr...@googlemail.com on 5 Aug 2010 at 3:15