How do I get lat info from C?

Matt Thomas thomas at mipsbx.lkg.dec.com
Sun Mar 10 04:34:55 AEST 1991


In article <1226 at dekalb.UUCP> john at dekalb.UUCP (John Cothran) writes:
>   The lat.h include file has several structures defined with lots of goodies.
>In particular:
>
>[...]
>
>My question is what functions can I call to get this info?  I want to write a
>program that will list all users and the server/port they are coming in on.
>I assume it can be done since "w" now shows the server name.

Actually, login does a LIOCTTYI ioctl (on the LAT tty fd) and stores the
resultant information in the wtmp/utmp files from which w and last display
the server name.  lcp(8) -p uses LIOCGSRVPRT ioctl on (AF_LAT, SOCK_DGRAM,
LATPROTO_CTL) socket with lsp_dev set to the LAT tty to be queried.

-- 
Matt Thomas                     Internet:   thomas at wrl.dec.com
DECnet-ULTRIX Development       UUCP:       ...!decwrl!thomas
Digital Equipment Corporation   Disclaimer: This message reflects my own
Littleton, MA                               warped views, etc.



More information about the Comp.unix.ultrix mailing list