Ethereal-dev: Re: [Ethereal-dev] [patch] preference for not subdissecting tcp

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

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Mon, 23 May 2005 10:26:59 -0500
Couldn't this be done with the "Enabled Protocols" preferences?

Florian Lohoff wrote:
> Hi,
> for a PMTUd demonstration website i am working on i just want TCP to be
> dissected. The layers inside just disturb the output so i made this
> little 3liner to stop dissecting inner protocols.
> 
> 
> Index: epan/dissectors/packet-tcp.c
> ===================================================================
> --- epan/dissectors/packet-tcp.c	(revision 14396)
> +++ epan/dissectors/packet-tcp.c	(working copy)
> @@ -49,6 +49,8 @@
>  
>  /* Place TCP summary in proto tree */
>  static gboolean tcp_summary_in_tree = TRUE;
> +/* Dissect TCP protocols */
> +static gboolean tcp_subdissect = TRUE;
>  
>  /*
>   * Flag to control whether to check the TCP checksum.
> @@ -2482,6 +2484,9 @@
>    tvbuff_t *next_tvb;
>    int low_port, high_port;
>  
> +  if (!tcp_subdissect)
> +	  return FALSE;
> +
>    next_tvb = tvb_new_subset(tvb, offset, -1, -1);
>  
>  /* determine if this packet is part of a conversation and call dissector */
> @@ -3390,6 +3395,10 @@
>  	    "Check the validity of the TCP checksum when possible",
>  	    "Whether to check the validity of the TCP checksum",
>  	    &tcp_check_checksum);
> +	prefs_register_bool_preference(tcp_module, "subdissect",
> +	    "Allow subdissectors beeing run",
> +	    "Whether to run subdissector from the tcp dissector",
> +	    &tcp_subdissect);
>  	prefs_register_bool_preference(tcp_module, "desegment_tcp_streams",
>  	    "Allow subdissector to reassemble TCP streams",
>  	    "Whether subdissector can request TCP streams to be reassembled",
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev