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) 2009, 2012, 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 smbsrv
2N/A
2N/Atypedef struct smbopinfo {
2N/A cred_t *soi_cred; /* credentials for operation */
2N/A string soi_curpath; /* current file handle path (if any) */
2N/A uint64_t soi_sid;
2N/A uint32_t soi_pid;
2N/A uint32_t soi_status;
2N/A uint16_t soi_tid;
2N/A uint16_t soi_uid;
2N/A uint16_t soi_mid;
2N/A uint16_t soi_flags2;
2N/A uint8_t soi_flags;
2N/A} smbopinfo_t;
2N/A
2N/Atypedef struct smbReadArgs {
2N/A off_t soa_offset;
2N/A uint_t soa_count;
2N/A} smbReadArgs_t;
2N/A
2N/Atypedef struct smbWriteArgs {
2N/A off_t soa_offset;
2N/A uint_t soa_count;
2N/A} smbWriteArgs_t;
2N/A
2N/A#pragma D binding "1.6" translator
2N/Atranslator conninfo_t < smb_request_t *P > {
2N/A ci_protocol = P->sr_session->ipaddr.a_family == AF_INET ? "ipv4" : "ipv6";
2N/A ci_local = P->sr_session->local_ipaddr.a_family == AF_INET ?
2N/A inet_ntoa(&P->sr_session->local_ipaddr.au_addr.au_ipv4) :
2N/A inet_ntoa6(&P->sr_session->local_ipaddr.au_addr.au_ipv6);
2N/A ci_remote = P->sr_session->ipaddr.a_family == AF_INET ?
2N/A inet_ntoa(&P->sr_session->ipaddr.au_addr.au_ipv4) :
2N/A inet_ntoa6(&P->sr_session->ipaddr.au_addr.au_ipv6);
2N/A};
2N/A
2N/A#pragma D binding "1.6" translator
2N/Atranslator smbopinfo_t < smb_request_t *P > {
2N/A soi_cred = P->sr_cred;
2N/A soi_curpath = (P->sr_ofile == NULL || P->sr_ofile->f_node == NULL ||
2N/A P->sr_ofile->f_node->vp->v_path == NULL) ? "<unknown>" :
2N/A P->sr_ofile->f_node->vp->v_path;
2N/A soi_sid = P->sr_session->s_kid;
2N/A soi_pid = (P->sr_header.hd_pidhigh << 16) + P->sr_header.hd_pidlow;
2N/A soi_status = P->sr_header.hd_status;
2N/A soi_tid = P->sr_header.hd_tid;
2N/A soi_uid = P->sr_header.hd_uid;
2N/A soi_mid = P->sr_header.hd_mid;
2N/A soi_flags2 = P->sr_header.hd_flags2;
2N/A soi_flags= P->sr_header.hd_flags;
2N/A};
2N/A
2N/A#pragma D binding "1.6" translator
2N/Atranslator smbReadArgs_t < smb_rw_param_t *P > {
2N/A soa_offset = P->rw_offset;
2N/A soa_count = P->rw_count;
2N/A};
2N/A
2N/A#pragma D binding "1.6" translator
2N/Atranslator smbWriteArgs_t < smb_rw_param_t *P > {
2N/A soa_offset = P->rw_offset;
2N/A soa_count = P->rw_count;
2N/A};