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

_lcas_utils.h

Go to the documentation of this file.
00001 /*                                                                                                            
00002  * Copyright (c) Members of the EGEE Collaboration. 2004.
00003  * See http://eu-egee.org/partners/ for details on the copyright holders.
00004  * For license conditions see the license file or
00005  * http://eu-egee.org/license.html
00006  */
00007 
00008 /*                                                                                                            
00009  * Copyright (c) 2001 EU DataGrid.                                                                             
00010  * For license conditions see http://www.eu-datagrid.org/license.html                                          
00011  *
00012  * Copyright (c) 2001, 2002 by 
00013  *     Martijn Steenbakkers <martijn@nikhef.nl>,
00014  *     David Groep <davidg@nikhef.nl>,
00015  *     NIKHEF Amsterdam, the Netherlands
00016  */
00017 
00030 #ifndef _LCAS_UTILS_H
00031 #define _LCAS_UTILS_H
00032 
00033 /******************************************************************************
00034                              Include header files
00035 ******************************************************************************/
00036 #include <gssapi.h>
00037 #include "lcas_types.h"
00038 #include "lcas_utils.h"
00039 
00040 /******************************************************************************
00041  *                            Module definition
00042  *****************************************************************************/
00043 
00045  /* Beginning of credential functions */
00046 /******************************************************************************
00047 Function:       lcas_fill_cred()
00048 Description:    Fill cedential from dn and globus credential
00049 Parameters:
00050                 dn: distinguished name
00051                 cred: globus credential
00052                 plcas_cred: pointer to lcas_credential
00053 Returns:        0: succes
00054                 1: failure
00055 ******************************************************************************/
00075 extern int lcas_fill_cred(
00076         char * dn,
00077         gss_cred_id_t cred,
00078         lcas_cred_id_t * plcas_cred
00079 );
00080 /******************************************************************************
00081 Function:       lcas_release_cred()
00082 Description:    release lcas credential
00083 Parameters:
00084                 plcas_cred: pointer to lcas_credential
00085 Returns:        0: succes
00086                 1: failure
00087 ******************************************************************************/
00098 extern int lcas_release_cred(
00099         lcas_cred_id_t * plcas_cred
00100 ); /* End of credential functions */
00102 
00103 /******************************************************************************
00104         OTHER STUFF
00105 ******************************************************************************/
00107  /* Beginning of other functions */
00108 /******************************************************************************
00109 Function:   lcas_tokenize() (in modified form from globus_gatekeeper_utils.c)
00110 
00111 Description:
00112     Breakup the command in to args, pointing the args array
00113     at the tokens. Replace white space at the end of each
00114     token with a null. A token maybe in quotes. 
00115 
00116 Parameters:
00117     command: The command line to be parsed.
00118     args:    A pointer to an array of pointers to be filled it
00119     n:       Size of the array, on input, and set to size used on output. 
00120     sep:     string of separating characters
00121 
00122 Returns:
00123     0 on success. 
00124     -1 on to malloc
00125     -2 on to many args
00126     -3 on quote not matched
00127 ******************************************************************************/
00150 extern int lcas_tokenize(
00151         const char * command, 
00152         char ** args,
00153         int * n,
00154         char * sep
00155 ); /* End of other functions */
00157 
00158 #endif /* _LCAS_UTILS_H */
00159 
00160 /******************************************************************************
00161 CVS Information:
00162     $Source: /cvs/jra1mw/org.glite.security.lcas/src/_lcas_utils.h,v $
00163     $Date: 2005/02/28 11:45:52 $
00164     $Revision: 2.5 $
00165     $Author: msteenba $
00166 ******************************************************************************/

Generated on Fri May 27 18:10:48 2005 for lcas by doxygen 1.3.5