Clients.met file

From AMule Project FAQ
Revision as of 23:16, 9 March 2005 by 80.224.220.139 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

File

Name: clients.met

Location: ~/.aMule/

Description

This file stores the credits which our client owes other clients.

Format

Previous notes

First of all, have in mind that if there is absolutely anything in this file which doesn't strictly follow it's format rules, the whole file is discarted automatically. So be very carefully when messing around with it.

Also, if the file's version doesn't exactly suit the client's supported version (the client should only support one single version), the whole file will also be discarted.

All numbers in this file are stored in little endian.

Into the format

The format goes as follows:

  • An 8-bits number which specifies the cleints.met version we're using. aMule currently supports version 18 (12 in hexadecimal).
  • A 32-bits number specifying the amount of [[client]s listed in the file.

Each client requires exactly 119 bytes which are organized in the following way:

  • The user's hash, which will be exactly 16 bytes long.
  • The 4 lower bytes of the 8 bytes number which contains the total amount of bytes uploaded to that client.
  • The 4 lower bytes of the 8 bytes number which contains the total amount of bytes downloaded from that client.
  • The Epoch (seconds since '00:00:00 1970-01-01 UTC') date when the client was last identified (requires 4 bytes).
  • The 4 higher bytes of the 8 bytes number which contains the total amount of bytes uploaded to that client.
  • The 4 higher bytes of the 8 bytes number which contains the total amount of bytes downloaded from that client.
  • Two bytes which are set to anything, since they are reserved for future use.
  • A 1-byte number which specifies the size of the client's SecureIdent public hash]
  • Now the SecureIdent hash is placed. It must occupy 80 characters, so if it requires less than 80 characters, the rest must be filled with random data.

Example

Notes

If the backup file (clients.met.BAK) is larger than the current clients.met file, the backup file will not be overriden.

Credits expire when 12960000 seconds (150 days) have passed without seeing that client.

Almost 4,300 million clients can be stored in this file (enough, isn't it?)

Each client is 952 bits (119 bytes) worth ;-)

The maximum size allowed for this file is around 475 GigaBytes (which is way larger the size most filesystems allow for a single file).