README for ispcost


WHAT IS ISPCOST?

'ispcost' is a program to manage a PPP connection over a dial-up line.
It provides the following features:

	Connect and disconnect by simply pressing a button
	Shows connect time and cost
	Logs connect time and cost to a file
	Flexible configuration of cost parameters
	Automatic redialing if line is busy
	Show by-month totals of time and cost

The interface to 'ispcost' consists of three buttons and two windows. The buttons
have the following functions:

	Connect/Disconnect (represented as a phone handset) - initiate a PPP
	connection. When the link is up, a click on this button will
	disconnect the link. While the connection is being set up, clicking
	the button will abort the connection attempt.

	Statistics (represented as a graph) - show information on each logged
	call as well as totals. 

	This pops up a 'Statistics' window that shows total costs and connect
	time for the last twelve months. By clicking on a month, details of
	each individual call for that month are shown. Click on any line to go
	back to the totals.

	Configure - configure the program. At present, the only option
	available is selecting the phone number from a list. This number will
	be used for future calls. Click OK to accept the changes, or Cancel to
	revert to the old setup.

	The upper window shows how long you have been connected, the cost
	of the ongoing call, as well as the current rate. When not connected,
	these figures are greyed out.

	The lower window, aka the status area, shows the current status of the
	connection. Upon startup, the version number of 'ispcost' is also
	displayed here.

You quit the program by selecting the 'Close' entry in the window manager
menu. This terminates any ongoing call as well as the program. The cost of any
ongoing call will be logged.

When you iconify the program while you are connected, the icon shows an
animated arrow along with the time and cost.


Please send me working configuration files for your country and I will include
them in the next release.

To get the newest release of ispcost, visit its web page at

	http://www2.dk-online.dk/Users/Torsten_Martinsen/ispcost


RELEASE NOTES AND HISTORY

Changes in version 0.39:
- Bugfix for stats window, reported by Martin Terpstra <terpstra@euronet.nl>.

Changes in version 0.38:
- Support for setting icon colours by means of the iconBackground and
  iconForeground resources. Suggested by Filip Larsen <filip@chaos.fys.dtu.dk>.
- Several bug fixes, reported by Martin Terpstra <terpstra@euronet.nl> and
  Wayne Whitney <whitney@math.berkeley.edu>.
- When the line is busy and 'redialinterval' is set, ispcost shows the number
  of seconds left before redial will be initiated.
- Now installs in /usr/local/bin instead of under the X11 tree.
- Other small bugfixes.

Changes in version 0.37:
- The 'dialcost' parameter can be set for individual numbers (uses global
  default if not specified). This means that Danish users can use the *171*
  service. 
- A bug fixed in connect.c, thanks to Fabio Ferrari <fabio@iaccess.com.br>.

Changes in version 0.36:
- Use bitmaps instead of text for buttons.
- Labels eliminated so that window can be smaller.
- No quit button (use the window manager's Close menu entry instead).
- Better country-specific support (two new keywords in the RC file).
- Started to implement dialog-driven configuration.
- Some bugs fixed.

Version 0.35 is a major rewrite:
- The name is now 'ispcost' instead of the more generic 'dial'.
- libsx is no longer used.
- Better statistics.
- Installs setuid root so that pppd need not be.
- Shows cost and time even when iconified.
- Icon is animated when connected.

Version 0.30 adds the following features:
- If no 'dialrc' or '~/.dialrc' is found, or if errors are found in the file,
  terminate with an error message instead of a segmentation fault.
- Show total for last 12 months.
- Holidays now include Easter and related days.
- Binary is no longer distributed.

Versions 0.28 and 0.29 were never released.

Version 0.27 adds the following features:
- Show the connect speed in the status window (suggested by J.C. Pollman
  <jpollman@pixi.com>).
- Periodically check if the link has gone down for some reason.
- The 'Select' button lets you select a number from a list of phone numbers.
- The 'Stats' button shows information on logged calls.
and the following incompatibilities:
- The format of the log file has changed. (A script for converting old log
  files is provided).
- The keyword 'number' now has another meaning. The new keyword 'prefix' has
  the meaning that 'number' had previously. Also, the 'defaultnumber' keyword
  has been removed. Sorry.

Version 0.26 was never released.

Version 0.25 adds a configuration file (system-wide as well as per-user) and
support for automatic redialing (suggested by J.C. Pollman <jpollman@pixi.com>).
The phone number is also displayed during dialing.

Version 0.24 fixes a bug in 0.22 which resulted in nothing being written in
the log file. Also, support for using the PPP driver as a loadable kernel
module has been added.

Version 0.23 was never released.

Version 0.22 was the first public release.


INSTALLATION

Of course, you need X11 (including imake) as well as the PPP program.

1) Carefully check (and maybe modify) the various defines in ispcost.h.

2) Check the 'sample-scripts/ispcost-ppp-connect' script and edit if necessary.

3) Modify 'ispcostrc' as needed. Copy it to one of the locations defined by
   SYSRCFILE and USERRCFILE in ispcost.h.

4) Do
	xmkmf
	make
	su
	make install	

5) If you have used a version prior to 0.35, note that

 	- the file 'etc/dialrc' should be renamed to 'etc/ispcostrc'
	- the file '~/.dialrc' should be renamed to '~/.ispcostrc'
	  (This must be done for each user.)

You may have to manually install some files in /etc/ppp. My own config files
are included in the 'sample-scripts' directory.

Note that it might be necessary for you to send an 'ATH' command to the
modem in the 'ip-down' script - otherwise the modem might stay on-line.
See the sample ip-down script for how to do this.

For 'ispcost' to show the connect speed, the modem must supply a 'CARRIER xxxxx'
message when connecting. Look in /var/adm/messages for a line of the form

	Jun 26 09:12:26 bullestock chat[1083]: CARRIER 28800^M 

If 'ATX4' is not the default setting for your modem, you may have to append
'X4' to the init string sent by the 'ispcost-ppp-connect' script.

'ispcost' is installed setuid root. Note that your pppd program should not be
installed setuid root for security reasons. Also note that pppd should not be
run with the 'persist' option enabled.

LIMITATIONS

The 'holidays' defined are probably not correct for all countries.

Note that the syslog daemon must be running for 'ispcost' to work.

COPYRIGHT

'ispcost' is Copyright 1996 by Torsten Martinsen (bullestock@dk-online.dk).
'ispcost' is released under the GNU General Public License.

Thanks to Bruce Perens of Pixar for releasing the Electric Fence library.

Enjoy,
-Torsten Martinsen (bullestock@dk-online.dk)
