]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
More for ITS#5245
[openldap] / include / ldap.h
index 35187aeb6d3c8f2fefbf5608e7592a32b2e9cdda..db4500d6944c39dd9fb6f1d330bd71091e6ff38d 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  * 
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2008 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -122,6 +122,7 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_REFERRAL_URLS      0x5007  /* Referral URLs */
 #define LDAP_OPT_SOCKBUF            0x5008  /* sockbuf */
 #define LDAP_OPT_DEFBASE               0x5009  /* searchbase */
+#define        LDAP_OPT_CONNECT_ASYNC          0x5010  /* create connections asynchronously */
 
 /* OpenLDAP TLS options */
 #define LDAP_OPT_X_TLS                         0x6000
@@ -140,6 +141,7 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_X_TLS_CONNECT_ARG     0x600d
 #define LDAP_OPT_X_TLS_DHFILE          0x600e
 #define LDAP_OPT_X_TLS_NEWCTX          0x600f
+#define LDAP_OPT_X_TLS_CRLFILE         0x6010  /* GNUtls only */
 
 #define LDAP_OPT_X_TLS_NEVER   0
 #define LDAP_OPT_X_TLS_HARD            1
@@ -287,11 +289,22 @@ typedef struct ldapcontrol {
 #define LDAP_CONTROL_X_SEARCH_OPTIONS          "1.2.840.113556.1.4.1340"
 #define LDAP_SEARCH_FLAG_DOMAIN_SCOPE 1 /* do not generate referrals */
 #define LDAP_SEARCH_FLAG_PHANTOM_ROOT 2 /* search all subordinate NCs */
+#define LDAP_CONTROL_X_TREE_DELETE             "1.2.840.113556.1.4.805"
 
 /* MS Active Directory controls - not implemented in slapd(8) */
-#define LDAP_CONTROL_X_TREE_DELETE             "1.2.840.113556.1.4.805"
 #define LDAP_CONTROL_X_EXTENDED_DN             "1.2.840.113556.1.4.529"
 
+#ifdef LDAP_DEVEL
+/* <draft-wahl-ldap-session> */
+#define LDAP_CONTROL_X_SESSION_TRACKING                "1.3.6.1.4.1.21008.108.63.1"
+#define LDAP_CONTROL_X_SESSION_TRACKING_RADIUS_ACCT_SESSION_ID \
+                                               LDAP_CONTROL_X_SESSION_TRACKING ".1"
+#define LDAP_CONTROL_X_SESSION_TRACKING_RADIUS_ACCT_MULTI_SESSION_ID \
+                                               LDAP_CONTROL_X_SESSION_TRACKING ".2"
+#define LDAP_CONTROL_X_SESSION_TRACKING_USERNAME \
+                                               LDAP_CONTROL_X_SESSION_TRACKING ".3"
+#endif /* LDAP_DEVEL */
+
 /* various expired works */
 /* LDAP Duplicated Entry Control Extension *//* not implemented in slapd(8) */
 #define LDAP_CONTROL_DUPENT_REQUEST            "2.16.840.1.113719.1.27.101.1"
@@ -653,6 +666,7 @@ typedef struct ldapcontrol {
 #define LDAP_MORE_RESULTS_TO_RETURN            (-15)   /* Obsolete */
 #define LDAP_CLIENT_LOOP                               (-16)
 #define LDAP_REFERRAL_LIMIT_EXCEEDED   (-17)
+#define        LDAP_X_CONNECTING                       (-18)
 
 
 /*
@@ -927,17 +941,33 @@ ldap_set_urllist_proc LDAP_P((
 /*
  * in controls.c:
  */
+#if LDAP_DEPRECATED    
 LDAP_F( int )
-ldap_create_control LDAP_P((
+ldap_create_control LDAP_P((   /* deprecated, use ldap_control_create */
        LDAP_CONST char *requestOID,
        BerElement *ber,
        int iscritical,
        LDAPControl **ctrlp ));
 
 LDAP_F( LDAPControl * )
-ldap_find_control LDAP_P((
+ldap_find_control LDAP_P((     /* deprecated, use ldap_control_find */
        LDAP_CONST char *oid,
        LDAPControl **ctrls ));
+#endif
+
+LDAP_F( int )
+ldap_control_create LDAP_P((
+       LDAP_CONST char *requestOID,
+       int iscritical,
+       struct berval *value,
+       int dupval,
+       LDAPControl **ctrlp ));
+
+LDAP_F( LDAPControl * )
+ldap_control_find LDAP_P((
+       LDAP_CONST char *oid,
+       LDAPControl **ctrls,
+       LDAPControl ***nextctrlp ));
 
 LDAP_F( void )
 ldap_control_free LDAP_P((
@@ -947,6 +977,14 @@ LDAP_F( void )
 ldap_controls_free LDAP_P((
        LDAPControl **ctrls ));
 
+LDAP_F( LDAPControl ** )
+ldap_controls_dup LDAP_P((
+       LDAPControl *LDAP_CONST *controls ));
+
+LDAP_F( LDAPControl * )
+ldap_control_dup LDAP_P((
+       LDAP_CONST LDAPControl *c ));
+
 /*
  * in dnssrv.c:
  */
@@ -1151,35 +1189,6 @@ ldap_simple_bind_s LDAP_P(( /* deprecated, use ldap_sasl_bind_s */
        LDAP_CONST char *who,
        LDAP_CONST char *passwd ));
 
-
-/*
- * in kbind.c:
- *     (deprecated - use SASL instead)
- */
-LDAP_F( int )
-ldap_kerberos_bind_s LDAP_P((  /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *who ));
-
-LDAP_F( int )
-ldap_kerberos_bind1 LDAP_P((   /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *who ));
-
-LDAP_F( int )
-ldap_kerberos_bind1_s LDAP_P(( /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *who ));
-
-LDAP_F( int )
-ldap_kerberos_bind2 LDAP_P((   /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *who ));
-
-LDAP_F( int )
-ldap_kerberos_bind2_s LDAP_P(( /* deprecated */
-       LDAP *ld,
-       LDAP_CONST char *who ));
 #endif
 
 
@@ -1709,7 +1718,7 @@ ldap_count_values LDAP_P((        /* deprecated, use ldap_count_values_len */
        char **vals ));
 
 LDAP_F( void )
-ldap_value_free LDAP_P((       /* deprecated, use ldap_values_free_len */
+ldap_value_free LDAP_P((       /* deprecated, use ldap_value_free_len */
        char **vals ));
 #endif
 
@@ -2300,5 +2309,39 @@ LDAP_F( int )
 ldap_sync_poll LDAP_P((
        ldap_sync_t     *ls ));
 
+#ifdef LDAP_CONTROL_X_SESSION_TRACKING
+
+/*
+ * in stctrl.c
+ */
+LDAP_F( int )
+ldap_create_session_tracking_value LDAP_P((
+       LDAP            *ld,
+       char            *sessionSourceIp,
+       char            *sessionSourceName,
+       char            *formatOID,
+       struct berval   *sessionTrackingIdentifier,
+       struct berval   *value ));
+
+LDAP_F( int )
+ldap_create_session_tracking LDAP_P((
+       LDAP            *ld,
+       char            *sessionSourceIp,
+       char            *sessionSourceName,
+       char            *formatOID,
+       struct berval   *sessionTrackingIdentifier,
+       LDAPControl     **ctrlp ));
+
+LDAP_F( int )
+ldap_parse_session_tracking_control LDAP_P((
+       LDAP *ld,
+       LDAPControl *ctrl,
+       struct berval *ip,
+       struct berval *name,
+       struct berval *oid,
+       struct berval *id ));
+
+#endif /* LDAP_CONTROL_X_SESSION_TRACKING */
+
 LDAP_END_DECL
 #endif /* _LDAP_H */