Server.met file

From AMule Project FAQ
Revision as of 07:16, 28 August 2005 by Jacobo221 (Talk | contribs)

Jump to: navigation, search

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 (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

More

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