Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 2935] New simulcrypt protocol dissector

Date: Tue, 7 Oct 2008 07:14:58 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2935





--- Comment #7 from David Castleford <david.castleford@xxxxxxxxxxxxxxxxxx>  2008-10-07 07:14:57 PDT ---
(In reply to comment #5)
> Some additional comments:
> 
> 1. Please add the following just before the "This program ..."
>    (You may also add your own copyright notice if desired;
>     See any of the other dissectors for an example).
> 
>  *
>  * $Id$
>  *
>  * Wireshark - Network traffic analyzer
>  * By Gerald Combs <gerald@xxxxxxxxxxxxx>
>  * Copyright 1998 Gerald Combs
>  *
OK
> 

> 2. It doesn't appear that #include <emem.h> is needed.
OK
> 

> 3. The code in  dissect_simulcrypt_message  (starting at about line 684)
>    looks like the indentation needs some clean-up.
Indeed, fixed, thanks.
> 

> 4. The variable data_handle is not used.
Correct, removed.
> 
> 5. is a separate .h file needed ??
Guess not, put things in .c only
> 
> 6. proto_reg_handoff ....
> 
>    I don't understand the purpose of the following:
> 
>         datagram_handle=find_dissector(tab_ecm_inter[i].protocol_name);
>         dissector_delete("tcp.port", tcp_port, datagram_handle);
> 
>    As far as I can see packet-simulcrypt never does a dissector_add(...)
>    on "tcp.port" for ...protocol_name so therefore a dissector_delete(..)
>    shouldn't be required.
> 
> 
>    Could you explain ?
see void proto_reg_handoff_simulcrypt(void) that handles table registering
ca_system_id value and corresponding ecmg (tcp) port used to update values when
preferences are changed.

If preferences are not initialized, default tcp port is set:
(dissector_add("tcp.port", global_simulcrypt_tcp_port, simulcrypt_handle);)

, otherwise dissector_delete the current port: 
dissector_delete("tcp.port", tcp_port, simulcrypt_handle);

and dissector_add the port set in preferences:
dissector_add("tcp.port", global_simulcrypt_tcp_port, simulcrypt_handle);

I believe it works (I used example from existing dissectors).

> 
I have to check the dissector still compiles and works, I'll then make a diff
file and upload to replace the initial version.
Thanks for your help (all of you)


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.