Hi,
I added the modifications made to run in OpenBSD to sources and put back
to the repository.
The modifications made were:
1.- termios.h and ioctl.h
In OpenBSD they are located in sys (not asm), so I change it in modem.c
2.- Termios control chars
No operating system has the same position in the cc_c array, so the one
supplied in answerd only works for Linux (take a look at modem.c in the section that
was borrowed from 'Serial Suite' package.
I completely rewrote this part for maximunm clarity (and an easier
portability to other platforms). The changes were made in modem.c.
3.- Termios setting
In OpenBSD the ioctl for setting parameters in termios is TIOCSETA. The
changes were made in modem.c.
4.- New debugging level
This new feature was added to allow a very verbose log (mainly for hard
to find problems). It consist of a new debugging level (debug =) activated
in answerd.cfg, and added as LOG_DEBUG. This one was added because all
communication with the modem was so slow and I need to figure where the
problem was located. The changes were made in log.c and log.h.
BTW it was very easy to add an extra debugging level !!
5.- New utility function
For showing some extra info I needed to show what chars were arriving
from modem, so I copied and modified a function present in 'Serial Suite' package that
given a char it returns a string showing the char meaning (^C, M-x, etc.).
The change were made in util.c and util.h
To cope with some changes I added an extra configuration in Makefile. A
macro must be defined (LINUX or OPENBSD) to allow some code modifications
(mainly points 1 and 3). I've not made point 2 cross platform yet, if you
prefer I could try to make it happen (ths code as is only works on
OpenBSD). I think that tomorrow in the night I can commit the sources
workig on both platforms (almost compiling on both).
Hope this helps.
--
Victor A. Rodriguez (Bit-Man)
|