Obtains name information for a specified host.
&SOCKETGETHOSTBYADDR ADDRESS=ip_address
[ MDO=mdo_name ]
[ WAIT=time ]
[ TYPE={SYNC | ASYNC} ]
GETHOSTBYADDR is used to obtain the real name of the host at an IP address specified by the ADDRESS operand.
Operands:
(Mandatory) Specifies the IP address of the host about which information is required. No alias name information is returned.
Specifies the name of the Mapped Data Object (MDO) into which information about the host is to be formatted. The MDO is mapped by the $NMTCPHE map.
Specifies the time (in seconds)to wait for the host to respond. The default value is 30 seconds.
Indicates whether this is a synchronous (SYNC) or asynchronous (ASYNC) socket request.
If TYPE=ASYNC is specified, WAIT cannot be specified.
If TYPE=ASYNC is specified, the verb returns control immediately, and a notification message is queued to the dependent environment when GETHOSTBYADDR completes:
N00101 NOTIFY: TCP/IP EVENT: GETHOSTBYADDR RESOURCE: RC=rc RSN=rsn ERR=errno VERRIN=vendor_info ADDRESS=ip_address
The return MDO is available in $INT.USERMDO after &INTREAD receives the message.
Examples: &SOCKET GETHOSTBYADDR
&SOCKET GETHOSTBYADDR ADDRESS=172.24.91.45 &WRITE NAME=&ZSOCHNM IPADDRESS=&ZSOCHADR
Return Codes:
Get successful
Get failed; see &ZFDBK for reason code, &ZSOCERRN and &ZSOCVERR for further error information.
Notes:
The information returned is set into the following NCL variables:
&ZSOCHNM contains the host name.
| Copyright © 2009 CA. All rights reserved. |
|