Cleanup: Refactoring XML output code to facilitate introduction of protocol xml output.

This commit is contained in:
Cas Cremers 2014-04-15 22:12:43 +01:00
parent dc4432a18f
commit 9cc323004c

View File

@ -676,16 +676,9 @@ xmlRoleEventlist (const System sys, Roledef rd, int index)
xmlPrint ("</eventlist>");
}
//! Show all protocol roles that are in the attack.
//! Output a protocol description
void
xmlInvolvedProtocolRoles (const System sys)
{
Protocol p;
p = sys->protocols;
while (p != NULL)
{
if (isProtocolInvolved (sys, p))
xmlProtocol (const System sys, Protocol p)
{
Role r;
@ -706,6 +699,20 @@ xmlInvolvedProtocolRoles (const System sys)
xmlindent--;
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;
}
}