Ethereal-dev: Re: [Ethereal-dev] LDP dissector

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Tue, 28 Nov 2000 18:28:34 -0800 (PST)
> >     I'm trying to code an LDP dissector for Ethereal. LDP uses UDP and TCP
> >packets, not raw ones. Can this be done with a dissector? As far as I read
> >in README.developer, dissectors can only access raw packets. Thanks in
> >advance.
> 
> There are no problems in accessing UDP datagrams and TCP segments within a
> dissector, see packet-tftp.c and packet-pop.c.

Section "1.4.2 Extracting data from packets" should perhaps be made
clearer; it says:

	The "tvb" argument to a dissector points to a buffer containing
	the raw data for the frame.  A tvbuffer is a opaque data
	structure, the internal data structures are hidden and the data
	must be access via the tvbuffer accessors.

but what the tvbuff handed to the dissector contains is the raw data for
the protocol the dissector is handling - the IP dissector is handed a
tvbuff referring to the link-layer payload, i.e.  the IP datagram
*without* the link-layer header, the TCP and UDP dissectors get handed a
tvbuff referring to the IP payload, i.e. the TCP segment or UDP
datagram *without* the IP header, and dissectors for protocols above TCP
or UDP get handed a tvbuff referring to the TCP or UDP payload, i.e. the
data in the TCP segment *without* the TCP header or the data in the UDP
datagram *without* the UDP header.

> However, what is LDP, apart from the Linux Documentation Project?

As per earlier mail from him:

	From: "Armenio Pinto (EST)" <est-a-pinto@xxxxxxxxxxxxx>
	To: ethereal-users@xxxxxxxxxxxx
	Subject: [Ethereal-users] Ethereal Plug-ins.
	Date: Mon, 27 Nov 2000 13:52:20 -0000

	Hi there,

	     Can anyone please tell me where can I find resources about building
	Ethereal plug-ins? I'm trying to bring LDP (Label Distribution Protocol)
	support to Ethereal. Thanks in advance.

	Arménio Pinto - PT Inovação SA, Portugal

it's the Label Distribution Protocol.

I assume the LDP to which he's referring is the one that's part of the
architecture for "multiprotocol label switching":

	http://www.ietf.org/html.charters/mpls-charter.html

which, at least from a quick look at

	http://www.ietf.org/internet-drafts/draft-ietf-mpls-arch-07.txt

"Multiprotocol Label Switching Architecture", involves attaching labels
to frames, where the label can be used to refer to data on the next
router that tells the router where next to send the packet and what
label to put on it for the edification of that subsequent router (and
may also contain QoS information).

It sounds as if the idea is to speed up packet switching by storing some
state information, in routers, about paths through the network for
packet flows, and letting the routers look up the path information from
the label rather than having to look up the source and destination IP
addresses, and other such information, in routing tables.

I seem to remember Cisco discussing a label switching scheme (which I
think they may have patented) a while ago.

The LDP spec is at

	http://www.ietf.org/internet-drafts/draft-ietf-mpls-ldp-11.txt

and is used to let routers tell each other about paths through the
network.