Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Network logins (Where did I come from?)

5 views
Skip to first unread message

c...@ozemail.com.au

unread,
Jul 28, 1997, 3:00:00 AM7/28/97
to

Hi there,

During a network login, is it possible to find out which network
node the login originated from? I've tried all the lexicals I can think
of, but nothing seems to have the information I want.

The node is written into netserver.log after the network process
disappears, but by this time, it's too late.

Thanks in advance,
--crn.

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet

ch...@ccagroup.co.uk

unread,
Jul 28, 1997, 3:00:00 AM7/28/97
to

>Hi there,
>
> During a network login, is it possible to find out which network
>node the login originated from? I've tried all the lexicals I can think
>of, but nothing seems to have the information I want.
>
> The node is written into netserver.log after the network process
>disappears, but by this time, it's too late.

Use f$trnlnm("SYS$INPUT"). Read the network programming manual for full details
of what it all means.
______________________________________________________________________
Chris Sharman ch...@ccagroup.co.uk
Tel: +(44) 1772 662883 Fax: +(44) 1772 662893
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancs, PR2 9WS, ENGLAND

Ferry Bolhar-Nordenkampf

unread,
Jul 28, 1997, 3:00:00 AM7/28/97
to ch...@ccagroup.co.uk

ch...@ccagroup.co.uk wrote:
>
> >Hi there,
> >
> > During a network login, is it possible to find out which network
> >node the login originated from? I've tried all the lexicals I can think
> >of, but nothing seems to have the information I want.
> >
> > The node is written into netserver.log after the network process
> >disappears, but by this time, it's too late.
>
> Use f$trnlnm("SYS$INPUT"). Read the network programming manual for full details
> of what it all means.

There is an easier way as well: Look at the SYS$REM_NODE and SYS$REM_ID
jobwide logicals. They contain the name of the remote node and remote
user, respectively.

Greetings, Ferry

--
Ing. Ferry Bolhár-Nordenkampf
Magistrat der Stadt Wien (MA-14) A - 1010 Vienna (Austria)
Phone: 0222/4000/98632 E-Mail: b...@adv.magwien.gv.at

"Wenn hier einer schuld ist, dann immer nur der Computer."

Berislav Todorovic

unread,
Jul 28, 1997, 3:00:00 AM7/28/97
to

c...@ozemail.com.au wrote:
>> During a network login, is it possible to find out which network
>> node the login originated from? I've tried all the lexicals I can think
>> of, but nothing seems to have the information I want.

See logical names SYS$REM_NODE (remote node) and SYS$REM_ID (remote username).
They will contain the information you want to obtain! ;-)

Regards,
Beri
--

.-------.
| --+-- | Berislav Todorovic, B.Sc.E.E. | E-mail: be...@ubbg.etf.bg.ac.yu
| /|\ UBBG System administrator |
|-(-+-)-| School of Electrical Engineering | Phone: (+381-11) 3221-419
| \|/ Bulevar Revolucije 73 | 3224-430
| --+-- | 11000 Belgrade SERBIA, YUGOSLAVIA | Fax: (+381-11) 3248-681
`-------' --------------------------------------------------------------------

Phillip Helbig

unread,
Jul 29, 1997, 3:00:00 AM7/29/97
to

> During a network login, is it possible to find out which network
> node the login originated from? I've tried all the lexicals I can think
> of, but nothing seems to have the information I want.

You mean the information in SHOW USERS/FULL?


--
Phillip Helbig Email ... hel...@multivac.jb.man.ac.uk
Nuffield Radio Astronomy Laboratories Tel. ..... +44 1477 571 321 (ext. 297)
Jodrell Bank Fax ................. +44 1477 571 618
Macclesfield Telex ................. 36149 JODREL G
UK-Cheshire SK11 9DL Web .... http://www.jb.man.ac.uk/~pjh/

My opinions are not necessarily those of NRAL or the University of Manchester.

John Briggs

unread,
Jul 29, 1997, 3:00:00 AM7/29/97
to

In article <8700657...@dejanews.com>, c...@ozemail.com.au writes:
> During a network login, is it possible to find out which network
> node the login originated from? I've tried all the lexicals I can think
> of, but nothing seems to have the information I want.
>
> The node is written into netserver.log after the network process
> disappears, but by this time, it's too late.

Others have suggested SYS$INPUT, SYS$REM_NODE and SYS$REM_ID.

I disagree.

SYS$NET is what you want.

SYS$INPUT translated to ":" whan I checked it in the context
of a task-to-task connection under DECnet phase V with VMS 7.1

SYS$REM_NODE and SYS$REM_ID can be incorrectly cached when the
same network server process is re-used by multiple connections.

John Briggs vax...@alpha.vitro.com

Todd C. Campbell

unread,
Jul 29, 1997, 3:00:00 AM7/29/97
to

hel...@multivac.jb.man.ac.uk (Phillip Helbig) wrote:

>In article <8700657...@dejanews.com>, c...@ozemail.com.au writes:
>
>> During a network login, is it possible to find out which network
>> node the login originated from? I've tried all the lexicals I can think
>> of, but nothing seems to have the information I want.
>

>You mean the information in SHOW USERS/FULL?


You could use show users/full to get the information for yourself, but
if you are trying to get that information for your logfiles or
something you could try something like this

port = f$getjpi("","TT_ACCPORNAM")

Brian Tillman (Remove ".no.junk")

unread,
Jul 30, 1997, 3:00:00 AM7/30/97
to

In article <1997Jul2...@alpha.vitro.com>, vax...@alpha.vitro.com says...

>
>In article <8700657...@dejanews.com>, c...@ozemail.com.au writes:
>> During a network login, is it possible to find out which network
>> node the login originated from? I've tried all the lexicals I can think
>> of, but nothing seems to have the information I want.
>>
>> The node is written into netserver.log after the network process
>> disappears, but by this time, it's too late.
>
>Others have suggested SYS$INPUT, SYS$REM_NODE and SYS$REM_ID.
>
>I disagree.
>
>SYS$NET is what you want.

And here's some DCL to parse the Network Control Block you get in SYS$NET:

$ parsencb:
$!
$! Parse the Network Control Block to obtain the remote node and user. We do
$! this because SYS$REM_NODE can be inaccurate when network servers are
$! reusable.
$!
$ sys$net = f$trnlnm( "sys$net" )
$ flag = f$locate( "::", sys$net )
$ slash = f$locate( "/", sys$net )
$!
$ source_node = f$extract( 0, flag, sys$net )
$ source_user = f$edit( f$extract( flag+5, slash-flag-5, sys$net ), "trim" )
$ link_number = f$cvui( 0, 16, f$extract( slash+1, 2, sys$net ) )
$ return
--
Brian Tillman Internet: tillman_brian at si.com
Smiths Industries, Inc. tillman at swdev.si.com
4141 Eastern Ave., MS239 Addresses modified to prevent
Grand Rapids, MI 49518-8727 SPAM. Replace "at" with "@"
This opinion doesn't represent that of my company


0 new messages