removed IKE_SA_ID (%J) printf hook, two more to go

This commit is contained in:
Martin Willi
2007-04-11 13:01:08 +00:00
parent 3c662c30ee
commit 5f088665ad
6 changed files with 83 additions and 47 deletions
+64
View File
@@ -0,0 +1,64 @@
/**
* @file controller.h
*
* @brief Interface of controller_t.
*
*/
/*
* Copyright (C) 2007 Martin Willi
* Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#ifndef CONTROLLER_H_
#define CONTROLLER_H_
typedef struct controller_t controller_t;
#include <config/backends/local_backend.h>
/**
* @brief controller is a configuration and control interface which
* allows other processes to modify charons behavior.
*
* controller_t allows config manipulation (as whack in pluto). Configurations
* are stored in a special backend, the in-memory local_backend_t.
* Messages of type controller_msg_t's are sent over a unix socket
* (/var/run/charon.ctl).
*
* @b Constructors:
* - controller_create()
*
* @ingroup control
*/
struct controller_t {
/**
* @brief Destroy a controller_t instance.
*
* @param this controller_t objec to destroy
*/
void (*destroy) (controller_t *this);
};
/**
* @brief Create a controller instance.
*
* @return controller_t object
*
* @ingroup control
*/
controller_t *controller_create();
#endif /* CONTROLLER_H_ */
+4 -2
View File
@@ -970,6 +970,7 @@ static void stroke_del_ca(private_stroke_interface_t *this,
static void log_ike_sa(FILE *out, ike_sa_t *ike_sa, bool all)
{
peer_cfg_t *cfg = ike_sa->get_peer_cfg(ike_sa);
ike_sa_id_t *id = ike_sa->get_id(ike_sa);
u_int32_t next, now = time(NULL);
fprintf(out, "%12s[%d]: %N, %H[%D]...%H[%D]\n",
@@ -980,9 +981,10 @@ static void log_ike_sa(FILE *out, ike_sa_t *ike_sa, bool all)
if (all)
{
fprintf(out, "%12s[%d]: IKE SPIs: %J, ",
fprintf(out, "%12s[%d]: IKE SPIs: 0x%0llx_i%s 0x%0llx_r%s, ",
ike_sa->get_name(ike_sa), ike_sa->get_unique_id(ike_sa),
ike_sa->get_id(ike_sa));
id->get_initiator_spi(id), id->is_initiator(id) ? "*" : "",
id->get_responder_spi(id), id->is_initiator(id) ? "" : "");
ike_sa->get_stats(ike_sa, &next);
if (next)