Return to eap_peap_avp.h CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / libcharon / plugins / eap_peap |
1.1 misho 1: /* 2: * Copyright (C) 2011 Andreas Steffen 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 eap_peap_avp eap_peap_avp 18: * @{ @ingroup eap_peap 19: */ 20: 21: #ifndef EAP_PEAP_AVP_H_ 22: #define EAP_PEAP_AVP_H_ 23: 24: typedef struct eap_peap_avp_t eap_peap_avp_t; 25: 26: #include <library.h> 27: 28: #include <bio/bio_reader.h> 29: #include <bio/bio_writer.h> 30: 31: /** 32: * EAP-PEAP Attribute-Value Pair (AVP) handler. 33: */ 34: struct eap_peap_avp_t { 35: 36: /** 37: * Process received EAP-PEAP Message AVP. 38: * 39: * @param reader TLS data buffer 40: * @param data received EAP Message 41: * @param identifier EAP-PEAP message identifier 42: * @return 43: * - SUCCESS if AVP processing succeeded 44: * - FAILED if AVP processing failed 45: * - NEED_MORE if another invocation of process/build needed 46: */ 47: status_t (*process)(eap_peap_avp_t *this, bio_reader_t *reader, 48: chunk_t *data, uint8_t identifier); 49: 50: /** 51: * Build EAP-PEAP Message AVP to send out. 52: * 53: * @param writer TLS data buffer to write to 54: * @param data EAP Message to send 55: */ 56: void (*build)(eap_peap_avp_t *this, bio_writer_t *writer, chunk_t data); 57: 58: /** 59: * Destroy a eap_peap_application_t. 60: */ 61: void (*destroy)(eap_peap_avp_t *this); 62: }; 63: 64: /** 65: * Create an eap_peap_avp instance. 66: * 67: * @param is_server TRUE iv eap server, FALSE if eap peer 68: */ 69: eap_peap_avp_t *eap_peap_avp_create(bool is_server); 70: 71: #endif /** EAP_PEAP_AVP_H_ @}*/