PreferencesKad.dat file

From AMule Project FAQ
Revision as of 05:53, 28 August 2005 by 83.42.86.182 (Talk)

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

File

Name: preferencesKad.dat

Location: ~/.aMule/

Description

This file stores the IP and Kademlia ClientID.

Format

The file format is as follows:

  • IP: Stores the [client]]'s IP (4 bytes)
  • Deprecated field: This field is no more used, so it's filled with 0s (2 bytes)
  • ClientID: The client's ClientID (16 bytes)
  • End of tags signal: Old eMule clients expected more info to be read on this file. To remain compatible with those clients, this field is set to 0 (1 byte)

Once this data is put together, it is stored in little-endian.

Example

The following is a hex dump of an hypothetic preferencesKad.dat file:

000000000000C1A3CBE82BBD354A398A7B623E100EBF00

In the above example, the following data can be seen:

  • IP: 0.0.0.0, which means it's not yet set (In hex: 0x00000000)
  • Deprecated field: 0 (In hex: 0x0000)
  • ClientID: C1A3CBE82BBD354A398A7B623E100EBF
  • End of tags signal: 0 (In hex: 0x00)

Extra

aMule ignores the End of tags signal when reading this file, so it is optional to use it. Anyway, aMule does write it to keep compatibility with old eMule clients.