]> git.sur5r.net Git - openldap/blobdiff - include/ldap.h
cleanup
[openldap] / include / ldap.h
index 3fbf2689bd9baba78983ee60cc843a8a82cc0946..09019f507cda56186e73a617d437ae655af67ab2 100644 (file)
@@ -108,8 +108,9 @@ LDAP_BEGIN_DECL
 #define LDAP_OPT_DEBUG_LEVEL           0x5001  /* debug level */
 #define LDAP_OPT_TIMEOUT                       0x5002  /* default timeout */
 #define LDAP_OPT_REFHOPLIMIT           0x5003  /* ref hop limit */
-#define LDAP_OPT_NETWORK_TIMEOUT        0x5005  /* socket level timeout */
+#define LDAP_OPT_NETWORK_TIMEOUT       0x5005  /* socket level timeout */
 #define LDAP_OPT_URI                           0x5006
+#define LDAP_OPT_REFERRAL_URLS      0x5007  /* Referral URLs */
 
 /* OpenLDAP TLS options */
 #define LDAP_OPT_X_TLS                         0x6000
@@ -188,18 +189,27 @@ typedef struct ldapcontrol {
 #define LDAP_CHASE_EXTERNAL_REFERRALS  0x0040U
 #endif
 
+#define LDAP_CONTROL_PROXY_AUTHZ       "2.16.840.1.113730.3.4.18"
 #define LDAP_CONTROL_MANAGEDSAIT       "2.16.840.1.113730.3.4.2"
 #define LDAP_CONTROL_SUBENTRIES                "1.3.6.1.4.1.4203.1.10.1"
-#define LDAP_CONTROL_NOOP                      "1.3.6.1.4.1.4203.666.5.2"
+#define LDAP_CONTROL_NOOP                      "1.3.6.1.4.1.4203.1.10.2"
 
+#if 0
 #define LDAP_CONTROL_DUPENT_REQUEST            "2.16.840.1.113719.1.27.101.1"
 #define LDAP_CONTROL_DUPENT_RESPONSE   "2.16.840.1.113719.1.27.101.2"
 #define LDAP_CONTROL_DUPENT_ENTRY              "2.16.840.1.113719.1.27.101.3"
 #define LDAP_CONTROL_DUPENT    LDAP_CONTROL_DUPENT_REQUEST
+#endif
 
-#if 0
-#define LDAP_CONTROL_PAGEDRESULTS_REQUEST      "1.2.840.113556.1.4.319"
-#define LDAP_CONTROL_PAGEDRESULTS_RESPONSE     "1.2.840.113556.1.4.320"
+#define LDAP_CONTROL_PAGEDRESULTS      "1.2.840.113556.1.4.319"
+
+/*
+#define LDAP_CLIENT_UPDATE 1
+*/
+#ifdef LDAP_CLIENT_UPDATE
+#define LDAP_CONTROL_CLIENT_UPDATE             "1.3.6.1.4.1.4203.666.5.3"
+#define LDAP_CONTROL_ENTRY_UPDATE              "1.3.6.1.4.1.4203.666.5.4"
+#define LDAP_CONTROL_CLIENT_UPDATE_DONE        "1.3.6.1.4.1.4203.666.5.5"
 #endif
 
 #define LDAP_CONTROL_SORTREQUEST    "1.2.840.113556.1.4.473"
@@ -222,6 +232,7 @@ typedef struct ldapcontrol {
 #define LDAP_TAG_EXOP_MODIFY_PASSWD_NEW        ((ber_tag_t) 0x82U)
 #define LDAP_TAG_EXOP_MODIFY_PASSWD_GEN        ((ber_tag_t) 0x80U)
 
+#define LDAP_EXOP_X_CANCEL             "1.3.6.1.4.1.4203.666.6.3"
 #define LDAP_EXOP_X_WHO_AM_I   "1.3.6.1.4.1.4203.1.11.3"
 
 /* LDAP Features */
@@ -255,8 +266,18 @@ typedef struct ldapcontrol {
 /* general stuff */
 #define LDAP_TAG_MESSAGE       ((ber_tag_t) 0x30U)     /* constructed + 16 */
 #define LDAP_TAG_MSGID         ((ber_tag_t) 0x02U)     /* integer */
+
+#ifdef LDAP_CLIENT_UPDATE
+#define LDAP_TAG_INTERVAL      ((ber_tag_t) 0x02U)     /* integer */
+#endif /* LDAP_CLIENT_UPDATE */
+
 #define LDAP_TAG_LDAPDN                ((ber_tag_t) 0x04U)     /* octet string */
 #define LDAP_TAG_LDAPCRED      ((ber_tag_t) 0x04U)     /* octet string */
+
+#ifdef LDAP_CLIENT_UPDATE
+#define LDAP_TAG_COOKIE                ((ber_tag_t) 0x30U)     /* sequence */
+#endif /* LDAP_CLIENT_UPDATE */
+
 #define LDAP_TAG_CONTROLS      ((ber_tag_t) 0xa0U)     /* context specific + constructed + 0 */
 #define LDAP_TAG_REFERRAL      ((ber_tag_t) 0xa3U)     /* context specific + constructed + 3 */
 
@@ -392,8 +413,9 @@ typedef struct ldapcontrol {
 #define LDAP_IS_LEAF                   0x23 /* not LDAPv3 */
 #define LDAP_ALIAS_DEREF_PROBLEM       0x24
 
-#define LDAP_SECURITY_ERROR(n) LDAP_RANGE((n),0x30,0x32) /* 48-50 */
+#define LDAP_SECURITY_ERROR(n) LDAP_RANGE((n),0x2F,0x32) /* 47-50 */
 
+#define LDAP_PROXY_AUTHZ_FAILURE       0x2F /* LDAPv3 proxy authorization */
 #define LDAP_INAPPROPRIATE_AUTH                0x30
 #define LDAP_INVALID_CREDENTIALS       0x31
 #define LDAP_INSUFFICIENT_ACCESS       0x32
@@ -443,6 +465,24 @@ typedef struct ldapcontrol {
 #define LDAP_CLIENT_LOOP                               0x60    /* draft-ietf-ldap-c-api-xx */
 #define LDAP_REFERRAL_LIMIT_EXCEEDED   0x61    /* draft-ietf-ldap-c-api-xx */
 
+#ifdef LDAP_CLIENT_UPDATE
+/* resultCode for LCUP */
+#define LDAP_CUP_RESOURCES_EXHAUSTED   0x62
+#define LDAP_CUP_SECURITY_VIOLATION            0x63
+#define LDAP_CUP_INVALID_COOKIE                0x64
+#define LDAP_CUP_UNSUPPORTED_SCHEME            0x65
+#define LDAP_CUP_CLIENT_DISCONNECT             0x66
+#define LDAP_CUP_RELOAD_REQUIRED               0x67
+
+/* LCUP update type */
+#define LDAP_CUP_SYNC_ONLY                     0x00
+#define LDAP_CUP_SYNC_AND_PERSIST      0x01
+#define LDAP_CUP_PERSIST_ONLY          0x02
+
+/* LCUP default cookie interval */
+#define LDAP_CUP_DEFAULT_SEND_COOKIE_INTERVAL  0x01
+#endif /* LDAP_CLIENT_UPDATE */
+
 /*
  * This structure represents both ldap messages and ldap responses.
  * These are really the same, except in the case of search responses,
@@ -827,6 +867,24 @@ LDAP_F( void )
 ldap_uncache_request LDAP_P(( LDAP *ld, int msgid ));
 
 
+/*
+ * LDAP Cancel Extended Operation <draft-zeilenga-ldap-cancel-xx.txt>
+ */
+
+LDAP_F( int )
+ldap_cancel LDAP_P(( LDAP *ld,
+       int cancelid,
+       LDAPControl             **sctrls,
+       LDAPControl             **cctrls,
+       int                             *msgidp ));
+
+LDAP_F( int )
+ldap_cancel_s LDAP_P((
+       LDAP *ld,
+       int cancelid,
+       LDAPControl **sctrl,
+       LDAPControl **cctrl ));
+
 /*
  * in compare.c:
  */
@@ -1266,6 +1324,15 @@ ldap_dcedn2dn LDAP_P(( LDAP_CONST char *dce ));  /* deprecated */
 LDAP_F( char * )
 ldap_dn2ad_canonical LDAP_P(( LDAP_CONST char *dn ));  /* deprecated */
 
+LDAP_F( int )
+ldap_get_dn_ber LDAP_P((
+       LDAP *ld, LDAPMessage *e, BerElement **berout, struct berval *dn ));
+
+LDAP_F( int )
+ldap_get_attribute_ber LDAP_P((
+       LDAP *ld, LDAPMessage *e, BerElement *ber, struct berval *attr,
+       struct berval **vals ));
+
 /*
  * in getattr.c
  */
@@ -1597,6 +1664,28 @@ ldap_parse_vlv_control LDAP_P((
        struct berval **contextp,
        int           *errcodep ));
 
+/*
+ * LDAP Who Am I? (whoami.c)
+ */
+
+LDAP_F( int )
+ldap_parse_whoami LDAP_P((
+       LDAP *ld,
+       LDAPMessage *res,
+       struct berval **authzid ));
+
+LDAP_F( int )
+ldap_whoami LDAP_P(( LDAP *ld,
+       LDAPControl             **sctrls,
+       LDAPControl             **cctrls,
+       int                             *msgidp ));
+
+LDAP_F( int )
+ldap_whoami_s LDAP_P((
+       LDAP *ld,
+       struct berval **authzid,
+       LDAPControl **sctrls,
+       LDAPControl **cctrls ));
 
 LDAP_END_DECL
 #endif /* _LDAP_H */