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

1.1       root        1: /* acsap.h - include file for association control users (AcS-USER) */
                      2: 
                      3: /* 
                      4:  * $Header: /f/osi/h/RCS/acsap.h,v 7.0 89/11/23 21:55:39 mrose Rel $
                      5:  *
                      6:  *
                      7:  * $Log:       acsap.h,v $
                      8:  * Revision 7.0  89/11/23  21:55:39  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        _AcSAP_
                     25: #define        _AcSAP_
                     26: 
                     27: #ifndef        _MANIFEST_
                     28: #include "manifest.h"
                     29: #endif
                     30: #ifndef        _GENERAL_
                     31: #include "general.h"
                     32: #endif
                     33: 
                     34: #ifndef        _PSAP2_
                     35: #include "psap2.h"             /* definitions for PS-USERs */
                     36: #endif
                     37: 
                     38: /*  */
                     39: 
                     40: #define        NACDATA         3       /* arbitrary */
                     41: 
                     42: struct AcSAPstart {            /* A-CONNECT.INDICATION */
                     43:     int            acs_sd;             /* association descriptor */
                     44:     
                     45:     OID            acs_context;        /* application context name */
                     46: 
                     47:     AEInfo acs_callingtitle;   /* info on calling application-entity */
                     48:     AEInfo acs_calledtitle;    /* info on called application-entity */
                     49: 
                     50:     struct PSAPstart acs_start;        /* info from P-CONNECT.INDICATION */
                     51: 
                     52:                                /* initial information from peer */
                     53:     int            acs_ninfo;          /*   number of elements */
                     54:     PE     acs_info[NACDATA];  /*   data */
                     55: };
                     56: #define        ACSFREE(acs) { \
                     57:     register int ACSI; \
                     58:  \
                     59:     if ((acs) -> acs_context) \
                     60:        oid_free ((acs) -> acs_context), (acs) -> acs_context = NULLOID; \
                     61:  \
                     62:     AEIFREE (&(acs) -> acs_callingtitle); \
                     63:     AEIFREE (&(acs) -> acs_calledtitle); \
                     64:  \
                     65:     PSFREE (&(acs) -> acs_start); \
                     66:  \
                     67:     for (ACSI = (acs) -> acs_ninfo - 1; ACSI >= 0; ACSI--) \
                     68:        if ((acs) -> acs_info[ACSI]) \
                     69:            pe_free ((acs) -> acs_info[ACSI]), \
                     70:                (acs) -> acs_info[ACSI] = NULLPE; \
                     71:     (acs) -> acs_ninfo = 0; \
                     72: }
                     73: 
                     74: 
                     75: struct AcSAPconnect {
                     76:     int            acc_sd;             /* association descriptor */
                     77:     
                     78:     int            acc_result;         /* result */
                     79: #define        ACS_ACCEPT      0       /*   Accepted */
                     80: #define        ACS_REJECT      (-1)    /*   Release rejected */
                     81:                                /*   Rejected by responder: */
                     82: #define        ACS_PERMANENT   1       /*     Permanent */
                     83: #define        ACS_TRANSIENT   2       /*     Transient */
                     84: 
                     85:     int            acc_diagnostic;     /* source-diagnostic */
                     86:                                /* service-user */
                     87: #define        ACS_USER_NULL   3       /*   null */
                     88: #define        ACS_USER_NOREASON 4     /*   no reason given */
                     89: #define        ACS_CONTEXT     5       /*   application context name not supported*/
                     90: #define        ACS_CALLING_AP_TITLE 6  /*   calling AP title not recognized */
                     91: #define        ACS_CALLING_AP_ID 7     /*   calling AP invocation-ID not recognized */
                     92: #define        ACS_CALLING_AE_QUAL 8   /*   calling AE qualifier not recognized */
                     93: #define        ACS_CALLING_AE_ID 9     /*   calling AE invocation-ID not recognized */
                     94: #define        ACS_CALLED_AP_TITLE 10  /*   called AP title not recognized */
                     95: #define        ACS_CALLED_AP_ID 11     /*   called AP invocation-ID not recognized */
                     96: #define        ACS_CALLED_AE_QUAL 12   /*   called AE qualifier not recognized */
                     97: #define        ACS_CALLED_AE_ID 13     /*   called AE invocation-ID not recognized */
                     98:                                /* service-provider */
                     99: #define        ACS_PROV_NULL   14      /*   null */
                    100: #define        ACS_PROV_NOREASON 15    /*   no reason given */
                    101: #define        ACS_VERSION     16      /*   no common acse version */
                    102: 
                    103:                                /* begin UNOFFICIAL */
                    104: #define        ACS_ADDRESS     17      /* Address unknown */
                    105: #define        ACS_REFUSED     18      /* Connect request refused on this network
                    106:                                   connection */
                    107: #define        ACS_CONGEST     19      /* Local limit exceeded */
                    108: #define        ACS_PRESENTATION 20     /* Presentation disconnect */
                    109: #define        ACS_PROTOCOL    21      /* Protocol error */
                    110: #define        ACS_ABORTED     22      /* Peer aborted association */
                    111: #define        ACS_PARAMETER   23      /* Invalid parameter */
                    112: #define        ACS_OPERATION   24      /* Invalid operation */
                    113: #define        ACS_TIMER       25      /* Timer expired */
                    114:                                /* end UNOFFICIAL */
                    115: 
                    116: #define        ACS_FATAL(r)    ((r) < ACS_PARAMETER)
                    117: #define        ACS_OFFICIAL(r) ((r) < ACS_ADDRESS)
                    118: 
                    119:     OID            acc_context;        /* application context name */
                    120: 
                    121:     AEInfo  acc_respondtitle;  /* info on responding application-entity */
                    122: 
                    123:     struct PSAPconnect acc_connect;/* info from P-CONNECT.CONFIRMATION */
                    124: 
                    125:                                /* initial information from peer */
                    126:     int            acc_ninfo;          /*   number of elements */
                    127:     PE     acc_info[NACDATA];  /*   data */
                    128: };
                    129: #define        ACCFREE(acc) { \
                    130:     register int ACCI; \
                    131:  \
                    132:     if ((acc) -> acc_context) \
                    133:        oid_free ((acc) -> acc_context), (acc) -> acc_context = NULLOID; \
                    134:  \
                    135:     AEIFREE (&(acc) -> acc_respondtitle); \
                    136:  \
                    137:     PCFREE (&(acc) -> acc_connect); \
                    138:  \
                    139:     for (ACCI = (acc) -> acc_ninfo - 1; ACCI >= 0; ACCI--) \
                    140:        if ((acc) -> acc_info[ACCI]) \
                    141:            pe_free ((acc) -> acc_info[ACCI]), \
                    142:                (acc) -> acc_info[ACCI] = NULLPE; \
                    143:     (acc) -> acc_ninfo = 0; \
                    144: }
                    145:            
                    146: 
                    147: 
                    148: struct AcSAPfinish {           /* A-RELEASE.INDICATION */
                    149:     int            acf_reason;         /* reason for release */
                    150: #define        ACF_NORMAL      0       /*   normal */
                    151: #define        ACF_URGENT      1       /*   urgent */
                    152: #define        ACF_USERDEFINED 30      /*   user-defined */
                    153: 
                    154:                                /* release information from peer */
                    155:     int            acf_ninfo;          /*   number of elements */
                    156:     PE     acf_info[NACDATA];  /*   data */
                    157: };
                    158: #define        ACFFREE(acf) \
                    159: { \
                    160:     register int ACFI; \
                    161:  \
                    162:     for (ACFI = (acf) -> acf_ninfo - 1; ACFI >= 0; ACFI--) \
                    163:        if ((acf) -> acf_info[ACFI]) \
                    164:            pe_free ((acf) -> acf_info[ACFI]), \
                    165:                (acf) -> acf_info[ACFI] = NULLPE; \
                    166:     (acf) -> acf_ninfo = 0; \
                    167: }
                    168: 
                    169: 
                    170: struct AcSAPrelease {          /* A-RELEASE.CONFIRMATION */
                    171:     int            acr_affirmative;    /* T   = connection released
                    172:                                   NIL = request refused */
                    173:     
                    174:     int            acr_reason;         /* reason for result */
                    175: #define        ACR_NORMAL      0       /*   normal */
                    176: #define        ACR_NOTFINISHED 1       /*   not finished */
                    177: #define        ACR_USERDEFINED 30      /*   user-defined */
                    178: 
                    179:                                /* release information from peer */
                    180:     int            acr_ninfo;          /*   number of elements */
                    181:     PE     acr_info[NACDATA];  /*   data */
                    182: };
                    183: #define        ACRFREE(acr) \
                    184: { \
                    185:     register int ACRI; \
                    186:  \
                    187:     for (ACRI = (acr) -> acr_ninfo - 1; ACRI >= 0; ACRI--) \
                    188:        if ((acr) -> acr_info[ACRI]) \
                    189:            pe_free ((acr) -> acr_info[ACRI]), \
                    190:                (acr) -> acr_info[ACRI] = NULLPE; \
                    191:     (acr) -> acr_ninfo = 0; \
                    192: }
                    193: 
                    194: 
                    195: struct AcSAPabort {            /* A-{U,P}-ABORT.INDICATION */
                    196:     int            aca_source;         /* abort source */
                    197: #define        ACA_USER        0       /*   service-user */
                    198: #define        ACA_PROVIDER    1       /*   service-provider */
                    199: #define        ACA_LOCAL       2       /*   local ACPM (UNOFFICIAL) */
                    200: 
                    201:     int            aca_reason;         /* same codes as acc_result */
                    202:     
                    203:                                /* abort information from peer */
                    204:     int            aca_ninfo;          /*   number of elements */
                    205:     PE     aca_info[NACDATA];  /*   data */
                    206: 
                    207:                                /* diagnostics from provider */
                    208: #define        ACA_SIZE        512
                    209:     int            aca_cc;             /*   length */
                    210:     char    aca_data[ACA_SIZE];        /*   data */
                    211: };
                    212: #define        ACAFREE(aca) \
                    213: { \
                    214:     register int ACAI; \
                    215:  \
                    216:     for (ACAI = (aca) -> aca_ninfo - 1; ACAI >= 0; ACAI--) \
                    217:        if ((aca) -> aca_info[ACAI]) \
                    218:            pe_free ((aca) -> aca_info[ACAI]), \
                    219:                (aca) -> aca_info[ACAI] = NULLPE; \
                    220:     (aca) -> aca_ninfo = 0; \
                    221: }
                    222: 
                    223: 
                    224: struct AcSAPindication {
                    225:     int            aci_type;           /* the union element present */
                    226: #define        ACI_FINISH      0x00
                    227: #define        ACI_ABORT       0x01
                    228: 
                    229:     union {
                    230:        struct AcSAPfinish aci_un_finish;
                    231:        struct AcSAPabort aci_un_abort;
                    232:     }  aci_un;
                    233: #define        aci_finish      aci_un.aci_un_finish
                    234: #define        aci_abort       aci_un.aci_un_abort
                    235: };
                    236: 
                    237: /*  */
                    238: 
                    239: extern char *acsapversion;
                    240: 
                    241: 
                    242: int    AcInit ();              /* A-ASSOCIATE.INDICATION */
                    243: 
                    244: int    AcAssocResponse ();     /* A-ASSOCIATE.RESPONSE */
                    245:                                /* A-ASSOCIATE.REQUEST
                    246:                                   (backwards-compatible) */
                    247: #define        AcAssocRequest(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17) \
                    248:        AcAsynAssocRequest (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,0)
                    249: int    AcAsynAssocRequest ();  /* A-(ASYN-)ASSOCIATE.REQUEST */
                    250: int    AcAsynRetryRequest ();  /* A-ASYN-RETRY.REQUEST (pseudo) */
                    251: int    AcRelRequest ();        /* A-RELEASE.REQUEST */
                    252: int    AcRelRetryRequest ();   /* A-RELEASE-RETRY.REQUEST (pseudo) */
                    253: int    AcRelResponse ();       /* A-RELEASE.RESPONSE */
                    254: int    AcUAbortRequest ();     /* A-ABORT.REQUEST */
                    255: 
                    256: int    AcFINISHser ();         /* handle P-RELEASE.INDICATION */
                    257: int    AcABORTser ();          /* handle P-{U,P}-ABORT.INDICATION */
                    258: 
                    259: int    AcFindPCI ();           /* return PCI used by ACSE */
                    260: 
                    261: char   *AcErrString ();                /* return AcSAP error code in string form */
                    262: 
                    263: #endif

unix.superglobalmegacorp.com

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