Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!pa.dec.com!shlump.nac.dec.com!mipsbx.lkg.dec.com!thomas From: thomas@mipsbx.lkg.dec.com (Matt Thomas) Newsgroups: comp.unix.ultrix Subject: Re: How do I get lat info from C? Message-ID: <20943@shlump.nac.dec.com> Date: 9 Mar 91 18:34:55 GMT References: <1226@dekalb.UUCP> Sender: news@shlump.nac.dec.com Distribution: na Organization: Digital Equipment Lines: 20 In article <1226@dekalb.UUCP> john@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@wrl.dec.com DECnet-ULTRIX Development UUCP: ...!decwrl!thomas Digital Equipment Corporation Disclaimer: This message reflects my own Littleton, MA warped views, etc.