[comp.mail.uucp] MNP vs. uucp 'g' - my solution

shannon%datsun@Sun.COM (Bill Shannon) (09/26/89)

As "everyone knows", MNP and uucp's 'g' protocol just don't get along.
So, I decided there must be a better way.  What does MNP give you?
MNP 5 gives you reliable data transfer (at least from modem to modem
if not from program to program) and data compression.  Well, uucp's
'g' protocol already gives you reliable data transfer (from program
to program) so all that missing is compression.  But, we have a pretty
good compression program in UNIX (compress 4.0) so why not just use
that?

So, what I ended up doing is writing a new uucp protocol based on
the 'g' protocol but including automatic compression of the data.
I call the new protocol 'c'.  It will compress the data when sending
(and uncompress when receiving) unless the data has already been
compressed (it has some heuristics to guess this), and uses the same
old 'g' protocol to send the compressed data.  To do the compression
it just forks the compress program (ya, I could build it into the
protocol code, but why bother?).

Using this new protocol you just turn off MNP while using the modem
for uucp.  Of course, MNP is still quite useful when using the modem
for tip or slip or things like that.

By the way, compress is much better at compressing data than MNP 5.
Using my 'c' protocol I can get 1800 characters per second effective
transfer rate using a V.32 9600 baud modem.  This is for a nice text
file, like /etc/termcap.  For binary files like /vmunix I get something
like 1450 characters per second, which is even better than the 1320 or
so I've gotten with Telebits.

Needless to say, there are some tradeoffs involved.  This scheme takes
more cpu time (and more memory) than either a Telebit or MNP modem,
and obviously interoperates with nothing at this point.  You might not
want to run this on a machine with lots of uucp's running simultaneously.

If there's interest I can post the diffs (although they're diffs
against our version of the SVR3.2 uucp, so they won't be directly
applicable to other versions).

	Bill Shannon