home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / xab.h < prev   
Encoding:
C/C++ Source or Header  |  1990-04-24  |  13.6 KB  |  402 lines

  1. /*    XABALL -- Allocation Controll Extended Attribute block Definitions    */
  2.  
  3. struct    XABALL    {
  4.        unsigned char    xab$b_cod;
  5. #define            XAB$C_ALL    20        /* XABALL type code */
  6.  
  7.        unsigned char    xab$b_bln;
  8. #define            XAB$C_ALLLEN    0x20        /* XABALL block length (32 bytes) */
  9. #define            XAB$K_ALLLEN    0x20
  10.  
  11.         unsigned    : 16;            /* spare */
  12.  
  13.         char    *xab$l_nxt;            /* Next XAB in chain */
  14.  
  15.        unsigned char    xab$b_aop;            /* allocation options */
  16. #define            XAB$V_HRD    0        /* fail if requestd alignmt cannot be performed */
  17. #define            XAB$M_HRD    (1 << XAB$V_HRD)
  18. #define            XAB$V_ONC    1        /* locate space on cylinder boundary */
  19. #define            XAB$M_ONC    (1 << XAB$V_ONC)
  20. #define            XAB$V_CBT    5        /* contiguous allocation, best try */
  21. #define            XAB$M_CBT    (1 << XAB$V_CBT)
  22. #define            XAB$V_CTG    7        /* contiguous allocation */
  23. #define            XAB$M_CTG    (1 << XAB$V_CTG)
  24.  
  25.        unsigned char    xab$b_aln;            /* alignment boundary type */
  26. #define            XAB$C_ANY    0        /* any type of allocation */
  27. #define            XAB$C_CYL    1        /* alignment starts at cylinder boundary */
  28. #define            XAB$C_LBN    2        /* allocate at specified logical block number */
  29. #define            XAB$C_VBN    3        /* allocate near specified virtual block number */
  30. #define            XAB$C_RFI    4        /* allocate near related file */
  31.  
  32.        unsigned short    xab$w_vol;            /* relative volume number */
  33.        unsigned long    xab$l_loc;            /* allocation location */
  34.        unsigned long    xab$l_alq;            /* allocation quantity */
  35.        unsigned short    xab$w_deq;            /* default extension quantity */
  36.        unsigned char    xab$b_bkz;            /* bucket size used with the relative and indexed files */
  37.        unsigned char    xab$b_aid;            /* area identification number */
  38.  
  39.                             /* related file identification */
  40.        unsigned short    xab$w_rfi0;            /* file number */
  41. #define            xab$w_rfi    xab$w_rfi0
  42.  
  43.        unsigned short    xab$w_rfi2;            /* seq number */
  44.        unsigned short    xab$w_rfi4;            /* rev number */
  45.  
  46.         unsigned    : 16;            /* spare */
  47.         };
  48.  
  49.  
  50. extern int cc$rms_xaball();
  51. #define cc$rms_xaball (*(struct XABALL *) cc$rms_xaball)
  52. /* globalref struct XABALL cc$rms_xaball;  /* Declare initialized prototype data structures */
  53.  
  54.  
  55. /*  struct representing a 64-bit binary value expressing the date and time */
  56.  
  57. #define XAB_DATE_TIME    { unsigned    : 32; unsigned    : 32; }
  58.  
  59.  
  60. /*    XABDAT -- Date and Time Extended Attribute Block Definitions    */
  61.  
  62. struct    XABDAT    {
  63.        unsigned char    xab$b_cod;
  64. #define            XAB$C_DAT    18    /* XABDAT type code */
  65.  
  66.        unsigned char    xab$b_bln;
  67. #define            XAB$C_DATLEN    0x2C    /* XABDAT block length constant - V3 (44 bytes) */
  68. #define            XAB$K_DATLEN    0x2C
  69. #define            XAB$C_DATLEN_V2 0x24    /* XABDAT block length constant - V2 */
  70. #define            XAB$K_DATLEN_V2 0x24
  71.  
  72.         unsigned    : 16;        /* spare */
  73.  
  74.         char    *xab$l_nxt;        /* Next XAB in chain */
  75.        unsigned short    xab$w_rvn;        /* revision number */
  76.  
  77.         unsigned    : 16;        /* spare */
  78.  
  79.    struct XAB_DATE_TIME xab$q_rdt;        /* revision date and time */
  80.    struct XAB_DATE_TIME xab$q_cdt;        /* creation date and time */
  81.    struct XAB_DATE_TIME xab$q_edt;        /* expiration date and time */
  82.    struct XAB_DATE_TIME xab$q_bdt;        /* backup date and time */
  83.         };
  84.  
  85.  
  86. extern int cc$rms_xabdat();
  87. #define cc$rms_xabdat (* (struct XABDAT *) cc$rms_xabdat)
  88. /* globalref struct XABDAT cc$rms_xabdat;  /* Declare initialized prototype data structures */
  89.  
  90.  
  91. /*    XABFHC -- File Header Characteristics Extended Attribute Block Definitions    */
  92.  
  93. struct    XABFHC    {
  94.        unsigned char    xab$b_cod;
  95. #define            XAB$C_FHC    29    /* XABFHC type code */
  96.  
  97.        unsigned char    xab$b_bln;
  98. #define            XAB$C_FHCLEN    0x2C    /* XABFHC block length (44 bytes) */
  99. #define            XAB$K_FHCLEN    0x2C
  100.  
  101.         unsigned    : 16;        /* spare */
  102.  
  103.         char    *xab$l_nxt;        /* Next XAB in chain */
  104.        unsigned char    xab$b_rfo;        /* record format and file organization */
  105.        unsigned char    xab$b_atr;        /* record attributes */
  106.        unsigned short    xab$w_lrl;        /* longest record's length */
  107.        unsigned long    xab$l_hbk;        /* high virtual block in the file */
  108.        unsigned long    xab$l_ebk;        /* end-of-file block */
  109.        unsigned short    xab$w_ffb;        /* first free byte in end-of-file block */
  110.        unsigned char    xab$b_bkz;        /* bucket size */
  111.        unsigned char    xab$b_hsz;        /* fixed length control header size */
  112.        unsigned short    xab$w_mrz;        /* maximun record size */
  113.        unsigned short    xab$w_dxq;        /* default file extension quantity */
  114.        unsigned short    xab$w_gbc;        /* default global buffer count */
  115.  
  116.         unsigned    : 32;        /* spare */
  117.         unsigned    : 32;        /* spare */
  118.  
  119.        unsigned short    xab$w_verlimit;        /* version limit for the file */
  120.        unsigned long    xab$l_sbn;        /* starting logical block number if contiguous */
  121.         };
  122.  
  123.  
  124. extern int cc$rms_xabfhc();
  125. #define cc$rms_xabfhc (* (struct XABFHC *) cc$rms_xabfhc)
  126. /* globalref struct XABFHC cc$rms_xabfhc;  /* Declare initialized prototype data structures */
  127.  
  128.  
  129. /*    XABKEY -- Key Definition Extended Attribute Block Definitions    */
  130.  
  131. struct    XABKEY    {
  132.        unsigned char    xab$b_cod;
  133. #define            XAB$C_KEY    21        /* XABKEY type code */
  134.  
  135.        unsigned char    xab$b_bln;
  136. #define            XAB$C_KEYLEN    0x4C        /* XABKEY block length (76 bytes) */
  137. #define            XAB$K_KEYLEN    0x4C
  138. #define            XAB$C_KEYLEN_V2 0x40
  139. #define            XAB$K_KEYLEN_V2 0x40
  140.  
  141.         unsigned    : 16;            /* spare */
  142.  
  143.         char    *xab$l_nxt;            /* Next XAB address in chain */
  144.        unsigned char    xab$b_ian;            /* index level area number */
  145.        unsigned char    xab$b_lan;            /* lowest level of index area number */
  146.        unsigned char    xab$b_dan;            /* data bucket area number */
  147.        unsigned char    xab$b_lvl;            /* level of root bucket */
  148.        unsigned char    xab$b_ibs;            /* index bucket size in virtual blocks */
  149.        unsigned char    xab$b_dbs;            /* data bucket size in virtual blocks */
  150.        unsigned long    xab$l_rvb;            /* root bucket start virtual block number */
  151.  
  152.       unsigned char xab$b_flg;                /* key option flag byte */
  153. #define            XAB$V_DUP    0            /* duplicate key value allowed */
  154. #define            XAB$M_DUP    (1 << XAB$V_DUP)
  155. #define            XAB$V_CHG    1            /* may change on update (alternate keys only) */
  156. #define            XAB$M_CHG    (1 << XAB$V_CHG)
  157. #define            XAB$V_NUL    2            /* null key value enable (alternate keys only) */
  158. #define            XAB$M_NUL    (1 << XAB$V_NUL)
  159. #define            XAB$V_IDX_NCMPR 3            /* indicates index records are not compressed */
  160. #define            XAB$M_IDX_NCMPR (1 << XAB$V_IDX_NCMPR)
  161. #define            XAB$V_KEY_NCMPR 6            /* indicates primary key is not compressed */
  162. #define            XAB$M_KEY_NCMPR (1 << XAB$V_KEY_NCMPR)
  163. #define            XAB$V_DAT_NCMPR 7            /* indicated data record is not compressed */
  164. #define            XAB$M_DAT_NCMPR (1 << XAB$V_DAT_NCMPR)
  165.  
  166.        unsigned char    xab$b_dtp;            /* key field data type */
  167. #define            XAB$C_STG    0        /* left-justified string of unsigned bytes */
  168. #define            XAB$C_IN2    1        /* signed 15 bit integer (2 bytes) */
  169. #define            XAB$C_BN2    2        /* unsigned 2-byte binary */
  170. #define            XAB$C_IN4    3        /* signed 31 bit integer (4 bytes) */
  171. #define            XAB$C_BN4    4        /* unsigned 4-byte binary */
  172. #define            XAB$C_PAC    5        /* packed decimal string (1-16 bytes) */
  173. #define            XAB$C_IN8    6        /* signed 63 bit integer */
  174. #define            XAB$C_BN8    7        /* 8 byte binary */
  175. #define            XAB$C_MAXDTP    7        /* maximun legal data type */
  176.  
  177.        unsigned char    xab$b_nsg;            /* number of key segments */
  178.        unsigned char    xab$b_nul;            /* null key character value */
  179.        unsigned char    xab$b_tks;            /* total key field size (bytes) */
  180.        unsigned char    xab$b_ref;            /* key of reference (0=primary key, 1-254=alternate keys) */
  181.        unsigned short    xab$w_mrl;            /* minimun record length */
  182.        unsigned short    xab$w_ifl;            /* index bucket fill size (bytes) */
  183.        unsigned short    xab$w_dfl;            /* data bucket fill size (bytes) */
  184.  
  185.        unsigned short    xab$w_pos0;            /* key field record offset positions */
  186. #define            xab$w_pos    xab$w_pos0
  187.  
  188.        unsigned short    xab$w_pos1;
  189.        unsigned short    xab$w_pos2;
  190.        unsigned short    xab$w_pos3;
  191.        unsigned short    xab$w_pos4;
  192.        unsigned short    xab$w_pos5;
  193.        unsigned short    xab$w_pos6;
  194.        unsigned short    xab$w_pos7;
  195.  
  196.        unsigned char    xab$b_siz0;            /* key field segment sizes (bytes) */
  197. #define            xab$b_siz    xab$b_siz0
  198.  
  199.        unsigned char    xab$b_siz1;
  200.        unsigned char    xab$b_siz2;
  201.        unsigned char    xab$b_siz3;
  202.        unsigned char    xab$b_siz4;
  203.        unsigned char    xab$b_siz5;
  204.        unsigned char    xab$b_siz6;
  205.        unsigned char    xab$b_siz7;
  206.  
  207.         unsigned    : 16;            /* spare */
  208.  
  209.         char    *xab$l_knm;            /* key name buffer address */
  210.        unsigned long    xab$l_dvb;            /* first data bucket virtual block number */
  211.  
  212.        unsigned char    xab$b_typ0;            /* key field segment types */
  213. #define            xab$b_typ    xab$b_typ0
  214.  
  215.        unsigned char    xab$b_typ1;
  216.        unsigned char    xab$b_typ2;
  217.        unsigned char    xab$b_typ3;
  218.        unsigned char    xab$b_typ4;
  219.        unsigned char    xab$b_typ5;
  220.        unsigned char    xab$b_typ6;
  221.        unsigned char    xab$b_typ7;
  222.  
  223.        unsigned char    xab$b_prolog;            /* prologue level */
  224. #define            XAB$C_PRG1    1        /* prologue 1 */
  225. #define            XAB$C_PRG2    2        /* prologue 2 */
  226. #define            XAB$C_PRG3    3        /* prologue 3 */
  227.  
  228.         unsigned    : 24;            /* spare */
  229.         };
  230.  
  231.  
  232. extern int cc$rms_xabkey();
  233. #define cc$rms_xabkey (* (struct XABKEY *) cc$rms_xabkey)
  234. /* globalref struct XABKEY cc$rms_xabkey;  /* Declare initialized prototype data structures */
  235.  
  236. #define        XAB_PROT_FIELDS        { unsigned : 32; unsigned : 32; }
  237.  
  238. /*    XABPRO -- File Protection Extended Attribute Block Definitions    */
  239.  
  240. struct    XABPRO    {
  241.        unsigned char    xab$b_cod;
  242. #define            XAB$C_PRO    19    /* XABPRO type code */
  243.  
  244.        unsigned char    xab$b_bln;
  245. #define            XAB$C_PROLEN_V3 0x10    /* XABPRO block length (16 bytes) version 3.0 VMS */
  246. #define            XAB$K_PROLEN_V3 0x10
  247. #define            XAB$C_PROLEN    0x58    /* XABPRO block length (88 bytes) */
  248. #define            XAB$K_PROLEN    0x58
  249.  
  250.         unsigned    : 16;        /* spare */
  251.  
  252.         char    *xab$l_nxt;        /* Next XAB in chain */
  253.  
  254.      unsigned short xab$w_pro;                /* protection mask */
  255. #define            XAB$V_SYS    0            /* system */
  256. #define            XAB$S_SYS    4
  257. #define            XAB$V_OWN    4            /* owner */
  258. #define            XAB$S_OWN    4
  259. #define            XAB$V_GRP    8            /* group */
  260. #define            XAB$S_GRP    4
  261. #define            XAB$V_WLD    12            /* world */
  262. #define            XAB$S_WLD    4
  263. #define            XAB$V_NOREAD    0            /* deny read access */
  264. #define            XAB$M_NOREAD    (1 << XAB$V_NOREAD)
  265. #define            XAB$V_NOWRITE    1            /* deny write access */
  266. #define            XAB$M_NOWRITE    (1 << XAB$V_NOWRITE)
  267. #define            XAB$V_NOEXE    2            /* deny execution access */
  268. #define            XAB$M_NOEXE    (1 << XAB$V_NOEXE)
  269. #define            XAB$V_NODEL    3            /* deny delete access */
  270. #define            XAB$M_NODEL    (1 << XAB$V_NODEL)
  271.  
  272.        unsigned char    xab$b_mtacc;        /* magnetic tape accessibility */
  273.  
  274.        unsigned char    xab$b_prot_opt;        /* XABPRO options field */
  275. #define            XAB$V_PROPOGATE 0    /* propogate security attributes on $ENTER and $RENAME */
  276. #define            XAB$M_PROPOGATE (1 << XAB$V_PROPOGATE)
  277.  
  278.     unsigned long    xab$l_uic;        /* uic code */
  279.  
  280.  struct XAB_PROT_FIELDS xab$q_prot_mode;    /* RWED/mode protection for file */
  281.  
  282.         char    *xab$l_aclbuf;        /* address of users ACL buffer */
  283.        unsigned short    xab$w_aclsiz;        /* size of user's ACL buffer */
  284.        unsigned short    xab$w_acllen;        /* return lecngth of entire ACL */
  285.        unsigned long    xab$l_aclctx;        /* ACL context field */
  286.        unsigned long    xab$l_aclsts;        /* ACL return error status */
  287.  
  288.     unsigned    : 32;
  289.     unsigned    : 32;
  290.     unsigned    : 32;
  291.     unsigned    : 32;
  292.     unsigned    : 32;
  293.     unsigned    : 32;
  294.     unsigned    : 32;
  295.     unsigned    : 32;
  296.     unsigned    : 32;
  297.     unsigned    : 32;
  298.     unsigned    : 32;
  299.     unsigned    : 32;
  300.  
  301.         };
  302.  
  303. struct    {
  304.     unsigned    : 32;
  305.     unsigned    : 32;
  306.     unsigned    : 32;
  307.  
  308.     unsigned short    xab$w_mbm;        /* member number of file owner */
  309.     unsigned short    xab$w_grp;        /* group number of file owner */
  310.     unsigned char    xab$b_prot_mode;    /* first byte of protection mode field */
  311.  
  312.     };
  313.  
  314.  
  315. extern int cc$rms_xabpro();
  316. #define cc$rms_xabpro (* (struct XABPRO *) cc$rms_xabpro)
  317. /* globalref struct XABPRO cc$rms_xabpro;  /* Declare initialized prototype data structures */
  318.  
  319. #undef XAB_PROT_FIELDS
  320.  
  321.  
  322. /*    XABRDT -- Revision Date and Time Extended Attribute Block Definitions    */
  323.  
  324. struct    XABRDT    {
  325.        unsigned char    xab$b_cod;
  326. #define            XAB$C_RDT    30    /* XABRDT type code */
  327.  
  328.        unsigned char    xab$b_bln;
  329. #define            XAB$C_RDTLEN    0x14    /* XABRDT block length (20 bytes) */
  330. #define            XAB$K_RDTLEN    0x14
  331.  
  332.         unsigned    : 16;        /* spare */
  333.  
  334.         char    *xab$l_nxt;        /* Next XAB in chain */
  335.        unsigned short    xab$w_rvn;        /* revision number */
  336.  
  337.         unsigned    : 16;        /* spare */
  338.  
  339.    struct XAB_DATE_TIME xab$q_rdt;        /* revision date and time */
  340.         };
  341.  
  342.  
  343. extern int CC$RMS_XABRDT();
  344. #define cc$rms_xabrdt (* (struct XABRDT *) CC$RMS_XABRDT)
  345. /* globalref struct XABRDT cc$rms_xabrdt;  /* Declare initialized prototype data structures */
  346.  
  347.  
  348. #undef XAB_DATE_TIME
  349.  
  350. /*    XABSUM -- Summary Extended Attribute Block Definitions    */
  351.  
  352. struct    XABSUM    {
  353.        unsigned char    xab$b_cod;
  354. #define            XAB$C_SUM    22    /* XABSUM type code */
  355.  
  356.        unsigned char    xab$b_bln;
  357. #define            XAB$C_SUMLEN    0x0C    /* XABSUM block length (12 bytes) */
  358. #define            XAB$K_SUMLEN    0x0C
  359.  
  360.         unsigned    : 16;        /* spare */
  361.  
  362.         char    *xab$l_nxt;        /* Next XAB in chain */
  363.        unsigned char    xab$b_noa;        /* number of allocation areas defined for the file */
  364.        unsigned char    xab$b_nok;        /* number of keys defined for the file */
  365.        unsigned short    xab$w_pvn;        /* prologue version number */
  366.         };
  367.  
  368.  
  369. extern int CC$RMS_XABSUM();
  370. #define cc$rms_xabsum (* (struct XABSUM *) CC$RMS_XABSUM)
  371. /* globalref struct XABSUM cc$rms_xabsum;  /* Declare initialized prototype data structures */
  372.  
  373.  
  374. /* XABTRM - Terminal Control XAB field definitions */
  375.  
  376. struct XABTRM {
  377.  
  378.        unsigned char    xab$b_cod;
  379. #define            XAB$C_TRM    31    /* XABSUM type code */
  380.  
  381.        unsigned char    xab$b_bln;
  382. #define            XAB$C_TRMLEN    36    /* length of XABTRM block */
  383. #define            XAB$K_TRMLEN    36    /* length of XABTRM block */
  384.  
  385.         unsigned    : 16;        /* spare */
  386.  
  387.         char    *xab$l_nxt;        /* address of next block */
  388.         char    *xab$l_itmlst;        /* item list address */
  389.        unsigned short    xab$w_itmlst_len;    /* length of item list */
  390.  
  391.         unsigned    : 16;
  392.         unsigned    : 32;
  393.         unsigned    : 32;
  394.         unsigned    : 32;
  395.         unsigned    : 32;
  396.         unsigned    : 32;
  397.     };
  398.  
  399. extern int CC$RMS_XABTRM();
  400. #define cc$rms_xabtrm (* (struct XABTRM *) CC$RMS_XABTRM)
  401. /* globalref       struct XABTRM   cc$rms_xabtrm;  /* declare initialized prototype data structure */
  402.