home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / soss.arj / SRC / NOVELL.H < prev    next >
C/C++ Source or Header  |  1991-02-22  |  3KB  |  133 lines

  1. /*
  2.  *  novell.h --
  3.  *      Netware definitions for SOS.
  4.  *
  5.  *  Author:
  6.  *    Rich Braun @ Kronos, 2/15/91
  7.  */
  8.  
  9. #pragma pack(1)            /* Pack all data structures */
  10.  
  11. #define MAXNOVELLID 200
  12. #define IDFILE      "NOVELL.ID"
  13.  
  14. /* Novell-to-Unix UID mapping is accomplished by creating a text file */
  15. /* containing entries in the following format:                  */
  16.  
  17. /* user  username   123  432                          */
  18. /* offset           200                              */
  19. /* protection       775                              */
  20. /* group         20                              */
  21.  
  22. /* The offset value is used if the sequence of user IDs on the Novell */
  23. /* and the Unix systems is the same.  This value is added to the      */
  24. /* Novell ID to get the Unix ID.                      */
  25.  
  26. /* The group number is returned for every file on the server.  No     */
  27. /* support currently exists for directory trustee lookup.          */
  28.  
  29. /* The protection field is used for all directories on the Novell     */
  30. /* file system; it is read as an octal integer.                  */
  31.  
  32. /* Each user-ID line has four fields.  The last two fields are 32-bit */
  33. /* decimal integers; field 3 is the Unix ID number, and field 4 is    */
  34. /* the Novell object number corresponding to the given user.          */
  35. /* If a file's owner ID is not given in this file, the Novell user-ID */
  36. /* number will be passed directly to Unix without any mapping.          */
  37.  
  38. /* Macro for invoking the Novell API */
  39. #define novell_API(FCN, ARGS, RESULTS, REGSIN, REGSOUT, SEGREGS) \
  40.        REGSIN.h.ah = FCN; \
  41.        REGSIN.x.si = (u_short) ARGS; \
  42.        REGSIN.x.di = (u_short) RESULTS; \
  43.        intdosx (®SIN, REGSOUT, SEGREGS);
  44.  
  45. /* system call definitions */
  46.  
  47.     /* Scan File Information E3(0F) */
  48. struct _sfireq {
  49.     u_short    len;
  50.     u_char    func;
  51.     u_short    seq;
  52.     char    handle;
  53.     u_char    attrib;
  54.     u_char    pathlen;
  55.     char    path[MAXPATHNAMELEN];
  56.     };
  57.  
  58. struct _fileinfo {
  59.     u_char    attrib;
  60.     u_char    xattrib;
  61.     u_long    size;
  62.     u_short    cdate;
  63.     u_short    adate;
  64.     u_long    utime;
  65.     u_long    ownerID;
  66.     u_long    atime;
  67.     char    res[56];
  68.     };
  69.  
  70. struct _sfirep {
  71.     u_short    len;
  72.     u_short    seq;
  73.     char    filename[14];
  74.     struct _fileinfo info;
  75.     };
  76.  
  77.     /* Set File Information E3(10) */
  78.  
  79. struct _setfireq {
  80.     u_short    len;
  81.     u_char    func;
  82.     struct _fileinfo info;
  83.     u_char  handle;
  84.     u_char  search;
  85.     u_char  pathlen;
  86.     u_char  path[MAXPATHNAMELEN];
  87.     };
  88.  
  89. struct _setfirep {
  90.     u_short    len;
  91.     };
  92.  
  93.     /* Scan Directory for Trustees E2(0C) */
  94. struct _sdftreq {
  95.     u_short    len;
  96.     u_char    func;
  97.     u_char    handle;
  98.     u_char    seq;
  99.     u_char    pathlen;
  100.     char    path[MAXPATHNAMELEN];
  101.     };
  102.  
  103. struct _sdftrep {
  104.     u_short    len;
  105.     char    name [16];
  106.     u_long    ctime;
  107.     u_long    ownerID;
  108.     u_long    trustee [5];
  109.     u_char    rights [5];
  110.     };
  111.  
  112.     /* Scan Directory Information E2(02) */
  113. struct _sdireq {
  114.     u_short len;
  115.     u_char  func;
  116.     u_char    handle;
  117.     u_short seq;
  118.     u_char  pathlen;
  119.     char    path[MAXPATHNAMELEN];
  120.     };
  121.  
  122. struct _sdirep {
  123.     u_short    len;
  124.     char    name [16];
  125.     u_long    ctime;
  126.     u_long    ownerID;
  127.     u_char    rights;
  128.     u_char  res;
  129.     u_short dirnum;
  130.     };
  131.  
  132. #pragma pack()
  133.