PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFgetHostName

Obtain the official local host name.

PASCAL

status = PMDF_get_host_name (host, host_len)

argument information
Argument Data type Access Mechanism
host descriptor read/write reference
host_len unsigned word write reference

C

status = PMDFgetHostName (host, host_len)

argument information


int PMDFgetHostName(char *host, int *host_len) 


Arguments

host

String to receive the official local host name. This string should be at least ALFA_SIZE+1 bytes long.

host_len

Length in bytes of the returned host string. Callers using PMDFgetHostName must, on input, supply the maximum length in bytes of host.

Description

The official name of the local host (i.e., the host name associated with the local, l, channel) can be obtained by calling PMDFgetHostName. This host name is typically used when constructing return addresses for local users. Such a return address is simply user@host where user is the name of the local user and host is the local host name.

Return Values

PMDF__OK Normal, successful completion.
PMDF__FATERRLIB Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. Host name not returned.
PMDF__INSVIRMEM Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. Host name not returned.
PMDF__INVSTRDES Invalid string descriptor for host: descriptor has an invalid value in its DSC$B_CLASS field. Host name not returned.
PMDF__STRTRU Supplied string was too long; value truncated to fit.


Previous Next Contents Index