PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
The UTL_INADDR
package provides a PL/SQL procedures to support internet addressing. It provides an API to retrieve host names and IP addresses of local and remote hosts.
This chapter contains the following topics:
Exception | Description |
---|---|
|
The host is unknown. |
Retrieve the local host name and IP address.
SET serveroutput on BEGIN DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_NAME); -- get local host name DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_ADDRESS); -- get local IP addr END; /
Subprogram | Description |
---|---|
Retrieves the IP address of the local or remote host given its name | |
Retrieves the name of the local or remote host given its IP address |
This function retrieves the IP address of the specified host.
UTL_INADDR.GET_HOST_ADDRESS ( host IN VARCHAR2 DEFAULT NULL) RETURN host_address VARCHAR2;
Parameter | Description |
---|---|
|
The name of the host to retrieve the IP address. |
Parameter | Description |
---|---|
|
The IP address of the specified host, or that of the local host if host is |
UNKNOWN_HOST:
The specified IP address is unknown.
This function retrieves the name of the local or remote host given its IP address.
UTL_INADDR.GET_HOST_NAME ( ip IN VARCHAR2 DEFAULT NULL) RETURN host_name VARCHAR2;
Parameter | Description |
---|---|
|
The name of the local or remote host of the specified IP address. |
UNKNOWN_HOST:
The specified IP address is unknown.