From: jy10033@ehsn11.cen.uiuc.edu (Joshua M Yelon) Subject: Re: TCP and TIOC questions (please add to FAQ) [NORMAL] Date: Mon, 14 Dec 1992 11:51:59 GMT
kutcha@eos.acm.rpi.edu (Phillip Rzewski) writes:
>My code is looking for things like TIOCGETP...
I don't know the answers to your other questions, but I can answer
this one.
TIOCGETP is one of the ioctls for BSD-style terminal control. The
other big one is TIOCSETP, and they both operate on objects of type
'struct sgtty'.
Unfortunately, Linux doesn't currently implement these. Instead,
Linux uses 'termios' (struct termios, ioctl TCGETS, ioctl TCSETS) in
order to change terminal modes.
Usually, it is fairly easy to replace the sgtty stuff with termios
stuff, since the relevant code is usually quite short and simple. In
fact, many packages have "ifdef" flags that allow you to choose
between termios and sgtty.
- Josh
PS. Perhaps we should put this in the FAQ. It comes up pretty often.