GTiroadkill / dpkt

Automatically exported from code.google.com/p/dpkt
Other
0 stars 0 forks source link

please calculate the length of a BGP-4 path segment in ASPathSegment #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please make dpkt.bgp.BGP.Update.Attribute.ASPath.ASPathSegment objects set the 
'len' field automatically to the length of the 'path' list, when encoding. 
Currently, the 'len' field has to be set manually by the caller, which is 
error-prone, e.g.:

dpkt.bgp.BGP.Update.Attribute.ASPath.ASPathSegment(
  type=dpkt.bgp.AS_SEQUENCE,
  len=1,  # could be automatically set to len(path)
  path=[64512])

Original issue reported on code.google.com by lengletr...@googlemail.com on 5 Aug 2010 at 2:59