× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm no developer, but I'm going to say it anyway:

Your design is flawed - an IP address does not represent a single user,
nor does it represent a single user.

Your application will break if the client is behind NAT.
Your application will break if it is running on a Terminal Server.
Your application might break if there are short DHCP lease times.

You'll need another design. If your client is Windows, I would recommend
a concatenation of the machine SID, user SID and the Session ID - this
WILL be unique in every scenario.

If you're looking for a more universal solution, it get's more
difficult. You can use the hostname and the username, but this might not
always work.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Moland
Sent: Monday, June 25, 2007 8:16 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Proper IP address for PC to Iseries connection

Just when I thought I was done.

I've a java application on a PC which waits for and processes keyed data

queues entries placed in the queue by an AS400 application. The "key"
being
the IP address of the PC running a CA session as retrieved by RPG using
the
API QDCRDEVD.

Until today I worked on this off site thru a Sonicwall VPN and the java
app
retrieved the same IP address as the RPG app.

While connected locally, it turns out that the IP address the java app
retrieves using "InetAddress.getLocalHost" does not retrieve the IP
address
on my local nic card. Instead it is retrieving the address of the my VPN

driver that is installed on my PC. The annoying part is that the RPG app

does retrieved the IP address of the local nic card.

My observation is that the VPN IP address is the culprit but only
because it
is the 3rd IP address available as viewed by running IPCONFIG /ALL in a
command window. The 2nd IP address is my wirecard which is shut off. I
think
my observation is correct because if I physically disable the VPN driver

(and hence the virtually IP address assigned), then the java app returns
the
local nic card IP address.

I think "InetAddress.getLocalHost" is reading them all and returning the

last one encountered

I need to roll this app out to hundreds of users on multiple AS400 boxes
and
I don't want to have to have anyone manually assign some unique
identifying
code for each PC session which in turn would have to be available (and
known) to the RPG application. Nor do I want a PC user to have to shut
off
any physical or virtual nic addresses.

Any suggestions for an approach. This worked so seamlessly until this
AM.

What I thought of doing (because I found java code to do it) is to
retrieve
ALL the IP addresses on a PC and then try each of them as the key on the

read of the keyed data queue.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.