Annotation of 43BSDReno/contrib/isode-beta/ftam2/ftamsbr.h, revision 1.1

1.1     ! root        1: /* ftamsbr.h - include file for FTAM initiator/responder subroutines */
        !             2: 
        !             3: /* 
        !             4:  * $Header: /f/osi/ftam2/RCS/ftamsbr.h,v 7.1 90/07/01 21:03:34 mrose Exp $
        !             5:  *
        !             6:  *
        !             7:  * $Log:       ftamsbr.h,v $
        !             8:  * Revision 7.1  90/07/01  21:03:34  mrose
        !             9:  * pepsy
        !            10:  * 
        !            11:  * Revision 7.0  89/11/23  21:54:39  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: #include "ftam.h"              /* definitions for FS-USERs */
        !            28: #include "DOCS-types.h"
        !            29: #ifdef NULL
        !            30: #undef NULL
        !            31: #endif
        !            32: #include <sys/param.h>
        !            33: #ifndef        NULL
        !            34: #define        NULL    0
        !            35: #endif
        !            36: #ifndef        SYS5
        !            37: #include <sys/file.h>
        !            38: #else
        !            39: #define        L_SET           0       /* absolute offset */
        !            40: #define        L_INCR          1       /* relative to current offset */
        !            41: #define        L_XTND          2       /* relative to end of file */
        !            42: 
        !            43: #define        F_OK            0       /* file exists */
        !            44: #define        X_OK            1       /* executable by caller */
        !            45: #define        W_OK            2       /* writable by caller */
        !            46: #define        R_OK            4       /* readable by caller */
        !            47: 
        !            48: #if    !defined(AIX) && !defined(HPUX) && !defined(AUX)
        !            49: #include <sys/fcntl.h>
        !            50: #else
        !            51: #include <fcntl.h>
        !            52: #endif
        !            53: #endif
        !            54: #include <sys/stat.h>
        !            55: #include "usr.dirent.h"
        !            56: 
        !            57: 
        !            58: #ifndef        MAXPATHLEN
        !            59: #define        MAXPATHLEN      MAXNAMLEN
        !            60: #endif
        !            61: 
        !            62: #ifdef MAXBSIZE
        !            63: #define        BLKSIZE MAXBSIZE
        !            64: #else
        !            65: #define        BLKSIZE BUFSIZ
        !            66: #endif
        !            67: 
        !            68: /*
        !            69:    Used to calculate the estimated integral FADU size:
        !            70: 
        !            71: 
        !            72:    FTAM-3 transfers -
        !            73: 
        !            74:        An FADU maps onto a single PSDU with the P-DATA service.  Because the
        !            75:        DCS is non-empty and the FADU is not in the default context, the
        !            76:        Fully-encoded-data encoding is used.  Further, since only one PSDU is
        !            77:        present, the single-ASN1-type option is used.  Hence, the outer ASN.1
        !            78:        wrapper consists of
        !            79: 
        !            80:            [APPLICATION 1] IMPLICIT
        !            81:                SEQUENCE OF {   -- 4 octets for the outer structure
        !            82:                    SEQUENCE {  -- 4 octets for the one and only PDV-list
        !            83: 
        !            84:                                -- 3 octets for the PCI
        !            85:                        presentation-context-identifier
        !            86:                            INTEGER,
        !            87: 
        !            88:                        presentation-data-values {
        !            89:                                -- 4 octets for the single-ASN1-type wrapper
        !            90:                            single-ASN1-type[0]
        !            91:                                -- 4 octets for the id/length of the FADU
        !            92:                                -- n octets for the data in the FADU
        !            93:                                ANY
        !            94:                        }
        !            95:                    }
        !            96:                }
        !            97: 
        !            98:      4 + 4 + 3 + 4 + 4 = 19
        !            99: 
        !           100:      For each structure, 4 octets is used for non-data encodings
        !           101:                1 octet for the ID
        !           102:                1 octet for an indefinite form
        !           103:                2 octets for the EOC
        !           104:     If the data portion is smaller, then the definite form might be used which
        !           105:     requires 3 octets, not 4.
        !           106: 
        !           107: 
        !           108:    FTAM-1 transfers -
        !           109: 
        !           110:        FADUs are batched to the P-DATA service.  This means that the
        !           111:        octet-aligned option is used.  Hence, the outer ASN.1 wrapper
        !           112:        consists of  
        !           113: 
        !           114:            [APPLICATION 1] IMPLICIT
        !           115:                SEQUENCE OF {   -- 4 octets for the outer structure
        !           116: 
        !           117: -- this sequence is repeated for each member of the batch
        !           118: 
        !           119:                    SEQUENCE {  -- 4 octets for the one and only PDV-list
        !           120: 
        !           121:                                -- 3 octets for the PCI
        !           122:                        presentation-context-identifier
        !           123:                            INTEGER,
        !           124: 
        !           125:                        presentation-data-values {
        !           126:                                -- 4 octets for the octet-aligned wrapper
        !           127:                            octet-aligned[1]
        !           128:                                -- 4 octets for the id/length of the FADU
        !           129:                                -- n octets for the data in the FADU
        !           130:                                IMPLICIT OCTET STRING
        !           131:                        }
        !           132:                    }
        !           133: 
        !           134: 
        !           135:                }
        !           136: 
        !           137:      4 + N*(4 + 3 + 4 + 4)
        !           138:  */
        !           139: #define        MAGIC_SINGLE    19
        !           140: #define        MAGIC_OCTET1    4
        !           141: #define        MAGIC_OCTET2    15
        !           142: 
        !           143: /*  */
        !           144: 
        !           145: struct vfsmap {
        !           146:     char   *vf_entry;          /* document entry */
        !           147:     OID            vf_oid;             /* object identifier */
        !           148:     caddr_t vf_parameter;      /* parameter, filled-in by vf_peek */
        !           149: 
        !           150:     int     vf_flags;          /* flags */
        !           151: #define        VF_NULL 0x00
        !           152: #define        VF_OK   0x01            /* negotiated */
        !           153: #define        VF_WARN 0x02            /* warn if loses */
        !           154: #define        VF_PARM 0x04            /* parameter dynamically allocated */
        !           155: 
        !           156:     int            vf_id;              /* presentation context */
        !           157: 
        !           158:     int            vf_mode;            /* st.st_mode & S_IFMT bits */
        !           159:     IFP            vf_peek;            /* sees if really this type of file */
        !           160:     char    vf_stat;           /* stat character for 'ls' */
        !           161: 
        !           162:     int            vf_simplify;        /* the next document type to try */
        !           163: #define        VFS_XXX (-1)
        !           164: 
        !           165:     int            vf_context;         /* access context */
        !           166:                                /* really should have entire constraint set */
        !           167: 
        !           168:     int            vf_mandatory;       /* > 0 parameter required
        !           169:                                   < 0 parameter optional
        !           170:                                  == 0 parameter illegal */
        !           171:     IFP            vf_check;           /*   .. check */
        !           172:     int            vf_number;          /* encode/decode index */
        !           173: 
        !           174:     char  *vf_text;            /* textual description */
        !           175: };
        !           176: 
        !           177: struct vfsmap *st2vfs ();
        !           178: 
        !           179: 
        !           180: /* WATCHP is one pepsy people should use as the macro which is
        !           181:  * not expansion order dependant
        !           182:  */
        !           183: 
        !           184: #ifndef DEBUG
        !           185: #define        WATCH(fnx, pe, rw)
        !           186: #define        WATCHP(args, pe, rw)
        !           187: #else
        !           188: #ifdef __STDC__
        !           189: #define        WATCHP(args, pe, rw) \
        !           190:     pvpdu (ftam_log, print_##args##_P, pe, \
        !           191:        rw ? "F-DATA.INDICATION" : "F-DATA.REQUEST", rw)
        !           192: #define        WATCH(fnx, pe, rw) \
        !           193:     pvpdu (ftam_log, fnx/**/_P, pe, \
        !           194:        rw ? "F-DATA.INDICATION" : "F-DATA.REQUEST", rw)
        !           195: #else
        !           196: #define        WATCHP(args, pe, rw) \
        !           197:     pvpdu (ftam_log, print_/**/args/**/_P, pe, \
        !           198:        rw ? "F-DATA.INDICATION" : "F-DATA.REQUEST", rw)
        !           199: #define        WATCH(fnx, pe, rw) \
        !           200:     pvpdu (ftam_log, fnx/**/_P, pe, \
        !           201:        rw ? "F-DATA.INDICATION" : "F-DATA.REQUEST", rw)
        !           202: #endif
        !           203: #endif
        !           204: 
        !           205: 
        !           206: int    binarypeek (), textpeek (), fdfpeek ();
        !           207: 
        !           208: int    binarycheck (), textcheck ();
        !           209: 
        !           210: /*  */
        !           211: 
        !           212: #define        FA_RDATTR \
        !           213:     (FA_FILENAME | FA_ACTIONS | FA_CONTENTS | FA_ACCOUNT | FA_DATE_CREATE \
        !           214:        | FA_DATE_MODIFY | FA_DATE_READ | FA_DATE_ATTR | FA_ID_CREATE \
        !           215:        | FA_ID_MODIFY | FA_ID_READ | FA_ID_ATTR | FA_AVAILABILITY \
        !           216:        | FA_FILESIZE)
        !           217: 
        !           218: /*  */
        !           219: 
        !           220: #ifdef BRIDGE
        !           221: extern int  ftp_default;
        !           222: extern int  ftp_directory;
        !           223: #endif
        !           224: 
        !           225: int    de2fd ();
        !           226: 
        !           227: int    compath ();

unix.superglobalmegacorp.com

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