Installation instructions:

1) Take a look at imake.conf.

   If defined, MODEMD_INSTALL_DIR specifies the directory where
   the server (modemd) will be installed.

2) Edit modem_defs.h. See below for instuctions.

3) Type
      xmkmf
      make Makefiles
      make depend
      make

4) edit /etc/services
	You should define a name for the modemd service and a port to use
	for tcp and udp.

	let 
	   'modemd' be the name of the service,
	   '12345'  be the port used for tcp,
	   '12345'  be the port used for udp.

	then add:
      modemd   12345/tcp
      modemd   12345/udp
   to /etc/services.

5) Edit your startup file (e.g. rc.multi) to start the modemd server
   at startup.
   
   add
      if [ -x /usr/etc/modemd ]
      then
         /usr/etc/modemd
      fi
   to your startup file.

6) Create configuration files.
   For examples take a look at the files in ./samples.

7) If you have ppp installed, edit the PPP entry in ./scripts/ppp.scipt

8) Check ./modemd/verify_user.script. This script should check wether or not
   a user has permission to use a modem.
9) Type make install to install all the programs.

10) Test it out.

   - if you have ppp, type:
         ppp [phonebook entry] (e.g. ppp xs4all)
   - type:
         xcomm [phonebook entry] (e.g. xcomm bbs)   
      
Below an explanation af the settings in modem_defs.h

Section Communication:
TCP_DEFAULT_PORT  Port to use for tcp communication.
TCP_SERVICE       Service to use for tcp communication.
UDP_DEFAULT_PORT  Port to use for upd communication.
UDP_SERVICE       Service to use for udp communication.

BROADCAST_ADDR    Broadcast address used to find modemd server on the net.
BROADCAST_TIMEOUT After this time (in seconds) considder all modemd
                  servers down.
CLIENT_TIMEOUT    A client who has not made a connection with the modem and
                  did not use the modem for this time (in seconds) will be
                  disconnected. This prevents a client from allocating all
                  modem resources without using them.

Section Server:
SERVER_DIR        Directory where server runs. During initialization, the
                  server changes to this directory.
ACCESS_LOG_FILE   This item defines the name and path of the access logfile.
                  The server writes information about users connected to the 
                  modemd server to the file. 
ERROR_LOG_FILE    This item defines the name and path of the error logfile.
                  All server errors are written to this file.
ACCOUNT_LOG_FILE  This item  defines the name and path of the file with
                  accounting information. 
SERVER_LOCK_FILE  This item defines the name and path of the lock file to use.
                  The server uses a lockfile to avoid multiple copies of the 
                  server.
VERIFY_USER       This item defines the name and path of a program that 
                  verifies wether or not a user has permission to use a
                  modem.
SERVER_UMASK      This item defines the umask to use. For safety reasons,
                  the server sets this umask to prevent problems that might
                  arise from incorrect mode specifications.

Section Modem:                  
MODEM_CONF_FILE   This item defines the name and path of the file with modem
                  settings. This file contains informations about port
                  settings for each available modem.
MODEM_COMMAND     This item defines the name and path of the file with modem
                  commands. For each type of modem you can specify the 
                  avaliable modem commands in this file.
MODEM_ENV_VAR     Environment variable set to the psuedo terminal used for
                  communication with the modem. 
DEF_MODEM_TYPE    Default modem type. Used when no type is specified for a
                  modem in MODEM_CONF_FILE.
ATTN              Default command used to switch the mode from Data Mode to 
                  Command Mode. Can be redfined in MODEM_COMMAND.
RSET              Default command used to reset modem. Can be redefined in
                  MODEM_COMMAND.
INIT              Default initialisation command. Can be redefined in
                  MODEM_COMMAND.
DIAL              Default command to start dialing. Can be redefined in
                  MODEM_COMMAND.
HANGUP            Default command to hang up the modem. Can be redefined in
                  MODEM_COMMAND.
                  
Section Modem locking:
_PATH_LOCKD       This item defines the path where lockfiles are stored.
_UID_UUCP         This item defines the user who owns the lockfiles.

Section Personal settings:
PHONEBOOK         This item defines the name and path of the personal
                  phonebook.

                                   
