Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

packet-gnutella.h
1 /* packet-gnutella.h
2 * Declarations for gnutella dissection
3 * Copyright 2001, B. Johannessen <bob@havoq.com>
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12 #define GNUTELLA_TCP_PORT 6346
13
14 /*
15 * Used to determine whether a chunk of data looks like a Gnutella packet
16 * or not - it might be a transfer stream, or it might be part of a
17 * Gnutella packet that starts in an earlier missing TCP segment.
18 *
19 * One Gnutella spec says packets SHOULD be no bigger than 4K, although
20 * that's SHOULD, not MUST.
21 */
22 #define GNUTELLA_MAX_SNAP_SIZE 4096
23
24 #define GNUTELLA_UNKNOWN_NAME "Unknown"
25 #define GNUTELLA_PING 0x00
26 #define GNUTELLA_PING_NAME "Ping"
27 #define GNUTELLA_PONG 0x01
28 #define GNUTELLA_PONG_NAME "Pong"
29 #define GNUTELLA_PUSH 0x40
30 #define GNUTELLA_PUSH_NAME "Push"
31 #define GNUTELLA_QUERY 0x80
32 #define GNUTELLA_QUERY_NAME "Query"
33 #define GNUTELLA_QUERYHIT 0x81
34 #define GNUTELLA_QUERYHIT_NAME "QueryHit"
35
36 #define GNUTELLA_HEADER_LENGTH 23
37 #define GNUTELLA_SERVENT_ID_LENGTH 16
38 #define GNUTELLA_PORT_LENGTH 2
39 #define GNUTELLA_IP_LENGTH 4
40 #define GNUTELLA_LONG_LENGTH 4
41 #define GNUTELLA_SHORT_LENGTH 2
42 #define GNUTELLA_BYTE_LENGTH 1
43
44 #define GNUTELLA_PONG_LENGTH 14
45 #define GNUTELLA_PONG_PORT_OFFSET 0
46 #define GNUTELLA_PONG_IP_OFFSET 2
47 #define GNUTELLA_PONG_FILES_OFFSET 6
48 #define GNUTELLA_PONG_KBYTES_OFFSET 10
49
50 #define GNUTELLA_QUERY_SPEED_OFFSET 0
51 #define GNUTELLA_QUERY_SEARCH_OFFSET 2
52
53 #define GNUTELLA_QUERYHIT_HEADER_LENGTH 11
54 #define GNUTELLA_QUERYHIT_COUNT_OFFSET 0
55 #define GNUTELLA_QUERYHIT_PORT_OFFSET 1
56 #define GNUTELLA_QUERYHIT_IP_OFFSET 3
57 #define GNUTELLA_QUERYHIT_SPEED_OFFSET 7
58 #define GNUTELLA_QUERYHIT_FIRST_HIT_OFFSET 11
59 #define GNUTELLA_QUERYHIT_HIT_INDEX_OFFSET 0
60 #define GNUTELLA_QUERYHIT_HIT_SIZE_OFFSET 4
61 #define GNUTELLA_QUERYHIT_END_OF_STRING_LENGTH 2
62
63 #define GNUTELLA_PUSH_SERVENT_ID_OFFSET 0
64 #define GNUTELLA_PUSH_INDEX_OFFSET 16
65 #define GNUTELLA_PUSH_IP_OFFSET 20
66 #define GNUTELLA_PUSH_PORT_OFFSET 24
67
68 #define GNUTELLA_HEADER_ID_OFFSET 0
69 #define GNUTELLA_HEADER_PAYLOAD_OFFSET 16
70 #define GNUTELLA_HEADER_TTL_OFFSET 17
71 #define GNUTELLA_HEADER_HOPS_OFFSET 18
72 #define GNUTELLA_HEADER_SIZE_OFFSET 19