[EMAIL PROTECTED] wrote:
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> How do I get the client's IP address?
>
> On linux you can find this with the "who" command, but I don't know if
> it works on all *nixes. This will work if your version of who
> supports it:
>
> EXECUTE 'SH -c "who am i"', OUT > WHO.AM.I
> MY.IP = FIELD (FIELD (WHO.AM.I, ')', 1), '(', 2)
>
> The IP will already be resolved to the host name if it's available via
> DNS or /etc/hosts.
On AIX its "who -Hum" to get your own line formatted from wtmp.
But I'd think the answerback approach makes more sense. I'm not familiar
with DC, but most emulators allow you to specify the string to send back in
response to CTRL-E during session startup. On a Unix host you should have
this answerback string in $TERM when you start running /etc/profile and
~/.profile. If those scripts are going to modify this before uv or udt is
invoked, then just save it somewhere else:
export ANSWERBACK_TERM=$TERM
and then inside udt you'd just run a program that did a
GETENV("ANSWERBACK_TERM"), or in uv you might have to EXECUTE "SH -c 'echo
$ANSWERBACK_TERM'" CAPTURING. Make your DC emulators answer differently to
your wIntegrate ones and you are away.
One other point. I couldn't understand how the malarchy with @TTY was going
to help differentiate between DC and wIntegrate. Sure it could help work
out whether you had a telnet session or were on a real old terminal, but
both DC and wIntegrate will end up connected via a pseudo terminal.
Cheers,
Ken
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/