DTMmakeInPort(3DTM)

NAME
DTMmakeInPort, DTMmakeOutPort - Reserve a port for reception/transmission of data.

SYNOPSIS
#include <dtm.h>

int DTMmakeInPort(char *portname , int qservice)

int DTMmakeOutPort(char *portname, int qservice)

DESCRIPTION
DTMmakeInPort creates an input port. Portname is a pointer to a string with the format 'hostname:port'. 'Hostname' is optional and will always be understood to be the local host's name in it's abscence. Portname represent the address where the system will listen for incoming messages. If portname is ':0' then the system will assign the TCP port number. The value can be retrieved with DTMgetPortAddr.

If DTMmakeInPort suceeds, it returns a portid. The portid is an integer useful for referring to the port in all subsequent DTM calls. If there is any errors DTMmakeInPort will return DTMERROR.

DTMmakeOutPort creates an output port. Portname is pointer to a string with the format 'hostname:port' representing the address to which outgoing messages will be sent. Therefore, 'hostname' is any legal host name or IP address, though in it's abscence it will always be understood to be the local host. 'Port' is the TCP port number to which data must be sent.

If DTMmakeOutPort suceeds, it returns a portid. The portid is an integer used to refer to the port in all subsequent DTM calls. If there are any errors DTMmakeOutPort will return DTMERROR.

In both cases, the argument qservice describes the quality of service to used. The types of service available are: DTM_SYNC, DTM_ASYNC, DTM_DEFAULT. They each have the following behavior:

	DTM_SYNC:	Causes all communications to rely on a simple
		handshake in order to reduce the possibility of deadlock.
	DTM_ASYNC:	Causes all communications to ignore any
		requests for handshaking.  This has the possible effect of
		speeding communications, though the danger of deadlocking
		processes needing that port is increased.
	DTM_DEFAULT:	Sets the value to DTM_SYNC until this is
		further defined.

SEE ALSO
DTM

DIAGNOSTICS
When the value DTMERROR is returned, DTMerrno may be set to these possible errors:

    DTMNOPORT    No more open DTM ports.
    DTMMEM    Insufficient memory for port.
    DTMHUH    Illegal port name.