/* ***************************************************************************+
 * ITX package (cnrg.itx) for telephony application programming.              *
 * Copyright (c) 1999  Cornell University, Ithaca NY.                         *
 * A copy of the license is distributed with this package.  Look in the docs  *
 * directory, filename GPL.  Contact information: bergmark@cs.cornell.edu     *
 ******************************************************************************/
This is the directory for compiling libDSComm.so (equiv. to DSComm.dll for Windows platform) on Unix platform.
It has been tested in Solaris.


1. cnrg_itx_ds_DSComm.h - native code header file generated from DSComm.class and ArrayRecords.class

To generate cnrg_itx_ds_DSComm.h header file on Unix platform, use javah -jni command.
E.g. under this directory, make the directory path cnrg/itx/ds, and copy DSComm.class and ArrayRecords.class into it. Then type the following command to generate the header file:
[~/DSComm]% javah -jni cnrg.itx.ds.DSComm

   NOTE: You can probably skip this step, since cnrg_itx_ds_DSComm.h
   is already shipped with the ITX source tree.

 
2. DSComm.c - native code implementation of cnrg_itx_ds_DSComm.h


3. modified_source - a directory to store the modified BIND 8.1.2 source files

   NOTE: These will not work with BIND 8.2 and up.  The modifications
   would have to be upgraded first.  To build a libbind.a suitable for
   ITX use:

   - download bind 8.1.2 from http://www.isc.org/
   - after you have unpacked the distribution in its "src" directory, replace 4 of the
     files with what you find in DSComm For Unix/DSComm/modified_source.  The files to
     replace (save the original bind versions if you want) are:
        src/include/resolv.h
        src/include/arpa/nameser_compat.h
        src/lib/resolv/Makefile
        src/lib/resolv/res_init.c
   - follow directions in the INSTALL file, as well as in the docs\ds\BINDInstallation.doc
     in the ITX source tree, to build bind.  For libDSComm.so, you are mainly interested in
     getting the modified bind/lib/libbind.a.


4. makefile - makefile to generate libDSComm.so.  You need to link with the modified 
   BIND 8.1.2 source (same as for building the primary server), and include the 
   resulting libbind.a in the makefile.  Modification information is shown below:

- In bind/include/resolv.h, export init_res_paths_by_filename function
- In bind/include/arpa/nameser.h, redefine NS_PACKETSZ
- In bind/lib/resolv/res_init.c, define init_res_paths_by_filename function, define static variable, modify res_init function
- In bind/lib/resolv/Makefile, define ITXFLAG

NOTE: All modifications can be located by searching the CNRG_ITX keyword.


5. To use libDSComm.so, copy the resolv.conf file into your working directory.

   Then set the LD_LIBRARY_PATH  environment variable in ~/.cshrc configuration file.  
   E.g.

   a.  setenv LD_LIBRARY_PATH /amd/sundial/a/cwn/meng/client/DSComm
       (The directory path to locate libDSComm.so)

   You will also need to have your CLASSPATH environment variable contain the path to the
   itx.jar file or to the itx/src tree (the one that contains cnrg.itx...).  E.g.

   b.  setenv CLASSPATH /amd/sundial/a/cwn/itx/src

   c.  Then put your java application code into this directory, and run your application.
   A small example is provided for your use in the examples/directory directory, called 
   Minimal.java.  It should compile and run with the newly build libDSComm.so

NOTE: The default path for resolv.conf under Unix is /etc/resolv.conf



                                   updated: 17 august 1999
