Is there any other way I could use Scapy to configure a packet with multiple flag attributes?
I am trying to set up a BGP Layer with both optional and transitive attributes. I am using this github file: https://github.com/levigross/Scapy/blob/master/scapy/contrib/bgp.py. On line 107, is the flags I am trying to add.
Past failed attempts include:
>>>a=BGPPathAttribute(flags=["Optional","Transitive"])
>>>send(a)
TypeError: unsupported operand type(s) for &: 'str' and 'int'
>>>a=BGPPathAttribute(flags=("Optional","Transitive"))
>>>send(a)
TypeError: unsupported operand type(s) for &: 'tuple' and 'int'
>>>a=BGPPathAttribute(flags="Optional")/BGPPathAttribute(flags="Transitive")
Creates 2 separate path attributes: One which is Optional and Non-Transitive and the other which is Well Known and Transitive.
>>>a=BGPPathAttribute(flags="Optional", flags="Transitive")
SyntaxError: keyword argument repeated
>>>a=BGPPathAttribute(flags="OT")
ValueError: ['OT'] is not in list