Wireshark-dev: Re: [Wireshark-dev] dissection of packets with unknown format (LDP/MPLS/PWE)
On Mon, Apr 28, 2008 at 3:13 AM, Alexandre Abreu <alxabreu@xxxxxxxxx> wrote:
> Hi.
>
> Has anyone ever found a case where the successful dissection of one
> protocol depends on what was negotiated in another protocol? I've been
to be honest it should work anyway (PW + ethernet):
while (there are labels) {
dissect_labels();
dissect_special_labels();
if (bos)
break;
}
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
ipvers = (tvb_get_guint8(tvb, offset) >> 4) & 0x0F;
if (ipvers == 6) {
call_dissector(ipv6_handle, next_tvb, pinfo, tree);
} else if (ipvers == 4) {
call_dissector(ipv4_handle, next_tvb, pinfo, tree);
} else if (ipvers == 1) {
dissect_mpls_control(next_tvb, pinfo, tree);
} else {
call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
}
if you got control word after PW label and you transport ethernet (nibble 0000)
dissect_mpls_control() should call call_dissector(eth_withoutfcs_handle...).
If you don't have control word you take the else path. If this is not
the case there is a bug.
could you please send a pcap file? I can work on it.
A "Decode this PW as...[eth/TDM/etc]" option was on my wish-list... because you
cannot relay on catching LDP signalling (it might be absent or on a different
physical wire/fiber).
> Tks in advance
you are welcome
> AA
Ciao
FF