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

1.1       root        1: /* tsap.h - include file for transport users (TS-USER) */
                      2: 
                      3: /* 
                      4:  * $Header: /f/osi/h/RCS/tsap.h,v 7.2 90/05/08 08:54:36 mrose Exp $
                      5:  *
                      6:  *
                      7:  * $Log:       tsap.h,v $
                      8:  * Revision 7.2  90/05/08  08:54:36  mrose
                      9:  * touch-up
                     10:  * 
                     11:  * Revision 7.1  89/12/18  17:50:50  mrose
                     12:  * update
                     13:  * 
                     14:  * Revision 7.0  89/11/23  21:56:08  mrose
                     15:  * Release 6.0
                     16:  * 
                     17:  */
                     18: 
                     19: /*
                     20:  *                               NOTICE
                     21:  *
                     22:  *    Acquisition, use, and distribution of this module and related
                     23:  *    materials are subject to the restrictions of a license agreement.
                     24:  *    Consult the Preface in the User's Manual for the full terms of
                     25:  *    this agreement.
                     26:  *
                     27:  */
                     28: 
                     29: 
                     30: #ifndef        _TSAP_
                     31: #define        _TSAP_                  
                     32: 
                     33: #ifndef        _MANIFEST_
                     34: #include "manifest.h"
                     35: #endif
                     36: #ifndef        _GENERAL_
                     37: #include "general.h"
                     38: #endif
                     39: #ifndef        _ISOADDRS_
                     40: #include "isoaddrs.h"
                     41: #endif
                     42: 
                     43: /*  */
                     44: 
                     45: struct TSAPstart {             /* T-CONNECT.INDICATON */
                     46:     int     ts_sd;             /* TRANSPORT descriptor */
                     47: 
                     48:     struct TSAPaddr ts_calling;        /* address of peer calling */
                     49:     struct TSAPaddr ts_called; /* address of peer called */
                     50: 
                     51:     int     ts_expedited;      /* EXPEDITED DATA ok */
                     52: 
                     53:     int            ts_tsdusize;        /* largest atomic TSDU */
                     54: 
                     55:     struct QOStype ts_qos;     /* quality of service */
                     56: 
                     57:                                /* initial DATA from peer */
                     58: #define        TS_SIZE         32
                     59:     int            ts_cc;              /*   length */
                     60:     char    ts_data[TS_SIZE];  /*   data */
                     61: };
                     62: 
                     63: 
                     64: struct TSAPconnect {           /* T-CONNECT.CONFIRMATION */
                     65:     int     tc_sd;             /* TRANSPORT descriptor */
                     66: 
                     67:     struct TSAPaddr tc_responding;/* address of peer responding */
                     68: 
                     69:     int     tc_expedited;      /* EXPEDITED DATA ok */
                     70: 
                     71:     int            tc_tsdusize;        /* largest atomic TSDU */
                     72: 
                     73:     struct QOStype tc_qos;     /* quality of service */
                     74: 
                     75:                                /* initial DATA from peer */
                     76: #define        TC_SIZE         32
                     77:     int            tc_cc;              /*   length */
                     78:     char    tc_data[TC_SIZE];  /*   data */
                     79: };
                     80: 
                     81: 
                     82: struct TSAPdata {              /* T-READ.INDICATION */
                     83:     int     tx_expedited;
                     84: 
                     85:                                /* DATA from peer */
                     86: #define        TX_SIZE         16      /* EXPEDITED DATA only */
                     87:     int            tx_cc;              /*   total length */
                     88:     struct qbuf tx_qbuf;       /*   chained data */
                     89: };
                     90: #define        TXFREE(tx)      QBFREE (&((tx) -> tx_qbuf))
                     91: 
                     92: 
                     93: struct TSAPdisconnect {                /* T-DISCONNECT.INDICATION */
                     94:     int     td_reason;         /* reason for DISCONNECT, from ISO8072: */
                     95: #define        DR_BASE         0x80
                     96: #define        DR_NORMAL       (DR_BASE + 0)   /* NORMAL disconnect by SESSION
                     97:                                           entity */
                     98: #define        DR_REMOTE       (DR_BASE + 1)   /* Remote TRANSPORT entity congested at
                     99:                                           connect request time */
                    100: #define        DR_CONNECT      (DR_BASE + 2)   /* Connection negotiation failed */
                    101: #define        DR_DUPLICATE    (DR_BASE + 3)   /* Duplicate source reference detected
                    102:                                           for the same pair of NSAPs */
                    103: #define        DR_MISMATCH     (DR_BASE + 4)   /* Mismatched references */
                    104: #define        DR_PROTOCOL     (DR_BASE + 5)   /* Protocol error */
                    105: #define        DR_OVERFLOW     (DR_BASE + 7)   /* Reference overflow */
                    106: #define        DR_REFUSED      (DR_BASE + 8)   /* Connect request refused on this
                    107:                                           network connection */
                    108: #define        DR_LENGTH       (DR_BASE + 10)  /* Header or parameter length
                    109:                                           invalid */
                    110: 
                    111:                                        /* begin UNOFFICIAL */
                    112: #define        DR_NETWORK      (DR_BASE + 11)  /* Network disconnect */
                    113: #define        DR_PARAMETER    (DR_BASE + 12)  /* Invalid parameter */
                    114: #define        DR_OPERATION    (DR_BASE + 13)  /* Invalid operation */
                    115: #define        DR_TIMER        (DR_BASE + 14)  /* Timer expired */
                    116: #define        DR_WAITING      (DR_BASE + 15)  /* Indications waiting */
                    117:                                        /* end UNOFFICIAL */
                    118: 
                    119: #define        DR_UNKNOWN      0               /* Reason not specifed */
                    120: #define        DR_CONGEST      1               /* Congestion at TSAP */
                    121: #define        DR_SESSION      2               /* Session entity not attached to
                    122:                                           TSAP */
                    123: #define        DR_ADDRESS      3               /* Address unknown */
                    124: 
                    125: #ifdef notdef
                    126: #define        DR_FATAL(r)     ((r) < DR_BASE || (r) < DR_PARAMETER)
                    127: #define        DR_OFFICIAL(r)  ((r) < DR_BASE || (r) < DR_NETWORK)
                    128: #else
                    129: #define        DR_FATAL(r)     ((r) < DR_PARAMETER)
                    130: #define        DR_OFFICIAL(r)  ((r) < DR_NETWORK)
                    131: #endif
                    132: 
                    133:                                /* disconnect DATA from peer */
                    134: #define        TD_SIZE         64
                    135:     int            td_cc;              /*   length */
                    136:     char    td_data[TD_SIZE];  /*   data */
                    137: };
                    138: 
                    139: /*  */
                    140: 
                    141: extern char *tsapversion;
                    142: 
                    143: 
                    144: int    TInit ();               /* T-CONNECT.INDICATION */
                    145: 
                    146: int    TConnResponse ();       /* T-CONNECT.RESPONSE */
                    147:                                /* T-CONNECT.REQUEST (backwards-compatible) */
                    148: #define        TConnRequest(a1,a2,a3,a4,a5,a6,a7,a8) \
                    149:        TAsynConnRequest(a1,a2,a3,a4,a5,a6,a7,a8,0)
                    150: int    TAsynConnRequest ();    /* T-(ASYN-)CONNECT.REQUEST */
                    151: int    TAsynRetryRequest ();   /* T-ASYN-RETRY.REQUEST (pseudo) */
                    152: int    TDataRequest ();        /* T-DATA.REQUEST */
                    153: int    TWriteRequest ();       /* T-WRITE.REQUEST (pseudo) */
                    154: int    TExpdRequest ();        /* T-EXPEDITED-DATA.REQUEST */
                    155: int    TReadRequest ();        /* T-READ.REQUEST (pseudo) */
                    156: int    TDiscRequest ();        /* T-DISCONNECT.REQUEST */
                    157: 
                    158: int    TSetIndications ();     /* define vectors for INDICATION events */
                    159: int    TSelectMask ();         /* map transport descriptors for select() */
                    160: int    TSelectOctets ();       /* estimate of octets that might be returned */
                    161: int    TGetAddresses ();       /* get TSAPs */
                    162: int    TSetManager ();         /* defining transport manager */
                    163: 
                    164: char   *TErrString ();         /* return TSAP error code in string form */
                    165: 
                    166: int    TNetListen ();          /* start listenting on an TSAP */
                    167: int    TNetUnique ();          /* start listenting on a set of unique TSAPs */
                    168: #define        TNetAccept(p,v,n,r,w,e,s,t) \
                    169:        TNetAcceptAux ((p), (v), NULLIP, NULLTA, (n), (r), (w), (e), (s), (t))
                    170: int    TNetAcceptAux ();       /* accept a call on an TSAP */
                    171: int    TNetClose ();           /* stop listening on an TSAP */
                    172: int    TSetQueuesOK ();        /* enable/disable queued (non-blocking)
                    173:                                   writes */
                    174: 
                    175: #define        TLocalHostName  getlocalhost
                    176: char   *TLocalHostName ();     /* return name of local host (sigh) */
                    177: #endif

unix.superglobalmegacorp.com

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