From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,64f5d783309d3695 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-01-11 11:22:56 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!news.bu.edu!bloom-beacon.mit.edu!panix!news.mathworks.com!udel!gatech!newsfeed.pitt.edu!uunet!charon.citicorp.com!citicorp.com!spcuna!metro.atlanta.com!w0020!usenet From: sam.eads@hboc.com (Sam Eads) Newsgroups: comp.unix.osf.osf1 Subject: Re: Finding out LAT source name Date: 11 Jan 1995 19:22:56 GMT Organization: HBO & Company Message-ID: <3f1b6g$oib@news.hboc.com> References: <3eunql$n3q@ulowell.uml.edu> NNTP-Posting-Host: sam_ea.hboc.com X-Newsreader: WinVN 0.92.6 In article <3eunql$n3q@ulowell.uml.edu>, oneill@cs.uml.edu (Brian 'Doc' O'Neill) says: > >I'm in the process of porting some shadow password stuff (John F. Haugh II's >implementation) to OSF/1 V3.0 on the Alpha, and noticed that by default >OSF/1 doesn't log the source LAT host when a person logs in, nor can I find >the routines which can get them which were under Ultrix. Does anyone know >how to determine the source host under OSF/1?? > >=========================================================================== >Brian O'Neill - Systems Manager, Computer Science oneill@cs.uml.edu >University of Massachusetts at Lowell Chief Editor, InterWeb Journal >(508) 934-3645 http://interweb.uml.edu/InterWeb/ >"Nothing's the same anymore." - Sinclair, Babylon 5, _Chrysalis_ Brian, Listed below is an example program of how to get the information you need. I haven't figured out if there's any way to get the destination service name. You might want that if you had more than one service defined on the system and wanted to know which one a user had connected to. I originally got parts of this example from DEC through DSNLink, so I guess I should give them some credit too. (The DSNLink people are sometimes VERY helpful). As far as I know, this stuff isn't documented anywhere. ALSO NOTE: Since LAT was completely re-implemented in OSF/1 V3.0, you have to use different code for OSF/1 V2.0. THIS CODE WILL ONLY WORK FOR V3.0 OSF/1. I have the 2.0 code if anyone needs it. Hope this helps. Here's the code : /* ** Get LAT connection information ** ** This code is for OSF/1 V3.0 ONLY ** ** Written by someone at Digital Equipment Corporation ** ** Adapted by Sam Eads (HBO & Company, Atlanta, GA, U.S.A) */ #include #include #include #include struct stat statb; main(agc,arg) int agc; char **arg; { int tfd; lats_info latioctl_port; struct strioctl strioctl; tfd = open("/dev/streams/lat",O_RDWR); if(tfd < 0) { perror("openning /dev/streams/lat"); exit(0); } if(fstat(0,&statb) < 0) { perror("stating fd 0"); exit(0); } bzero(&latioctl_port,sizeof(lats_info)); latioctl_port.info_dev = minor(statb.st_rdev); strioctl.ic_cmd = LIOC_INFO_SHOW; strioctl.ic_len = sizeof(lats_info); strioctl.ic_dp = (char *)&latioctl_port; if(ioctl(tfd,I_STR,&strioctl) < 0) { perror("on latioctl call"); exit(0); } close(tfd); printf("lcl_svc=%s\n",latioctl_port.lcl_service); printf("lcl_por=%s\n",latioctl_port.lcl_port); printf("rmt_svc=%s\n",latioctl_port.rmt_service); printf("rmt_por=%s\n",latioctl_port.rmt_port); printf("rmt_ond=%s\n",latioctl_port.rmt_node); } Sam Eads Sr. Systems Programmer HBO & Company, Inc. Atlanta, GA USA Email: sam.eads@hboc.com