RXLDAP 0.21 (2001-11-26)

名前: RXLDAP バージョン: 0.21 2001-11-26 作者: 矢野崇 (IBM: tyano@yamato.ibm.com, Internet: tyano@tk.airnet.ne.jp) 機能: OS/2 REXX用LDAP API 前提条件: OS/2 Warp4以降 OS/2にTCP/IP機能がインストールされていること。 変更履歴: 2001-11-26 0.21: 英語のドキュメントを加えた。 Rxldap_search_ext_sでsizelimitパラメータが正しく渡されていなかったのを修正。 Rxldap_search_ext_s/Rxldap_search_ext/utf8tostrでのメモリリークの修正。 2001-11-22 0.20: UTF-8のサポートを加えた。 RxldapToUTF8を追加した。 RxldapFromUTF8を追加した。 2001-11-16 0.11: OpenLDAP SDKのサブセットからRXLDAPに不要な物を除いた。 2001-11-14 0.10: OpenLDAPのSDKをOS/2に移植したものを使用した。 LDAP.DLLを不要にした。 Rxldap_count_attributesを削除した。 Rxldap_parse_resultでerrcodevarname、matcheddnvarname、errmsgvarnameを省略可能にした。 Rxldap_resultのallパラメータに関する制限がなくなった。 Rxldap_search_stがldap_search_stを呼び出すようにした。 Rxldap_url_search_stがldap_url_search_stを呼び出すようにした。 エラーコードシンボルをOpenLDAPに合わせた。 メッセージタイプシンボルをOpenLDAPに合わせた。 オプションシンボルをOpenLDAPに合わせた。 スコープシンボルをOpenLDAPに合わせた。 サンプルを新仕様に合わせて変更した。 パッケージにLdap SDK for OS/2のサブセットを含めた。 (IBM C/C++3.6, TCP/IP for OS/2 V4.0用) 2001-11-02 0.02: Rxldap_parse_resultでmatcheddnvarnameを省略不可にした。(トラップ回避、本来は省略可) Rxldap_parse_resultでerrcodevarnameを省略不可にした。(トラップ回避、本来は省略可) Rxldap_parse_resultでerrmsgvarnameを省略不可にした。(トラップ回避、本来は省略可) Rxldap_parse_resultで返すerrcodeを数字からシンボルにした。 Rxldap_resultでmsgidにLDAP_RES_*のシンボルも使えるようにした。 2001-10-31 0.01: Rxldap_resultでtimeoutを省略可能にした。 2001-10-30 0.00: 最初のリリース ★APIのパラメータの説明 ld: LDAP *、符号無し整数値 msg: LDAPMessage *、符号なし整数値 msgid: メッセージID、整数値 port: ポート番号、整数値 ldapctrl: LDAPControl **、stem変数 ldapctrl.0 = 数 ldapctrl.n.!ldctl_oid = 文字列 ldapctrl.n.!ldctl_value = 文字列 ldapctrl.n.!ldctl_iscritical = 数値 dn: エントリーのDistinguished Name mods: LDAPMod **、stem変数 mods.0 = 数 mods.n.!mod_op = 操作、文字列または数字* mods.n.!mod_type = アトリビュート名 mods.n.!modv.0 = 数 mods.n.!modv.m = 値、文字列 *: "LDAP_MOD_ADD" "LDAP_MOD_ADD|LDAP_MOD_BVALUES" "LDAP_MOD_DELETE" "LDAP_MOD_DELETE|LDAP_MOD_BVALUES" "LDAP_MOD_REPLACE" "LDAP_MOD_REPLACE|LDAP_MOD_BVALUES" 0, 1, 2, 128, 129, 130 ber: BerElement *、符号なし整数値 pw: パスワード msgtype: メッセージタイプのシンボル。 "LDAP_RES_ADD" "LDAP_RES_ANY" "LDAP_RES_BIND" "LDAP_RES_COMPARE" "LDAP_RES_DELETE" "LDAP_RES_EXTENDED" "LDAP_RES_EXTENDED_PARTIAL" "LDAP_RES_MODIFY" "LDAP_RES_RENAME" "LDAP_RES_SEARCH_ENTRY" "LDAP_RES_SEARCH_REFERENCE" "LDAP_RES_SEARCH_RESULT" "LDAP_RES_UNSOLICITED" Ldaperr: LDAPエラーコードのシンボル。 "LDAP_ADMINLIMIT_EXCEEDED" "LDAP_AFFECTS_MULTIPLE_DSAS" "LDAP_ALIAS_DEREF_PROBLEM" "LDAP_ALIAS_PROBLEM" "LDAP_ALREADY_EXISTS" "LDAP_AUTH_METHOD_NOT_SUPPORTED" "LDAP_AUTH_UNKNOWN" "LDAP_BUSY" "LDAP_CLIENT_LOOP" "LDAP_COMPARE_FALSE" "LDAP_COMPARE_TRUE" "LDAP_CONFIDENTIALITY_REQUIRED" "LDAP_CONNECT_ERROR" "LDAP_CONSTRAINT_VIOLATION" "LDAP_CONTROL_NOT_FOUND" "LDAP_DECODING_ERROR" "LDAP_ENCODING_ERROR" "LDAP_FILTER_ERROR" "LDAP_INAPPROPRIATE_AUTH" "LDAP_INAPPROPRIATE_MATCHING" "LDAP_INSUFFICIENT_ACCESS" "LDAP_INVALID_CREDENTIALS" "LDAP_INVALID_DN_SYNTAX" "LDAP_INVALID_SYNTAX" "LDAP_IS_LEAF" "LDAP_LOCAL_ERROR" "LDAP_LOOP_DETECT" "LDAP_MORE_RESULTS_TO_RETURN" "LDAP_NAMING_VIOLATION" "LDAP_NOT_ALLOWED_ON_NONLEAF" "LDAP_NOT_ALLOWED_ON_RDN" "LDAP_NOT_SUPPORTED" "LDAP_NO_MEMORY" "LDAP_NO_OBJECT_CLASS_MODS" "LDAP_NO_RESULTS_RETURNED" "LDAP_NO_SUCH_ATTRIBUTE" "LDAP_NO_SUCH_OBJECT" "LDAP_OBJECT_CLASS_VIOLATION" "LDAP_OPERATIONS_ERROR" "LDAP_OTHER" "LDAP_PARAM_ERROR" "LDAP_PARTIAL_RESULTS" "LDAP_PROTOCOL_ERROR" "LDAP_REFERRAL" "LDAP_REFERRAL_LIMIT_EXCEEDED" "LDAP_RESULTS_TOO_LARGE" "LDAP_SASL_BIND_IN_PROGRESS" "LDAP_SERVER_DOWN" "LDAP_SIZELIMIT_EXCEEDED" "LDAP_STRONG_AUTH_REQUIRED" "LDAP_SUCCESS" "LDAP_TIMELIMIT_EXCEEDED" "LDAP_TIMEOUT" "LDAP_TYPE_OR_VALUE_EXISTS" "LDAP_UNAVAILABLE" "LDAP_UNAVAILABLE_CRITICAL_EXTENSION" "LDAP_UNDEFINED_TYPE" "LDAP_UNWILLING_TO_PERFORM" "LDAP_USER_CANCELLED" option: オプションの種類。大文字小文字の区別なし。 "LDAP_OPT_API_FEATURE_INFO" "LDAP_OPT_API_INFO" "LDAP_OPT_CLIENT_CONTROLS" "LDAP_OPT_DEREF" "LDAP_OPT_ERROR_NUMBER" "LDAP_OPT_ERROR_STRING" "LDAP_OPT_HOST_NAME" "LDAP_OPT_MATCHED_DN" "LDAP_OPT_PROTOCOL_VERSION" "LDAP_OPT_REFERRALS" "LDAP_OPT_RESTART" "LDAP_OPT_SERVER_CONTROLS" "LDAP_OPT_SIZELIMIT" "LDAP_OPT_TIMELIMIT" scope: 検索範囲。大文字小文字の区別なし。 "LDAP_SCOPE_BASE" "LDAP_SCOPE_DEFAULT" "LDAP_SCOPE_ONELEVEL" "LDAP_SCOPE_SUBTREE" attrsonly: アトリビュートだけを返す時は1、値も返す時は0。 timeout: タイムアウト秒数 (例: 10, 10.0) filter: 検索フィルター。 base: 検索を開始するノードのDN。 desc: URLの要素を格納したstem変数。 desc.!lud_host = ホスト名 desc.!lud_port = ポート番号 desc.!lud_scope = 'LDAP_SCOPE_BASE', 'LDAP_SCOPE_ONELEVEL', 'LDAP_SCOPE_SUBTREE' desc.!lud_filter = 検索フィルタ desc.!lud_attrs.0 = アトリビュートの数 desc.!lud_attrs.n = アトリビュート名 ★サポートしていないIBM LDAP API (括弧内は理由) ldap_bind (旧式API) ldap_bind_s (旧式API) ldap_controls_free (REXX環境では必要なし) ldap_count_attributes (正式APIではない) ldap_count_values (REXX環境では必要なし) ldap_free_urldesc (REXX環境では必要なし) ldap_get_etnry_controls_np (正式APIではない) ldap_memfree (REXX環境では必要なし) ldap_modrdn (旧式API) ldap_modrdn_s (旧式API) ldap_mods_free (REXX環境では必要なし) ldap_open (旧式API) ldap_parse_reference_np (正式APIではない) ldap_parse_sasl_bind_result (SSLは将来サポート予定) ldap_perror (旧式API) ldap_result2error (旧式API) ldap_sasl_bind (SSLは将来サポート予定) ldap_sasl_bind_s (SSLは将来サポート予定) ldap_set_rebind_pro (正式APIではない) ldap_ssl_client_init (SSLは将来サポート予定) ldap_ssl_init (SSLは将来サポート予定) ldap_ssl_start (旧式API) ldap_value_free (REXX環境では必要なし) ldap_value_free_len (REXX環境では必要なし) ★UTF-8サポート □RXLDAPはDNをUTF-8に変換してからC APIに渡しています。REXXプログラム内でDNを UTF-8に変換してからRXLDAPに渡す必要はありません。 □RXLDAPは検索操作のフィルタをUTF-8に変換してからC APIに渡しています。REXXプロ グラム内でフィルタをUTF-8に変換してからRXLDAPに渡す必要はありません。 □RXLDAPはmods.n.!mod_opにLDAP_MOD_BVALUESの指定がなければ("LDAP_MOD_ADD", "LDAP_MOD_DELETE", "LDAP_MOD_REPLACE"ならば) REXX変数内の属性値をUTF-8に変換 してからC APIに渡しています。REXXプログラム内で属性値をUTF-8に変換してから RXLDAPに渡す必要はありません。 □RXLDAPはmods.n.!mod_opにLDAP_MOD_BVALUESの指定があれば ("LDAP_MOD_ADD|LDAP_MOD_BVALUES", "LDAP_MOD_DELETE|LDAP_MOD_BVALUES", "LDAP_MOD_REPLACE|LDAP_MOD_BVALUES"ならば) REXX変数内の属性値をそのままC API に渡しています。 □Rxldap_get_valuesは属性値をUTF-8から現行コードページのエンコーディングに変換 しています。REXXプログラム内で変換する必要はありません。 □Rxldap_get_dnはDNをUTF-8から現行コードページのエンコーディングに変換していま す。REXXプログラム内で変換する必要はありません。 □Rxldap_get_values_lenはC APIが返した属性値をそのまま返しています。 □Rxldap_compareとRxldap_compare_sは属性値をUTF-8に変換してからC APIに渡してい ます。REXXプログラム内で属性値をUTF-8に変換してからRXLDAPに渡す必要はありま せん。 □Rxldap_compare_extとRxldap_compare_ext_sはREXX変数内の属性値をそのままC APIに 渡しています。 □UTF-8への変換、UTF-8からの変換が出来ない時、RXLDAPはREXX変数内の値をそのままC APIに渡します。なお変換が旨くいくかどうかはRxldapToUTF8、RxldapFromUTF8で確か めることができます。 ★APIの説明 REXX API: RxldapLoadFuncs 機能: RXLDAP APIのロード 様式: RxldapLoadFuncs() 戻り値: RXLDAPバージョン情報 例: call RxldapLoadFuncs REXX API: RxldapDropFuncs 機能: RXLDAP APIのアンロード 様式: RxldapDropFuncs() 戻り値: "" 例: call RxldapDropFuncs REXX API: RxldapVersion 機能: RXLDAP APIのバージョン情報を返す。 様式: RxldapVersion() 戻り値: RXLDAP APIのバージョン情報 例: call RxldapVersion REXX API: RxldapToUTF8 機能: 現行コードページの文字列をUTF-8の文字列に変換する。 様式: RxldapToUTF8(str) 戻り値: UTF-8でエンコードされた文字列。変換できない時は""が返る。 例: call RxldapToUTF8 str REXX API: RxldapFromUTF8 機能: UTF-8の文字列を現行コードページの文字列に変換する。 様式: RxldapFromUTF8(utf8str) 戻り値: 現行コードページでエンコードされた文字列。変換できない時は""が返る。 例: call RxldapFromUTF8 utf8str REXX API: Rxldap_abandon 対応C API: ldap_abandon 様式: Rxldap_abandon(ld, msgid) 戻り値: 0 (成功), -1 (エラー) 例: call Rxldap_abandon ld, msgid REXX API: Rxldap_abandon_ext 対応C API: ldap_abandon_ext 様式: Rxldap_abandon(ld, msgid, serverctrlsstemname, clientctrlsstemname) 戻り値: ldaperr 引数: serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_abandon ld, msgid, 'serverctrls.', 'clientctrls.' REXX API: Rxldap_add C API: ldap_add 様式: Rxldap_add(ld, dn, modsstemname) 戻り値: msgid (成功), -1 (エラー) 引数: modsstemname = modsを格納したstem変数名 例: call Rxldap_add ld, dn, 'mods.' REXX API: Rxldap_add_s 対応C API: ldap_add_s 様式: Rxldap_add_s(ld, dn, modsstemname) 戻り値: ldaperr 引数: modsstemname = modsを格納したstem変数名 例: call Rxldap_add_s ld, dn, 'mods.' REXX API: Rxldap_add_ext 対応C API: ldap_add_ext 様式: Rxldap_add_ext(ld, dn, modsstemname, serverctrlsstemname, clientctrlsstemname, msgidvarname) 戻り値: ldaperr 引数: modsstemname = modsを格納したstem変数名 serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 msgidvarname = msgidを格納する変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_add_ext ld, dn, 'mods.', 'serverctrls.', 'clientctrls.', 'msgid' REXX API: Rxldap_add_ext_s 対応C API: ldap_add_ext_s 様式: Rxldap_add_ext_s(ld, dn, modsstemname, serverctrlsstemname, clientctrlsstemname) 戻り値: ldaperr 引数: modsstemname = modsを格納したstem変数名 serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_add_ext_s ld, dn, 'mods.', 'serverctrls.', 'clientctrls.' REXX API: Rxldap_first_attribute 対応C API: ldap_first_attribute 様式: Rxldap_first_attribute(ld, msg, bervarmame) 戻り値: アトリビュート名、または"" (ldap_first_attributeがNULLを返した時) 引数: bervarname = berを返す変数名 例: call Rxldap_first_attribute ld, msg, 'ber' REXX API: Rxldap_next_attribute 対応C API: ldap_next_attribute 様式: Rxldap_next_attribute(ld, msg, ber) 戻り値: アトリビュート名、または"" (ldap_next_attributeがNULLを返した時) 例: call Rxldap_next_attribute ld, msg, ber REXX API: Rxldap_simple_bind 対応C API: ldap_simple_bind 様式: Rxldap_simple_bind(ld, dn, pw) 戻り値: msgid (成功), -1 (失敗) 省略可能引数: dn, pw 例: call Rxldap_simple_bind ld, dn, pw REXX API: Rxldap_simple_bind_s 対応C API: ldap_simple_bind_s 様式: Rxldap_simple_bind_s(ld, dn, pw) 戻り値: ldaperr 省略可能引数: dn, pw 例: call Rxldap_simple_bind_s ld, dn, pw REXX API: Rxldap_unbind 対応C API: ldap_unbind 様式: Rxldap_unbind(ld) 戻り値: msgid (成功), -1 (失敗) 例: call Rxldap_unbind ld REXX API: Rxldap_unbind_s 対応C API: ldap_unbind_s 様式: Rxldap_unbind_s(ld) 戻り値: ldaperr 例: call Rxldap_unbind_s ld REXX API: Rxldap_compare 対応C API: ldap_compare 様式: Rxldap_compare(ld, dn, attr, val) 戻り値: msgid (成功), -1 (失敗) 例: call Rxldap_compare ld, dn, attr, val REXX API: Rxldap_compare_s 対応C API: ldap_compare_s 様式: Rxldap_compare_s(ld, dn, attr, val) 戻り値: ldaperr 例: call Rxldap_compare_s ld, dn, attr, val REXX API: Rxldap_compare_ext 対応C API: ldap_compare_ext 様式: Rxldap_compare_ext(ld, dn, attr, val, serverctrlsstemname, clinetctrlsstemname, msgidvarname) 戻り値: ldaperr 引数: serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 msgidvarname = msgidを格納する変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_compare_ext ld, dn, attr, val, 'serverctrls.', 'clinetctrls.', 'msgid' REXX API: Rxldap_compare_ext_s 対応C API: ldap_compare_ext_s 様式: Rxldap_compare_ext(ld, dn, attr, val, serverctrlsstemname, clinetctrlsstemname) 戻り値: ldaperr 引数: serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_compare_ext_s ld, dn, attr, val, 'serverctrls.', 'clinetctrls.' REXX API: Rxldap_delete 対応C API: ldap_delete 様式: Rxldap_delete(ld, dn) 戻り値: msgid (成功), -1 (失敗) 例: call Rxldap_delete ld, dn REXX API: Rxldap_delete_s 対応C API: ldap_delete_s 様式: Rxldap_delete_s(ld, dn) 戻り値: ldaperr 例: call Rxldap_delete_s ld, dn REXX API: Rxldap_delete_ext 対応C API: ldap_delete_ext 様式: Rxldap_delete_ext(ld, dn, serverctrlsstemname, clientctrlsstemname, msgidvarname) 戻り値: ldaperr 引数: serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 msgidvarname = msgidを格納する変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_delete_ext ld, dn, 'serverctrls.', 'clientctrls.', 'msgid' REXX API: Rxldap_delete_ext_s 対応C API: ldap_delete_ext_s 様式: Rxldap_delete_ext_s(ld, dn, serverctrlsstemname, clientctrlsstemname) 戻り値: ldaperr 引数: serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_delete_ext_s ld, dn, 'serverctrls.', 'clientctrls.' REXX API: Rxldap_first_etnry 対応C API: ldap_first_etnry 様式: Rxldap_first_entry(ld, msg) 戻り値: msg (成功)、0 (エラー) 例: call Rxldap_first_entry ld, msg REXX API: Rxldap_next_etnry 対応C API: ldap_next_etnry 様式: Rxldap_next_entry(ld, msg) 戻り値: msg (成功)、0 (エラー) 例: call Rxldap_next_entry ld, msg REXX API: Rxldap_count_etnries 対応C API: ldap_count_etnries 様式: Rxldap_count_etnriesld, msg) 戻り値: エントリーの数 例: call Rxldap_count_etnries ld, msg REXX API: Rxldap_get_errno 対応C API: ldap_get_errno 様式: Rxldap_get_errno(ld) 戻り値: ldaperr 例: call Rxldap_get_errno ld REXX API: Rxldap_err2string 対応C API: ldap_err2string 様式: Rxldap_err2string(ldaperr) 戻り値: エラーメッセージ 例: call Rxldap_err2string ldaperr REXX API: Rxldap_get_dn 対応C API: ldap_get_dn 様式: Rxldap_get_dn(ld, msg) 戻り値: dn (成功)、"" (エラー) 例: call Rxldap_get_dn ld, msg REXX API: Rxldap_explode_dn 対応C API: ldap_explode_dn 様式: Rxldap_explode_dn(dn, notype, dnsstemname) 戻り値: dns.0の値 引数: dnsstemname = 分解したdnを格納したstem変数名 (dns.0 = 数、dns.n = 値) 例: call Rxldap_explode_dn dn, notype, 'dns.' REXX API: Rxldap_get_values 対応C API: ldap_get_values 様式: Rxldap_get_values(ld, msg, attr, valstemname) 戻り値: vals.0の値 引数: valsstemname = アトリビュートの値を格納したstem変数名 (vals.0 = 数、vals.n = 値) 例: call Rxldap_get_values ld, msg, attr, 'vals.' REXX API: Rxldap_get_values_len 対応C API: ldap_get_values_len 様式: Rxldap_get_values_len(ld, msg, attr, valstemname) 戻り値: vals.0の値 引数: valsstemname = アトリビュートの値を格納したstem変数名 (vals.0 = 数、vals.n = 値) 例: call Rxldap_get_values_len ld, msg, attr, 'vals.' REXX API: Rxldap_init 対応C API: ldap_init 様式: Rxldap_init(host, port) 戻り値: ld 省略可能引数: port 例: call Rxldap_init host, port REXX API: Rxldap_msgfree 対応C API: ldap_msgfree 様式: Rxldap_msgfree(msg) 戻り値: msgtype 例: call Rxldap_msgfree msg REXX API: Rxldap_ber_free 対応C API: ldap_ber_free 様式: Rxldap_ber_free(ber) 戻り値: "" 例: call Rxldap_ber_free ber REXX API: Rxldap_first_message 対応C API: ldap_first_message 様式: Rxldap_first_message(ld, msg) 戻り値: msg (成功)、0 (エラー) 例: call Rxldap_first_message ld, msg REXX API: Rxldap_next_message 対応C API: ldap_next_message 様式: Rxldap_next_message(ld, msg) 戻り値: msg (成功)、0 (エラー) 例: call Rxldap_next_message ld, msg REXX API: Rxldap_count_messages 対応C API: ldap_count_messages 様式: Rxldap_count_message(ld, msg) 戻り値: メッセージの数 例: call Rxldap_count_message ld, msg REXX API: Rxldap_modify 対応C API: ldap_modify 様式: Rxldap_modify(ld, dn, modsstemname) 戻り値: msgid (成功)、-1 (エラー) 引数: modsstemname = modsを格納したstem変数名 例: call Rxldap_modify ld, dn, 'mods.' REXX API: Rxldap_modify_ext 対応C API: ldap_modify_ext 様式: Rxldap_modify_ext(ld, dn, modsstemname, serverctrlsstemname, clientctrlsstemname, msgidvarname) 戻り値: ldaperr 引数: modsstemname = modsを格納したstem変数名 serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 msgidvarname = msgidを格納する変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_modify_ext ld, dn, 'mods.', 'serverctrls.', 'clientctrls.', 'msgid' REXX API: Rxldap_modify_s 対応C API: ldap_modify_s 様式: Rxldap_modify_s(ld, dn, modsstemname) 戻り値: ldaperr 引数: modsstemname = modsを格納したstem変数名 例: call Rxldap_modify_s ld, dn, 'mods.' REXX API: Rxldap_modify_ext_s 対応C API: ldap_modify_ext_s 様式: Rxldap_modify_ext_s(ld, dn, modsstemname, serverctrlsstemname, clientctrlsstemname) 戻り値: ldaperr 引数: modsstemname = modsを格納したstem変数名 serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_modify_ext_s ld, dn, 'mods.', 'serverctrls.', 'clientctrls.' REXX API: Rxldap_set_option 対応C API: ldap_set_option 様式: Rxldap_set_option(ld, option, value) 戻り値: ldap_set_optionの戻り値 引数: value = オプションの値。(例に挙げたものしかテストしてません) 例: call Rxldap_set_option ld, 'LDAP_OPT_TIMELIMIT', 10.0 call Rxldap_set_option ld, 'LDAP_OPT_SIZELIMIT', 10.0 REXX API: Rxldap_get_option 対応C API: ldap_set_option 様式: Rxldap_set_option(ld, option, valvarname) 戻り値: ldap_get_optionの戻り値 引数: valvarname = オプションの値を格納する変数名。(例に挙げたものしかテストしてません) 例: call Rxldap_get_option ld, 'LDAP_OPT_TIMELIMIT', 'timeout' call Rxldap_get_option ld, 'LDAP_OPT_HOST_NAME', 'host' call Rxldap_get_option ld, 'LDAP_OPT_SIZELIMIT', 'size' call Rxldap_get_option ld, 'LDAP_OPT_PROTOCOL_VERSION', 'ver' call Rxldap_get_option ld, 'LDAP_OPT_API_INFO', 'ai' say ai.!ldapai_api_version say ai.!ldapai_protocol_version say ai.!ldapai_vendor_name say ai.!ldapai_vendor_version do i = 1 to ai.!ldapai_extensions.0 say ai.!ldapai_extensions.i end /* do */ call Rxldap_get_option ld, 'LDAP_OPT_API_FEATURE_INFO', 'aif' say aif.!ldapaif_version say aif.!ldapaif_name REXX API: Rxldap_parse_result 対応C API: ldap_parse_result 様式: Rxldap_parse_result(ld, msg, errcodevarname, matcheddnvarname, errmsgvarname, referralsstemname, serverctrlsstemname, freeit) 戻り値: ldaperr 引数: errcodevarname = errcodeを格納する変数名 matcheddnvarname = matcheddnを格納する変数名 errmsgvarname = errmsgを格納する変数名 referralsstemname = referralsを格納するstem変数名 serverctrlsstemname = serverctrlsを格納するstem変数名 freeit = msgを開放するかどうかを示す整数。 省略可能引数: errcodevarname, matcheddnvarname, errmsgvarname, referralsstemname, serverctrlsstemname 例: call Rxldap_parse_result ld, msg, 'errcode', 'matcheddn', 'errmsg', 'referrals', 'serverctrls', freeit REXX API: Rxldap_first_reference 対応C API: ldap_first_etnry 様式: Rxldap_first_reference(ld, msg) 戻り値: msg (成功)、0 (エラー) 例: call Rxldap_first_reference ld, msg REXX API: Rxldap_next_etnry 対応C API: ldap_next_etnry 様式: Rxldap_next_reference(ld, msg) 戻り値: msg (成功)、0 (エラー) 例: call Rxldap_next_reference ld, msg REXX API: Rxldap_count_references 対応C API: ldap_count_references 様式: Rxldap_count_etnriesld, msg) 戻り値: エントリーの数 例: call Rxldap_count_references ld, msg REXX API: Rxldap_rename 対応C API: ldap_rename 様式: Rxldap_rename(ld, dn, newrdn, newparent, deleteoldrdn, serverctrlsstemname, clientctrlsstemname, msgidvarname) 戻り値: ldaperr 引数: newrdn = 変更後のRDN newparent = 変更後の親エントリのRDN deleteoldrdn = 位置変更後旧エントリを削除するかどうかを示す整数 serverctrlsstemname = serverctrlsを格納するstem変数名 clientctrlsstemname = serverctrlsを格納するstem変数名 msgidvarname = msgidを格納する変数名 省略可能引数: newparent, serverctrlsstemname, clientctrlsstemname 例: call Rxldap_rename ld, dn, newrdn, newparent, deleteoldrdn, 'serverctrls.', 'clientctrls.', 'msgid' REXX API: Rxldap_rename_s 対応C API: ldap_rename_s 様式: Rxldap_rename_s(ld, dn, newrdn, newparent, deleteoldrdn, serverctrlsstemname, clientctrlsstemname) 戻り値: ldaperr 引数: newrdn = 変更後のRDN newparent = 変更後の親エントリのRDN deleteoldrdn = 位置変更後旧エントリを削除するかどうかを示す整数 serverctrlsstemname = serverctrlsを格納するstem変数名 clientctrlsstemname = serverctrlsを格納するstem変数名 省略可能引数: newparent, serverctrlsstemname, clientctrlsstemname 例: call Rxldap_rename_s ld, dn, newrdn, newparent, deleteoldrdn, 'serverctrls.', 'clientctrls.' REXX API: Rxldap_result 対応C API: ldap_result 様式: Rxldap_result(ld, msgid, all, timeout, msgvarname) 戻り値: msgtype 引数: msgid = 非同期操作のメッセージIDまたはメッセージタイプのシンボル名(例: 'LDAP_RES_ANY') all = 'LDAP_MSG_ONE', 'LDAP_MSG_RECEIVED', 'LDAP_MSG_ALL' msgvarname = msgを格納する変数名 省略可能引数: timeout 例: call Rxldap_result ld, msgid, 'LDAP_MSG_ONE', 10.0, 'msg' REXX API: Rxldap_msgtype 対応C API: ldap_msgtype 様式: Rxldap_msgtype(msg) 戻り値: msgtype 例: call Rxldap_msgtype msg REXX API: Rxldap_msgid 対応C API: ldap_msgid 様式: Rxldap_msgid(msg) 戻り値: msgid 例: call Rxldap_msgid msg REXX API: Rxldap_search 対応C API: ldap_search 様式: Rxldap_search(ld, base, scope, filter, attrsstemname, attrsonly) 戻り値: msgid (成功)、-1 (エラー) 引数: attrsstemname = アトリビュートのリストを格納するstem (attrs.0 = 数、attrs.n = 値) 例: call Rxldap_search ld, base, scope, filter, 'attrs.', 0 REXX API: Rxldap_search_ext 対応C API: ldap_search_ext 様式: Rxldap_search_ext(ld, base, scope, filter, attrsstemname, attrsonly, serverctrlsstemname, clientctrlsstemname, timeout, sizelimit, msgidvarname) 戻り値: ldaperr 引数: attrsstemname = アトリビュートのリストを格納するstem (attrs.0 = 数、attrs.n = 値) serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 sizelimit = 最大メッセージ数。0だと無制限。 msgidvarname = msgidを格納する変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_search_ext ld, base, scope, filter, 'attrs.', 0, 'serverctrls.', 'clientctrls.', 10.0, 0, 'msgid' REXX API: Rxldap_search_s 対応C API: ldap_search_s 様式: Rxldap_search_s(ld, base, scope, filter, attrsstemname, attrsonly, msgvarname) 戻り値: ldaperr 引数: attrsstemname = アトリビュートのリストを格納するstem (attrs.0 = 数、attrs.n = 値) msgvarname = msgを格納する変数名。 例: call Rxldap_search_s ld, base, scope, filter, 'attrs.', 0, 'msg' REXX API: Rxldap_search_ext_s 対応C API: ldap_search_ext_s 様式: Rxldap_search_ext_s(ld, base, scope, filter, attrsstemname, attrsonly, serverctrlsstemname, clientctrlsstemname, timeout, sizelimit, msgvarname) 戻り値: ldaperr 引数: attrsstemname = アトリビュートのリストを格納するstem (attrs.0 = 数、attrs.n = 値) serverctrlsstemname = サーバ制御のldapctrlを格納したstem変数名 clientctrlsstemname = クライアント制御のldapctrlを格納したstem変数名 sizelimit = 最大メッセージ数。0だと無制限。 msgvarname = msgを格納する変数名 省略可能引数: serverctrlsstemname, clientctrlsstemname 例: call Rxldap_search_ext_s ld, base, scope, filter, 'attrs.', 0, 'serverctrls.', 'clientctrls.', 10.0, 0, 'msg' REXX API: Rxldap_search_st 対応C API: ldap_search_st 様式: Rxldap_search_st(ld, base, scope, filter, attrsstemname, attrsonly, timeout, msgvarname) 戻り値: ldaperr 引数: attrsstemname = アトリビュートのリストを格納するstem (attrs.0 = 数、attrs.n = 値) msgvarname = msgを格納する変数名。 例: call Rxldap_search_st ld, base, scope, filter, 'attrs.', 0, 10.0, 'msg' REXX API: Rxldap_is_ldap_url 対応C API: ldap_is_ldap_url 様式: Rxldap_is_ldap_url(url) 戻り値: 0 (LDAP URLでない)、0以外 (LDAP URLである) 例: call Rxldap_is_ldap_url(url) REXX API: Rxldap_url_desc 対応C API: ldap_url_desc 様式: Rxldap_url_desc(url, descstemname) 戻り値: ldaperr 引数: descstemname = descを格納したstem変数名 例: call Rxldap_url_desc url, 'desc.' REXX API: Rxldap_url_search 対応C API: ldap_url_search 様式: Rxldap_url_search(ld, url, attrsonly) 戻り値: msgid (成功)、-1 (失敗) 例: call Rxldap_url_search ld, url, 0 REXX API: Rxldap_url_search_s 対応C API: ldap_url_search_s 様式: Rxldap_url_search_s(ld, url, attrsonly, msgvarname) 戻り値: ldaperr 例: call Rxldap_url_search_s ld, url, 0, 'msg' REXX API: Rxldap_url_search_st 対応C API: ldap_url_search_st 様式: Rxldap_url_search_st(ld, url, attrsonly, timeout, msgvarname) 戻り値: ldaperr 例: call Rxldap_url_search_st ld, url, 0, 10.0, 'msg' REXX API: Rxldap_version 対応C API: ldap_version 様式: Rxldap_version(stemname) 戻り値: ldaperr 例: call Rxldap_version 'a.' say a.!sdk_version say a.!protocol_version ★制限 □デバッグ情報付きでコンパイルリンクしたバイナリです。 □ldap_get_errnoは非標準APIでありRxldap_get_errno内部ではget_ldap_optionを LDAP_OPT_ERROR_NUMBER付きで呼び出しています。 □ldap_versionは非標準APIでありRxldap_version内部ではget_ldap_optionを LDAP_OPT_API_INFO付きで呼び出しています。 □ldap_ber_freeは非標準APIでありRxldap_ver_free内部ではber_freeを呼び出していま す。 □LDAPv2用APIは旧式APIということで削除しましたのでRxLdapはv2サーバとともには動 きません。 ★パッケージの構成 rxldap.dll rxldap.def rxldap-jp.txt rxldap-en.txt rxldap.c rxldap.sym rxstring.h testrxldap.cmd (テストに使った実際に動作したサンプルです。参考にして下さい) makefile ★ビルドの方法 nmake32 (DLL) nmake32 DEBUG=1 (デバッグ情報付きでビルドする) nmake32 pkg (ZIP) nmake32 LDAPSDK=D:\LDAPSDK (D:\LDAPSDKにあるOpenLDAP SDK for OS/2を使う) ★拡張の予定 □SSLをサポートする。(動機が弱い)