Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/gtk decode_as_dlg.c

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

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Dec 2001 02:47:33 -0600 (CST)
guy         2001/12/03 02:47:33 CST

  Modified files:
    gtk                  decode_as_dlg.c 
  Log:
  Get rid of the lists of conversation dissectors; instead, have a
  dissector table contain both a hash table, to use to look up port
  numbers to find a dissector, and a list of all dissectors that *could*
  be assigned to ports in that hash table, to be used by user interface
  code.
  
  Make the "Decode As" dialog box code use that.
  
  Also make it *not* let you choose whether to set the dissector for both
  the UDP and TCP versions of a port; some protocols run only atop TCP,
  some run only atop UDP, and even those that can run atop both may have
  different dissector handles to use over TCP and UDP, so handling a
  single merged list would be a mess.  (If the user is setting the
  dissector for a TCP port, only those protocols that Ethereal can handle
  over TCP should be listed; if the user is setting the dissector for a
  UDP port, only those protocols that Ethereal can handle over TCP should
  be listed; if the user is setting a dissector for both, only those
  protocols that Ethereal can handle over *both* TCP *and* UDP should be
  listed, *and* there needs to be a way to let the "Decode As" code get
  both the TCP handle *and* the UDP handle and use the right ones.  If
  somebody really wants that, they need to implement all of the above if
  they want the code to be correct.)
  
  Fix the code that handles setting the dissection for the IP protocol
  number to correctly update the lists of protocols being dissected as TCP
  and as UDP; the code before this change wasn't updating the single such
  list to add new protocols.
  
  Revision  Changes    Path
  1.15      +168 -231  ethereal/gtk/decode_as_dlg.c