Commit 7c9a2f46 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

preliminary modify/increment client side code

parent afa2cd18
......@@ -248,6 +248,7 @@ typedef struct ldapcontrol {
#define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3" /* (&) (|) */
#define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
#define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.1.5.6"
/*
* specific LDAP instantiations of BER types we know about
......@@ -506,9 +507,11 @@ typedef struct ldapmsg LDAPMessage;
typedef struct ldapmod {
int mod_op;
#define LDAP_MOD_OP (0x0007)
#define LDAP_MOD_ADD (0x0000)
#define LDAP_MOD_DELETE (0x0001)
#define LDAP_MOD_REPLACE (0x0002)
#define LDAP_MOD_INCREMENT (0x0003)
#define LDAP_MOD_BVALUES (0x0080)
/* IMPORTANT: do not use code 0x1000 (or above),
* it is used internally by the backends!
......
......@@ -41,7 +41,9 @@
* Example:
* LDAPMod *mods[] = {
* { LDAP_MOD_ADD, "cn", { "babs jensen", "babs", 0 } },
* { LDAP_MOD_REPLACE, "sn", { "jensen", 0 } },
* { LDAP_MOD_REPLACE, "sn", { "babs jensen", "babs", 0 } },
* { LDAP_MOD_DELETE, "ou", 0 },
* { LDAP_MOD_INCREMENT, "uidNumber, { "1", 0 } }
* 0
* }
* rc= ldap_modify_ext( ld, dn, mods, sctrls, cctrls, &msgid );
......@@ -65,8 +67,9 @@ ldap_modify_ext( LDAP *ld,
* modifications SEQUENCE OF SEQUENCE {
* operation ENUMERATED {
* add (0),
* delete (1),
* replace (2)
* delete (1),
* replace (2),
* increment (3) -- extension
* },
* modification SEQUENCE {
* type AttributeType,
......@@ -155,7 +158,9 @@ ldap_modify_ext( LDAP *ld,
* Example:
* LDAPMod *mods[] = {
* { LDAP_MOD_ADD, "cn", { "babs jensen", "babs", 0 } },
* { LDAP_MOD_REPLACE, "sn", { "jensen", 0 } },
* { LDAP_MOD_REPLACE, "sn", { "babs jensen", "babs", 0 } },
* { LDAP_MOD_DELETE, "ou", 0 },
* { LDAP_MOD_INCREMENT, "uidNumber, { "1", 0 } }
* 0
* }
* msgid = ldap_modify( ld, dn, mods );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment