Annotation of 43BSDReno/contrib/isode-beta/h/rtpkt.h, revision 1.1.1.1

1.1       root        1: /* rtpkt.h - include file for reliable transfer providers (RtS-PROVIDER) */
                      2: 
                      3: /* 
                      4:  * $Header: /f/osi/h/RCS/rtpkt.h,v 7.0 89/11/23 21:55:58 mrose Rel $
                      5:  *
                      6:  *
                      7:  * $Log:       rtpkt.h,v $
                      8:  * Revision 7.0  89/11/23  21:55:58  mrose
                      9:  * Release 6.0
                     10:  * 
                     11:  */
                     12: 
                     13: /*
                     14:  *                               NOTICE
                     15:  *
                     16:  *    Acquisition, use, and distribution of this module and related
                     17:  *    materials are subject to the restrictions of a license agreement.
                     18:  *    Consult the Preface in the User's Manual for the full terms of
                     19:  *    this agreement.
                     20:  *
                     21:  */
                     22: 
                     23: 
                     24: #ifndef        _RtSAP_
                     25: #include "rtsap.h"             /* definitions for RtS-USERs */
                     26: #endif
                     27: 
                     28: #include "acpkt.h"             /* definitions for AcS-PROVIDERs */
                     29: 
                     30: #ifndef        _SSAP_
                     31: #include "ssap.h"              /* definitions for SS-USERs */
                     32: #endif
                     33: 
                     34: /*  */
                     35: 
                     36: #define        rtsapPsig(acb, sd) \
                     37: { \
                     38:     if ((acb = findacblk (sd)) == NULL) { \
                     39:        (void) sigiomask (smask); \
                     40:        return rtsaplose (rti, RTS_PARAMETER, NULLCP, \
                     41:                            "invalid association descriptor"); \
                     42:     } \
                     43:     if (!(acb -> acb_flags & ACB_RTS)) { \
                     44:        (void) sigiomask (smask); \
                     45:        return rtsaplose (rti, RTS_OPERATION, NULLCP, \
                     46:                            "not an association descriptor for RTS"); \
                     47:     } \
                     48:     if (!(acb -> acb_flags & ACB_CONN)) { \
                     49:        (void) sigiomask (smask); \
                     50:        return rtsaplose (rti, RTS_OPERATION, NULLCP, \
                     51:                            "association descriptor not connected"); \
                     52:     } \
                     53:     if (acb -> acb_flags & ACB_FINN) { \
                     54:        (void) sigiomask (smask); \
                     55:        return rtsaplose (rti, RTS_OPERATION, NULLCP, \
                     56:                            "association descriptor finishing"); \
                     57:     } \
                     58: }
                     59: 
                     60: #define        rtsapFsig(acb, sd) \
                     61: { \
                     62:     if ((acb = findacblk (sd)) == NULL) { \
                     63:        (void) sigiomask (smask); \
                     64:        return rtsaplose (rti, RTS_PARAMETER, NULLCP, \
                     65:                            "invalid association descriptor"); \
                     66:     } \
                     67:     if (!(acb -> acb_flags & ACB_RTS)) { \
                     68:        (void) sigiomask (smask); \
                     69:        return rtsaplose (rti, RTS_OPERATION, NULLCP, \
                     70:                            "not an association descriptor for RTS"); \
                     71:     } \
                     72:     if (!(acb -> acb_flags & ACB_CONN)) { \
                     73:        (void) sigiomask (smask); \
                     74:        return rtsaplose (rti, RTS_OPERATION, NULLCP, \
                     75:                            "association descriptor not connected"); \
                     76:     } \
                     77:     if (!(acb -> acb_flags & ACB_FINN)) { \
                     78:        (void) sigiomask (smask); \
                     79:        return rtsaplose (rti, RTS_OPERATION, NULLCP, \
                     80:                            "association descriptor not finishing"); \
                     81:     } \
                     82: }
                     83: 
                     84: #define        missingP(p) \
                     85: { \
                     86:     if (p == NULL) \
                     87:        return rtsaplose (rti, RTS_PARAMETER, NULLCP, \
                     88:                            "mandatory parameter \"%s\" missing", "p"); \
                     89: }
                     90: 
                     91: 
                     92: #ifndef        lint
                     93: #ifndef        __STDC__
                     94: #define        copyRtSAPdata(base,len,d) \
                     95: { \
                     96:     register int i = len; \
                     97:     if ((d -> d/* */_cc = min (i, sizeof d -> d/* */_data)) > 0) \
                     98:        bcopy (base, d -> d/* */_data, d -> d/* */_cc); \
                     99: }
                    100: #else
                    101: #define        copyRtSAPdata(base,len,d) \
                    102: { \
                    103:     register int i = len; \
                    104:     if ((d -> d##_cc = min (i, sizeof d -> d##_data)) > 0) \
                    105:        bcopy (base, d -> d##_data, d -> d##_cc); \
                    106: }
                    107: #endif
                    108: #else
                    109: #define        copyRtSAPdata(base,len,d)       bcopy (base, (char *) d, len)
                    110: #endif
                    111: 
                    112: 
                    113: #define        pylose() \
                    114:        rtpktlose (acb, rti, RTS_PROTOCOL, NULLCP, "%s", PY_pepy)
                    115: 
                    116: 
                    117: /* would really prefer to determine DEFAULT_CKPOINT dynamically, but can't
                    118:    since need to know it *before* doing the A-ASSOCIATE.REQUEST or
                    119:    S-CONNECT.REQUEST... */
                    120: 
                    121: #define        DEFAULT_CKPOINT (65518 >> 10)
                    122: #define        DEFAULT_WINDOW  PCONN_WD_DFLT
                    123: 
                    124: 
                    125: #define        RTS_MYREQUIRE   (SR_EXCEPTIONS | SR_ACTIVITY | SR_HALFDUPLEX \
                    126:                            | SR_MINORSYNC)
                    127: 
                    128: 
                    129: #define        RT_ASN          "rtse pci version 1"
                    130: 
                    131: 
                    132: int    rtpktlose (), rtsaplose ();
                    133: 
                    134: /*  */
                    135: 
                    136: #define        SetPS2RtService(acb) \
                    137: { \
                    138:     (acb) -> acb_pturnrequest = rt2pspturn; \
                    139:     (acb) -> acb_gturnrequest = rt2psgturn; \
                    140:     (acb) -> acb_transferequest = rt2pstrans; \
                    141:     (acb) -> acb_rtwaitrequest = rt2pswait; \
                    142:     (acb) -> acb_rtsetindications = rt2psasync; \
                    143:     (acb) -> acb_rtselectmask = rt2psmask; \
                    144:     (acb) -> acb_rtpktlose = rt2pslose; \
                    145: }
                    146: 
                    147: int    acs2rtslose (), acs2rtsabort (), ps2rtslose ();
                    148: int    rt2pspturn (), rt2psgturn (), rt2pstrans (), rt2pswait (),
                    149:        rt2psasync (), rt2psmask (), rt2pslose ();
                    150: 
                    151: 
                    152: #define        SetSS2RtService(acb) \
                    153: { \
                    154:     (acb) -> acb_pturnrequest = rt2sspturn; \
                    155:     (acb) -> acb_gturnrequest = rt2ssgturn; \
                    156:     (acb) -> acb_transferequest = rt2sstrans; \
                    157:     (acb) -> acb_rtwaitrequest = rt2sswait; \
                    158:     (acb) -> acb_rtsetindications = rt2ssasync; \
                    159:     (acb) -> acb_rtselectmask = rt2ssmask; \
                    160:     (acb) -> acb_rtpktlose = rt2sslose; \
                    161: }
                    162: 
                    163: int    ss2rtslose (), ss2rtsabort ();
                    164: int    rt2sspturn (), rt2ssgturn (), rt2sstrans (), rt2sswait (),
                    165:        rt2ssasync (), rt2ssmask (), rt2sslose ();
                    166: 
                    167: /*  */
                    168:                                /* RTORQ apdu */
                    169: #define        RTORQ_CKPOINT   0       /* checkpointSize tag */
                    170: #define          RTORQ_CK_DFLT 0       /*   default */
                    171: #define        RTORQ_WINDOW    1       /* windowSize tag */
                    172: #define          RTORQ_WD_DFLT 3       /*   default */
                    173: #define        RTORQ_DIALOGUE  2       /* dialogueMode tag */
                    174: #define          RTORQ_DM_MONO 0       /*   monologue */
                    175: #define          RTORQ_DM_TWA  1       /*   two-way alternate */
                    176: #define          RTORQ_DM_DFLT RTORQ_DM_MONO
                    177: #define        RTORQ_CONNDATA  3       /* connectionDataRQ tag */
                    178: #define          RTORQ_CD_OPEN 0       /*   open tag */
                    179: #define          RTORQ_CD_RCVR 1       /*   recover tag */
                    180: 
                    181:                                /* RTOAC apdu */
                    182: #define        RTOAC_CKPOINT   0       /* checkpointSize tag */
                    183: #define          RTOAC_CK_DFLT 0       /*   default */
                    184: #define        RTOAC_WINDOW    1       /* windowSize tag */
                    185: #define          RTOAC_WD_DFLT 3       /*   default */
                    186: #define        RTOAC_CONNDATA  2       /* connectionDataAC */
                    187: #define          RTOAC_CD_OPEN 0       /*   open tag */
                    188: #define          RTOAC_CD_RCVR 1       /*   recover tag */
                    189: 
                    190:                                /* RTORJ apdu */
                    191: #define        RTORJ_REFUSE    0       /* refuseReason tag */
                    192: #define        RTORJ_USERDATA  1       /* userDataRJ */
                    193: 
                    194:                                /* RTAB apdu */
                    195: #define        RTAB_REASON     0       /* abortReason tag */
                    196: #define        RTAB_REFLECT    1       /* relectedParameter tag */
                    197: #define        RTAB_USERDATA   2       /* userDataAB */
                    198: 
                    199: extern int rtsap_priority;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.