3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 /*
27 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30
31 #ifndef _NFS4_KPROT_H
32 #define _NFS4_KPROT_H
33
34 /*
35 * Kernel specific version.
36 * NFS Version 4 protocol definitions. From nfs4_prot.x rev 1.119.
37 */
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #include <rpc/rpc.h>
1445 OPEN_CONFIRM4args opopen_confirm;
1446 OPEN_DOWNGRADE4args opopen_downgrade;
1447 PUTFH4args opputfh;
1448 PUTFH4cargs opcputfh;
1449 READ4args opread;
1450 READDIR4args opreaddir;
1451 REMOVE4args opremove;
1452 REMOVE4cargs opcremove;
1453 RENAME4args oprename;
1454 RENAME4cargs opcrename;
1455 RENEW4args oprenew;
1456 SECINFO4args opsecinfo;
1457 SECINFO4cargs opcsecinfo;
1458 SETATTR4args opsetattr;
1459 SETCLIENTID4args opsetclientid;
1460 SETCLIENTID_CONFIRM4args opsetclientid_confirm;
1461 VERIFY4args opverify;
1462 WRITE4args opwrite;
1463 RELEASE_LOCKOWNER4args oprelease_lockowner;
1464 } nfs_argop4_u;
1465 };
1466 typedef struct nfs_argop4 nfs_argop4;
1467
1468 struct nfs_resop4 {
1469 nfs_opnum4 resop;
1470 union {
1471 ACCESS4res opaccess;
1472 CLOSE4res opclose;
1473 COMMIT4res opcommit;
1474 CREATE4res opcreate;
1475 DELEGPURGE4res opdelegpurge;
1476 DELEGRETURN4res opdelegreturn;
1477 GETATTR4res opgetattr;
1478 GETFH4res opgetfh;
1479 LINK4res oplink;
1480 LOCK4res oplock;
1481 LOCKT4res oplockt;
1482 LOCKU4res oplocku;
1483 LOOKUP4res oplookup;
1484 LOOKUPP4res oplookupp;
1491 PUTPUBFH4res opputpubfh;
1492 PUTROOTFH4res opputrootfh;
1493 READ4res opread;
1494 READDIR4res opreaddir;
1495 READDIR4res_clnt opreaddirclnt;
1496 READLINK4res opreadlink;
1497 REMOVE4res opremove;
1498 RENAME4res oprename;
1499 RENEW4res oprenew;
1500 RESTOREFH4res oprestorefh;
1501 SAVEFH4res opsavefh;
1502 SECINFO4res opsecinfo;
1503 SETATTR4res opsetattr;
1504 SETCLIENTID4res opsetclientid;
1505 SETCLIENTID_CONFIRM4res opsetclientid_confirm;
1506 VERIFY4res opverify;
1507 WRITE4res opwrite;
1508 RELEASE_LOCKOWNER4res oprelease_lockowner;
1509 ILLEGAL4res opillegal;
1510 } nfs_resop4_u;
1511 };
1512 typedef struct nfs_resop4 nfs_resop4;
1513
1514 /*
1515 * Fixed size tag string for easy client encoding
1516 */
1517 struct _ctag {
1518 int ct_type;
1519 char *ct_str;
1520 uint32_t ct_tag[3];
1521 };
1522 typedef struct _ctag ctag_t;
1523
1524 /*
1525 * Client-only encode-only version
1526 */
1527 struct COMPOUND4args_clnt {
1528 int ctag;
1529 uint_t array_len;
1530 nfs_argop4 *array;
|
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2016 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 /*
27 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30
31 #ifndef _NFS4_KPROT_H
32 #define _NFS4_KPROT_H
33
34 /*
35 * Kernel specific version.
36 * NFS Version 4 protocol definitions. From nfs4_prot.x rev 1.119.
37 */
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 #include <rpc/rpc.h>
1445 OPEN_CONFIRM4args opopen_confirm;
1446 OPEN_DOWNGRADE4args opopen_downgrade;
1447 PUTFH4args opputfh;
1448 PUTFH4cargs opcputfh;
1449 READ4args opread;
1450 READDIR4args opreaddir;
1451 REMOVE4args opremove;
1452 REMOVE4cargs opcremove;
1453 RENAME4args oprename;
1454 RENAME4cargs opcrename;
1455 RENEW4args oprenew;
1456 SECINFO4args opsecinfo;
1457 SECINFO4cargs opcsecinfo;
1458 SETATTR4args opsetattr;
1459 SETCLIENTID4args opsetclientid;
1460 SETCLIENTID_CONFIRM4args opsetclientid_confirm;
1461 VERIFY4args opverify;
1462 WRITE4args opwrite;
1463 RELEASE_LOCKOWNER4args oprelease_lockowner;
1464 } nfs_argop4_u;
1465 size_t opsize; /* the number of bytes occupied by the */
1466 /* particular operation in the XDR stream */
1467 /* (set during the decode only) */
1468 };
1469 typedef struct nfs_argop4 nfs_argop4;
1470
1471 struct nfs_resop4 {
1472 nfs_opnum4 resop;
1473 union {
1474 ACCESS4res opaccess;
1475 CLOSE4res opclose;
1476 COMMIT4res opcommit;
1477 CREATE4res opcreate;
1478 DELEGPURGE4res opdelegpurge;
1479 DELEGRETURN4res opdelegreturn;
1480 GETATTR4res opgetattr;
1481 GETFH4res opgetfh;
1482 LINK4res oplink;
1483 LOCK4res oplock;
1484 LOCKT4res oplockt;
1485 LOCKU4res oplocku;
1486 LOOKUP4res oplookup;
1487 LOOKUPP4res oplookupp;
1494 PUTPUBFH4res opputpubfh;
1495 PUTROOTFH4res opputrootfh;
1496 READ4res opread;
1497 READDIR4res opreaddir;
1498 READDIR4res_clnt opreaddirclnt;
1499 READLINK4res opreadlink;
1500 REMOVE4res opremove;
1501 RENAME4res oprename;
1502 RENEW4res oprenew;
1503 RESTOREFH4res oprestorefh;
1504 SAVEFH4res opsavefh;
1505 SECINFO4res opsecinfo;
1506 SETATTR4res opsetattr;
1507 SETCLIENTID4res opsetclientid;
1508 SETCLIENTID_CONFIRM4res opsetclientid_confirm;
1509 VERIFY4res opverify;
1510 WRITE4res opwrite;
1511 RELEASE_LOCKOWNER4res oprelease_lockowner;
1512 ILLEGAL4res opillegal;
1513 } nfs_resop4_u;
1514 size_t opsize; /* the number of bytes occupied by the */
1515 /* particular operation in the XDR stream */
1516 /* (set during the encode only) */
1517 struct exportinfo *exi; /* the exportinfo where the operation should */
1518 /* be counted in (support for per-exportinfo */
1519 /* kstats) */
1520 };
1521 typedef struct nfs_resop4 nfs_resop4;
1522
1523 /*
1524 * Fixed size tag string for easy client encoding
1525 */
1526 struct _ctag {
1527 int ct_type;
1528 char *ct_str;
1529 uint32_t ct_tag[3];
1530 };
1531 typedef struct _ctag ctag_t;
1532
1533 /*
1534 * Client-only encode-only version
1535 */
1536 struct COMPOUND4args_clnt {
1537 int ctag;
1538 uint_t array_len;
1539 nfs_argop4 *array;
|