Move the creation of the header.
commita45db5948050b7a94181e0579fb9fc9f651aed74
authorHolger Hetterich <hhetter@novell.com>
Fri, 22 Jan 2010 20:17:53 +0000 (22 21:17 +0100)
committerJim McDonough <jmcd@samba.org>
Tue, 16 Mar 2010 13:52:09 +0000 (16 09:52 -0400)
treebeeaa4e08851b50a9a52bc1b0e6bcca452f01f23
parent9702dcfa918f18c038eef0251b6330d6cf9a7162
Move the creation of the header.

Since the header block of the protocol contains the number of bytes to
come, we always send the header itself unmodified.
If we compress or crypt the data we are about to send, the length of the
data to send may change. Therefore, we no longer create the header in
smb_traffic_analyzer_create_string, but shortly before we send the data.
For both cases, encryption and normal, we create our own header, and
send it before the actual data.

In case of protocol v1, we don't need to create an extra header.
Just send the data, and return from the function.
Change a debug message to say that the header for crypted data has
been created.

Add a status flags consisting of 6 bytes to the header. Their function
will be descriped in one of the next patches, which is descriping
the header in a longer comment.
When anonymization and/or encryption is used, set the flags accordingly.
source3/modules/vfs_smb_traffic_analyzer.c