/_SolutionItems_/Documents/BitTorrentSpecification - TheoryOrg.mht
Unknown | 6548 lines | 6497 code | 51 blank | 0 comment | 0 complexity | 3e35ac6feb90327a6c4170a32cd0a36c MD5 | raw file
- From: "Saved by Windows Internet Explorer 9"
- Subject: BitTorrentSpecification - TheoryOrg
- Date: Thu, 8 Sep 2011 06:20:06 +0800
- MIME-Version: 1.0
- Content-Type: multipart/related;
- type="text/html";
- boundary="----=_NextPart_000_0000_01CC6DEF.5A1D4220"
- X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609
-
- This is a multi-part message in MIME format.
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: text/html;
- charset="utf-8"
- Content-Transfer-Encoding: quoted-printable
- Content-Location: http://wiki.theory.org/BitTorrentSpecification
-
- =EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" =
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><HTML=20
- dir=3D"ltr" lang=3D"en"><HEAD><TITLE>BitTorrentSpecification - =
- TheoryOrg</TITLE>
- <META content=3D"text/html; charset=3Dutf-8" =
- http-equiv=3D"Content-Type">
- <META name=3D"GENERATOR" content=3D"MSHTML 9.00.8112.16434"><LINK =
- rel=3D"shortcut icon"=20
- href=3D"/favicon.ico"><LINK title=3D"TheoryOrg (en)" rel=3D"search" =
- type=3D"application/opensearchdescription+xml"=20
- href=3D"/opensearch_desc.php"><LINK title=3D"Creative Commons" =
- rel=3D"meta" type=3D"application/rdf+xml"=20
- href=3D"/index.php?title=3DBitTorrentSpecification&action=3Dcreativec=
- ommons"><LINK=20
- rel=3D"copyright" =
- href=3D"http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt">
- <LINK title=3D"TheoryOrg Atom feed" rel=3D"alternate" =
- type=3D"application/atom+xml"=20
- href=3D"/index.php?title=3DSpecial:RecentChanges&feed=3Datom"><LINK =
- rel=3D"stylesheet"=20
- href=3D"http://wiki.theory.org/skins/common/shared.css?270" =
- media=3D"screen"><LINK=20
- rel=3D"stylesheet" =
- href=3D"http://wiki.theory.org/skins/common/commonPrint.css?270"=20
- media=3D"print"><LINK rel=3D"stylesheet" =
- href=3D"http://wiki.theory.org/skins/monobook/main.css?270"=20
- media=3D"screen"><!--[if lt IE 5.5000]><link rel=3D"stylesheet" =
- href=3D"/skins/monobook/IE50Fixes.css?270" media=3D"screen" =
- /><![endif]--><!--[if IE 5.5000]><link rel=3D"stylesheet" =
- href=3D"/skins/monobook/IE55Fixes.css?270" media=3D"screen" =
- /><![endif]--><!--[if IE 6]><link rel=3D"stylesheet" =
- href=3D"/skins/monobook/IE60Fixes.css?270" media=3D"screen" =
- /><![endif]--><!--[if IE 7]><link rel=3D"stylesheet" =
- href=3D"/skins/monobook/IE70Fixes.css?270" media=3D"screen" =
- /><![endif]-->
- <LINK rel=3D"stylesheet" =
- href=3D"/index.php?title=3DMediaWiki:Common.css&usemsgcache=3Dyes&=
- ;ctype=3Dtext%2Fcss&smaxage=3D18000&action=3Draw&maxage=3D180=
- 00">
- <LINK rel=3D"stylesheet" =
- href=3D"/index.php?title=3DMediaWiki:Print.css&usemsgcache=3Dyes&=
- ctype=3Dtext%2Fcss&smaxage=3D18000&action=3Draw&maxage=3D1800=
- 0"=20
- media=3D"print"><LINK rel=3D"stylesheet" =
- href=3D"/index.php?title=3DMediaWiki:Monobook.css&usemsgcache=3Dyes&a=
- mp;ctype=3Dtext%2Fcss&smaxage=3D18000&action=3Draw&maxage=3D1=
- 8000">
- <LINK rel=3D"stylesheet" =
- href=3D"http://wiki.theory.org/index.php?title=3D-&action=3Draw&m=
- axage=3D18000&gen=3Dcss">
- <SCRIPT>=0A=
- var skin=3D"monobook",=0A=
- stylepath=3D"/skins",=0A=
- wgUrlProtocols=3D"http\\:\\/\\/|https\\:\\/\\/|ftp\\:\\/\\/|irc\\:\\/\\/|=
- gopher\\:\\/\\/|telnet\\:\\/\\/|nntp\\:\\/\\/|worldwind\\:\\/\\/|mailto\\=
- :|news\\:|svn\\:\\/\\/",=0A=
- wgArticlePath=3D"/$1",=0A=
- wgScriptPath=3D"",=0A=
- wgScriptExtension=3D".php",=0A=
- wgScript=3D"/index.php",=0A=
- wgVariantArticlePath=3Dfalse,=0A=
- wgActionPaths=3D{},=0A=
- wgServer=3D"http://wiki.theory.org",=0A=
- wgCanonicalNamespace=3D"",=0A=
- wgCanonicalSpecialPageName=3Dfalse,=0A=
- wgNamespaceNumber=3D0,=0A=
- wgPageName=3D"BitTorrentSpecification",=0A=
- wgTitle=3D"BitTorrentSpecification",=0A=
- wgAction=3D"view",=0A=
- wgArticleId=3D1427,=0A=
- wgIsArticle=3Dtrue,=0A=
- wgUserName=3Dnull,=0A=
- wgUserGroups=3Dnull,=0A=
- wgUserLanguage=3D"en",=0A=
- wgContentLanguage=3D"en",=0A=
- wgBreakFrames=3Dfalse,=0A=
- wgCurRevisionId=3D4218,=0A=
- wgVersion=3D"1.16.5",=0A=
- wgEnableAPI=3Dtrue,=0A=
- wgEnableWriteAPI=3Dtrue,=0A=
- wgSeparatorTransformTable=3D["", ""],=0A=
- wgDigitTransformTable=3D["", ""],=0A=
- wgMainPageTitle=3D"Main Page",=0A=
- wgFormattedNamespaces=3D{"-2": "Media", "-1": "Special", "0": "", "1": =
- "Talk", "2": "User", "3": "User talk", "4": "TheoryOrg", "5": "TheoryOrg =
- talk", "6": "File", "7": "File talk", "8": "MediaWiki", "9": "MediaWiki =
- talk", "10": "Template", "11": "Template talk", "12": "Help", "13": =
- "Help talk", "14": "Category", "15": "Category talk"},=0A=
- wgNamespaceIds=3D{"media": -2, "special": -1, "": 0, "talk": 1, "user": =
- 2, "user_talk": 3, "theoryorg": 4, "theoryorg_talk": 5, "file": 6, =
- "file_talk": 7, "mediawiki": 8, "mediawiki_talk": 9, "template": 10, =
- "template_talk": 11, "help": 12, "help_talk": 13, "category": 14, =
- "category_talk": 15, "image": 6, "image_talk": 7},=0A=
- wgSiteName=3D"TheoryOrg",=0A=
- wgCategories=3D["PhpWiki"],=0A=
- wgRestrictionEdit=3D[],=0A=
- wgRestrictionMove=3D[];=0A=
- </SCRIPT>
-
- <SCRIPT =
- src=3D"http://wiki.theory.org/skins/common/wikibits.js?270"></SCRIPT>
-
- <SCRIPT =
- src=3D"http://wiki.theory.org/skins/common/ajax.js?270"></SCRIPT>
-
- <SCRIPT =
- src=3D"http://wiki.theory.org/index.php?title=3D-&action=3Draw&ge=
- n=3Djs&useskin=3Dmonobook&270"></SCRIPT>
- </HEAD>
- <BODY class=3D"mediawiki ltr ns-0 ns-subject =
- page-BitTorrentSpecification skin-monobook">
- <DIV id=3D"globalWrapper">
- <DIV id=3D"column-content">
- <DIV id=3D"content"><A id=3D"top"></A>
- <H1 id=3D"firstHeading" =
- class=3D"firstHeading">BitTorrentSpecification</H1>
- <DIV id=3D"bodyContent">
- <H3 id=3D"siteSub">From TheoryOrg</H3>
- <DIV id=3D"contentSub"></DIV>
- <DIV id=3D"jump-to-nav">Jump to: <A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#column-one">naviga=
- tion</A>,=20
- <A=20
- href=3D"http://wiki.theory.org/BitTorrentSpecification#searchInput">searc=
- h</A></DIV><!-- start content -->
- <P><BIG><BIG><BIG> <I><B>Bittorrent Protocol Specification v1.0</B></I>=20
- </BIG></BIG></BIG></P>
- <TABLE id=3D"toc" class=3D"toc">
- <TBODY>
- <TR>
- <TD>
- <DIV id=3D"toctitle">
- <H2>Contents</H2></DIV>
- <UL>
- <LI class=3D"toclevel-1 tocsection-1"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Identification"><S=
- PAN=20
- class=3D"tocnumber">1</SPAN> <SPAN=20
- class=3D"toctext">Identification</SPAN></A></LI>
- <LI class=3D"toclevel-1 tocsection-2"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Purpose"><SPAN=20
- class=3D"tocnumber">2</SPAN> <SPAN =
- class=3D"toctext">Purpose</SPAN></A></LI>
- <LI class=3D"toclevel-1 tocsection-3"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Scope"><SPAN=20
- class=3D"tocnumber">3</SPAN> <SPAN =
- class=3D"toctext">Scope</SPAN></A></LI>
- <LI class=3D"toclevel-1 tocsection-4"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Related_Documents"=
- ><SPAN=20
- class=3D"tocnumber">4</SPAN> <SPAN class=3D"toctext">Related=20
- Documents</SPAN></A></LI>
- <LI class=3D"toclevel-1 tocsection-5"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Conventions"><SPAN=
- =20
- class=3D"tocnumber">5</SPAN> <SPAN=20
- class=3D"toctext">Conventions</SPAN></A></LI>
- <LI class=3D"toclevel-1 tocsection-6"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Bencoding"><SPAN=20
- class=3D"tocnumber">6</SPAN> <SPAN =
- class=3D"toctext">Bencoding</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-7"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Bencoded_Strings">=
- <SPAN=20
- class=3D"tocnumber">6.1</SPAN> <SPAN =
- class=3D"toctext">Bencoded=20
- Strings</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-8"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Integers"><SPAN=20
- class=3D"tocnumber">6.2</SPAN> <SPAN=20
- class=3D"toctext">Integers</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-9"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Lists"><SPAN=20
- class=3D"tocnumber">6.3</SPAN> <SPAN=20
- class=3D"toctext">Lists</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-10"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Dictionaries"><SPA=
- N=20
- class=3D"tocnumber">6.4</SPAN> <SPAN=20
- class=3D"toctext">Dictionaries</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-11"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Implementations"><=
- SPAN=20
- class=3D"tocnumber">6.5</SPAN> <SPAN=20
- class=3D"toctext">Implementations</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-12"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Metainfo_File_Stru=
- cture"><SPAN=20
- class=3D"tocnumber">7</SPAN> <SPAN class=3D"toctext">Metainfo =
- File=20
- Structure</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-13"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Info_Dictionary"><=
- SPAN=20
- class=3D"tocnumber">7.1</SPAN> <SPAN class=3D"toctext">Info=20
- Dictionary</SPAN></A>
- <UL>
- <LI class=3D"toclevel-3 tocsection-14"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Info_in_Single_Fil=
- e_Mode"><SPAN=20
- class=3D"tocnumber">7.1.1</SPAN> <SPAN =
- class=3D"toctext">Info in Single=20
- File Mode</SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-15"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Info_in_Multiple_F=
- ile_Mode"><SPAN=20
- class=3D"tocnumber">7.1.2</SPAN> <SPAN =
- class=3D"toctext">Info in=20
- Multiple File Mode</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-2 tocsection-16"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Notes"><SPAN=20
- class=3D"tocnumber">7.2</SPAN> <SPAN=20
- class=3D"toctext">Notes</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-17"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Tracker_HTTP.2FHTT=
- PS_Protocol"><SPAN=20
- class=3D"tocnumber">8</SPAN> <SPAN class=3D"toctext">Tracker =
- HTTP/HTTPS=20
- Protocol</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-18"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Tracker_Request_Pa=
- rameters"><SPAN=20
- class=3D"tocnumber">8.1</SPAN> <SPAN class=3D"toctext">Tracker =
- Request=20
- Parameters</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-19"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Tracker_Response">=
- <SPAN=20
- class=3D"tocnumber">8.2</SPAN> <SPAN class=3D"toctext">Tracker =
-
- Response</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-20"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Tracker_.27scrape.=
- 27_Convention"><SPAN=20
- class=3D"tocnumber">9</SPAN> <SPAN class=3D"toctext">Tracker =
- 'scrape'=20
- Convention</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-21"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Unofficial_extensi=
- ons_to_scrape"><SPAN=20
- class=3D"tocnumber">9.1</SPAN> <SPAN =
- class=3D"toctext">Unofficial=20
- extensions to scrape</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-22"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Peer_wire_protocol=
- _.28TCP.29"><SPAN=20
- class=3D"tocnumber">10</SPAN> <SPAN class=3D"toctext">Peer wire =
- protocol=20
- (TCP)</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-23"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Overview"><SPAN=20
- class=3D"tocnumber">10.1</SPAN> <SPAN=20
- class=3D"toctext">Overview</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-24"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Data_Types"><SPAN =
-
- class=3D"tocnumber">10.2</SPAN> <SPAN class=3D"toctext">Data=20
- Types</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-25"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Message_flow"><SPA=
- N=20
- class=3D"tocnumber">10.3</SPAN> <SPAN =
- class=3D"toctext">Message=20
- flow</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-26"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Handshake"><SPAN=20
- class=3D"tocnumber">10.4</SPAN> <SPAN=20
- class=3D"toctext">Handshake</SPAN></A>
- <UL>
- <LI class=3D"toclevel-3 tocsection-27"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#peer_id"><SPAN=20
- class=3D"tocnumber">10.4.1</SPAN> <SPAN=20
- class=3D"toctext">peer_id</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-2 tocsection-28"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Messages"><SPAN=20
- class=3D"tocnumber">10.5</SPAN> <SPAN=20
- class=3D"toctext">Messages</SPAN></A>
- <UL>
- <LI class=3D"toclevel-3 tocsection-29"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#keep-alive:_.3Clen=
- .3D0000.3E"><SPAN=20
- class=3D"tocnumber">10.5.1</SPAN> <SPAN =
- class=3D"toctext">keep-alive:=20
- <len=3D0000></SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-30"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#choke:_.3Clen.3D00=
- 01.3E.3Cid.3D0.3E"><SPAN=20
- class=3D"tocnumber">10.5.2</SPAN> <SPAN =
- class=3D"toctext">choke:=20
- <len=3D0001><id=3D0></SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-31"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#unchoke:_.3Clen.3D=
- 0001.3E.3Cid.3D1.3E"><SPAN=20
- class=3D"tocnumber">10.5.3</SPAN> <SPAN =
- class=3D"toctext">unchoke:=20
- <len=3D0001><id=3D1></SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-32"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#interested:_.3Clen=
- .3D0001.3E.3Cid.3D2.3E"><SPAN=20
- class=3D"tocnumber">10.5.4</SPAN> <SPAN =
- class=3D"toctext">interested:=20
- <len=3D0001><id=3D2></SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-33"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#not_interested:_.3=
- Clen.3D0001.3E.3Cid.3D3.3E"><SPAN=20
- class=3D"tocnumber">10.5.5</SPAN> <SPAN =
- class=3D"toctext">not=20
- interested: <len=3D0001><id=3D3></SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-34"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#have:_.3Clen.3D000=
- 5.3E.3Cid.3D4.3E.3Cpiece_index.3E"><SPAN=20
- class=3D"tocnumber">10.5.6</SPAN> <SPAN =
- class=3D"toctext">have:=20
- <len=3D0005><id=3D4><piece =
- index></SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-35"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#bitfield:_.3Clen.3=
- D0001.2BX.3E.3Cid.3D5.3E.3Cbitfield.3E"><SPAN=20
- class=3D"tocnumber">10.5.7</SPAN> <SPAN =
- class=3D"toctext">bitfield:=20
- =
- <len=3D0001+X><id=3D5><bitfield></SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-36"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#request:_.3Clen.3D=
- 0013.3E.3Cid.3D6.3E.3Cindex.3E.3Cbegin.3E.3Clength.3E"><SPAN=20
- class=3D"tocnumber">10.5.8</SPAN> <SPAN =
- class=3D"toctext">request:=20
- =
- <len=3D0013><id=3D6><index><begin><length><=
- /SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-37"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#piece:_.3Clen.3D00=
- 09.2BX.3E.3Cid.3D7.3E.3Cindex.3E.3Cbegin.3E.3Cblock.3E"><SPAN=20
- class=3D"tocnumber">10.5.9</SPAN> <SPAN =
- class=3D"toctext">piece:=20
- =
- <len=3D0009+X><id=3D7><index><begin><block>=
- </SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-38"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#cancel:_.3Clen.3D0=
- 013.3E.3Cid.3D8.3E.3Cindex.3E.3Cbegin.3E.3Clength.3E"><SPAN=20
- class=3D"tocnumber">10.5.10</SPAN> <SPAN =
- class=3D"toctext">cancel:=20
- =
- <len=3D0013><id=3D8><index><begin><length><=
- /SPAN></A></LI>
- <LI class=3D"toclevel-3 tocsection-39"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#port:_.3Clen.3D000=
- 3.3E.3Cid.3D9.3E.3Clisten-port.3E"><SPAN=20
- class=3D"tocnumber">10.5.11</SPAN> <SPAN =
- class=3D"toctext">port:=20
- =
- <len=3D0003><id=3D9><listen-port></SPAN></A></LI></UL>
- </LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-40"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Algorithms"><SPAN =
-
- class=3D"tocnumber">11</SPAN> <SPAN =
- class=3D"toctext">Algorithms</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-41"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Queuing"><SPAN=20
- class=3D"tocnumber">11.1</SPAN> <SPAN=20
- class=3D"toctext">Queuing</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-42"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Super_Seeding"><SP=
- AN=20
- class=3D"tocnumber">11.2</SPAN> <SPAN class=3D"toctext">Super=20
- Seeding</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-43"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Piece_downloading_=
- strategy"><SPAN=20
- class=3D"tocnumber">11.3</SPAN> <SPAN class=3D"toctext">Piece =
- downloading=20
- strategy</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-44"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#End_Game"><SPAN=20
- class=3D"tocnumber">11.4</SPAN> <SPAN class=3D"toctext">End=20
- Game</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-45"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Choking_and_Optimi=
- stic_Unchoking"><SPAN=20
- class=3D"tocnumber">11.5</SPAN> <SPAN =
- class=3D"toctext">Choking and=20
- Optimistic Unchoking</SPAN></A>
- <UL>
- <LI class=3D"toclevel-3 tocsection-46"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Anti-snubbing"><SP=
- AN=20
- class=3D"tocnumber">11.5.1</SPAN> <SPAN=20
- =
- class=3D"toctext">Anti-snubbing</SPAN></A></LI></UL></LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-47"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Official_Extension=
- s_To_The_Protocol"><SPAN=20
- class=3D"tocnumber">12</SPAN> <SPAN class=3D"toctext">Official =
- Extensions To=20
- The Protocol</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-48"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Fast_Peers_Extensi=
- ons"><SPAN=20
- class=3D"tocnumber">12.1</SPAN> <SPAN class=3D"toctext">Fast =
- Peers=20
- Extensions</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-49"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Distributed_Hash_T=
- able"><SPAN=20
- class=3D"tocnumber">12.2</SPAN> <SPAN =
- class=3D"toctext">Distributed Hash=20
- Table</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-50"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Connection_Obfusca=
- tion"><SPAN=20
- class=3D"tocnumber">12.3</SPAN> <SPAN =
- class=3D"toctext">Connection=20
- Obfuscation</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-51"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Unofficial_Extensi=
- ons_To_The_Protocol"><SPAN=20
- class=3D"tocnumber">13</SPAN> <SPAN class=3D"toctext">Unofficial =
- Extensions=20
- To The Protocol</SPAN></A>
- <UL>
- <LI class=3D"toclevel-2 tocsection-52"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Azureus_Messaging_=
- Protocol"><SPAN=20
- class=3D"tocnumber">13.1</SPAN> <SPAN =
- class=3D"toctext">Azureus Messaging=20
- Protocol</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-53"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#WebSeeding"><SPAN =
-
- class=3D"tocnumber">13.2</SPAN> <SPAN=20
- class=3D"toctext">WebSeeding</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-54"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Extension_protocol=
- "><SPAN=20
- class=3D"tocnumber">13.3</SPAN> <SPAN =
- class=3D"toctext">Extension=20
- protocol</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-55"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Extension_Negotiat=
- ion_Protocol"><SPAN=20
- class=3D"tocnumber">13.4</SPAN> <SPAN =
- class=3D"toctext">Extension=20
- Negotiation Protocol</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-56"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#BitTorrent_Locatio=
- n-aware_Protocol_1.0"><SPAN=20
- class=3D"tocnumber">13.5</SPAN> <SPAN =
- class=3D"toctext">BitTorrent=20
- Location-aware Protocol 1.0</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-57"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#SimpleBT_Extension=
- _Protocol"><SPAN=20
- class=3D"tocnumber">13.6</SPAN> <SPAN =
- class=3D"toctext">SimpleBT Extension=20
- Protocol</SPAN></A></LI>
- <LI class=3D"toclevel-2 tocsection-58"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#BitComet_Extension=
- _Protocol"><SPAN=20
- class=3D"tocnumber">13.7</SPAN> <SPAN =
- class=3D"toctext">BitComet Extension=20
- Protocol</SPAN></A></LI></UL></LI>
- <LI class=3D"toclevel-1 tocsection-59"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Reserved_Bytes"><S=
- PAN=20
- class=3D"tocnumber">14</SPAN> <SPAN class=3D"toctext">Reserved=20
- Bytes</SPAN></A></LI>
- <LI class=3D"toclevel-1 tocsection-60"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Change_Log"><SPAN =
-
- class=3D"tocnumber">15</SPAN> <SPAN class=3D"toctext">Change=20
- Log</SPAN></A></LI>
- <LI class=3D"toclevel-1 tocsection-61"><A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#Related_Links"><SP=
- AN=20
- class=3D"tocnumber">16</SPAN> <SPAN class=3D"toctext">Related=20
- Links</SPAN></A></LI></UL></TD></TR></TBODY></TABLE>
- <SCRIPT>if (window.showTocToggle) { var tocShowText =3D "show"; var =
- tocHideText =3D "hide"; showTocToggle(); } </SCRIPT>
-
- <H2> <SPAN id=3D"Identification" class=3D"mw-headline"> Identification =
- </SPAN></H2>
- <P><A class=3D"new" title=3D"BitTorrent (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- is a peer-to-peer file sharing protocol designed by Bram Cohen. Visit =
- his pages=20
- at <A class=3D"external free" href=3D"http://www.bittorrent.com/"=20
- rel=3D"nofollow">http://www.bittorrent.com/</A> BitTorrent is designed =
- to=20
- facilitate file transfers among multiple peers across unreliable =
- networks.</P>
- <H2> <SPAN id=3D"Purpose" class=3D"mw-headline"> Purpose </SPAN></H2>
- <P>The purpose of this specification is to document version 1.0 of the=20
- BitTorrent protocol specification in detail. Bram's <A =
- class=3D"external text"=20
- href=3D"http://bittorrent.org/beps/bep_0003.html" =
- rel=3D"nofollow">protocol=20
- specification page</A> outlines the protocol in somewhat general terms, =
- and=20
- lacks behaviorial detail in some areas. The hope is that this document =
- will=20
- become a <B>formal</B> specification, written in clear, unambiguous =
- terms, which=20
- can be used as a basis for discussion and implementation in the =
- future.</P>
- <P>This document is intended to be maintained and used by the BitTorrent =
-
- development community. Everyone is invited to contribute to this =
- document, with=20
- the understanding that the content here is intended to represent the =
- current=20
- protocol (What if the current protocol is 2.0? The scope is then =
- conflicting),=20
- which is already deployed in a number of existing client =
- implementations.</P>
- <P>This is not the place to suggest feature requests. For that, please =
- go to=20
- the <A class=3D"external text" =
- href=3D"http://lists.ibiblio.org/mailman/listinfo/bittorrent"=20
- rel=3D"nofollow">mailing list</A>.</P>
- <H2> <SPAN id=3D"Scope" class=3D"mw-headline"> Scope </SPAN></H2>
- <P>This document applies to the first version (i.e. version 1.0) of the=20
- BitTorrent protocol specification. Currently, this applies to the =
- torrent file=20
- structure, peer wire protocol, and the Tracker HTTP/HTTPS protocol=20
- specifications. As newer revisions of each protocol are defined, they =
- should be=20
- specified on their own separate pages, <B>not here</B>.</P>
- <H2> <SPAN id=3D"Related_Documents" class=3D"mw-headline"> Related =
- Documents=20
- </SPAN></H2>
- <UL>
- <LI> <A class=3D"external text" =
- href=3D"http://bittorrent.org/beps/bep_0003.html"=20
- rel=3D"nofollow">Official protocol specification</A></LI>
- <LI> <A title=3D"BitTorrentWishList" =
- href=3D"http://wiki.theory.org/BitTorrentWishList">Developer=20
- and user wishlist</A></LI>
- <LI> <A title=3D"BitTorrentTrackerExtensions" =
- href=3D"http://wiki.theory.org/BitTorrentTrackerExtensions">Tracker=20
- protocol extensions</A></LI></UL>
- <H2> <SPAN id=3D"Conventions" class=3D"mw-headline"> Conventions =
- </SPAN></H2>
- <P>In this document, a number of conventions are used in an attempt to =
- present=20
- information in a concise and unambiguous fashion.</P>
- <UL>
- <LI> <I>peer</I> v/s <I>client</I>: In this document, a <I>peer</I> is =
- any=20
- BitTorrent client participating in a download. The <I>client</I> is =
- also a=20
- peer, however it is the BitTorrent client that is running on the local =
-
- machine. Readers of this specification may choose to think of =
- themselves as=20
- the <I>client</I> which connects to numerous <I>peers</I>.</LI>
- <LI> <I>piece</I> v/s <I>block</I>: In this document, a <I>piece</I> =
- refers to=20
- a portion of the downloaded data that is described in the metainfo =
- file, which=20
- can be verified by a SHA1 hash. A <I>block</I> is a portion of data =
- that a=20
- <I>client</I> may request from at least one <I>peer</I>. Two or more=20
- <I>blocks</I> make up a whole <I>piece</I>, which may then be =
- verified.</LI>
- <LI> <I>defacto standard</I>: Large blocks of text in <I>italics</I> =
- indicates=20
- a practice so common in various client implementations of BitTorrent =
- that it=20
- is considered a defacto standard.</LI></UL>
- <P>In order to help others find recent changes that have been made to =
- this=20
- document, please fill out the change log (last section). This should =
- contain a=20
- brief (i.e. one-line) entry for each major change that you've made to =
- the=20
- document.</P>
- <H2> <SPAN id=3D"Bencoding" class=3D"mw-headline"> Bencoding =
- </SPAN></H2>
- <P>Bencoding is a way to specify and organize data in a terse format. =
- It=20
- supports the following types: byte strings, integers, lists, and =
- dictionaries.
- </P>
- <H3> <SPAN id=3D"Bencoded_Strings" class=3D"mw-headline"> Bencoded =
- Strings=20
- </SPAN></H3>
- <P>Bencoded strings are encoded as follows: <I><string length encoded =
- in base=20
- ten ASCII><B>:</B><string data></I>, or =
- <I>key</I>:<I>value</I><BR>Note=20
- that there is no constant beginning delimiter, and no ending =
- delimiter.</P>
- <DL>
- <DD><B>Example</B>: <I>4<B>:</B>spam</I> represents the string =
- "spam"</DD></DL>
- <H3> <SPAN id=3D"Integers" class=3D"mw-headline"> Integers </SPAN></H3>
- <P>Integers are encoded as follows: <I><B>i</B><integer encoded in =
- base ten=20
- ASCII><B>e</B></I><BR>The initial <B>i</B> and trailing <B>e</B> are=20
- beginning and ending delimiters. You can have negative numbers such as=20
- <I><B>i</B>-3<B>e</B></I>. Only the significant digits should be used, =
- one=20
- cannot pad the Integer with zeroes. such as <I><B>i</B>04<B>e</B></I>. =
- However,=20
- <I><B>i</B>0<B>e</B></I> is valid.</P>
- <DL>
- <DD><B>Example</B>: <I><B>i</B>3<B>e</B></I> represents the integer =
- "3"
- </DD></DL>
- <UL>
- <LI> <I>NOTE:</I> The maximum number of bit of this integer is =
- unspecified,=20
- but to handle it as a signed 64bit integer is mandatory to handle =
- "large=20
- files" aka .torrent for more that 4Gbyte.</LI></UL>
- <H3> <SPAN id=3D"Lists" class=3D"mw-headline"> Lists </SPAN></H3>
- <P>Lists are encoded as follows: <I><B>l</B><bencoded=20
- values><B>e</B></I><BR>The initial <B>l</B> and trailing <B>e</B> are =
-
- beginning and ending delimiters. Lists may contain any bencoded type, =
- including=20
- integers, strings, dictionaries, and even lists within other lists.</P>
- <DL>
- <DD><B>Example:</B> <I><B>l</B>4:spam4:eggs<B>e</B></I> represents the =
- list of=20
- two strings: [ "spam", "eggs" ]</DD></DL>
- <H3> <SPAN id=3D"Dictionaries" class=3D"mw-headline"> Dictionaries =
- </SPAN></H3>
- <P>Dictionaries are encoded as follows: <I><B>d</B><bencoded=20
- string><bencoded element><B>e</B></I> <BR>The initial <B>d</B> =
- and=20
- trailing <B>e</B> are the beginning and ending delimiters. Note that the =
- keys=20
- must be bencoded strings. The values may be any bencoded type, =
- including=20
- integers, strings, lists, and other dictionaries. Keys must be strings =
- and=20
- appear in sorted order (sorted as raw strings, not alphanumerics). The =
- strings=20
- should be compared using a binary comparison, not a culture-specific =
- "natural"=20
- comparison.</P>
- <DL>
- <DD><B>Example</B>: <I><B>d</B>3:cow3:moo4:spam4:eggs<B>e</B> =
- represents the=20
- dictionary { "cow" =3D> "moo", "spam" =3D> "eggs" } =
- <BR></I></DD>
- <DD><B>Example</B>: <I><B>d</B>4:spaml1:a1:b<B>ee'</B> represents the=20
- dictionary { "spam" =3D> [ "a", "b" ] } <BR></I></DD>
- <DD><B>Example</B>:=20
- =
- <I><B>d</B>9:publisher3:bob17:publisher-webpage15:www.example.com18:publi=
- sher.location4:home<B>e</B></I>=20
- represents { "publisher" =3D> "bob", "publisher-webpage" =3D>=20
- "www.example.com", "publisher.location" =3D> "home" }</DD></DL>
- <H3> <SPAN id=3D"Implementations" class=3D"mw-headline"> Implementations =
-
- </SPAN></H3>
- <UL>
- <LI> <A class=3D"external text" =
- href=3D"http://funzix.git.sourceforge.net/git/gitweb.cgi?p=3Dfunzix/funzi=
- x;a=3Dblob;f=3Dbencode/bencode.c"=20
- rel=3D"nofollow">C</A> by <A class=3D"new" title=3D"User:Vapier (page =
- does not exist)"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DUser:Vapier&action=3D=
- edit&redlink=3D1">Mike=20
- Frysinger</A></LI>
- <LI> <A class=3D"external text" =
- href=3D"http://search.cpan.org/dist/Convert-Bencode/lib/Convert/Bencode.p=
- m"=20
- rel=3D"nofollow">Perl</A></LI>
- <LI> <A class=3D"external text" =
- href=3D"http://www.koders.com/java/fid47111A56F2466C232E09AEF75A39915EC70=
- D3536.aspx#L52"=20
- rel=3D"nofollow">Java</A></LI>
- <LI> <A title=3D"Decoding bencoded data with python" =
- href=3D"http://wiki.theory.org/Decoding_bencoded_data_with_python">Python=
- </A>=20
- by <A class=3D"new" title=3D"User:Hackeron (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DUser:Hackeron&action=
- =3Dedit&redlink=3D1">Hackeron</A>
- </LI>
- <LI> <A title=3D"Decoding encoding bencoded data with haskell" =
- href=3D"http://wiki.theory.org/Decoding_encoding_bencoded_data_with_haske=
- ll">Decoding=20
- encoding bencoded data with haskell</A> by <A class=3D"new" =
- title=3D"User:Edi (page does not exist)"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DUser:Edi&action=3Ded=
- it&redlink=3D1">Edi</A>
- </LI>
- <LI> <A class=3D"external text" =
- href=3D"http://www.stupendous.net/projects/bencoding-obj-c-class/"=20
- rel=3D"nofollow">Objective-C</A> by <A class=3D"new" =
- title=3D"User:Chrome (page does not exist)"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DUser:Chrome&action=3D=
- edit&redlink=3D1">Chrome</A>
- </LI>
- <LI> <A title=3D"JScript: Converting a torrent file to a JScript =
- dictionary"=20
- =
- href=3D"http://wiki.theory.org/JScript:_Converting_a_torrent_file_to_a_JS=
- cript_dictionary">JScript</A>=20
- by <A class=3D"new" title=3D"User:Sergej B. (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DUser:Sergej_B.&actio=
- n=3Dedit&redlink=3D1">Sergej=20
- B.</A></LI>
- <LI> <A class=3D"external text" =
- href=3D"http://demon.tw/my-work/javascript-bencode.html"=20
- rel=3D"nofollow">JavaScript</A> by <A class=3D"external text" =
- href=3D"http://demon.tw/"=20
- rel=3D"nofollow">Demon</A>]</LI>
- <LI> <A class=3D"external text" =
- href=3D"http://demon.tw/my-work/vbs-bencode.html"=20
- rel=3D"nofollow">VBScript</A> by <A class=3D"external text" =
- href=3D"http://demon.tw/"=20
- rel=3D"nofollow">Demon</A>]</LI>
- <LI> <A class=3D"external text" =
- href=3D"http://nakkaya.com/2009/11/02/decoding-bencoded-streams-in-clojur=
- e/"=20
- rel=3D"nofollow">Clojure</A> by <A class=3D"new" title=3D"User:Nakkaya =
- (page does not exist)"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DUser:Nakkaya&action=3D=
- edit&redlink=3D1">nakkaya</A>
- </LI>
- <LI> <A title=3D"Decoding encoding bencoded data with erlang" =
- href=3D"http://wiki.theory.org/Decoding_encoding_bencoded_data_with_erlan=
- g">Erlang</A>
- </LI>
- <LI> <A title=3D"Decoding encoding bencoded data with PHP" =
- href=3D"http://wiki.theory.org/Decoding_encoding_bencoded_data_with_PHP">=
- PHP</A>
- </LI>
- <LI> <A class=3D"external text" =
- href=3D"http://code.google.com/p/php-bencode-extension/"=20
- rel=3D"nofollow">PHP Extension</A></LI>
- <LI> <A class=3D"external text" =
- href=3D"http://snipplr.com/view/37790/bencoding-encoder-and-decoder/"=20
- rel=3D"nofollow">C#</A> by <A class=3D"new" title=3D"User:SuprDewd =
- (page does not exist)"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DUser:SuprDewd&action=
- =3Dedit&redlink=3D1">SuprDewd</A>
- </LI>
- <LI> <A class=3D"external text" =
- href=3D"http://cvs.savannah.gnu.org/viewvc/mldonkey/mldonkey/src/networks=
- /bittorrent/bencode.ml?view=3Dmarkup"=20
- rel=3D"nofollow">OCaml</A> by <A class=3D"external text" =
- href=3D"http://mldonkey.sourceforge.net/Main_Page"=20
- rel=3D"nofollow">MLDonkey</A></LI>
- <LI> <A class=3D"external text" =
- href=3D"https://github.com/jsz/gorrent/tree/master/bencode"=20
- rel=3D"nofollow">Go</A> by <A class=3D"external text" =
- href=3D"http://jsz.github.com/"=20
- rel=3D"nofollow">Leon Szpilewski</A></LI></UL>
- <H2> <SPAN id=3D"Metainfo_File_Structure" class=3D"mw-headline"> =
- Metainfo File=20
- Structure </SPAN></H2>
- <P>All data in a metainfo file is bencoded. The specification for =
- bencoding is=20
- defined above.</P>
- <P>The content of a metainfo file (the file ending in ".torrent") is a =
- bencoded=20
- dictionary, containing the keys listed below. All character string =
- values are=20
- UTF-8 encoded.</P>
- <UL>
- <LI> <B>info</B>: a dictionary that describes the file(s) of the =
- torrent. =20
- There are two possible forms: one for the case of a 'single-file' =
- torrent with=20
- no directory structure, and one for the case of a 'multi-file' torrent =
- (see=20
- below for details)</LI>
- <LI> <B>announce</B>: The announce URL of the tracker (string)</LI>
- <LI> <B>announce-list</B>: (optional) this is an extention to the =
- official=20
- specification, offering backwards-compatibility. (list of lists of =
- strings).
- <UL>
- <LI>The official request for a specification change is <A =
- class=3D"external text"=20
- href=3D"http://bittorrent.org/beps/bep_0012.html" =
- rel=3D"nofollow">here</A>.
- </LI></UL></LI>
- <LI> <B>creation date</B>: (optional) the creation time of the =
- torrent, in=20
- standard UNIX epoch format (integer, seconds since 1-Jan-1970 00:00:00 =
- UTC)
- </LI>
- <LI> <B>comment</B>: (optional) free-form textual comments of the =
- author=20
- (string)</LI>
- <LI> <B>created by</B>: (optional) name and version of the program =
- used to=20
- create the .torrent (string)</LI>
- <LI> <B>encoding</B>: (optional) the string encoding format used to =
- generate=20
- the <B>pieces</B> part of the <B>info</B> dictionary in the .torrent =
- metafile=20
- (string)</LI></UL>
- <H3> <SPAN id=3D"Info_Dictionary" class=3D"mw-headline">Info =
- Dictionary</SPAN></H3>
- <P>This section contains the field which are common to both mode, =
- "single file"=20
- and "multiple file".</P>
- <UL>
- <LI> <B>piece length</B>: number of bytes in each piece (integer)</LI>
- <LI> <B>pieces</B>: string consisting of the concatenation of all =
- 20-byte SHA1=20
- hash values, one per piece (byte string, i.e. not urlencoded)</LI>
- <LI> <B>private</B>: (optional) this field is an integer. If it is set =
- to "1",=20
- the client MUST publish its presence to get other peers ONLY via the =
- trackers=20
- explicitly described in the metainfo file. If this field is set to "0" =
- or is=20
- not present, the client may obtain peer from other means, e.g. PEX =
- peer=20
- exchange, dht. Here, "private" may be read as "no external peer =
- source".
- <UL>
- <LI> <B>NOTE:</B> There is much debate surrounding private =
- trackers.</LI>
- <LI> The official request for a specification change is <A =
- class=3D"external text"=20
- href=3D"http://bittorrent.org/beps/bep_0027.html" =
- rel=3D"nofollow">here</A>.
- </LI>
- <LI> Azureus was the first client to respect private trackers, <A =
- class=3D"external text"=20
- href=3D"http://www.azureuswiki.com/index.php/Secure_Torrents"=20
- rel=3D"nofollow">see their wiki</A> for more =
- details.</LI></UL></LI></UL>
- <H4> <SPAN id=3D"Info_in_Single_File_Mode" class=3D"mw-headline">Info in =
- Single File=20
- Mode</SPAN></H4>
- <P>For the case of the <B>single-file</B> mode, the <B>info</B> =
- dictionary=20
- contains the following structure:</P>
- <UL>
- <LI> <B>name</B>: the filename. This is purely advisory. =
- (string)</LI>
- <LI> <B>length</B>: length of the file in bytes (integer)</LI>
- <LI> <B>md5sum</B>: (optional) a 32-character hexadecimal string =
- corresponding=20
- to the MD5 sum of the file. This is not used by BitTorrent at all, =
- but it is=20
- included by some programs for greater compatibility.</LI></UL>
- <H4> <SPAN id=3D"Info_in_Multiple_File_Mode" class=3D"mw-headline">Info =
- in Multiple=20
- File Mode</SPAN></H4>
- <P>For the case of the <B>multi-file</B> mode, the <B>info</B> =
- dictionary=20
- contains the following structure:</P>
- <UL>
- <LI> <B>name</B>: the file path of the directory in which to store all =
- the=20
- files. This is purely advisory. (string)</LI>
- <LI> <B>files</B>: a list of dictionaries, one for each file. Each =
- dictionary=20
- in this list contains the following keys:
- <UL>
- <LI> <B>length</B>: length of the file in bytes (integer)</LI>
- <LI> <B>md5sum</B>: (optional) a 32-character hexadecimal string=20
- corresponding to the MD5 sum of the file. This is not used by =
- BitTorrent at=20
- all, but it is included by some programs for greater =
- compatibility.</LI>
- <LI> <B>path</B>: a list containing one or more string elements that =
-
- together represent the path and filename. Each element in the list=20
- corresponds to either a directory name or (in the case of the final =
- element)=20
- the filename. For example, a the file "dir1/dir2/file.ext" would =
- consist of=20
- three string elements: "dir1", "dir2", and "file.ext". This is =
- encoded as a=20
- bencoded list of strings such as=20
- =
- <I>l<B>4</B>:dir1<B>4</B>:dir2<B>8</B>:file.ext<B>e</B></I></LI></UL></LI=
- ></UL>
- <H3> <SPAN id=3D"Notes" class=3D"mw-headline">Notes</SPAN></H3>
- <UL>
- <LI> The <B>piece length</B> specifies the nominal piece size, and is =
- usually=20
- a power of 2. The piece size is typically chosen based on the total =
- amount of=20
- file data in the torrent, and is constrained by the fact that =
- too-large piece=20
- sizes cause inefficiency, and too-small piece sizes cause large =
- .torrent=20
- metadata file. Historically, piece size was chosen to result in a =
- .torrent=20
- file no greater than approx. 50 - 75 kB (presumably to ease the load =
- on the=20
- server hosting the torrent files). =20
- <UL>
- <LI>Current best-practice is to <I>keep the piece size to 512KB or =
- less,</I>=20
- for torrents around 8-10GB, even if that results in a larger =
- .torrent file. =20
- This results in a more efficient swarm for sharing files. The most =
- common=20
- sizes are 256 kB, 512 kB, and 1 MB. </LI>
- <LI>Every piece is of equal length except for the final piece, which =
- is=20
- irregular. The number of pieces is thus determined by 'ceil( total =
- length /=20
- piece size )'. </LI>
- <LI>For the purposes of piece boundaries in the multi-file case, =
- consider=20
- the file data as one long continuous stream, composed of the =
- concatenation=20
- of each file in the order listed in the <I>files</I> list. The =
- number of=20
- pieces and their boundaries are then determined in the same manner =
- as the=20
- case of a single file. Pieces may overlap file =
- boundaries.</LI></UL></LI>
- <LI> Each piece has a corresponding SHA1 hash of the data contained =
- within=20
- that piece. These hashes are concatenated to form the <I>pieces<B> =
- value in=20
- the above </B></I><B>info</B> dictionary. Note that this is =
- <B>not</B> a list=20
- but rather a single string. The length of the string must be a =
- multiple of 20.
- </LI></UL>
- <H2> <SPAN id=3D"Tracker_HTTP.2FHTTPS_Protocol" class=3D"mw-headline"> =
- Tracker=20
- HTTP/HTTPS Protocol </SPAN></H2>
- <P>The tracker is an HTTP/HTTPS service which responds to HTTP GET =
- requests. The=20
- requests include metrics from clients that help the tracker keep overall =
-
- statistics about the torrent. The response includes a peer list that =
- helps the=20
- client participate in the torrent. The base URL consists of the =
- "announce URL"=20
- as defined in the metainfo (.torrent) file. The parameters are then =
- added to=20
- this URL, using standard CGI methods (i.e. a '?' after the announce URL, =
-
- followed by 'param=3Dvalue' sequences separated by '&').</P>
- <P>Note that all binary data in the URL (particularly info_hash and =
- peer_id)=20
- must be properly escaped. This means any byte not in the set 0-9, a-z, =
- A-Z,=20
- '.', '-', '_' and '~', must be encoded using the "%nn" format, where nn =
- is the=20
- hexadecimal value of the byte. (See <A class=3D"external text" =
- href=3D"http://www.faqs.org/rfcs/rfc1738.html"=20
- rel=3D"nofollow">RFC1738</A> for details.) </P>
- <P>For a 20-byte hash of=20
- \x12\x34\x56\x78\x9a\xbc\xde\xf1\x23\x45\x67\x89\xab\xcd\xef\x12\x34\x56\=
- x78\x9a,<BR>
- The right encoded form =
- is %124Vx%9A%BC%DE%F1%23Eg%89%AB%CD%EF%124Vx%9A</P>
- <H3> <SPAN id=3D"Tracker_Request_Parameters" =
- class=3D"mw-headline">Tracker Request=20
- Parameters</SPAN></H3>
- <P>The parameters used in the client->tracker GET request are as =
- follows:</P>
- <UL>
- <LI> <B>info_hash</B>: urlencoded 20-byte SHA1 hash of the =
- <I>value</I> of the=20
- <I>info</I> key from the Metainfo file. Note that the <I>value</I> =
- will be a=20
- bencoded dictionary, given the definition of the <I>info</I> key =
- above. </LI>
- <LI> <B><A=20
- =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#peer_id">peer_id</=
- A></B>:=20
- urlencoded 20-byte string used as a unique ID for the client, =
- generated by the=20
- client at startup. This is allowed to be any value, and may be binary =
- data. =20
- <I>There are currently no guidelines for generating this peer ID. =
- However,=20
- one may rightly presume that it must at least be unique for your local =
-
- machine, thus should probably incorporate things like process ID and =
- perhaps a=20
- timestamp recorded at startup. See <A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification#peer_id">peer_id=20
- </A> below for common client encodings of this field.</I></LI>
- <LI> <B>port</B>: The port number that the client is listening on. =
- Ports=20
- reserved for BitTorrent are typically 6881-6889. Clients may choose =
- to give=20
- up if it cannot establish a port within this range.</LI>
- <LI> <B>uploaded</B>: The total amount uploaded (since the client sent =
- the=20
- 'started' event to the tracker) in base ten ASCII. While not =
- explicitly=20
- stated in the official specification, the concensus is that this =
- should be the=20
- total number of bytes uploaded.</LI>
- <LI> <B>downloaded</B>: The total amount downloaded (since the client =
- sent the=20
- 'started' event to the tracker) in base ten ASCII. While not =
- explicitly=20
- stated in the official specification, the consensus is that this =
- should be the=20
- total number of bytes downloaded.</LI>
- <LI> <B>left</B>: The number of bytes this client still has to =
- download in=20
- base ten ASCII.</LI>
- <LI> <B>compact</B>: Setting this to 1 indicates that the client =
- accepts a=20
- compact response. The announce-list is replaced by a peers string with =
- 6 bytes=20
- per peer. The first four bytes are the host (in network byte order), =
- the last=20
- two bytes are the port (again in network byte order). It should be =
- noted that=20
- some trackers only support compact responses (for saving bandwidth) =
- and either=20
- refuse requests without "compact=3D1" or simply send a compact =
- response unless=20
- the request contains "compact=3D0" (in which case they will refuse the =
- request.)
- </LI>
- <LI> <B>no_peer_id</B>: Indicates that the tracker can omit peer id =
- field in=20
- announce-list dictionary. This option is ignored if compact is =
- enabled.</LI>
- <LI> <B>event</B>: If specified, must be one of <I>started</I>,=20
- <I>completed</I>, <I>stopped</I>, (or empty which is the same as not =
- being=20
- specified). If not specified, then this request is one performed at =
- regular=20
- intervals.
- <UL>
- <LI> <B>started</B>: The first request to the tracker <I>must</I> =
- include=20
- the event key with this value.</LI>
- <LI> <B>stopped</B>: Must be sent to the tracker if the client is =
- shutting=20
- down gracefully.</LI>
- <LI> <B>completed</B>: Must be sent to the tracker when the download =
-
- completes. However, must not be sent if the download was already =
- 100%=20
- complete when the client started. Presumably, this is to allow the =
- tracker=20
- to increment the "completed downloads" metric based solely on this =
- event.
- </LI></UL></LI>
- <LI> <B>ip</B>: Optional. The true IP address of the client machine, =
- in=20
- dotted quad format or rfc3513 defined hexed IPv6 address. <I>Notes: =
- In=20
- general this parameter is not necessary as the address of the client =
- can be=20
- determined from the IP address from which the HTTP request came. The=20
- parameter is only needed in the case where the IP address that the =
- request=20
- came in on is not the IP address of the client. This happens if the =
- client is=20
- communicating to the tracker through a proxy (or a transparent web=20
- proxy/cache.) It also is necessary when both the client and the =
- tracker are=20
- on the same local side of a NAT gateway. The reason for this is that=20
- otherwise the tracker would give out the internal (RFC1918) address of =
- the=20
- client, which is not routable. Therefore the client must explicitly =
- state its=20
- (external, routable) IP address to be given out to external peers. =
- Various=20
- trackers treat this parameter differently. Some only honor it only if =
- the IP=20
- address that the request came in on is in RFC1918 space. Others honor =
- it=20
- unconditionally, while others ignore it completely. In case of IPv6 =
- address=20
- (e.g.: 2001:db8:1:2::100) it indicates only that client can =
- communicate via=20
- IPv6.</I></LI>
- <LI> <B>numwant</B>: Optional. Number of peers that the client would =
- like to=20
- receive from the tracker. This value is permitted to be zero. If =
- omitted,=20
- typically defaults to 50 peers.</LI>
- <LI> <B>key</B>: Optional. An additional client identification =
- mechanism that=20
- is not shared with any peers. It is intended to allow a client to =
- prove their=20
- identity should their IP address change.</LI>
- <LI> <B>trackerid</B>: Optional. If a previous announce contained a =
- tracker=20
- id, it should be set here.</LI></UL>
- <H3> <SPAN id=3D"Tracker_Response" class=3D"mw-headline">Tracker=20
- Response</SPAN></H3>
- <P>The tracker responds with "text/plain" document consisting of a =
- bencoded=20
- dictionary with the following keys:</P>
- <UL>
- <LI> <B>failure reason</B>: If present, then no other keys may be =
- present. =20
- The value is a human-readable error message as to why the request =
- failed=20
- (string).</LI>
- <LI> <B>warning message</B>: (new, optional) Similar to failure =
- reason, but=20
- the response still gets processed normally. The warning message is =
- shown just=20
- like an error.</LI>
- <LI> <B>interval</B>: Interval in seconds that the client should wait =
- between=20
- sending regular requests to the tracker</LI>
- <LI> <B>min interval</B>: (optional) Minimum announce interval. If =
- present=20
- clients must not reannounce more frequently than this.</LI>
- <LI> <B>tracker id</B>: A string that the client should send back on =
- its next=20
- announcements. If absent and a previous announce sent a tracker id, do =
- not=20
- discard the old value; keep using it.</LI>
- <LI> <B>complete</B>: number of peers with the entire file, i.e. =
- seeders=20
- (integer)</LI>
- <LI> <B>incomplete</B>: number of non-seeder peers, aka "leechers" =
- (integer)
- </LI>
- <LI> <B>peers</B>: (dictionary model) The value is a list of =
- dictionaries,=20
- each with the following keys:
- <UL>
- <LI> <B>peer id</B>: peer's self-selected ID, as described above for =
- the=20
- tracker request (string)</LI>
- <LI> <B>ip</B>: peer's IP address either IPv6 (hexed) or IPv4 =
- (dotted quad)=20
- or DNS name (string)</LI>
- <LI> <B>port</B>: peer's port number (integer)</LI></UL></LI>
- <LI> <B>peers</B>: (binary model) Instead of using the dictionary =
- model=20
- described above, the <B>peers</B> value may be a string consisting of=20
- multiples of 6 bytes. First 4 bytes are the IP address and last 2 =
- bytes are=20
- the port number. All in network (big endian) notation.</LI></UL>
- <P>As mentioned above, the list of peers is length 50 by default. If =
- there are=20
- fewer peers in the torrent, then the list will be smaller. Otherwise, =
- the=20
- tracker randomly selects peers to include in the response. <I>The =
- tracker may=20
- choose to implement a more intelligent mechanism for peer selection when =
-
- responding to a request. For instance, reporting seeds to other seeders =
- could=20
- be avoided.</I></P>
- <P>Clients may send a request to the tracker more often than the =
- specified=20
- interval, if an event occurs (i.e. stopped or completed) or if the =
- client needs=20
- to learn about more peers. However, it is considered bad practice to =
- "hammer"=20
- on a tracker to get multiple peers. If a client wants a large peer list =
- in the=20
- response, then it should specify the <B>numwant</B> parameter.</P>
- <P><I><B>Implementer's Note</B>: Even 30 peers is <B>plenty</B>, the =
- official=20
- client version 3 in fact only actively forms new connections if it has =
- less than=20
- 30 peers and will refuse connections if it has 55. <B>This value is =
- important to=20
- performance</B>. When a new piece has completed download, HAVE messages =
- (see=20
- below) will need to be sent to most active peers. As a result the cost =
- of=20
- broadcast traffic grows in direct proportion to the number of peers. =
- Above 25,=20
- new peers are highly unlikely to increase download speed. UI designers =
- are=20
- <B>strongly</B> advised to make this obscure and hard to change as it is =
- very=20
- rare to be useful to do so.</I></P>
- <H2> <SPAN id=3D"Tracker_.27scrape.27_Convention" class=3D"mw-headline"> =
- Tracker=20
- 'scrape' Convention </SPAN></H2>
- <P>By convention most trackers support another form of request, which =
- queries=20
- the state of a given torrent (or all torrents) that the tracker is =
- managing. =20
- This is referred to as the "scrape page" because it automates the =
- otherwise=20
- tedious process of "screen scraping" the tracker's stats page.</P>
- <P>The scrape URL is also a HTTP GET method, similar to the one =
- described above.=20
- However the base URL is different. To derive the scrape URL use the =
- following=20
- steps: Begin with the announce URL. Find the last '/' in it. If the =
- text=20
- immediately following that '/' isn't 'announce' it will be taken as a =
- sign that=20
- that tracker doesn't support the scrape convention. If it does, =
- substitute=20
- 'scrape' for 'announce' to find the scrape page.</P>
- <P>Examples: (announce URL -> scrape URL)</P><PRE> =
- ~http://example.com/announce -> ~http://example.com/scrape=0A=
- ~http://example.com/x/announce -> =
- ~http://example.com/x/scrape=0A=
- ~http://example.com/announce.php -> =
- ~http://example.com/scrape.php=0A=
- ~http://example.com/a -> (scrape not supported)=0A=
- ~http://example.com/announce?x2%0644 -> =
- ~http://example.com/scrape?x2%0644=0A=
- ~http://example.com/announce?x=3D2/4 -> (scrape not supported)=0A=
- ~http://example.com/x%064announce -> (scrape not supported)=0A=
- </PRE>
- <P>Note especially that entity unquoting is <I>not</I> to be done. This =
-
- standard is documented by Bram in the <A class=3D"new" =
- title=3D"BitTorrent (page does not exist)"=20
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- development list archive: <A class=3D"external free" =
- href=3D"http://groups.yahoo.com/group/BitTorrent/message/3275"=20
- rel=3D"nofollow">http://groups.yahoo.com/group/BitTorrent/message/3275</A=
- ></P>
- <P>The scrape URL may be supplemented by the optional parameter=20
- <I>info_hash</I>, a 20-byte value as described above. This restricts =
- the=20
- tracker's report to that particular torrent. Otherwise stats for all =
- torrents=20
- that the tracker is managing are returned. Software authors are =
- strongly=20
- encouraged to use the <I>info_hash</I> parameter when at all possible, =
- to reduce=20
- the load and bandwidth of the tracker.</P>
- <P>You may also specify multiple info_hash parameters to trackers that =
- support=20
- it. While this isn't part of the official specifications it has become =
- somewhat=20
- a defacto standard - for example:</P><PRE> =
- http://example.com/scrape.php?info_hash=3Daaaaaaaaaaaaaaaaaaaa&info_h=
- ash=3Dbbbbbbbbbbbbbbbbbbbb&info_hash=3Dcccccccccccccccccccc=0A=
- </PRE>
- <P>The response of this HTTP GET method is a "text/plain" or sometimes =
- gzip=20
- compressed document consisting of a bencoded dictionary, containing the=20
- following keys:</P>
- <UL>
- <LI> <B>files</B>: a dictionary containing one key/value pair for each =
- torrent=20
- for which there are stats. If <I>info_hash</I> was supplied and was =
- valid,=20
- this dictionary will contain a single key/value. Each key consists of =
- a=20
- 20-byte binary <I>info_hash</I>. The value of each entry is another=20
- dictionary containing the following:
- <UL>
- <LI> <B>complete</B>: number of peers with the entire file, i.e. =
- seeders=20
- (integer)</LI>
- <LI> <B>downloaded</B>: total number of times the tracker has =
- registered a=20
- completion ("event=3Dcomplete", i.e. a client finished downloading =
- the=20
- torrent)</LI>
- <LI> <B>incomplete</B>: number of non-seeder peers, aka "leechers" =
- (integer)
- </LI>
- <LI> <B>name</B>: (optional) the torrent's internal name, as =
- specified by=20
- the "name" file in the info section of the .torrent =
- file</LI></UL></LI></UL>
- <P>Note that this response has three levels of dictionary nesting. =
- Here's an=20
- example:</P>
- <P><TT>d5:<I>files</I>d20:....................d8:<I>complete</I>i<B>5</B>=
- e10:<I>downloaded</I>i<B>50</B>e10:<I>incomplete</I>i<B>10</B>eeee</TT>
- </P>
- <P>Where <TT>....................</TT> is the 20 byte info_hash and =
- there are 5=20
- seeders, 10 leechers, and 50 complete downloads.</P>
- <H3> <SPAN id=3D"Unofficial_extensions_to_scrape" class=3D"mw-headline"> =
- Unofficial=20
- extensions to scrape </SPAN></H3>
- <P>Below are the response keys are being unofficially used. Since they =
- are=20
- unofficial, they are all optional.</P>
- <UL>
- <LI> <B>failure reason</B>: Human-readable error message as to why the =
- request=20
- failed (string). Clients known to handle this key: Azureus.</LI>
- <LI> <B>flags</B>: a dictionary containing miscellaneous flags. The =
- value of=20
- the flags key is another nested dictionary, possibly containing the =
- following:
- <UL>
- <LI> <B>min_request_interval</B>: The value for this key is an =
- integer=20
- specifying how the minimum number of seconds for the client to wait =
- before=20
- scraping the tracker again. Trackers known to send this key: BNBT. =
- Clients=20
- known to handle this key: Azureus.</LI></UL></LI></UL>
- <H2> <SPAN id=3D"Peer_wire_protocol_.28TCP.29" class=3D"mw-headline"> =
- Peer wire=20
- protocol (TCP) </SPAN></H2>
- <H3> <SPAN id=3D"Overview" class=3D"mw-headline"> Overview </SPAN></H3>
- <P>The peer protocol facilitates the exchange of pieces as described in =
- the=20
- '<I>metainfo</I> file.</P>
- <P><I>Note here that the original specification also used the term =
- "piece" when=20
- describing the peer protocol, but as a different term than "piece" in =
- the=20
- metainfo file. For that reason, the term "block" will be used in this=20
- specification to describe the data that is exchanged between peers over =
- the=20
- wire.</I></P>
- <P>A client must maintain state information for each connection that it =
- has with=20
- a remote peer:</P>
- <UL>
- <LI> <B>choked</B>: Whether or not the remote peer has choked this =
- client. =20
- When a peer chokes the client, it is a notification that no requests =
- will be=20
- answered until the client is unchoked. The client should not attempt =
- to send=20
- requests for blocks, and it should consider all pending (unanswered) =
- requests=20
- to be discarded by the remote peer.</LI>
- <LI> <B>interested</B>: Whether or not the remote peer is interested =
- in=20
- something this client has to offer. This is a notification that the =
- remote=20
- peer will begin requesting blocks when the client unchokes =
- them.</LI></UL>
- <P><I>Note that this also implies that the client will also need to keep =
- track=20
- of whether or not it is interested in the remote peer, and if it has the =
- remote=20
- peer choked or unchoked. So, the real list looks something like =
- this:</I></P>
- <UL>
- <LI> <B>am_choking</B>: this client is choking the peer</LI>
- <LI> <B>am_interested</B>: this client is interested in the peer</LI>
- <LI> <B>peer_choking</B>: peer is choking this client</LI>
- <LI> <B>peer_interested</B>: peer is interested in this =
- client</LI></UL>
- <P>Client connections start out as "choked" and "not interested". In =
- other=20
- words:</P>
- <UL>
- <LI> <B>am_choking</B> =3D 1</LI>
- <LI> <B>am_interested</B> =3D 0</LI>
- <LI> <B>peer_choking</B> =3D 1</LI>
- <LI> <B>peer_interested</B> =3D 0</LI></UL>
- <P>A block is downloaded by the client when the client is interested in =
- a peer,=20
- and that peer is not choking the client. A block is uploaded by a =
- client when=20
- the client is not choking a peer, and that peer is interested in the =
- client.</P>
- <P>It is important for the client to keep its peers informed as to =
- whether or=20
- not it is interested in them. This state information should be kept =
- up-to-date=20
- with each peer even when the client is choked. This will allow peers to =
- know if=20
- the client will begin downloading when it is unchoked (and =
- vice-versa).</P>
- <H3> <SPAN id=3D"Data_Types" class=3D"mw-headline"> Data Types =
- </SPAN></H3>
- <P>Unless specified otherwise, all integers in the peer wire protocol =
- are=20
- encoded as four byte big-endian values. This includes the length prefix =
- on all=20
- messages that come after the handshake.</P>
- <H3> <SPAN id=3D"Message_flow" class=3D"mw-headline"> Message flow =
- </SPAN></H3>
- <P>The peer wire protocol consists of an initial handshake. After that, =
- peers=20
- communicate via an exchange of length-prefixed messages. The =
- length-prefix is=20
- an integer as described above.</P>
- <H3> <SPAN id=3D"Handshake" class=3D"mw-headline"> Handshake =
- </SPAN></H3>
- <P>The handshake is a required message and must be the first message =
- transmitted=20
- by the client. It is (49+len(pstr)) bytes long.</P>
- <P><I>handshake:=20
- <pstrlen><pstr><reserved><info_hash><peer_id&g=
- t;</I>
- </P>
- <UL>
- <LI> <B>pstrlen</B>: string length of <pstr>, as a single raw =
- byte</LI>
- <LI> <B>pstr</B>: string identifier of the protocol</LI>
- <LI> <B>reserved</B>: eight (8) reserved bytes. All current =
- implementations=20
- use all zeroes. Each bit in these bytes can be used to change the =
- behavior of=20
- the protocol. <I>An email from Bram suggests that trailing bits =
- should be=20
- used first, so that leading bits may be used to change the meaning of =
- trailing=20
- bits.</I></LI>
- <LI> <B>info_hash</B>: 20-byte SHA1 hash of the info key in the =
- metainfo file.=20
- This is the same info_hash that is transmitted in tracker =
- requests.</LI>
- <LI> <B>peer_id</B>: 20-byte string used as a unique ID for the =
- client. This=20
- is usually the same peer_id that is transmitted in tracker requests =
- (but not=20
- always e.g. an anonymity option in Azureus).</LI></UL>
- <P>In version 1.0 of the BitTorrent protocol, pstrlen =3D 19, and pstr =
- =3D=20
- "BitTorrent protocol".</P>
- <P>The initiator of a connection is expected to transmit their handshake =
-
- immediately. The recipient may wait for the initiator's handshake, if =
- it is=20
- capable of serving multiple torrents simultaneously (torrents are =
- uniquely=20
- identified by their info<I>hash). However, the recipient must respond =
- as soon=20
- as it sees the info_hash part of the handshake (the peer id will =
- presumably be=20
- sent after the recipient sends its own handshake). The tracker's =
- NAT-checking=20
- feature does not send the peer_id field of the handshake.</I></P>
- <P>If a client receives a handshake with an info_hash that it is not =
- currently=20
- serving, then the client must drop the connection.</P>
- <P>If the initiator of the connection receives a handshake in which the =
- peer_id=20
- does not match the expected peer<I>id, then the initiator is expected to =
- drop=20
- the connection. </I>Note that the initiator presumably received the =
- peer=20
- information from the tracker, which includes the peer_id that was =
- registered by=20
- the peer. The peer_id from the tracker and in the handshake are =
- expected to=20
- match.</P>
- <H4> <SPAN id=3D"peer_id" class=3D"mw-headline"> peer_id </SPAN></H4>
- <P>The peer_id is exactly 20 bytes (characters) long.</P>
- <P>There are mainly two conventions how to encode client and client =
- version=20
- information into the peer_id, Azureus-style and Shadow's-style.</P>
- <P>Azureus-style uses the following encoding: '-', two characters for =
- client id,=20
- four ascii digits for version number, '-', followed by random =
- numbers.</P>
- <P>For example: '-AZ2060-'...</P>
- <P>known clients that uses this encoding style are:</P>
- <UL>
- <LI> 'AG' - <A class=3D"external text" =
- href=3D"http://aresgalaxy.sourceforge.net/"=20
- rel=3D"nofollow">Ares</A></LI>
- <LI> 'A~' - <A class=3D"external text" =
- href=3D"http://aresgalaxy.sourceforge.net/"=20
- rel=3D"nofollow">Ares</A></LI>
- <LI> 'AR' - <A class=3D"external text" =
- href=3D"http://dev.int64.org/arctic.html"=20
- rel=3D"nofollow">Arctic</A></LI>
- <LI> 'AT' - <A class=3D"external text" =
- href=3D"http://www.cyberartemis.com/" rel=3D"nofollow">Artemis</A>
- </LI>
- <LI> 'AX' - <A class=3D"external text" =
- href=3D"http://www.analogx.com/contents/download/network/bitpump.htm"=20
- rel=3D"nofollow">BitPump</A></LI>
- <LI> 'AZ' - <A class=3D"external text" href=3D"http://azureus.sf.net/" =
- rel=3D"nofollow">Azureus</A>
- </LI>
- <LI> 'BB' - <A class=3D"external text" =
- href=3D"http://www.btvampire.com/" rel=3D"nofollow">BitBuddy</A>
- </LI>
- <LI> 'BC' - <A class=3D"external text" =
- href=3D"http://www.bitcomet.com/" rel=3D"nofollow">BitComet</A>
- </LI>
- <LI> 'BF' - <A class=3D"external text" =
- href=3D"http://bitflu.workaround.ch/" rel=3D"nofollow">Bitflu</A>
- </LI>
- <LI> 'BG' - <A class=3D"external text" href=3D"http://btg.berlios.de/" =
- rel=3D"nofollow">BTG=20
- (uses Rasterbar libtorrent)</A></LI>
- <LI> 'BL' - <A class=3D"external text" =
- href=3D"http://www.bitblinder.com/" rel=3D"nofollow">BitBlinder</A>
- </LI>
- <LI> 'BP' - <A class=3D"external text" =
- href=3D"http://www.intelpeers.com/" rel=3D"nofollow">BitTorrent=20
- Pro (Azureus + spyware)</A></LI>
- <LI> 'BR' - <A class=3D"external text" =
- href=3D"http://www.bitrocket.org/" rel=3D"nofollow">BitRocket</A>
- </LI>
- <LI> 'BS' - <A class=3D"external text" =
- href=3D"http://btslave.sourceforge.net/"=20
- rel=3D"nofollow">BTSlave</A></LI>
- <LI> 'BW' - <A class=3D"external text" href=3D"http://bitwombat.com/" =
- rel=3D"nofollow">BitWombat</A>
- </LI>
- <LI> 'BX' - ~Bittorrent X</LI>
- <LI> 'CD' - <A class=3D"external text" =
- href=3D"http://www.rahul.net/dholmes/ctorrent/"=20
- rel=3D"nofollow">Enhanced CTorrent</A></LI>
- <LI> 'CT' - <A class=3D"external text" =
- href=3D"http://ctorrent.sourceforge.net/"=20
- rel=3D"nofollow">CTorrent</A></LI>
- <LI> 'DE' - <A class=3D"external text" =
- href=3D"http://www.deluge-torrent.org/"=20
- rel=3D"nofollow">DelugeTorrent</A></LI>
- <LI> 'DP' - <A class=3D"external text" =
- href=3D"http://www.propagatedata.com/" rel=3D"nofollow">Propagate=20
- Data Client</A></LI>
- <LI> 'EB' - <A class=3D"external text" href=3D"http://dywt.com.cn/"=20
- rel=3D"nofollow">EBit</A></LI>
- <LI> 'ES' - <A class=3D"external text" =
- href=3D"http://electricsheep.org/" rel=3D"nofollow">electric=20
- sheep</A></LI>
- <LI> 'FC' - <A class=3D"external text" =
- href=3D"http://www.filecroc.com/" rel=3D"nofollow">FileCroc</A>
- </LI>
- <LI> 'FT' - <A class=3D"external text" =
- href=3D"http://www.foxtorrent.com/" rel=3D"nofollow">FoxTorrent</A>
- </LI>
- <LI> 'GS' - <A class=3D"external text" =
- href=3D"http://sourceforge.net/projects/gstorrent"=20
- rel=3D"nofollow">GSTorrent</A></LI>
- <LI> 'HK' - <A class=3D"external text" =
- href=3D"http://www.pps.jussieu.fr/~jch/software/hekate/"=20
- rel=3D"nofollow">Hekate</A></LI>
- <LI> 'HL' - <A class=3D"external text" =
- href=3D"http://www.binarynotions.com/halite.php"=20
- rel=3D"nofollow">Halite</A></LI>
- <LI> 'HN' - <A class=3D"external text" href=3D"http://hydranode.com/" =
- rel=3D"nofollow">Hydranode</A>
- </LI>
- <LI> 'KG' - <A class=3D"external text" =
- href=3D"http://kget.sourceforge.net/" rel=3D"nofollow">KGet</A>
- </LI>
- <LI> 'KT' - <A class=3D"external text" href=3D"http://ktorrent.org/" =
- rel=3D"nofollow">KTorrent</A>
- </LI>
- <LI> 'LC' - <A class=3D"external text" href=3D"http://leechcraft.org/" =
- rel=3D"nofollow">LeechCraft</A>
- </LI>
- <LI> 'LH' - <A class=3D"external text" =
- href=3D"http://code.google.com/p/lh-abc"=20
- rel=3D"nofollow">LH-ABC</A></LI>
- <LI> 'LP' - <A class=3D"external text" href=3D"http://www.lphant.com/" =
- rel=3D"nofollow">Lphant</A>
- </LI>
- <LI> 'LT' - <A class=3D"external text" =
- href=3D"http://libtorrent.sf.net/" rel=3D"nofollow">libtorrent</A>
- </LI>
- <LI> 'lt' - <A class=3D"external text" =
- href=3D"http://libtorrent.rakshasa.no/"=20
- rel=3D"nofollow">libTorrent</A></LI>
- <LI> 'LW' - <A class=3D"external text" =
- href=3D"http://www.limewire.org/" rel=3D"nofollow">LimeWire</A>
- </LI>
- <LI> 'MK' - <A class=3D"external text" =
- href=3D"http://www.themeerkat.net/" rel=3D"nofollow">Meerkat</A>
- </LI>
- <LI> 'MO' - <A class=3D"external text" =
- href=3D"http://monotorrent.blogspot.com/"=20
- rel=3D"nofollow">MonoTorrent</A></LI>
- <LI> 'MP' - <A class=3D"external text" =
- href=3D"http://www.moopolice.de/" rel=3D"nofollow">MooPolice</A>
- </LI>
- <LI> 'MR' - <A class=3D"external text" =
- href=3D"http://www.getmiro.com/" rel=3D"nofollow">Miro</A>
- </LI>
- <LI> 'MT' - <A class=3D"external text" =
- href=3D"http://www.moonlighttorrent.com/"=20
- rel=3D"nofollow">MoonlightTorrent</A></LI>
- <LI> 'NX' - <A class=3D"external text" =
- href=3D"http://www.xi-soft.com/" rel=3D"nofollow">Net=20
- Transport</A></LI>
- <LI> 'OS' - <A class=3D"external text" =
- href=3D"http://oneswarm.cs.washington.edu/"=20
- rel=3D"nofollow">OneSwarm</A></LI>
- <LI> 'OT' - <A class=3D"external text" =
- href=3D"http://www.omegatorrent.com/" rel=3D"nofollow">OmegaTorrent</A>
- </LI>
- <LI> 'PD' - <A class=3D"external text" href=3D"http://www.pando.com/" =
- rel=3D"nofollow">Pando</A>
- </LI>
- <LI> 'PT' - <A class=3D"external text" =
- href=3D"http://php-tracker.org/" rel=3D"nofollow">PHPTracker</A>
- </LI>
- <LI> 'qB' - <A class=3D"external text" =
- href=3D"http://www.qbittorrent.org/" rel=3D"nofollow">qBittorrent</A>
- </LI>
- <LI> 'QD' - <A class=3D"external text" =
- href=3D"http://im.qq.com/cyclone/" rel=3D"nofollow">QQDownload</A>
- </LI>
- <LI> 'QT' - Qt 4 Torrent example</LI>
- <LI> 'RT' - <A class=3D"external text" =
- href=3D"http://www.halogenware.com/software/retriever.html"=20
- rel=3D"nofollow">Retriever</A></LI>
- <LI> 'RZ' - <A class=3D"external text" =
- href=3D"https://launchpad.net/reztorrent"=20
- rel=3D"nofollow">RezTorrent</A></LI>
- <LI> 'S~' - <A class=3D"external text" =
- href=3D"http://shareaza.sourceforge.net/"=20
- rel=3D"nofollow">Shareaza alpha/beta</A></LI>
- <LI> 'SB' - ~Swiftbit</LI>
- <LI> 'SD' - <A class=3D"external text" href=3D"http://www.xunlei.com/" =
- rel=3D"nofollow">Thunder=20
- (aka X=C3=B9nL=C3=A9i)</A></LI>
- <LI> 'SM' - <A class=3D"external text" href=3D"http://www.somud.com/" =
- rel=3D"nofollow">SoMud</A>
- </LI>
- <LI> 'SS' - SwarmScope</LI>
- <LI> 'ST' - <A class=3D"external text" =
- href=3D"http://symtorrent.aut.bme.hu/" rel=3D"nofollow">SymTorrent</A>
- </LI>
- <LI> 'st' - <A class=3D"external text" =
- href=3D"http://sharktorrent.com/" rel=3D"nofollow">sharktorrent</A>
- </LI>
- <LI> 'SZ' - <A class=3D"external text" =
- href=3D"http://shareaza.sourceforge.net/"=20
- rel=3D"nofollow">Shareaza</A></LI>
- <LI> 'TN' - TorrentDotNET</LI>
- <LI> 'TR' - <A class=3D"external text" =
- href=3D"http://www.transmissionbt.com/"=20
- rel=3D"nofollow">Transmission</A></LI>
- <LI> 'TS' - <A class=3D"external text" =
- href=3D"http://www.torrentstorm.com/" rel=3D"nofollow">Torrentstorm</A>
- </LI>
- <LI> 'TT' - <A class=3D"external text" href=3D"http://www.tuotu.com/" =
- rel=3D"nofollow">TuoTu</A>
- </LI>
- <LI> 'UL' - uLeecher!</LI>
- <LI> 'UM' - <A class=3D"external text" =
- href=3D"http://mac.utorrent.com/" rel=3D"nofollow">=C2=B5Torrent=20
- for Mac</A></LI>
- <LI> 'UT' - <A class=3D"external text" =
- href=3D"http://www.utorrent.com/" rel=3D"nofollow">=C2=B5Torrent</A>
- </LI>
- <LI> 'VG' - <A class=3D"external text" href=3D"http://www.vagaa.com/" =
- rel=3D"nofollow">Vagaa</A>
- </LI>
- <LI> 'WT' - <A class=3D"external text" href=3D"http://www.bitlet.org/" =
- rel=3D"nofollow">BitLet</A>
- </LI>
- <LI> 'WY' - <A class=3D"external text" =
- href=3D"http://www.wyzo.com/firetorrent/"=20
- rel=3D"nofollow">FireTorrent</A></LI>
- <LI> 'XL' - <A class=3D"external text" href=3D"http://www.xunlei.com/" =
- rel=3D"nofollow">Xunlei</A>
- </LI>
- <LI> 'XS' - XSwifter</LI>
- <LI> 'XT' - <A class=3D"external text" =
- href=3D"http://www.xantorrent.pwp.blueyonder.co.uk/xantorrent.zip"=20
- rel=3D"nofollow">XanTorrent</A></LI>
- <LI> 'XX' - <A class=3D"external text" =
- href=3D"http://www.xtorrent.com/" rel=3D"nofollow">Xtorrent</A>
- </LI>
- <LI> 'ZT' - <A class=3D"external text" =
- href=3D"http://www.ziptorrent.com/" rel=3D"nofollow">ZipTorrent</A>
- </LI></UL>
- <P>Clients which have been seen in the wild and need to be =
- identified:</P>
- <UL>
- <LI> 'BD' (example: -BD0300-)</LI>
- <LI> 'NP' (example: -NP0201-)</LI>
- <LI> 'wF' (example: -wF2200-)</LI>
- <LI> 'hk' (example: -hk0010-) Chinese IP address, unrequestedly sends =
- info=20
- dict in message 0xA, reconnects immediately after being disconnected, =
- reserved=20
- bytes =3D 01,01,01,01,00,00,02,01</LI></UL>
- <P>Shadow's style uses the following encoding: one ascii alphanumeric =
- for client=20
- identification, up to five characters for version number (padded with =
- '-' if=20
- less than five), followed by three characters (commonly '---', but not =
- always=20
- the case), followed by random characters. Each character in the version =
- string=20
- represents a number from 0 to 63. '0'=3D0, ..., '9'=3D9, 'A'=3D10, ..., =
- 'Z'=3D35,=20
- 'a'=3D36, ..., 'z'=3D61, '.'=3D62, '-'=3D63.</P>
- <P>A full explanation by Shad0w about the encoding style (including =
- information=20
- about existing conventions on how the three characters after the version =
- string=20
- are used) can be found <A class=3D"external text" =
- href=3D"http://forums.degreez.net/viewtopic.php?t=3D7070"=20
- rel=3D"nofollow">here</A>.</P>
- <P>For example: 'S58B-----'... for Shadow's 5.8.11</P>
- <P>known clients that uses this encoding style are:</P>
- <UL>
- <LI> 'A' - <A class=3D"external text" =
- href=3D"http://pingpong-abc.sourceforge.net/"=20
- rel=3D"nofollow">ABC</A></LI>
- <LI> 'O' - <A class=3D"external text" =
- href=3D"http://osprey.ibiblio.org/" rel=3D"nofollow">Osprey=20
- Permaseed</A></LI>
- <LI> 'Q' - <A class=3D"external text" =
- href=3D"http://btqueue.sourceforge.net/"=20
- rel=3D"nofollow">BTQueue</A></LI>
- <LI> 'R' - <A class=3D"external text" href=3D"http://www.tribler.org/" =
- rel=3D"nofollow">Tribler</A>
- </LI>
- <LI> 'S' - <A class=3D"external text" href=3D"http://bt.degreez.net/" =
- rel=3D"nofollow">Shadow's=20
- client</A></LI>
- <LI> 'T' - <A class=3D"external text" href=3D"http://bittornado.com/" =
- rel=3D"nofollow">BitTornado</A>
- </LI>
- <LI> 'U' - <A class=3D"external text" =
- href=3D"http://aaron2003.myftp.org/upnpclient.html"=20
- rel=3D"nofollow">UPnP NAT Bit Torrent</A></LI></UL>
- <P>Bram's client now uses this style... 'M3-4-2--' or 'M4-20-8-'.</P>
- <P><A class=3D"external text" href=3D"http://www.bitcomet.com/"=20
- rel=3D"nofollow">BitComet</A> does something different still. Its =
- peer_id consists=20
- of four ASCII characters 'exbc', followed by two bytes x and y, followed =
- by=20
- random characters. The version number is x in decimal before the decimal =
- point=20
- and y as two decimal digits after the decimal point. <A =
- class=3D"external text"=20
- href=3D"http://www.bitlord.com/" rel=3D"nofollow">BitLord</A> uses the =
- same scheme,=20
- but adds 'LORD' after the version bytes. An <A class=3D"external text" =
- href=3D"http://solidox.org/bc/"=20
- rel=3D"nofollow">unofficial patch</A> for BitComet once replaced 'exbc' =
- with=20
- 'FUTB'. The encoding for BitComet Peer IDs changed to Azureus-style as =
- of=20
- BitComet version 0.59.</P>
- <P><A class=3D"external text" =
- href=3D"http://xbtt.sourceforge.net/client/" rel=3D"nofollow">XBT=20
- Client</A> has its own style too. Its peer_id consists of the three =
- uppercase=20
- characters 'XBT' followed by three ASCII digits representing the version =
- number.=20
- If the client is a debug build, the seventh byte is the lowercase =
- character=20
- 'd', otherwise it is a '-'. Following that is a '-' then random digits, =
-
- uppercase and lowercase letters. Example: 'XBT054d-' at the beginning =
- would=20
- indicate a debug build of version 0.5.4.</P>
- <P><A class=3D"external text" href=3D"http://www.opera.com/" =
- rel=3D"nofollow">Opera 8=20
- previews and Opera 9.x releases</A> use the following peer_id scheme: =
- The first=20
- two characters are 'OP' and the next four digits equal the build number. =
- All=20
- following characters are random lowercase hexdecimal digits.</P>
- <P><A class=3D"external text" =
- href=3D"http://mldonkey.sourceforge.net/Main_Page"=20
- rel=3D"nofollow">MLdonkey</A> use the following peer_id scheme: the =
- first=20
- characters are '-ML' followed by a dotted version then a '-' followed by =
-
- randomness. e.g. '-ML2.7.2-kgjjfkd'</P>
- <P><A class=3D"external text" href=3D"http://www.bitsonwheels.com/"=20
- rel=3D"nofollow">Bits on Wheels</A> uses the pattern =
- '-BOWxxx-yyyyyyyyyyyy', where=20
- y is random (uppercase letters) and x depends on the version. Version =
- 1.0.6 has=20
- xxx =3D A0C.</P>
- <P><A class=3D"external text" href=3D"http://queenbee.se/" =
- rel=3D"nofollow">Queen=20
- Bee</A> uses Bram's new style: 'Q1-0-0--' or 'Q1-10-0-' followed by =
- random=20
- bytes.</P>
- <P><A class=3D"external text" =
- href=3D"http://bittyrant.cs.washington.edu/" =
- rel=3D"nofollow">BitTyrant</A>=20
- is an Azureus fork and simply uses 'AZ2500BT' + random bytes as peer ID =
- in its=20
- 1.1 version. Note the missing dashes.</P>
- <P><A class=3D"external text" href=3D"http://www.torrentopia.org/"=20
- rel=3D"nofollow">TorrenTopia</A> version 1.90 pretends to be or is =
- derived from=20
- Mainline 3.4.6. Its peer ID starts with '346------'.</P>
- <P><A class=3D"external text" href=3D"http://www.167bt.com/intl/"=20
- rel=3D"nofollow">BitSpirit</A> has several modes for its peer ID. In one =
- mode it=20
- reads the ID of its peer and reconnects using the first eight bytes as a =
- basis=20
- for its own ID. Its real ID appears to use '\0\3BS' (C notation) as the =
- first=20
- four bytes for version 3.x and '\0\2BS' for version 2.x. In all modes =
- the ID may=20
- end in 'UDP0'. Since BitSpirit 3.6 the peer ID uses Azureus style with=20
- characters 'SP' but without trailing '-' (as FlashGet).</P>
- <P><A class=3D"external text" href=3D"http://rufus.sourceforge.net/"=20
- rel=3D"nofollow">Rufus</A> uses its version as decimal ASCII values for =
- the first=20
- two bytes. The third and fourth bytes are 'RS'. What then follows is the =
-
- nickname of the user and some random bytes.</P>
- <P><A class=3D"external text" href=3D"http://g3torrent.sourceforge.net/" =
- rel=3D"nofollow">G3=20
- Torrent</A> starts its peer ID with '-G3' and appends up to 9 characters =
- of the=20
- nickname of the user.</P>
- <P><A class=3D"external text" href=3D"http://www.flashget.com/"=20
- rel=3D"nofollow">FlashGet</A> uses Azureus style with 'FG' but without =
- the=20
- trailing '-'. Version 1.82.1002 still uses the version digits =
- '0180'.</P>
- <P><A class=3D"external text" href=3D"http://www.btnext.com/" =
- rel=3D"nofollow">BT Next=20
- Evolution</A> is derived from BitTornado but tries to mimic Azureus =
- style. The=20
- result is that its peer ID starts with '-NE', continues with a 4 digit =
- version=20
- number and then directly goes on with the three characters that describe =
- the=20
- type of client in Shad0w's peer ID style.</P>
- <P><A class=3D"external text" href=3D"http://www.allpeers.com/"=20
- rel=3D"nofollow">AllPeers</A> takes the sha1 hash of a user dependent =
- string and=20
- replaces the first few characters with "AP" + version string + "-".</P>
- <P><A class=3D"external text" href=3D"http://www.qvod.com/" =
- rel=3D"nofollow">Qvod</A>=20
- starts its id with the four letters "QVOD" and continues with its build =
- number=20
- in four decimal digits (currently "0054"). The remaining 12 characters =
- are=20
- random uppercase hexdecimal digits. There appears to be a popular =
- modified=20
- client in China that replaces the four characters in the beginning with =
- random=20
- bytes.</P>
- <P><A class=3D"external text" href=3D"http://www.spywareterminator.com/" =
- rel=3D"nofollow">SpywareTerminator</A>=20
- uses libtorrent to share its signature updates among users. It uses =
- Azureus=20
- style with 'CS' and version digits '2500'. </P>
- <P>Many clients are using all random numbers or 12 zeroes followed by =
- random=20
- numbers (like older versions of <A class=3D"external text" =
- href=3D"http://www.bittorrent.com/"=20
- rel=3D"nofollow">Bram's client</A>).</P>
- <H3> <SPAN id=3D"Messages" class=3D"mw-headline">Messages</SPAN></H3>
- <P>All of the remaining messages in the protocol take the form of =
- <length=20
- prefix><message ID><payload>. The length prefix is a =
- four byte=20
- big-endian value. The message ID is a single decimal byte. The payload =
- is=20
- message dependent.</P>
- <H4> <SPAN id=3D"keep-alive:_.3Clen.3D0000.3E" =
- class=3D"mw-headline">keep-alive:=20
- <len=3D0000></SPAN></H4>
- <P>The <B>keep-alive</B> message is a message with zero bytes, specified =
- with=20
- the length prefix set to zero. There is no message ID and no payload. =
- Peers=20
- may close a connection if they receive no messages (<B>keep-alive</B> or =
- any=20
- other message) for a certain period of time, so a keep-alive message =
- must be=20
- sent to maintain the connection <I>alive</I> if no command have been =
- sent for a=20
- given amount of time. This amount of time is generally two minutes.</P>
- <H4> <SPAN id=3D"choke:_.3Clen.3D0001.3E.3Cid.3D0.3E" =
- class=3D"mw-headline">choke:=20
- <len=3D0001><id=3D0></SPAN></H4>
- <P>The <B>choke</B> message is fixed-length and has no payload.</P>
- <H4> <SPAN id=3D"unchoke:_.3Clen.3D0001.3E.3Cid.3D1.3E" =
- class=3D"mw-headline">=20
- unchoke: <len=3D0001><id=3D1> </SPAN></H4>
- <P>The <B>unchoke</B> message is fixed-length and has no payload.</P>
- <H4> <SPAN id=3D"interested:_.3Clen.3D0001.3E.3Cid.3D2.3E" =
- class=3D"mw-headline">=20
- interested: <len=3D0001><id=3D2> </SPAN></H4>
- <P>The <B>interested</B> message is fixed-length and has no payload.</P>
- <H4> <SPAN id=3D"not_interested:_.3Clen.3D0001.3E.3Cid.3D3.3E"=20
- class=3D"mw-headline"> not interested: <len=3D0001><id=3D3> =
- </SPAN></H4>
- <P>The <B>not interested</B> message is fixed-length and has no =
- payload.</P>
- <H4> <SPAN id=3D"have:_.3Clen.3D0005.3E.3Cid.3D4.3E.3Cpiece_index.3E" =
- class=3D"mw-headline">=20
- have: <len=3D0005><id=3D4><piece index> </SPAN></H4>
- <P>The <B>have</B> message is fixed length. The payload is the =
- zero-based index=20
- of a piece that has just been successfully downloaded and verified via =
- the hash.
- </P>
- <P><I>Implementer's Note: That is the strict definition, in reality some =
- games=20
- may be played. In particular because peers are extremely unlikely to =
- download=20
- pieces that they already have, a peer may choose not to advertise having =
- a piece=20
- to a peer that already has that piece. At a minimum "HAVE suppression" =
- will=20
- result in a 50% reduction in the number of HAVE messages, this =
- translates to=20
- around a 25-35% reduction in protocol overhead. At the same time, it may =
- be=20
- worthwhile to send a HAVE message to a peer that has that piece already =
- since it=20
- will be useful in determining which piece is rare.</I></P>
- <P><I>A malicious peer might also choose to advertise having pieces that =
- it=20
- knows the peer will never download. Due to this attempting to model =
- peers using=20
- this information is a <B>bad idea</B></I>.</P>
- <H4> <SPAN =
- id=3D"bitfield:_.3Clen.3D0001.2BX.3E.3Cid.3D5.3E.3Cbitfield.3E" =
- class=3D"mw-headline">=20
- bitfield: <len=3D0001+X><id=3D5><bitfield> =
- </SPAN></H4>
- <P>The <B>bitfield</B> message may only be sent immediately after the=20
- handshaking sequence is completed, and before any other messages are =
- sent. It=20
- is optional, and need not be sent if a client has no pieces.</P>
- <P>The <B>bitfield</B> message is variable length, where X is the length =
- of the=20
- bitfield. The payload is a bitfield representing the pieces that have =
- been=20
- successfully downloaded. The high bit in the first byte corresponds to =
- piece=20
- index 0. Bits that are cleared indicated a missing piece, and set bits =
- indicate=20
- a valid and available piece. Spare bits at the end are set to zero.</P>
- <P>Some clients (Deluge for example) send <B>bitfield</B> with missing =
- pieces=20
- even if it has all data. Then it sends rest of pieces as <B>have</B> =
- messages.=20
- They are saying this helps against ISP filtering of BitTorrent protocol. =
- It is=20
- called <B>lazy bitfield</B>.</P>
- <P><I>A bitfield of the wrong length is considered an error. Clients =
- should drop=20
- the connection if they receive bitfields that are not of the correct =
- size, or if=20
- the bitfield has any of the spare bits set.</I></P>
- <H4> <SPAN =
- id=3D"request:_.3Clen.3D0013.3E.3Cid.3D6.3E.3Cindex.3E.3Cbegin.3E.3Clengt=
- h.3E"=20
- class=3D"mw-headline"> request:=20
- <len=3D0013><id=3D6><index><begin><length> =
-
- </SPAN></H4>
- <P>The <B>request</B> message is fixed length, and is used to request a =
- block. =20
- The payload contains the following information:</P>
- <UL>
- <LI> <B>index</B>: integer specifying the zero-based piece index</LI>
- <LI> <B>begin</B>: integer specifying the zero-based byte offset =
- within the=20
- piece</LI>
- <LI> <B>length</B>: integer specifying the requested length.</LI></UL>
- <P><I><B>This section is under dispute! Please use the <A =
- class=3D"external text"=20
- href=3D"http://wiki.theory.org/Talk:BitTorrentSpecification#Messages:_req=
- uest"=20
- rel=3D"nofollow">discussion page</A> to resolve this!</B></I></P>
- <P><I><B>View #1</B></I>According to the official specification, "All =
- current=20
- implementations use 2^15 (32KB), and close connections which request an =
- amount=20
- greater than 2^17 (128KB)." As early as version 3 or 2004, this behavior =
- was=20
- changed to use 2^14 (16KB) blocks. As of version 4.0 or mid-2005, the =
- mainline=20
- disconnected on requests larger than 2^14 (16KB); and some clients have =
- followed=20
- suit. Note that block requests are smaller than pieces (>=3D2^18 =
- bytes), so=20
- multiple requests will be needed to download a whole piece.</P>
- <P><I>Strictly, the specification allows 2^15 (32KB) requests. The =
- reality is=20
- near all clients will now use 2^14 (16KB) requests. Due to clients that =
- enforce=20
- that size, it is recommended that implementations make requests of that =
- size.=20
- Due to smaller requests resulting in higher overhead due to tracking a =
- greater=20
- number of requests, implementers are advised against going below 2^14=20
- (16KB).</I></P>
- <P><I>The choice of request block size limit enforcement is not nearly =
- so clear=20
- cut. With mainline version 4 enforcing 16KB requests, most clients will =
- use that=20
- size. At the same time 2^14 (16KB) is the </I>semi<I>-official (only =
- </I>semi<I>=20
- because the official protocol document has not been updated) limit now, =
- so=20
- enforcing that isn't wrong. At the same time, allowing larger requests =
- enlarges=20
- the set of possible peers, and except on very low bandwidth connections=20
- (<256kbps) multiple blocks will be downloaded in one =
- choke-timeperiod, thus=20
- merely enforcing the old limit causes minimal performance degradation. =
- Due to=20
- this factor, it is recommended that only the older 2^17 (128KB) maximum =
- size=20
- limit be enforced.</I></P>
- <P><I><B>View #2</B></I>This section has contained falsehoods for a =
- large=20
- portion of the time this page has existed. This is the third time I =
- (uau) am=20
- correcting this same section for incorrect information being added, so I =
- won't=20
- rewrite it completely since it'll probably be broken again... Current =
- version=20
- has at least the following errors: Mainline started using 2^14 (16384) =
- byte=20
- requests when it was still the only client in existence; only the =
- "official=20
- specification" still talked about the obsolete 32768 byte value which =
- was in=20
- reality neither the default size nor maximum allowed. In version 4 the =
- request=20
- behavior did not change, but the maximum allowed size did change to =
- equal the=20
- default size. In latest mainline versions the max has changed to 32768 =
- (note=20
- that this is the first appearance of 32768 for either default or max =
- size since=20
- the first ancient versions). "Most older clients use 32KB requests" is =
- false.=20
- Discussion of larger requests fails to take latency effects into =
- account.</P>
- <H4> <SPAN =
- id=3D"piece:_.3Clen.3D0009.2BX.3E.3Cid.3D7.3E.3Cindex.3E.3Cbegin.3E.3Cblo=
- ck.3E"=20
- class=3D"mw-headline"> piece:=20
- <len=3D0009+X><id=3D7><index><begin><block>=
- =20
- </SPAN></H4>
- <P>The <B>piece</B> message is variable length, where X is the length of =
- the=20
- block. The payload contains the following information:</P>
- <UL>
- <LI> <B>index</B>: integer specifying the zero-based piece index</LI>
- <LI> <B>begin</B>: integer specifying the zero-based byte offset =
- within the=20
- piece</LI>
- <LI> <B>block</B>: block of data, which is a subset of the piece =
- specified by=20
- index.</LI></UL>
- <H4> <SPAN =
- id=3D"cancel:_.3Clen.3D0013.3E.3Cid.3D8.3E.3Cindex.3E.3Cbegin.3E.3Clength=
- .3E"=20
- class=3D"mw-headline"> cancel:=20
- <len=3D0013><id=3D8><index><begin><length> =
-
- </SPAN></H4>
- <P>The <B>cancel</B> message is fixed length, and is used to cancel =
- block=20
- requests. The payload is identical to that of the "request" message. =
- It is=20
- typically used during "End Game" (see the Algorithms section below).</P>
- <H4> <SPAN id=3D"port:_.3Clen.3D0003.3E.3Cid.3D9.3E.3Clisten-port.3E" =
- class=3D"mw-headline">=20
- port: <len=3D0003><id=3D9><listen-port> </SPAN></H4>
- <P>The <B>port</B> message is sent by newer versions of the Mainline =
- that=20
- implements a DHT tracker. The listen port is the port this peer's DHT =
- node is=20
- listening on. This peer should be inserted in the local routing table =
- (if DHT=20
- tracker is supported).</P>
- <H2> <SPAN id=3D"Algorithms" class=3D"mw-headline"> Algorithms =
- </SPAN></H2>
- <H3> <SPAN id=3D"Queuing" class=3D"mw-headline"> Queuing </SPAN></H3>
- <P><I><B>This section is under dispute! Please use the <A =
- class=3D"external text"=20
- href=3D"http://wiki.theory.org/Talk:BitTorrentSpecification#Algorithms:_Q=
- ueuing"=20
- rel=3D"nofollow">discussion page</A> to resolve this!</B></I></P>
- <P><I><B>View #1</B></I>In general peers are advised to keep a few =
- unfullfilled=20
- requests on each connection. This is done because otherwise a full round =
- trip is=20
- required from the download of one block to begining the download of a =
- new block=20
- (round trip between PIECE message and next REQUEST message). On links =
- with high=20
- BDP (bandwidth-delay-product, high latency or high bandwidth), this can =
- result=20
- in a substantial performance loss.</P>
- <P><I>Implementer's note: This is the <B>most crucial performance =
- item</B>. A=20
- static queue of 10 requests is reasonable for 16KB blocks on a 5mbps =
- link with=20
- 50ms latency. Links with greater bandwidth are becoming very common so =
- UI=20
- designers are urged to make this readily available for changing. Notably =
- cable=20
- modems were known for traffic policing and increasing this might of =
- alleviated=20
- some of the problems caused by this.</I></P>
- <P><I><B>View #2</B></I>NOTE: much of the information in this "Queuing" =
- section=20
- is false or misleading. I'll just note that the "defaults to 5 =
- outstanding=20
- requests" hasn't been true for a long time, "32 KB blocks" is misleading =
- since=20
- you normally don't use 32 KB blocks, and tuning queue length by changing =
- it and=20
- trying to measure the effects is a bad idea.</P>
- <H3> <SPAN id=3D"Super_Seeding" class=3D"mw-headline"> Super Seeding =
- </SPAN></H3>
- <P><I>(This was not part of the original specification)</I></P>
- <P><I>The super-seed feature in S-5.5 and on is a new seeding algorithm =
- designed=20
- to help a torrent initiator with limited bandwidth "pump up" a large =
- torrent,=20
- reducing the amount of data it needs to upload in order to spawn new =
- seeds in=20
- the torrent.</I></P>
- <P><I>When a seeding client enters "super-seed mode", it will not act as =
- a=20
- standard seed, but masquerades as a normal client with no data. As =
- clients=20
- connect, it will then inform them that it received a piece -- a piece =
- that was=20
- never sent, or if all pieces were already sent, is very rare. This will =
- induce=20
- the client to attempt to download only that piece.</I></P>
- <P><I>When the client has finished downloading the piece, the seed will =
- not=20
- inform it of any other pieces until it has seen the piece it had sent =
- previously=20
- present on at least one other client. Until then, the client will not =
- have=20
- access to any of the other pieces of the seed, and therefore will not =
- waste the=20
- seed's bandwidth.</I></P>
- <P><I>This method has resulted in much higher seeding efficiencies, by =
- both=20
- inducing peers into taking only the rarest data, reducing the amount of=20
- redundant data sent, and limiting the amount of data sent to peers which =
- do not=20
- contribute to the swarm. Prior to this, a seed might have to upload 150% =
- to 200%=20
- of the total size of a torrent before other clients became seeds. =
- However, a=20
- large torrent seeded with a single client running in super-seed mode was =
- able to=20
- do so after only uploading 105% of the data. This is 150-200% more =
- efficient=20
- than when using a standard seed.</I></P>
- <P><I>Super-seed mode is '</I>NOT<I> recommended for general use. While =
- it does=20
- assist in the wider distribution of rare data, because it limits the =
- selection=20
- of pieces a client can downlad, it also limits the ability of those =
- clients to=20
- download data for pieces they have already partially retrieved. =
- Therefore,=20
- super-seed mode is only recommended for initial seeding =
- servers.</I></P><PRE><I>Why not rename it to e.g. "Initial Seeding Mode" =
- or "Releaser Mode" then?</I>=0A=
- </PRE>
- <H3> <SPAN id=3D"Piece_downloading_strategy" class=3D"mw-headline"> =
- Piece=20
- downloading strategy </SPAN></H3>
- <P>Clients may choose to download pieces in random order.</P>
- <P><I>A better strategy is to download pieces in </I><A =
- title=3D"Availability"=20
- href=3D"http://wiki.theory.org/Availability">rarest first</A><I> order. =
- The=20
- client can determine this by keeping the initial bitfield from each =
- peer, and=20
- updating it with every <B>have</B> message. Then, the client can =
- download the=20
- pieces that appear least frequently in these peer bitfields. Note that =
- any=20
- Rarest First strategy should include randomization among at least =
- several of the=20
- least common pieces, as having many clients all attempting to jump on =
- the same=20
- "least common" piece would be counter productive.</I></P>
- <H3> <SPAN id=3D"End_Game" class=3D"mw-headline"> End Game </SPAN></H3>
- <P>When a download is almost complete, there's a tendency for the last =
- few=20
- blocks to trickle in slowly. To speed this up, the client sends requests =
- for all=20
- of its missing blocks to all of its peers. To keep this from becoming =
- horribly=20
- inefficient, the client also sends a cancel to everyone else every time =
- a block=20
- arrives.</P>
- <P><I>There is no documented thresholds, recommended percentages, or =
- block=20
- counts that could be used as a guide or Recommended Best Practice =
- here.</I></P>
- <P><I>When to enter end game mode is an area of discussion. Some clients =
- enter=20
- end game when all pieces have been requested. Others wait until the =
- number of=20
- blocks left is lower than the number of blocks in transit, and no more =
- than 20.=20
- There seems to be agreement that it's a good idea to keep the number of =
- pending=20
- blocks low (1 or 2 blocks) to minimize the overhead, and if you =
- randomize the=20
- blocks requested, there's a lower chance of downloading duplicates. More =
- on the=20
- protocol overhead can be found here:</I> <A class=3D"external free" =
- href=3D"http://hal.inria.fr/inria-00000156/en"=20
- rel=3D"nofollow">http://hal.inria.fr/inria-00000156/en</A>.</P>
- <H3> <SPAN id=3D"Choking_and_Optimistic_Unchoking" =
- class=3D"mw-headline"> Choking=20
- and Optimistic Unchoking </SPAN></H3>
- <P>Choking is done for several reasons. TCP congestion control behaves =
- very=20
- poorly when sending over many connections at once. Also, choking lets =
- each peer=20
- use a tit-for-tat-ish algorithm to ensure that they get a consistent =
- download=20
- rate.</P>
- <P>The choking algorithm described below is the currently deployed one. =
- It is=20
- very important that all new algorithms work well both in a network =
- consisting=20
- entirely of themselves and in a network consisting mostly of this =
- one.</P>
- <P>There are several criteria a good choking algorithm should meet. It =
- should=20
- cap the number of simultaneous uploads for good TCP performance. It =
- should avoid=20
- choking and unchoking quickly, known as 'fibrillation'. It should =
- reciprocate to=20
- peers who let it download. Finally, it should try out unused connections =
- once in=20
- a while to find out if they might be better than the currently used =
- ones, known=20
- as optimistic unchoking.</P>
- <P>The currently deployed choking algorithm avoids fibrillation by only =
- changing=20
- choked peers once every ten seconds.</P>
- <P>Reciprocation and number of uploads capping is managed by unchoking =
- the four=20
- peers which have the best upload rate and are interested. This =
- maximizes the=20
- client's download rate. These four peers are referred to as =
- <I>downloaders</I>,=20
- because they are interested in downloading from the client.</P>
- <P>Peers which have a better upload rate (as compared to the =
- <I>downloaders</I>)=20
- but aren't interested get unchoked. If they become interested, the=20
- <I>downloader</I> with the worst upload rate gets choked. If a client =
- has a=20
- complete file, it uses its upload rate rather than its download rate to =
- decide=20
- which peers to unchoke.</P>
- <P>For optimistic unchoking, at any one time there is a single peer =
- which is=20
- unchoked regardless of its upload rate (if interested, it counts as one =
- of the=20
- four allowed <I>downloaders</I>). Which peer is optimistically unchoked =
- rotates=20
- every 30 seconds. Newly connected peers are three times as likely to =
- start as=20
- the current optimistic unchoke as anywhere else in the rotation. This =
- gives=20
- them a decent chance of getting a complete piece to upload.</P>
- <H4> <SPAN id=3D"Anti-snubbing" class=3D"mw-headline"> Anti-snubbing =
- </SPAN></H4>
- <P>Occasionally a <A class=3D"new" title=3D"BitTorrent (page does not =
- exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- peer will be choked by all peers which it was formerly downloading from. =
- In such=20
- cases it will usually continue to get poor download rates until the =
- optimistic=20
- unchoke finds better peers. To mitigate this problem, when over a minute =
- goes by=20
- without getting any piece data while downloading from a peer, <A =
- class=3D"new"=20
- title=3D"BitTorrent (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- assumes it is "snubbed" by that peer and doesn't upload to it except as =
- an=20
- optimistic unchoke. This frequently results in more than one concurrent=20
- optimistic unchoke, (an exception to the exactly one optimistic unchoke =
- rule=20
- mentioned above), which causes download rates to recover much more =
- quickly when=20
- they falter.</P>
- <H2> <SPAN id=3D"Official_Extensions_To_The_Protocol" =
- class=3D"mw-headline">=20
- Official Extensions To The Protocol </SPAN></H2>
- <P>Currently there are a few official extensions to the protocol.</P>
- <H4> <SPAN id=3D"Fast_Peers_Extensions" class=3D"mw-headline"> Fast =
- Peers Extensions=20
- </SPAN></H4>
- <UL>
- <LI>Reserved Bit: The third least significant bit in the 8th reserved =
- byte=20
- i.e. reserved[7] |=3D 0x04 </LI></UL>
- <P>These extensions serve multiple purposes. They allow a peer to more =
- quickly=20
- bootstrap into a swarm by giving a peer a specific set of pieces which =
- they will=20
- be allowed download regardless of choked status. They reduce message =
- overhead by=20
- adding HaveAll and HaveNone messages and allow explicit rejection of =
- piece=20
- requests whereas previously only implicit rejection was possible meaning =
- that a=20
- peer might be left waiting for a piece that would never be =
- delivered.</P>
- <P>The specification is documented at the <A class=3D"new" =
- title=3D"BitTorrent (page does not exist)"=20
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- site here: <A class=3D"external free" =
- href=3D"http://bittorrent.org/beps/bep_0006.html"=20
- rel=3D"nofollow">http://bittorrent.org/beps/bep_0006.html</A>.</P>
- <H4> <SPAN id=3D"Distributed_Hash_Table" class=3D"mw-headline"> =
- Distributed Hash=20
- Table </SPAN></H4>
- <UL>
- <LI> Reserved Bit: The last bit in the 8th reserved byte i.e. =
- reserved[7] |=3D=20
- 0x01</LI></UL>
- <P>This extension is to allow for the tracking of peers downloading =
- torrents=20
- without the use of a standard tracker. A peer implementing this protocol =
- becomes=20
- a "tracker" and stores lists of other nodes/peers which can be used to =
- locate=20
- new peers.</P>
- <P>The specification is documented at the <A class=3D"new" =
- title=3D"BitTorrent (page does not exist)"=20
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- site here: <A class=3D"external free" =
- href=3D"http://bittorrent.org/beps/bep_0005.html"=20
- rel=3D"nofollow">http://bittorrent.org/beps/bep_0005.html</A>.</P>
- <P>BEP-32 extends the DHT with support for IPv6, and updates the =
- specification=20
- in some minor ways. <A class=3D"external free" =
- href=3D"http://www.pps.jussieu.fr/~jch/software/bittorrent/bep-dht-ipv6.h=
- tml"=20
- rel=3D"nofollow">http://www.pps.jussieu.fr/~jch/software/bittorrent/bep-d=
- ht-ipv6.html</A>
- </P>
- <H4> <SPAN id=3D"Connection_Obfuscation" class=3D"mw-headline"> =
- Connection=20
- Obfuscation </SPAN></H4>
- <P>This extension allows the creation of obfuscated (encrypted) =
- connections=20
- between peers. This can be used to bypass ISPs throttling BitTorrent =
- traffic.
- </P>
- <P>The specification is documented at <A class=3D"external free" =
- href=3D"http://www.azureuswiki.com/index.php/Message_Stream_Encryption"=20
- rel=3D"nofollow">http://www.azureuswiki.com/index.php/Message_Stream_Encr=
- yption</A>.
- </P>
- <P><I> The documentation is fairly complete, but ideally it would be =
- clarified=20
- on several points including guidance on when encrypted connections =
- should be=20
- attempted, fallback procedures to regular connections etc. </I></P>
- <H2> <SPAN id=3D"Unofficial_Extensions_To_The_Protocol" =
- class=3D"mw-headline">=20
- Unofficial Extensions To The Protocol </SPAN></H2>
- <H4> <SPAN id=3D"Azureus_Messaging_Protocol" class=3D"mw-headline"> =
- Azureus=20
- Messaging Protocol </SPAN></H4>
- <UL>
- <LI> Reserved Bit: 1</LI></UL>
- <P>A protocol in its own right - if two clients indicate they support =
- the=20
- protocol, then they should switch over to using it. It allows normal =
- BitTorrent=20
- as well extension messages to be sent over it, and is documented <A =
- class=3D"external text"=20
- href=3D"http://www.azureuswiki.com/index.php/Azureus_messaging_protocol" =
- rel=3D"nofollow">here</A>.=20
- Currently implemented by Azureus and Transmission.</P>
- <P>It is not possible to use both this protocol and the LibTorrent =
- extension=20
- protocol at the same time - if both clients indicate they support both, =
- then=20
- they should follow the semantics defined by the <A class=3D"external =
- text" =
- href=3D"http://www.azureuswiki.com/index.php/Extension_negotiation_protoc=
- ol"=20
- rel=3D"nofollow">Extension Negotiation Protocol</A>.</P>
- <H4> <SPAN id=3D"WebSeeding" class=3D"mw-headline"> WebSeeding =
- </SPAN></H4>
- <P>The possibility to seed a torrent via a web server is generally =
- called=20
- WebSeeding. It allows the HTTP server to work as a peer in the =
- BitTorrent=20
- network.</P>
- <P>There are at least two specification for how to combine a torrent =
- download=20
- with a HTTP download. The first standard, implemented by BitTornado is =
- quite=20
- easy to implement in the client, but is intrusive on the HTTP in that it =
-
- requires a script handling requests on the server side. i.e. A plain =
- HTTP server=20
- that just serves plain files isn't enough. The benfits is that the =
- script can be=20
- more abuse resistant. This specification is found here: <A =
- class=3D"external free"=20
- href=3D"http://bittornado.com/docs/webseed-spec.txt"=20
- rel=3D"nofollow">http://bittornado.com/docs/webseed-spec.txt</A>.</P>
- <P>The second specification requires slightly more from the client, but=20
- downloads from plain HTTP servers. It is specified here: <A =
- class=3D"external free"=20
- href=3D"http://www.getright.com/seedtorrent.html"=20
- rel=3D"nofollow">http://www.getright.com/seedtorrent.html</A>. It has =
- been=20
- implemented by GetRight, libtorrent, Mainline, BitComet, Vuze.</P>
- <H4> <SPAN id=3D"Extension_protocol" class=3D"mw-headline"> Extension =
- protocol=20
- </SPAN></H4>
- <UL>
- <LI> Reserved Bit: 44, the fourth most significant bit in the 6th =
- reserved=20
- byte i.e. reserved[5] |=3D 0x10</LI></UL>
- <P>This is a protocol for exchanging extension information and was =
- derived from=20
- an early version of azureus' extension protocol. It adds one message for =
-
- exchanging arbitrary handshake information including defined extension =
- messages,=20
- mapping extensions to specific message IDs. It is documented here:<A =
- class=3D"external free"=20
- href=3D"http://www.libtorrent.org/extension_protocol.html"=20
- rel=3D"nofollow">http://www.libtorrent.org/extension_protocol.html</A> =
- and is=20
- implemented at least by libtorrent, uTorrent, Mainline, Transmission, =
- Azureus=20
- and BitComet.</P>
- <P>It is not possible to use both this protocol and the Azureus =
- Messaging=20
- Protocol at the same time - if both clients indicate they support both, =
- then=20
- they should follow the semantics defined by the <A class=3D"external =
- text" =
- href=3D"http://www.azureuswiki.com/index.php/Extension_negotiation_protoc=
- ol"=20
- rel=3D"nofollow">Extension Negotiation Protocol</A>.</P>
- <H4> <SPAN id=3D"Extension_Negotiation_Protocol" class=3D"mw-headline"> =
- Extension=20
- Negotiation Protocol </SPAN></H4>
- <UL>
- <LI> Reserved bits: 47 and 48</LI></UL>
- <P>These bits are used to allow two clients that support both the =
- Azureus=20
- Messaging Protocol and LibTorrent's extension protocol to decide which =
- of the=20
- two extensions should be used for communication, and is defined <A =
- class=3D"external text"=20
- href=3D"http://www.azureuswiki.com/index.php/Extension_negotiation_protoc=
- ol" rel=3D"nofollow">here</A>.
- </P>
- <H4> <SPAN id=3D"BitTorrent_Location-aware_Protocol_1.0" =
- class=3D"mw-headline">=20
- BitTorrent Location-aware Protocol 1.0 </SPAN></H4>
- <UL>
- <LI> Reserved Bit: 21</LI></UL>
- <P>A Protocol, considering peers location (in geographical terms) for =
- better=20
- performance. Specification can be found <A class=3D"external text" =
- href=3D"http://wiki.theory.org/BitTorrent_Location-aware_Protocol_1.0_Spe=
- cification"=20
- rel=3D"nofollow">here</A>.</P>
- <H4> <SPAN id=3D"SimpleBT_Extension_Protocol" class=3D"mw-headline"> =
- SimpleBT=20
- Extension Protocol </SPAN></H4>
- <UL>
- <LI> Reserved Bits: fist reserved byte =3D 0x01, following bytes may =
- need to be=20
- set to zero</LI></UL>
- <P>An extension using message id 9 to add peer exchange and connection=20
- statistics exchange. The specification can be found <A class=3D"external =
- text"=20
- href=3D"http://web.archive.org/web/20031002201124/btfans.3322.org/simpleb=
- t/ProtocalExtension.txt"=20
- rel=3D"nofollow">here</A>. The extension was in use in SimpleBT 0.32 to =
- 0.36.1.=20
- Later versions of SimpleBT were called BitComet and used the similar but =
-
- incompatible BitComet Extension Protocol.</P>
- <H4> <SPAN id=3D"BitComet_Extension_Protocol" class=3D"mw-headline"> =
- BitComet=20
- Extension Protocol </SPAN></H4>
- <UL>
- <LI> Reserved Bits: first two reserved bytes =3D "ex"</LI></UL>
- <P>There appears to be no official documentation.</P>
- <P>In this protocol a peer announces the supported extensions by sending =
- a=20
- message <len=3D0001+X><id=3D0xA0><extension =
- 1>...<extension=20
- X> where <extension n> is (usually) the message id of the =
- supported=20
- extension. When an extension consists of multiple messages, all ids need =
- to be=20
- mentioned.</P>
- <P>Extensions currently in use (TODO: reverse engineer semantics):</P>
- <UL>
- <LI> 0xA0 (EXT_SUPPORT) see above, needs to be included in its =
- parameter list
- </LI>
- <LI> 0xA1 (EXT_PEERREQ) ask for peer exchange, used in conjunction =
- with=20
- EXT_PEERS</LI>
- <LI> 0xA2 (EXT_PEERS) in reply to EXT_PEERREQ and for updates =
- afterwards</LI>
- <LI> 0xA3 (EXT_AUTH_SEED) appeared in BitComet 0.53, used in =
- conjunction with=20
- EXT_AUTH_CRYPTOED</LI>
- <LI> 0xA4 (EXT_AUTH_CRYPTOED)</LI>
- <LI> 0xA5 (EXT_CONNGRANT) appeared in BitComet 0.48, used in =
- conjunction with=20
- EXT_CONNACCEPT</LI>
- <LI> 0xA6 (EXT_CONNACCEPT)</LI>
- <LI> 0x06 (?) announced by BitSpirit instead of EXT_CONNACCEPT</LI>
- <LI> 0xA7 (EXT_CHAT_MESSAGE) appeared in BitComet 0.53, vanished in =
- 0.71</LI>
- <LI> 0xA9 (EXT_HASH_REQ) appeared in BitComet 0.54, vanished in 0.71, =
- used in=20
- conjunction with EXT_HASH</LI>
- <LI> 0xAA (EXT_HASH)</LI>
- <LI> 0xAB (EXT_REPORT_RATE_old) appeared in BitComet 0.54, was =
- replaced by=20
- EXT_REPORT_RATE_new in 0.57</LI>
- <LI> 0xAC (EXT_REPORT_INFO) appeared in BitComet 0.54, vanished in =
- 0.71,=20
- reappeared in 0.82</LI>
- <LI> 0xAD (EXT_REPORT_RATE_new) appeared in BitComet 0.57, vanished in =
- 0.75,=20
- reappeared in 0.82</LI>
- <LI> 0xAE (EXT_BC_PASSPORT) appeared in BitComet 0.75</LI>
- <LI> 0xAF (EXT_DHE_PREFERRED) appeared in BitComet 0.75</LI>
- <LI> 0xB0 (?) appeared in BitComet 0.86</LI>
- <LI> 0xC0 (?) does not correspond to a message id, appeared in =
- BitComet 0.49
- </LI></UL>
- <P>A minimum implementation needs only accept EXT_SUPPORT, but =
- EXT_PEERREQ and=20
- EXT_PEERS are supported by all known implementations.</P>
- <H2> <SPAN id=3D"Reserved_Bytes" class=3D"mw-headline"> Reserved Bytes =
- </SPAN></H2>
- <P><I>The reserved bits are numbered 1-64 in the following table for =
- ease of=20
- identification. Bit 1 corresponds to the most significant bit of the =
- first=20
- reserved byte. Bit 8 corresponds to the least significant bit of the =
- first=20
- reserved byte (i.e. byte[0] |=3D 0x01). Bit 64 is the least significant =
- bit of the=20
- last reserved byte i.e. byte[7] |=3D 0x01</I></P>
- <P><I> An orange bit is a known unofficial extension, a red bit is an =
- unknown=20
- unofficial extension.</I></P>
- <TABLE border=3D"1">
- <CAPTION> Reserved Bits</CAPTION>
- <TBODY>
- <TR>
- <TH> Bit </TH>
- <TH> Use </TH>
- <TH> Azureus </TH>
- <TH> BitComet </TH>
- <TH> MainLine </TH>
- <TH> MonoTorrent </TH>
- <TH> =C2=B5Torrent </TH>
- <TH> libtorrent </TH>
- <TH> KTorrent </TH>
- <TH> BitLord </TH>
- <TH> XBT </TH>
- <TH> Transmission</TH></TR>
- <TR style=3D"background: orange;">
- <TD> 1 </TD>
- <TD> Azureus Extended Messaging </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes</TD></TR>
- <TR style=3D"background: orange;">
- <TD> 1-16 </TD>
- <TD> BitComet Extension protocol </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No</TD></TR>
- <TR style=3D"background: orange;">
- <TD> 21 </TD>
- <TD> BitTorrent Location-aware Protocol 1.0 </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No</TD></TR>
- <TR style=3D"background: orange;">
- <TD> 44 </TD>
- <TD> Extension protocol </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes</TD></TR>
- <TR style=3D"background: orange;">
- <TD> 47 - 48 </TD>
- <TD> Extension Negotiation Protocol </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes</TD></TR>
- <TR style=3D"background: orange;">
- <TD> 61 </TD>
- <TD> NAT Traversal </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ?</TD></TR>
- <TR>
- <TD> 62 </TD>
- <TD> Fast Peers </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ?</TD></TR>
- <TR style=3D"background: orange;">
- <TD> 63 </TD>
- <TD> XBT Peer Exchange </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> ?</TD></TR>
- <TR>
- <TD> 64 </TD>
- <TD> DHT </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ?</TD></TR>
- <TR style=3D"background: orange;">
- <TD> 64 </TD>
- <TD> XBT Metadata Exchange </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> No </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"text-align: center;"> ? </TD>
- <TD style=3D"background: rgb(136, 255, 136); text-align: center;"> =
- Yes </TD>
- <TD style=3D"text-align: center;"> ?</TD></TR></TBODY></TABLE>
- <H2> <SPAN id=3D"Change_Log" class=3D"mw-headline"> Change Log =
- </SPAN></H2>
- <P>Put your changes below this line, so that the most recent changes =
- appear=20
- first. The change log should be purged from time to time. Please =
- preserve the=20
- last month's worth of change logs.</P>
- <P>doverosx - 2011-05-30 - minor: changed in notations "a block is a =
- portion of=20
- data that the client requests from AT LEAST ONE peer" since it is not =
- necessary=20
- to request a block from only ONE peer at a time.</P>
- <P><A class=3D"new" title=3D"SuprDewd (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DSuprDewd&action=3Ded=
- it&redlink=3D1">SuprDewd</A>=20
- - 2010-07-23 - Added a link to my implementation of bencoding for =
- C#.</P>
- <P>greywiz - 2010-01-01 - Added support for Extension Protocol and DHT =
- for=20
- BitComet in the Reserved Bytes table</P>
- <P>SiDi - 2009-04-18 - Added RezTorrent peer_id</P>
- <P>HighInBC - 2008-02-12 - Minor change. Added parsed result for final =
- example=20
- of bencoded dictionary, added <nowiki> tags to top example to =
- avoid=20
- issues.</P>
- <P>amc1 - 2007-09-12 - Azureus now supports the LibTorrent Extension =
- Protocol=20
- (LTEP, as I refer to it).</P>
- <P>amc1 - 2007-08-16 - Added description and links to Extension =
- Negotiation=20
- Protocol, and formatted the reserved bits table a bit.</P>
- <P>Denial - 2007-08-13 - Added description of the SimpleBT and BitComet=20
- extension protocols</P>
- <P>amc1 - 2007-07-16 - Added SymTorrent's peer ID identifier, as well as =
- some=20
- other clients I've come across which need to be identified.</P>
- <P>amc1 - 2007-07-14 - Corrected information about Shadow's style of =
- peer ID -=20
- existing text made incorrect assumptions.</P>
- <P>mitchman - 2007-07-12 - Clarified the Opera peed-id</P>
- <P>roee88- 2007-06-11 - Added LH-ABC peer_id</P>
- <P>Boian V Petkantchin - April 26, 2007. Listed another unoffcial =
- extension -=20
- BitTorrent Location-aware Protocol 1.0. Included it in the table of =
- reserved=20
- bits.</P>
- <P>daniel-gl at gmx.net - Corrected reserved bit numbers - Added NAT =
- traversal=20
- and XBT extensions to table</P>
- <P>stuge - 2006-11-20 - Added Queen Bee peer_id</P>
- <P><A class=3D"mw-redirect" title=3D"EHeM"=20
- href=3D"http://wiki.theory.org/EHeM">EHeM</A> - 2006-10-16 - Update of =
- view #1 on=20
- <I>Message: request</I> to hopefully reflect a possible compromise =
- position. -=20
- Trimming of changelog.</P>
- <P><A class=3D"mw-redirect" title=3D"EHeM"=20
- href=3D"http://wiki.theory.org/EHeM">EHeM</A> - 2006-10-11 - Firmly =
- marked the=20
- <I>Message: request</I> section as being under dispute - Firmly marked =
- the=20
- <I>Algorithms: Queuing</I> section as being under dispute - Removed =
- personal=20
- insults by uau, could we be reasonable humans and try to resolve =
- disputes=20
- peacefully? Perhaps using the attached <A class=3D"external text" =
- href=3D"http://wiki.theory.org/Talk:BitTorrentSpecification"=20
- rel=3D"nofollow">talk/discussion</A> page?</P>
- <P>Joris Guisson - 2006-09-12 - Added KTorrent specific information =
- (peer id and=20
- extension table)</P>
- <P>Arvid - 2006-09-12 - Added Extension protocol to the unofficial =
- extensions=20
- section</P>
- <P>Alan - 2006-09-12 -Removed some older history. Update the reserved =
- bytes=20
- section.</P>
- <P>Alan - 2006-09-11 - Added section about Extensions to Protocol</P>
- <P>uau - 2006-08-17 - Added warning about the misleading information in =
- the=20
- Queuing and requests packet sections.</P>
- <P><A class=3D"new" title=3D"WikiWordsAreEllFourEmmThree (page does not =
- exist)"=20
- href=3D"http://wiki.theory.org/index.php?title=3DWikiWordsAreEllFourEmmTh=
- ree&action=3Dedit&redlink=3D1">WikiWordsAreEllFourEmmThree</A>=20
- - 2006-07-08- Added <A class=3D"new" title=3D"BitPump (page does not =
- exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DBitPump&action=3Dedi=
- t&redlink=3D1">BitPump</A>=20
- peer_id</P>
- <P>daniel-gl at gmx.net - 2006-04-28- Added Bits on Wheels & <A =
- class=3D"new"=20
- title=3D"BitLord (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DBitLord&action=3Dedi=
- t&redlink=3D1">BitLord</A>=20
- peer_id.</P>
- <P><A class=3D"new" title=3D"DennisHolmes (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DDennisHolmes&action=3D=
- edit&redlink=3D1">DennisHolmes</A>=20
- - 2006-04-22- Added Enhanced CTorrent peer_id</P>
- <P><A class=3D"new" title=3D"WikiWordsAre (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DWikiWordsAre&action=3D=
- edit&redlink=3D1">WikiWordsAre</A>=EF=BF=BDberGay=20
- - 2006-04-16- Anti-snubbing '<I>is</I> part of the official protocol. =
- Check out=20
- the paper on <A class=3D"new" title=3D"BitTorrent (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- economics at <A class=3D"external free" =
- href=3D"http://www.bittorrent.org/" =
- rel=3D"nofollow">http://www.bittorrent.org/</A>
- </P>
- <P><A class=3D"new" title=3D"JoshElsasser (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DJoshElsasser&action=3D=
- edit&redlink=3D1">JoshElsasser</A>=20
- - 2006-04-11- Added Transmission peer_id</P>
- <P>daniel-gl at gmx.net - 2006-03-23- Added Tribler peer_id</P>
- <P><A class=3D"new" title=3D"MaSiniavine (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DMaSiniavine&action=3D=
- edit&redlink=3D1">MaSiniavine</A>
- - Corrected dictionary example</P>
- <P>Juanjo 2006-03-10- Added Lphant peer ID</P>
- <P><A class=3D"mw-redirect" title=3D"EHeM"=20
- href=3D"http://wiki.theory.org/EHeM">EHeM</A> 2006-03-07- Added mention =
- of another=20
- parameter to the baseline for queuing.- Another link adjustment.- Added=20
- exposition on request block size.- Sample link changes, the domain =
- "example.com"=20
- is explicitly reserved for examples, as such that should be used instead =
- of=20
- spam.com.- Added qualification to recommended number of peers.</P>
- <P><A class=3D"mw-redirect" title=3D"EHeM"=20
- href=3D"http://wiki.theory.org/EHeM">EHeM</A> 2006-03-01 (minor)- Link =
- changes,=20
- the official <A class=3D"new" title=3D"BitTorrent (page does not exist)" =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrent&action=3D=
- edit&redlink=3D1">BitTorrent</A>=20
- pages are no longer on bitconjurer.org, but bittorent.com.- Removed =
- unneeded=20
- line breaks from paragraph.- Typo fixes in changelog (yeah, I suppose do =
- have a=20
- bit of vanity)</P>
- <P><A class=3D"mw-redirect" title=3D"EHeM"=20
- href=3D"http://wiki.theory.org/EHeM">EHeM</A> 2006-03-01- Restored the =
- section on=20
- queueing, as it '<I>is</I> a highly crucial performance item. Feel free =
- to=20
- rewrite me if you desire, uau. The developer's list, <A =
- class=3D"external free"=20
- href=3D"http://lists.ibiblio.org/mailman/listinfo/bittorrent"=20
- rel=3D"nofollow">http://lists.ibiblio.org/mailman/listinfo/bittorrent</A>=
- is a=20
- better place for debates.- Trimmed changelog entries older than one =
- year, the=20
- above specifies one month, but this is changing slowly so more history =
- seems=20
- pertinent.</P>
- <P>haylegend - 2006-01-08- Added Retriever's peer id.</P>
- <P>uau - 2005-12-13- Fixed sizes in request message description AGAIN. =
- They had=20
- been changed to incorrect values.- Removed "Queuing" section. It had so =
- many=20
- errors and inaccuracies that it did more harm than good as it was, and I =
- didn't=20
- feel like rewriting it.</P>
- <HR>
- <PRE>Last edit: Tue, 12 Sep 2006 22:38:05 -0700=0A=
- (TresNi)=0A=
- Revisions: 158=0A=
- </PRE>
- <H2> <SPAN id=3D"Related_Links" class=3D"mw-headline">Related =
- Links</SPAN></H2><!-- =0A=
- NewPP limit report=0A=
- Preprocessor node count: 616/1000000=0A=
- Post-expand include size: 3903/2097152 bytes=0A=
- Template argument size: 0/2097152 bytes=0A=
- Expensive parser function count: 0/100=0A=
- --><!-- Saved in parser cache with key =
- mw_theoryorg:pcache:idhash:1427-0!1!0!!en!2!edit=3D0 and timestamp =
- 20110907042952 -->
- <DIV class=3D"printfooter">Retrieved from "<A =
- href=3D"http://wiki.theory.org/BitTorrentSpecification">http://wiki.theor=
- y.org/BitTorrentSpecification</A>"</DIV>
- <DIV id=3D"catlinks" class=3D"catlinks">
- <DIV id=3D"mw-normal-catlinks"><A title=3D"Special:Categories" =
- href=3D"http://wiki.theory.org/Special:Categories">Category</A>:=20
- <SPAN dir=3D"ltr"><A class=3D"new" title=3D"Category:PhpWiki (page does =
- not exist)"=20
- href=3D"http://wiki.theory.org/index.php?title=3DCategory:PhpWiki&act=
- ion=3Dedit&redlink=3D1">PhpWiki</A></SPAN></DIV></DIV><!-- end =
- content -->
- <DIV class=3D"visualClear"></DIV></DIV></DIV></DIV>
- <DIV id=3D"column-one">
- <DIV id=3D"p-cactions" class=3D"portlet">
- <H5>Views</H5>
- <DIV class=3D"pBody">
- <UL>
- <LI id=3D"ca-nstab-main" class=3D"selected"><A accessKey=3D"c" =
- title=3D"View the content page [c]"=20
- href=3D"http://wiki.theory.org/BitTorrentSpecification">Page</A></LI>
- <LI id=3D"ca-talk"><A accessKey=3D"t" title=3D"Discussion about the =
- content page [t]"=20
- =
- href=3D"http://wiki.theory.org/Talk:BitTorrentSpecification">Discussion</=
- A></LI>
- <LI id=3D"ca-viewsource"><A accessKey=3D"e" title=3D"This page is =
- protected. You can view its source [e]"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrentSpecification&=
- amp;action=3Dedit">View=20
- source</A></LI>
- <LI id=3D"ca-history"><A accessKey=3D"h" title=3D"Past revisions of =
- this page [h]"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrentSpecification&=
- amp;action=3Dhistory">History</A></LI></UL></DIV></DIV>
- <DIV id=3D"p-personal" class=3D"portlet">
- <H5>Personal tools</H5>
- <DIV class=3D"pBody">
- <UL>
- <LI id=3D"pt-login"><A accessKey=3D"o" title=3D"You are encouraged to =
- log in; however, it is not mandatory [o]"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DSpecial:UserLogin&re=
- turnto=3DBitTorrentSpecification">Log=20
- in / create account</A></LI></UL></DIV></DIV>
- <DIV id=3D"p-logo" class=3D"portlet"><A style=3D'background-image: =
- url("/skins/theoryorg.png");'=20
- title=3D"Visit the main page" =
- href=3D"http://wiki.theory.org/Main_Page"></A></DIV>
- <SCRIPT type=3D"text/javascript"> if (window.isMSIE55) fixalpha(); =
- </SCRIPT>
-
- <DIV id=3D"p-navigation" class=3D"generated-sidebar portlet">
- <H5>Navigation</H5>
- <DIV class=3D"pBody">
- <UL>
- <LI id=3D"n-mainpage-description"><A accessKey=3D"z" title=3D"Visit =
- the main page [z]"=20
- href=3D"http://wiki.theory.org/Main_Page">Main page</A></LI>
- <LI id=3D"n-portal"><A title=3D"About the project, what you can do, =
- where to find things"=20
- href=3D"http://wiki.theory.org/TheoryOrg:Community_portal">Community=20
- portal</A></LI>
- <LI id=3D"n-currentevents"><A title=3D"Find background information on =
- current events"=20
- href=3D"http://wiki.theory.org/TheoryOrg:Current_events">Current =
- events</A></LI>
- <LI id=3D"n-recentchanges"><A accessKey=3D"r" title=3D"The list of =
- recent changes in the wiki [r]"=20
- href=3D"http://wiki.theory.org/Special:RecentChanges">Recent =
- changes</A></LI>
- <LI id=3D"n-randompage"><A accessKey=3D"x" title=3D"Load a random page =
- [x]" href=3D"http://wiki.theory.org/Special:Random">Random=20
- page</A></LI>
- <LI id=3D"n-help"><A title=3D"The place to find out" =
- href=3D"http://wiki.theory.org/Help:Contents">Help</A></LI></UL></DIV></D=
- IV>
- <DIV id=3D"p-search" class=3D"portlet">
- <H5><LABEL for=3D"searchInput">Search</LABEL></H5>
- <DIV id=3D"searchBody" class=3D"pBody">
- <FORM id=3D"searchform" action=3D"/index.php"><INPUT name=3D"title" =
- value=3D"Special:Search"=20
- type=3D"hidden"><INPUT accessKey=3D"f" id=3D"searchInput" =
- title=3D"Search TheoryOrg"=20
- name=3D"search" type=3D"search"><INPUT id=3D"searchGoButton" =
- class=3D"searchButton" title=3D"Go to a page with this exact name if =
- exists" name=3D"go" value=3D"Go" type=3D"submit">
- <INPUT id=3D"mw-searchButton" class=3D"searchButton" title=3D"Search =
- the pages for this text" name=3D"fulltext" value=3D"Search" =
- type=3D"submit"></FORM></DIV></DIV>
- <DIV id=3D"p-tb" class=3D"portlet">
- <H5>Toolbox</H5>
- <DIV class=3D"pBody">
- <UL>
- <LI id=3D"t-whatlinkshere"><A accessKey=3D"j" title=3D"List of all =
- wiki pages that link here [j]"=20
- =
- href=3D"http://wiki.theory.org/Special:WhatLinksHere/BitTorrentSpecificat=
- ion">What=20
- links here</A></LI>
- <LI id=3D"t-recentchangeslinked"><A accessKey=3D"k" title=3D"Recent =
- changes in pages linked from this page [k]"=20
- =
- href=3D"http://wiki.theory.org/Special:RecentChangesLinked/BitTorrentSpec=
- ification">Related=20
- changes</A></LI>
- <LI id=3D"t-specialpages"><A accessKey=3D"q" title=3D"List of all =
- special pages [q]"=20
- href=3D"http://wiki.theory.org/Special:SpecialPages">Special =
- pages</A></LI>
- <LI id=3D"t-print"><A accessKey=3D"p" title=3D"Printable version of =
- this page [p]"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrentSpecification&=
- amp;printable=3Dyes"=20
- rel=3D"alternate">Printable version</A></LI>
- <LI id=3D"t-permalink"><A title=3D"Permanent link to this revision of =
- the page"=20
- =
- href=3D"http://wiki.theory.org/index.php?title=3DBitTorrentSpecification&=
- amp;oldid=3D4218">Permanent=20
- link</A></LI></UL></DIV></DIV></DIV><!-- end of the left (by default =
- at least) column -->
- <DIV class=3D"visualClear"></DIV>
- <DIV id=3D"footer">
- <DIV id=3D"f-poweredbyico"><A href=3D"http://www.mediawiki.org/"><IMG =
- alt=3D"Powered by MediaWiki"=20
- src=3D"http://wiki.theory.org/skins/common/images/poweredby_mediawiki_88x=
- 31.png"=20
- width=3D"88" height=3D"31"></A></DIV>
- <DIV id=3D"f-copyrightico"><A =
- href=3D"http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt"><IMG=20
- alt=3D"GNU Free Documentation License 1.2" =
- src=3D"http://wiki.theory.org/skins/common/images/gnu-fdl.png"=20
- width=3D"88" height=3D"31"></A></DIV>
- <UL id=3D"f-list">
- <LI id=3D"lastmod"> This page was last modified on 7 June 2011, at =
- 00:43.</LI>
- <LI id=3D"viewcount">This page has been accessed 738,800 times.</LI>
- <LI id=3D"copyright">Content is available under <A class=3D"external " =
- href=3D"http://www.gnu.org/licenses/old-licenses/fdl-1.2.txt">GNU=20
- Free Documentation License 1.2</A>.</LI>
- <LI id=3D"privacy"><A title=3D"TheoryOrg:Privacy policy" =
- href=3D"http://wiki.theory.org/TheoryOrg:Privacy_policy">Privacy=20
- policy</A></LI>
- <LI id=3D"about"><A title=3D"TheoryOrg:About" =
- href=3D"http://wiki.theory.org/TheoryOrg:About">About=20
- TheoryOrg</A></LI>
- <LI id=3D"disclaimer"><A title=3D"TheoryOrg:General disclaimer" =
- href=3D"http://wiki.theory.org/TheoryOrg:General_disclaimer">Disclaimers<=
- /A></LI></UL>
- </DIV></DIV>
- <SCRIPT>if (window.runOnloadHook) runOnloadHook();</SCRIPT>
- <!-- Served in 0.629 secs. --></BODY></HTML>
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: image/png
- Content-Transfer-Encoding: base64
- Content-Location: http://wiki.theory.org/skins/common/images/poweredby_mediawiki_88x31.png
-
- iVBORw0KGgoAAAANSUhEUgAAAFgAAAAfCAMAAABUFvrSAAAAA3NCSVQICAjb4U/gAAAClFBMVEUC
- KWuqqtbmxQbRvxS1xc+BdgdzlKmEq76qqqpBeZ3HxHrt7OZbZ1LWxE0lX3hxeUWzq2nY3N5WhKPQ
- dQoAUIThyiSwrTY9RpT29vbGwqSjtsTHzdDAaQoAZplPepgATICdo6vp1Asyao7o59vO1NfQx2Ph
- 2XiOkTeKjY3yzQnW1smGla7s2yNemLXflg06hK0wO3h2pLvm2D/1sgfn4akHV4uYscEbLHZEdphO
- hKauspWsrr4ObZ3q2RqqbRTWyS8haJa5xJuFhbgrS4Ipe6WrusXX0rXW1tY4cpfBztff2Zrlqg7w
- yhTIuEyFo7dSkbFskKjShg3Yyhj91geVrb7EvnPy3TXd0WchZZKHp7xmi6Ln1lLdxUWMm7ayv8fT
- zZbe3sm7w8/AcA7w8PDNtzQaW4YmJpoybZTOzcXe3taes8D0ywDh5OZAXIvo5Lzg14rk1zTPzr40
- gafr1RBJZJFCU1rbugvlziGWehNqnbd0nLWlvsv13hsIVIaRkqXF0NfwvANEiq0wToIYX4zgnRHm
- 0A7UiRL36Efc4OJMf6PoxxqgpJXYzlX/yQYbdKGNkrv4xhHq4RLO1tzo0TKUbg5biqgGHXn31xDu
- 3hnj12rHuUSclS1ijqzWzozm3IXsvxLZ2ebBag2ambbMfRU4dJvlpxG1chKdtcb05D3q6M2LpLXz
- 3ynExc5ika/VnBnMzMze3t6mu8h8nbMiY42sv8ufq8AQWozGdBXgz0zWvQ6Oq77gsQlNepnDwMLo
- vQJSg6NGYY4XXIvc1644Q2fu2EdNVV31vAf3zwZ7p73m5uYpapTUfQ8AU4mboKarqK2UtMS6sEDR
- ymyVmYq5taFUWZrt0R/Hdg/L0dTBvnnOy4Hi2pLr2FEpPiAVAAAACXBIWXMAAArwAAAK8AFCrDSY
- AAAEiklEQVR42u3Q/1dTZRzA8dtczHkjvTQrmPMLTA0kT0NDSyRM8tkNGwv5MjTEdSVAn6FuJLAx
- 5xyzOyLN0dq0panoZIy6406E+SWwYD2TXF9F8Z/pGUjQzukcz1F+6JzePzzP53yec18/XGL+HEXM
- /25O+h+eDY//o7rUurq68ScvAa4+dP/MoerqpwODWSX/mry4+q3qbV9nZWXNbEN6vTUE/iX95Lve
- l7BOhEtK2ptKKnKqtw1UzMhpMtCiBzGFVOoDPmlI6lNItSERwBcQ+WST7wosa7WJcCAQGB8P3Hxw
- GyQbDAKBwHBwVban4yYA2kAA4IKyFqtVYRUVgryQLHZCYVXoWwpFInzhURZ/1+NlrFiUCOsa10g3
- vfT2osUHOuyZ+wWCFR6P58qRPzZJ1zTqHsGicWsQyECxtdha2HJCr29pAfHLGgOTMAjmxYpPgESY
- OCYHv42kgvfmtQv2jx49ut996tTp06s/BeAYAXAmGT5iha/i3yGj834y4QnD8QsvZfF3faEe5BUn
- wBRFDFGgbK8n54Prt663tbUVjUYMBvuOr+5S1BBB4eSm+CmMnyZKKKdoE0XTFL7wEm/xu0lIiWRC
- alYY5jhCx9X/PLI3M/Oz0ePXrl27+O1oRNBTtuEkx+kI7nELm7jZTcO3z7x4sNWw49KdJfn5Sy6u
- i9jLFzy3fBp+/BLhIW7PghJPp6f9+L385ub8F4oinasefFz1hDDLEjqWfeaH5B73uXuXm59tvnzn
- UqSzgf3oJMvqCBZnrtnHsiC9Rsr+nf95bbqLmxzDvJZVb2TltWql358e36WYWRbDEBI6CO8uLG/N
- zFx7Pv8L/CuKIivKV44sh1BHQNzYmBfCtP7+AIQ0DXEWi9+mXeOPDxwU2sKcWANDtn19u421HCeH
- /qUQYhghYgg1nJlnt293u9feO3/+w7Zbh+09Kxe+iZCOQLjXJTyNvJJhOeXi+T4I+4ajfNSS5Id9
- tqjDERCnUJphuYq3qN/pE6MUJee/gdAU3Ii6F61e+WP7n62RdWvfb/vcPThY/uC1Cwg1TsEbeQWl
- 3BiVe/tDlZLcYL8xGC0YV/bmmo1pUYmwsivE87kpXkqjUolV5jASS6bhrVp0YcP98sXZ2dvdnZ2j
- 51o32z/5/cuTSLt1Clb3OSpd+HubptdlczkcCJmitNIYH0LDIYtGqQ6nDweRJhyWSCoR+n4arqq6
- Sn3zStmBzs1NTe6HVzIPbz6Yc+qXIxR1taoK4cbUTn5ZqS+qLYiaYq40r4ZCKo1FaXR1IRQzh5DY
- 7KMlvBNi2MZ3sdMwSZIIl5ExcXrXRI5hYmBwsCl7/dmBBpKEkIw35iLfkDh9Nmeuzdhba3Fqal39
- BU5lryUq9trMQtLYT1PDDpLVhFUOOS8mvRKSxDDzKJJcP0HusndXzEs++/Ah9pjpbviZ0p2kMIVi
- cpfVhBiG5mtUKirJTwprakqTaEa4E8KkUgbu3J2mZvbxdO5ShpmBcRkk2dFBNnSsf7d7VQPzZM2G
- cWhLPcPc3pNaz5BPAZ6TMPzynPSfhOeovwCx6Xbt5tzVdAAAAABJRU5ErkJggg==
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: image/png
- Content-Transfer-Encoding: base64
- Content-Location: http://wiki.theory.org/skins/common/images/gnu-fdl.png
-
- iVBORw0KGgoAAAANSUhEUgAAAFgAAAAfCAMAAABUFvrSAAACoFBMVEUAAQAAAgABBAACBQEFCAQH
- CQUKDAgMDwsOEAwPEQ0RExASFBETFBIUFRMVFhQWGBUXGBYYGRcZGxgaHBkbHBocHRsdHxweHx0g
- IR8hIyAiJCEjJCIkJSMrLSovMS4yMzEzNDI0NjM1NzQ6Ozk9Pzw+QD1BQ0FXQiBYRCdGSEVaRSNH
- SUZISUdbRipcRypKS0ldSCteSSxMTktfSi1gSy5hTC9PUU5iTTBkTzFmUDNXWVZrVTdZW1htVzlb
- XVptWUBcXltuWkFdX1xvW0JwXENfYV5xXURgYl9zX0ZiZGF1YUh2YUh3Ykl4Y0p5ZEt2Z0x6ZUx4
- aU58Z059aE96a1Bsbmt7bFF/alFtb2x8bVJ9blNvcW5/clxzdXKCdV+Fd2B4eneGeGGHeWKIemOJ
- e2SKfGV+gH2Mfmd/gX6Agn+Bg4CPgWqChIGDhYKVgH2Fh4SMjouYjHqNj4yajnyPkY6UlpOilYOW
- mJWXmZalmIeam5immYinmomom4qpnIuqnYyeoJ2sn46toI+ipKGuopCto5avo5GkpqOwpJKlp6Sv
- pZimqKWwppqnqaaoqqeqrKm3rKC4raG5rqK6r6O7sKSytLG8sqW9s6a+tKe1t7TDuKu5u7i7vbrG
- u669v7zIwLnCxMHDxcLLw7zFx8TGyMXOxr/HycbIysfRyMHJy8jUzMTNz8vVzcbWzsfP0c7Xz8jQ
- 0s/Y0MnR09DZ0crS1NHa0svc08zX1s3d1M3V19Tg2NDc3tvk3NXd39zm3dbe4N3h5ODo4+Lk5uPq
- 5OPr5eTm6OXn6ebo6ufp6+jq7Onv6ujr7urx7Ort7+vu8O307u317+7w8u/x8/D38fDy9PHz9fL0
- 9/P2+PT3+fb4+vf5+/j6/Pn/+vn7/fr8//v+//ybsc4MAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA
- B3RJTUUH1AQLARkvVukrLgAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVu
- AAADjElEQVR42rWW908UQRTHnWxQT+yKd2dDsayiQZDD3lBskdjF3rFg9+y9N4gNFXvvIjk9CLao
- JFhQETlEj9uTfP8VZ/Z2dnfOO36Q8E1u3ryX7Gdf3n539uqtqyPVWyfXoNU38Z8yg1P3uoq93mLX
- vokC+O2wFiSiSQxASBZb1J+2sMCkxvrdbmh1ATzNBV35Mw3w+8aWkxW/Hq5ll3QMBQaPuVbp9j/g
- HmcBz6VlKYmJKek55cC5WA4eSXYCvLnLNYFxkvQKBic9gXLcIWtKPOxDXn8N3Jx80sF9utYILiGW
- IHDsE3yfKZs0tRR5sQEwIX4dfIvcDTVjnvqJFATOxvdkWd56/d2PPxWvMwfTytBS5ATATclHgGi8
- Ln1r7ri1CE6DkkYp0KRsYs/ShzkqeATZAv2ZXVDv0Jx8wRfS6B/waTJWBOfjuEz1bk9aUtyEbACM
- fBCFAVdENsiq9PJGO7BlPsmoWkkhIrj6sc3yRgBPQrlDNrQRUOg0HOWYzMB4M6yVFNG6e+CSQ+os
- M2xS0xneIDCx9HtlGJuB9+GibNZ9IJOGHByo5ZvnQroAXgq8VsPzWoKLkSKABwI/aUjGh1qCvUgQ
- wLGAn4YEeBnYOAss6wFTahjZusgHOG2SzQmger1datJLBf+GQwAPAMpV8B8VDCYW7kUAphR858uN
- nosNndyKO5qSV8U8Uz5e0EYxTgAvAVw0jEKZAPadiA4NBgqaweYG4LYBUQWmh7dUAD8CdtCQjnw+
- CoCFdkWAKTXdQpEgKYEY2ECz2yUzdzfgYbO5iEyh40r7tXAdu9trHduBKLcOToUnXvXv6pR4x7w7
- QPVCmjk8mC6AcTWqLCRYye28Gc5OBUpBjBNY3vGhUnKKv9JHGRiafi5m2RFqZhGM0YNCu6Id5cFp
- lews+jOsUstZ+iGUyt7lK/R08xTuTmLc6QoW1P6bl41vY2RBQ0vZ4EWw1iG3qtH92kB5exvSuCev
- 6gd9yTQzd0opCuPCgLlVjXlHPlD39a/6Pl8Ggj9N/oNJHJtwoAqFNAsN5lY1wMfaVrB970PVaip+
- TM8AledXDE+IT158rgzIjpPDgblVDU9jxEhWrto2ZG4Rrxqf/6l50PVyAauE79gtdowKe1Zgf7eD
- uWOuCbueFv9Svr7InM2y8GBuVfMxEkmX/UXKtYYCOKxEsOYB3aogegVr6DLeSqyneLUu/7vVkf4C
- RKKsEaKFTNMAAAAASUVORK5CYII=
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: text/css;
- charset="iso-8859-1"
- Content-Transfer-Encoding: quoted-printable
- Content-Location: http://wiki.theory.org/skins/common/shared.css?270
-
- .mw-plusminus-pos {
- color: rgb(0, 100, 0);
- }
- .mw-plusminus-neg {
- color: rgb(139, 0, 0);
- }
- .mw-plusminus-null {
- color: rgb(170, 170, 170);
- }
- span.comment {
- font-style: italic;
- }
- span.changedby {
- font-size: 95%;
- }
- .texvc {
- unicode-bidi: embed; direction: ltr;
- }
- img.tex {
- vertical-align: middle;
- }
- span.texhtml {
- font-family: serif;
- }
- .ontop#wikiPreview {
- margin-bottom: 1em;
- }
- #editform {
- clear: both;
- }
- #toolbar {
- clear: both;
- }
- #wpTextbox1 {
- clear: both;
- }
- div#mw-js-message {
- margin: 1em 5%; padding: 0.5em 2.5%; border: 1px solid rgb(221, 221, =
- 221); background-color: rgb(252, 252, 252);
- }
- .editsection {
- margin-left: 5px; float: right;
- }
- h2#filehistory {
- clear: both;
- }
- table.filehistory th {
- vertical-align: top;
- }
- table.filehistory td {
- vertical-align: top;
- }
- table.filehistory th {
- text-align: left;
- }
- table.filehistory td.mw-imagepage-filesize {
- white-space: nowrap;
- }
- table.filehistory th.mw-imagepage-filesize {
- white-space: nowrap;
- }
- table.filehistory td.filehistory-selected {
- font-weight: bold;
- }
- li span.deleted {
- color: rgb(136, 136, 136); font-style: italic; text-decoration: =
- line-through;
- }
- span.history-deleted {
- color: rgb(136, 136, 136); font-style: italic; text-decoration: =
- line-through;
- }
- .not-patrolled {
- background-color: rgb(255, 255, 170);
- }
- .unpatrolled {
- color: red; font-weight: bold;
- }
- div.patrollink {
- text-align: right; font-size: 75%;
- }
- body.ltr td.mw-label {
- text-align: right;
- }
- body.ltr td.mw-input {
- text-align: left;
- }
- body.ltr td.mw-submit {
- text-align: left;
- }
- body.rtl td.mw-label {
- text-align: left;
- }
- body.rtl td.mw-input {
- text-align: right;
- }
- body.rtl td.mw-submit {
- text-align: right;
- }
- td.mw-label {
- vertical-align: top;
- }
- .prefsection td.mw-label {
- width: 20%;
- }
- .prefsection table {
- width: 100%;
- }
- td.mw-submit {
- white-space: nowrap;
- }
- table.mw-htmlform-nolabel td.mw-label {
- width: 0px !important;
- }
- body.rtl .thumbcaption {
- text-align: right;
- }
- body.rtl .magnify {
- float: left;
- }
- body.ltr .thumbcaption {
- text-align: left;
- }
- body.ltr .magnify {
- float: right;
- }
- .mw-hidden-cats-hidden {
- display: none;
- }
- .catlinks-allhidden {
- display: none;
- }
- p.mw-ipb-conveniencelinks {
- font-size: 90%; float: right;
- }
- p.mw-protect-editreasons {
- font-size: 90%; float: right;
- }
- p.mw-filedelete-editreasons {
- font-size: 90%; float: right;
- }
- p.mw-delete-editreasons {
- font-size: 90%; float: right;
- }
- p.mw-revdel-editreasons {
- font-size: 90%; float: right;
- }
- .searchresults {
- =09
- }
- .searchresults p {
- margin-top: 1em; margin-bottom: 1.2em; margin-left: 0.4em;
- }
- div.searchresult {
- width: 38em; font-size: 95%;
- }
- .mw-search-results {
- margin-left: 0.4em;
- }
- .mw-search-results li {
- list-style: none; padding-bottom: 1em;
- }
- .mw-search-results li a {
- font-size: 108%;
- }
- .mw-search-result-data {
- color: green; font-size: 97%;
- }
- .mw-search-formheader {
- border: 1px solid silver; margin-top: 1em; background-color: rgb(243, =
- 243, 243);
- }
- .mw-search-formheader div.search-types {
- padding-left: 0.25em; float: left;
- }
- .rtl .mw-search-formheader div.search-types {
- float: right;
- }
- .mw-search-formheader div.search-types ul {
- list-style: none !important; margin: 0px !important; padding: 0px =
- !important;
- }
- .mw-search-formheader div.search-types ul li {
- margin: 0px; padding: 0px; float: left;
- }
- .mw-search-formheader div.search-types ul li a {
- padding: 0.5em; display: block;
- }
- .mw-search-formheader div.search-types ul li.current a {
- color: rgb(51, 51, 51); cursor: default;
- }
- .mw-search-formheader div.search-types ul li.current a:hover {
- text-decoration: none;
- }
- .mw-search-formheader div.results-info {
- padding: 0.5em 0.75em 0.5em 0.5em; float: right;
- }
- .mw-search-formheader div.results-info ul {
- list-style: none !important; margin: 0px !important; padding: 0px =
- !important;
- }
- .mw-search-formheader div.results-info ul li {
- margin: 0px; padding: 0px; float: right;
- }
- fieldset#mw-searchoptions {
- border-width: 0px 1px 1px !important; border-style: solid !important; =
- border-color: silver !important; margin: 0px; padding: 0.5em 0.75em =
- !important; background-color: rgb(249, 249, 249);
- }
- fieldset#mw-searchoptions legend {
- display: none;
- }
- fieldset#mw-searchoptions h4 {
- margin: 0px; padding: 0px; float: left;
- }
- .rtl fieldset#mw-searchoptions h4 {
- float: right;
- }
- fieldset#mw-searchoptions div#mw-search-togglebox {
- float: right;
- }
- .rtl fieldset#mw-searchoptions div#mw-search-togglebox {
- float: left;
- }
- fieldset#mw-searchoptions div#mw-search-togglebox label {
- margin-right: 0.25em;
- }
- fieldset#mw-searchoptions div#mw-search-togglebox input {
- margin-left: 0.25em;
- }
- fieldset#mw-searchoptions table {
- margin-right: 3em; float: left;
- }
- fieldset#mw-searchoptions table td {
- padding-right: 1em;
- }
- .rtl fieldset#mw-searchoptions table td {
- padding-right: 0px; padding-left: 1em;
- }
- body.rtl fieldset#mw-searchoptions table {
- margin-right: 0px; margin-left: 3em; float: right;
- }
- fieldset#mw-searchoptions div.divider {
- padding-top: 0.5em; clear: both; margin-bottom: 0.5em; =
- border-bottom-color: rgb(221, 221, 221); border-bottom-width: 1px; =
- border-bottom-style: solid;
- }
- td#mw-search-menu {
- padding-left: 6em; font-size: 85%;
- }
- div#mw-search-interwiki {
- border: 1px solid rgb(170, 170, 170); width: 18em; margin-top: 2ex; =
- float: right;
- }
- .rtl div#mw-search-interwiki {
- float: left;
- }
- div#mw-search-interwiki li {
- font-size: 95%;
- }
- .mw-search-interwiki-more {
- font-size: 90%; float: right;
- }
- .rtl .mw-search-interwiki-more {
- float: left;
- }
- div#mw-search-interwiki-caption {
- text-align: center; font-size: 95%; font-weight: bold;
- }
- .mw-search-interwiki-project {
- padding: 0.15em 0.15em 0.2em 0.2em; text-align: left; font-size: 97%; =
- border-top-color: rgb(187, 187, 187); border-top-width: 1px; =
- border-top-style: solid; background-color: rgb(236, 236, 236);
- }
- .rtl .mw-search-interwiki-project {
- text-align: right;
- }
- span.searchalttitle {
- font-size: 95%;
- }
- div.searchdidyoumean {
- color: rgb(204, 0, 0); font-size: 127%; margin-top: 0.8em;
- }
- div.searchdidyoumean em {
- font-weight: bold;
- }
- .searchmatch {
- font-weight: bold;
- }
- table#mw-search-top-table {
- background-color: transparent;
- }
- td#mw-search-togglebox {
- text-align: right;
- }
- table#mw-search-powertable {
- width: 100%;
- }
- form#powersearch {
- clear: both;
- }
- .mw-userrights-disabled {
- color: rgb(136, 136, 136);
- }
- table.mw-userrights-groups * td {
- padding-right: 1.5em;
- }
- table.mw-userrights-groups * th {
- padding-right: 1.5em;
- }
- .os-suggest {
- border: 1px solid rgb(170, 170, 170); left: 0px; top: 0px; width: 0px; =
- overflow: auto; font-size: 95%; position: absolute; z-index: 99; =
- overflow-x: hidden; background-color: window;
- }
- table.os-suggest-results {
- border: 0px currentColor; width: 100%; font-size: 95%; border-collapse: =
- collapse; cursor: pointer;
- }
- .os-suggest-result {
- padding: 2px; color: windowtext; white-space: nowrap; background-color: =
- window;
- }
- .os-suggest-result-hl {
- padding: 2px; color: windowtext; white-space: nowrap; background-color: =
- window;
- }
- .os-suggest-result-hl {
- color: white; background-color: rgb(76, 89, 166);
- }
- .os-suggest-result-hl-webkit {
- color: white; background-color: rgb(76, 89, 166);
- }
- .os-suggest-result-hl {
- color: highlighttext; background-color: highlight;
- }
- .os-suggest-toggle {
- left: 1ex; font-size: 65%; position: relative;
- }
- .os-suggest-toggle-def {
- left: 0px; top: 0px; font-size: 65%; visibility: hidden; position: =
- absolute;
- }
- .autocomment {
- color: gray;
- }
- #pagehistory .history-user {
- margin-right: 0.2em; margin-left: 0.4em;
- }
- #pagehistory span.minor {
- font-weight: bold;
- }
- #pagehistory li {
- border: 1px solid white;
- }
- #pagehistory li.selected {
- border: 1px dashed rgb(170, 170, 170); background-color: rgb(249, 249, =
- 249);
- }
- .newpage {
- font-weight: bold;
- }
- .minor {
- font-weight: bold;
- }
- .bot {
- font-weight: bold;
- }
- .mw-uctop {
- font-weight: bold;
- }
- table.mw-listgrouprights-table tr {
- vertical-align: top;
- }
- .listgrouprights-revoked {
- text-decoration: line-through;
- }
- td.mw-statistics-numbers {
- text-align: right;
- }
- h4.mw-specialpagesgroup {
- margin: 0.3em 0em 0em; padding: 2px; background-color: rgb(220, 220, =
- 220);
- }
- .mw-specialpagerestricted {
- font-weight: bold;
- }
- #shared-image-dup {
- font-style: italic;
- }
- #shared-image-conflict {
- font-style: italic;
- }
- table.mw-emailuser-table {
- width: 98%;
- }
- td#mw-emailuser-sender {
- font-weight: bold;
- }
- td#mw-emailuser-recipient {
- font-weight: bold;
- }
- table.allpageslist {
- background-color: transparent;
- }
- table.mw-allpages-table-form {
- width: 100%; background-color: transparent;
- }
- table.mw-allpages-table-chunk {
- width: 100%; background-color: transparent;
- }
- td.mw-allpages-alphaindexline {
- text-align: right;
- }
- td.mw-allpages-nav {
- text-align: right; font-size: smaller; margin-bottom: 1em;
- }
- p.mw-allpages-nav {
- text-align: right; font-size: smaller; margin-bottom: 1em;
- }
- table.mw-allpages-table-form tr {
- vertical-align: top;
- }
- table#mw-prefixindex-list-table {
- width: 98%; background-color: transparent;
- }
- table#mw-prefixindex-nav-table {
- width: 98%; background-color: transparent;
- }
- td#mw-prefixindex-nav-form {
- text-align: right; font-size: smaller; margin-bottom: 1em; =
- vertical-align: top;
- }
- div.mw-warning-with-logexcerpt {
- padding: 3px; border: 2px solid rgb(47, 111, 171); clear: both; =
- margin-bottom: 3px;
- }
- div.mw-warning-with-logexcerpt ul li {
- font-size: 90%;
- }
- span.mw-revdelundel-link {
- font-size: 90%;
- }
- strong.mw-revdelundel-link {
- font-size: 90%;
- }
- span.mw-revdelundel-hidden {
- visibility: hidden;
- }
- input.mw-revdelundel-hidden {
- visibility: hidden;
- }
- td.mw-revdel-checkbox {
- text-align: center; padding-right: 10px;
- }
- th.mw-revdel-checkbox {
- text-align: center; padding-right: 10px;
- }
- a.feedlink {
- background: url("images/feed-icon.png") no-repeat left; padding-left: =
- 16px;
- }
- .plainlinks a {
- padding: 0px !important;
- }
- table.wikitable {
- background: rgb(249, 249, 249); margin: 1em 1em 1em 0px; border: 1px =
- solid rgb(170, 170, 170); border-collapse: collapse;
- }
- .wikitable th {
- padding: 0.2em; border: 1px solid rgb(170, 170, 170);
- }
- .wikitable td {
- padding: 0.2em; border: 1px solid rgb(170, 170, 170);
- }
- .wikitable th {
- background: rgb(242, 242, 242); text-align: center;
- }
- .wikitable caption {
- font-weight: bold;
- }
- table.collapsed tr.collapsable {
- display: none;
- }
- .success {
- color: green; font-size: larger;
- }
- .error {
- color: red; font-size: larger;
- }
- .errorbox {
- padding: 0.5em 1em; border: 2px solid currentColor; color: rgb(0, 0, =
- 0); font-size: larger; margin-bottom: 2em; float: left;
- }
- .successbox {
- padding: 0.5em 1em; border: 2px solid currentColor; color: rgb(0, 0, =
- 0); font-size: larger; margin-bottom: 2em; float: left;
- }
- .errorbox {
- border-color: red; background-color: rgb(255, 242, 242);
- }
- .successbox {
- border-color: green; background-color: rgb(221, 255, 221);
- }
- .errorbox h2 {
- margin: 0px 0.5em 0px 0px; border: currentColor; font-size: 1em; =
- font-weight: bold; display: inline;
- }
- .successbox h2 {
- margin: 0px 0.5em 0px 0px; border: currentColor; font-size: 1em; =
- font-weight: bold; display: inline;
- }
- .visualClear {
- clear: both;
- }
- #mw_trackbacks {
- padding: 0.2em; border: 1px solid rgb(187, 187, 255); background-color: =
- rgb(238, 238, 255);
- }
- .TablePager {
- min-width: 80%;
- }
- .TablePager_nav a {
- text-decoration: none;
- }
- .TablePager {
- border-collapse: collapse;
- }
- .TablePager {
- padding: 0px 0.15em; border: 1px solid rgb(170, 170, 170);
- }
- .TablePager td {
- padding: 0px 0.15em; border: 1px solid rgb(170, 170, 170);
- }
- .TablePager th {
- padding: 0px 0.15em; border: 1px solid rgb(170, 170, 170);
- }
- .TablePager th {
- background-color: rgb(238, 238, 255);
- }
- .TablePager td {
- background-color: rgb(255, 255, 255);
- }
- .TablePager tr:hover td {
- background-color: rgb(238, 238, 255);
- }
- .imagelist td {
- white-space: nowrap;
- }
- .imagelist th {
- white-space: nowrap;
- }
- .imagelist .TablePager_col_links {
- background-color: rgb(238, 238, 255);
- }
- .imagelist .TablePager_col_img_description {
- white-space: normal;
- }
- .imagelist th.TablePager_sort {
- background-color: rgb(204, 204, 255);
- }
- #mw-allmessagestable .allmessages-customised td.am_default {
- background-color: rgb(252, 255, 196);
- }
- #mw-allmessagestable tr.allmessages-customised:hover td.am_default {
- background-color: rgb(250, 255, 144);
- }
- #mw-allmessagestable td.am_actual {
- background-color: rgb(226, 255, 226);
- }
- #mw-allmessagestable tr.allmessages-customised:hover + =
- tr.allmessages-customised td.am_actual {
- background-color: rgb(177, 255, 177);
- }
- ul#filetoc {
- padding: 5px; border: 1px solid rgb(170, 170, 170); text-align: center; =
- font-size: 95%; margin-right: 0px; margin-bottom: 0.5em; margin-left: =
- 0px; background-color: rgb(249, 249, 249);
- }
- #filetoc li {
- padding-right: 2em; display: inline; list-style-type: none;
- }
- table.mw_metadata {
- width: 300px; font-size: 0.8em; margin-bottom: 0.5em; margin-left: =
- 0.5em;
- }
- table.mw_metadata caption {
- font-weight: bold;
- }
- table.mw_metadata th {
- font-weight: normal;
- }
- table.mw_metadata td {
- padding: 0.1em;
- }
- table.mw_metadata {
- border: currentColor; border-collapse: collapse;
- }
- table.mw_metadata td {
- border: 1px solid rgb(170, 170, 170); text-align: center; =
- padding-right: 0.1em; padding-left: 0.1em;
- }
- table.mw_metadata th {
- border: 1px solid rgb(170, 170, 170); text-align: center; =
- padding-right: 0.1em; padding-left: 0.1em;
- }
- table.mw_metadata th {
- background-color: rgb(249, 249, 249);
- }
- table.mw_metadata td {
- background-color: rgb(252, 252, 252);
- }
- table.gallery {
- margin: 2px; padding: 2px; border: 1px solid rgb(204, 204, 204); =
- background-color: white;
- }
- table.gallery tr {
- vertical-align: top;
- }
- table.gallery td {
- border: 2px solid white; vertical-align: top; background-color: =
- rgb(249, 249, 249);
- }
- table.gallery caption {
- font-weight: bold;
- }
- div.gallerybox {
- margin: 2px;
- }
- div.gallerybox div.thumb {
- margin: 2px; border: 1px solid rgb(204, 204, 204); text-align: center;
- }
- div.gallerytext {
- padding: 2px 4px; overflow: hidden; font-size: 94%;
- }
- table.mw-enhanced-rc {
- border: 0px currentColor; border-spacing: 0;
- }
- td.mw-enhanced-rc {
- padding: 0px; font-family: monospace; vertical-align: top; white-space: =
- nowrap;
- }
- #mw-addcategory-prompt {
- margin-left: 1em; display: inline;
- }
- #mw-addcategory-prompt input {
- margin-right: 0.5em; margin-left: 0.5em;
- }
- .mw-remove-category {
- background-position: center; padding: 8px; background-image: =
- url("images/remove.png"); background-repeat: no-repeat;
- }
- .mw-ajax-addcategory {
- background-position: left; padding-left: 20px; background-image: =
- url("images/add.png"); background-repeat: no-repeat;
- }
- .mw-ajax-loader {
- background-position: center; padding: 16px; top: -16px; position: =
- relative; background-image: url("images/ajax-loader.gif"); =
- background-repeat: no-repeat;
- }
- .mw-small-spinner {
- background-position: center; padding: 10px !important; margin-right: =
- 0.6em; background-image: url("images/spinner.gif"); background-repeat: =
- no-repeat;
- }
- a.sortheader {
- margin: 0px 0.3em;
- }
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: text/css;
- charset="iso-8859-1"
- Content-Transfer-Encoding: quoted-printable
- Content-Location: http://wiki.theory.org/skins/common/commonPrint.css?270
-
- a.stub {
- color: rgb(186, 0, 0); text-decoration: none;
- }
- a.new {
- color: rgb(186, 0, 0); text-decoration: none;
- }
- #toc {
- padding: 5px; border: 1px solid rgb(170, 170, 170); background-color: =
- rgb(249, 249, 249);
- }
- .tocindent {
- margin-left: 2em;
- }
- .tocline {
- margin-bottom: 0px;
- }
- div.floatright {
- border-width: 0.5em 0px 0.8em 1.4em; border-style: solid; border-color: =
- white; margin: 0px; clear: right; float: right; position: relative;
- }
- div.floatright p {
- font-style: italic;
- }
- div.floatleft {
- border-width: 0.5em 1.4em 0.8em 0px; border-style: solid; border-color: =
- white; margin: 0.3em 0.5em 0.5em 0px; float: left; position: relative;
- }
- div.floatleft p {
- font-style: italic;
- }
- div.thumb {
- border-style: solid; border-color: white; width: auto; overflow: =
- hidden; margin-bottom: 0.5em;
- }
- div.thumbinner {
- padding: 3px !important; border: 1px solid rgb(204, 204, 204); =
- text-align: center; font-size: 94%; background-color: rgb(249, 249, =
- 249);
- }
- html .thumbimage {
- border: 1px solid rgb(204, 204, 204);
- }
- html .thumbcaption {
- padding: 0.3em 0px 0.1em; border: currentColor;
- }
- div.magnify {
- display: none;
- }
- div.tright {
- border-width: 0.5em 0px 0.8em 1.4em; clear: right; float: right;
- }
- div.tleft {
- border-width: 0.5em 1.4em 0.8em 0px; margin-right: 0.5em; float: left;
- }
- img.thumbborder {
- border: 1px solid rgb(221, 221, 221);
- }
- table.rimage {
- width: 1pt; text-align: center; margin-bottom: 1em; margin-left: 1em; =
- float: right; position: relative;
- }
- body {
- background: white; margin: 0px; padding: 0px; color: black;
- }
- .noprint {
- display: none;
- }
- div#jump-to-nav {
- display: none;
- }
- div.top {
- display: none;
- }
- div#column-one {
- display: none;
- }
- #colophon {
- display: none;
- }
- .editsection {
- display: none;
- }
- .toctoggle {
- display: none;
- }
- .tochidden {
- display: none;
- }
- div#f-poweredbyico {
- display: none;
- }
- div#f-copyrightico {
- display: none;
- }
- li#viewcount {
- display: none;
- }
- li#about {
- display: none;
- }
- li#disclaimer {
- display: none;
- }
- li#privacy {
- display: none;
- }
- #mw-hidden-catlinks {
- display: none;
- }
- ul {
- list-style-type: square;
- }
- #content {
- margin: 0px !important; padding: 0px !important; border: currentColor =
- !important;
- }
- #footer {
- background: white; color: black; border-top-color: black; =
- border-top-width: 1px; border-top-style: solid;
- }
- h1 {
- font-weight: bold;
- }
- h2 {
- font-weight: bold;
- }
- h3 {
- font-weight: bold;
- }
- h4 {
- font-weight: bold;
- }
- h5 {
- font-weight: bold;
- }
- h6 {
- font-weight: bold;
- }
- p {
- margin: 1em 0px !important; line-height: 1.2em;
- }
- .documentDescription {
- margin: 1em 0px !important; line-height: 1.2em;
- }
- .tocindent p {
- margin: 0px !important;
- }
- pre {
- background: white; padding: 1em 0px; border: 1pt dashed black; color: =
- black; overflow: auto; font-size: 8pt; white-space: pre;
- }
- table.listing {
- border: 1pt solid black; border-collapse: collapse;
- }
- table.listing td {
- border: 1pt solid black; border-collapse: collapse;
- }
- a {
- padding: 0px !important; color: black !important;
- }
- a:link {
- color: rgb(85, 34, 0); text-decoration: underline;
- }
- a:visited {
- color: rgb(85, 34, 0); text-decoration: underline;
- }
- #content a.text.external::after {
- content: " (" attr(href) ") ";
- }
- #content a.autonumber.external::after {
- content: " (" attr(href) ") ";
- }
- #globalWrapper {
- width: 100% !important; min-width: 0px !important;
- }
- #content {
- background: white; color: black;
- }
- #column-content {
- margin: 0px !important;
- }
- #column-content #content {
- margin: 0px !important; padding: 1em;
- }
- a {
- color: black !important; text-decoration: none !important;
- }
- a.external {
- color: black !important; text-decoration: none !important;
- }
- a.new {
- color: black !important; text-decoration: none !important;
- }
- a.stub {
- color: black !important; text-decoration: none !important;
- }
- a {
- color: inherit !important; text-decoration: inherit !important;
- }
- a.external {
- color: inherit !important; text-decoration: inherit !important;
- }
- a.new {
- color: inherit !important; text-decoration: inherit !important;
- }
- a.stub {
- color: inherit !important; text-decoration: inherit !important;
- }
- img {
- border: currentColor;
- }
- img.tex {
- vertical-align: middle;
- }
- span.texhtml {
- font-family: serif;
- }
- #siteNotice {
- display: none;
- }
- div.gallerybox {
- border: 1px solid rgb(204, 204, 204); width: 150px; background-color: =
- rgb(249, 249, 249);
- }
- div.gallerytext {
- overflow: visible;
- }
- table.diff {
- background: white;
- }
- td.diff-otitle {
- background: rgb(255, 255, 255);
- }
- td.diff-ntitle {
- background: rgb(255, 255, 255);
- }
- td.diff-addedline {
- background: rgb(204, 255, 204); border: 2px solid black; font-size: =
- smaller;
- }
- td.diff-deletedline {
- background: rgb(255, 255, 170); border: 2px dotted black; font-size: =
- smaller;
- }
- td.diff-context {
- background: rgb(238, 238, 238); font-size: smaller;
- }
- .diffchange {
- color: silver; font-weight: bold; text-decoration: underline;
- }
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: text/css;
- charset="iso-8859-1"
- Content-Transfer-Encoding: quoted-printable
- Content-Location: http://wiki.theory.org/skins/monobook/main.css?270
-
- #column-content {
- margin: 0px 0px 0.6em -12.2em; padding: 0px; width: 100%; float: right;
- }
- #content {
- margin: 2.8em 0px 0px 12.2em; padding: 0px 1em 1em; position: relative; =
- z-index: 2;
- }
- #column-one {
- padding-top: 160px;
- }
- #content {
- background: white; border-width: 1px medium 1px 1px; border-style: =
- solid none solid solid; border-color: rgb(170, 170, 170) currentColor =
- rgb(170, 170, 170) rgb(170, 170, 170); color: black; line-height: 1.5em;
- }
- body {
- background: url("headbg.jpg") no-repeat 0px 0px rgb(249, 249, 249); =
- font: x-small/normal sans-serif; margin: 0px; padding: 0px; color: =
- black; font-size-adjust: none; font-stretch: normal;
- }
- #globalWrapper {
- margin: 0px; padding: 0px; width: 100%; font-size: 127%;
- }
- table {
- color: black; font-size: 100%; background-color: white;
- }
- fieldset table {
- =09
- }
- a {
- color: rgb(0, 43, 184); text-decoration: none;
- }
- a:visited {
- color: rgb(90, 54, 150);
- }
- a:active {
- color: rgb(250, 167, 0);
- }
- a:hover {
- text-decoration: underline;
- }
- a.stub {
- color: rgb(119, 34, 51);
- }
- a.new {
- color: rgb(186, 0, 0);
- }
- #p-personal a.new {
- color: rgb(186, 0, 0);
- }
- a.new:visited {
- color: rgb(165, 88, 88);
- }
- #p-personal a.new:visited {
- color: rgb(165, 88, 88);
- }
- img {
- border: currentColor; vertical-align: middle;
- }
- p {
- margin: 0.4em 0px 0.5em; line-height: 1.5em;
- }
- p img {
- margin: 0px;
- }
- hr {
- margin: 0.2em 0px; border: 0px currentColor; height: 1px; color: =
- rgb(170, 170, 170); background-color: rgb(170, 170, 170);
- }
- h1 {
- margin: 0px; color: black; padding-top: 0.5em; padding-bottom: 0.17em; =
- font-weight: normal; border-bottom-color: rgb(170, 170, 170); =
- border-bottom-width: 1px; border-bottom-style: solid;
- }
- h2 {
- margin: 0px; color: black; padding-top: 0.5em; padding-bottom: 0.17em; =
- font-weight: normal; border-bottom-color: rgb(170, 170, 170); =
- border-bottom-width: 1px; border-bottom-style: solid;
- }
- h3 {
- margin: 0px; color: black; padding-top: 0.5em; padding-bottom: 0.17em; =
- font-weight: normal; border-bottom-color: rgb(170, 170, 170); =
- border-bottom-width: 1px; border-bottom-style: solid;
- }
- h4 {
- margin: 0px; color: black; padding-top: 0.5em; padding-bottom: 0.17em; =
- font-weight: normal; border-bottom-color: rgb(170, 170, 170); =
- border-bottom-width: 1px; border-bottom-style: solid;
- }
- h5 {
- margin: 0px; color: black; padding-top: 0.5em; padding-bottom: 0.17em; =
- font-weight: normal; border-bottom-color: rgb(170, 170, 170); =
- border-bottom-width: 1px; border-bottom-style: solid;
- }
- h6 {
- margin: 0px; color: black; padding-top: 0.5em; padding-bottom: 0.17em; =
- font-weight: normal; border-bottom-color: rgb(170, 170, 170); =
- border-bottom-width: 1px; border-bottom-style: solid;
- }
- h1 {
- font-size: 188%;
- }
- h1 .editsection {
- font-size: 53%;
- }
- h2 {
- font-size: 150%;
- }
- h2 .editsection {
- font-size: 67%;
- }
- h3 {
- font-weight: bold; border-bottom-color: currentColor; =
- border-bottom-width: medium; border-bottom-style: none;
- }
- h4 {
- font-weight: bold; border-bottom-color: currentColor; =
- border-bottom-width: medium; border-bottom-style: none;
- }
- h5 {
- font-weight: bold; border-bottom-color: currentColor; =
- border-bottom-width: medium; border-bottom-style: none;
- }
- h6 {
- font-weight: bold; border-bottom-color: currentColor; =
- border-bottom-width: medium; border-bottom-style: none;
- }
- h3 {
- font-size: 132%;
- }
- h3 .editsection {
- font-size: 76%; font-weight: normal;
- }
- h4 {
- font-size: 116%;
- }
- h4 .editsection {
- font-size: 86%; font-weight: normal;
- }
- h5 {
- font-size: 100%;
- }
- h5 .editsection {
- font-weight: normal;
- }
- h6 {
- font-size: 80%;
- }
- h6 .editsection {
- font-size: 125%; font-weight: normal;
- }
- ul {
- margin: 0.3em 0px 0px 1.5em; padding: 0px; line-height: 1.5em; =
- list-style-type: square; list-style-image: url("bullet.gif");
- }
- ol {
- margin: 0.3em 0px 0px 3.2em; padding: 0px; line-height: 1.5em; =
- list-style-image: none;
- }
- li {
- margin-bottom: 0.1em;
- }
- dt {
- font-weight: bold; margin-bottom: 0.1em;
- }
- dl {
- margin-top: 0.2em; margin-bottom: 0.5em;
- }
- dd {
- line-height: 1.5em; margin-bottom: 0.1em; margin-left: 2em;
- }
- fieldset {
- margin: 1em 0px; padding: 0px 1em 1em; border: 1px solid rgb(47, 111, =
- 171); line-height: 1.5em;
- }
- fieldset.nested {
- margin: 0px 0px 0.5em; padding: 0px 0.5em 0.5em;
- }
- legend {
- padding: 0.5em; font-size: 95%;
- }
- form {
- margin: 0px; border: currentColor;
- }
- textarea {
- padding: 0.1em; width: 100%;
- }
- input.historysubmit {
- padding: 0px 0.3em 0.3em !important; height: 1.7em !important; =
- font-size: 94%; margin-left: 1.6em; cursor: pointer;
- }
- select {
- vertical-align: top;
- }
- abbr {
- color: black; border-bottom-color: black; border-bottom-width: 1px; =
- border-bottom-style: dotted; cursor: help;
- }
- acronym {
- color: black; border-bottom-color: black; border-bottom-width: 1px; =
- border-bottom-style: dotted; cursor: help;
- }
- .explain {
- color: black; border-bottom-color: black; border-bottom-width: 1px; =
- border-bottom-style: dotted; cursor: help;
- }
- q {
- font-family: Times, "Times New Roman", serif; font-style: italic;
- }
- code {
- background-color: rgb(249, 249, 249);
- }
- pre {
- padding: 1em; border: 1px dashed rgb(47, 111, 171); color: black; =
- line-height: 1.1em; background-color: rgb(249, 249, 249);
- }
- #siteSub {
- display: none;
- }
- #jump-to-nav {
- display: none;
- }
- #contentSub {
- margin: 0px 0px 1.4em 1em; width: auto; color: rgb(125, 125, 125); =
- line-height: 1.2em; font-size: 84%;
- }
- #contentSub2 {
- margin: 0px 0px 1.4em 1em; width: auto; color: rgb(125, 125, 125); =
- line-height: 1.2em; font-size: 84%;
- }
- span.subpages {
- display: block;
- }
- #bodyContent h1 {
- margin-bottom: 0.6em;
- }
- #bodyContent h2 {
- margin-bottom: 0.6em;
- }
- #bodyContent h3 {
- margin-bottom: 0.3em;
- }
- #bodyContent h4 {
- margin-bottom: 0.3em;
- }
- #bodyContent h5 {
- margin-bottom: 0.3em;
- }
- #firstHeading {
- line-height: 1.2em; padding-bottom: 0px; margin-bottom: 0.1em;
- }
- .usermessage {
- margin: 2em 0px 1em; padding: 0.5em 1em; border: 1px solid rgb(255, =
- 165, 0); color: black; font-weight: bold; vertical-align: middle; =
- background-color: rgb(255, 206, 123);
- }
- #siteNotice {
- padding: 0px 0.9em; text-align: center; font-size: 95%;
- }
- #siteNotice p {
- margin: 0px; padding: 0px;
- }
- .catlinks {
- padding: 5px; border: 1px solid rgb(170, 170, 170); clear: both; =
- margin-top: 1em; background-color: rgb(249, 249, 249);
- }
- .documentDescription {
- margin: 1em 0px; line-height: 1.5em; font-weight: bold; display: block;
- }
- .documentByLine {
- text-align: right; color: rgb(118, 121, 124); clear: both; font-size: =
- 90%; font-weight: normal;
- }
- .center {
- width: 100%; text-align: center;
- }
- *.center * {
- margin-right: auto; margin-left: auto;
- }
- .small {
- font-size: 94%;
- }
- .small * {
- font-size: 94%;
- }
- table.small {
- font-size: 100%;
- }
- #toc {
- padding: 5px; border: 1px solid rgb(170, 170, 170); font-size: 95%; =
- background-color: rgb(249, 249, 249);
- }
- .toc {
- padding: 5px; border: 1px solid rgb(170, 170, 170); font-size: 95%; =
- background-color: rgb(249, 249, 249);
- }
- .mw-warning {
- padding: 5px; border: 1px solid rgb(170, 170, 170); font-size: 95%; =
- background-color: rgb(249, 249, 249);
- }
- #toc h2 {
- padding: 0px; border: currentColor; font-size: 100%; font-weight: bold; =
- display: inline;
- }
- .toc h2 {
- padding: 0px; border: currentColor; font-size: 100%; font-weight: bold; =
- display: inline;
- }
- #toc #toctitle {
- text-align: center;
- }
- .toc #toctitle {
- text-align: center;
- }
- #toc .toctitle {
- text-align: center;
- }
- .toc .toctitle {
- text-align: center;
- }
- #toc ul {
- text-align: left; padding-left: 0px; margin-left: 0px; list-style-type: =
- none; list-style-image: none;
- }
- .toc ul {
- text-align: left; padding-left: 0px; margin-left: 0px; list-style-type: =
- none; list-style-image: none;
- }
- #toc ul ul {
- margin: 0px 0px 0px 2em;
- }
- .toc ul ul {
- margin: 0px 0px 0px 2em;
- }
- #toc .toctoggle {
- font-size: 94%;
- }
- .toc .toctoggle {
- font-size: 94%;
- }
- .mw-warning {
- text-align: center; margin-right: 50px; margin-left: 50px;
- }
- div.floatright {
- margin: 0px 0px 0.5em 0.5em; border: 0px currentColor; clear: right; =
- float: right; position: relative;
- }
- table.floatright {
- margin: 0px 0px 0.5em 0.5em; border: 0px currentColor; clear: right; =
- float: right; position: relative;
- }
- div.floatright p {
- font-style: italic;
- }
- div.floatleft {
- margin: 0px 0.5em 0.5em 0px; border: 0px currentColor; clear: left; =
- float: left; position: relative;
- }
- table.floatleft {
- margin: 0px 0.5em 0.5em 0px; border: 0px currentColor; clear: left; =
- float: left; position: relative;
- }
- div.floatleft p {
- font-style: italic;
- }
- div.thumb {
- border-style: solid; border-color: white; width: auto; margin-bottom: =
- 0.5em;
- }
- div.thumbinner {
- padding: 3px !important; border: 1px solid rgb(204, 204, 204); =
- text-align: center; overflow: hidden; font-size: 94%; background-color: =
- rgb(249, 249, 249);
- }
- html .thumbimage {
- border: 1px solid rgb(204, 204, 204);
- }
- html .thumbcaption {
- padding: 3px !important; border: currentColor; text-align: left; =
- line-height: 1.4em; font-size: 94%;
- }
- div.magnify {
- border: currentColor !important; float: right;
- }
- div.magnify a {
- border: currentColor !important; display: block;
- }
- div.magnify img {
- border: currentColor !important; display: block;
- }
- div.tright {
- border-width: 0.5em 0px 0.8em 1.4em; clear: right; float: right;
- }
- div.tleft {
- border-width: 0.5em 1.4em 0.8em 0px; clear: left; margin-right: 0.5em; =
- float: left;
- }
- img.thumbborder {
- border: 1px solid rgb(221, 221, 221);
- }
- .hiddenStructure {
- display: none;
- }
- table.rimage {
- text-align: center; margin-bottom: 1em; margin-left: 1em; float: right; =
- position: relative;
- }
- .toccolours {
- padding: 5px; border: 1px solid rgb(170, 170, 170); font-size: 95%; =
- background-color: rgb(249, 249, 249);
- }
- .special li {
- margin: 0px; padding: 0px; line-height: 1.4em;
- }
- #bodyContent a.external {
- background: url("external.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href^=3D'gopher://'].external {
- background: url("external.png") no-repeat right; padding: 0px 13px;
- }
- .rtl #bodyContent a.external {
- background-image: url("external-rtl.png");
- }
- .rtl #bodyContent a[href^=3D'gopher://'].external {
- background-image: url("external-rtl.png");
- }
- #bodyContent a[href^=3D'https://'].external {
- background: url("lock_icon.gif") no-repeat right; padding: 0px 16px;
- }
- .link-https {
- background: url("lock_icon.gif") no-repeat right; padding: 0px 16px;
- }
- #bodyContent a[href^=3D'mailto:'].external {
- background: url("mail_icon.gif") no-repeat right; padding: 0px 18px;
- }
- .link-mailto {
- background: url("mail_icon.gif") no-repeat right; padding: 0px 18px;
- }
- #bodyContent a[href^=3D'news://'].external {
- background: url("news_icon.png") no-repeat right; padding: 0px 18px;
- }
- #bodyContent a[href^=3D'ftp://'].external {
- background: url("file_icon.gif") no-repeat right; padding: 0px 18px;
- }
- .link-ftp {
- background: url("file_icon.gif") no-repeat right; padding: 0px 18px;
- }
- #bodyContent a[href^=3D'irc://'].external {
- background: url("discussionitem_icon.gif") no-repeat right; padding: =
- 0px 18px;
- }
- .link-irc {
- background: url("discussionitem_icon.gif") no-repeat right; padding: =
- 0px 18px;
- }
- #bodyContent a[href$=3D'.ogg'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.OGG'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.mid'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.MID'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.midi'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.MIDI'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.mp3'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.MP3'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.wav'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.WAV'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.wma'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.WMA'].external {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- .link-audio {
- background: url("audio.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.ogm'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.OGM'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.avi'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.AVI'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.mpeg'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.MPEG'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.mpg'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.MPG'].external {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- .link-video {
- background: url("video.png") no-repeat right; padding: 0px 13px;
- }
- #bodyContent a[href$=3D'.pdf'].external {
- background: url("document.png") no-repeat right; padding: 0px 12px;
- }
- #bodyContent a[href$=3D'.PDF'].external {
- background: url("document.png") no-repeat right; padding: 0px 12px;
- }
- #bodyContent a[href*=3D'.pdf#'].external {
- background: url("document.png") no-repeat right; padding: 0px 12px;
- }
- #bodyContent a[href*=3D'.PDF#'].external {
- background: url("document.png") no-repeat right; padding: 0px 12px;
- }
- #bodyContent a[href*=3D'.pdf?'].external {
- background: url("document.png") no-repeat right; padding: 0px 12px;
- }
- #bodyContent a[href*=3D'.PDF?'].external {
- background: url("document.png") no-repeat right; padding: 0px 12px;
- }
- .link-document {
- background: url("document.png") no-repeat right; padding: 0px 12px;
- }
- .rtl #bodyContent a.external {
- background-position: left; padding-right: 0px;
- }
- .rtl a.feedlink {
- background-position: right; padding-right: 16px; padding-left: 0px;
- }
- .ltr #bodyContent a.external {
- padding-left: 0px;
- }
- #bodyContent a.extiw {
- color: rgb(51, 102, 187);
- }
- #bodyContent a.extiw:active {
- color: rgb(51, 102, 187);
- }
- #bodyContent a.external {
- color: rgb(51, 102, 187);
- }
- .portlet {
- margin: 0px 0px 0.5em; padding: 0px; border: currentColor; width: =
- 11.6em; overflow: hidden; float: none;
- }
- .portlet h4 {
- font-size: 95%; font-weight: normal; white-space: nowrap;
- }
- .portlet h5 {
- padding: 0px 1em 0px 0.5em; height: 1em; text-transform: lowercase; =
- font-size: 91%; font-weight: normal; display: inline; white-space: =
- nowrap;
- }
- .portlet h6 {
- background: rgb(255, 174, 46); border-width: 1px; border-style: solid =
- solid none; border-color: rgb(47, 111, 171); padding: 0px 1em; height: =
- 1.2em; text-transform: lowercase; font-size: 1em; font-weight: normal; =
- display: block; white-space: nowrap;
- }
- .pBody {
- padding: 0px 0.8em 0.3em 0.5em; border: 1px solid rgb(170, 170, 170); =
- color: black; font-size: 95%; border-collapse: collapse; =
- background-color: white;
- }
- .portlet h1 {
- margin: 0px; padding: 0px;
- }
- .portlet h2 {
- margin: 0px; padding: 0px;
- }
- .portlet h3 {
- margin: 0px; padding: 0px;
- }
- .portlet h4 {
- margin: 0px; padding: 0px;
- }
- .portlet ul {
- line-height: 1.5em; font-size: 95%; list-style-type: square; =
- list-style-image: url("bullet.gif");
- }
- .portlet li {
- margin: 0px; padding: 0px;
- }
- #p-logo {
- left: 0px; top: 0px; width: 12em; height: 155px; overflow: visible; =
- position: absolute; z-index: 3;
- }
- #p-logo h5 {
- display: none;
- }
- #p-logo a {
- background-position: 35% 50% !important; width: 12.2em; height: 155px; =
- text-decoration: none; display: block; background-repeat: no-repeat;
- }
- #p-logo a:hover {
- background-position: 35% 50% !important; width: 12.2em; height: 155px; =
- text-decoration: none; display: block; background-repeat: no-repeat;
- }
- #p-search {
- position: relative; z-index: 3;
- }
- input.searchButton {
- font-size: 95%; margin-top: 1px;
- }
- #searchGoButton {
- padding-right: 0.5em; padding-left: 0.5em; font-weight: bold;
- }
- #searchInput {
- margin: 0px; width: 10.9em; font-size: 95%;
- }
- #p-search .pBody {
- padding: 0.5em 0.4em 0.4em; text-align: center;
- }
- #p-search #searchform div div {
- font-size: 95%; margin-top: 0.4em;
- }
- #p-personal {
- left: 0px; top: 0px; position: absolute; z-index: 0;
- }
- #p-personal {
- margin: 0px; padding: 0px; border: currentColor; width: 100%; =
- line-height: 1.2em; overflow: visible; white-space: nowrap;
- }
- #p-personal h5 {
- display: none;
- }
- #p-personal .portlet {
- margin: 0px; padding: 0px; border: currentColor; overflow: visible; =
- z-index: 0;
- }
- #p-personal .pBody {
- margin: 0px; padding: 0px; border: currentColor; overflow: visible; =
- z-index: 0;
- }
- #p-personal ul {
- list-style: none; margin: 0px; padding: 0px 2em 0px 3em; border: =
- currentColor; text-align: right; color: rgb(47, 111, 171); line-height: =
- 1.4em; z-index: 0; cursor: default;
- }
- #p-personal li {
- padding: 0px; border: currentColor; color: rgb(47, 111, 171); =
- line-height: 1.2em; margin-left: 1em; display: inline; z-index: 0;
- }
- #p-personal li a {
- color: rgb(0, 88, 150); padding-bottom: 0.2em; text-decoration: none;
- }
- #p-personal li a:hover {
- padding-bottom: 0.2em; text-decoration: none; background-color: white;
- }
- #p-personal li.active a:hover {
- background-color: transparent;
- }
- li#pt-userpage {
- background: url("user.gif") no-repeat left top; text-transform: none; =
- padding-left: 20px;
- }
- li#pt-anonuserpage {
- background: url("user.gif") no-repeat left top; text-transform: none; =
- padding-left: 20px;
- }
- li#pt-login {
- background: url("user.gif") no-repeat left top; text-transform: none; =
- padding-left: 20px;
- }
- #p-personal ul {
- text-transform: lowercase;
- }
- #p-personal li.active {
- font-weight: bold;
- }
- #p-cactions {
- list-style: none; margin: 0px; left: 11.5em; top: 1.3em; width: 76%; =
- line-height: 1.1em; overflow: visible; padding-left: 1em; font-size: =
- 95%; white-space: nowrap; border-collapse: collapse; position: absolute;
- }
- #p-cactions ul {
- list-style: none;
- }
- #p-cactions li {
- background: white; border-width: 1px 1px medium; border-style: solid =
- solid none; border-color: rgb(170, 170, 170) rgb(170, 170, 170) =
- currentColor; margin: 0px 0.3em 0px 0px; padding: 0px 0px 0.1em; =
- overflow: visible; display: inline;
- }
- #p-cactions li.selected {
- border-color: rgb(250, 189, 35); padding: 0px 0px 0.2em; font-weight: =
- bold;
- }
- #p-cactions li a {
- margin: 0px; padding: 0px 0.8em 0.3em; border: currentColor; color: =
- rgb(0, 43, 184); text-decoration: none; position: relative; z-index: 0; =
- background-color: rgb(251, 251, 251);
- }
- #p-cactions li.selected a {
- padding: 0px 1em 0.2em !important; z-index: 3; background-color: white;
- }
- #p-cactions .new a {
- color: rgb(186, 0, 0);
- }
- #p-cactions li a:hover {
- text-decoration: none; z-index: 3; background-color: white;
- }
- #p-cactions h5 {
- display: none;
- }
- #p-cactions li.istalk {
- margin-right: 0px;
- }
- #p-cactions li.istalk a {
- padding-right: 0.5em;
- }
- #p-cactions #ca-addsection a {
- padding-right: 0.4em; padding-left: 0.4em;
- }
- li#ca-talk {
- margin-right: 1.6em;
- }
- li#ca-watch {
- margin-left: 1.6em;
- }
- li#ca-unwatch {
- margin-left: 1.6em;
- }
- li#ca-varlang-0 {
- margin-left: 1.6em;
- }
- li#ca-print {
- margin-left: 1.6em;
- }
- #p-cactions .pBody {
- padding: 0px; border: 0px currentColor; color: inherit; font-size: 1em; =
- border-collapse: inherit; background-color: transparent;
- }
- #p-cactions .hiddenStructure {
- display: none;
- }
- #p-cactions li a {
- text-transform: lowercase;
- }
- #p-lang {
- position: relative; z-index: 3;
- }
- .capitalize-all-nouns .portlet h5 {
- text-transform: none;
- }
- .capitalize-all-nouns .portlet h6 {
- text-transform: none;
- }
- .capitalize-all-nouns #p-personal ul {
- text-transform: none;
- }
- .capitalize-all-nouns #p-cactions ul li a {
- text-transform: none;
- }
- #t-ispermalink {
- color: rgb(153, 153, 153);
- }
- #t-iscite {
- color: rgb(153, 153, 153);
- }
- #footer {
- margin: 0.6em 0px 1em; padding: 0.4em 0px 1.2em; text-align: center; =
- font-size: 90%; border-top-color: rgb(250, 189, 35); =
- border-bottom-color: rgb(250, 189, 35); border-top-width: 1px; =
- border-bottom-width: 1px; border-top-style: solid; border-bottom-style: =
- solid; background-color: white;
- }
- #footer li {
- margin: 0px 1.3em; display: inline;
- }
- #f-poweredbyico {
- margin: 0px 8px; top: -2px; position: relative;
- }
- #f-copyrightico {
- margin: 0px 8px; top: -2px; position: relative;
- }
- #f-poweredbyico {
- height: 1%; float: right;
- }
- #f-copyrightico {
- height: 1%; float: left;
- }
- .mw-htmlform-submit {
- padding-right: 0.3em; padding-left: 0.3em; font-weight: bold; =
- margin-right: 2em;
- }
- #preftoc {
- margin: 0px; padding: 0px; width: 100%; clear: both;
- }
- #preftoc li {
- color: rgb(0, 0, 0); background-color: rgb(240, 240, 240);
- }
- #preftoc li {
- border-width: 1px 1px 0px; border-style: solid solid none; =
- border-color: rgb(255, 255, 255) rgb(113, 111, 100) currentColor =
- rgb(255, 255, 255); margin: 1px -2px 1px 2px; padding: 2px 0px 3px; =
- float: left; list-style-type: none; list-style-image: none; white-space: =
- nowrap; position: relative; z-index: 3;
- }
- #preftoc li.selected {
- border-width: 1px 1px medium; border-style: solid solid none; =
- border-color: rgb(170, 170, 170) rgb(170, 170, 170) currentColor; top: =
- 1px; padding-top: 2px; font-weight: bold; margin-right: -3px; cursor: =
- default; background-color: rgb(249, 249, 249);
- }
- #preftoc > li.selected {
- top: 2px;
- }
- #preftoc a {
- padding: 0px 0.7em; color: rgb(0, 0, 0); text-decoration: none; =
- display: block; position: relative;
- }
- #preftoc a:active {
- padding: 0px 0.7em; color: rgb(0, 0, 0); text-decoration: none; =
- display: block; position: relative;
- }
- #preftoc li.selected a {
- text-decoration: none; cursor: default;
- }
- #preferences {
- margin: 0px; padding: 1.5em; border: 1px solid rgb(170, 170, 170); =
- clear: both; background-color: rgb(249, 249, 249);
- }
- .prefsection {
- margin: 0px; padding: 0px; border: currentColor;
- }
- .prefsection legend {
- font-weight: bold;
- }
- .prefsection table {
- background-color: rgb(249, 249, 249);
- }
- .prefsection legend {
- background-color: rgb(249, 249, 249);
- }
- .mainLegend {
- display: none;
- }
- td.htmlform-tip {
- padding: 0.2em 2em; color: rgb(102, 102, 102); font-size: x-small;
- }
- .preferences-login {
- clear: both; margin-bottom: 1.5em;
- }
- .prefcache {
- font-size: 90%; margin-top: 2em;
- }
- div#userloginForm form {
- margin: 0px 3em 1em 0px; padding: 1.5em 2em; border: 1px solid rgb(170, =
- 170, 170); clear: both; float: left; background-color: rgb(249, 249, =
- 249);
- }
- div#userlogin form#userlogin2 {
- margin: 0px 3em 1em 0px; padding: 1.5em 2em; border: 1px solid rgb(170, =
- 170, 170); clear: both; float: left; background-color: rgb(249, 249, =
- 249);
- }
- .rtl div#userloginForm form {
- float: right;
- }
- .rtl div#userlogin form#userlogin2 {
- float: right;
- }
- div#userloginForm table {
- background-color: rgb(249, 249, 249);
- }
- div#userlogin form#userlogin2 table {
- background-color: rgb(249, 249, 249);
- }
- div#userloginForm h2 {
- padding-top: 0px;
- }
- div#userlogin form#userlogin2 h2 {
- padding-top: 0px;
- }
- div#userlogin .captcha {
- padding: 1.5em 2em; border: 1px solid rgb(187, 187, 187); =
- background-color: white;
- }
- div#userloginForm .captcha {
- padding: 1.5em 2em; border: 1px solid rgb(187, 187, 187); =
- background-color: white;
- }
- #loginend {
- clear: both;
- }
- #signupend {
- clear: both;
- }
- #userloginprompt {
- font-size: 85%;
- }
- #languagelinks {
- font-size: 85%;
- }
- #login-sectiontip {
- line-height: 1.2; padding-top: 2em; font-size: 85%;
- }
- #userlogin .loginText {
- width: 12em;
- }
- #userlogin .loginPassword {
- width: 12em;
- }
- #userloginlink a {
- font-weight: bold;
- }
- #wpLoginattempt {
- font-weight: bold;
- }
- #wpCreateaccount {
- font-weight: bold;
- }
- * > html #p-cactions li {
- border: currentColor;
- }
- * > html #p-cactions li a {
- border-width: 1px 1px medium; border-style: solid solid none; =
- border-color: rgb(170, 170, 170) rgb(170, 170, 170) currentColor;
- }
- * > html #p-cactions li.selected a {
- border-color: rgb(250, 189, 35);
- }
- * > html #f-poweredbyico {
- width: 88px;
- }
- * > html #f-copyrightico {
- width: 88px;
- }
- * > html #bodyContent {
- width: 100%; padding-bottom: 25px; overflow-x: auto;
- }
- * > html #bodyContent pre {
- width: 100%; padding-bottom: 25px; overflow-x: auto;
- }
- * html #footer {
- margin-top: 0px;
- }
- * html #column-content {
- margin-bottom: 0px; display: inline;
- }
- * html div.editsection {
- font-size: smaller;
- }
- #pagehistory li.selected {
- position: relative;
- }
- * > html #column-content {
- float: none;
- }
- * > html #column-one {
- left: 0px; top: 0px; position: absolute;
- }
- * > html #footer {
- margin-left: 13.2em;
- }
- .redirectText {
- margin: 5px; font-size: 150%;
- }
- .printfooter {
- display: none;
- }
- div.patrollink {
- clear: both;
- }
- .sharedUploadNotice {
- font-style: italic;
- }
- span.updatedmarker {
- color: black; background-color: rgb(0, 255, 0);
- }
- .previewnote {
- color: rgb(204, 0, 0); margin-bottom: 1em;
- }
- .previewnote p {
- margin: 0.8em 0px; text-indent: 3em;
- }
- .editExternally {
- padding: 3px; border: 1px solid gray; text-align: center; font-size: =
- small; margin-top: 0.5em; float: left; background-color: rgb(255, 255, =
- 255);
- }
- .editExternallyHelp {
- color: gray; font-style: italic;
- }
- .toggle {
- text-indent: -2em; margin-left: 2em;
- }
- input#wpSummary {
- width: 80%;
- }
- input#wpSave {
- margin-right: 0.33em;
- }
- input#wpDiff {
- margin-right: 0.33em;
- }
- #wpSave {
- font-weight: bold;
- }
- table.revisionform_default {
- border: 1px solid rgb(0, 0, 0);
- }
- table.revisionform_focus {
- border: 1px solid rgb(0, 0, 0); background-color: rgb(0, 187, 255);
- }
- tr.revision_tr_default {
- background-color: rgb(238, 238, 238);
- }
- tr.revision_tr_first {
- background-color: rgb(221, 221, 221);
- }
- p.revision_saved {
- color: green; font-weight: bold;
- }
- div.noarticletext {
- background: rgb(255, 255, 255); padding: 0.2em 1em; border: 1px solid =
- rgb(204, 204, 204); color: rgb(0, 0, 0);
- }
- div#searchTargetContainer {
- background: white; left: 10px; top: 10px; width: 90%;
- }
- div#searchTarget {
- background: rgb(240, 240, 240); margin: 5px; padding: 3px; border: 1px =
- solid blue;
- }
- div#searchTarget ul li {
- list-style: none;
- }
- div#searchTarget ul li::before {
- color: orange; content: "\00BB \0020";
- }
- div#searchTargetHide {
- background: rgb(220, 220, 220); padding: 2px; border: 1px solid black; =
- float: right;
- }
- #powersearch p {
- margin-top: 0px;
- }
- div.multipageimagenavbox {
- background: rgb(240, 240, 240); margin: 1em; padding: 4px; border: 1px =
- solid silver;
- }
- div.multipageimagenavbox div.thumb {
- border: currentColor; margin-right: 2em; margin-left: 2em;
- }
- div.multipageimagenavbox hr {
- margin: 6px;
- }
- table.multipageimage td {
- text-align: center;
- }
- .templatesUsed {
- margin-top: 1.5em;
- }
- .mw-summary-preview {
- margin: 0.1em 0px;
- }
- div.mw-lag-warn-normal {
- margin: 3px auto; padding: 3px; text-align: center;
- }
- div.mw-lag-warn-high {
- margin: 3px auto; padding: 3px; text-align: center;
- }
- div.mw-lag-warn-normal {
- border: 1px solid rgb(255, 204, 102); background-color: rgb(255, 255, =
- 204);
- }
- div.mw-lag-warn-high {
- border: 2px solid rgb(255, 0, 51); font-weight: bold; background-color: =
- rgb(255, 204, 204);
- }
- .MediaTransformError {
- padding: 0.1em; background-color: rgb(204, 204, 204);
- }
- .MediaTransformError td {
- text-align: center; font-size: 90%; vertical-align: middle;
- }
- .os-suggest {
- font-size: 127%;
- }
- .no-text-transform {
- text-transform: none;
- }
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: application/octet-stream
- Content-Transfer-Encoding: 7bit
- Content-Location: http://wiki.theory.org/index.php?title=-&action=raw&maxage=18000&gen=css
-
- a.new {
- color: rgb(204, 34, 0);
- }
- #quickbar a.new {
- color: rgb(204, 34, 0);
- }
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: application/octet-stream
- Content-Transfer-Encoding: quoted-printable
- Content-Location: http://wiki.theory.org/skins/common/wikibits.js?270
-
- // MediaWiki JavaScript support functions=0A=
- =0A=
- var clientPC =3D navigator.userAgent.toLowerCase(); // Get client info=0A=
- var is_gecko =3D /gecko/.test( clientPC ) &&=0A=
- !/khtml|spoofer|netscape\/7\.0/.test(clientPC);=0A=
- var webkit_match =3D clientPC.match(/applewebkit\/(\d+)/);=0A=
- if (webkit_match) {=0A=
- var is_safari =3D clientPC.indexOf('applewebkit') !=3D -1 &&=0A=
- clientPC.indexOf('spoofer') =3D=3D -1;=0A=
- var is_safari_win =3D is_safari && clientPC.indexOf('windows') !=3D -1;=0A=
- var webkit_version =3D parseInt(webkit_match[1]);=0A=
- }=0A=
- // For accesskeys; note that FF3+ is included here!=0A=
- var is_ff2 =3D /firefox\/[2-9]|minefield\/3/.test( clientPC );=0A=
- var ff2_bugs =3D /firefox\/2/.test( clientPC );=0A=
- // These aren't used here, but some custom scripts rely on them=0A=
- var is_ff2_win =3D is_ff2 && clientPC.indexOf('windows') !=3D -1;=0A=
- var is_ff2_x11 =3D is_ff2 && clientPC.indexOf('x11') !=3D -1;=0A=
- if (clientPC.indexOf('opera') !=3D -1) {=0A=
- var is_opera =3D true;=0A=
- var is_opera_preseven =3D window.opera && !document.childNodes;=0A=
- var is_opera_seven =3D window.opera && document.childNodes;=0A=
- var is_opera_95 =3D /opera\/(9\.[5-9]|[1-9][0-9])/.test( clientPC );=0A=
- var opera6_bugs =3D is_opera_preseven;=0A=
- var opera7_bugs =3D is_opera_seven && !is_opera_95;=0A=
- var opera95_bugs =3D /opera\/(9\.5)/.test( clientPC );=0A=
- }=0A=
- // As recommended by =
- <http://msdn.microsoft.com/en-us/library/ms537509.aspx>,=0A=
- // avoiding false positives from moronic extensions that append to the =
- IE UA=0A=
- // string (bug 23171)=0A=
- var ie6_bugs =3D false;=0A=
- if ( /msie ([0-9]{1,}[\.0-9]{0,})/.exec( clientPC ) !=3D null=0A=
- && parseFloat( RegExp.$1 ) <=3D 6.0 ) {=0A=
- ie6_bugs =3D true;=0A=
- }=0A=
- =0A=
- // Global external objects used by this script.=0A=
- /*extern ta, stylepath, skin */=0A=
- =0A=
- // add any onload functions in this hook (please don't hard-code any =
- events in the xhtml source)=0A=
- var doneOnloadHook;=0A=
- =0A=
- if (!window.onloadFuncts) {=0A=
- var onloadFuncts =3D [];=0A=
- }=0A=
- =0A=
- function addOnloadHook( hookFunct ) {=0A=
- // Allows add-on scripts to add onload functions=0A=
- if( !doneOnloadHook ) {=0A=
- onloadFuncts[onloadFuncts.length] =3D hookFunct;=0A=
- } else {=0A=
- hookFunct(); // bug in MSIE script loading=0A=
- }=0A=
- }=0A=
- =0A=
- function hookEvent( hookName, hookFunct ) {=0A=
- addHandler( window, hookName, hookFunct );=0A=
- }=0A=
- =0A=
- function importScript( page ) {=0A=
- // TODO: might want to introduce a utility function to match =
- wfUrlencode() in PHP=0A=
- var uri =3D wgScript + '?title=3D' +=0A=
- encodeURIComponent(page.replace(/ =
- /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') +=0A=
- '&action=3Draw&ctype=3Dtext/javascript';=0A=
- return importScriptURI( uri );=0A=
- }=0A=
- =0A=
- var loadedScripts =3D {}; // included-scripts tracker=0A=
- function importScriptURI( url ) {=0A=
- if ( loadedScripts[url] ) {=0A=
- return null;=0A=
- }=0A=
- loadedScripts[url] =3D true;=0A=
- var s =3D document.createElement( 'script' );=0A=
- s.setAttribute( 'src', url );=0A=
- s.setAttribute( 'type', 'text/javascript' );=0A=
- document.getElementsByTagName('head')[0].appendChild( s );=0A=
- return s;=0A=
- }=0A=
- =0A=
- function importStylesheet( page ) {=0A=
- return importStylesheetURI( wgScript + =
- '?action=3Draw&ctype=3Dtext/css&title=3D' + encodeURIComponent( =
- page.replace(/ /g,'_') ) );=0A=
- }=0A=
- =0A=
- function importStylesheetURI( url, media ) {=0A=
- var l =3D document.createElement( 'link' );=0A=
- l.type =3D 'text/css';=0A=
- l.rel =3D 'stylesheet';=0A=
- l.href =3D url;=0A=
- if( media ) {=0A=
- l.media =3D media;=0A=
- }=0A=
- document.getElementsByTagName('head')[0].appendChild( l );=0A=
- return l;=0A=
- }=0A=
- =0A=
- function appendCSS( text ) {=0A=
- var s =3D document.createElement( 'style' );=0A=
- s.type =3D 'text/css';=0A=
- s.rel =3D 'stylesheet';=0A=
- if ( s.styleSheet ) {=0A=
- s.styleSheet.cssText =3D text; // IE=0A=
- } else {=0A=
- s.appendChild( document.createTextNode( text + '' ) ); // Safari =
- sometimes borks on null=0A=
- }=0A=
- document.getElementsByTagName('head')[0].appendChild( s );=0A=
- return s;=0A=
- }=0A=
- =0A=
- // Special stylesheet links for Monobook only (see bug 14717)=0A=
- if ( typeof stylepath !=3D 'undefined' && skin =3D=3D 'monobook' ) {=0A=
- if ( opera6_bugs ) {=0A=
- importStylesheetURI( stylepath + '/' + skin + '/Opera6Fixes.css' );=0A=
- } else if ( opera7_bugs ) {=0A=
- importStylesheetURI( stylepath + '/' + skin + '/Opera7Fixes.css' );=0A=
- } else if ( opera95_bugs ) {=0A=
- importStylesheetURI( stylepath + '/' + skin + '/Opera9Fixes.css' );=0A=
- } else if ( ff2_bugs ) {=0A=
- importStylesheetURI( stylepath + '/' + skin + '/FF2Fixes.css' );=0A=
- }=0A=
- }=0A=
- =0A=
- =0A=
- if ( wgBreakFrames ) {=0A=
- // Un-trap us from framesets=0A=
- if ( window.top !=3D window ) {=0A=
- window.top.location =3D window.location;=0A=
- }=0A=
- }=0A=
- =0A=
- function showTocToggle() {=0A=
- if ( document.createTextNode ) {=0A=
- // Uses DOM calls to avoid document.write + XHTML issues=0A=
- =0A=
- var linkHolder =3D document.getElementById( 'toctitle' );=0A=
- var existingLink =3D document.getElementById( 'togglelink' );=0A=
- if ( !linkHolder || existingLink ) {=0A=
- // Don't add the toggle link twice=0A=
- return;=0A=
- }=0A=
- =0A=
- var outerSpan =3D document.createElement( 'span' );=0A=
- outerSpan.className =3D 'toctoggle';=0A=
- =0A=
- var toggleLink =3D document.createElement( 'a' );=0A=
- toggleLink.id =3D 'togglelink';=0A=
- toggleLink.className =3D 'internal';=0A=
- toggleLink.href =3D 'javascript:toggleToc()';=0A=
- toggleLink.appendChild( document.createTextNode( tocHideText ) );=0A=
- =0A=
- outerSpan.appendChild( document.createTextNode( '[' ) );=0A=
- outerSpan.appendChild( toggleLink );=0A=
- outerSpan.appendChild( document.createTextNode( ']' ) );=0A=
- =0A=
- linkHolder.appendChild( document.createTextNode( ' ' ) );=0A=
- linkHolder.appendChild( outerSpan );=0A=
- =0A=
- var cookiePos =3D document.cookie.indexOf( "hidetoc=3D" );=0A=
- if ( cookiePos > -1 && document.cookie.charAt( cookiePos + 8 ) =3D=3D =
- 1 ) {=0A=
- toggleToc();=0A=
- }=0A=
- }=0A=
- }=0A=
- =0A=
- function changeText( el, newText ) {=0A=
- // Safari work around=0A=
- if ( el.innerText ) {=0A=
- el.innerText =3D newText;=0A=
- } else if ( el.firstChild && el.firstChild.nodeValue ) {=0A=
- el.firstChild.nodeValue =3D newText;=0A=
- }=0A=
- }=0A=
- =0A=
- function toggleToc() {=0A=
- var tocmain =3D document.getElementById( 'toc' );=0A=
- var toc =3D =
- document.getElementById('toc').getElementsByTagName('ul')[0];=0A=
- var toggleLink =3D document.getElementById( 'togglelink' );=0A=
- =0A=
- if ( toc && toggleLink && toc.style.display =3D=3D 'none' ) {=0A=
- changeText( toggleLink, tocHideText );=0A=
- toc.style.display =3D 'block';=0A=
- document.cookie =3D "hidetoc=3D0";=0A=
- tocmain.className =3D 'toc';=0A=
- } else {=0A=
- changeText( toggleLink, tocShowText );=0A=
- toc.style.display =3D 'none';=0A=
- document.cookie =3D "hidetoc=3D1";=0A=
- tocmain.className =3D 'toc tochidden';=0A=
- }=0A=
- }=0A=
- =0A=
- var mwEditButtons =3D [];=0A=
- var mwCustomEditButtons =3D []; // eg to add in MediaWiki:Common.js=0A=
- =0A=
- function escapeQuotes( text ) {=0A=
- var re =3D new RegExp( "'", "g" );=0A=
- text =3D text.replace( re, "\\'" );=0A=
- re =3D new RegExp( "\\n", "g" );=0A=
- text =3D text.replace( re, "\\n" );=0A=
- return escapeQuotesHTML( text );=0A=
- }=0A=
- =0A=
- function escapeQuotesHTML( text ) {=0A=
- var re =3D new RegExp( '&', "g" );=0A=
- text =3D text.replace( re, "&" );=0A=
- re =3D new RegExp( '"', "g" );=0A=
- text =3D text.replace( re, """ );=0A=
- re =3D new RegExp( '<', "g" );=0A=
- text =3D text.replace( re, "<" );=0A=
- re =3D new RegExp( '>', "g" );=0A=
- text =3D text.replace( re, ">" );=0A=
- return text;=0A=
- }=0A=
- =0A=
- /**=0A=
- * Set the accesskey prefix based on browser detection.=0A=
- */=0A=
- var tooltipAccessKeyPrefix =3D 'alt-';=0A=
- if ( is_opera ) {=0A=
- tooltipAccessKeyPrefix =3D 'shift-esc-';=0A=
- } else if ( !is_safari_win && is_safari && webkit_version > 526 ) {=0A=
- tooltipAccessKeyPrefix =3D 'ctrl-alt-';=0A=
- } else if ( !is_safari_win && ( is_safari=0A=
- || clientPC.indexOf('mac') !=3D -1=0A=
- || clientPC.indexOf('konqueror') !=3D -1 ) ) {=0A=
- tooltipAccessKeyPrefix =3D 'ctrl-';=0A=
- } else if ( is_ff2 ) {=0A=
- tooltipAccessKeyPrefix =3D 'alt-shift-';=0A=
- }=0A=
- var tooltipAccessKeyRegexp =3D /\[(ctrl-)?(alt-)?(shift-)?(esc-)?(.)\]$/;=0A=
- =0A=
- /**=0A=
- * Add the appropriate prefix to the accesskey shown in the tooltip.=0A=
- * If the nodeList parameter is given, only those nodes are updated;=0A=
- * otherwise, all the nodes that will probably have accesskeys by=0A=
- * default are updated.=0A=
- *=0A=
- * @param Array nodeList -- list of elements to update=0A=
- */=0A=
- function updateTooltipAccessKeys( nodeList ) {=0A=
- if ( !nodeList ) {=0A=
- // Rather than scan all links on the whole page, we can just scan these=0A=
- // containers which contain the relevant links. This is really just an=0A=
- // optimization technique.=0A=
- var linkContainers =3D [=0A=
- 'column-one', // Monobook and Modern=0A=
- 'mw-head', 'mw-panel', 'p-logo' // Vector=0A=
- ];=0A=
- for ( var i in linkContainers ) {=0A=
- var linkContainer =3D document.getElementById( linkContainers[i] );=0A=
- if ( linkContainer ) {=0A=
- updateTooltipAccessKeys( linkContainer.getElementsByTagName( 'a' ) );=0A=
- }=0A=
- }=0A=
- // these are rare enough that no such optimization is needed=0A=
- updateTooltipAccessKeys( document.getElementsByTagName( 'input' ) );=0A=
- updateTooltipAccessKeys( document.getElementsByTagName( 'label' ) );=0A=
- return;=0A=
- }=0A=
- =0A=
- for ( var i =3D 0; i < nodeList.length; i++ ) {=0A=
- var element =3D nodeList[i];=0A=
- var tip =3D element.getAttribute( 'title' );=0A=
- if ( tip && tooltipAccessKeyRegexp.exec( tip ) ) {=0A=
- tip =3D tip.replace(tooltipAccessKeyRegexp,=0A=
- '[' + tooltipAccessKeyPrefix + "$5]");=0A=
- element.setAttribute( 'title', tip );=0A=
- }=0A=
- }=0A=
- }=0A=
- =0A=
- /**=0A=
- * Add a link to one of the portlet menus on the page, including:=0A=
- *=0A=
- * p-cactions: Content actions (shown as tabs above the main content in =
- Monobook)=0A=
- * p-personal: Personal tools (shown at the top right of the page in =
- Monobook)=0A=
- * p-navigation: Navigation=0A=
- * p-tb: Toolbox=0A=
- *=0A=
- * This function exists for the convenience of custom JS authors. All=0A=
- * but the first three parameters are optional, though providing at=0A=
- * least an id and a tooltip is recommended.=0A=
- *=0A=
- * By default the new link will be added to the end of the list. To=0A=
- * add the link before a given existing item, pass the DOM node of=0A=
- * that item (easily obtained with document.getElementById()) as the=0A=
- * nextnode parameter; to add the link _after_ an existing item, pass=0A=
- * the node's nextSibling instead.=0A=
- *=0A=
- * @param String portlet -- id of the target portlet ("p-cactions", =
- "p-personal", "p-navigation" or "p-tb")=0A=
- * @param String href -- link URL=0A=
- * @param String text -- link text (will be automatically lowercased by =
- CSS for p-cactions in Monobook)=0A=
- * @param String id -- id of the new item, should be unique and =
- preferably have the appropriate prefix ("ca-", "pt-", "n-" or "t-")=0A=
- * @param String tooltip -- text to show when hovering over the link, =
- without accesskey suffix=0A=
- * @param String accesskey -- accesskey to activate this link (one =
- character, try to avoid conflicts)=0A=
- * @param Node nextnode -- the DOM node before which the new item should =
- be added, should be another item in the same list=0A=
- *=0A=
- * @return Node -- the DOM node of the new item (an LI element) or null=0A=
- */=0A=
- function addPortletLink( portlet, href, text, id, tooltip, accesskey, =
- nextnode ) {=0A=
- var root =3D document.getElementById( portlet );=0A=
- if ( !root ) {=0A=
- return null;=0A=
- }=0A=
- var node =3D root.getElementsByTagName( 'ul' )[0];=0A=
- if ( !node ) {=0A=
- return null;=0A=
- }=0A=
- =0A=
- // unhide portlet if it was hidden before=0A=
- root.className =3D root.className.replace( /(^| )emptyPortlet( |$)/, =
- "$2" );=0A=
- =0A=
- var span =3D document.createElement( 'span' );=0A=
- span.appendChild( document.createTextNode( text ) );=0A=
- =0A=
- var link =3D document.createElement( 'a' );=0A=
- link.appendChild( span );=0A=
- link.href =3D href;=0A=
- =0A=
- var item =3D document.createElement( 'li' );=0A=
- item.appendChild( link );=0A=
- if ( id ) {=0A=
- item.id =3D id;=0A=
- }=0A=
- =0A=
- if ( accesskey ) {=0A=
- link.setAttribute( 'accesskey', accesskey );=0A=
- tooltip +=3D ' [' + accesskey + ']';=0A=
- }=0A=
- if ( tooltip ) {=0A=
- link.setAttribute( 'title', tooltip );=0A=
- }=0A=
- if ( accesskey && tooltip ) {=0A=
- updateTooltipAccessKeys( new Array( link ) );=0A=
- }=0A=
- =0A=
- if ( nextnode && nextnode.parentNode =3D=3D node ) {=0A=
- node.insertBefore( item, nextnode );=0A=
- } else {=0A=
- node.appendChild( item ); // IE compatibility (?)=0A=
- }=0A=
- =0A=
- return item;=0A=
- }=0A=
- =0A=
- function getInnerText( el ) {=0A=
- if ( typeof el =3D=3D 'string' ) {=0A=
- return el;=0A=
- }=0A=
- if ( typeof el =3D=3D 'undefined' ) {=0A=
- return el;=0A=
- }=0A=
- if ( el.textContent ) {=0A=
- return el.textContent; // not needed but it is faster=0A=
- }=0A=
- if ( el.innerText ) {=0A=
- return el.innerText; // IE doesn't have textContent=0A=
- }=0A=
- var str =3D '';=0A=
- =0A=
- var cs =3D el.childNodes;=0A=
- var l =3D cs.length;=0A=
- for ( var i =3D 0; i < l; i++ ) {=0A=
- switch ( cs[i].nodeType ) {=0A=
- case 1: // ELEMENT_NODE=0A=
- str +=3D ts_getInnerText( cs[i] );=0A=
- break;=0A=
- case 3: // TEXT_NODE=0A=
- str +=3D cs[i].nodeValue;=0A=
- break;=0A=
- }=0A=
- }=0A=
- return str;=0A=
- }=0A=
- =0A=
- /* Dummy for deprecated function */=0A=
- window.ta =3D [];=0A=
- function akeytt( doId ) {=0A=
- }=0A=
- =0A=
- var checkboxes;=0A=
- var lastCheckbox;=0A=
- =0A=
- function setupCheckboxShiftClick() {=0A=
- checkboxes =3D [];=0A=
- lastCheckbox =3D null;=0A=
- var inputs =3D document.getElementsByTagName( 'input' );=0A=
- addCheckboxClickHandlers( inputs );=0A=
- }=0A=
- =0A=
- function addCheckboxClickHandlers( inputs, start ) {=0A=
- if ( !start ) {=0A=
- start =3D 0;=0A=
- }=0A=
- =0A=
- var finish =3D start + 250;=0A=
- if ( finish > inputs.length ) {=0A=
- finish =3D inputs.length;=0A=
- }=0A=
- =0A=
- for ( var i =3D start; i < finish; i++ ) {=0A=
- var cb =3D inputs[i];=0A=
- if ( !cb.type || cb.type.toLowerCase() !=3D 'checkbox' ) {=0A=
- continue;=0A=
- }=0A=
- var end =3D checkboxes.length;=0A=
- checkboxes[end] =3D cb;=0A=
- cb.index =3D end;=0A=
- cb.onclick =3D checkboxClickHandler;=0A=
- }=0A=
- =0A=
- if ( finish < inputs.length ) {=0A=
- setTimeout( function() {=0A=
- addCheckboxClickHandlers( inputs, finish );=0A=
- }, 200 );=0A=
- }=0A=
- }=0A=
- =0A=
- function checkboxClickHandler( e ) {=0A=
- if ( typeof e =3D=3D 'undefined' ) {=0A=
- e =3D window.event;=0A=
- }=0A=
- if ( !e.shiftKey || lastCheckbox =3D=3D=3D null ) {=0A=
- lastCheckbox =3D this.index;=0A=
- return true;=0A=
- }=0A=
- var endState =3D this.checked;=0A=
- var start, finish;=0A=
- if ( this.index < lastCheckbox ) {=0A=
- start =3D this.index + 1;=0A=
- finish =3D lastCheckbox;=0A=
- } else {=0A=
- start =3D lastCheckbox;=0A=
- finish =3D this.index - 1;=0A=
- }=0A=
- for ( var i =3D start; i <=3D finish; ++i ) {=0A=
- checkboxes[i].checked =3D endState;=0A=
- if( i > start && typeof checkboxes[i].onchange =3D=3D 'function' ) {=0A=
- checkboxes[i].onchange(); // fire triggers=0A=
- }=0A=
- }=0A=
- lastCheckbox =3D this.index;=0A=
- return true;=0A=
- }=0A=
- =0A=
- =0A=
- /*=0A=
- Written by Jonathan Snook, http://www.snook.ca/jonathan=0A=
- Add-ons by Robert Nyman, http://www.robertnyman.com=0A=
- Author says "The credit comment is all it takes, no license. Go crazy =
- with it!:-)"=0A=
- From =
- http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname=
- /=0A=
- */=0A=
- function getElementsByClassName( oElm, strTagName, oClassNames ) {=0A=
- var arrReturnElements =3D new Array();=0A=
- if ( typeof( oElm.getElementsByClassName ) =3D=3D 'function' ) {=0A=
- /* Use a native implementation where possible FF3, Saf3.2, Opera 9.5 */=0A=
- var arrNativeReturn =3D oElm.getElementsByClassName( oClassNames );=0A=
- if ( strTagName =3D=3D '*' ) {=0A=
- return arrNativeReturn;=0A=
- }=0A=
- for ( var h =3D 0; h < arrNativeReturn.length; h++ ) {=0A=
- if( arrNativeReturn[h].tagName.toLowerCase() =3D=3D =
- strTagName.toLowerCase() ) {=0A=
- arrReturnElements[arrReturnElements.length] =3D arrNativeReturn[h];=0A=
- }=0A=
- }=0A=
- return arrReturnElements;=0A=
- }=0A=
- var arrElements =3D ( strTagName =3D=3D '*' && oElm.all ) ? oElm.all : =
- oElm.getElementsByTagName( strTagName );=0A=
- var arrRegExpClassNames =3D new Array();=0A=
- if( typeof oClassNames =3D=3D 'object' ) {=0A=
- for( var i =3D 0; i < oClassNames.length; i++ ) {=0A=
- arrRegExpClassNames[arrRegExpClassNames.length] =3D=0A=
- new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + =
- "(\\s|$)");=0A=
- }=0A=
- } else {=0A=
- arrRegExpClassNames[arrRegExpClassNames.length] =3D=0A=
- new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)");=0A=
- }=0A=
- var oElement;=0A=
- var bMatchesAll;=0A=
- for( var j =3D 0; j < arrElements.length; j++ ) {=0A=
- oElement =3D arrElements[j];=0A=
- bMatchesAll =3D true;=0A=
- for( var k =3D 0; k < arrRegExpClassNames.length; k++ ) {=0A=
- if( !arrRegExpClassNames[k].test( oElement.className ) ) {=0A=
- bMatchesAll =3D false;=0A=
- break;=0A=
- }=0A=
- }=0A=
- if( bMatchesAll ) {=0A=
- arrReturnElements[arrReturnElements.length] =3D oElement;=0A=
- }=0A=
- }=0A=
- return ( arrReturnElements );=0A=
- }=0A=
- =0A=
- function redirectToFragment( fragment ) {=0A=
- var match =3D navigator.userAgent.match(/AppleWebKit\/(\d+)/);=0A=
- if ( match ) {=0A=
- var webKitVersion =3D parseInt( match[1] );=0A=
- if ( webKitVersion < 420 ) {=0A=
- // Released Safari w/ WebKit 418.9.1 messes up horribly=0A=
- // Nightlies of 420+ are ok=0A=
- return;=0A=
- }=0A=
- }=0A=
- if ( is_gecko ) {=0A=
- // Mozilla needs to wait until after load, otherwise the window =
- doesn't scroll=0A=
- addOnloadHook(function() {=0A=
- if ( window.location.hash =3D=3D '' ) {=0A=
- window.location.hash =3D fragment;=0A=
- }=0A=
- });=0A=
- } else {=0A=
- if ( window.location.hash =3D=3D '' ) {=0A=
- window.location.hash =3D fragment;=0A=
- }=0A=
- }=0A=
- }=0A=
- =0A=
- /*=0A=
- * Table sorting script based on one (c) 1997-2006 Stuart Langridge and =
- Joost=0A=
- * de Valk:=0A=
- * http://www.joostdevalk.nl/code/sortable-table/=0A=
- * http://www.kryogenix.org/code/browser/sorttable/=0A=
- *=0A=
- * @todo don't break on colspans/rowspans (bug 8028)=0A=
- * @todo language-specific digit grouping/decimals (bug 8063)=0A=
- * @todo support all accepted date formats (bug 8226)=0A=
- */=0A=
- =0A=
- var ts_image_path =3D stylepath + '/common/images/';=0A=
- var ts_image_up =3D 'sort_up.gif';=0A=
- var ts_image_down =3D 'sort_down.gif';=0A=
- var ts_image_none =3D 'sort_none.gif';=0A=
- var ts_europeandate =3D wgContentLanguage !=3D 'en'; // The =
- non-American-inclined can change to "true"=0A=
- var ts_alternate_row_colors =3D false;=0A=
- var ts_number_transform_table =3D null;=0A=
- var ts_number_regex =3D null;=0A=
- =0A=
- function sortables_init() {=0A=
- var idnum =3D 0;=0A=
- // Find all tables with class sortable and make them sortable=0A=
- var tables =3D getElementsByClassName( document, 'table', 'sortable' );=0A=
- for ( var ti =3D 0; ti < tables.length ; ti++ ) {=0A=
- if ( !tables[ti].id ) {=0A=
- tables[ti].setAttribute( 'id', 'sortable_table_id_' + idnum );=0A=
- ++idnum;=0A=
- }=0A=
- ts_makeSortable( tables[ti] );=0A=
- }=0A=
- }=0A=
- =0A=
- function ts_makeSortable( table ) {=0A=
- var firstRow;=0A=
- if ( table.rows && table.rows.length > 0 ) {=0A=
- if ( table.tHead && table.tHead.rows.length > 0 ) {=0A=
- firstRow =3D table.tHead.rows[table.tHead.rows.length-1];=0A=
- } else {=0A=
- firstRow =3D table.rows[0];=0A=
- }=0A=
- }=0A=
- if ( !firstRow ) {=0A=
- return;=0A=
- }=0A=
- =0A=
- // We have a first row: assume it's the header, and make its contents =
- clickable links=0A=
- for ( var i =3D 0; i < firstRow.cells.length; i++ ) {=0A=
- var cell =3D firstRow.cells[i];=0A=
- if ( (' ' + cell.className + ' ').indexOf(' unsortable ') =3D=3D -1 ) {=0A=
- cell.innerHTML +=3D '<a href=3D"#" class=3D"sortheader" '=0A=
- + 'onclick=3D"ts_resortTable(this);return false;">'=0A=
- + '<span class=3D"sortarrow">'=0A=
- + '<img src=3D"'=0A=
- + ts_image_path=0A=
- + ts_image_none=0A=
- + '" alt=3D"↓"/></span></a>';=0A=
- }=0A=
- }=0A=
- if ( ts_alternate_row_colors ) {=0A=
- ts_alternate( table );=0A=
- }=0A=
- }=0A=
- =0A=
- function ts_getInnerText( el ) {=0A=
- return getInnerText( el );=0A=
- }=0A=
- =0A=
- function ts_resortTable( lnk ) {=0A=
- // get the span=0A=
- var span =3D lnk.getElementsByTagName('span')[0];=0A=
- =0A=
- var td =3D lnk.parentNode;=0A=
- var tr =3D td.parentNode;=0A=
- var column =3D td.cellIndex;=0A=
- =0A=
- var table =3D tr.parentNode;=0A=
- while ( table && !( table.tagName && table.tagName.toLowerCase() =3D=3D =
- 'table' ) ) {=0A=
- table =3D table.parentNode;=0A=
- }=0A=
- if ( !table ) {=0A=
- return;=0A=
- }=0A=
- =0A=
- if ( table.rows.length <=3D 1 ) {=0A=
- return;=0A=
- }=0A=
- =0A=
- // Generate the number transform table if it's not done already=0A=
- if ( ts_number_transform_table =3D=3D=3D null ) {=0A=
- ts_initTransformTable();=0A=
- }=0A=
- =0A=
- // Work out a type for the column=0A=
- // Skip the first row if that's where the headings are=0A=
- var rowStart =3D ( table.tHead && table.tHead.rows.length > 0 ? 0 : 1 );=0A=
- =0A=
- var itm =3D '';=0A=
- for ( var i =3D rowStart; i < table.rows.length; i++ ) {=0A=
- if ( table.rows[i].cells.length > column ) {=0A=
- itm =3D ts_getInnerText(table.rows[i].cells[column]);=0A=
- itm =3D itm.replace(/^[\s\xa0]+/, '').replace(/[\s\xa0]+$/, '');=0A=
- if ( itm !=3D '' ) {=0A=
- break;=0A=
- }=0A=
- }=0A=
- }=0A=
- =0A=
- // TODO: bug 8226, localised date formats=0A=
- var sortfn =3D ts_sort_generic;=0A=
- var preprocessor =3D ts_toLowerCase;=0A=
- if ( /^\d\d[\/. -][a-zA-Z]{3}[\/. -]\d\d\d\d$/.test( itm ) ) {=0A=
- preprocessor =3D ts_dateToSortKey;=0A=
- } else if ( /^\d\d[\/.-]\d\d[\/.-]\d\d\d\d$/.test( itm ) ) {=0A=
- preprocessor =3D ts_dateToSortKey;=0A=
- } else if ( /^\d\d[\/.-]\d\d[\/.-]\d\d$/.test( itm ) ) {=0A=
- preprocessor =3D ts_dateToSortKey;=0A=
- // (minus sign)([pound dollar euro yen currency]|cents)=0A=
- } else if ( /(^([-\u2212] =
- *)?[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/.test( itm ) ) {=0A=
- preprocessor =3D ts_currencyToSortKey;=0A=
- } else if ( ts_number_regex.test( itm ) ) {=0A=
- preprocessor =3D ts_parseFloat;=0A=
- }=0A=
- =0A=
- var reverse =3D ( span.getAttribute( 'sortdir' ) =3D=3D 'down' );=0A=
- =0A=
- var newRows =3D new Array();=0A=
- var staticRows =3D new Array();=0A=
- for ( var j =3D rowStart; j < table.rows.length; j++ ) {=0A=
- var row =3D table.rows[j];=0A=
- if( (' ' + row.className + ' ').indexOf(' unsortable ') < 0 ) {=0A=
- var keyText =3D ts_getInnerText( row.cells[column] );=0A=
- if( keyText =3D=3D=3D undefined ) {=0A=
- keyText =3D ''; =0A=
- }=0A=
- var oldIndex =3D ( reverse ? -j : j );=0A=
- var preprocessed =3D preprocessor( keyText.replace(/^[\s\xa0]+/, =
- '').replace(/[\s\xa0]+$/, '') );=0A=
- =0A=
- newRows[newRows.length] =3D new Array( row, preprocessed, oldIndex );=0A=
- } else {=0A=
- staticRows[staticRows.length] =3D new Array( row, false, j-rowStart );=0A=
- }=0A=
- }=0A=
- =0A=
- newRows.sort( sortfn );=0A=
- =0A=
- var arrowHTML;=0A=
- if ( reverse ) {=0A=
- arrowHTML =3D '<img src=3D"' + ts_image_path + ts_image_down + '" =
- alt=3D"↓"/>';=0A=
- newRows.reverse();=0A=
- span.setAttribute( 'sortdir', 'up' );=0A=
- } else {=0A=
- arrowHTML =3D '<img src=3D"' + ts_image_path + ts_image_up + '" =
- alt=3D"↑"/>';=0A=
- span.setAttribute( 'sortdir', 'down' );=0A=
- }=0A=
- =0A=
- for ( var i =3D 0; i < staticRows.length; i++ ) {=0A=
- var row =3D staticRows[i];=0A=
- newRows.splice( row[2], 0, row );=0A=
- }=0A=
- =0A=
- // We appendChild rows that already exist to the tbody, so it moves =
- them rather than creating new ones=0A=
- // don't do sortbottom rows=0A=
- for ( var i =3D 0; i < newRows.length; i++ ) {=0A=
- if ( ( ' ' + newRows[i][0].className + ' ').indexOf(' sortbottom ') =
- =3D=3D -1 ) {=0A=
- table.tBodies[0].appendChild( newRows[i][0] );=0A=
- }=0A=
- }=0A=
- // do sortbottom rows only=0A=
- for ( var i =3D 0; i < newRows.length; i++ ) {=0A=
- if ( ( ' ' + newRows[i][0].className + ' ').indexOf(' sortbottom ') =
- !=3D -1 ) {=0A=
- table.tBodies[0].appendChild( newRows[i][0] );=0A=
- }=0A=
- }=0A=
- =0A=
- // Delete any other arrows there may be showing=0A=
- var spans =3D getElementsByClassName( tr, 'span', 'sortarrow' );=0A=
- for ( var i =3D 0; i < spans.length; i++ ) {=0A=
- spans[i].innerHTML =3D '<img src=3D"' + ts_image_path + ts_image_none =
- + '" alt=3D"↓"/>';=0A=
- }=0A=
- span.innerHTML =3D arrowHTML;=0A=
- =0A=
- if ( ts_alternate_row_colors ) {=0A=
- ts_alternate( table );=0A=
- }=0A=
- }=0A=
- =0A=
- function ts_initTransformTable() {=0A=
- if ( typeof wgSeparatorTransformTable =3D=3D 'undefined'=0A=
- || ( wgSeparatorTransformTable[0] =3D=3D '' && =
- wgDigitTransformTable[2] =3D=3D '' ) )=0A=
- {=0A=
- digitClass =3D "[0-9,.]";=0A=
- ts_number_transform_table =3D false;=0A=
- } else {=0A=
- ts_number_transform_table =3D {};=0A=
- // Unpack the transform table=0A=
- // Separators=0A=
- ascii =3D wgSeparatorTransformTable[0].split("\t");=0A=
- localised =3D wgSeparatorTransformTable[1].split("\t");=0A=
- for ( var i =3D 0; i < ascii.length; i++ ) {=0A=
- ts_number_transform_table[localised[i]] =3D ascii[i];=0A=
- }=0A=
- // Digits=0A=
- ascii =3D wgDigitTransformTable[0].split("\t");=0A=
- localised =3D wgDigitTransformTable[1].split("\t");=0A=
- for ( var i =3D 0; i < ascii.length; i++ ) {=0A=
- ts_number_transform_table[localised[i]] =3D ascii[i];=0A=
- }=0A=
- =0A=
- // Construct regex for number identification=0A=
- digits =3D ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ',', =
- '\\.'];=0A=
- maxDigitLength =3D 1;=0A=
- for ( var digit in ts_number_transform_table ) {=0A=
- // Escape regex metacharacters=0A=
- digits.push(=0A=
- digit.replace( /[\\\\$\*\+\?\.\(\)\|\{\}\[\]\-]/,=0A=
- function( s ) { return '\\' + s; } )=0A=
- );=0A=
- if ( digit.length > maxDigitLength ) {=0A=
- maxDigitLength =3D digit.length;=0A=
- }=0A=
- }=0A=
- if ( maxDigitLength > 1 ) {=0A=
- digitClass =3D '[' + digits.join( '', digits ) + ']';=0A=
- } else {=0A=
- digitClass =3D '(' + digits.join( '|', digits ) + ')';=0A=
- }=0A=
- }=0A=
- =0A=
- // We allow a trailing percent sign, which we just strip. This works =
- fine=0A=
- // if percents and regular numbers aren't being mixed.=0A=
- ts_number_regex =3D new RegExp(=0A=
- "^(" +=0A=
- "[-+\u2212]?[0-9][0-9,]*(\\.[0-9,]*)?(E[-+\u2212]?[0-9][0-9,]*)?" + =
- // Fortran-style scientific=0A=
- "|" +=0A=
- "[-+\u2212]?" + digitClass + "+%?" + // Generic localised=0A=
- ")$", "i"=0A=
- );=0A=
- }=0A=
- =0A=
- function ts_toLowerCase( s ) {=0A=
- return s.toLowerCase();=0A=
- }=0A=
- =0A=
- function ts_dateToSortKey( date ) {=0A=
- // y2k notes: two digit years less than 50 are treated as 20XX, greater =
- than 50 are treated as 19XX=0A=
- if ( date.length =3D=3D 11 ) {=0A=
- switch ( date.substr( 3, 3 ).toLowerCase() ) {=0A=
- case 'jan':=0A=
- var month =3D '01';=0A=
- break;=0A=
- case 'feb':=0A=
- var month =3D '02';=0A=
- break;=0A=
- case 'mar':=0A=
- var month =3D '03';=0A=
- break;=0A=
- case 'apr':=0A=
- var month =3D '04';=0A=
- break;=0A=
- case 'may':=0A=
- var month =3D '05';=0A=
- break;=0A=
- case 'jun':=0A=
- var month =3D '06';=0A=
- break;=0A=
- case 'jul':=0A=
- var month =3D '07';=0A=
- break;=0A=
- case 'aug':=0A=
- var month =3D '08';=0A=
- break;=0A=
- case 'sep':=0A=
- var month =3D '09';=0A=
- break;=0A=
- case 'oct':=0A=
- var month =3D '10';=0A=
- break;=0A=
- case 'nov':=0A=
- var month =3D '11';=0A=
- break;=0A=
- case 'dec':=0A=
- var month =3D '12';=0A=
- break;=0A=
- // default: var month =3D '00';=0A=
- }=0A=
- return date.substr( 7, 4 ) + month + date.substr( 0, 2 );=0A=
- } else if ( date.length =3D=3D 10 ) {=0A=
- if ( ts_europeandate =3D=3D false ) {=0A=
- return date.substr( 6, 4 ) + date.substr( 0, 2 ) + date.substr( 3, 2 =
- );=0A=
- } else {=0A=
- return date.substr( 6, 4 ) + date.substr( 3, 2 ) + date.substr( 0, 2 =
- );=0A=
- }=0A=
- } else if ( date.length =3D=3D 8 ) {=0A=
- yr =3D date.substr( 6, 2 );=0A=
- if ( parseInt( yr ) < 50 ) {=0A=
- yr =3D '20' + yr;=0A=
- } else {=0A=
- yr =3D '19' + yr;=0A=
- }=0A=
- if ( ts_europeandate =3D=3D true ) {=0A=
- return yr + date.substr( 3, 2 ) + date.substr( 0, 2 );=0A=
- } else {=0A=
- return yr + date.substr( 0, 2 ) + date.substr( 3, 2 );=0A=
- }=0A=
- }=0A=
- return '00000000';=0A=
- }=0A=
- =0A=
- function ts_parseFloat( s ) {=0A=
- if ( !s ) {=0A=
- return 0;=0A=
- }=0A=
- if ( ts_number_transform_table !=3D false ) {=0A=
- var newNum =3D '', c;=0A=
- =0A=
- for ( var p =3D 0; p < s.length; p++ ) {=0A=
- c =3D s.charAt( p );=0A=
- if ( c in ts_number_transform_table ) {=0A=
- newNum +=3D ts_number_transform_table[c];=0A=
- } else {=0A=
- newNum +=3D c;=0A=
- }=0A=
- }=0A=
- s =3D newNum;=0A=
- }=0A=
- num =3D parseFloat( s.replace(/[, ]/g, '').replace("\u2212", '-') );=0A=
- return ( isNaN( num ) ? -Infinity : num );=0A=
- }=0A=
- =0A=
- function ts_currencyToSortKey( s ) {=0A=
- return ts_parseFloat(s.replace(/[^-\u22120-9.,]/g,''));=0A=
- }=0A=
- =0A=
- function ts_sort_generic( a, b ) {=0A=
- return a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : a[2] - b[2];=0A=
- }=0A=
- =0A=
- function ts_alternate( table ) {=0A=
- // Take object table and get all it's tbodies.=0A=
- var tableBodies =3D table.getElementsByTagName( 'tbody' );=0A=
- // Loop through these tbodies=0A=
- for ( var i =3D 0; i < tableBodies.length; i++ ) {=0A=
- // Take the tbody, and get all it's rows=0A=
- var tableRows =3D tableBodies[i].getElementsByTagName( 'tr' );=0A=
- // Loop through these rows=0A=
- // Start at 1 because we want to leave the heading row untouched=0A=
- for ( var j =3D 0; j < tableRows.length; j++ ) {=0A=
- // Check if j is even, and apply classes for both possible results=0A=
- var oldClasses =3D tableRows[j].className.split(' ');=0A=
- var newClassName =3D '';=0A=
- for ( var k =3D 0; k < oldClasses.length; k++ ) {=0A=
- if ( oldClasses[k] !=3D '' && oldClasses[k] !=3D 'even' && =
- oldClasses[k] !=3D 'odd' ) {=0A=
- newClassName +=3D oldClasses[k] + ' ';=0A=
- }=0A=
- }=0A=
- tableRows[j].className =3D newClassName + ( j % 2 =3D=3D 0 ? 'even' : =
- 'odd' );=0A=
- }=0A=
- }=0A=
- }=0A=
- =0A=
- /*=0A=
- * End of table sorting code=0A=
- */=0A=
- =0A=
- =0A=
- /**=0A=
- * Add a cute little box at the top of the screen to inform the user of=0A=
- * something, replacing any preexisting message.=0A=
- *=0A=
- * @param String -or- Dom Object message HTML to be put inside the right =
- div=0A=
- * @param String className Used in adding a class; should be different =
- for each=0A=
- * call to allow CSS/JS to hide different boxes. null =3D no class =
- used.=0A=
- * @return Boolean True on success, false on failure=0A=
- */=0A=
- function jsMsg( message, className ) {=0A=
- if ( !document.getElementById ) {=0A=
- return false;=0A=
- }=0A=
- // We special-case skin structures provided by the software. Skins that=0A=
- // choose to abandon or significantly modify our formatting can just =
- define=0A=
- // an mw-js-message div to start with.=0A=
- var messageDiv =3D document.getElementById( 'mw-js-message' );=0A=
- if ( !messageDiv ) {=0A=
- messageDiv =3D document.createElement( 'div' );=0A=
- if ( document.getElementById( 'column-content' )=0A=
- && document.getElementById( 'content' ) ) {=0A=
- // MonoBook, presumably=0A=
- document.getElementById( 'content' ).insertBefore(=0A=
- messageDiv,=0A=
- document.getElementById( 'content' ).firstChild=0A=
- );=0A=
- } else if ( document.getElementById( 'content' )=0A=
- && document.getElementById( 'article' ) ) {=0A=
- // Non-Monobook but still recognizable (old-style)=0A=
- document.getElementById( 'article').insertBefore(=0A=
- messageDiv,=0A=
- document.getElementById( 'article' ).firstChild=0A=
- );=0A=
- } else {=0A=
- return false;=0A=
- }=0A=
- }=0A=
- =0A=
- messageDiv.setAttribute( 'id', 'mw-js-message' );=0A=
- messageDiv.style.display =3D 'block';=0A=
- if( className ) {=0A=
- messageDiv.setAttribute( 'class', 'mw-js-message-' + className );=0A=
- }=0A=
- =0A=
- if ( typeof message =3D=3D=3D 'object' ) {=0A=
- while ( messageDiv.hasChildNodes() ) { // Remove old content=0A=
- messageDiv.removeChild( messageDiv.firstChild );=0A=
- }=0A=
- messageDiv.appendChild( message ); // Append new content=0A=
- } else {=0A=
- messageDiv.innerHTML =3D message;=0A=
- }=0A=
- return true;=0A=
- }=0A=
- =0A=
- /**=0A=
- * Inject a cute little progress spinner after the specified element=0A=
- *=0A=
- * @param element Element to inject after=0A=
- * @param id Identifier string (for use with removeSpinner(), below)=0A=
- */=0A=
- function injectSpinner( element, id ) {=0A=
- var spinner =3D document.createElement( 'img' );=0A=
- spinner.id =3D 'mw-spinner-' + id;=0A=
- spinner.src =3D stylepath + '/common/images/spinner.gif';=0A=
- spinner.alt =3D spinner.title =3D '...';=0A=
- if( element.nextSibling ) {=0A=
- element.parentNode.insertBefore( spinner, element.nextSibling );=0A=
- } else {=0A=
- element.parentNode.appendChild( spinner );=0A=
- }=0A=
- }=0A=
- =0A=
- /**=0A=
- * Remove a progress spinner added with injectSpinner()=0A=
- *=0A=
- * @param id Identifier string=0A=
- */=0A=
- function removeSpinner( id ) {=0A=
- var spinner =3D document.getElementById( 'mw-spinner-' + id );=0A=
- if( spinner ) {=0A=
- spinner.parentNode.removeChild( spinner );=0A=
- }=0A=
- }=0A=
- =0A=
- function runOnloadHook() {=0A=
- // don't run anything below this for non-dom browsers=0A=
- if ( doneOnloadHook || !( document.getElementById && =
- document.getElementsByTagName ) ) {=0A=
- return;=0A=
- }=0A=
- =0A=
- // set this before running any hooks, since any errors below=0A=
- // might cause the function to terminate prematurely=0A=
- doneOnloadHook =3D true;=0A=
- =0A=
- updateTooltipAccessKeys( null );=0A=
- setupCheckboxShiftClick();=0A=
- sortables_init();=0A=
- =0A=
- // Run any added-on functions=0A=
- for ( var i =3D 0; i < onloadFuncts.length; i++ ) {=0A=
- onloadFuncts[i]();=0A=
- }=0A=
- }=0A=
- =0A=
- /**=0A=
- * Add an event handler to an element=0A=
- *=0A=
- * @param Element element Element to add handler to=0A=
- * @param String attach Event to attach to=0A=
- * @param callable handler Event handler callback=0A=
- */=0A=
- function addHandler( element, attach, handler ) {=0A=
- if( window.addEventListener ) {=0A=
- element.addEventListener( attach, handler, false );=0A=
- } else if( window.attachEvent ) {=0A=
- element.attachEvent( 'on' + attach, handler );=0A=
- }=0A=
- }=0A=
- =0A=
- /**=0A=
- * Add a click event handler to an element=0A=
- *=0A=
- * @param Element element Element to add handler to=0A=
- * @param callable handler Event handler callback=0A=
- */=0A=
- function addClickHandler( element, handler ) {=0A=
- addHandler( element, 'click', handler );=0A=
- }=0A=
- =0A=
- /**=0A=
- * Removes an event handler from an element=0A=
- *=0A=
- * @param Element element Element to remove handler from=0A=
- * @param String remove Event to remove=0A=
- * @param callable handler Event handler callback to remove=0A=
- */=0A=
- function removeHandler( element, remove, handler ) {=0A=
- if( window.removeEventListener ) {=0A=
- element.removeEventListener( remove, handler, false );=0A=
- } else if( window.detachEvent ) {=0A=
- element.detachEvent( 'on' + remove, handler );=0A=
- }=0A=
- }=0A=
- // note: all skins should call runOnloadHook() at the end of html output,=0A=
- // so the below should be redundant. It's there just in case.=0A=
- hookEvent( 'load', runOnloadHook );=0A=
- =0A=
- if ( ie6_bugs ) {=0A=
- importScriptURI( stylepath + '/common/IEFixes.js' );=0A=
- }=0A=
- =0A=
- // For future use.=0A=
- mw =3D {};=0A=
- =0A=
- =0A=
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: application/octet-stream
- Content-Transfer-Encoding: quoted-printable
- Content-Location: http://wiki.theory.org/skins/common/ajax.js?270
-
- // remote scripting library=0A=
- // (c) copyright 2005 modernmethod, inc=0A=
- var sajax_debug_mode =3D false;=0A=
- var sajax_request_type =3D "GET";=0A=
- =0A=
- /**=0A=
- * if sajax_debug_mode is true, this function outputs given the message =
- into =0A=
- * the element with id =3D sajax_debug; if no such element exists in the =
- document, =0A=
- * it is injected.=0A=
- */=0A=
- function sajax_debug(text) {=0A=
- if (!sajax_debug_mode) return false;=0A=
- =0A=
- var e=3D document.getElementById('sajax_debug');=0A=
- =0A=
- if (!e) {=0A=
- e=3D document.createElement("p");=0A=
- e.className=3D 'sajax_debug';=0A=
- e.id=3D 'sajax_debug';=0A=
- =0A=
- var b=3D document.getElementsByTagName("body")[0];=0A=
- =0A=
- if (b.firstChild) b.insertBefore(e, b.firstChild);=0A=
- else b.appendChild(e);=0A=
- }=0A=
- =0A=
- var m=3D document.createElement("div");=0A=
- m.appendChild( document.createTextNode( text ) );=0A=
- =0A=
- e.appendChild( m );=0A=
- =0A=
- return true;=0A=
- }=0A=
- =0A=
- /**=0A=
- * compatibility wrapper for creating a new XMLHttpRequest object.=0A=
- */=0A=
- function sajax_init_object() {=0A=
- sajax_debug("sajax_init_object() called..")=0A=
- var A;=0A=
- try {=0A=
- // Try the new style before ActiveX so we don't=0A=
- // unnecessarily trigger warnings in IE 7 when=0A=
- // set to prompt about ActiveX usage=0A=
- A =3D new XMLHttpRequest();=0A=
- } catch (e) {=0A=
- try {=0A=
- A=3Dnew ActiveXObject("Msxml2.XMLHTTP");=0A=
- } catch (e) {=0A=
- try {=0A=
- A=3Dnew ActiveXObject("Microsoft.XMLHTTP");=0A=
- } catch (oc) {=0A=
- A=3Dnull;=0A=
- }=0A=
- }=0A=
- }=0A=
- if (!A)=0A=
- sajax_debug("Could not create connection object.");=0A=
- =0A=
- return A;=0A=
- }=0A=
- =0A=
- /**=0A=
- * Perform an ajax call to mediawiki. Calls are handeled by =
- AjaxDispatcher.php=0A=
- * func_name - the name of the function to call. Must be registered in =
- $wgAjaxExportList=0A=
- * args - an array of arguments to that function=0A=
- * target - the target that will handle the result of the call. If this =
- is a function,=0A=
- * if will be called with the XMLHttpRequest as a parameter; =
- if it's an input=0A=
- * element, its value will be set to the resultText; if it's =
- another type of=0A=
- * element, its innerHTML will be set to the resultText.=0A=
- *=0A=
- * Example:=0A=
- * sajax_do_call('doFoo', [1, 2, 3], =
- document.getElementById("showFoo"));=0A=
- *=0A=
- * This will call the doFoo function via MediaWiki's AjaxDispatcher, with=0A=
- * (1, 2, 3) as the parameter list, and will show the result in the =
- element=0A=
- * with id =3D showFoo=0A=
- */=0A=
- function sajax_do_call(func_name, args, target) {=0A=
- var i, x, n;=0A=
- var uri;=0A=
- var post_data;=0A=
- uri =3D wgServer +=0A=
- ((wgScript =3D=3D null) ? (wgScriptPath + "/index.php") : wgScript) +=0A=
- "?action=3Dajax";=0A=
- if (sajax_request_type =3D=3D "GET") {=0A=
- if (uri.indexOf("?") =3D=3D -1)=0A=
- uri =3D uri + "?rs=3D" + encodeURIComponent(func_name);=0A=
- else=0A=
- uri =3D uri + "&rs=3D" + encodeURIComponent(func_name);=0A=
- for (i =3D 0; i < args.length; i++)=0A=
- uri =3D uri + "&rsargs[]=3D" + encodeURIComponent(args[i]);=0A=
- //uri =3D uri + "&rsrnd=3D" + new Date().getTime();=0A=
- post_data =3D null;=0A=
- } else {=0A=
- post_data =3D "rs=3D" + encodeURIComponent(func_name);=0A=
- for (i =3D 0; i < args.length; i++)=0A=
- post_data =3D post_data + "&rsargs[]=3D" + =
- encodeURIComponent(args[i]);=0A=
- }=0A=
- x =3D sajax_init_object();=0A=
- if (!x) {=0A=
- alert("AJAX not supported");=0A=
- return false;=0A=
- }=0A=
- =0A=
- try {=0A=
- x.open(sajax_request_type, uri, true);=0A=
- } catch (e) {=0A=
- if (window.location.hostname =3D=3D "localhost") {=0A=
- alert("Your browser blocks XMLHttpRequest to 'localhost', try using a =
- real hostname for development/testing.");=0A=
- }=0A=
- throw e;=0A=
- }=0A=
- if (sajax_request_type =3D=3D "POST") {=0A=
- x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");=0A=
- x.setRequestHeader("Content-Type", =
- "application/x-www-form-urlencoded");=0A=
- }=0A=
- x.setRequestHeader("Pragma", "cache=3Dyes");=0A=
- x.setRequestHeader("Cache-Control", "no-transform");=0A=
- x.onreadystatechange =3D function() {=0A=
- if (x.readyState !=3D 4)=0A=
- return;=0A=
- =0A=
- sajax_debug("received (" + x.status + " " + x.statusText + ") " + =
- x.responseText);=0A=
- =0A=
- //if (x.status !=3D 200)=0A=
- // alert("Error: " + x.status + " " + x.statusText + ": " + =
- x.responseText);=0A=
- //else=0A=
- =0A=
- if ( typeof( target ) =3D=3D 'function' ) {=0A=
- target( x );=0A=
- }=0A=
- else if ( typeof( target ) =3D=3D 'object' ) {=0A=
- if ( target.tagName =3D=3D 'INPUT' ) {=0A=
- if (x.status =3D=3D 200) target.value=3D x.responseText;=0A=
- //else alert("Error: " + x.status + " " + x.statusText + " (" + =
- x.responseText + ")");=0A=
- }=0A=
- else {=0A=
- if (x.status =3D=3D 200) target.innerHTML =3D x.responseText;=0A=
- else target.innerHTML=3D "<div class=3D'error'>Error: " + x.status + =
- " " + x.statusText + " (" + x.responseText + ")</div>";=0A=
- }=0A=
- }=0A=
- else {=0A=
- alert("bad target for sajax_do_call: not a function or object: " + =
- target);=0A=
- }=0A=
- =0A=
- return;=0A=
- }=0A=
- =0A=
- sajax_debug(func_name + " uri =3D " + uri + " / post =3D " + post_data);=0A=
- x.send(post_data);=0A=
- sajax_debug(func_name + " waiting..");=0A=
- delete x;=0A=
- =0A=
- return true;=0A=
- }=0A=
- =0A=
- /**=0A=
- * @return boolean whether the browser supports XMLHttpRequest=0A=
- */=0A=
- function wfSupportsAjax() {=0A=
- var request =3D sajax_init_object();=0A=
- var supportsAjax =3D request ? true : false;=0A=
- delete request;=0A=
- return supportsAjax;=0A=
- }=0A=
- =0A=
-
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220
- Content-Type: application/octet-stream
- Content-Transfer-Encoding: quoted-printable
- Content-Location: http://wiki.theory.org/index.php?title=-&action=raw&gen=js&useskin=monobook&270
-
- /* generated javascript */=0A=
- var skin =3D 'monobook';=0A=
- var stylepath =3D '/skins';=0A=
- =0A=
- /* MediaWiki:Common.js */=0A=
- /* Any JavaScript here will be loaded for all users on every page load. =
- */=0A=
- =0A=
- /* MediaWiki:Monobook.js */=0A=
- /* Any JavaScript here will be loaded for users using the MonoBook skin =
- */
- ------=_NextPart_000_0000_01CC6DEF.5A1D4220--