Difference between revisions of "Server.met file"

From AMule Project FAQ
Jump to: navigation, search
Line 38: Line 38:
  
 
*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 (size depends on [[#Tag_value_types|tag type]])
  
Line 48: Line 48:
 
| '''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 59: Line 59:
 
{|
 
{|
 
|+ 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 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
 
|-
 
|-
| 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|ed2k]] [[network]]
 
|-
 
|-
| ST_UDPFLAGS (''0x92'') || TAGTYPE_UINT32
+
| [http://www.ietf.org/rfc/rfc768.txt UDP] flags (''0x92'') || Unsigned 32 bits number ||
 
|-
 
|-
| ST_AUXPORTSLIST (''0x93'') || TAGTYPE_STRING
+
| Auxiliary [[port]]s list (''0x93'') || String ||
 
|-
 
|-
| ST_LOWIDUSERS (''0x94'') || TAGTYPE_UINT32
+
| [[LowID]] [[client]]s (''0x94'') || Unsigned 32 bits number ||
 
|}
 
|}
  
Line 94: Line 94:
 
{| 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]]
 
|}
 
|}
  

Revision as of 07:37, 28 August 2005

File

Name: server.met

Location: ~/.aMule/

Description

Binary file containing the list of servers known to aMule.

Because its 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 (size depends on tag type)

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 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
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
Auxiliary ports list (0x93) String
LowID clients (0x94) Unsigned 32 bits number

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

More

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