1*f9e4b91fSRichard Lowe /*
2*f9e4b91fSRichard Lowe  * CDDL HEADER START
3*f9e4b91fSRichard Lowe  *
4*f9e4b91fSRichard Lowe  * The contents of this file are subject to the terms of the
5*f9e4b91fSRichard Lowe  * Common Development and Distribution License (the "License").
6*f9e4b91fSRichard Lowe  * You may not use this file except in compliance with the License.
7*f9e4b91fSRichard Lowe  *
8*f9e4b91fSRichard Lowe  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*f9e4b91fSRichard Lowe  * or http://www.opensolaris.org/os/licensing.
10*f9e4b91fSRichard Lowe  * See the License for the specific language governing permissions
11*f9e4b91fSRichard Lowe  * and limitations under the License.
12*f9e4b91fSRichard Lowe  *
13*f9e4b91fSRichard Lowe  * When distributing Covered Code, include this CDDL HEADER in each
14*f9e4b91fSRichard Lowe  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*f9e4b91fSRichard Lowe  * If applicable, add the following below this CDDL HEADER, with the
16*f9e4b91fSRichard Lowe  * fields enclosed by brackets "[]" replaced with your own identifying
17*f9e4b91fSRichard Lowe  * information: Portions Copyright [yyyy] [name of copyright owner]
18*f9e4b91fSRichard Lowe  *
19*f9e4b91fSRichard Lowe  * CDDL HEADER END
20*f9e4b91fSRichard Lowe  */
21*f9e4b91fSRichard Lowe 
22*f9e4b91fSRichard Lowe /*
23*f9e4b91fSRichard Lowe  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*f9e4b91fSRichard Lowe  * Use is subject to license terms.
25*f9e4b91fSRichard Lowe  */
26*f9e4b91fSRichard Lowe 
27*f9e4b91fSRichard Lowe #pragma	D depends_on library ip.d
28*f9e4b91fSRichard Lowe #pragma	D depends_on library net.d
29*f9e4b91fSRichard Lowe #pragma	D depends_on library nfs.d
30*f9e4b91fSRichard Lowe #pragma D depends_on module nfssrv
31*f9e4b91fSRichard Lowe 
32*f9e4b91fSRichard Lowe #pragma D binding "1.5" translator
33*f9e4b91fSRichard Lowe translator conninfo_t < rfs4_client_t *P > {
34*f9e4b91fSRichard Lowe 	ci_protocol = (P->rc_addr.ss_family == AF_INET) ? "ipv4" : "ipv6";
35*f9e4b91fSRichard Lowe 
36*f9e4b91fSRichard Lowe 	ci_local = "<unknown>";
37*f9e4b91fSRichard Lowe 
38*f9e4b91fSRichard Lowe 	ci_remote = (P->rc_addr.ss_family == AF_INET) ?
39*f9e4b91fSRichard Lowe 	    inet_ntoa((ipaddr_t *)
40*f9e4b91fSRichard Lowe 	    &((struct sockaddr_in *)&P->rc_addr)->sin_addr) :
41*f9e4b91fSRichard Lowe 	    inet_ntoa6(&((struct sockaddr_in6 *)&P->rc_addr)->sin6_addr);
42*f9e4b91fSRichard Lowe };
43*f9e4b91fSRichard Lowe 
44*f9e4b91fSRichard Lowe #pragma D binding "1.5" translator
45*f9e4b91fSRichard Lowe translator nfsv4cbinfo_t < rfs4_deleg_state_t *P > {
46*f9e4b91fSRichard Lowe 	nci_curpath = (P->rds_finfo->rf_vp == NULL) ? "<unknown>" :
47*f9e4b91fSRichard Lowe 	    P->rds_finfo->rf_vp->v_path;
48*f9e4b91fSRichard Lowe };
49