[comp.sys.hp] comsat porting problem

heather@sdcc4.ucsd.edu (Heather Ebey) (09/29/90)

Second request (to wider audience). I don't know if this is
a porting problem, an HP problem or an installation oversight.

Has anyone been successful in getting the BSD comsat (biff server)
running under under HPUX 7.0 on a HP9000/800S?  I can get it to
compile just fine.  I put the following line in /etc/services:
  biff 512/udp comsat
and the following in /etc/inetd.conf:
  comsat dgram udp wait root /usr/local/etc/comsat comsat

Then, I even went so far as to inetd -k (after inetd -c) and
restart inetd. My inetd.log shows:
   Service: comsat/udp  Executable: comsat 
which leads me to believe that inetd is happy.
 
netstat -a shows biff as an udp protocol.
	udp        0      0  *.biff             *.* 

Checking for last access time (after sending myself countless mail
messages), it appears that comsat is never run by inetd and I'm
not getting notification.  [I have biff y (checked it).]

Is there some magic that I haven't remembered?

Right now, I'm ifdef'ing out BSD (had compiled with -lBSD) stuff and
rewriting in termio(7) ioctl calls.
Having problems with this one:

(void)ioctl(fileno(tp), TIOCGETP, &gttybuf);
cr = (gttybuf.sg_flags&CRMOD) && !(gttybuf.sg_flags&RAW) ? "" : "\r";

Got as far as (I think ??):
struct termio gttybuf;
if ( (ioctl(fileno(tp), TCGETA, &gttybuf)) < 0) {
	...err stuff deleted }
cr = (gttybuf.c_oflag&OCRNL) && (gttybuf.c_lflag&ICANON) ? "" : "\r";

Does anyone know if these lines are correct translations?

Thanks.  --Heather

-- 
======= hebey@ucsd.edu =======        		       (ucsd!sdcc4!heather)
Heather Ebey,  Unix Systems Support                    Voice: (619)534-7987
UC San Diego, Instructional Computing Center, 0110, La Jolla, CA 92093-0110
=======

Kimmo.Suominen@lut.fi (Kimmo Suominen) (10/01/90)

>>>>> On 28 Sep 90 23:10:21 GMT, heather@sdcc4.ucsd.edu (Heather Ebey) said:

Heather> Checking for last access time (after sending myself countless mail
Heather> messages), it appears that comsat is never run by inetd and I'm
Heather> not getting notification.  [I have biff y (checked it).]

Heather> Is there some magic that I haven't remembered?

It seemd to me, that nothing calls out for biff.  The local delivery
agent of sendmail should do that, but if you are using the HP default
/bin/rmail as the agent, then that's your problem.

I installed a biff and a comsat on the S800 I keep running, and I had
to also install a front end to rmail (rmail-biff), which calls for
comsat (through inetd) every time a local delivery is made by
sendmail.  It then execs the standard /bin/rmail to store the message
in the mailbox it was ment to go into.

You can find the code I'm using from lut.fi.  Try anonymous ftp
outside local office hours (after 5pm GMT and before 5am GMT - it's
winter time again) and retrieve the file

	/unix/misc/biff.tar.Z

using binary mode (of course).  It should include everything you need
already ported to run on HP-UX.  I didn't port it, so don't come after
me if you have problems.  I just followed the instructions (included)
and everything works fine now.
--
Kim                      /  Internet: Kimmo.Suominen@lut.fi
"That's what I think."  /   Bitnet:   KIM@FINFILES