Add a "ipsec listcounters" command to stroke
This commit is contained in:
@@ -213,6 +213,8 @@ METHOD(stroke_counter_t, print, void,
|
||||
}
|
||||
this->lock->unlock(this->lock);
|
||||
|
||||
fprintf(out, "\nList of IKE counters:\n\n");
|
||||
|
||||
/* but do blocking write without the lock. */
|
||||
for (i = 0; i < countof(this->counter); i++)
|
||||
{
|
||||
|
||||
@@ -395,6 +395,10 @@ static void stroke_list(private_stroke_socket_t *this, stroke_msg_t *msg, FILE *
|
||||
this->ca->list(this->ca, msg, out);
|
||||
}
|
||||
this->list->list(this->list, msg, out);
|
||||
if (msg->list.flags & LIST_COUNTERS)
|
||||
{
|
||||
this->counter->print(this->counter, out);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user