Annotation of embedaddon/strongswan/src/libcharon/plugins/ha/ha_dispatcher.h, revision 1.1.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 ha_dispatcher ha_dispatcher
                     18:  * @{ @ingroup ha
                     19:  */
                     20: 
                     21: #ifndef HA_DISPATCHER_H_
                     22: #define HA_DISPATCHER_H_
                     23: 
                     24: #include "ha_socket.h"
                     25: #include "ha_segments.h"
                     26: #include "ha_cache.h"
                     27: #include "ha_kernel.h"
                     28: #include "ha_attribute.h"
                     29: 
                     30: typedef struct ha_dispatcher_t ha_dispatcher_t;
                     31: 
                     32: /**
                     33:  * The dispatcher pulls messages in a thread an processes them.
                     34:  */
                     35: struct ha_dispatcher_t {
                     36: 
                     37:        /**
                     38:         * Destroy a ha_dispatcher_t.
                     39:         */
                     40:        void (*destroy)(ha_dispatcher_t *this);
                     41: };
                     42: 
                     43: /**
                     44:  * Create a ha_dispatcher instance pulling from socket.
                     45:  *
                     46:  * @param socket               socket to pull messages from
                     47:  * @param segments             segments to control based on received messages
                     48:  * @param cache                        message cache to use for resynchronization
                     49:  * @param kernel               kernel helper
                     50:  * @param attr                 HA enabled pool
                     51:  * @return                             dispatcher object
                     52:  */
                     53: ha_dispatcher_t *ha_dispatcher_create(ha_socket_t *socket,
                     54:                                                                        ha_segments_t *segments, ha_cache_t *cache,
                     55:                                                                        ha_kernel_t *kernel, ha_attribute_t *attr);
                     56: 
                     57: #endif /** HA_DISPATCHER_ @}*/

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