问题描述
急求一篇计算机软件测试或开发方面的英语科技文章,请大家帮帮忙。谢谢!
解决方案
解决方案二:
上微软官方网站上去看看
解决方案三:
写论文啊,去IBM的开发者网站,里面的文章是中英文对照的
解决方案四:
找一篇MSDN,中英文各对照就出来了
解决方案五:
能给个具体的地址吗?谢谢
解决方案六:
贴个我毕业的论文里的讲tftp协议的不知道楼主满不满意NetworkWorkingGroupK.R.SollinsRequestforComments:783MITJune,1981Updates:IEN133THETFTPPROTOCOL(REVISION2)SummaryTFTPisaverysimpleprotocolusedtotransferfiles.Itisfromthisthatitsnamecomes,TrivialFileTransferProtocolorTFTP.Eachnonterminalpacketisacknowledgedseparately.Thisdocumentdescribestheprotocolanditstypesofpackets.Thedocumentalsoexplainsthereasonsbehindsomeofthedesigndecisions.ACKNOWLEDGEMENTSTheprotocolwasoriginallydesignedbyNoelChiappa,andwasredesignedbyhim,BobBaldwinandDaveClark,withcommentsfromSteveSzymanski.ThecurrentrevisionofthedocumentincludesmodificationsstemmingfromdiscussionswithandsuggestionsfromLarryAllen,NoelChiappa,DaveClark,GeoffCooper,MikeGreenwald,LizaMartin,DavidReed,CraigMiloRogers(ofUCS-ISI),KathyYellick,andtheauthor.TheacknowledgementandretransmissionschemewasinspiredbyTCP,andtheerrormechanismwassuggestedbyPARC'sEFTPabortmessage.ThisresearchwassupportedbytheAdvancedResearchProjectsAgencyoftheDepartmentofDefenseandwasmonitoredbytheOfficeofNavalResearchundercontractnumberN00014-75-C-0661.1.PurposeTFTPisasimpleprotocoltotransferfiles,andthereforewasnamedtheTrivialFileTransferProtocolorTFTP.IthasbeenimplementedontopoftheInternetUserDatagramprotocol(UDPorDatagram)[2]soitmaybeusedtomovefilesbetweenmachinesondifferentnetworksimplementingUDP.(ThisshouldnotexcludethepossibilityofimplementingTFTPontopofotherdatagramprotocols.)Itisdesignedtobesmallandeasytoimplement.Therefore,itlacksmostofthefeaturesofaregularFTP.Theonlythingitcandoisreadandwritefiles(ormail)from/toaremoteserver.Itcannotlistdirectories,andcurrentlyhasnoprovisionsforuserauthentication.IncommonwithotherInternetprotocols,itpasses8bitbytesofdata.Threemodesoftransferarecurrentlysupported:netascii;octet,raw8bitbytes;mail,netasciicharacterssenttoauserratherthanafile.Additionalmodescanbedefinedbypairsofcooperatinghosts.Thisisasciiasdefinedin"USAStandardCodeforInformationInterchange"withthemodificationsspecifiedin"TelnetProtocolSpecification"Notethatitis8bitascii.Theterm"netascii"willbeusedthroughoutthisdocumenttomeanthisparticularversionofascii.Thisreplacesthe"binary"modeofpreviousversionsofthis2.OverviewoftheProtocolAnytransferbeginswitharequesttoreadorwriteafile,whichalsoservestorequestaconnection.Iftheservergrantstherequest,theconnectionisopenedandthefileissentinfixedlengthblocksof512bytes.Eachdatapacketcontainsoneblockofdata,andmustbeacknowledgedbyanacknowledgmentpacketbeforethenextpacketcanbesent.Adatapacketoflessthan512bytessignalsterminationofatransfer.Ifapacketgetslostinthenetwork,theintendedrecipientwilltimeoutandmayretransmithislastpacket(whichmaybedataoranacknowledgment),thuscausingthesenderofthelostpackettoretransmitthatlostpacket.Thesenderhastokeepjustonepacketonhandforretransmission,sincethelockstepacknowledgmentguaranteesthatallolderpacketshavebeenreceived.Noticethatbothmachinesinvolvedinatransferareconsideredsendersandreceivers.Onesendsdataandreceivesacknowledgments,theothersendsacknowledgmentsandreceivesdata.Mosterrorscauseterminationoftheconnection.Anerrorissignalledbysendinganerrorpacket.Thispacketisnotacknowledged,andnotretransmitted(i.e.,aTFTPserverorusermayterminateaftersendinganerrormessage),sotheotherendoftheconnectionmaynotgetit.Thereforetimeoutsareusedtodetectsuchaterminationwhentheerrorpackethasbeenlost.Errorsarecausedbythreetypesofevents:notbeingabletosatisfytherequest(e.g.,filenotfound,accessviolation,ornosuchuser),receivingapacketwhichcannotbeexplainedbyadelayorduplicationinthenetwork(e.g.anincorrectlyformedpacket),andlosingaccesstoanecessaryresource(e.g.,diskfulloraccessdeniedduringatransfer).TFTPrecognizesonlyoneerrorconditionthatdoesnotcausetermination,thesourceportofareceivedpacketbeingincorrect.Inthiscase,anerrorpacketissenttotheoriginatinghost.Thisprotocolisveryrestrictive,inordertosimplifyimplementation.Forexample,thefixedlengthblocksmakeallocationstraightforward,andthelockstepacknowledgementprovidesflowcontrolandeliminatestheneedtoreorderincomingdatapackets.3.RelationtootherProtocolsAsmentionedTFTPisdesignedtobeimplementedontopoftheDatagramprotocol.SinceDatagramisimplementedontheInternetprotocol,packetswillhaveanInternetheader,aDatagramheader,andaTFTPheader.Additionally,thepacketsmayhaveaheader(LNI,ARPAheader,etc.)toallowthemthroughthelocaltransportmedium.AsshowninFigure3-1,theorderofthecontentsofapacketwillbe:localmediumheader,ifused,Internetheader,Datagramheader,TFTP
解决方案七:
header,followedbytheremainderoftheTFTPpacket.(ThismayormaynotbedatadependingonthetypeofpacketasspecifiedintheTFTPheader.)TFTPdoesnotspecifyanyofthevaluesintheInternetheader.Ontheotherhand,thesourceanddestinationportfieldsoftheDatagramheader(itsformatisgivenintheappendix)areusedbyTFTPandthelengthfieldreflectsthesizeoftheTFTPpacket.Thetransferidentifiers(TID's)usedbyTFTParepassedtotheDatagramlayertobeusedasports;thereforetheymustbebetween0and65,535.TheinitializationofTID'sisdiscussedinthesectiononinitialconnectionprotocol.TheTFTPheaderconsistsofa2byteopcodefieldwhichindicatesthepacket'stype(e.g.,DATA,ERROR,etc.)TheseopcodesandtheformatsofthevarioustypesofpacketsarediscussedfurtherinthesectiononTFTPpackets.Figure3-1:OrderofHeaders---------------------------------------------------|LocalMedium|Internet|Datagram|TFTP|---------------------------------------------------4.InitialConnectionProtocolAtransferisestablishedbysendingarequest(WRQtowriteontoaforeignfilesystem,orRRQtoreadfromit),andreceivingapositivereply,anacknowledgmentpacketforwrite,orthefirstdatapacketforread.Ingeneralanacknowledgmentpacketwillcontaintheblocknumberofthedatapacketbeingacknowledged.Eachdatapackethasassociatedwithitablocknumber;blocknumbersareconsecutiveandbeginwithone.Sincethepositiveresponsetoawriterequestisanacknowledgmentpacket,inthisspecialcasetheblocknumberwillbezero.(Normally,sinceanacknowledgmentpacketisacknowledgingadatapacket,theacknowledgmentpacketwillcontaintheblocknumberofthedatapacketbeingacknowledged.)Ifthereplyisanerrorpacket,thentherequesthasbeendenied.Inordertocreateaconnection,eachendoftheconnectionchoosesaTIDforitself,tobeusedforthedurationofthatconnection.TheTID'schosenforaconnectionshouldberandomlychosen,sothattheprobabilitythatthesamenumberischosentwiceinimmediatesuccessionisverylow.EverypackethasassociatedwithitthetwoTID'softheendsoftheconnection,thesourceTIDandthedestinationTID.TheseTID'sarehandedtothesupportingUDP(orotherdatagramprotocol)asthesourceanddestinationports.ArequestinghostchoosesitssourceTIDasdescribedabove,andsendsitsinitialrequesttotheknownTIDontheservinghost.Theresponsetotherequest,undernormaloperation,usesaTIDchosenbytheserverasitssourceTIDandtheTIDchosenforthepreviousmessagebytherequestorasitsdestinationTID.ThetwochosenTID'sarethenusedfortheremainderofthetransfer.Asanexample,thefollowingshowsthestepsusedtoestablishaconnectiontowriteafile.NotethatWRQ,ACK,andDATAarethenamesofthewriterequest,acknowledgment,anddatatypesofpacketsrespectively.Theappendixcontainsasimilarexampleforreadingafile.1.HostAsendsa"WRQ"tohostBwithsource=A'sTID,destination=69.2.HostBsendsa"ACK"(withblocknumber=0)tohostAwithsource=B'sTID,destination=A'sTID.AtthispointtheconnectionhasbeenestablishedandthefirstdatapacketcanbesentbyHostAwithasequencenumberof1.Inthenextstep,andinallsucceedingsteps,thehostsshouldmakesurethatthesourceTIDmatchesthevaluethatwasagreedoninsteps1and2.IfasourceTIDdoesnotmatch,thepacketshouldbediscardedaserroneouslysentfromsomewhereelse.Anerrorpacketshouldbesenttothesourceoftheincorrectpacket,whilenotdisturbingthetransfer.ThiscanbedoneonlyiftheTFTPinfactreceivesapacketwithanincorrectTID.Ifthesupportingprotocolsdonotallowit,thisparticularerrorconditionwillnotarise.Thefollowingexampledemonstratesacorrectoperationoftheprotocolinwhichtheabovesituationcanoccur.HostAsendsarequesttohostB.Somewhereinthenetwork,therequestpacketisduplicated,andasaresulttwoacknowledgmentsarereturnedtohostA,withdifferentTID'schosenonhostBinresponsetothetworequests.Whenthefirstresponsearrives,hostAcontinuestheconnection.Whenthesecondresponsetotherequestarrives,itshouldberejected,butthereisnoreasontoterminatethefirstconnection.Therefore,ifdifferentTID'sarechosenforthetwoconnectionsonhostBandhostAchecksthesourceTID'softhemessagesitreceives,thefirstconnectioncanbemaintainedwhilethesecondisrejectedbyreturninganerrorpacket.5.TFTPPacketsTFTPsupportsfivetypesofpackets,allofwhichhavebeenmentionedabove:opcodeoperation1Readrequest(RRQ)2Writerequest(WRQ)3Data(DATA)4Acknowledgment(ACK)5Error(ERROR)TheTFTPheaderofapacketcontainstheopcodeassociatedwiththatpacket.Figure5-1:RRQ/WRQpacket2bytesstring1bytestring1byte------------------------------------------------|Opcode|Filename|0|Mode|0|------------------------------------------------RRQandWRQpackets(opcodes1and2respectively)havetheformatshowninFigure5-1.Thefilenameisasequenceofbytesinnetasciiterminatedbyazerobyte.Themodefieldcontainsthestring"netascii","octet",or"mail"(oranycomibnationofupperandlowercase,suchas"NETASCII",NetAscii",etc.)innetasciiindicatingthethreemodesdefinedintheprotocol.Ahostwhichreceivesnetasciimodedatamusttranslatethedatatoitsownformat.Octetmodeisusedtotransferafilethatisinthe8-bitformatofthemachinefromwhichthefileisbeingtransferred.Itisassumedthateachtypeofmachinehasasingle8-bitformatthatismorecommon,andthatthatformatischosen.Forexample,onaDEC-20,a36bitmachine,thisisfour8-bitbytestoawordwithfourbitsofbreakage.Ifahostreceivesaoctetfileandthenreturnsit,thereturnedfilemustbeidenticaltotheoriginal.MailmodeusesthenameofamailrecipientinplaceofafileandmustbeginwithaWRQ.Otherwiseitisidenticaltonetasciimode.Themailrecipientstringshouldbeoftheform"username"or"username@hostname".Ifthesecondformisused,itallowstheoptionofmailforwardingbyarelaycomputer.
解决方案八:
Thediscussionaboveassumesthatboththesenderandrecipientareoperatinginthesamemode,butthereisnoreasonthatthishastobethecase.Forexample,onemightbuildastorageserver.Thereisnoreasonthatsuchamachineneedstotranslatenetasciiintoitsownformoftext.Rather,thesendermightsendfilesinnetascii,butthestorageservermightsimplystorethemwithouttranslationin8-bitformat.AnothersuchsituationisaproblemthatcurrentlyexistsonDEC-20systems.Neithernetasciinoroctetaccessesallthebitsinaword.Onemightcreateaspecialmodeforsuchamachinewhichreadallthebitsinaword,butinwhichthereceiverstoredtheinformationin8-bitformat.Whensuchafileisretrievedfromthestoragesite,itmustberestoredtoitsoriginalformtobeuseful,sothereversemodemustalsobeimplemented.Theusersitewillhavetoremembersomeinformationtoachievethis.Inbothoftheseexamples,therequestpacketswouldspecifyoctetmodetotheforeignhost,butthelocalhostwouldbeinsomeothermode.NosuchmachineorapplicationspecificmodeshavebeenspecifiedinTFTP,butonewouldbecompatiblewiththisspecification.Itisalsopossibletodefineothermodesforcooperatingpairsofhosts,althoughthismustbedonewithcare.Thereisnorequirementthatanyotherhostsimplementthese.Thereisnocentralauthoritythatwilldefinethesemodesorassignthemnames.Figure5-2:DATApacket2bytes2bytesnbytes----------------------------------|Opcode|Block#|Data|----------------------------------DataisactuallytransferredinDATApacketsdepictedinFigure5-2.DATApackets(opcode=3)haveablocknumberanddatafield.Theblocknumbersondatapacketsbeginwithoneandincreasebyoneforeachnewblockofdata.Thisrestrictionallowstheprogramtouseasinglenumbertodiscriminatebetweennewpacketsandduplicates.Thedatafieldisfromzeroto512byteslong.Ifitis512byteslong,theblockisnotthelastblockofdata;ifitisfromzeroto511byteslong,itsignalstheendofthetransfer.(SeethesectiononNormalTerminationfordetails.)Allpacketsotherthanthoseusedforterminationareacknowledgedindividuallyunlessatimeoutoccurs.SendingaDATApacketisanacknowledgmentfortheACKpacketofthepreviousDATApacket.TheWRQandDATApacketsareacknowledgedbyACKorERRORpackets,whileRRQandACKpacketsareacknowledgedbyDATAorERRORpacketsdepictsanACKpacket;theopcodeis4.Figure5-3:ACKpacket2bytes2bytes---------------------|Opcode|Block#|---------------------TheblocknumberinanACKechoestheblocknumberoftheDATApacketbeingacknowledged.AWRQisacknowledgedwithanACKpackethavingablocknumberofzero.Figure5-4:ERRORpacket2bytes2bytesstring1byte-----------------------------------------|Opcode|ErrorCode|ErrMsg|0|-----------------------------------------AnERRORpacket(opcode5)takestheformdepictedinFigure5-4.AnERRORpacketcanbetheacknowledgmentofanyothertypeofpacket.Theerrorcodeisanintegerindicatingthenatureoftheerror.Atableofvaluesandmeaningsisgivenintheappendix.(Notethatseveralerrorcodeshavebeenaddedtothisversionofthisdocument.)Theerrormessageisintendedforhumanconsumption,andshouldbeinnetascii.Likeallotherstrings,itisterminatedwithazerobyte.6.NormalTerminationTheendofatransferismarkedbyaDATApacketthatcontainsbetween0and511bytesofdata(i.e.Datagramlength<516).ThispacketisacknowledgedbyanACKpacketlikeallotherDATApackets.ThehostacknowledgingthefinalDATApacketmayterminateitssideoftheconnectiononsendingthefinalACK.Ontheotherhand,dallyingisencouraged.ThismeansthatthehostsendingthefinalACKwillwaitforawhilebeforeterminatinginordertoretransmitthefinalACKifithasbeenlost.TheacknowledgerwillknowthattheACKhasbeenlostifitreceivesthefinalDATApacketagain.ThehostsendingthelastDATAmustretransmitituntilthepacketisacknowledgedorthesendinghosttimesout.IftheresponseisanACK,thetransmissionwascompletedsuccessfully.Ifthesenderofthedatatimesoutandisnotpreparedtoretransmitanymore,thetransfermaystillhavebeencompletedsuccessfully,afterwhichtheacknowledgerornetworkmayhaveexperiencedaproblem.Itisalsopossibleinthiscasethatthetransferwasunsuccessful.Inanycase,theconnectionhasbeenclosed.7.PrematureTerminationIfarequestcannotbegranted,orsomeerroroccursduringthetransfer,thenanERRORpacket(opcode5)issent.Thisisonlyacourtesysinceitwillnotberetransmittedoracknowledged,soitmayneverbereceived.Timeoutsmustalsobeusedtodetecterrors.