PMDF Programmer's Reference Manual
PMDF-PRM-6.0


Previous | Contents

PMDF_get_address_property

Parse an address and return the requested address property.

VMS FORMAT

status = PMDF_get_address_property

(address, property, result, result_len)

argument information
Argument Data type Access Mechanism
address descriptor read reference
property integer read value
result descriptor read/write reference
result_len unsigned word write reference

C FORMAT

status = PMDFgetAddressProperty

(address, address_len, property, result, result_len)

argument information
int PMDFgetAddressProperty (address, address_len, property, 
                            result, result_len) 
         char *address; 
         int   address_len; 
         int   property 
         char *result; 
         int  *result_len; 

ARGUMENTS

address

The address to parse. Length of this string may not exceed BIGALFA_SIZE bytes.

address_len

Length in bytes of the address to parse.

property

The address property to return.

result

String to receive the address property. Must be at least ALFA_SIZE bytes in length. (ALFA_SIZE+1 bytes for PMDFgetAddressProperty.)

result_len

Length in bytes of the returned property. Callers using PMDFgetAddressProperty must, on input, supply the maximum length in bytes of result.

DESCRIPTION

PMDF_get_address_property may be used to parse an address and return the desired property. Moreover, PMDF_get_address_property can be used to see if an address is syntactically legal and to clean up addresses with minor syntax problems. The former is accomplished by seeing if PMDF__PARSE is returned and the latter by requesting the PMDF_PROP_PROPER property. The accepted values for property are shown below and refer to an address of the form
phrase <@otherhost:user@host> (comment) 
Symbolic name Value Description
PMDF_PROP_ADDRESS 1 Address part, @ otherhost: user@ host , of the address
PMDF_PROP_DOMAIN 2 Domain part, host , of the address
PMDF_PROP_FRIENDLY 3 See description below
PMDF_PROP_LOCAL 4 Local part, user , of the address
PMDF_PROP_PHRASE 5 Phrase part, phrase , of the address, if any
PMDF_PROP_PROPER 6 Full address including any phrases and comments
PMDF_PROP_ROUTE 7 Source route part, @ otherhost: , of the address, if any
The PMDF_PROP_FRIENDLY property may be used to attempt to extract a human name from the address. When this property is requested, the following steps are used to determine the value to return:
Return Values
PMDF__OK Normal, successful completion.
PMDF__BAD Bad parameter supplied: invalid value for property. No result returned.
PMDF__FATERRLIB Call to LIB$SCOPY_R_DX failed owing to a fatal internal error in the OpenVMS Run Time Library. No result returned.
PMDF__INSVIRMEM Insufficient virtual memory: call to LIB$GET_VM made by LIB$SCOPY_R_DX has failed. No result returned.
PMDF__INVSTRDES Invalid string descriptor for result: descriptor has an invalid value in its DSC$B_CLASS field. No result returned.
PMDF__NO Invalid address. No result returned.
PMDF__STRTRU Supplied string was too long; result truncated to fit.


Previous | Next | Contents