summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authortodd stecher <todd.stecher@gmail.com>2009-02-08 23:10:34 -0800
committerTim Prouty <tprouty@samba.org>2009-02-09 13:23:44 -0800
commit54c51a66e3e31c70a641d7efac2d4b08c3007278 (patch)
tree01ea8154819950eec666579dfeaad7724cf3fdb1 /source3/smbd/nttrans.c
parent98a4327b19e83ffad4e0be7e8895fdbd9e48d49f (diff)
downloadsamba-54c51a66e3e31c70a641d7efac2d4b08c3007278.tar.gz
samba-54c51a66e3e31c70a641d7efac2d4b08c3007278.tar.bz2
samba-54c51a66e3e31c70a641d7efac2d4b08c3007278.zip
S3: New module interface for SMB message statistics gathering
This changelist allows for the addition of custom performance monitoring modules through smb.conf. Entrypoints in the main message processing code have been added to capture the command, subop, ioctl, identity and message size statistics.
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 0ad4df6e90..ad2366efae 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -230,7 +230,8 @@ void send_nt_replies(connection_struct *conn,
show_msg((char *)req->outbuf);
if (!srv_send_smb(smbd_server_fd(),
(char *)req->outbuf,
- IS_CONN_ENCRYPTED(conn))) {
+ IS_CONN_ENCRYPTED(conn),
+ &req->pcd)) {
exit_server_cleanly("send_nt_replies: srv_send_smb failed.");
}
@@ -1823,6 +1824,8 @@ static void call_nt_transact_ioctl(connection_struct *conn,
because I don't want to break anything... --metze
FSP_BELONGS_CONN(fsp,conn);*/
+ SMB_PERFCOUNT_SET_IOCTL(&req->pcd, function);
+
switch (function) {
case FSCTL_SET_SPARSE:
/* pretend this succeeded - tho strictly we should
@@ -2489,6 +2492,9 @@ static void handle_nttrans(connection_struct *conn,
SSVAL(req->inbuf,smb_flg2,req->flags2);
}
+
+ SMB_PERFCOUNT_SET_SUBOP(&req->pcd, state->call);
+
/* Now we must call the relevant NT_TRANS function */
switch(state->call) {
case NT_TRANSACT_CREATE: