"\x02" # AS segment type (AS_SEQUENCE)
"\x01" # AS segment length (1)
)
- my_AS = struct.pack(">I", my_autonomous_system)
- path_attributes_hex += my_AS # AS segment (4 bytes)
+ my_as_hex = struct.pack(">I", my_autonomous_system)
+ path_attributes_hex += my_as_hex # AS segment (4 bytes)
path_attributes_hex += (
"\x40" # Flags ("Well-Known")
"\x03" # Type (NEXT_HOP)
"\x04" # Length (4)
)
- next_hop = struct.pack(">I", int(next_hop))
+ next_hop_hex = struct.pack(">I", int(next_hop))
path_attributes_hex += (
- next_hop # IP address of the next hop (4 bytes)
+ next_hop_hex # IP address of the next hop (4 bytes)
)
else:
path_attributes_hex = ""