Home | History | Annotate | Line # | Download | only in rpc.pcnfsd
pcnfsd.x revision 1.1
      1  1.1  jtc /* The maximum number of bytes in a user name argument */
      2  1.1  jtc const IDENTLEN = 32;
      3  1.1  jtc /*  The maximum number of bytes in a password argument  */
      4  1.1  jtc const PASSWORDLEN = 64;
      5  1.1  jtc /*  The maximum number of bytes in a print client name argument  */
      6  1.1  jtc const CLIENTLEN = 64;
      7  1.1  jtc /*  The maximum number of bytes in a printer name argument  */
      8  1.1  jtc const PRINTERNAMELEN = 64;
      9  1.1  jtc /*  The maximum number of bytes in a print user name argument  */
     10  1.1  jtc const USERNAMELEN = 64;
     11  1.1  jtc /*  The maximum number of bytes in a print spool file name argument  */
     12  1.1  jtc const SPOOLNAMELEN = 64;
     13  1.1  jtc /*  The maximum number of bytes in a print options argument  */
     14  1.1  jtc const OPTIONSLEN = 64;
     15  1.1  jtc /*  The maximum number of bytes in a print spool directory path  */
     16  1.1  jtc const SPOOLDIRLEN = 255;
     17  1.1  jtc /*   The maximum number of secondary GIDs returned by a V2 AUTH  */
     18  1.1  jtc const EXTRAGIDLEN = 16;
     19  1.1  jtc /*   The  maximum number of bytes in a home directory spec  */
     20  1.1  jtc const HOMEDIRLEN = 255;
     21  1.1  jtc /*   The maximum number of bytes in a misc. comments string */
     22  1.1  jtc const COMMENTLEN = 255;
     23  1.1  jtc /*   The maximum number of bytes in a print job id */
     24  1.1  jtc const PRINTJOBIDLEN = 255;
     25  1.1  jtc /*   The maximum number of printers returned by a LIST operation */
     26  1.1  jtc const PRLISTMAX = 32;
     27  1.1  jtc /*   The maximum number of print jobs returned by a QUEUE operation */
     28  1.1  jtc const PRQUEUEMAX = 128;
     29  1.1  jtc /*   The maximum number of entries in the facilities list */
     30  1.1  jtc const FACILITIESMAX = 32;
     31  1.1  jtc /*   The maximum length of an operator message */
     32  1.1  jtc const MESSAGELEN = 512;
     33  1.1  jtc 
     34  1.1  jtc 
     35  1.1  jtc 
     36  1.1  jtc typedef string ident<IDENTLEN>;
     37  1.1  jtc /*
     38  1.1  jtc ** The type ident is used for passing an encoded user name for
     39  1.1  jtc ** authentication. The server should decode the string by replacing each
     40  1.1  jtc ** octet with the value formed by performing an exclusive-or of the octet
     41  1.1  jtc ** value with the value 0x5b and and'ing the result with 0x7f.
     42  1.1  jtc */
     43  1.1  jtc 
     44  1.1  jtc typedef string message<MESSAGELEN>;
     45  1.1  jtc /*
     46  1.1  jtc ** The type message is used for passing an alert message to the
     47  1.1  jtc ** system operator on the server. The text may include newlines.
     48  1.1  jtc */
     49  1.1  jtc 
     50  1.1  jtc typedef string password<PASSWORDLEN>;
     51  1.1  jtc /*
     52  1.1  jtc ** The type password is used for passing an encode password for
     53  1.1  jtc ** authentication.  The server should decode the password as described
     54  1.1  jtc ** above.
     55  1.1  jtc */
     56  1.1  jtc 
     57  1.1  jtc typedef string client<CLIENTLEN>;
     58  1.1  jtc /*
     59  1.1  jtc ** The type client is used for passing the hostname of a client for
     60  1.1  jtc ** printing. The server may use this name in constructing the spool
     61  1.1  jtc ** directory name.
     62  1.1  jtc */
     63  1.1  jtc 
     64  1.1  jtc typedef string printername<PRINTERNAMELEN>;
     65  1.1  jtc /*
     66  1.1  jtc ** The type printername is used for passing the name of a printer on which
     67  1.1  jtc ** the client wishes to print.
     68  1.1  jtc */
     69  1.1  jtc 
     70  1.1  jtc typedef string username<USERNAMELEN>;
     71  1.1  jtc /*
     72  1.1  jtc ** The type username is used for passing the user name for a print job.
     73  1.1  jtc ** The server may use this in any way it chooses: it may attempt to change
     74  1.1  jtc ** the effective identity with which it is running to username or may
     75  1.1  jtc ** simply arrange for the text to be printed on the banner page.
     76  1.1  jtc */
     77  1.1  jtc 
     78  1.1  jtc typedef string comment<COMMENTLEN>;
     79  1.1  jtc /*
     80  1.1  jtc ** The type comment is used to pass an uninterpreted text string which
     81  1.1  jtc ** may be used by displayed to a human user or used for custom
     82  1.1  jtc ** extensions to the PCNFSD service. If you elect to extend PCNFSD
     83  1.1  jtc ** service in this way, please do so in a way which will avoid
     84  1.1  jtc ** problems if your client attempts to interoperate with a server
     85  1.1  jtc ** which does not support your extension. One way to do this is to
     86  1.1  jtc ** use the
     87  1.1  jtc */
     88  1.1  jtc 
     89  1.1  jtc typedef string spoolname<SPOOLNAMELEN>;
     90  1.1  jtc /*
     91  1.1  jtc ** The type spoolname is used for passing the name of a print spool file
     92  1.1  jtc ** (a simple filename not a pathname) within the spool directory.
     93  1.1  jtc */
     94  1.1  jtc 
     95  1.1  jtc typedef string printjobid<PRINTJOBIDLEN>;
     96  1.1  jtc /*
     97  1.1  jtc ** The type printjobid is used for passing the id of a print job.
     98  1.1  jtc */
     99  1.1  jtc 
    100  1.1  jtc typedef string homedir<OPTIONSLEN>;
    101  1.1  jtc /*
    102  1.1  jtc ** The type homedir is used to return the home directory for the user.
    103  1.1  jtc ** If present, it should be in the form "hostname:path", where hostname
    104  1.1  jtc ** and path are in a suitable form for communicating with the mount server.
    105  1.1  jtc */
    106  1.1  jtc 
    107  1.1  jtc typedef string options<OPTIONSLEN>;
    108  1.1  jtc /*
    109  1.1  jtc ** The type options is used for passing implementation-specific print
    110  1.1  jtc ** control information.  The option string is a set of printable ASCII
    111  1.1  jtc ** characters.  The first character should be ignored by the server; it is
    112  1.1  jtc ** reserved for client use. The second character specifies the type of
    113  1.1  jtc ** data in the print file.  The following types are defined (an
    114  1.1  jtc ** implementation may define additional values):
    115  1.1  jtc **
    116  1.1  jtc **  p - PostScript data. The client will ensure that a valid
    117  1.1  jtc **      PostScript header is included.
    118  1.1  jtc **  d - Diablo 630 data.
    119  1.1  jtc **  x - Generic printable ASCII text. The client will have filtered
    120  1.1  jtc **      out all non-printable characters other than CR, LF, TAB,
    121  1.1  jtc **      BS and VT.
    122  1.1  jtc **  r - Raw print data. The client performs no filtering.
    123  1.1  jtc **  u - User-defined. Reserved for custom extensions. A vanilla
    124  1.1  jtc **      pcnfsd server will treat this as equivalent to "r"
    125  1.1  jtc **
    126  1.1  jtc ** If diablo data (type 'd') is specified, a formatting specification
    127  1.1  jtc ** string will be appended. This has the form:
    128  1.1  jtc ** 	ppnnnbbb
    129  1.1  jtc **         pp
    130  1.1  jtc ** Pitch - 10, 12 or 15.
    131  1.1  jtc **           nnn
    132  1.1  jtc ** The ``normal'' font to be used - encoded as follows:
    133  1.1  jtc **             Courier                    crn
    134  1.1  jtc **             Courier-Bold               crb
    135  1.1  jtc **             Courier-Oblique            con
    136  1.1  jtc **             Courier-BoldObliqu         cob
    137  1.1  jtc **             Helvetica                  hrn
    138  1.1  jtc **             Helvetica-Bold             hrb
    139  1.1  jtc **             Helvetica-Oblique          hon
    140  1.1  jtc **             Helvetica-BoldOblique      hob
    141  1.1  jtc **             Times-Roman                trn
    142  1.1  jtc **             Times-Bold                 trb
    143  1.1  jtc **             Times-Italic               ton
    144  1.1  jtc **             Times-BoldItalic           tob
    145  1.1  jtc **              bbb
    146  1.1  jtc ** The ``bold'' font to be used - encoded in the same way.  For example,
    147  1.1  jtc ** the string ``nd10hrbcob'' specifies that the print data is in Diablo
    148  1.1  jtc ** 630 format, it should be printed at 10 pitch, ``normal'' text should be
    149  1.1  jtc ** printed in Helvetica-Bold, and ``bold'' text should be printed in
    150  1.1  jtc ** Courier-BoldOblique.
    151  1.1  jtc */
    152  1.1  jtc 
    153  1.1  jtc enum arstat {
    154  1.1  jtc         AUTH_RES_OK = 0,
    155  1.1  jtc         AUTH_RES_FAKE = 1,
    156  1.1  jtc         AUTH_RES_FAIL = 2
    157  1.1  jtc };
    158  1.1  jtc /*
    159  1.1  jtc ** The type arstat is returned by PCNFSD_AUTH. A value of AUTH_RES_OK
    160  1.1  jtc ** indicates that the server was able to verify the ident and password
    161  1.1  jtc ** successfully.AUTH_RES_FAIL is returned if a verification failure
    162  1.1  jtc ** occurred. The value AUTH_RES_FAKE may be used if the server wishes to
    163  1.1  jtc ** indicate that the verification failed, but that the server has
    164  1.1  jtc ** synthesised acceptable values for uid and gid which the client may use
    165  1.1  jtc ** if it wishes.
    166  1.1  jtc */
    167  1.1  jtc 
    168  1.1  jtc enum alrstat {
    169  1.1  jtc         ALERT_RES_OK = 0,
    170  1.1  jtc         ALERT_RES_FAIL = 1
    171  1.1  jtc };
    172  1.1  jtc /*
    173  1.1  jtc ** The type alrstat is returned by PCNFSD_ALERT. A value of ALERT_RES_OK
    174  1.1  jtc ** indicates that the server was able to notify the system operator
    175  1.1  jtc ** successfully. ALERT_RES_FAIL is returned if a failure occurred
    176  1.1  jtc */
    177  1.1  jtc enum pirstat {
    178  1.1  jtc         PI_RES_OK = 0,
    179  1.1  jtc         PI_RES_NO_SUCH_PRINTER = 1,
    180  1.1  jtc         PI_RES_FAIL = 2
    181  1.1  jtc };
    182  1.1  jtc /*
    183  1.1  jtc ** The type pirstat is returned by a number of print operations. PI_RES_OK
    184  1.1  jtc ** indicates that the operation was performed successfully. PI_RES_FAIL
    185  1.1  jtc ** indicates that the printer name was valid, but the operation could
    186  1.1  jtc ** not be performed. PI_RES_NO_SUCH_PRINTER indicates that the printer
    187  1.1  jtc ** name was not recognised.
    188  1.1  jtc */
    189  1.1  jtc 
    190  1.1  jtc enum pcrstat {
    191  1.1  jtc         PC_RES_OK = 0,
    192  1.1  jtc         PC_RES_NO_SUCH_PRINTER = 1,
    193  1.1  jtc         PC_RES_NO_SUCH_JOB = 2,
    194  1.1  jtc         PC_RES_NOT_OWNER = 3,
    195  1.1  jtc         PC_RES_FAIL = 4
    196  1.1  jtc };
    197  1.1  jtc /*
    198  1.1  jtc ** The type pcrstat is returned by a CANCEL, REQUEUE, HOLD, or RELEASE
    199  1.1  jtc ** print operation.
    200  1.1  jtc ** PC_RES_OK indicates that the operation was performed successfully.
    201  1.1  jtc ** PC_RES_NO_SUCH_PRINTER indicates that the printer name was not recognised.
    202  1.1  jtc ** PC_RES_NO_SUCH_JOB means that the job does not exist, or is not
    203  1.1  jtc ** associated with the specified printer.
    204  1.1  jtc ** PC_RES_NOT_OWNER means that the user does not have permission to
    205  1.1  jtc ** manipulate the job.
    206  1.1  jtc ** PC_RES_FAIL means that the job could not be manipulated for an unknown
    207  1.1  jtc ** reason.
    208  1.1  jtc */
    209  1.1  jtc 
    210  1.1  jtc 
    211  1.1  jtc enum psrstat {
    212  1.1  jtc         PS_RES_OK = 0,
    213  1.1  jtc         PS_RES_ALREADY = 1,
    214  1.1  jtc         PS_RES_NULL = 2,
    215  1.1  jtc         PS_RES_NO_FILE = 3,
    216  1.1  jtc         PS_RES_FAIL = 4
    217  1.1  jtc };
    218  1.1  jtc /*
    219  1.1  jtc ** The type psrstat is returned by PCNFSD_PR_START. A value of PS_RES_OK
    220  1.1  jtc ** indicates that the server has started printing the job. It is possible
    221  1.1  jtc ** that the reply from a PCNFSD_PR_START call may be lost, in which case
    222  1.1  jtc ** the client will repeat the call. If the spool file is still in
    223  1.1  jtc ** existence, the server will return PS_RES_ALREADY indicating that it has
    224  1.1  jtc ** already started printing. If the file cannot be found, PS_RES_NO_FILE
    225  1.1  jtc ** is returned.  PS_RES_NULL indicates that the spool file was empty,
    226  1.1  jtc ** while PS_RES_FAIL denotes a general failure.  PI_RES_FAIL is returned
    227  1.1  jtc ** if spool directory could not be created. The value
    228  1.1  jtc ** PI_RES_NO_SUCH_PRINTER indicates that the printer name was not
    229  1.1  jtc ** recognised.
    230  1.1  jtc */
    231  1.1  jtc 
    232  1.1  jtc enum mapreq {
    233  1.1  jtc         MAP_REQ_UID = 0,
    234  1.1  jtc         MAP_REQ_GID = 1,
    235  1.1  jtc         MAP_REQ_UNAME = 2,
    236  1.1  jtc         MAP_REQ_GNAME = 3
    237  1.1  jtc };
    238  1.1  jtc /*
    239  1.1  jtc ** The type mapreq identifies the type of a mapping request.
    240  1.1  jtc ** MAP_REQ_UID requests that the server treat the value in the
    241  1.1  jtc ** id field as a uid and return the corresponding username in name.
    242  1.1  jtc ** MAP_REQ_GID requests that the server treat the value in the
    243  1.1  jtc ** id field as a gid and return the corresponding groupname in name.
    244  1.1  jtc ** MAP_REQ_UNAME requests that the server treat the value in the
    245  1.1  jtc ** name field as a username and return the corresponding uid in id.
    246  1.1  jtc ** MAP_REQ_GNAME requests that the server treat the value in the
    247  1.1  jtc ** name field as a groupname and return the corresponding gid in id.
    248  1.1  jtc */
    249  1.1  jtc 
    250  1.1  jtc enum maprstat {
    251  1.1  jtc         MAP_RES_OK = 0,
    252  1.1  jtc         MAP_RES_UNKNOWN = 1,
    253  1.1  jtc         MAP_RES_DENIED = 2
    254  1.1  jtc };
    255  1.1  jtc /*
    256  1.1  jtc ** The type maprstat indicates the success or failure of
    257  1.1  jtc ** an individual mapping request.
    258  1.1  jtc */
    259  1.1  jtc 
    260  1.1  jtc /*
    261  1.1  jtc **********************************************************
    262  1.1  jtc ** Version 1 of the PCNFSD protocol.
    263  1.1  jtc **********************************************************
    264  1.1  jtc */
    265  1.1  jtc struct auth_args {
    266  1.1  jtc         ident           id;
    267  1.1  jtc         password        pw;
    268  1.1  jtc };
    269  1.1  jtc struct auth_results {
    270  1.1  jtc         arstat          stat;
    271  1.1  jtc         unsigned int    uid;
    272  1.1  jtc         unsigned int    gid;
    273  1.1  jtc };
    274  1.1  jtc 
    275  1.1  jtc struct pr_init_args {
    276  1.1  jtc         client          system;
    277  1.1  jtc         printername     pn;
    278  1.1  jtc };
    279  1.1  jtc struct pr_init_results {
    280  1.1  jtc         pirstat         stat;
    281  1.1  jtc         spoolname       dir;
    282  1.1  jtc };
    283  1.1  jtc 
    284  1.1  jtc struct pr_start_args {
    285  1.1  jtc         client          system;
    286  1.1  jtc         printername     pn;
    287  1.1  jtc         username        user;
    288  1.1  jtc         spoolname       file;
    289  1.1  jtc         options         opts;
    290  1.1  jtc };
    291  1.1  jtc struct pr_start_results {
    292  1.1  jtc         psrstat         stat;
    293  1.1  jtc };
    294  1.1  jtc 
    295  1.1  jtc 
    296  1.1  jtc /*
    297  1.1  jtc **********************************************************
    298  1.1  jtc ** Version 2 of the PCNFSD protocol.
    299  1.1  jtc **********************************************************
    300  1.1  jtc */
    301  1.1  jtc 
    302  1.1  jtc struct v2_info_args {
    303  1.1  jtc         comment         vers;
    304  1.1  jtc         comment         cm;
    305  1.1  jtc };
    306  1.1  jtc 
    307  1.1  jtc struct v2_info_results {
    308  1.1  jtc         comment         vers;
    309  1.1  jtc         comment         cm;
    310  1.1  jtc 	int             facilities<FACILITIESMAX>;
    311  1.1  jtc };
    312  1.1  jtc 
    313  1.1  jtc struct v2_pr_init_args {
    314  1.1  jtc         client          system;
    315  1.1  jtc         printername     pn;
    316  1.1  jtc         comment         cm;
    317  1.1  jtc };
    318  1.1  jtc struct v2_pr_init_results {
    319  1.1  jtc         pirstat         stat;
    320  1.1  jtc         spoolname       dir;
    321  1.1  jtc         comment         cm;
    322  1.1  jtc };
    323  1.1  jtc 
    324  1.1  jtc struct v2_pr_start_args {
    325  1.1  jtc         client          system;
    326  1.1  jtc         printername     pn;
    327  1.1  jtc         username        user;
    328  1.1  jtc         spoolname       file;
    329  1.1  jtc         options         opts;
    330  1.1  jtc 	int             copies;
    331  1.1  jtc         comment         cm;
    332  1.1  jtc };
    333  1.1  jtc struct v2_pr_start_results {
    334  1.1  jtc         psrstat         stat;
    335  1.1  jtc         printjobid      id;
    336  1.1  jtc         comment         cm;
    337  1.1  jtc };
    338  1.1  jtc 
    339  1.1  jtc 
    340  1.1  jtc 
    341  1.1  jtc typedef struct pr_list_item *pr_list;
    342  1.1  jtc 
    343  1.1  jtc struct pr_list_item {
    344  1.1  jtc         printername    pn;
    345  1.1  jtc         printername    device;
    346  1.1  jtc         client         remhost; /* empty if local */
    347  1.1  jtc         comment        cm;
    348  1.1  jtc         pr_list        pr_next;
    349  1.1  jtc };
    350  1.1  jtc 
    351  1.1  jtc struct v2_pr_list_results {
    352  1.1  jtc         comment        cm;
    353  1.1  jtc         pr_list        printers;
    354  1.1  jtc };
    355  1.1  jtc 
    356  1.1  jtc struct v2_pr_queue_args {
    357  1.1  jtc         printername     pn;
    358  1.1  jtc         client          system;
    359  1.1  jtc         username        user;
    360  1.1  jtc         bool            just_mine;
    361  1.1  jtc         comment         cm;
    362  1.1  jtc };
    363  1.1  jtc 
    364  1.1  jtc typedef struct pr_queue_item *pr_queue;
    365  1.1  jtc 
    366  1.1  jtc struct pr_queue_item {
    367  1.1  jtc         int            position;
    368  1.1  jtc         printjobid     id;
    369  1.1  jtc         comment        size;
    370  1.1  jtc         comment        status;
    371  1.1  jtc         client         system;
    372  1.1  jtc         username       user;
    373  1.1  jtc         spoolname      file;
    374  1.1  jtc         comment        cm;
    375  1.1  jtc         pr_queue       pr_next;
    376  1.1  jtc };
    377  1.1  jtc 
    378  1.1  jtc struct v2_pr_queue_results {
    379  1.1  jtc         pirstat        stat;
    380  1.1  jtc         comment        cm;
    381  1.1  jtc         bool           just_yours;
    382  1.1  jtc         int            qlen;
    383  1.1  jtc         int            qshown;
    384  1.1  jtc         pr_queue       jobs;
    385  1.1  jtc };
    386  1.1  jtc 
    387  1.1  jtc 
    388  1.1  jtc struct v2_pr_cancel_args {
    389  1.1  jtc         printername     pn;
    390  1.1  jtc         client          system;
    391  1.1  jtc         username        user;
    392  1.1  jtc         printjobid      id;
    393  1.1  jtc         comment         cm;
    394  1.1  jtc };
    395  1.1  jtc struct v2_pr_cancel_results {
    396  1.1  jtc         pcrstat        stat;
    397  1.1  jtc         comment        cm;
    398  1.1  jtc };
    399  1.1  jtc 
    400  1.1  jtc 
    401  1.1  jtc struct v2_pr_status_args {
    402  1.1  jtc         printername     pn;
    403  1.1  jtc         comment         cm;
    404  1.1  jtc };
    405  1.1  jtc struct v2_pr_status_results {
    406  1.1  jtc         pirstat        stat;
    407  1.1  jtc         bool           avail;
    408  1.1  jtc         bool           printing;
    409  1.1  jtc 	int            qlen;
    410  1.1  jtc         bool           needs_operator;
    411  1.1  jtc 	comment        status;
    412  1.1  jtc         comment        cm;
    413  1.1  jtc };
    414  1.1  jtc 
    415  1.1  jtc struct v2_pr_admin_args {
    416  1.1  jtc         client          system;
    417  1.1  jtc         username        user;
    418  1.1  jtc         printername     pn;
    419  1.1  jtc         comment         cm;
    420  1.1  jtc };
    421  1.1  jtc struct v2_pr_admin_results {
    422  1.1  jtc         pirstat         stat;
    423  1.1  jtc         comment         cm;
    424  1.1  jtc };
    425  1.1  jtc 
    426  1.1  jtc struct v2_pr_requeue_args {
    427  1.1  jtc         printername     pn;
    428  1.1  jtc         client          system;
    429  1.1  jtc         username        user;
    430  1.1  jtc         printjobid      id;
    431  1.1  jtc 	int             qpos;
    432  1.1  jtc         comment         cm;
    433  1.1  jtc };
    434  1.1  jtc 
    435  1.1  jtc struct v2_pr_requeue_results {
    436  1.1  jtc         pcrstat        stat;
    437  1.1  jtc         comment        cm;
    438  1.1  jtc };
    439  1.1  jtc 
    440  1.1  jtc struct v2_pr_hold_args {
    441  1.1  jtc         printername     pn;
    442  1.1  jtc         client          system;
    443  1.1  jtc         username        user;
    444  1.1  jtc         printjobid      id;
    445  1.1  jtc         comment         cm;
    446  1.1  jtc };
    447  1.1  jtc struct v2_pr_hold_results {
    448  1.1  jtc         pcrstat        stat;
    449  1.1  jtc         comment        cm;
    450  1.1  jtc };
    451  1.1  jtc 
    452  1.1  jtc struct v2_pr_release_args {
    453  1.1  jtc         printername     pn;
    454  1.1  jtc         client          system;
    455  1.1  jtc         username        user;
    456  1.1  jtc         printjobid      id;
    457  1.1  jtc         comment         cm;
    458  1.1  jtc };
    459  1.1  jtc struct v2_pr_release_results {
    460  1.1  jtc         pcrstat        stat;
    461  1.1  jtc         comment        cm;
    462  1.1  jtc };
    463  1.1  jtc 
    464  1.1  jtc 
    465  1.1  jtc typedef struct mapreq_arg_item *mapreq_arg;
    466  1.1  jtc 
    467  1.1  jtc struct mapreq_arg_item {
    468  1.1  jtc 	mapreq           req;
    469  1.1  jtc         int              id;
    470  1.1  jtc         username         name;
    471  1.1  jtc         mapreq_arg       mapreq_next;
    472  1.1  jtc };
    473  1.1  jtc 
    474  1.1  jtc typedef struct mapreq_res_item *mapreq_res;
    475  1.1  jtc 
    476  1.1  jtc struct mapreq_res_item {
    477  1.1  jtc 	mapreq           req;
    478  1.1  jtc 	maprstat         stat;
    479  1.1  jtc         int              id;
    480  1.1  jtc         username         name;
    481  1.1  jtc         mapreq_res       mapreq_next;
    482  1.1  jtc };
    483  1.1  jtc 
    484  1.1  jtc struct v2_mapid_args {
    485  1.1  jtc         comment         cm;
    486  1.1  jtc         mapreq_arg      req_list;
    487  1.1  jtc };
    488  1.1  jtc 
    489  1.1  jtc 
    490  1.1  jtc struct v2_mapid_results {
    491  1.1  jtc         comment         cm;
    492  1.1  jtc         mapreq_res      res_list;
    493  1.1  jtc };
    494  1.1  jtc 
    495  1.1  jtc struct v2_auth_args {
    496  1.1  jtc         client          system;
    497  1.1  jtc         ident           id;
    498  1.1  jtc         password        pw;
    499  1.1  jtc         comment         cm;
    500  1.1  jtc };
    501  1.1  jtc struct v2_auth_results {
    502  1.1  jtc         arstat          stat;
    503  1.1  jtc         unsigned int    uid;
    504  1.1  jtc         unsigned int    gid;
    505  1.1  jtc         unsigned int    gids<EXTRAGIDLEN>;
    506  1.1  jtc         homedir         home;
    507  1.1  jtc         int             def_umask;
    508  1.1  jtc         comment         cm;
    509  1.1  jtc };
    510  1.1  jtc 
    511  1.1  jtc struct v2_alert_args {
    512  1.1  jtc         client          system;
    513  1.1  jtc         printername     pn;
    514  1.1  jtc         username        user;
    515  1.1  jtc         message         msg;
    516  1.1  jtc };
    517  1.1  jtc struct v2_alert_results {
    518  1.1  jtc         alrstat          stat;
    519  1.1  jtc         comment         cm;
    520  1.1  jtc };
    521  1.1  jtc 
    522  1.1  jtc 
    523  1.1  jtc /*
    524  1.1  jtc **********************************************************
    525  1.1  jtc ** Protocol description for the PCNFSD program
    526  1.1  jtc **********************************************************
    527  1.1  jtc */
    528  1.1  jtc /*
    529  1.1  jtc ** Version 1 of the PCNFSD protocol.
    530  1.1  jtc **
    531  1.1  jtc ** -- PCNFSD_NULL() = 0
    532  1.1  jtc **	Null procedure - standard for all RPC programs.
    533  1.1  jtc **
    534  1.1  jtc ** -- PCNFSD_AUTH() = 1
    535  1.1  jtc **	Perform user authentication - map username, password into uid, gid.
    536  1.1  jtc **
    537  1.1  jtc ** -- PCNFSD_PR_INIT() = 2
    538  1.1  jtc **	Prepare for remote printing: identify exporting spool directory.
    539  1.1  jtc **
    540  1.1  jtc ** -- PCNFSD_PR_START() = 3
    541  1.1  jtc **	Submit a spooled print job for printing: the print data is
    542  1.1  jtc **	in a file created in the spool directory.
    543  1.1  jtc **
    544  1.1  jtc ** Version 2 of the -- PCNFSD protocol.
    545  1.1  jtc **
    546  1.1  jtc ** -- PCNFSD2_NULL() = 0
    547  1.1  jtc **	Null procedure - standard for all RPC programs.
    548  1.1  jtc **
    549  1.1  jtc ** -- PCNFSD2_INFO() = 1
    550  1.1  jtc **	Determine which services are supported by this implementation
    551  1.1  jtc **	of PCNFSD.
    552  1.1  jtc **
    553  1.1  jtc ** -- PCNFSD2_PR_INIT() = 2
    554  1.1  jtc **	 Prepare for remote printing: identify exporting spool directory.
    555  1.1  jtc **
    556  1.1  jtc ** -- PCNFSD2_PR_START() = 3
    557  1.1  jtc **	Submit a spooled print job for printing: the print data is
    558  1.1  jtc **      in a file created in the spool directory.
    559  1.1  jtc **
    560  1.1  jtc ** -- PCNFSD2_PR_LIST() = 4
    561  1.1  jtc **	List all printers known on the server.
    562  1.1  jtc **
    563  1.1  jtc ** -- PCNFSD2_PR_QUEUE() = 5
    564  1.1  jtc **	List all or part of the queued jobs for a printer.
    565  1.1  jtc **
    566  1.1  jtc ** -- PCNFSD2_PR_STATUS() = 6
    567  1.1  jtc **	Determine the status of a printer.
    568  1.1  jtc **
    569  1.1  jtc ** -- PCNFSD2_PR_CANCEL() = 7
    570  1.1  jtc **	Cancel a print job.
    571  1.1  jtc **
    572  1.1  jtc ** -- PCNFSD2_PR_ADMIN() = 8
    573  1.1  jtc **	Perform an implementation-dependent printer administration
    574  1.1  jtc **	operation.
    575  1.1  jtc **
    576  1.1  jtc ** -- PCNFSD2_PR_REQUEUE() = 9
    577  1.1  jtc **	Change the queue position of a previously-submitted print job.
    578  1.1  jtc **
    579  1.1  jtc ** -- PCNFSD2_PR_HOLD() = 10
    580  1.1  jtc **	Place a "hold" on a previously-submitted print job. The job
    581  1.1  jtc **	will remain in the queue, but will not be printed.
    582  1.1  jtc **
    583  1.1  jtc ** -- PCNFSD2_PR_RELEASE() = 11
    584  1.1  jtc **	Release the "hold" on a previously-held print job.
    585  1.1  jtc **
    586  1.1  jtc ** -- PCNFSD2_MAPID() = 12
    587  1.1  jtc **	Perform one or more translations between user and group
    588  1.1  jtc **	names and IDs.
    589  1.1  jtc **
    590  1.1  jtc ** -- PCNFSD2_AUTH() = 13
    591  1.1  jtc **	Perform user authentication - map username, password into uid, gid;
    592  1.1  jtc **	may also return secondary gids, home directory, umask.
    593  1.1  jtc **
    594  1.1  jtc ** -- PCNFSD2_ALERT() = 14
    595  1.1  jtc **	Send a message to the system operator.
    596  1.1  jtc */
    597  1.1  jtc program PCNFSDPROG {
    598  1.1  jtc         version PCNFSDVERS {
    599  1.1  jtc                 void             PCNFSD_NULL(void) = 0;
    600  1.1  jtc                 auth_results     PCNFSD_AUTH(auth_args) = 1;
    601  1.1  jtc                 pr_init_results  PCNFSD_PR_INIT(pr_init_args) = 2;
    602  1.1  jtc                 pr_start_results PCNFSD_PR_START(pr_start_args) = 3;
    603  1.1  jtc         } = 1;
    604  1.1  jtc /*
    605  1.1  jtc ** Version 2 of the PCNFSD protocol.
    606  1.1  jtc */
    607  1.1  jtc         version PCNFSDV2 {
    608  1.1  jtc                 void                   PCNFSD2_NULL(void) = 0;
    609  1.1  jtc                 v2_info_results        PCNFSD2_INFO(v2_info_args) = 1;
    610  1.1  jtc                 v2_pr_init_results     PCNFSD2_PR_INIT(v2_pr_init_args) = 2;
    611  1.1  jtc                 v2_pr_start_results    PCNFSD2_PR_START(v2_pr_start_args) = 3;
    612  1.1  jtc                 v2_pr_list_results     PCNFSD2_PR_LIST(void) = 4;
    613  1.1  jtc                 v2_pr_queue_results    PCNFSD2_PR_QUEUE(v2_pr_queue_args) = 5;
    614  1.1  jtc                 v2_pr_status_results   PCNFSD2_PR_STATUS(v2_pr_status_args) = 6;
    615  1.1  jtc                 v2_pr_cancel_results   PCNFSD2_PR_CANCEL(v2_pr_cancel_args) = 7;
    616  1.1  jtc                 v2_pr_admin_results    PCNFSD2_PR_ADMIN(v2_pr_admin_args) = 8;
    617  1.1  jtc                 v2_pr_requeue_results  PCNFSD2_PR_REQUEUE(v2_pr_requeue_args) = 9;
    618  1.1  jtc                 v2_pr_hold_results     PCNFSD2_PR_HOLD(v2_pr_hold_args) = 10;
    619  1.1  jtc                 v2_pr_release_results  PCNFSD2_PR_RELEASE(v2_pr_release_args) = 11;
    620  1.1  jtc                 v2_mapid_results       PCNFSD2_MAPID(v2_mapid_args) = 12;
    621  1.1  jtc                 v2_auth_results        PCNFSD2_AUTH(v2_auth_args) = 13;
    622  1.1  jtc                 v2_alert_results       PCNFSD2_ALERT(v2_alert_args) = 14;
    623  1.1  jtc         } = 2;
    624  1.1  jtc 
    625  1.1  jtc } = 150001;
    626  1.1  jtc 
    627  1.1  jtc /*
    628  1.1  jtc ** The following forces a publically-visible msg_out()
    629  1.1  jtc */
    630  1.1  jtc %#if RPC_SVC
    631  1.1  jtc % static void _msgout();
    632  1.1  jtc % void msg_out(msg) char *msg; {_msgout(msg);}
    633  1.1  jtc %#endif
    634  1.1  jtc %#if RPC_HDR
    635  1.1  jtc % extern void msg_out();
    636  1.1  jtc %#endif
    637