samba packet lenght?
Christopher R. Hertel
crh at ubiqx.mn.org
Fri Jun 13 14:44:37 GMT 2008
Start here: http://ubiqx.org/cifs/SMB.html
At the start of each SMB message, there is a four byte header. Under NBT,
seven bits were reserved for flags (and never used, so always zero) so the
length field was 17 bits. For "naked transport", the length is 24 bits.
This four byte header is used to frame the SMB messages in the TCP stream.
RPC (and RAP, etc.) is transported on top of SMB. The framing of the SMB
messages is the same.
atul_s s wrote:
> Hi All,
> I was looking at the samba code and in that there is function in util_sock.c file:
> read_smb_length_return_keepalive(int fd, char *inbuf, unsigned int timeout)
> it basically reads the data from the socket and then computes the lenght as.
> len = smb_len(inbuf);
> smb_len is a macro which computes the lenght using 3 bytes.
> My question is if i am running samba over netbios(on Port 445) then does it denotes the length of samba packet?also will it be different for DCE/RPC i mean will it uses the same 3 bytes to compute the lenght of the packet as it does in this netbios case?
> Thanks for any help.
> Atul Sharma
> Send instant messages to your online friends http://uk.messenger.yahoo.com
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the samba-technical