#include "V_D_UC.h"
#include "srvr.h"

#ifdef USE_agent

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* CALL:
*   int  daSrvrOpen(sp,fp,fl,md)
*   	Str*  sp;	-- Name of server
*   	Str*  fp;	-- Name of remote file
*   	int   fl;	-- Open flags
*   	int   md;	-- Mode for creation
*
* DESCRIPTION:
*
* This returns a connection to a server.  It first checks to see if we
* have  a  connection, and if so, returns it.  If not, we go through a
* number of attempts to make a connection (aka association).
*
* If successful, we return a  pointer  to  the  Srvr  struct  for  the
* server; failure returns a null pointer.
*
* AUTHOR: John Chambers.
*
* CHANGES:
*/
FCT int  daSrvrOpen(sp,fp,fl,md)
	Str*  sp;	/* Name of server */
	Str*  fp;	/* Name of remote file */
	int   fl;	/* Open flags */
	int   md;	/* Mode for creation */
{	int   r = -1;
:f	Fenter("daSrvrOpen");
:5	V5D "Called for srvr %s file %s flags %08X mode 0%o"
:5		,DspSP(sp),DspSP(fp),fl,md D;
#ifdef USE_agent
/*
* Code to contact the server goes here.
*/
#else
:2	V2D "### Not implemented here ###" D;
	errno = ENOENT;
#endif
:f	Fexit;
	return r;
}
#endif /* USE_agent */
