libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

IxpFcall.3 (5054B)


      1 .TH "IXPFCALL" 3 "2010 Jun" "libixp Manual"
      2 
      3 .SH NAME
      4 .P
      5 IxpFcall, IxpFType, IxpFAttach, IxpFError, IxpFHdr, IxpFIO, IxpFRAuth, IxpFROpen, IxpFRStat, IxpFRWalk, IxpFTCreate, IxpFTFlush, IxpFTWStat, IxpFTWalk, IxpFVersion
      6 
      7 .SH SYNOPSIS
      8 .nf
      9   #include <ixp.h>
     10   
     11   typedef struct IxpFcall IxpFcall;
     12   typedef union IxpFcall  IxpFcall;
     13   union IxpFcall {
     14           IxpFHdr         hdr;
     15           IxpFVersion     version;
     16           IxpFVersion     tversion;
     17           IxpFVersion     rversion;
     18           IxpFTFlush      tflush;
     19           IxpFROpen       ropen;
     20           IxpFROpen       rcreate;
     21           IxpFROpen       rattach;
     22           IxpFError       error;
     23           IxpFRAuth       rauth;
     24           IxpFAttach      tattach;
     25           IxpFAttach      tauth;
     26           IxpFTCreate     tcreate;
     27           IxpFTCreate     topen;
     28           IxpFTWalk       twalk;
     29           IxpFRWalk       rwalk;
     30           IxpFTWStat      twstat;
     31           IxpFRStat       rstat;
     32           IxpFIO          twrite;
     33           IxpFIO          rwrite;
     34           IxpFIO          tread;
     35           IxpFIO          rread;
     36           IxpFIO          io;
     37   }
     38   
     39   enum IxpFType {
     40           P9_TVersion = 100,
     41           P9_RVersion,
     42           P9_TAuth = 102,
     43           P9_RAuth,
     44           P9_TAttach = 104,
     45           P9_RAttach,
     46           P9_TError = 106, /* illegal */
     47           P9_RError,
     48           P9_TFlush = 108,
     49           P9_RFlush,
     50           P9_TWalk = 110,
     51           P9_RWalk,
     52           P9_TOpen = 112,
     53           P9_ROpen,
     54           P9_TCreate = 114,
     55           P9_RCreate,
     56           P9_TRead = 116,
     57           P9_RRead,
     58           P9_TWrite = 118,
     59           P9_RWrite,
     60           P9_TClunk = 120,
     61           P9_RClunk,
     62           P9_TRemove = 122,
     63           P9_RRemove,
     64           P9_TStat = 124,
     65           P9_RStat,
     66           P9_TWStat = 126,
     67           P9_RWStat,
     68   }
     69   
     70   typedef struct IxpFAttach       IxpFAttach;
     71   struct IxpFAttach {
     72           IxpFHdr         hdr;
     73           uint32_t        afid;
     74           char*           uname;
     75           char*           aname;
     76   }
     77   
     78   typedef struct IxpFError        IxpFError;
     79   struct IxpFError {
     80           IxpFHdr         hdr;
     81           char*           ename;
     82   }
     83   
     84   typedef struct IxpFHdr          IxpFHdr;
     85   struct IxpFHdr {
     86           uint8_t         type;
     87           uint16_t        tag;
     88           uint32_t        fid;
     89   }
     90   
     91   typedef struct IxpFIO           IxpFIO;
     92   struct IxpFIO {
     93           IxpFHdr         hdr;
     94           uint64_t        offset; /* Tread, Twrite */
     95           uint32_t        count; /* Tread, Twrite, Rread */
     96           char*           data; /* Twrite, Rread */
     97   }
     98   
     99   typedef struct IxpFRAuth        IxpFRAuth;
    100   struct IxpFRAuth {
    101           IxpFHdr         hdr;
    102           IxpQid          aqid;
    103   }
    104   
    105   typedef struct IxpFROpen        IxpFROpen;
    106   struct IxpFROpen {
    107           IxpFHdr         hdr;
    108           IxpQid          qid; /* +Rattach */
    109           uint32_t        iounit;
    110   }
    111   
    112   typedef struct IxpFRStat        IxpFRStat;
    113   struct IxpFRStat {
    114           IxpFHdr         hdr;
    115           uint16_t        nstat;
    116           uchar*          stat;
    117   }
    118   
    119   typedef struct IxpFRWalk        IxpFRWalk;
    120   struct IxpFRWalk {
    121           IxpFHdr         hdr;
    122           uint16_t        nwqid;
    123           IxpQid          wqid\fI[IXP_MAX_WELEM]\fR;
    124   }
    125   
    126   typedef struct IxpFTCreate      IxpFTCreate;
    127   struct IxpFTCreate {
    128           IxpFHdr         hdr;
    129           uint32_t        perm;
    130           char*           name;
    131           uint8_t         mode; /* +Topen */
    132   }
    133   
    134   typedef struct IxpFTFlush       IxpFTFlush;
    135   struct IxpFTFlush {
    136           IxpFHdr         hdr;
    137           uint16_t        oldtag;
    138   }
    139   
    140   typedef struct IxpFTWStat       IxpFTWStat;
    141   struct IxpFTWStat {
    142           IxpFHdr         hdr;
    143           IxpStat         stat;
    144   }
    145   
    146   typedef struct IxpFTWalk        IxpFTWalk;
    147   struct IxpFTWalk {
    148           IxpFHdr hdr;
    149           uint32_t        newfid;
    150           uint16_t        nwname;
    151           char*           wname\fI[IXP_MAX_WELEM]\fR;
    152   }
    153   
    154   typedef struct IxpFVersion      IxpFVersion;
    155   struct IxpFVersion {
    156           IxpFHdr         hdr;
    157           uint32_t        msize;
    158           char*           version;
    159   }
    160 .fi
    161 
    162 .SH DESCRIPTION
    163 .P
    164 The IxpFcall structure represents a 9P protocol message. The
    165 IhdrR element is common to all Fcall types, and may be used to
    166 determine the type and tag of the message. The IxpFcall type is
    167 used heavily in server applications, where it both presents a
    168 request to handler functions and returns a response to the
    169 client.
    170 
    171 .P
    172 Each member of the IxpFcall structure represents a certain
    173 message type, which can be discerned from the Ihdr.typeR field.
    174 This value corresponds to one of the IxpFType constants. Types
    175 with significant overlap use the same structures, thus TRead and
    176 RWrite are both represented by IxpFIO and can be accessed via the
    177 IioR member as well as ItreadR and IrwriteR respectively.
    178 
    179 .SH SEE ALSO
    180 .P
    181 Ixp9Srv(3), Ixp9Req(3)
    182 
    183 
    184 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net)
    185 .\" cmdline: txt2tags -o- IxpFcall.man3
    186