runmdn は BIND-4 あるいは BIND-8 をベースとした リゾルバライブラリを持つクライアントを、 再コンパイルなしに多言語ドメイン名を扱えるようにするためのコマンドです。
The runmdn command allows clients that use a BIND-4 or BIND-8 based resolver library to support multilingual domain names without re-compiling.
% runmdn コマンド [引数...]
% runmdn Command [Argument...]
例えば telnet コマンドで多言語ドメイン名を扱うためには 次のようにします。
For example, multilingual domain names can be supported using a telnet command as follows.
% runmdn telnet ログイン.どこかの会社.jp
% runmdn telnet ログイン.どこかの会社.jp
runmdn は共有ライブラリのプリロード機構を用いて、標準の リゾルバライブラリに含まれる関数の一部を、多言語ドメイン名の処理機能を持つ 別のバージョンに動的に置換えることで、クライアントでの多言語ドメイン名の 処理を実現します。
runmdn implements processing of multilingual domain names by the client using the pre-load mechanism of the common library, and dynamically replaces a part of function included in the standard resolver library with another version that has a multilingual domain name processing function.
多くのシステムでは共有ライブラリのプリロードは環境変数 LD_PRELOAD を用いて実現されています。この環境変数にプリロードしたい 共有ライブラリファイルのパス名を指定すると、クライアントの実行時に、 アプリケーションに標準の共有ライブラリがリンクされる前に 指定したライブラリがリンクされます。これによって標準のライブラリ関数を 置換えることができます。
In many systems, pre-loading of the common library is implemented using an environmental variable LD_PRELOAD. By specifying the path name of the common library file to pre-load in this environmental variable, when the client executes, the specified library is linked before the standard common library of the application is linked. Because of this, the standard library function can be replaced.
したがって、runmdn の実体は、この環境変数を設定し、引数で 指定されたコマンドを起動するだけのシェルスクリプトであり、実際に 多言語ドメイン名の処理を行うのはアプリケーションにリンクされる 共有ライブラリ libmdnresolv です。
Therefore, in reality runmdn is a shell script that sets this environmental variable and invokes the commands specified by arguments, and actual multilingual domain name processing is performed by the shared library libmdnresolv linked to the application.
libmdnresolv をリンクすることにより、BIND4 あるいは BIND8 ベースの リゾルバライブラリで用いられている次の関数が置き換わります。
By linking libmdnresolv, the following functions used by BIND4 or BIND8 based resolver library are replaced.
dn_comp dn_expand res_hnok res_ownok res_mailok res_dnok
それぞれの変更点を簡単に記述します。
Changes in each function are briefly explained below.
エンコーディング変換や正規化、ZLD の処理等はすべて MDN ライブラリ (libmdn) の res モジュールを使用しています。
For all processing such as encoding conversion, normalization and ZLD, res module of MDN library (libmdn) is used.
現在の実装では libmdnresolv は MDN ライブラリ (libmdn) を 呼び出すのではなく、libmdn 自体を内部に抱え込むような形態になっていますが、 これは単なる実装上の都合からそうなっているだけで、論理的には MDN ライブラリの機能を呼び出しているといってよいでしょう。
In the current implementation, libmdnresolv does not call the MDN library (libmdn) but holds libmdn itself internally. This is for convenience in implementation, but logically, the MDN library function is being called.
また使用するエンコーディングや正規化の設定は クライアント設定ファイルの設定を 利用します。
Also, use "setup"in client configuration filefor encoding or normalization setup.
runmdn にはいくつかの制限があり、どんなシステムでも使えるわけでは ありません。
There are certain restrictions on runmdn and it cannot be used in every system.