Commit d90a102a authored by Samuel Pitoiset's avatar Samuel Pitoiset
Browse files

radv: add a Python script to check if a VA was ever valid

Signed-off-by: Samuel Pitoiset's avatarSamuel Pitoiset <>
Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <>
Part-of: <!7891>
parent 6ed43325
import re
import sys
def main():
if len(sys.argv) != 3:
print("Missing arguments: ./ <bo_history> <64-bit VA>")
bo_history = str(sys.argv[1])
va = int(sys.argv[2], 16)
va_found = False
with open(bo_history) as f:
for line in f:
p = re.compile('timestamp=(.*), VA=(.*)-(.*), destroyed=(.*), is_virtual=(.*)')
m = p.match(line)
if m == None:
va_start = int(, 16)
va_end = int(, 16)
# Check if the given VA was ever valid and print info.
if va >= va_start and va < va_end:
print("VA found: %s" % line, end='')
va_found = True
if not va_found:
print("VA not found!")
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment