Annotation of embedaddon/strongswan/src/libcharon/plugins/load_tester/load_tester_listener.h, revision 1.1

1.1     ! misho       1: /*
        !             2:  * Copyright (C) 2008 Martin Willi
        !             3:  * HSR Hochschule fuer Technik Rapperswil
        !             4:  *
        !             5:  * This program is free software; you can redistribute it and/or modify it
        !             6:  * under the terms of the GNU General Public License as published by the
        !             7:  * Free Software Foundation; either version 2 of the License, or (at your
        !             8:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
        !             9:  *
        !            10:  * This program is distributed in the hope that it will be useful, but
        !            11:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
        !            12:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        !            13:  * for more details.
        !            14:  */
        !            15: 
        !            16: /**
        !            17:  * @defgroup load_tester_listener_t load_tester_listener
        !            18:  * @{ @ingroup load_tester
        !            19:  */
        !            20: 
        !            21: #ifndef LOAD_TESTER_LISTENER_H_
        !            22: #define LOAD_TESTER_LISTENER_H_
        !            23: 
        !            24: #include <bus/bus.h>
        !            25: 
        !            26: #include "load_tester_config.h"
        !            27: 
        !            28: typedef struct load_tester_listener_t load_tester_listener_t;
        !            29: 
        !            30: /**
        !            31:  * Provide hard-coded credentials for load testing.
        !            32:  */
        !            33: struct load_tester_listener_t {
        !            34: 
        !            35:        /**
        !            36:         * Implements listener set interface.
        !            37:         */
        !            38:        listener_t listener;
        !            39: 
        !            40:        /**
        !            41:         * Get the number of established IKE_SAs.
        !            42:         *
        !            43:         * @return                      number of SAs currently established
        !            44:         */
        !            45:        u_int (*get_established)(load_tester_listener_t *this);
        !            46: 
        !            47:        /**
        !            48:         * Destroy the backend.
        !            49:         */
        !            50:        void (*destroy)(load_tester_listener_t *this);
        !            51: };
        !            52: 
        !            53: /**
        !            54:  * Create a listener to handle special events during load test
        !            55:  *
        !            56:  * @param shutdown_on  shut down the daemon after this many SAs are established
        !            57:  * @param config               configuration backend
        !            58:  * @return                             listener
        !            59:  */
        !            60: load_tester_listener_t *load_tester_listener_create(u_int shutdown_on,
        !            61:                                                                                                        load_tester_config_t *config);
        !            62: 
        !            63: #endif /** LOAD_TESTER_LISTENER_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>