2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#pragma D depends_on library ip.d
2N/A#pragma D depends_on library net.d
2N/A#pragma D depends_on module genunix
2N/A#pragma D depends_on module nfssrv /* rfs_inst_t */
2N/A
2N/Ainline int T_RDMA = 4;
2N/A#pragma D binding "1.5" T_RDMA
2N/A
2N/Atypedef struct nfsv4opinfo {
2N/A uint64_t noi_xid; /* unique transaction ID */
2N/A cred_t *noi_cred; /* credentials for operation */
2N/A string noi_curpath; /* current file handle path (if any) */
2N/A string noi_zone_name; /* containing zone name */
2N/A rfs_inst_t *noi_inst; /* NFS server instance ptr */
2N/A} nfsv4opinfo_t;
2N/A
2N/Atypedef struct nfsv4cbinfo {
2N/A string nci_curpath; /* current file handle path (if any) */
2N/A} nfsv4cbinfo_t;
2N/A
2N/A#pragma D binding "1.5" translator
2N/Atranslator conninfo_t < struct svc_req *P > {
2N/A ci_protocol = P->rq_xprt->xp_xpc.xpc_type == T_RDMA ? "rdma" :
2N/A P->rq_xprt->xp_xpc.xpc_netid == "tcp" ? "ipv4" :
2N/A P->rq_xprt->xp_xpc.xpc_netid == "udp" ? "ipv4" :
2N/A P->rq_xprt->xp_xpc.xpc_netid == "tcp6" ? "ipv6" :
2N/A P->rq_xprt->xp_xpc.xpc_netid == "udp6" ? "ipv6" :
2N/A "<unknown>";
2N/A
2N/A ci_local = (P->rq_xprt->xp_xpc.xpc_netid == "tcp" ||
2N/A P->rq_xprt->xp_xpc.xpc_netid == "udp") ?
2N/A inet_ntoa(&((struct sockaddr_in *)
2N/A P->rq_xprt->xp_xpc.xpc_lcladdr.buf)->sin_addr.S_un.S_addr) :
2N/A (P->rq_xprt->xp_xpc.xpc_netid == "tcp6" ||
2N/A P->rq_xprt->xp_xpc.xpc_netid == "udp6") ?
2N/A inet_ntoa6(&((struct sockaddr_in6 *)
2N/A P->rq_xprt->xp_xpc.xpc_lcladdr.buf)->sin6_addr) :
2N/A "unknown";
2N/A
2N/A ci_remote = (P->rq_xprt->xp_xpc.xpc_netid == "tcp" ||
2N/A P->rq_xprt->xp_xpc.xpc_netid == "udp") ?
2N/A inet_ntoa(&((struct sockaddr_in *)
2N/A P->rq_xprt->xp_xpc.xpc_rtaddr.buf)->sin_addr.S_un.S_addr) :
2N/A (P->rq_xprt->xp_xpc.xpc_netid == "tcp6" ||
2N/A P->rq_xprt->xp_xpc.xpc_netid == "udp6") ?
2N/A inet_ntoa6(&((struct sockaddr_in6 *)
2N/A P->rq_xprt->xp_xpc.xpc_rtaddr.buf)->sin6_addr) :
2N/A "unknown";
2N/A};
2N/A
2N/A#pragma D binding "1.5" translator
2N/Atranslator conninfo_t < struct compound_state *P > {
2N/A ci_protocol = P->req->rq_xprt->xp_xpc.xpc_type == T_RDMA ? "rdma" :
2N/A P->req->rq_xprt->xp_xpc.xpc_netid == "tcp" ? "ipv4" :
2N/A P->req->rq_xprt->xp_xpc.xpc_netid == "tcp6" ? "ipv6" :
2N/A "<unknown>";
2N/A
2N/A ci_local = (P->req->rq_xprt->xp_xpc.xpc_netid == "tcp") ?
2N/A inet_ntoa(&((struct sockaddr_in *)
2N/A P->req->rq_xprt->xp_xpc.xpc_lcladdr.buf)->sin_addr.S_un.S_addr) :
2N/A (P->req->rq_xprt->xp_xpc.xpc_netid == "tcp6") ?
2N/A inet_ntoa6(&((struct sockaddr_in6 *)
2N/A P->req->rq_xprt->xp_xpc.xpc_lcladdr.buf)->sin6_addr) :
2N/A "unknown";
2N/A
2N/A ci_remote = (P->req->rq_xprt->xp_xpc.xpc_netid == "tcp") ?
2N/A inet_ntoa(&((struct sockaddr_in *)
2N/A P->req->rq_xprt->xp_xpc.xpc_rtaddr.buf)->sin_addr.S_un.S_addr) :
2N/A (P->req->rq_xprt->xp_xpc.xpc_netid == "tcp6") ?
2N/A inet_ntoa6(&((struct sockaddr_in6 *)
2N/A P->req->rq_xprt->xp_xpc.xpc_rtaddr.buf)->sin6_addr) :
2N/A "unknown";
2N/A
2N/A};
2N/A
2N/A#pragma D binding "1.5" translator
2N/Atranslator nfsv4opinfo_t < struct compound_state *P > {
2N/A noi_xid = P->req->rq_xprt->xp_xid;
2N/A noi_cred = P->basecr;
2N/A noi_curpath = (P->vp == NULL) ? "<unknown>" : P->vp->v_path;
2N/A noi_zone_name = P->rip->ri_rzone->rz_zonep->zone_name;
2N/A noi_inst = P->rip;
2N/A};
2N/A
2N/A#pragma D binding "1.5" translator
2N/Atranslator conninfo_t < rfs4_client_t *P > {
2N/A ci_protocol = (P->rc_addr.ss_family == AF_INET) ? "ipv4" : "ipv6";
2N/A
2N/A ci_local = "<unknown>";
2N/A
2N/A ci_remote = (P->rc_addr.ss_family == AF_INET) ?
2N/A inet_ntoa((ipaddr_t *)
2N/A &((struct sockaddr_in *)&P->rc_addr)->sin_addr) :
2N/A inet_ntoa6(&((struct sockaddr_in6 *)&P->rc_addr)->sin6_addr);
2N/A};
2N/A
2N/A#pragma D binding "1.5" translator
2N/Atranslator nfsv4cbinfo_t < rfs4_deleg_state_t *P > {
2N/A nci_curpath = (P->rds_finfo->rf_vp == NULL) ? "<unknown>" :
2N/A P->rds_finfo->rf_vp->v_path;
2N/A};
2N/A
2N/Atypedef struct nfsv3opinfo {
2N/A uint64_t noi_xid; /* unique transaction ID */
2N/A cred_t *noi_cred; /* credentials for operation */
2N/A string noi_curpath; /* current file handle path (if any) */
2N/A string noi_zone_name; /* containing zone name */
2N/A rfs_inst_t *noi_inst; /* NFS server instance ptr */
2N/A} nfsv3opinfo_t;
2N/A
2N/Atypedef struct nfsv3oparg nfsv3oparg_t;
2N/A
2N/A#pragma D binding "1.5" translator
2N/Atranslator nfsv3opinfo_t < nfsv3oparg_t *P > {
2N/A noi_xid = ((struct svc_req *)arg0)->rq_xprt->xp_xid;
2N/A noi_cred = (cred_t *)arg1;
2N/A noi_curpath = (arg2 == 0 || ((vnode_t *)arg2)->v_path == NULL) ?
2N/A "<unknown>" : ((vnode_t *)arg2)->v_path;
2N/A noi_zone_name = ((rfs_inst_t *)
2N/A ((struct svc_req *)arg0)->rq_xprt->xp_master->xp_tpool->
2N/A stp_handle)->ri_rzone->rz_zonep->zone_name;
2N/A noi_inst = (rfs_inst_t *)
2N/A ((struct svc_req *)arg0)->rq_xprt->xp_master->xp_tpool->stp_handle;
2N/A};
2N/A
2N/Atypedef struct nfsv2opinfo {
2N/A uint64_t noi_xid; /* unique transation ID */
2N/A cred_t *noi_cred; /* credentials for operation */
2N/A string noi_curpath; /* current file handle path (if any) */
2N/A string noi_zone_name; /* zone name */
2N/A rfs_inst_t *noi_inst; /* NFS server instance ptr */
2N/A} nfsv2opinfo_t;
2N/A
2N/Atypedef struct nfsv2oparg nfsv2oparg_t;
2N/A
2N/A#pragma D binding "1.5" translator
2N/Atranslator nfsv2opinfo_t < nfsv2oparg_t *P > {
2N/A noi_xid = ((struct svc_req *)arg0)->rq_xprt->xp_xid;
2N/A noi_cred = (cred_t *)arg1;
2N/A noi_curpath = (arg2 == 0 || ((vnode_t *)arg2)->v_path == NULL) ?
2N/A "<unknown>" : ((vnode_t *)arg2)->v_path;
2N/A noi_zone_name = ((rfs_inst_t *)
2N/A ((struct svc_req *)arg0)->rq_xprt->xp_master->xp_tpool->
2N/A stp_handle)->ri_rzone->rz_zonep->zone_name;
2N/A noi_inst = (rfs_inst_t *)
2N/A ((struct svc_req *)arg0)->rq_xprt->xp_master->xp_tpool->stp_handle;
2N/A};