ARDP Library Interface Description

Below we provide a description of the interfaces to the ARDP library.

The ARDP v1 API (which is implemented and distributed as ARDP Release 1.0) is a superset of the ARDP v0 API.

This page's documentation covers the ARDP Version 0 facilities in the Prospero 5.3 release. Programmers using ARDP release 1.0 or Prospero release 5.4 will also want to read ARDP - API (Version 1).

Functions in the library that are not described here should be considered internal and should not be called by the application. In the functions that follow, more documentaton can be found in the header preceding the function in the source code.

ARDP Errors

Many functions are listed as returning an ardp_errcode. In the Prospero 5.3 release, this is actually an int; the type was changed to ardp_errcode, a typedef for enum ardp_errcode, in later releases. These errors, taken from ardp.h, are as follows. The numeric values should not be relied upon; use the symbolic names instead:

/* ARDP library error status codes. */
/* These must remain in the range 0-20 for compatibility with the Prospero
   File System. */
/* Note that ARDP_SUCCESS must remain 0, due to code implementation. */
enum ardp_errcode {
    ARDP_SUCCESS = 0,		/* Successful completion of call    */
    ARDP_PORT_UNKN = 1,		/* UDP port unknown                 */
    ARDP_UDP_CANT = 2,		/* Can't open local UDP port        */
    ARDP_BAD_HOSTNAME = 3,	/* Can't resolve hostname           */
    ARDP_NOT_SENT = 4,		/* Attempt to send message failed   */
    ARDP_SELECT_FAILED = 5,	/* Select failed	            */
    ARDP_BAD_RECV = 6,		/* Recvfrom failed 	            */
    ARDP_BAD_VERSION = 7,       /* bad version # in rdgram protocol */
    ARDP_BAD_REQ = 8,		/* Inconsistent request structure   */
    ARDP_TIMEOUT = 9,		/* Timed out - retry count exceeded */
    ARDP_REFUSED = 10,		/* Connection refused by server     */
    ARDP_FAILURE = 11,		/* Unspecified ARDP failure         */
    ARDP_TOOLONG = 12,		/* Buffer too long for packet       */
    ARDP_TIMER_FAILED = 13,	/* A call to gettimeofday() failed.
				   (this is ARI's addition; I'm not
				   sure that it's needed --swa) */
    ARDP_CRITICAL_CONTEXT_NOT_SUPPORTED = 14, /* for ardp-v1 contexts */
    ARDP_CONTEXT_FAILURE = 16,	/* more general than the CONTEXT ones above;
				   more specific than ARDP_FAILURE (or
				   ARDP_REFUSED, in some situations)  */

typedef enum ardp_errcode ardp_errcode;

ARDP client functions

The following functions are exported by the ARDP library for use by the client side of a connection:

ARDP server functions

The following functions and variables are exported by the ARDP library for use by the server side of a connection:

ARDP client and server interfaces

The following functions are exported by the ARDP library for use by either the client and the server sides of a connection: The following functions and variables are used internally by the ARDP library; we are mentioning them so that users of ARDP will not be confused by finding them in the ARDP source code and for the convenience of those wishing to do further ARDP development. Some of them may also be useful to applications writers in special circumstances. ARDP's configurable parameters are defined in a global data structure named ardp_config. This structure is initially filled in by ardp_initialize(), which uses the p_config routines of gostlib. After your program calls ardp_initialize(), you may set these members directly. You will normally not bother setting most of these parameters; skip this section if you are just learning to use ARDP. The members of ardp_config are:

Additional ARDP interfaces (left out of the docs. before 8/14/97)

Authors: Steven Augart <swa@ISI.EDU>, Katia Obraczka <katia@ISI.EDU>.

File updated: August 18, 1997, Steven Augart <swa@ISI.EDU>.