Help with TCONX

william fargo wfargo at caramail.com
Sun May 12 09:08:01 GMT 2002


Hi,

I've got problems in the developement of a very basic SMB
client (list, move, rename and delete files). I've got
difficulties in finding the name of a share available on a
host. I've got some problems to understand the smb_tconx and
smb_architecture and how it's working . 
For example if I use the command "smbclient -N -L 127.0.0.1"
a smb_tconx request packet will be sent with the "Path[]"
(according to the draft_leach_cifs_v1_spec_02.txt) field
filled with "127.0.0.1" and the "service[]" field filled
with "IPC$ ?????" and it's the same thing for the response 
.For this, all is OK but after ...
During this session ("smbclient -N -L 127.0.0.1") the only
shared available is an IPC.
The SetupX and Negprot have been removed.



Domain=[MYGROUP] OS=[Unix] Server=[Samba 2.0.3]

	Sharename Type Comment
	--------- ---- -------
	IPC$ IPC IPC Service (Samba Server)

	Server Comment
	--------- -------
	CASE Samba Server

	Workgroup Master
	--------- -------
	MYGROUP CASE
	WORKGROUP ALEX


Ok, tcpdump packet session :

SMB PACKET: SMBtconX (REQUEST)

 (DF)
0x0000	 4500 007b 03c7 4000 4006 38b4 7f00 0001
E..{.. at .@.8.....
0x0010	 7f00 0001 0418 008b cdc9 9088 cdd3 9912
................
0x0020	 8018 7960 7416 0000 0101 080a 0006 77b5
..y`t.........w.
0x0030	 0006 77b4 0000 0043 ff53 4d42 7500 0000
..w....C.SMBu...
0x0040	 0008 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0000 4302 6400 0100 04ff 0000 0000 0001
..C.d...........
0x0060	 0018 0000 5c5c 3132 372e 302e 302e 315c
....\\127.0.0.1\
0x0070	 4950 4324 003f 3f3f 3f3f 00 	IPC$.?????.

Ok asking for ressources available on localhost.


SMB PACKET: SMBtconX (REPLY)

 (DF)
0x0000	 4500 0069 03c8 4000 4006 38c5 7f00 0001
E..i.. at .@.8.....
0x0010	 7f00 0001 008b 0418 cdd3 9912 cdc9 90cf
................
0x0020	 8018 7960 3410 0000 0101 080a 0006 77b6
..y`4.........w.
0x0030	 0006 77b5 0000 0031 ff53 4d42 7500 0000
..w....1.SMBu...
0x0040	 0088 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0100 4302 6400 0100 03ff 0000 0001 0008
..C.d...........
0x0060	 0049 5043 0049 5043 00 	.IPC.IPC.

Just IPC available.



SMB PACKET: SMBtrans (REQUEST)

 (DF)
0x0000	 4500 0097 03c9 4000 4006 3896 7f00 0001
E..... at .@.8.....
0x0010	 7f00 0001 0418 008b cdc9 90cf cdd3 9947
...............G
0x0020	 8018 7960 63a0 0000 0101 080a 0006 77b6
..y`c.........w.
0x0030	 0006 77b6 0000 005f ff53 4d42 2500 0000
..w...._.SMB%...
0x0040	 0008 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0100 4302 6400 0100 0e13 0000 0000 04ff
..C.d...........
0x0060	 ff00 0000 0000 0000 0000 0013 004c 0000
.............L..
0x0070	 005f 0000 0020 005c 5049 5045 5c4c 414e 
.\PIPE\LAN
0x0080	 4d41 4e00 0000 5772 4c65 6800 4231 3342 
MAN...WrLeh.
0x0090	 577a 0001 00ff ff 		B13BWz.....

What is "\PIPE\LAM ...WrLeh.B13BWz...." ?, I've got some
problems, it's not writen in the cifs draft . How it's
working ?


SMB PACKET: SMBtrans (REPLY)

 (DF)
0x0000	 4500 00a7 03ca 4000 4006 3885 7f00 0001
E..... at .@.8.....
0x0010	 7f00 0001 008b 0418 cdd3 9947 cdc9 9132
...........G...2
0x0020	 8018 7960 fc41 0000 0101 080a 0006 77b7
..y`.A........w.
0x0030	 0006 77b6 0000 006f ff53 4d42 2500 0000
..w....o.SMB%...
0x0040	 0088 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0100 4302 6400 0100 0a08 002f 0000 0008
..C.d....../....
0x0060	 0038 0000 002f 0040 0000 0000 0038 0000
.8.../. at .....8..
0x0070	 0000 0000 0100 0100 4950 4324 0000 0000
........IPC$....
0x0080	 0000 0000 0000 0300 1400 0000 4950 4320
............IPC.
0x0090	 5365 7276 6963 6520 2853 616d 6261 2053 
Service.(Samba.S
0x00a0	 6572 7665 7229 00 	erver).

Ok, I think it's for sharename, type and comment, but one
more time it's not describing in the doc

SMB PACKET: SMBtrans (REQUEST)

 (DF)
0x0000	 4500 00a6 03cb 4000 4006 3885 7f00 0001
E..... at .@.8.....
0x0010	 7f00 0001 0418 008b cdc9 9132 cdd3 99ba
...........2....
0x0020	 8018 7960 a312 0000 0101 080a 0006 77b7
..y`..........w.
0x0030	 0006 77b7 0000 006e ff53 4d42 2500 0000
..w....n.SMB%...
0x0040	 0008 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0100 4302 6400 0100 0e22 0000 0008 0000
..C.d...."......
0x0060	 4400 0000 0000 0000 0000 0022 004c 0000
D..........".L..
0x0070	 006e 0000 002f 005c 5049 5045 5c4c 414e 
.n.../.\PIPE\LAN
0x0080	 4d41 4e00 6800 5772 4c65 68447a004231
MAN.h.WrLehDz.B1
0x0090	 3642 4244 7a00 0100 0044 ffff ffff 4d59 
6BBDz....D....MY
0x00a0	 4752 4f55 5000 	 GROUP.

One more time "\PIPE\LANMAN ...etc" but we've got the string
character which following which is different than the
previous SMBtrans Packet and we've got the WORKGROUP with.
Why ? 

SMB PACKET: SMBtrans (REPLY)

 (DF)
0x0000	 4500 009f 03cc 4000 4006 388b 7f00 0001
E..... at .@.8.....
0x0010	 7f00 0001 008b 0418 cdd3 99ba cdc9 91a4
................
0x0020	 8018 7960 14eb 0000 0101 080a 0006 77b8
..y`..........w.
0x0030	 0006 77b7 0000 0067 ff53 4d42 2500 0000
..w....g.SMB%...
0x0040	 0088 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0100 4302 6400 0100 0a08 0027 0000 0008
..C.d......'....
0x0060	 0038 0000 0027 0040 0000 0000 0030 0000
.8...'. at .....0..
0x0070	 0000 0000 0100 0100 4341 5345 0000 0000
........CASE....
0x0080	 0000 0000 0000 0000 0000 039a 0400 1a00
................
0x0090	 0000 5361 6d62 6120 5365 7276 6572 00 
..Samba.Server.

Ok , server and Comment....

SMB PACKET: SMBtrans (REQUEST)

 (DF)
0x0000	 4500 00a6 03cd 4000 4006 3883 7f00 0001
E..... at .@.8.....
0x0010	 7f00 0001 0418 008b cdc9 91a4 cdd3 9a25
...............%
0x0020	 8018 7960 a1b2 0000 0101 080a 0006 77b9
..y`..........w.
0x0030	 0006 77b8 0000 006e ff53 4d42 2500 0000
..w....n.SMB%...
0x0040	 0008 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0100 4302 6400 0100 0e22 0000 0008 0000
..C.d...."......
0x0060	 4400 0000 0000 0000 0000 0022 004c 0000
D..........".L..
0x0070	 006e 0000 002f 005c 5049 5045 5c4c 414e 
.n.../.\PIPE\LAN
0x0080	 4d41 4e00 6800 5772 4c65
68447a004231MAN.h.WrLehDz.B1
0x0090	 3642 4244 7a00 0100 0044 0000 0080 4d59
6BBDz....D....MY
0x00a0	 4752 4f55 5000 	GROUP.

Same question as before !


SMB PACKET: SMBtrans (REPLY)

 (DF)
0x0000	 4500 00b6 03ce 4000 4006 3872 7f00 0001
E..... at .@.8r....
0x0010	 7f00 0001 008b 0418 cdd3 9a25 cdc9 9216
...........%....
0x0020	 8018 7960 a979 0000 0101 080a 0006 77b9
..y`.y........w.
0x0030	 0006 77b9 0000 007e ff53 4d42 2500 0000
..w....~.SMB%...
0x0040	 0088 0100 0000 0000 0000 0000 0000 0000
................
0x0050	 0100 4302 6400 0100 0a08 003e 0000 0008
..C.d......>....
0x0060	 0038 0000 003e 0040 0000 0000 0047 0000
.8...>. at .....G..
0x0070	 0000 0000 0200 0200 4d59 4752 4f55 5000 
........MYGROUP.
0x0080	 0000 0000 0000 0000 0000 0010 0080 3400
..............4.
0x0090	 0000 574f 524b 4752 4f55 5000 0000 0000 
..WORKGROUP.....
0x00a0	 0000 0000 0010 0080 3900 0000 4341 5345
........9...CASE
0x00b0	 0041 4c45 5800 				.ALEX. 

Workgroups and masters !

The problems is that the cifs draft doesn't really explain
how works this exchange with smbtrans. It's written that
smbtrans are used for big packet. But the implementation of
the smbtrans is a bit obscure.
Could you explain to me how it's working (I'm think that
smbTrans is also useful for list, move, remane and delete
fonctions ).
or where I could find the good doc ?
Thanks for your help.

William...




______________________________________________________
Boîte aux lettres - Caramail - http://www.caramail.com



More information about the samba-technical mailing list