Difference between revisions of "Server.met file"

From AMule Project FAQ
Jump to: navigation, search
 
(18 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
== File ==
 
== File ==
 
 
'''Name:''' ''server.met''
 
'''Name:''' ''server.met''
  
Line 6: Line 5:
  
 
== Description ==
 
== Description ==
 
 
Binary file containing the list of [[server]]s known to [[aMule]].
 
Binary file containing the list of [[server]]s known to [[aMule]].
  
Because its in binary format, it must be changed within [[aMule]], or with other appropriate tools.
+
Because it's in binary format, it must be changed within [[aMule]], or with other appropriate tools.
  
 
The format description below is for development information purposes.
 
The format description below is for development information purposes.
  
 
== Format ==
 
== Format ==
 
 
=== File Format ===
 
=== File Format ===
 
 
This file's fields are written in [[little endian]] order.
 
This file's fields are written in [[little endian]] order.
  
Line 24: Line 20:
 
*Server Count (4 Bytes): Lists the number of [[server]]s that follow
 
*Server Count (4 Bytes): Lists the number of [[server]]s that follow
 
*Block of servers: Each [[server]] is constituted by the following fields:
 
*Block of servers: Each [[server]] is constituted by the following fields:
**[[Server]] [[IP]] (4 Bytes): Simply that. The [[server]]'s [[IP]].
+
**[[Server]] [[IP address|IP]] (4 Bytes): Simply that. The [[server]]'s [[IP address|IP]].
 
**[[Server]] [[Port]] (2 Bytes):  Simply that. The [[port]] through which [[aMule]] will connect to the [[server]].
 
**[[Server]] [[Port]] (2 Bytes):  Simply that. The [[port]] through which [[aMule]] will connect to the [[server]].
 
**Tag Count (4 Bytes): Lists the number of [[server]] tags that follows.
 
**Tag Count (4 Bytes): Lists the number of [[server]] tags that follows.
Line 30: Line 26:
  
 
=== Tags Format ===
 
=== Tags Format ===
 
 
==== General tags format ====
 
==== General tags format ====
 
 
There are two tag identifiers: A name (string) and an ID (1 Byte)
 
There are two tag identifiers: A name (string) and an ID (1 Byte)
  
Line 38: Line 32:
  
 
*Tag value type (1 Byte)
 
*Tag value type (1 Byte)
*Tag Name Length (2 Bytes)
+
*Tag name length (2 Bytes)
*Tag Name (size given above)
+
*Tag name (size given above)
*Tag value (size depends on [[#Tag_value_types|tag type]])
+
*Tag value length (2 Bytes) (Only when the value is a string)
 +
*Tag value (if the value is a string, it's size is given in the above field. If it is not a string, the size depends on the type of value it is)
  
 
==== Tag value types ====
 
==== Tag value types ====
 
 
{|
 
{|
 
|+ Tag types
 
|+ Tag types
 
| '''Tag type (''Code'')'''  || '''Explanation'''
 
| '''Tag type (''Code'')'''  || '''Explanation'''
 
|-
 
|-
| TAGTYPE_STRING (''0x02'') (*) || Defines a string tag.  
+
| String (''0x02'') (*) || Defines a string tag.  
 
|-
 
|-
| TAGTYPE_UINT32 (''0x03'') || Defines a numeric tag.
+
| Unsigned 32 bits number (''0x03'') || Defines a numeric tag.
 
|}
 
|}
  
Line 56: Line 50:
  
 
==== Tag IDs ====
 
==== Tag IDs ====
 
 
{|
 
{|
 
|+ Tag IDs
 
|+ Tag IDs
| ''ID ('''code''')'' || ''Tag value type''
+
| ''ID ('''code''')'' || ''Tag value type'' || ''Description''
 
|-
 
|-
| ST_SERVERNAME (''0x01'') || TAGTYPE_STRING
+
| ServerName (''0x01'') || String || Name of the [[server]]
 
|-
 
|-
| ST_DESCRIPTION (''0x0B'') || TAGTYPE_STRING
+
| Description (''0x0B'') || String || Short description about the server
 
|-
 
|-
| ST_PING (''0x0C'') || TAGTYPE_UINT32
+
| Ping (''0x0C'') || Unsigned 32 bits number || Time (in ms) it takes to comunicate with the server
 
|-
 
|-
| ST_FAIL (''0x0D'') || TAGTYPE_UINT32
+
| Fail (''0x0D'') || Unsigned 32 bits number || How many times [[connect]]ing to the server failed
 
|-
 
|-
| ST_PREFERENCE (''0x0E'') || TAGTYPE_UINT32
+
| Preference (''0x0E'') || Unsigned 32 bits number || Priority given to this server among the others (Normal=''0'', High=''1'', Low=''2'')
 
|-
 
|-
| ST_DYNIP (''0x85'') || TAGTYPE_STRING
+
| DNS (''0x85'') || String || [http://en.wikipedia.org/wiki/DNS DNS] of the server
 
|-
 
|-
| ST_MAXUSERS (''0x87'') || TAGTYPE_UINT32
+
| Max users (''0x87'') || Unsigned 32 bits number || Maximum number of users the server allows to simoultaneously connect to it
 
|-
 
|-
| ST_SOFTFILES (''0x88'') || TAGTYPE_UINT32
+
| Soft files (''0x88'') || Unsigned 32 bits number || [[Soft files]] number
 
|-
 
|-
| ST_HARDFILES (''0x89'') || TAGTYPE_UINT32
+
| Hard files (''0x89'') || Unsigned 32 bits number || [[Hard files]] number
 
|-
 
|-
| ST_LASTPING (''0x90'') || TAGTYPE_UINT32
+
| Last ping (''0x90'') || Unsigned 32 bits number || Last time the server was [[ping]]ed
 
|-
 
|-
| ST_VERSION (''0x91'') || TAGTYPE_STRING / TAGTYPE_UINT32
+
| Version (''0x91'') || String / Unsigned 32 bits number || Version and name of the software the server is running to support the [[FAQ_eD2k-Kademlia|ed2k]] [[network]]
 
|-
 
|-
| ST_UDPFLAGS (''0x92'') || TAGTYPE_UINT32
+
| [http://www.ietf.org/rfc/rfc768.txt UDP] flags (''0x92'') || Unsigned 32 bits number || Informs of the actions the server accepts through [http://www.ietf.org/rfc/rfc768.txt UDP] connections. This flags are:
 +
*''0x01'': Get sources
 +
*''0x02'': Get files
 +
*''0x08'': New tags
 +
*''0x10'': Unicode
 +
*''0x20'': Get extended sources info
 
|-
 
|-
| ST_AUXPORTSLIST (''0x93'') || TAGTYPE_STRING
+
| Auxiliary [[port]]s list (''0x93'') || String || Some servers have [[How_to_use_auxiliary_server_ports|additional ports]] open for those [[user]]s who cannot connect to the standard one (usually because they have a firewall which tries to stop [[P2P]] connections). This servers tell in this field which additional ports they have open. Each additional port is separated from the others by a coma ('','').
 
|-
 
|-
| ST_LOWIDUSERS (''0x94'') || TAGTYPE_UINT32
+
| [[Low ID|LowID]] [[client]]s (''0x94'') || Unsigned 32 bits number || Number of users connected with a LowID
 
|}
 
|}
  
 
==== Tag Names ====
 
==== Tag Names ====
 
 
{| border=0
 
{| border=0
 
|+ There are at the moment two tag names recognized by [[aMule]]:
 
|+ There are at the moment two tag names recognized by [[aMule]]:
| width="100px" | '''Tag Name''' || '''Tag Value'''
+
| width="100px" | ''Tag Name'' || ''Tag Value''
 
|-
 
|-
| "files" || TAGTYPE_UINT32 || Shows the number of [[file]]s registered in the [[server]]
+
| "files" || Unsigned 32 bits number || Shows the number of [[file]]s registered in the [[server]]
 
|-
 
|-
|"users" || TAGTYPE_UINT32 || Shows the number of [[user]]s registered in the [[server]]
+
|"users" || Unsigned 32 bits number || Shows the number of [[user]]s registered in the [[server]]
 
|}
 
|}
  
 
== Example ==
 
== Example ==
 +
The following is an example file:
  
 +
''E00200000050EFC86CB80B0C000000020100010A004269472042616E4720390201000B0E0077''
 +
''77772E42694742616E472E746F0305007573657273EF1A010003050066696C657331DC8C0003''
 +
''01000C9C00000003010090332B114303010087E0930400030100888813000003010089102700''
 +
''0002010091040031372E3603010092FB0000000301009474580000428722C64E200C00000002''
 +
''0100011E003E3E3E2A2A2A5757572E534558455345584F5345582E434F4D2A2A2A2020''
  
 +
Here goes the explanation of the file:
 +
 +
*''E0'' <- Validation initial value
 +
*''02000000'' <- ''2'' servers will be listed (remember its [[little endian]])
 +
*Server #1:
 +
**''50EFC86C'' <- [[IP address|IP]]: ''108.200.239.80'' (remember its [[little endian]]) endian]])
 +
**''B80B'' <- [[Port]]: ''3000'' (remember its [[little endian]])
 +
**''0C000000'' <- ''12'' tags (remember its [[little endian]])
 +
**Tag #1
 +
***''02'' <- Tag type ''2'' (String)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''01'' <- Tag name: ''1'' (Server name)
 +
***''0A00'' <- Tag value length: ''10'' (remember its [[little endian]])
 +
***''4269472042616E472039'' <- Tag value: ''BiG BanG 9'' (server name)
 +
**Tag #2
 +
***''02'' <- Tag type ''2'' (String)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''0B'' <- Tag name: ''0B'' (Description)
 +
***''0E00'' <- Tag value length: ''14'' (remember its [[little endian]])
 +
***''7777772E42694742616E472E746F'' <- Tag value: ''www.BiGBanG.to'' (server description)
 +
**Tag #3
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0500'' <- Tag name length: ''5'' (remember its [[little endian]])
 +
***''7573657273'' <- Tag name: ''users'' (this is a string, not a code)
 +
***''EF1A0100'' <- Tag value: ''72431'' (remember its [[little endian]])
 +
**Tag #4
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0500'' <- Tag name length: ''5'' (remember its [[little endian]])
 +
***''66696C6573'' <- Tag name: ''files'' (this is a string, not a code)
 +
***''31DC8C00'' <- Tag value: ''9231409'' (remember its [[little endian]])
 +
**Tag #5
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''0C'' <- Tag name: ''0C'' (Ping)
 +
***''9C000000'' <- Tag value: ''156'' (ping time in ms)
 +
**Tag #6
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''90'' <- Tag name: ''90'' (Last ping)
 +
***''332B1143'' <- Tag value: ''5:10:43 28/08/2005'' (last time the server was pinged)
 +
**Tag #7
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''87'' <- Tag name: ''87'' (Max users)
 +
***''E0930400'' <- Tag value: ''300000'' (max users)
 +
**Tag #8
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''88'' <- Tag name: ''88'' (Soft files)
 +
***''88130000'' <- Tag value: ''5000'' (soft files)
 +
**Tag #9
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''89'' <- Tag name: ''89'' (Hard files)
 +
***''10270000'' <- Tag value: ''10000'' (hard files)
 +
**Tag #10
 +
***''02'' <- Tag type ''2'' (String)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''91'' <- Tag name: ''91'' (Version)
 +
***''0400'' <- Tag value length: ''4'' (remember its [[little endian]])
 +
***''31372E36'' <- Tag value: ''17.6'' (version)
 +
**Tag #11
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''92'' <- Tag name: ''92'' ([http://www.ietf.org/rfc/rfc768.txt UDP] flags)
 +
***''FB000000'' <- Tag value (in binnary, only the least valuable byte): ''11111001'' ([http://www.ietf.org/rfc/rfc768.txt UDP] flags: get sources, new tags, unicode, extended sources)
 +
**Tag #11
 +
***''03'' <- Tag type ''3'' (Unsigned 32 bits number)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''94'' <- Tag name: ''94'' (LowID users)
 +
***''74580000'' <- Tag value: ''22644'' (LowID users)
 +
*Server #2
 +
**''428722C6'' <- [[IP address|IP]]: ''198.34.135.66'' (remember its [[little endian]])
 +
**''4E20'' <- [[Port]]: ''8270'' (remember its [[little endian]])
 +
**''01000000'' <- ''1'' tag (remember its [[little endian]])
 +
**Tag #1
 +
***''02'' <- Tag type ''2'' (String)
 +
***''0100'' <- Tag name length: ''1'' (remember its [[little endian]])
 +
***''01'' <- Tag name: ''1'' (Server name)
 +
***''1E00'' <- Tag value length: ''30'' (remember its [[little endian]])
 +
***''3E3E3E2A2A2A5757572E534558455345584F5345582E434F4D2A2A2A2020'' <- Tag value: ''***WWW.EXAMPLE.COM***  '' (server name)
  
 
== More ==
 
== More ==
 +
For more information on tags used in [[eMule]] [[AMule_files|files]] and protocol, check the [http://hydranode.com/docs/ed2k/ed2k-tag.php ed2k tag documentation] at the [http://hydranode.com Hydranode project].
 +
  
For more information on tags used in files and emule protocol, check the [http://hydranode.com/docs/ed2k/ed2k-tag.php ed2k tag documentation] at the [http://hydranode.com Hidranode project].
+
[[Category:Program Files]]

Latest revision as of 18:50, 11 January 2011

File

Name: server.met

Location: ~/.aMule/

Description

Binary file containing the list of servers known to aMule.

Because it's in binary format, it must be changed within aMule, or with other appropriate tools.

The format description below is for development information purposes.

Format

File Format

This file's fields are written in little endian order.

Note: All digit fields are unsigned unless stated.

  • Met Header (1 Byte): With value Ox0E or OxE0, and is used in aMule to check for valid server.met files
  • Server Count (4 Bytes): Lists the number of servers that follow
  • Block of servers: Each server is constituted by the following fields:
    • Server IP (4 Bytes): Simply that. The server's IP.
    • Server Port (2 Bytes): Simply that. The port through which aMule will connect to the server.
    • Tag Count (4 Bytes): Lists the number of server tags that follows.
    • Block of Tags: Each server can have a list of associated tags with the format bellow.

Tags Format

General tags format

There are two tag identifiers: A name (string) and an ID (1 Byte)

Which one is used depends on the tag value type given or on the size of the tag name. If tag name length is 1, an ID is used.

  • Tag value type (1 Byte)
  • Tag name length (2 Bytes)
  • Tag name (size given above)
  • Tag value length (2 Bytes) (Only when the value is a string)
  • Tag value (if the value is a string, it's size is given in the above field. If it is not a string, the size depends on the type of value it is)

Tag value types

Tag types
Tag type (Code) Explanation
String (0x02) (*) Defines a string tag.
Unsigned 32 bits number (0x03) Defines a numeric tag.

(*): Systems with Unicode enabled have the same tag string defined twice, the first in Unicode, and the second in plain ASCII, which will be ignored by Unicode enabled clients, and used by non-Unicode ones.

Tag IDs

Tag IDs
ID (code) Tag value type Description
ServerName (0x01) String Name of the server
Description (0x0B) String Short description about the server
Ping (0x0C) Unsigned 32 bits number Time (in ms) it takes to comunicate with the server
Fail (0x0D) Unsigned 32 bits number How many times connecting to the server failed
Preference (0x0E) Unsigned 32 bits number Priority given to this server among the others (Normal=0, High=1, Low=2)
DNS (0x85) String DNS of the server
Max users (0x87) Unsigned 32 bits number Maximum number of users the server allows to simoultaneously connect to it
Soft files (0x88) Unsigned 32 bits number Soft files number
Hard files (0x89) Unsigned 32 bits number Hard files number
Last ping (0x90) Unsigned 32 bits number Last time the server was pinged
Version (0x91) String / Unsigned 32 bits number Version and name of the software the server is running to support the ed2k network
UDP flags (0x92) Unsigned 32 bits number Informs of the actions the server accepts through UDP connections. This flags are:
  • 0x01: Get sources
  • 0x02: Get files
  • 0x08: New tags
  • 0x10: Unicode
  • 0x20: Get extended sources info
Auxiliary ports list (0x93) String Some servers have additional ports open for those users who cannot connect to the standard one (usually because they have a firewall which tries to stop P2P connections). This servers tell in this field which additional ports they have open. Each additional port is separated from the others by a coma (,).
LowID clients (0x94) Unsigned 32 bits number Number of users connected with a LowID

Tag Names

There are at the moment two tag names recognized by aMule:
Tag Name Tag Value
"files" Unsigned 32 bits number Shows the number of files registered in the server
"users" Unsigned 32 bits number Shows the number of users registered in the server

Example

The following is an example file:

E00200000050EFC86CB80B0C000000020100010A004269472042616E4720390201000B0E0077 77772E42694742616E472E746F0305007573657273EF1A010003050066696C657331DC8C0003 01000C9C00000003010090332B114303010087E0930400030100888813000003010089102700 0002010091040031372E3603010092FB0000000301009474580000428722C64E200C00000002 0100011E003E3E3E2A2A2A5757572E534558455345584F5345582E434F4D2A2A2A2020

Here goes the explanation of the file:

  • E0 <- Validation initial value
  • 02000000 <- 2 servers will be listed (remember its little endian)
  • Server #1:
    • 50EFC86C <- IP: 108.200.239.80 (remember its little endian) endian]])
    • B80B <- Port: 3000 (remember its little endian)
    • 0C000000 <- 12 tags (remember its little endian)
    • Tag #1
      • 02 <- Tag type 2 (String)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 01 <- Tag name: 1 (Server name)
      • 0A00 <- Tag value length: 10 (remember its little endian)
      • 4269472042616E472039 <- Tag value: BiG BanG 9 (server name)
    • Tag #2
      • 02 <- Tag type 2 (String)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 0B <- Tag name: 0B (Description)
      • 0E00 <- Tag value length: 14 (remember its little endian)
      • 7777772E42694742616E472E746F <- Tag value: www.BiGBanG.to (server description)
    • Tag #3
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0500 <- Tag name length: 5 (remember its little endian)
      • 7573657273 <- Tag name: users (this is a string, not a code)
      • EF1A0100 <- Tag value: 72431 (remember its little endian)
    • Tag #4
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0500 <- Tag name length: 5 (remember its little endian)
      • 66696C6573 <- Tag name: files (this is a string, not a code)
      • 31DC8C00 <- Tag value: 9231409 (remember its little endian)
    • Tag #5
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 0C <- Tag name: 0C (Ping)
      • 9C000000 <- Tag value: 156 (ping time in ms)
    • Tag #6
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 90 <- Tag name: 90 (Last ping)
      • 332B1143 <- Tag value: 5:10:43 28/08/2005 (last time the server was pinged)
    • Tag #7
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 87 <- Tag name: 87 (Max users)
      • E0930400 <- Tag value: 300000 (max users)
    • Tag #8
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 88 <- Tag name: 88 (Soft files)
      • 88130000 <- Tag value: 5000 (soft files)
    • Tag #9
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 89 <- Tag name: 89 (Hard files)
      • 10270000 <- Tag value: 10000 (hard files)
    • Tag #10
      • 02 <- Tag type 2 (String)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 91 <- Tag name: 91 (Version)
      • 0400 <- Tag value length: 4 (remember its little endian)
      • 31372E36 <- Tag value: 17.6 (version)
    • Tag #11
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 92 <- Tag name: 92 (UDP flags)
      • FB000000 <- Tag value (in binnary, only the least valuable byte): 11111001 (UDP flags: get sources, new tags, unicode, extended sources)
    • Tag #11
      • 03 <- Tag type 3 (Unsigned 32 bits number)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 94 <- Tag name: 94 (LowID users)
      • 74580000 <- Tag value: 22644 (LowID users)
  • Server #2
    • 428722C6 <- IP: 198.34.135.66 (remember its little endian)
    • 4E20 <- Port: 8270 (remember its little endian)
    • 01000000 <- 1 tag (remember its little endian)
    • Tag #1
      • 02 <- Tag type 2 (String)
      • 0100 <- Tag name length: 1 (remember its little endian)
      • 01 <- Tag name: 1 (Server name)
      • 1E00 <- Tag value length: 30 (remember its little endian)
      • 3E3E3E2A2A2A5757572E534558455345584F5345582E434F4D2A2A2A2020 <- Tag value: ***WWW.EXAMPLE.COM*** (server name)

More

For more information on tags used in eMule files and protocol, check the ed2k tag documentation at the Hydranode project.