Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Francois-Xavier Le Bail via tcpdump-workers
--- Begin Message --- On 05/05/2020 21:44, Gert Doering wrote: >> We should print "PW Ethernet Control Word" and the "Sequence Number", 2 last >> 2 octets of the 4. >> Like: >> PW Ethernet Control Word, Sequence Number xxx > I think we should only print this if "-v" is given. Most of the time,

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Gert Doering via tcpdump-workers
--- Begin Message --- Hi, On Tue, May 05, 2020 at 08:47:04PM +0200, Francois-Xavier Le Bail wrote: > > So, given that the first 16 bits are "4 bit always 0, and 12 bits > > reserved-must-be-set-to-0", using these as heuristics for "if two 0-bytes > > are following the MPLS headers, it's a control

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Francois-Xavier Le Bail via tcpdump-workers
--- Begin Message --- On 05/05/2020 20:45, Francois-Xavier Le Bail via tcpdump-workers wrote: > We should print "PW Ethernet Control Word" and the "Sequence Number", 2 last > 2 octets of the 4. > Like: > PW Ethernet Control Word, Sequence Number xxx Attached patch based on yours. --

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Francois-Xavier Le Bail via tcpdump-workers
--- Begin Message --- On 05/05/2020 20:37, Gert Doering wrote: > Hi, > > On Tue, May 05, 2020 at 07:28:28PM +0200, Francois-Xavier Le Bail wrote: >> On 05/05/2020 12:15, Gert Doering via tcpdump-workers wrote: >>> In my case, there is an MPLS control word before the ethernet header >>> ("

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Gert Doering via tcpdump-workers
--- Begin Message --- Hi, On Tue, May 05, 2020 at 07:28:28PM +0200, Francois-Xavier Le Bail wrote: > On 05/05/2020 12:15, Gert Doering via tcpdump-workers wrote: > > In my case, there is an MPLS control word before the ethernet header > > (" "), and if I skip that and just clear "ethernet

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Gert Doering via tcpdump-workers
--- Begin Message --- Hi, On Tue, May 05, 2020 at 07:24:37PM +0200, Francois-Xavier Le Bail wrote: > Ok, it had DOS line ending format ... Not when I sent it, but who knows which mailer mangled it in surprising and fascinating ways on the path... gert -- "If was one thing all people took for

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Francois-Xavier Le Bail via tcpdump-workers
--- Begin Message --- On 05/05/2020 12:15, Gert Doering via tcpdump-workers wrote: > In my case, there is an MPLS control word before the ethernet header > (" "), and if I skip that and just clear "ethernet in here", I > get nicely printed packets... It seems it is like:

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Francois-Xavier Le Bail via tcpdump-workers
--- Begin Message --- On 05/05/2020 19:17, Gert Doering wrote: > Hi, > > On Tue, May 05, 2020 at 06:45:27PM +0200, Francois-Xavier Le Bail wrote: >>> Attached as well. Not very smart yet, just does "what I need". >> >> Thanks, >> >> Patch for which tcpdump version? > > github checkout, it

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Gert Doering via tcpdump-workers
--- Begin Message --- Hi, On Tue, May 05, 2020 at 06:45:27PM +0200, Francois-Xavier Le Bail wrote: > > Attached as well. Not very smart yet, just does "what I need". > > Thanks, > > Patch for which tcpdump version? github checkout, it identifies itself as tcpdump version 4.10.0-PRE-GIT (git

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Francois-Xavier Le Bail via tcpdump-workers
--- Begin Message --- On 05/05/2020 18:34, Gert Doering wrote: > Hi, > > On Tue, May 05, 2020 at 04:45:04PM +0200, Francois-Xavier Le Bail wrote: >> On 05/05/2020 12:15, Gert Doering via tcpdump-workers wrote: >>> 12:11:46.116238 MPLS (label 105, exp 0, ttl 254) (label 24003, exp 0, [S], >>> ttl

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Gert Doering via tcpdump-workers
--- Begin Message --- Hi, On Tue, May 05, 2020 at 04:45:04PM +0200, Francois-Xavier Le Bail wrote: > On 05/05/2020 12:15, Gert Doering via tcpdump-workers wrote: > > 12:11:46.116238 MPLS (label 105, exp 0, ttl 254) (label 24003, exp 0, [S], > > ttl 254) IP 10.27.99.2 > 10.27.99.34: ICMP echo

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Francois-Xavier Le Bail via tcpdump-workers
--- Begin Message --- On 05/05/2020 12:15, Gert Doering via tcpdump-workers wrote: > 12:11:46.116238 MPLS (label 105, exp 0, ttl 254) (label 24003, exp 0, [S], > ttl 254) IP 10.27.99.2 > 10.27.99.34: ICMP echo request, id 49866, seq 5160, > length 84 > 12:11:46.117107 MPLS (label 24002, exp 0,

Re: [tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Gert Doering via tcpdump-workers
--- Begin Message --- Hi, On Tue, May 05, 2020 at 05:50:40AM -0400, Gert Doering via tcpdump-workers wrote: > Now, the two questions: > > - is there a switch I'm missing to decode packets-in-MPLS? > (like, "packets in GRE" get decoded already) > - if not, is someone already working on it?

[tcpdump-workers] decode MPLS-contained packets?

2020-05-05 Thread Gert Doering via tcpdump-workers
--- Begin Message --- Hi, I need to trace "MPLS-y" stuff between some routers, and wonder if I'm missing tcpdump functionality here, namely "decode packets inside MPLS". I can match on "mpls" or "mpls ", but then I just get a hex dump... 11:13:58.765851 MPLS (label 105, exp 0, ttl 254)