Difference between revisions of "Part.met.seeds file"

From AMule Project FAQ
Jump to: navigation, search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== File ==
 
== File ==
 
 
'''Name:''' ''*.part.met.seeds''
 
'''Name:''' ''*.part.met.seeds''
  
Line 6: Line 5:
  
 
== Description ==
 
== Description ==
 
+
This [[file]] contains up to 10 [[source]]s for a file in [[aMule]]'s [[download]] [[queue]]. This are known as [[seed]].
This [[file]] contains up to 5 [[source]]s for a file in [[aMule]]'s [[download]] [[queue]]. This are known as [[seed]].
+
  
 
== Format ==
 
== Format ==
 
 
The format of this files is as follows:
 
The format of this files is as follows:
*''Number of sources'' <- Amount of sources that will be listed (8 [[bit]]s unsigned integer)
+
*''Number of sources'' <- Amount of sources that will be listed (8 [[Byte|bit]]s unsigned integer)
 
*For each source it has:
 
*For each source it has:
 
**''Source's ID'' <- The source's [[ID]] (4 [[byte]]s unsigned integer in [[little endian]])
 
**''Source's ID'' <- The source's [[ID]] (4 [[byte]]s unsigned integer in [[little endian]])
 
**''Source's port'' <- The source's [[port]] (2 [[byte]]s unsigned integer in little endian)
 
**''Source's port'' <- The source's [[port]] (2 [[byte]]s unsigned integer in little endian)
 +
*Time the file was written (32 bits unsigned number, [[Unix Epoch]] date)
  
 
The whole file is then written in packets of 2 bytes in [[little endian]].
 
The whole file is then written in packets of 2 bytes in [[little endian]].
  
 
== Example ==
 
== Example ==
 
 
This is the contents of a valid seeds file (after [[endian]]ess conversion to [[big endian]]:
 
This is the contents of a valid seeds file (after [[endian]]ess conversion to [[big endian]]:
  
Line 28: Line 25:
 
Which can be read as:
 
Which can be read as:
  
:''05'' <- 5 sources will be listed (which is the maximum amount of sources aMule allows to list in seeds files)
+
:''05'' <- 5 sources will be listed
 
:''41 65 1C 50'' <- First sources' ID, which, after performing endiannes conversion, becomes ''50 1C 65 41'' in hex and ''1344038209'' in decimal. This corresponds to IP ''80.28.101.65''
 
:''41 65 1C 50'' <- First sources' ID, which, after performing endiannes conversion, becomes ''50 1C 65 41'' in hex and ''1344038209'' in decimal. This corresponds to IP ''80.28.101.65''
 
:''2A 2D'' <- First sources port to communicate is port ''15658'' (since in big endian hex it would be ''2D 2A'')
 
:''2A 2D'' <- First sources port to communicate is port ''15658'' (since in big endian hex it would be ''2D 2A'')
Line 39: Line 36:
 
:''C1 31 3C D5'' <- Fifth source's IP: ''213.60.49.193''
 
:''C1 31 3C D5'' <- Fifth source's IP: ''213.60.49.193''
 
:''D5 30'' <- Fifth source's port: ''12501''
 
:''D5 30'' <- Fifth source's port: ''12501''
 +
 +
Notice this example does not have the last field ("Time the file was written"). This is beacuse it is an v1 format file. See the [[Part.met.seeds_file#Notes|notes]] below to know more about this.
  
 
== Notes ==
 
== Notes ==
 +
*Since from a [[Low ID|LowID]] you cannot tell it's [[IP address|IP]], LowID [[client]]s should never make it into seeds files since it would be impossible to locate them later. So, seeds files only contain [[High ID]] sources.
 +
*aMule limits the amount of sources that can be listed to 10, but the file format could accept up to 255 sources (since the number of sources is told through an 8 bits unsigned integer).
 +
*Read sources are ignored if the file was stored more than two hours ago. The time the file was written field was introduced in file's v2 format. v1 format did not store the time it was stored, so when reading an v1 file it will just read all sources and ignore none.
 +
  
*Since from a [[LowID]] you cannot tell it's [[IP]], LowID [[client]]s should never make it into seeds files since it would be impossible to locate them later. So, seeds files only contain [[HighID]] sources.
+
[[Category:Program Files]]
*aMule limits the amount of sources that can be listed to 5, but the file format could accept up to 255 sources (since the number of sources is told through an 8 bits unsigned integer).
+

Latest revision as of 18:53, 11 January 2011

File

Name: *.part.met.seeds

Location: ~/.aMule/Temp/

Description

This file contains up to 10 sources for a file in aMule's download queue. This are known as seed.

Format

The format of this files is as follows:

  • Number of sources <- Amount of sources that will be listed (8 bits unsigned integer)
  • For each source it has:
    • Source's ID <- The source's ID (4 bytes unsigned integer in little endian)
    • Source's port <- The source's port (2 bytes unsigned integer in little endian)
  • Time the file was written (32 bits unsigned number, Unix Epoch date)

The whole file is then written in packets of 2 bytes in little endian.

Example

This is the contents of a valid seeds file (after endianess conversion to big endian:

05 41 65 1C 50 2A 2D 6E F3 2D 53 36 12 2F F1 CA
51 36 12 BF EA 7E C8 36 12 C1 31 3C D5 D5 30

Which can be read as:

05 <- 5 sources will be listed
41 65 1C 50 <- First sources' ID, which, after performing endiannes conversion, becomes 50 1C 65 41 in hex and 1344038209 in decimal. This corresponds to IP 80.28.101.65
2A 2D <- First sources port to communicate is port 15658 (since in big endian hex it would be 2D 2A)
6E F3 2D 53 <- Second source's IP: 83.45.243.110
36 12 <- Second source's port: 4662
2F F1 CA 51 <- Third source's IP: 81.202.241.47
36 12 <- Third source's port: 4662
BF EA 7E C8 <- Fourth source's IP: 200.126.234.191
36 12 <- Fourth source's port: 4662
C1 31 3C D5 <- Fifth source's IP: 213.60.49.193
D5 30 <- Fifth source's port: 12501

Notice this example does not have the last field ("Time the file was written"). This is beacuse it is an v1 format file. See the notes below to know more about this.

Notes

  • Since from a LowID you cannot tell it's IP, LowID clients should never make it into seeds files since it would be impossible to locate them later. So, seeds files only contain High ID sources.
  • aMule limits the amount of sources that can be listed to 10, but the file format could accept up to 255 sources (since the number of sources is told through an 8 bits unsigned integer).
  • Read sources are ignored if the file was stored more than two hours ago. The time the file was written field was introduced in file's v2 format. v1 format did not store the time it was stored, so when reading an v1 file it will just read all sources and ignore none.