Annotation of embedaddon/strongswan/src/libcharon/plugins/eap_radius/eap_radius_accounting.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2017-2018 Tobias Brunner
                      3:  * HSR Hochschule fuer Technik Rapperswil
                      4:  *
                      5:  * Copyright (C) 2012 Martin Willi
                      6:  * Copyright (C) 2012 revosec AG
                      7:  *
                      8:  * This program is free software; you can redistribute it and/or modify it
                      9:  * under the terms of the GNU General Public License as published by the
                     10:  * Free Software Foundation; either version 2 of the License, or (at your
                     11:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
                     12:  *
                     13:  * This program is distributed in the hope that it will be useful, but
                     14:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     15:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     16:  * for more details.
                     17:  */
                     18: 
                     19: /**
                     20:  * @defgroup eap_radius_accounting eap_radius_accounting
                     21:  * @{ @ingroup eap_radius
                     22:  */
                     23: 
                     24: #ifndef EAP_RADIUS_ACCOUNTING_H_
                     25: #define EAP_RADIUS_ACCOUNTING_H_
                     26: 
                     27: #include <bus/listeners/listener.h>
                     28: 
                     29: typedef struct eap_radius_accounting_t eap_radius_accounting_t;
                     30: 
                     31: /**
                     32:  * RADIUS accounting for IKE/IPsec.
                     33:  */
                     34: struct eap_radius_accounting_t {
                     35: 
                     36:        /**
                     37:         * Implements listener_t.
                     38:         */
                     39:        listener_t listener;
                     40: 
                     41:        /**
                     42:         * Destroy a eap_radius_accounting_t.
                     43:         */
                     44:        void (*destroy)(eap_radius_accounting_t *this);
                     45: };
                     46: 
                     47: /**
                     48:  * Create a eap_radius_accounting instance.
                     49:  */
                     50: eap_radius_accounting_t *eap_radius_accounting_create();
                     51: 
                     52: /**
                     53:  * Get the Accounting session ID for the given IKE_SA.
                     54:  *
                     55:  * @param ike_sa                       IKE_SA for which to determine the session ID
                     56:  * @return                                     allocated session ID
                     57:  */
                     58: char *eap_radius_accounting_session_id(ike_sa_t *ike_sa);
                     59: 
                     60: /**
                     61:  * Schedule Accounting interim updates for the given IKE_SA.
                     62:  *
                     63:  * @param ike_sa                       IKE_SA to send updates for
                     64:  * @param interval                     interval for interim updates
                     65:  */
                     66: void eap_radius_accounting_start_interim(ike_sa_t *ike_sa, uint32_t interval);
                     67: 
                     68: /**
                     69:  * Add a Class attribute for the given IKE_SA.
                     70:  *
                     71:  * @param ike_sa                       IKE_SA for which the attribute was received
                     72:  * @param cls                          Class attribute value
                     73:  */
                     74: void eap_radius_accounting_add_class(ike_sa_t *ike_sa, chunk_t cls);
                     75: 
                     76: #endif /** EAP_RADIUS_ACCOUNTING_H_ @}*/

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