(no subject)
Kenichi Okuyama
okuyamak at dd.iij4u.or.jp
Fri Nov 10 08:00:59 GMT 2000
Dear all, especiall Jeremy (^o^),
I have three questions that I want to know the answer.
1) In ./source/smbd/process.c: switch_message(), we have lookup
against message type -> reply function table, name smb_message[].
But here, instead of simply using lookup table, switch_message()
tries to leniar search the message. WHY? Is there any reason?
( like ... well, table is too big, for example )
If this is nothing more than simply old code and nobody is fixing
is the reason, I'd like to fix it in this weekend, but if this is
with reason, I shouldn't do that.
2) In same ./source/smbd/process.c: process_smb(),
we first wait for "ENTIRE" SMBrequest. Then goes for reply_*()
function branches. This is okay as long as request fits within
single TCP/IP packet, but sometimes, request size will become
more than single TCP/IP packet. And yet, we only need first
4 bytes for jumping into individual reply functions.
This fact tells us that we can first look at first 4 bytes,
jump to individual reply function, then ask for rest of packets.
Rest of the packet might arrive while we're finding out where to
go.
Was there any reason current process_smb() being like we are now,
or is it just that nobody touched it yet.
3) Keep Alive packet which is { 0x85, 0, 0, 0 } is not anywhere
in the reply function entry. Not even named using #define.
Why? Is there some reasons? like ... 0x85 is not LEGAL packet,
but it's there to check aliveness, for example ...????
best regards,
----
Kenichi Okuyama at Tokyo Research Lab. IBM-Japan, Co.
More information about the samba-technical
mailing list