1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  14  */
  15 
  16 /*
  17  * Example using the "smb" dtrace provider.
  18  * Traces all SMB commands.
  19  *
  20  * All these probes provide:
  21  *      args[0]  conninfo_t
  22  *      args[1]  smbopinfo_t
  23  * Some also provide one of: (not used here)
  24  *      args[2]  smb_name_args_t
  25  *      args[2]  smb_open_args_t
  26  *      args[2]  smb_rw_args_t
  27  */
  28 
  29 smb:::op-*-start
  30 {
  31         printf("clnt=%s mid=0x%x uid=0x%x tid=0x%x\n",
  32                args[0]->ci_remote,
  33                args[1]->soi_mid,
  34                args[1]->soi_uid,
  35                args[1]->soi_tid);
  36 }
  37 
  38 smb:::op-*-done
  39 {
  40         printf("clnt=%s mid=0x%x status=0x%x\n",
  41                args[0]->ci_remote,
  42                args[1]->soi_mid,
  43                args[1]->soi_status);
  44 }