| Structure
Name |
Recommended
Data Type |
Use |
| User_max_up_speed |
Unsigned Short, kilobytes |
Track user upload speed |
| User_max_down_speed |
Unsigned Short, kilobytes | Track user download speed |
| User_24h_max_up_kilobytes |
Unsigned Int, kilobytes | Track 24h MB Traffic Uploads |
| User_24h_max_down_kilobytes | Unsigned Int, kilobytes | Track 24h MB Traffic Uploads |
| User_maximum_24h_traffic |
Unsigned Int, kilobytes | Maximum possible observed traffic |
| User_24h_traffic_STDEV_up | Unsigned Byte, Standard Deviation Units |
Should be within 0.15 to 0.05
strictly based on upload speeds. "0.XX" |
| User_24h_traffic_STDEV_down | Unsigned Byte, Standard Deviation Units |
Should be within 0.15 to 0.05
strictly based on upload speeds. "0.XX" |
| Update_Interval |
Already existant |
Hourly updates a good idea |
| Last_Updated |
Signed Long, Unix Time |
64 bit POSTIX Time |
| Record_Expires |
Unsigned Byte, hours |
every 10.6 days, delete record
if inactive |
| Data
structure |
Typical
output |
Byte Cost |
Total Bytes |
| version : unsigned byte; | 0000x for version 0001, always
Binary not ASCII |
1 |
1 |
| message-number : unsigned int;
(32 bits) |
Message number should always go
up in sequence by some fixed rule (+3 for one private tracker vs +11
for another). The message number must restart at zero after each
tracker reboot, after that it is up to the tracker to determine its own
sequence for this accounting message. |
4 |
5 |
file-or-client : char[2]; |
"LL" ('local' file statistical
error); "LR" forces reply message. or "GG" ('global' client statistical error); "GR" forces reply message. |
2 |
7 |
| mode-accounting-failure : char[2]; | "UU" (upload) or "DD" (download)
or "ST" (global client statistics) |
2 |
9 |
| affected-object-hash : unsigned byte[12]; | The first (for uploads) or last
(for downloads) 12 bytes of the SHA-1 hash of the affected file. Always
Binary not ASCII. Must be XORed over "101010101..." (uploads) or
"11001100..." (downloads). Sending the file SHA-1 hash would decrease
the privacy to the protocol. or For global client failures, the Trim[(SHA-1(peer_id)), 12] hash of the client's peer_id, of 20 characters. |
12 |
21 |
| message-crc16-CCITT : short
unsigned int; |
Mandatory. Two bytes. Applies to
the whole message. This field is necessary for the client program to
make a reply. CRC-16-CCITT : x16 + x12 + x5 + 1 |
2 |
23 |
| Data
structure |
Typical
output |
Total Byte Cost |
| version : unsigned byte; | 0000x for version 0001, always
Binary not ASCII |
1 |
| answerback : unsigned int; |
Message number should always go
up or down in sequence by some fixed rule unique to the private tracker
to avoid protocol attacks. By only sending back the CRC of the message
number, acknowledgment is possible and some possible other measures
could be taken by either program or the user or both. Replies should work like this: answerback = crc32K(message-number + message-crc16-CCITT), essentially a 32 bit checksum of a total string of 48 bits the "+" concatenates not adds. The answerback should be computed and stored by the tracker when the accounting error message is issued. CRC-32-Koopan should be used here : x32 + x30 + x29 + x28 + x26 + x20 + x19 + x17 + x16 + x15 + x11 + x10 + x7 + x6 + x4 + x2 + x + 1 |
4 |
| message-crc8-CCITT :
unsigned byte; |
Mandatory. One byte. Applies to
the whole message. This should only be paid attention to if the user is
communicating a low bit rates -- as with dialup modems. CRC-8-CCITT : x8 + x2 + x + 1 |
5 |