1//
2// This file is part of the aMule Project.
3//
4// Copyright (c) 2003-2011 aMule Team ( admin@amule.org / http://www.amule.org )
5// Copyright (c) 2002-2011 Merkur ( devs@emule-project.net / http://www.emule-project.net )
6//
7// Any parts of this program derived from the xMule, lMule or eMule project,
8// or contributed by third-party developers are copyrighted by their
9// respective authors.
10//
11// This program is free software; you can redistribute it and/or modify
12// it under the terms of the GNU General Public License as published by
13// the Free Software Foundation; either version 2 of the License, or
14// (at your option) any later version.
15//
16// This program is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19// GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program; if not, write to the Free Software
23// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
24//
25
26#ifndef CLIENTTAGS_H
27#define CLIENTTAGS_H
28
29enum client_tags {
30	CT_NAME				= 0x01,
31	CT_SERVER_UDPSEARCH_FLAGS	= 0x0E,
32	CT_PORT				= 0x0F,
33	CT_VERSION			= 0x11,
34	CT_SERVER_FLAGS			= 0x20,	// currently only used to inform a server about supported features
35	CT_EMULECOMPAT_OPTIONS		= 0xEF,
36	CT_EMULE_RESERVED1		= 0xF0,
37	CT_EMULE_RESERVED2		= 0xF1,
38	CT_EMULE_RESERVED3		= 0xF2,
39	CT_EMULE_RESERVED4		= 0xF3,
40	CT_EMULE_RESERVED5		= 0xF4,
41	CT_EMULE_RESERVED6		= 0xF5,
42	CT_EMULE_RESERVED7		= 0xF6,
43	CT_EMULE_RESERVED8		= 0xF7,
44	CT_EMULE_RESERVED9		= 0xF8,
45	CT_EMULE_UDPPORTS		= 0xF9,
46	CT_EMULE_MISCOPTIONS1		= 0xFA,
47	CT_EMULE_VERSION		= 0xFB,
48	CT_EMULE_BUDDYIP		= 0xFC,
49	CT_EMULE_BUDDYUDP		= 0xFD,
50	CT_EMULE_MISCOPTIONS2		= 0xFE,
51	CT_EMULE_RESERVED13		= 0xFF
52};
53
54// Old MuleInfo tags
55enum MuleInfo_tags {
56	ET_COMPRESSION		= 0x20u,
57	ET_UDPPORT		= 0x21u,
58	ET_UDPVER		= 0x22u,
59	ET_SOURCEEXCHANGE	= 0x23u,
60	ET_COMMENTS		= 0x24u,
61	ET_EXTENDEDREQUEST	= 0x25u,
62	ET_COMPATIBLECLIENT	= 0x26u,
63	ET_FEATURES		= 0x27u,	//! bit 0: SecIdent v1 - bit 1: SecIdent v2
64	ET_MOD_VERSION		= 0x55u,
65	// ET_FEATURESET	= 0x54u,	// int - [Bloodymad Featureset] // UNUSED
66	ET_OS_INFO		= 0x94u		// Reused rand tag (MOD_OXY), because the type is unknown
67};
68
69// Server capabilities, values for CT_SERVER_FLAGS
70enum ServerCapabilites {
71	SRVCAP_ZLIB		= 0x0001,
72	SRVCAP_IP_IN_LOGIN	= 0x0002,
73	SRVCAP_AUXPORT		= 0x0004,
74	SRVCAP_NEWTAGS		= 0x0008,
75	SRVCAP_UNICODE		= 0x0010,
76	SRVCAP_LARGEFILES	= 0x0100,
77	SRVCAP_SUPPORTCRYPT	= 0x0200,
78	SRVCAP_REQUESTCRYPT	= 0x0400,
79	SRVCAP_REQUIRECRYPT	= 0x0800
80};
81
82// aMule used to use these names
83#define CAPABLE_ZLIB			SRVCAP_ZLIB
84#define CAPABLE_IP_IN_LOGIN_FRAME	SRVCAP_IP_IN_LOGIN
85#define CAPABLE_AUXPORT			SRVCAP_AUXPORT
86#define CAPABLE_NEWTAGS			SRVCAP_NEWTAGS
87#define CAPABLE_UNICODE			SRVCAP_UNICODE
88#define CAPABLE_LARGEFILES		SRVCAP_LARGEFILES
89
90// Server capabilities, values for CT_SERVER_UDPSEARCH_FLAGS
91enum ServerUDPCapabilities {
92	SRVCAP_UDP_NEWTAGS_LARGEFILES	= 0x01
93};
94
95#endif // CLIENTTAGS_H
96