Getting status of DCE device from a DTE device

Trevor Cotton trevc at tecate.mips.com
Tue Apr 30 03:02:30 AEST 1991


In article <8283 at alpha.cam.nist.gov>, coleman at cam.nist.gov (Sean Sheridan Coleman X5672) writes:
|> Is there a way from inside a C program to find out if
|> DATA CARRIER DETECT is high on the Data communication devices?
|> 
|> I want my program to see if there is a modem device on the
|> other end of the cable before it tries to use that port.
|> I am trying to make sure that the port plugged into the 
|> back of my Sparc Station is hooked into something.
|> 
|> 
|> Thanks
|> 
|> Sean Coleman
|> NIST
|> coleman at bldrdoc.gov

Sun Release 4.0    Last change: 22 March 1989                  20

TERMIO(4)        DEVICES AND NETWORK INTERFACES         TERMIO(4)


     TIOCMGET       The argument is a pointer  to  an  int.   The
                    current  state  of  the modem status lines is
                    fetched and stored in the int pointed  to  by
                    the  argument.   This  call is allowed from a
                    background process.



More information about the Comp.unix.internals mailing list