Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

conf_utils.h

Go to the documentation of this file.
00001 /*
00002  *  conf_utils.c - functions used to parse config options
00003  *  
00004  *  EAP-IKEv2
00005  *
00006  *  This library implements ideas of draft-tschofenig-eap-ikev2-10.txt
00007  *  Internet-Draft. Version of the document that this library corresponds
00008  *  to you can find at
00009  *  http://tools.ietf.org/wg/eap/draft-tschofenig-eap-ikev2-10.txt.
00010  *
00011  *  This file is part of libeap-ikev2.
00012  *
00013  *  libeap-ikev2 is free software; you can redistribute it and/or modify
00014  *  it under the terms of the GNU General Public License as published by
00015  *  the Free Software Foundation; either version 2 of the License, or
00016  *  (at your option) any later version.
00017  *
00018  *  libeap-ikev2 is distributed in the hope that it will be useful,
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *  GNU General Public License for more details.
00022  *
00023  *  You should have received a copy of the GNU General Public License
00024  *  along with libeap-ikev2; if not, write to the Free Software
00025  *
00026  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  *
00028  *  Copyright (C) 2005-2006 Krzysztof Rzecki <krzysztof.rzecki@ccns.pl>      
00029  *  Copyright (C) 2005-2006 Rafal Mijal <rafal.mijal@ccns.pl>                
00030  *  Copyright (C) 2005-2006 Piotr Marnik <piotr.marnik@ccns.pl>              
00031  *  Copyright (C) 2005-2006 Pawel Matejski <pawel.matejski@ccns.pl>          
00032  *
00033  */
00034 
00035 #ifndef CONF_UTILS_H
00036 #define CONF_UTILS_H
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 #include "common.h"
00042 
00049 struct TransformConfigItem
00050 {
00051     uint8_t type;           
00052     uint16_t id;            
00053     const char *name;       
00054     int variable_key_len;   
00055     int default_key_len;    
00056 };
00057 
00058 
00063 struct IdTypeConfigItem
00064 {
00065     uint8_t type;          
00066     const char *name;      
00067 };
00068 
00069 const char* GetTransformName(int type,int alg);
00070 int TransformFromName(const char *name, uint8_t type, uint8_t *id,uint16_t *keylen);
00071 int IdTypeFromName(const char *name);
00072 int AuthtypeFromName(const char *authtype_name);
00073 uint16_t extractKeyLen(const char *alg);
00074 const struct TransformConfigItem* GetAvailableTransformsTypes(void);
00075 const struct IdTypeConfigItem* GetAvailableIdTypes(void);
00076 
00077 
00078 #ifdef __cplusplus
00079 }
00080 #endif
00081 
00082 #endif //CONF_UTILS_H

Project hosted by: SourceForge.net Logo