1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 23 * Copyright (c) 2013 by Delphix. All rights reserved. 24 * Copyright 2017 Nexenta Systems, Inc. All rights reserved. 25 * Copyright 2024 RackTop Systems, Inc. 26 */ 27 28 #ifndef _SYS_SDT_H 29 #define _SYS_SDT_H 30 31 #include <sys/stdint.h> 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 /* 38 * DTrace SDT probes have different signatures in userland than they do in 39 * kernel. If we're compiling for user mode (libfksmbsrv) define them as 40 * either no-op (for the SMB dtrace provider) or libfksmbsrv functions for 41 * the other SDT probe sites. 42 */ 43 #ifndef _KERNEL 44 45 extern void fknsmb_dtrace1(const char *, long); 46 extern void fknsmb_dtrace2(const char *, long, long); 47 extern void fknsmb_dtrace3(const char *, long, long, long); 48 49 /* 50 * These are for the few (specialized) dtrace SDT probes sprinkled 51 * through the smbclnt code. In libfknsmb map these to functions. 52 */ 53 54 #undef DTRACE_PROBE1 55 #define DTRACE_PROBE1(n, t1, a1) \ 56 fknsmb_dtrace1(#n, (long)a1) 57 58 #undef DTRACE_PROBE2 59 #define DTRACE_PROBE2(n, t1, a1, t2, a2) \ 60 fknsmb_dtrace2(#n, (long)a1, (long)a2) 61 62 #undef DTRACE_PROBE3 63 #define DTRACE_PROBE3(n, t1, a1, t2, a2, t3, a3) \ 64 fknsmb_dtrace3(#n, (long)a1, (long)a2, (long)a3) 65 66 #endif /* _KERNEL */ 67 68 #ifdef __cplusplus 69 } 70 #endif 71 #endif /* _SYS_SDT_H */ 72