Annotation of 43BSDReno/contrib/isode-beta/vt/vtpm.h, revision 1.1

1.1     ! root        1: /* vtpm.h - VTPM: definitions */
        !             2: 
        !             3: /* 
        !             4:  * $Header: /f/osi/vt/RCS/vtpm.h,v 7.0 89/11/23 22:31:58 mrose Rel $
        !             5:  *
        !             6:  *
        !             7:  * $Log:       vtpm.h,v $
        !             8:  * Revision 7.0  89/11/23  22:31: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: #include <errno.h>
        !            25: #include <stdio.h>
        !            26: 
        !            27: #include "acsap.h"             /* definitions for AcS-USERs */
        !            28: #include "logger.h"
        !            29: 
        !            30: /* Make sure this is here in new versions */
        !            31: /*#include "sector1.h"*/
        !            32: 
        !            33: 
        !            34: #define        TRUE                    1
        !            35: #define        FALSE                   0
        !            36: 
        !            37: #define        ERR                     -1
        !            38: #define        E_ERROR                 -1
        !            39: #define        E_EOF                   -2
        !            40: 
        !            41: #define E_NOEVENT              1 
        !            42: #define E_READ                 2 
        !            43: 
        !            44: #define INPUT                  1
        !            45: #define OUTPUT                 2
        !            46: 
        !            47: #define DEFINED                        1
        !            48: #define UNDEFINED              0
        !            49: 
        !            50: #define BASIC                  1
        !            51: 
        !            52: #define WACI_WACA              0
        !            53: #define WAVAR                  1
        !            54: 
        !            55: #define        FAILURE                 0
        !            56: #define        SUCCESS                 1
        !            57: #define        WARNING                 2
        !            58: 
        !            59: #define        ECHO_NOW                0
        !            60: #define        NOT_ECHO_NOW    1
        !            61: 
        !            62: #define DISPLAY                        0
        !            63: #define        CONTROL                 2
        !            64: 
        !            65: #define        SEQUENCED               1
        !            66: #define        NONSEQUENCED    2
        !            67: 
        !            68: #define COLL_DET               1
        !            69: #define PROFILE_NG             4
        !            70: 
        !            71: #define        TEXT                    5
        !            72: 
        !            73: #define WOULDBLOCK             -3
        !            74: 
        !            75: /*  type identifiers  */
        !            76: #define G_COLLISION_WINNER             1
        !            77: #define        G_PARM_VLIST                    6
        !            78: #define        G_RESULT3                               11
        !            79: 
        !            80: /*  Incoming Events -- Table 25, ISO 9041           */
        !            81: 
        !            82: #define        VASSreq                 1       /*VT-ASSOCIATE request*/
        !            83: #define        VASSrsp                 2       /*VT-ASSOCIATE response*/
        !            84: #define VBRKreq                        3       /*VT-BREAK request*/
        !            85: #define VBRKrsp                        4       /*VT-BREAK response*/
        !            86: #define        VDACKreq                5       /*VT-ACK-RECEIPT request*/
        !            87: #define        VDATreq_u               6       /*VT-DATA request urgent priority*/
        !            88: #define        VDATreq_h               7       /*VT-DATA request high priority*/
        !            89: #define        VDATreq_n               8       /*VT-DATA request normal*/
        !            90: #define VDATreq_sqtr           9       /*VT-DATA request trigger control*/
        !            91: #define VDELreq                        10      /*VT-DELIVER request*/
        !            92: #define        VENEGreq                11      /*VT-END-NEG request*/
        !            93: #define        VENEGrsp                12      /*VT-END-NEG response*/
        !            94: #define        VGVTreq                 13      /*VT-GIVE-TOKENS request*/
        !            95: #define VNACCreq               14      /*VT-NEG-ACCEPT (negotiation accept)*/
        !            96: #define        VNINVreq                15      /*Negotiation Invitaion*/
        !            97: #define        VNOFFreq                16      /*Negotiation Offer*/
        !            98: #define        VNREJreq                17      /*Negotiation Reject*/
        !            99: #define        VRELreq                 18      /*VT-RELEASE request*/
        !           100: #define        VRELrsp                 19      /*VT-RELEASE response*/
        !           101: #define        VRQTreq                 20      /*VT-REQUEST-TOKENS request*/
        !           102: #define        VSNEGreq                21      /*Start Negotiation request*/
        !           103: #define        VSNEGrsp                22      /*Start Negotiation response*/
        !           104: #define        VSWPreq                 23      /*Switch Profile request*/
        !           105: #define        VSWPrsp                 24      /*Switch Profile response*/
        !           106: #define        VUABreq                 25      /*VT-U-ABORT request*/
        !           107: #define        APQ                     26      /*VT-P-ABORT request*/
        !           108: #define ASQ                    27      /*Associate Request*/
        !           109: #define        ASR                     28      /*Associate Response*/
        !           110: #define        AUQ                     29      /*VT-U-ABORT request*/
        !           111: #define BKQ                    30      /*Break Request*/
        !           112: #define BKR                    31      /*Break Response*/
        !           113: #define        DAQ                     32      /*VT-ACK-RECEIPT*/
        !           114: #define        DLQ                     33      /*VT-DELIVER*/
        !           115: #define HDQ                    34      /*VT-EXPEDITED-DATA*/
        !           116: #define        ENQ                     35      /*End Negotiation Request*/
        !           117: #define        ENR                     36      /*End Negotiation Response*/
        !           118: #define        GTQ                     37      /*VT-GIVE-TOKEN*/
        !           119: #define        NAQ                     38      /*Negotiation Accept Request*/
        !           120: #define        NDQ_ntr                 39      /*VT-DATA -- No Trigger Update*/
        !           121: #define        NDQ_tr                  40      /*VT-DATA -- Trigger Update*/
        !           122: #define        NJQ                     41      /*Negotiation Reject Request*/
        !           123: #define        NIQ                     42      /*Negotiation Invite Request*/
        !           124: #define        NOQ                     43      /*Negotiation Offer Request*/
        !           125: #define        RLQ                     44      /*VT-RELEASE-REQ*/
        !           126: #define        RLR                     45      /*VT-RELEASE-RESP*/
        !           127: #define        RTQ                     46      /*VT-REQUEST-TOKEN*/
        !           128: #define        SPQ                     47      /*VT-SWITCH-PROFILE-REQ*/
        !           129: #define        SPR                     48      /*VT-SWITCH-PROFILE-RESP*/
        !           130: #define        SNQ                     49      /*Start Negotiation Request*/
        !           131: #define        SNR                     50      /*Start Negotiation Response*/
        !           132: #define        UDQ                     51      /*VT-UNCONTROLLED-DATA*/
        !           133: #define        AUTO                    52      /*Internal event not defined by VTP*/
        !           134: #define        VTAB                    53      /*Irrecoverable exception condition*/
        !           135: #define        PAB                     54      /*Failure Indication*/
        !           136: 
        !           137: /*  Outgoing Events -- Table 27, ISO 9041      */
        !           138: 
        !           139: #define        VACKind                 55      /*VT-ACK-RECEIPT Indication*/
        !           140: #define        VASSind                 56      /*VT-ASSOCIATE Indication*/
        !           141: #define        VASScnf                 57      /*VT-ASSOCIATE Confirm*/
        !           142: #define VBRKind                        58      /*VT-BREAK Indication*/
        !           143: #define VBRKcnf                        59      /*VT-BREAK Confirm*/
        !           144: #define        VDATind_u               60      /*VT-DATA indication -- urgent object*/
        !           145: #define        VDATind_h               61      /*VT-DATA indication -- high object*/
        !           146: #define VDATind_n              62      /*VT-DATA indication -- normal object*/
        !           147: #define VDATind_Vnt            63      /*Sequence of Vnt VT-DATA normal*/
        !           148: #define        VDELind                 64      /*VT-DELIVER indication*/
        !           149: #define        VENEGind                65      /*VT-END-NEG indication*/
        !           150: #define        VENEGcnf                66      /*VT-END-NEG confirm*/
        !           151: #define        VGVTind                 67      /*VT-GIVE-TOKENS indication*/
        !           152: #define        VNINVind                68      /*VT-NEG-INVITE indication*/
        !           153: #define        VNOFFind                69      /*VT-NEG-OFFER indication*/
        !           154: #define        VNACCind                70      /*VT-NEG-ACCEPT indication*/
        !           155: #define        VNREJind                71      /*VT-NEG-REJECT indication*/
        !           156: #define        VPABind                 72      /*VT-P-ABORT indication*/
        !           157: #define        VRELind                 73      /*VT-RELEASE indication*/
        !           158: #define        VRELcnf                 74      /*VT-RELEASE confirm*/
        !           159: #define        VRQTind                 75      /*VT-REQUEST-TOKENS indication*/
        !           160: #define        VSNEGind                76      /*VT-START-NEG indication*/
        !           161: #define        VSNEGcnf                77      /*VT-START-NEG confirm*/
        !           162: #define        VSWPind                 78      /*VT-SWITCH-PROFILE indication*/
        !           163: #define        VSWPcnf                 79      /*VT-SWITCH-PROFILE confirm*/
        !           164: #define        VUABind                 80      /*VT-U-ABORT indication*/
        !           165: #define NDQseq_ntr             81      /*Sequence of NDQ-ntr to xmit updates*/
        !           166: #define NDQseq_tr              82      /*1 NDQ-tr preceeded by >=1 NDQ-ntr*/
        !           167: #define NDQ_x_tr               83
        !           168: #define NDQ_x_ntr              84
        !           169: 
        !           170: 
        !           171: 
        !           172: /* Sector 1 States */
        !           173: 
        !           174: #define S1_01                  0       /*No Association*/
        !           175: #define S1_02B                 1       /*Associate -- Awaiting target*/
        !           176: #define S1_02S                 2       /*Associate -- Awaiting target*/
        !           177: #define S1_03B                 3       /*Associate -- Awaiting User*/
        !           178: #define S1_03S                 4       /*Associate -- Awaiting User*/
        !           179: #define S1_10B                 5       /*Environment Not Agreed*/
        !           180: #define S1_10N                 6
        !           181: #define S1_10T                 7
        !           182: #define S1_50B                 8
        !           183: #define S1_51Q                 9       /*Release -- Awaiting Peer*/
        !           184: #define S1_51R                 10      /*Release -- Awaiting User*/
        !           185: #define S1_51N                 11      /*Release -- Awaiting User*/
        !           186: #define S1_51T                 12      /*Release -- Awaiting Peer*/
        !           187: 
        !           188: 
        !           189: /* Sector 5 States */
        !           190: 
        !           191: #define S5_400B                        0       /*Data Transfer*/
        !           192: #define S5_402B                        1       /*Data Xfer -- Awaiting Ack from user*/
        !           193: #define S5_420B                        2       /*Data Xfer -- Awaiting Ack from peer*/
        !           194: #define S5_422B                        3       /*Data xfer -- Awaiting Ack (Both)*/
        !           195: #define S5_40N                 4       /*Data Transfer*/
        !           196: #define S5_40T                 5       /*Data Transfer*/
        !           197: #define S5_42T                 6       /*Data Xfer -- Awaiting Ack from peer*/
        !           198: #define S5_42N                 7       /*Data Xfer -- Awaiting Ack from user*/
        !           199: #define S5_61                  8       /*Break Request rcv'd from User*/
        !           200: #define S5_62                  9       /*Break Request rcv'd from Peer*/
        !           201: 
        !           202: 
        !           203: #define        INITIATOR               0
        !           204: #define        ACCEPTOR                1
        !           205: #define        ACHOICE                 2
        !           206: 
        !           207: 
        !           208: 
        !           209: /*  PDU Types  (Table 4, ISO 9041) */
        !           210: 
        !           211: #define        ASQ_PDU         0
        !           212: #define        ASR_PDU         1
        !           213: #define RLR_PDU                2
        !           214: #define AUQ_PDU                3
        !           215: #define APQ_PDU                4
        !           216: #define HDQ_PDU                5
        !           217: #define NDQ_PDU                6
        !           218: #define UDQ_PDU                7
        !           219: #define BKQ_PDU                8
        !           220: #define BKR_PDU                9
        !           221: #define DLQ_PDU                10
        !           222: #define DAQ_PDU                11
        !           223: #define SPQ_PDU                12
        !           224: #define SPR_PDU                13
        !           225: #define SNQ_PDU                14
        !           226: #define SNR_PDU                15
        !           227: #define ENQ_PDU                16
        !           228: #define ENR_PDU                17
        !           229: #define NIQ_PDU                18
        !           230: #define NOQ_PDU                19
        !           231: #define NAQ_PDU                20
        !           232: #define NJQ_PDU                21
        !           233: 
        !           234: #define PEPYPARM int *
        !           235: 
        !           236: PE     pre, pwe;
        !           237: PE     mkdeliver(); 
        !           238: int    fd,
        !           239:        readfds,
        !           240:        writefds,
        !           241:        exfds,
        !           242:        sd,
        !           243:        connected,
        !           244:        netfile;
        !           245: 
        !           246: char   *dprofile, *cprofile;
        !           247: char   *myname, ttyname();
        !           248: extern PE      p_ondq;
        !           249: extern LLog _vt_log, *vt_log;
        !           250: 
        !           251: 
        !           252: extern int errno;
        !           253: extern unsigned        state, sector;
        !           254: 
        !           255: int            vns,
        !           256:                allpmde, /* all draft VTE parameters defined */
        !           257:                allpmdu, /* all draft VTE parameters defined or undefined */
        !           258:                cnw,     /* collision winner right assigned to this VTPM  */
        !           259:                dcno,    /* no delivery control */      
        !           260:                dcqua,   /* quarantine delivery control */
        !           261:                dcsim,   /* simple delivery control     */
        !           262:                pmacc,   /* parameter values acceptable */
        !           263:                dr_pm_st,/* draft parameter status:
        !           264:                                                DEFINED,
        !           265:                                                UNDEFINED,
        !           266:                                                OFI,  (offered, initiator)
        !           267:                                                OFR,  (offered, responder)
        !           268:                                                COFI, (counter-offered, initiator)
        !           269:                                                COFR, (counter-offered, responder)
        !           270:                                                INVI, (invited, initiator)
        !           271:                                                INVR  (invited, responder)
        !           272:                                */
        !           273:                pracc,
        !           274:                vtpma,
        !           275:                vcwa,    /* whether the collision winner right is owned */
        !           276:                vena,    /* agreement on current VTE */
        !           277:                vnt,     /* number of VT service data units held for local delivery */
        !           278:                vns,     /* number of VT service data units held for transmission */
        !           279:                vacc,   /*action choice: switch, restore, or not specified*/
        !           280:                vacp,   /*action proposal: switch, restore, or responder
        !           281:                          choice*/
        !           282:                vrea,   /*failure reason: collision detected or profile not
        !           283:                          supplied*/
        !           284:                vrjo,   /*rejection option: retain, discard, or responder
        !           285:                          choice*/
        !           286:                vrsl,   /*result: succes, failure, or success with warning*/
        !           287:                vsmd,   /*1 if S-Mode, 0 if A-Mode*/
        !           288:                vtok,   /*1 if tokens held, 0 otherwise*/
        !           289:                vtkp,   /*token parameters*/
        !           290:                waca,   /*WACA right*/
        !           291:                vra,    /*Boolean recording of acknowledgement request*/
        !           292:                G_Func_Units,   /*Bit map of Functional Units requested*/
        !           293:                wavar,          /* boolean, this VTPM has the token */
        !           294:                waci,           /* boolean, this VTPM is assigned the waci right */
        !           295:                del_cont;       /* type of delivery control             */
        !           296: 
        !           297: 
        !           298: /* 
        !           299:        profile is name of the profile. This is also used for the draft profile.
        !           300: */
        !           301:        
        !           302: int    s1_01(),
        !           303:        s1_02B(),
        !           304:        s1_02S(),
        !           305:        s1_03B(),
        !           306:        s1_03S(),
        !           307:        s1_10B(),
        !           308:        s1_10N(),
        !           309:        s1_10T(),
        !           310:        s1_50B(),
        !           311:        s1_51Q(),
        !           312:        s1_51R(),
        !           313:        s1_51N(),
        !           314:        s1_51T();
        !           315: 
        !           316: int    s5_400B(),
        !           317:        s5_402B(),
        !           318:        s5_420B(),
        !           319:        s5_422B(),
        !           320:        s5_40N(),
        !           321:        s5_40T(),
        !           322:        s5_42N(),
        !           323:        s5_42T(),
        !           324:        s5_61(),
        !           325:        s5_62();
        !           326: 
        !           327: 
        !           328: extern struct SSAPref sfs;
        !           329: extern struct SSAPref *sf;
        !           330: extern struct PSAPaddr *pa;
        !           331: extern struct AcSAPconnect accs;
        !           332: extern struct AcSAPconnect   *acc;
        !           333: extern struct AcSAPrelease acrs;
        !           334: extern struct AcSAPrelease   *acr;
        !           335: extern struct AcSAPindication  acis;
        !           336: extern struct AcSAPindication *aci;
        !           337: extern struct AcSAPabort *aca;
        !           338: extern AEI     aei;
        !           339: extern OID     ctx,
        !           340:                pci;
        !           341: 
        !           342: extern struct AcSAPstart   acss;
        !           343: extern struct AcSAPstart *acs;
        !           344: extern struct PSAPstart *ps;
        !           345: extern struct PSAPindication pi;
        !           346: extern struct PSAPdata px;
        !           347: extern struct PSAPfinish *pf;
        !           348: 
        !           349: void   finalbye ();
        !           350: void   adios (), advise ();
        !           351: void   acs_adios (), acs_advise ();
        !           352: void   ps_adios (), ps_advise ();
        !           353: 
        !           354: int connected; /*TEMP -- for sector 1 testing only -- will be supplied by VTP*/
        !           355: 
        !           356: char   *malloc();

unix.superglobalmegacorp.com

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