DTMgetAddress(3DTM)

NAME
DTMgetAddress, DTMsetAddress - Retrieve and set the supplied address in the header.

SYNOPSIS

#include <dtm.h>

DTMsetAddress(char *header, char *address)

DTMgetAddress(char *header, char *address, int size)

DESCRIPTION
DTMsetAddress inserts the DTM address tag followed by the null-terminated character string address into the header header. Use DTMgetPortAddr() to retrieve the actual port address character string for insertion.

DTMgetAddress examines the header header and determines the address string address that is contained. Memory for the address string must be allocated by the user before attempting to extract the address from the header. If there is insufficient memory allocated to store the entire address as contained in the header, the address string is truncated.

SEE ALSO
DTM, DTMgetPortAddr

DIAGNOSTICS
DTMgetAddress returns the error DTMERROR if the DTM address tag is not contained within the header, or if no address string follows the tag. Otherwise, DTMgetAddress returns a 0 value.

BUGS
DTMsetAddress has no way of determining if the header contains sufficient space to hold the DTM address tag and the address string. The results of attempting to store this information beyond the end of the allocated space are undefined.

The address string may contain any characters. It is the caller's responsibility to ensure that the address string contains useful information instead of garbage.