redesigned formatting of ipsec status|statusall

This commit is contained in:
Andreas Steffen
2006-11-01 17:28:47 +00:00
parent 1f9160614a
commit efa0ed68cf
4 changed files with 62 additions and 40 deletions
+11 -4
View File
@@ -1883,6 +1883,7 @@ static void enable_natt(private_ike_sa_t *this, bool local)
static int print(FILE *stream, const struct printf_info *info,
const void *const *args)
{
int written = 0;
private_ike_sa_t *this = *((private_ike_sa_t**)(args[0]));
if (this == NULL)
@@ -1890,10 +1891,16 @@ static int print(FILE *stream, const struct printf_info *info,
return fprintf(stream, "(null)");
}
return fprintf(stream, "%10s: %N, %H[%D]...%H[%D] (%J)",
this->name, ike_sa_state_names, this->state,
this->my_host, this->my_id, this->other_host, this->other_id,
this->ike_sa_id);
written = fprintf(stream, "%12s: %N, %H[%D]...%H[%D], IKE SPIs: %J",
this->name, ike_sa_state_names, this->state,
this->my_host, this->my_id, this->other_host, this->other_id,
this->ike_sa_id);
if (info->alt)
{
}
return written;
}
/**