BitTorrent Protocol Specification.doc

BitTorrent Protocol Specification.doc - BitTorrent Protocol...

Info icon This preview shows pages 1–6. Sign up to view the full content.

BitTorrent Protocol Specification V 1.0 CSI 5321 Dec 12 2004 Submitted by Arun Chokkalingam & Firasath Riyaz
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
1 Torrent (MetaInfo) File The torrent file contains the information about the file(s) we will be downloading. This is bencoded. 1.1 Bencoding Bencoding is a way to specify the data in a terse format. The below table provides the format for the different types in Bencoding. Type Description Format Example Strings Normal Strings [series of continuous characters] <string length> : <string data> 7:network Represents the string network Integers Normal integers i <integer> e i 3 e represents 3. Lists They are lists of types [strings,I integers, lists, dictionaries]. l <bencoded type> e l 8:advanced7:network e represents the list of two strings: ["advanced", "network"] Dictionaries They are a mapping of keys to values d <bencoded string><bencode d element> e Note: The keys are bencoded strings d 7network:7:csi53216:baylor e
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

1.2 Structure of Torrent(MetaInfo) File a. The following table gives the structure of a single-file torrent [does not have a sub-directory structure]. Key Description Info A dictionary that describes the files - length Length of file in bytes.(integer) -md5sum(optional) A 32 character hexadecimal string corresponding to the MD5 sum of the file. -name The filename of a string(string) -piece length Number of bytes in each piece(integer) -pieces String consisting of the concatenation of all 20-byte SHA1 hash values, one per piece. (raw binary encoded) Announce The announce URL of the tracker Announce-list(optional) This is an extension to the official specification, which is also backwards compatible. This key is used to implement lists of backup trackers. The full specification can be found at - spec.txt. Creation date (optional) The creation time of the torrent, in standard Unix epoch format (integer seconds since 1-Jan-1970 00:00:00 UTC) Comment(optional) Free form text comments.(string) Created by(optional) Name and version of the program used to create.
Image of page 4
b. The following table gives the structure of a mutli-file torrent [having a sub- directory structure]. Key Description Info A dictionary that describes the files ofiles a list of dictionaries, one for each file. Each dictionary in this list contains the following keys - length Length of file in bytes.(integer) -md5sum(optional) A 32 character hexadecimal string corresponding to the MD5 sum of the file. -path a list containing one or more string elements that together represent the path and filename. Each element in the list corresponds to either a directory name or (in the case of the final element) the filename. For example, a the file "dir1/dir2/file.ext" would consist of three string elements: "dir1", "dir2", and "file.ext". oname the name of the top-most directory in the structure -- the directory which contains all of the files listed in the above files list.
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 6
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '15
  • It, BitTorrent, tracker

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern