]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
More for ITS#5245
[openldap] / include / ldap.h
index 2e5500da77672bea30db49738377bcf74ea60e9e..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
@@ -294,6 +294,17 @@ typedef struct ldapcontrol {
 /* MS Active Directory controls - not implemented in slapd(8) */
 #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"
@@ -930,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((
@@ -950,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:
  */
@@ -2274,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 */