CERN org.glite.Gfal
2.0.1
|
00001 /* 00002 * Copyright (c) Members of the EGEE Collaboration. 2004. 00003 * See http://www.eu-egee.org/partners/ for details on the copyright holders. 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00025 #include <lber.h> 00026 #include <ldap.h> 00027 00028 struct _gfal_mds_ldap{ 00029 int (*ldap_initialize)(LDAP **ldp, const char *uri); 00030 00031 int (*ldap_sasl_bind_s)(LDAP *ld, const char *dn, const char *mechanism, 00032 struct berval *cred, LDAPControl *sctrls[], 00033 LDAPControl *cctrls[], struct berval **servercredp); 00034 00035 int (*ldap_search_ext_s)( 00036 LDAP *ld, 00037 LDAP_CONST char *base, 00038 int scope, 00039 LDAP_CONST char *filter, 00040 char **attrs, 00041 int attrsonly, 00042 LDAPControl **serverctrls, 00043 LDAPControl **clientctrls, 00044 struct timeval *timeout, 00045 int sizelimit, 00046 LDAPMessage **res ); 00047 00048 int (*ldap_unbind_ext_s) ( 00049 LDAP *ld, 00050 LDAPControl **serverctrls, 00051 LDAPControl **clientctrls); 00052 00053 LDAPMessage* (*ldap_first_entry)( LDAP *ld, LDAPMessage *result ); 00054 00055 LDAPMessage* (*ldap_next_entry)( LDAP *ld, LDAPMessage *entry ); 00056 00057 int (*ldap_count_entries)( LDAP *ld, LDAPMessage *result ); 00058 00059 char* (*ldap_first_attribute)( 00060 LDAP *ld, LDAPMessage *entry, BerElement **berptr ); 00061 00062 char* (*ldap_next_attribute)( 00063 LDAP *ld, LDAPMessage *entry, BerElement *ber ); 00064 00065 struct berval **(*ldap_get_values_len)(LDAP *ld, LDAPMessage *entry, const char *attr); 00066 00067 00068 void (*ldap_value_free_len) ( struct berval **vals ); 00069 00070 void (*ldap_memfree)(void * p); 00071 00072 int (*ldap_msgfree)( LDAPMessage *msg ); 00073 00074 void (*ber_free)(BerElement *ber, int freebuf); 00075 00076 00077 }; 00078 00079 extern struct _gfal_mds_ldap gfal_mds_ldap;