Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!solaris.cc.vt.edu!fox!yzalkow From: yzalkow@fox.ee.vt.edu (Yuval Zalkow) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Help with IOCTL programming, easy Date: 6 Jun 1995 16:08:01 GMT Organization: Virginia Tech, Blacksburg, Virginia Lines: 22 Message-ID: <3r1uh1$at0@solaris.cc.vt.edu> NNTP-Posting-Host: fox.ee.vt.edu X-Newsreader: TIN [version 1.2 PL2] Hello, I am working on writing a little program and I want to be able to check the status of the modem line, whether it is still connected or not. I got to the point where I read the IOCTL man page and then looked through some of the system header files. I think I want to use IOCTL and send it the TIOCMODG parameter to check the status of the port and then compare the result to TIO_CAR or TIO_CD, which are the same, to tell me if I have a carrier. Unfortunately, that's the depth of my knowledge, I don't completely understand the parameter list to IOCTL, what's that last parameter *argp? I would really appreciate it if someone could write me a tiny little code fragment that would explain this. I wasn't really sure if this was the right place to ask, if it isn't, please point me in the right direction. Thank you, very much, in advance, Chris Inacio ---------------- cinacio@vt.edu