Cleanup: Refactoring XML output code to facilitate introduction of protocol xml output.
This commit is contained in:
parent
dc4432a18f
commit
9cc323004c
25
src/xmlout.c
25
src/xmlout.c
@ -676,17 +676,10 @@ xmlRoleEventlist (const System sys, Roledef rd, int index)
|
|||||||
xmlPrint ("</eventlist>");
|
xmlPrint ("</eventlist>");
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Show all protocol roles that are in the attack.
|
//! Output a protocol description
|
||||||
void
|
void
|
||||||
xmlInvolvedProtocolRoles (const System sys)
|
xmlProtocol (const System sys, Protocol p)
|
||||||
{
|
{
|
||||||
Protocol p;
|
|
||||||
|
|
||||||
p = sys->protocols;
|
|
||||||
while (p != NULL)
|
|
||||||
{
|
|
||||||
if (isProtocolInvolved (sys, p))
|
|
||||||
{
|
|
||||||
Role r;
|
Role r;
|
||||||
|
|
||||||
xmlPrint ("<protocol>");
|
xmlPrint ("<protocol>");
|
||||||
@ -705,6 +698,20 @@ xmlInvolvedProtocolRoles (const System sys)
|
|||||||
}
|
}
|
||||||
xmlindent--;
|
xmlindent--;
|
||||||
xmlPrint ("</protocol>");
|
xmlPrint ("</protocol>");
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Show all protocol roles that are in the attack.
|
||||||
|
void
|
||||||
|
xmlInvolvedProtocolRoles (const System sys)
|
||||||
|
{
|
||||||
|
Protocol p;
|
||||||
|
|
||||||
|
p = sys->protocols;
|
||||||
|
while (p != NULL)
|
||||||
|
{
|
||||||
|
if (isProtocolInvolved (sys, p))
|
||||||
|
{
|
||||||
|
xmlProtocol (sys, p);
|
||||||
}
|
}
|
||||||
p = p->next;
|
p = p->next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user