Guy Harris wrote:
> On Wed, Feb 26, 2003 at 06:23:02PM +0100, MEYER Laurent wrote:
> > I'm working with X25 protocol and is some cases, other protocols may
> > be found in
> > the payload of X25 CALL REQUEST / CONFIRM PDUs
>
> Is the entire payload something that should be dissected for the
> protocol being used for that X.25 session?
>
In my case yes, in aeronautical protocols, for cost reasons, every byte
of a packet
is used even in connection establishment.
>
> The case you added appears to be the part that handles CALL REQUEST
> payloads that might contain an X.263/ISO 9577 NLPID; is the expectation
> that the PDUs for the protocol running atop X.25 start with the NLPID
> for that protocol?
>
Ouch, you hit me :)
It seems to be the case for :
- clnp
- esis
- isis
- idrp
- sndcf
but not for ip, so I have changed the patch to meet this specification.
Sorry for the misstake !
>
> > So i added this case in packet-x25.c ie :
> >
> > -> a protocol preference entry which asks if we want to decode
> > CALL REQUEST / CONFIRM PDUs payloads
>
> Is there any reason *not* to decode them?
>
Not really in fact, I removed this from the patch too !
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
--- packet-x25.c.orig Wed Feb 26 10:39:49 2003
+++ packet-x25.c Thu Feb 27 14:44:26 2003
@@ -1415,7 +1415,7 @@
guint x25_pkt_len;
int modulo;
guint16 vc;
- dissector_handle_t dissect;
+ dissector_handle_t dissect = NULL;
gboolean toa; /* TOA/NPI address format */
guint16 bytes0_1;
guint8 pkt_type;
@@ -1726,13 +1726,12 @@
if (dissect != NULL)
x25_hash_add_proto_start(vc, pinfo->fd->num, dissect);
}
- }
- if (localoffset < tvb_length(tvb)) {
- if (userdata_tree) {
- proto_tree_add_text(userdata_tree, tvb, localoffset, -1,
- "Data");
- }
- localoffset = tvb_length(tvb);
+ if ((spi == NLPID_ISO8473_CLNP) ||
+ (spi == NLPID_ISO9542_ESIS) ||
+ (spi == NLPID_ISO10589_ISIS) ||
+ (spi == NLPID_ISO10747_IDRP) ||
+ (spi == NLPID_SNDCF))
+ localoffset--;
}
}
break;
@@ -1771,13 +1770,6 @@
if (localoffset < x25_pkt_len) /* facilities */
dump_facilities(x25_tree, &localoffset, tvb);
-
- if (localoffset < tvb_reported_length(tvb)) { /* user data */
- if (x25_tree)
- proto_tree_add_text(x25_tree, tvb, localoffset,
- tvb_reported_length(tvb)-localoffset, "Data");
- localoffset=tvb_reported_length(tvb);
- }
break;
case X25_CLEAR_REQUEST:
switch (dir) {