From 54c51a66e3e31c70a641d7efac2d4b08c3007278 Mon Sep 17 00:00:00 2001 From: todd stecher Date: Sun, 8 Feb 2009 23:10:34 -0800 Subject: 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. --- source3/smbd/reply.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/smbd/reply.c') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index bb5fadd465..60e2e5dc7a 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -492,7 +492,7 @@ void reply_special(char *inbuf) DEBUG(5,("init msg_type=0x%x msg_flags=0x%x\n", msg_type, msg_flags)); - srv_send_smb(smbd_server_fd(), outbuf, false); + srv_send_smb(smbd_server_fd(), outbuf, false, NULL); return; } @@ -3293,6 +3293,8 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req, /* No outbuf here means successful sendfile. */ TALLOC_FREE(req->outbuf); + SMB_PERFCOUNT_SET_MSGLEN_OUT(&req->pcd, nread); + SMB_PERFCOUNT_END(&req->pcd); return; } #endif @@ -3590,7 +3592,8 @@ void reply_writebraw(struct smb_request *req) show_msg(buf); if (!srv_send_smb(smbd_server_fd(), buf, - IS_CONN_ENCRYPTED(conn))) { + IS_CONN_ENCRYPTED(conn), + &req->pcd)) { exit_server_cleanly("reply_writebraw: srv_send_smb " "failed."); } @@ -4647,7 +4650,8 @@ void reply_echo(struct smb_request *req) show_msg((char *)req->outbuf); if (!srv_send_smb(smbd_server_fd(), (char *)req->outbuf, - IS_CONN_ENCRYPTED(conn)||req->encrypted)) + IS_CONN_ENCRYPTED(conn)||req->encrypted, + &req->pcd)) exit_server_cleanly("reply_echo: srv_send_smb failed."); } -- cgit