DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T c

⟦c898ff1fb⟧ TextFile

    Length: 6670 (0x1a0e)
    Types: TextFile
    Names: »connection.h«

Derivation

└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
    └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« 
        └─⟦d3ac74d73⟧ 
            └─⟦this⟧ »isode-5.0/h/quipu/connection.h« 

TextFile

/* connection.h - directory internal structures */

/*
 * $Header: /f/osi/h/quipu/RCS/connection.h,v 6.1 89/03/23 22:27:33 mrose Exp $
 *
 *
 * $Log:	connection.h,v $
 * Revision 6.1  89/03/23  22:27:33  mrose
 * out-the-door
 * 
 * Revision 6.0  89/03/18  23:32:48  mrose
 * Release 5.0
 * 
 */

/*
 *				  NOTICE
 *
 *    Acquisition, use, and distribution of this module and related
 *    materials are subject to the restrictions of a license agreement.
 *    Consult the Preface in the User's Manual for the full terms of
 *    this agreement.
 *
 */


#ifndef QUIPUCON
#define QUIPUCON

#define ASYNC_DSA

#include "psap2.h"
#include "acsap.h"
#include "quipu/common.h"
#include "quipu/dsargument.h"

#define DB_NDATA 1      /* Number of PE's expected for Bind info.  */

#define DSA_PRIO_LOW            1
#define DSA_PRIO_MED            2
#define DSA_PRIO_HIGH           3
#define DSA_MAX_PRIO            3

#define INITIATED_BY_THIS       1
#define INITIATED_BY_THAT       2

#define ACTIVITY_NET_WAIT       1
#define ACTIVITY_DSA_WORK       2
#define ACTIVITY_NET_SEND       3
#define ACTIVITY_COLLATE        4
#define ACTIVITY_ABANDON	5

#define ACT_TYPE_REQ            1
#define ACT_TYPE_CHN            2
#define ACT_TYPE_RESP           3

#define RESP_TYPE_RET           1
#define RESP_TYPE_REJ           2

#define RET_TYPE_RES            1
#define RET_TYPE_ERR            2

/*
* This structure provides a means of collecting and thus reusing
* information about an entity in terms of ISODE. This is changeable
* from day to day as coding proceeds and more isode routine parameters
* are discovered. Will also probably change if  the isode databases
* are replaced by a directory! And when stable this structure should
* be integrated with the dsa_info structure above.
*/
typedef
    struct quipu_dsa_info
    {
	AEI                     aei;            /* AEI for this DSA */
	struct PSAPaddr         *addr;          /* Address for this DSA */
	int                     p_req;          /* Presentation requirements */
	int                     s_req;          /* Session requirements */
	long                    isn;            /* Initial serial number */
	int                     settings;       /* Settings */
	struct QOStype          qos;            /* Quality of service */
	int                     async;          /* Sync or Asyn Assoc Request */
    } *DSAinfo;

typedef
    struct init_response
    {
	char                        init_resp_type;
	char                        init_ret_type;

	struct ds_bind_arg          init_resp_res;
	struct ds_bind_error        init_resp_err;
    } InitResponse;

typedef
    struct init_activity
    {
	char                            ia_class;
	char                            ia_type;

	int                             ia_status;
	int                             ia_reason;
	struct AcSAPstart               * ia_acs;
	int                             ia_defctxres;

	struct ds_bind_arg              ia_req;
	struct init_response            ia_resp;
    } InitActivity;

typedef
    struct exit_activity
    {
	char                            exit_act_class;
	char                            exit_act_type;
	int                             exit_act_prio;
    } ExitActivity;

typedef
    struct response
    {
	char                    resp_type;
	char                    ret_type;

	struct ds_op_res        resp_res;
	struct DSError          resp_err;
	int                     resp_rej;
	ContinuationRef         resp_ref;
    } OpenResponse;

typedef
    struct activity
    {
	int                     act_id;
	int                     act_prio;
	char                    act_class;

	char                    act_type;

	struct ds_op_arg        act_req;
	struct chain_arg	*act_cha;
	struct common_args      *act_ca;
	struct response         act_resp;
	struct ds_op_res        *act_result;
	struct DSError          *act_error;

	char                    act_initiator;

	/* Specific additions to provide multi-subtask search implementation */
	struct ds_search_task	*local_st;
	struct ds_search_task	*refer_st;
	struct ds_search_task	*referred_st;

	struct activity         *tk_operlist;
	struct activity         *tk_next;

	struct ds_op_arg	*on_arg;
	struct continuation_ref	*on_cr_next;
	struct access_point	*on_ap_next;
	struct activity         *on_task;
	struct activity         *on_next_conn;
	struct activity         *on_next_task;

	struct connection       *act_conn;
    } OpenActivity;
#define NULLACTIVITY ((struct activity *) 0)

/*
* Conn is the structure used to represent external connections
*/
typedef
    struct connection
    {
	char                    cn_state;
#define CN_STATE_INIT           1
#define CN_STATE_OPEN           2
#define CN_STATE_EXIT           3
#define CN_STATE_FAIL           4
#define CN_STATE_INIT2		5

	char                    cn_initiator;
	/* Tells whether THIS DSA or THAT DSA initiated connection */


	struct init_activity    cn_init_act;
	struct exit_activity    cn_exit_act;

        time_t			cn_last_used;
			/* Time at which this connection was last used */

	char                    cn_dsa; 
			/* TRUE for DSA, false for DUA                  */
			/* This will in future imply DSP/DAP            */

	DN                      cn_who;
			/* Who is producing this operation */
	DN                      cn_what;
			/* What is at the remote end                    */
	struct PSAPaddr         cn_addr;
			/* Where the remote end is */

	int                     cn_ad;
		       /* handle on the association                    */

	int			cn_context_id;
			/* Context identifier of context to be used for */
			/* user-data over this connection. */

	int                     cn_op_id;
				/* used to ensure unique invoke id's */

	struct activity *cn_tasklist;
				/* list of tasks to be performed        */

	struct activity *cn_operlist;
				/* list of pending operations           */

	struct connection       *cn_next;
				/* rest of list of connections          */
    } *Conn;
#define NULLCONN ((Conn) 0)

/*
* DSAstate is used to represent the full state of the DSA, it keeps track
* of the open connections (and their descriptors), the ISODE info for this
* DSA and a list of the open connections.
*/
typedef
    struct quipu_dsa_state
    {
	struct quipu_dsa_info    info;   /* Info for THIS DSA */
	fd_set                   iads;   /* ad's with open associations */
	fd_set                   wads;   /* ad's with AsynAssoc calls out */
	int                      nads;   /* Width of descriptors used */
	struct connection       *connlist;      /* Connection blocks */
    } *DSAstate;

extern  struct quipu_dsa_state  id_st; /* Internal Directory State */

#endif