- Improved dot output for Arachne attacks.
This commit is contained in:
parent
9d64b837db
commit
2ddd1eee13
@ -666,10 +666,17 @@ dotSemiState ()
|
||||
int run;
|
||||
Protocol p;
|
||||
|
||||
void node (int run, int index)
|
||||
void node (const int run, const int index)
|
||||
{
|
||||
if (sys->runs[run].protocol == INTRUDER)
|
||||
{
|
||||
eprintf ("i%i", run);
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("r%ii%i", run, index);
|
||||
}
|
||||
}
|
||||
|
||||
int binder (void *data)
|
||||
{
|
||||
@ -712,27 +719,40 @@ dotSemiState ()
|
||||
|
||||
index = 0;
|
||||
rd = sys->runs[run].start;
|
||||
eprintf ("\tsubgraph cluster_run%i {\n", run);
|
||||
eprintf ("\t\tlabel = \"");
|
||||
if (sys->runs[run].protocol != INTRUDER)
|
||||
{
|
||||
// Regular run
|
||||
|
||||
eprintf ("\tsubgraph cluster_run%i {\n", run);
|
||||
eprintf ("\t\tlabel = \"");
|
||||
eprintf ("run #%i, protocol ", run);
|
||||
termPrint (sys->runs[run].protocol->nameterm);
|
||||
eprintf (", role ");
|
||||
termPrint (sys->runs[run].role->nameterm);
|
||||
eprintf ("\";\n", run);
|
||||
if (run == 0)
|
||||
{
|
||||
eprintf ("\t\tcolor = red;\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("(intruder)");
|
||||
}
|
||||
eprintf ("\";\n", run);
|
||||
eprintf ("\t\tcolor = blue;\n");
|
||||
}
|
||||
while (index < sys->runs[run].length)
|
||||
{
|
||||
// Print node itself
|
||||
eprintf ("\t\t");
|
||||
node (run, index);
|
||||
eprintf (" [shape=box,label=\"");
|
||||
eprintf (" [");
|
||||
if (run == 0 && index == current_claim->ev)
|
||||
{
|
||||
eprintf ("shape=doubleoctagon,");
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("shape=box,");
|
||||
}
|
||||
eprintf ("label=\"");
|
||||
roledefPrint (rd);
|
||||
eprintf ("\"]");
|
||||
eprintf (";\n");
|
||||
@ -750,6 +770,16 @@ dotSemiState ()
|
||||
rd = rd->next;
|
||||
}
|
||||
eprintf ("\t}\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
// INTRUDER run
|
||||
eprintf ("\t");
|
||||
node (run, 0);
|
||||
eprintf (" [label=\"");
|
||||
termPrint (sys->runs[run].role->nameterm);
|
||||
eprintf ("\"];\n");
|
||||
}
|
||||
run++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user