Ethereal-dev: Re: [Ethereal-dev] New dissector: MSDP

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

From: Heikki Vatiainen <hessu@xxxxxxxxx>
Date: 11 Jul 2001 20:28:34 +0300
Guy Harris <guy@xxxxxxxxxx> writes:

> > Some packets, such as packet number 129, contain encapsulated IP
> > packets.
> 
> If this is like PIM, where Register messages contain encapsulated IP
> packets, you might want to do as PIM does, and call
> 
> 	col_set_writable(pinfo->fd, FALSE);
> 
> before calling the IP dissector, so that the information columns reflect
> the MSDP packet rather than the encapsulated packet.

Thanks for the reminder, I forgot that.  Here's the patch, I took the
liberty to borrow your words:

--- packet-msdp.c	2001/07/11 00:59:50	1.1
+++ packet-msdp.c	2001/07/11 17:21:50
@@ -296,6 +296,11 @@
                 enc_tree = proto_item_add_subtree(ei, ett_msdp_sa_enc_data);
 
                 next_tvb = tvb_new_subset(tvb, *offset, -1, -1);
+                /* Set the information columns read-only so that they
+                 * reflect the MSDP packet rather than the
+                 * encapsulated packet.
+                 */
+                col_set_writable(pinfo->fd, FALSE);
                 call_dissector(ip_handle, next_tvb, pinfo, enc_tree);
         }
         *offset += tvb_length_remaining(tvb, *offset);


> >         proto_msdp = proto_register_protocol("Multicast Source Discovery Protocol",
> >             "MSDP", "MSDP");
> 
> That should be
> 
>         proto_msdp = proto_register_protocol("Multicast Source Discovery Protocol",
>             "MSDP", "msdp");
> 
> The third name in a "proto_register_protocol()" is the name used in
> capture filters, and it's a pain if you have to type that name in all
> caps (it's also inconsistent with the names of the fields in the
> protocol, which begin with "msdp").
> 
> I checked it in with the third name being all lower case.

Thanks for catching that too.

-- 
Heikki Vatiainen                  * hessu@xxxxxxxxx
Tampere University of Technology  * Tampere, Finland