× 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.



Shannon,

        In the IP world you already have every thing you need, if things are
setup correctly. The
IP dotted decimal address is normally referenced by a symbolic in one of two
places and
sometimes both.

        First there is a concept of a Domain Name Server (DNS) the DNS has a
number of components
but it's primary function is to provide a mapping from a fully qualified
symbolic host name to the IP address
and back again.  Also, for most IP stacks available on the market an
independent system can have a
"host" table, also known as "lmhosts", this can override the DNS and/or
serve as a supplement to it.

        Now, if I wanted to distribute a script to a one hundred locations
that always sent to a "common"
AS/400 (or any host for that matter) then I would use a symbolic name in the
FTP script such as
"ftp myas400.mycompany.com"  this would resolve the myas400.mycompany.com
into a doted
decimal address by first looking in the host table, and then to the local
DNS, and then to the Internet DNS,
etc...  Based on what is defined in the
system/network/routers/gateways/........

        Okay, now that I have done all that I will give you one other
answer.  In the standard API's available for
IP connections there is a series of "GETHOST..." calls.  You could [ hostid
= gethostid(); ] which will determine the unique
32 bit host identifier assigned to the local machine, or you could [retcode
= gethostbyname (name); ] which will map a host
name to an IP address, or you could [retcode = gethostbyaddr (addr, alen,
atype); ] which will return a structure full of information
about the IP address contained in addr.  I would suggest looking at the API
documentation for more details here.

        Lastly, a simple way to prime a host look up is to keep the system
name in the Network Attributes, and the primary host
name the same, so that you can rtvneta sysname(name) and then gethostbyname
to get the address which is what you asked
for in the first place.

        Hope this is clearer then mud.   :-)

        Jeff Silberberg..
        CompuDesigns, Inc...
-----Original Message-----
From: Shannon O'Donnell <orion@auburnctnet.com>
To: MIDRANGE-L@midrange.com <MIDRANGE-L@midrange.com>
Date: Monday, February 22, 1999 2:38 PM
Subject: TCP/IP Address


>This might be a dumb question, but I am away from my office and can't
>look it up, and my internet connection is too slow to spend a long time
>searching the online knowledgebase for the answer...so...does anyone
>know, off the top of their head, if there is a way to get the IP address
>of the AS/400 using a command, a cl program or an API and what it's
>called?
>
>I just need to verify that this function exists. I know about the
>Retrieve Device Description API that will do this for the individual
>client. I'm just not sure if there's a way to retrieve the actual IP
>address as defined for the system.
>
>Thanks!
>
>+---
>| This is the Midrange System Mailing List!
>| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
>| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
>| To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner/operator:
david@midrange.com
>+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.