Print this page
Build provider 3rd arg from smb_request_t
hacking...
NEX-1643 dtrace provider for smbsrv
Also illumos 1841:
 DTrace smb provider was mis-implemented, doesn't exist.
Add back handlers for read/write raw, so that
 legacy dtrace consumers can find the probes.
Kill extra arg in smb_negotiate
Fix missing "done" probe with smb_notify
Add example consumer: smb-trace.d
fix soi_pid


 132             sr, &infolev, &fqi->fq_path.pn_path) != 0)
 133                 return (SDRC_ERROR);
 134 
 135         if (smb_query_by_path(sr, xa, infolev) != 0)
 136                 return (SDRC_ERROR);
 137 
 138         return (SDRC_SUCCESS);
 139 }
 140 
 141 /*
 142  * smb_com_query_information (aka getattr)
 143  */
 144 smb_sdrc_t
 145 smb_pre_query_information(smb_request_t *sr)
 146 {
 147         int rc;
 148         smb_fqi_t *fqi = &sr->arg.dirop.fqi;
 149 
 150         rc = smbsr_decode_data(sr, "%S", sr, &fqi->fq_path.pn_path);
 151 
 152         DTRACE_SMB_2(op__QueryInformation__start, smb_request_t *, sr,
 153             smb_fqi_t *, fqi);
 154 
 155         return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
 156 }
 157 
 158 void
 159 smb_post_query_information(smb_request_t *sr)
 160 {
 161         DTRACE_SMB_1(op__QueryInformation__done, smb_request_t *, sr);
 162 }
 163 
 164 smb_sdrc_t
 165 smb_com_query_information(smb_request_t *sr)
 166 {
 167         uint16_t infolev = SMB_QUERY_INFORMATION;
 168 
 169         if (STYPE_ISIPC(sr->tid_tree->t_res_type)) {
 170                 smbsr_error(sr, NT_STATUS_ACCESS_DENIED,
 171                     ERRDOS, ERROR_ACCESS_DENIED);
 172                 return (SDRC_ERROR);
 173         }




 132             sr, &infolev, &fqi->fq_path.pn_path) != 0)
 133                 return (SDRC_ERROR);
 134 
 135         if (smb_query_by_path(sr, xa, infolev) != 0)
 136                 return (SDRC_ERROR);
 137 
 138         return (SDRC_SUCCESS);
 139 }
 140 
 141 /*
 142  * smb_com_query_information (aka getattr)
 143  */
 144 smb_sdrc_t
 145 smb_pre_query_information(smb_request_t *sr)
 146 {
 147         int rc;
 148         smb_fqi_t *fqi = &sr->arg.dirop.fqi;
 149 
 150         rc = smbsr_decode_data(sr, "%S", sr, &fqi->fq_path.pn_path);
 151 
 152         DTRACE_SMB_1(op__QueryInformation__start, smb_request_t *, sr); /* arg.dirop */

 153 
 154         return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
 155 }
 156 
 157 void
 158 smb_post_query_information(smb_request_t *sr)
 159 {
 160         DTRACE_SMB_1(op__QueryInformation__done, smb_request_t *, sr);
 161 }
 162 
 163 smb_sdrc_t
 164 smb_com_query_information(smb_request_t *sr)
 165 {
 166         uint16_t infolev = SMB_QUERY_INFORMATION;
 167 
 168         if (STYPE_ISIPC(sr->tid_tree->t_res_type)) {
 169                 smbsr_error(sr, NT_STATUS_ACCESS_DENIED,
 170                     ERRDOS, ERROR_ACCESS_DENIED);
 171                 return (SDRC_ERROR);
 172         }