1179189Sjb/* 2179189Sjb * CDDL HEADER START 3179189Sjb * 4179189Sjb * The contents of this file are subject to the terms of the 5179189Sjb * Common Development and Distribution License (the "License"). 6179189Sjb * You may not use this file except in compliance with the License. 7179189Sjb * 8179189Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9179189Sjb * or http://www.opensolaris.org/os/licensing. 10179189Sjb * See the License for the specific language governing permissions 11179189Sjb * and limitations under the License. 12179189Sjb * 13179189Sjb * When distributing Covered Code, include this CDDL HEADER in each 14179189Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15179189Sjb * If applicable, add the following below this CDDL HEADER, with the 16179189Sjb * fields enclosed by brackets "[]" replaced with your own identifying 17179189Sjb * information: Portions Copyright [yyyy] [name of copyright owner] 18179189Sjb * 19179189Sjb * CDDL HEADER END 20179189Sjb * 21179189Sjb * Portions Copyright 2006-2008 John Birrell jb@freebsd.org 22179189Sjb * 23179189Sjb * $FreeBSD$ 24179189Sjb */ 25179189Sjb 26179189Sjb/* 27250486Spfg * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 28179189Sjb * Use is subject to license terms. 29179189Sjb */ 30179189Sjb 31179189Sjb#pragma D depends_on library ip.d 32179189Sjb#pragma D depends_on library net.d 33249526Spfg#pragma D depends_on module nfs.d 34249526Spfg#pragma D depends_on module nfssrv 35179189Sjb 36179189Sjb#pragma D binding "1.5" translator 37250486Spfgtranslator conninfo_t < struct compound_state *P > { 38250486Spfg ci_protocol = P->req->rq_xprt->xp_master->xp_netid == "tcp" ? "ipv4" : 39250486Spfg P->req->rq_xprt->xp_master->xp_netid == "tcp6" ? "ipv6" : 40250486Spfg "<unknown>"; 41179189Sjb 42250486Spfg ci_local = inet_ntoa6(&((conn_t *)P->req->rq_xprt->xp_xpc. 43250486Spfg xpc_wq->q_next->q_ptr)->connua_v6addr.connua_laddr); 44179189Sjb 45250486Spfg ci_remote = inet_ntoa6(&((conn_t *)P->req->rq_xprt->xp_xpc. 46250486Spfg xpc_wq->q_next->q_ptr)->connua_v6addr.connua_faddr); 47179189Sjb}; 48179189Sjb 49179189Sjb#pragma D binding "1.5" translator 50250486Spfgtranslator nfsv4opinfo_t < struct compound_state *P > { 51250486Spfg noi_xid = P->req->rq_xprt->xp_xid; 52250486Spfg noi_cred = P->basecr; 53250486Spfg noi_curpath = (P->vp == NULL) ? "<unknown>" : P->vp->v_path; 54179189Sjb}; 55