HASSLE Code documentation

location: Home > Archive > HASSLE > HASSLE code documentation

Chapter 5-2:Interface layer


Section 5-2: Interface layer

Copyrighted material. See the Internet Biocompanion Home Page for further information.

[ Previous chapter ][ This chapter ][ Next chapter ]

$Header: /bioy2/biocomputing/eggenber/Hassle/RCS/functions2.txt,v 1.25 1994/11/03 07:06:30 eggenber Exp $

 
/*+*****************************************************************************  
  
Function:       CloseCliCom  
  
Purpose:        Interface controlling the closing of the client communications.  
  
Arguments:      none  
  
Return value:   _H_SUCCESS if everything is ok;  
                CLOSE_ERR if _H_CLOSE failed  
  
Called by:      EndCliCom[3]  
  
Calls:          CloseCliComIP[1]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       CloseSerCom  
  
Purpose:        Interface controlling the closing of the server communications.  
  
Arguments:      none  
  
Return value:   _H_SUCCESS if everything is ok;  
                CLOSE_ERR if _H_CLOSE failed  
  
Called by:      EndSerCom[3]  
  
Calls:          CloseSerComIP[1]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       ConvCmdLine  
  
Purpose:        Process command lines received from a client/server.  
                Control decryption.   
  
Arguments:      pointer to the line to be processed  
  
Return value:   _H_SUCCESS if everything is ok  
  
Called by:      CompDatEndLine[3];  
                CompDatStartLine[3];  
                CompDoItLine[3];  
                CompExitLine[3];  
                CompFailLine[3];  
                CompHassLine[3];  
                CompServLine[3];  
                CompTimeLine[3];  
                CompWaitLine[3];  
                CompXDatLine[3];  
                CompYDatLine[3];  
                ParsDatEndLine[3];  
                ParsDatStartLine[3];  
                ParsDoItLine[3];  
                ParsExitLine[3];  
                ParsFailLine[3];  
                ParsHassLine[3];  
                ParsServLine[3];  
                ParsTimeLine[3];  
                ParsWaitLine[3]  
  
Calls:          security[2]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:	ConvDatLine  
          
Purpose:	Process data lines received from a server. Controls decryption  
		and decompression(XDATA)/conversion from ascii(YDATA).  
  
Arguments:	pointer to the line to be processed  
  
Return value:   _H_SUCCESS if everything is ok  
          
Called by:	ParsXDatLine[3];  
		ParsYDatLine[3]  
  
Calls:		security[2];  
		hassle_decompress[2];  
		"conversion_from_ascii"[2]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       GetHostName  
  
Purpose:        Interface controlling the retrieval of the official name of a  
                host supplied as argument. If a blank string is supplied, then  
                the official name of the local host is retrieved.  
   
Arguments:      pointer to the hostname to be processed  
  
Return value:   _H_SUCCESS if everything is ok;  
                GETHOSTNAME_ERR if gethostname call failed;  
                GETHOSTBYNAME_ERR if gethostbyname call failed  
  
Called by:      AssFirstHost[3];  
                AssNextHost[3]  
  
Calls:          GetHostNameIP[1]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       OpenCliCom  
  
Purpose:        Interface controlling the opening of the client communications.  
  
Arguments:      none  
  
Return value:   _H_SUCCESS if everthing is ok;  
                SOCKET_ERR if socket failed;  
                CONNECT_ERR if _H_CONNECT failed;  
                CLOSE_ERR if _H_CLOSE failed  
  
Called by:      BeginCliCom[3]  
  
Calls:          OpenCliComIP[1]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       OpenSerCom  
  
Purpose:        Interface controlling the opening of the server communications.  
  
Arguments:      none  
  
Return value:   _H_SUCCESS if everthing is ok;  
                ACCEPT_ERR if _H_ACCEPT failed;  
                BIND_ERR if _H_BIND failed;  
                GETHOSTNAME_ERR if gethostname failed;  
                GETHOSTBYNAME_ERR if gethostbyname failed;  
                LISTEN_ERR if _H_LISTEN failed;  
                SOCKET_ERR if socket failed  
  
Called by:      BeginSerCom[3]  
  
Calls:          OpenSerComIP[1]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       PrepCmdLine  
  
Purpose:        Preparation of lines to be sent to a client/server.  
                Control of encryption.   
  
Arguments:      pointer to the line to be processed  
  
Return value:   _H_SUCCESS if everything is ok;  
  
Called by:      CompDatEndLine[3];  
                CompDatStartLine[3];  
                CompDoItLine[3];  
                CompExitLine[3];  
                CompFailLine[3];  
                CompHassLine[3];  
                CompServLine[3];  
                CompTimeLine[3];  
                CompWaitLine[3];  
                ParsDatEndLine[3];  
                ParsDatStartLine[3];  
                ParsDoItLine[3];  
                ParsExitLine[3];  
                ParsFailLine[3];  
                ParsHassLine[3];  
                ParsServLine[3];  
                ParsTimeLine[3];  
                ParsWaitLine[3];  
                ParsXDatLine[3];  
                ParsYDatLine[3]  
  
Calls:          security[2]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:	PrepDatLine  
  
Purpose:	Preparation of XDATA and YDATA lines. Control of compression  
		and encryption.  
  
Arguments:	mode (XDATA/YDATA);  
		pointer to file (in case of XDATA);  
		pointer to variable (in case of YDATA);  
		pointer to the line to be processed;  
		pointer to length of the line to be processed  
  
Return value:   _H_SUCCESS if everything is ok;  
  
Called by:	CompXDatLine[3];  
		CompYDatLine[3]  
  
Calls:		hassle_compress[2];  
		security[2];  
		"conversion_to_ascii"[2]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       ReceiveLine  
  
Purpose:        Interface controlling receiving a line on a socket.   
  
Arguments:      pointer to the line to be processed  
  
Return value:   _H_SUCCESS if everything is ok;  
                READ_ERR if _H_READ failed  
  
Called by:      CompDatEndLine[3];  
                CompDatStartLine[3];  
                CompDoItLine[3];  
                CompExitLine[3];  
                CompFailLine[3];  
                CompHassLine[3];  
                CompTimeLine[3];  
                CompServLine[3];  
                CompWaitLine[3];  
                CompXDatLine[3];  
                CompYDatLine[3];  
                ParsDatEndLine[3];  
                ParsDatStartLine[3];  
                ParsDoItLine[3];  
                ParsHassLine[3];  
                ParsServLine[3];  
                ParsTimeLine[3];  
                ParsXDatLine[3];  
                ParsYDatLine[3]  
  
Calls:          ReceiveLineIP[1]  
  
*****************************************************************************-*/  
/*+*****************************************************************************  
  
Function:       SendLine  
  
Purpose:        Interface controlling the sending of a line on a socket.  
                Parse requests to send a line to a client/server. Call  
                the appropriate send function of the lower protocol layer.  
  
Arguments:      pointer to the line to be sent  
  
Return value:   _H_SUCCESS if everything is ok;  
                WRITE_ERR if _H_WRITE failed  
  
Called by:      CompDatEndLine[3];  
                CompDatStartLine[3];  
                CompDoItLine[3];  
                CompExitLine[3];  
                CompFailLine[3];  
                CompHassLine[3];  
                CompServLine[3];  
                CompTimeLine[3];  
                CompWaitLine[3];  
                CompXDatLine[3];  
                CompYDatLine[3];  
                ParsDatEndLine[3];  
                ParsDatStartLine[3];  
                ParsDoItLine[3];  
                ParsExitLine[3];  
                ParsFailLine[3];  
                ParsHassLine[3];  
                ParsTimeLine[3];  
                ParsServLine[3];  
                ParsWaitLine[3];  
                ParsXDatLine[3];  
                ParsYDatLine[3]  
  
Calls:          SendLineIP[1]  
  
*****************************************************************************-*/  
  
  

[ Previous chapter ],[ This chapter ][ Next chapter ] [next page/section] , or [overview] , or [table of contents]