No subject
Sun Sep 6 16:29:27 MDT 2009
2009 20:11:39 +0200=0ASubject: [PATCH] Make smb_traffic_analyzer differ =
the protocol versions to enable the=0A development of version 2 of the =
protocol. To do this, a new parameter=0A "protocol_version" has been =
introduced, which can be set to "V1", "V2",=0A or nothing. If protocol_vers=
ion is not set, V1 will be chosen automatically.=0A=0A---=0A source3/module=
s/vfs_smb_traffic_analyzer.c | 16 +++++++++++++++-=0A 1 files changed, =
15 insertions(+), 1 deletions(-)=0A=0Adiff --git a/source3/modules/vfs_smb_=
traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c=0Aindex =
08389f5..6861835 100644=0A--- a/source3/modules/vfs_smb_traffic_analyzer.c=
=0A+++ b/source3/modules/vfs_smb_traffic_analyzer.c=0A@@ -166,6 +166,7 @@ =
static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,=0A =
char *username =3D NULL;=0A const char *anon_prefix =3D NULL;=0A =
const char *total_anonymization =3D NULL;=0A+ const char *protocol_versio=
n =3D NULL;=0A size_t len;=0A =0A SMB_VFS_HANDLE_GET_DATA(handle, =
rf_sock, struct refcounted_sock, return);=0A@@ -212,7 +213,12 @@ static =
void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,=0A =
return;=0A }=0A =0A- str =3D talloc_asprintf(talloc_tos(),=0A+ =
protocol_version =3D lp_parm_const_string(SNUM(handle->conn),=0A+ =
"smb_traffic_analyzer",=0A+ "protocol_version", NULL );=0A+=0A+=
if ( protocol_version =3D=3D NULL || strcmp( protocol_version,"V1")=
=3D=3D 0) {=0A+ str =3D talloc_asprintf(talloc_tos(),=0A =
"V1,%u,\"%s\",\"%s\",\"%c\",\"%s\",\"%s\","=0A =
"\"%04d-%02d-%02d %02d:%02d:%02d.%03d\"\n",=0A (unsigned =
int)result,=0A@@ -228,6 +234,14 @@ static void smb_traffic_analyzer_send_da=
ta(vfs_handle_struct *handle,=0A tm->tm_min,=0A =
tm->tm_sec,=0A (int)seconds);=0A+ } else if =
( strcmp( protocol_version, "V2") =3D=3D 0) {=0A+ /* =
protocol version 2 */=0A+ /* in development */=0A+ } =
else {=0A+ DEBUG(1, ("smb_traffic_analyzer_send_data_socket: =
"=0A+ "error, unkown protocol given!\n"));=0A+ =
return;=0A+ }=0A =0A if (!str) {=0A return;=0A-- =
=0A1.6.0.2=0A=0A
--=__PartDBF02ECA.0__=--
More information about the samba-technical
mailing list