import sys
COLOR_SCHEME = 'pastel19' # see http://www.graphviz.org/doc/info/colors.html
-SOURCE_SINK = ["ActiveSocketSource", "PassiveSocketSource", "ActiveSocketSink", "PassiveSocketSink"]
NETEMU = ["InterfaceAnnotater" , "PacketMonitor" , "PacketTypeChecker"]
mode = "MODULE"
for moduleid, (module, cs) in modules.iteritems():
module = module.split('<',1)[0]
- if "senf" not in module.split('::',1)[0]:
- if module.rsplit('::',1)[-1] in NETEMU:
- color = 5
- else:
- color = 6
- elif module.rsplit('::',1)[-1] in SOURCE_SINK:
+ if module.rsplit('::',1)[-1] in NETEMU:
+ color = 5
+ elif module.endswith("Source") or module.endswith("Sink"):
color = 1
+ elif "senf" not in module.split('::',1)[0]:
+ color = 6
else:
color = 3
module = module.rsplit('::',1)[-1]