|
|
1.1 ! root 1: /* rosy.h - include file for ROSY users */ ! 2: ! 3: /* ! 4: * $Header: /f/osi/h/RCS/rosy.h,v 7.1 90/07/01 21:03:55 mrose Exp $ ! 5: * ! 6: * ! 7: * $Log: rosy.h,v $ ! 8: * Revision 7.1 90/07/01 21:03:55 mrose ! 9: * pepsy ! 10: * ! 11: * Revision 7.0 89/11/23 21:55:57 mrose ! 12: * Release 6.0 ! 13: * ! 14: */ ! 15: ! 16: /* ! 17: * NOTICE ! 18: * ! 19: * Acquisition, use, and distribution of this module and related ! 20: * materials are subject to the restrictions of a license agreement. ! 21: * Consult the Preface in the User's Manual for the full terms of ! 22: * this agreement. ! 23: * ! 24: */ ! 25: ! 26: ! 27: #ifndef _ROSY_ ! 28: #define _ROSY_ ! 29: ! 30: #ifndef _MANIFEST_ ! 31: #include "manifest.h" ! 32: #endif ! 33: #ifndef _GENERAL_ ! 34: #include "general.h" ! 35: #endif ! 36: ! 37: #ifndef _RoSAP_ ! 38: #include "rosap.h" /* definitions for RoS-USERs */ ! 39: #endif ! 40: ! 41: /* */ ! 42: ! 43: #ifdef PEPSY_VERSION ! 44: #include "pepsy.h" ! 45: #endif ! 46: ! 47: #ifdef PEPSY_DEFINITIONS ! 48: /* This is really to change the name of the function RyOperation but the macro ! 49: * is unselective so we have to change the name of the structure as well, which ! 50: * shouldn't cause any problems ! 51: */ ! 52: #define RyOperation PRyOperation ! 53: #endif PEPSY_DEFINITIONS ! 54: struct RyOperation { ! 55: char *ryo_name; /* operation name */ ! 56: int ryo_op; /* operation code */ ! 57: ! 58: #ifdef PEPSY_DEFINITIONS ! 59: modtyp *ryo_arg_mod; /* pointer to table for arguement type */ ! 60: int ryo_arg_index; /* index to entry in tables */ ! 61: #else PEPSY_DEFINITIONS ! 62: IFP ryo_arg_encode; /* encodes argument */ ! 63: IFP ryo_arg_decode; /* decodes .. */ ! 64: IFP ryo_arg_free; /* frees .. */ ! 65: #endif PEPSY_DEFINITIONS ! 66: ! 67: int ryo_result; /* result possible */ ! 68: #ifdef PEPSY_DEFINITIONS ! 69: modtyp *ryo_res_mod; /* pointer to table for result type */ ! 70: int ryo_res_index; /* index to entry in tables */ ! 71: #else PEPSY_DEFINITIONS ! 72: IFP ryo_res_encode; /* encodes result */ ! 73: IFP ryo_res_decode; /* decodes .. */ ! 74: IFP ryo_res_free; /* frees .. */ ! 75: #endif PEPSY_DEFINITIONS ! 76: ! 77: struct RyError **ryo_errors;/* errors possible */ ! 78: }; ! 79: ! 80: ! 81: ! 82: struct RyError { ! 83: char *rye_name; /* error name */ ! 84: int rye_err; /* error code */ ! 85: ! 86: #ifdef PEPSY_DEFINITIONS ! 87: modtyp *rye_param_mod; /* pointer to table for result type */ ! 88: int rye_param_index; /* index to entry in tables */ ! 89: #else PEPSY_DEFINITIONS ! 90: IFP rye_param_encode; /* encodes parameter */ ! 91: IFP rye_param_decode; /* decodes .. */ ! 92: IFP rye_param_free; /* frees .. */ ! 93: #endif PEPSY_DEFINITIONS ! 94: }; ! 95: ! 96: /* */ ! 97: ! 98: struct opsblk { ! 99: struct opsblk *opb_forw; /* doubly-linked list */ ! 100: struct opsblk *opb_back; /* .. */ ! 101: ! 102: short opb_flags; /* our state */ ! 103: #define OPB_NULL 0x0000 ! 104: #define OPB_EVENT 0x0001 /* event present */ ! 105: #define OPB_INITIATOR 0x0002 /* initiator block */ ! 106: #define OPB_RESPONDER 0x0004 /* responder block */ ! 107: ! 108: int opb_fd; /* association descriptor */ ! 109: int opb_id; /* invoke ID */ ! 110: ! 111: IFP opb_resfnx; /* result vector */ ! 112: IFP opb_errfnx; /* error vector */ ! 113: ! 114: struct RyOperation *opb_ryo;/* entry in operation table */ ! 115: ! 116: struct RoSAPindication opb_event; /* resulting event */ ! 117: caddr_t opb_out; /* event parameter */ ! 118: #ifdef PEPSY_DEFINITIONS ! 119: modtyp *opb_free_mod; /* pointer to table for result type */ ! 120: int opb_free_index; /* index to entry in tables */ ! 121: #else PEPSY_DEFINITIONS ! 122: IFP opb_free; /* free routine for event parameter */ ! 123: #endif PEPSY_DEFINITIONS ! 124: ! 125: PE opb_pe; /* for Simon */ ! 126: }; ! 127: #define NULLOPB ((struct opsblk *) 0) ! 128: ! 129: ! 130: ! 131: ! 132: struct dspblk { ! 133: struct dspblk *dsb_forw; /* doubly-linked list */ ! 134: struct dspblk *dsb_back; /* .. */ ! 135: ! 136: int dsb_fd; /* association descriptor */ ! 137: /* NOTOK-valued is wildcard for RyWait */ ! 138: ! 139: struct RyOperation *dsb_ryo;/* entry in operation table */ ! 140: ! 141: IFP dsb_vector; /* dispatch vector */ ! 142: }; ! 143: #define NULLDSB ((struct dspblk *) 0) ! 144: ! 145: ! 146: ! 147: #define RY_RESULT (-1) /* distinguishes RESULTs from ERRORs */ ! 148: #define RY_REJECT (-2) /* distinguishes REJECTs from ERRORs */ ! 149: ! 150: /* */ ! 151: /* Change the names to use the pepsy based rosy library */ ! 152: #ifdef PEPSY_DEFINITIONS ! 153: #define RyDiscard PRyDiscard ! 154: #define RyDispatch PRyDispatch ! 155: #define RyDsError PRyDsError ! 156: #define RyDsResult PRyDsResult ! 157: #define RyDsUReject PRyDsUReject ! 158: #define RyGenID PRyGenID ! 159: #define RyLose PRyLose ! 160: #define RyOpInvoke PRyOpInvoke ! 161: #define RyStub PRyStub ! 162: #define RyWait PRyWait ! 163: #define RyWaitAux PRyWaitAux ! 164: #define finddsblk Pfinddsblk ! 165: #define finderrbyerr Pfinderrbyerr ! 166: #define finderrbyname Pfinderrbyname ! 167: #define findopblk Pfindopblk ! 168: #define findopbyname Pfindopbyname ! 169: #define findopbyop Pfindopbyop ! 170: #define firstopblk Pfirstopblk ! 171: #define freedsblk Pfreedsblk ! 172: #define freeopblk Pfreeopblk ! 173: #define losedsblk Plosedsblk ! 174: #define loseopblk Ploseopblk ! 175: #define newdsblk Pnewdsblk ! 176: #define newopblk Pnewopblk ! 177: #endif ! 178: ! 179: int RyWait (); /* WAIT */ ! 180: ! 181: /* Initiator */ ! 182: int RyStub (); /* STUB */ ! 183: #define ROS_INTR 2 /* invoke stub but return on interrupt */ ! 184: int RyDiscard (); /* DISCARD */ ! 185: int RyOperation (); /* OPERATION */ ! 186: int RyOpInvoke (); /* INVOKE */ ! 187: int RyGenID (); /* generate unique invoke ID */ ! 188: ! 189: /* Responder */ ! 190: int RyDispatch (); /* DISPATCH */ ! 191: int RyDsResult (); /* RESULT */ ! 192: int RyDsError (); /* ERROR */ ! 193: int RyDsUReject (); /* U-REJECT */ ! 194: ! 195: int RyLose (); /* clean-up after association termination */ ! 196: ! 197: struct RyOperation *findopbyop (), *findopbyname (); ! 198: ! 199: struct RyError *finderrbyerr (), *finderrbyname (); ! 200: ! 201: int freeopblk (), loseopblk (); ! 202: struct opsblk *newopblk (), *findopblk (), *firstopblk (); ! 203: ! 204: int freedsblk (), losedsblk (); ! 205: struct dspblk *newdsblk (), *finddsblk (); ! 206: ! 207: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.