Ethereal-dev: RE: [ethereal-dev] rlogin dissector

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

From: Jeff Foster <jfoste@xxxxxxxxxxxx>
Date: Mon, 10 Apr 2000 08:31:44 -0500
>> I will need changes to the tcp and udp code so these dissectors can call
the tcp/udp
>> sub-dissector lookup routines.  I plan to separate the tcp and udp sub-
>> dissector lookup routines into standalone functions so they can be called
>> from the outside.
>
>I.e., the moral equivalent of "ethertype()", but to allow arbitrary
>dissectors to switch on TCP or UDP ports rather than on Ethernet type?

The socks protocol needs to call the TCP sub-dissectors but the packet
doesn't 
have any TCP header information; so I can't just call the dissect_tcp
routine.

The new routine will have this prototype -

void decode_tcp_port( const u_char *pd, int offset, frame_data *fd,
proto_tree *tree,
guint32 srcport, guint32 dstport);

In the socks dissector I change the source/destination port in the pi 
structure and call decode_tcp_port.  Then I restore the source/destination
port.
I could probably skip changing the pi structure, but did so to be safe.


Jeff Foster
jfoste@xxxxxxxxxxxx