Ethereal-dev: [ethereal-dev] How to add a UDP base protocol

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

From: "Andrew S. Howell" <andy@xxxxxxxxx>
Date: Fri, 02 Jul 1999 23:26:49 +0900

Hello,

	I have a UDP based protocol that we use internally that I
would like to add support for. From what what I gather so far, I have
to:

	- write packet-myproto.[ch]
	- call udp_hash_add(UDP_PORT_MYPROTO, dissect_myproto);

However, the UDP port that is used varies, in fact, I may have a
number of ports running the same protocol. Is there some mechanism for 
saying that port 5678 is of protocol type MYPROTO?

Also, down deeper into MYPROTO, on different ports I have different
subtypes. I would like to say:

	port 5678 type MYPROTO subtype 1
	port 5679 type MYPROTO subtype 2

Thanks,

	Andy