Ethereal-dev: Re: [Ethereal-dev] packet-smb big patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Pia Sahlberg" <piabar@xxxxxxxxxxx>
Date: Mon, 12 Nov 2001 22:39:27 +0000
Hi list, Hi guy,

The following is how the pseudocode should look like.
I think it would work just as well as the conversation stuff
even for clients which reuses mids often.
I think it is simpler and would use much less memory.

(the idea is that if we see a second "duplicate" mid call from the same server-client connection before we have seen a response to the first call then there is not much we can do other than ignoring the first call and assume that the response to that one was never seen. (assuming that all calls with "duplicate" mids between the same server-client is serialized which I belive is reasonable to assume ((not even the existing code can handle Call_1, Call_2, Repsonse_1, Response_2 if the MID's are identical, can it?))
)

if(!pinfo->fd->visited){
   if(request AND response_is_expected){
           if(duplicate_mid_already_exists_in_unmatched_table){
              remove_old_entry_from_unmatched_table
           }
           add_smb_unmatched_to_unmatched_table
       }
   }
   if(response){
       find_request_smb_in_unmatched_table
       if(smb_was_found){
           remove_smb_from_unmatched_table
           insert_smb_in_matched_table
       } else {
           response_is_to_unknown_request
       }
   }
}
if(pinfo->flags->visited){
   find_smb_request/response_in_matched_table
   if(smb_not_found){
       do_as_good_job_as_possible_to_dissect    (identical to what
conversation or anything else must do)
   }
}


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp