aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gnutella.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-01-31 00:28:02 +0000
committerGuy Harris <guy@alum.mit.edu>2005-01-31 00:28:02 +0000
commite2089f3d82967dd087f35d6779d80abdc2d73757 (patch)
treef78bd527932c5dc209518e1889312b4c05c9c251 /epan/dissectors/packet-gnutella.h
parenta43da7a4ff7a04591e0b2f2f666de7b83d797b20 (diff)
Add a URL for Gnutella specs.
Don't check, in the dissectors for particular Gnutella packets, whether the packet goes past the end of the tvbuff - let that throw an exception so unreassembled packets are shown as such. Clean up indentation. Boost GNUTELLA_MAX_SNAP_SIZE to 4096 (one Gnutella spec suggests that packets should be < 4K), and use it to 1) clamp the length of packets (so we don't do huge reassembly or have problems when the total packet length, including the header, overflows 32 bits) and 2) check the length of packets before using tcp_dissect_pdus(), to distinguish between packets to be reassembled and a transfer stream. Pass the correct value to tcp_dissect_pdus() as the header length. svn path=/trunk/; revision=13211
Diffstat (limited to 'epan/dissectors/packet-gnutella.h')
-rw-r--r--epan/dissectors/packet-gnutella.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gnutella.h b/epan/dissectors/packet-gnutella.h
index f079595827..64f8b49537 100644
--- a/epan/dissectors/packet-gnutella.h
+++ b/epan/dissectors/packet-gnutella.h
@@ -27,7 +27,15 @@ void proto_register_gnutella(void);
#define GNUTELLA_TCP_PORT 6346
-#define GNUTELLA_MAX_SNAP_SIZE 1500
+/*
+ * Used to determine whether a chunk of data looks like a Gnutella packet
+ * or not - it might be a transfer stream, or it might be part of a
+ * Gnutella packet that starts in an earlier missing TCP segment.
+ *
+ * One Gnutella spec says packets SHOULD be no bigger than 4K, although
+ * that's SHOULD, not MUST.
+ */
+#define GNUTELLA_MAX_SNAP_SIZE 4096
#define GNUTELLA_UNKNOWN_NAME "Unknown"
#define GNUTELLA_PING 0x00