diff options
Diffstat (limited to 'yamlexample.py')
-rwxr-xr-x | yamlexample.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/yamlexample.py b/yamlexample.py new file mode 100755 index 0000000..7001b23 --- /dev/null +++ b/yamlexample.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# +# An example on how to read the YAML output from etisnoop +# Pipe etisnoop to this script +# +# License: public domain + +import sys +import yaml + +for frame in yaml.load_all(sys.stdin): + print("FIGs in frame {}".format(frame['Frame'])) + for fib in frame['LIDATA']['FIC']: + if fib['FIGs']: + for fig in fib['FIGs']: + print(" FIG " + fig['FIG']) + |