Ethereal-dev: [ethereal-dev] [sharpe@xxxxxxxxxxxx: [ethereal-cvs] cvs commit: ethereal packet-

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Fri, 8 Sep 2000 02:37:31 -0400
----- Forwarded message from Richard Sharpe <sharpe@xxxxxxxxxxxx> -----

sharpe      2000/09/08 01:19:39 CDT

  Modified files:
    .                    packet-bxxp.c 
  Log:
  I have tvbuffified packet-bxxp.c and started on per-session and per-packet
  state so I can dissect things correctly ...
  
  Will have to clean out all the old non-tvbuff cruft as well.
  
  Boy, I will be glad when we re-do Ethereal and have TCP segment re-assembly under control.
  
  Revision  Changes    Path
  1.2       +249 -100  ethereal/packet-bxxp.c

----- End forwarded message -----

This comment in packet-bxxp.c:

  /* If we have per frame data, use that, else, we must be on the first
   * pass, so we figure it out on the first pass.
   *
   * Since we can't stash info away in a conversation (as they are
   * removed during a filter operation, and we can't rely on the visited
   * flag, as that is set to 0 during a filter, we must save per-frame
   * data for each frame. However, we only need it for requests. Responses
   * are easy to manage.
   */

is no longer true. (Remember that long thread we had...)

During a filter operation, filter_packets() calls
rescan_packets() with redissect == FALSE. That flag is what controls
the removal of state information and resetting of the visited flag:

  if (redissect) {
    /* We need to re-initialize all the state information that protocols
       keep, because some preference that controls a dissector has changed,
       which might cause the state information to be constructed differently
       by that dissector. */

    /* Initialize the table of conversations. */
    conversation_init();

    /* Initialize protocol-specific variables */
    init_all_protocols();
  }
...
    if (redissect) {
      /* Since all state for the frame was destroyed, mark the frame
       * as not visited, and null out the pointer to the per-frame
       * data (the per-frame data itself was freed by
       * "init_all_protocols()"). */
      fdata->flags.visited = 0;
      fdata->pfd = NULL;
    }

--gilbert