ࡱ; q  !"#$%&')*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoprstRoot Entry !"#$%&'()*+,-./0123456789;<=>?@ABCDEFGHIJKLMNOPQRTUVW ®`VTextStarWriter 5.0H?!H SfxDocumentInfo  Tim Hurman .1 Tim Hurman /1d Tim Hurman /1\ Info 0 Info 1 Info 2 Info 3 .109<TASK,0,102,0,100,1,10665;15743;100;0;7890;16200;18465;0;0SW5HDR.0/1d!Numbering Symbols 312533101 313915101 300852131 302620131 304451131 305839131 305858131 305910131 310061131 310109131 310133131 310152131 310160131Outline0 #R-n#)QR-n#)QR-n#) XOutdevItemPool 1   )     &'()*+,-./06789:;UVWXYZ[\]c !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstt      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefd 0M '@kX' @'@X' @' @'E@ Arrow X'"@J:XX'@pX' @' @ @ @ @ @ @ @$ @:'@VX' @X( @( @( @( @( @( @ ( @ ( @6(  @L(! @b(" @x(# @$$ @%% @&& @'' @(( @)) @;(+ @(,, @>-- @T.. @j// @00 @11 @22 @33 @44 @55 @66 @(L @0MM @FNN @\OO @rPP @QQ@XVV@XWW @XX @YY @ ZZ @ [[ @6 \\ @L ]] @b ^^ @x __ @ `` @ aa @ bb @ cc @ dd @ ee @  h@v '''''''''XXX X>4@ ''XXX&**@ XX77@ XXHH4@N +'+'XXX ff@@ QQVVQQVVXXX&.Df|3I_uE[q !7Mcy)?Uk1Gg !7McyE P EditEngineItemPool  6f0 g* @ 6' @  @ !@'dddX<(@GX ( @a@' @wA' @1' @+'@X' @!' @' @' @?( @1' @G' @]' @s' @' @' @%' @S' @"' @' @ $:P}+AWm3INP+'!''times'd $6DrMdJoeMn0/1ٝ/1d/1 DrLyHellDrLyHeavenDrLyControlsDrPgJoeM.DrML DrObSVDr&$%@ %M%?N%DrObSVDr&')@ '= 'h)](DrObSVDr&J&"'@ ]&0& &DrXX Controlsgg DrXXMD R-n#) R-n#)R-n#)R-n#)QR-n#)QR- n#)R- n#)R- n#)R- n#)QR- n#)QZSWG, A<  #$%&'()*./0123456789:;<=>?@ABCDGHK  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFQRSTU0 '"@ helveticaX'&@d Bs XX' @X'@X'(!@8. q . XA'2*@PdxddxdXX7S;@vX8S<@X9S=@XR'D@X<n1UzP$' '(. . p. @ . . . . . P. . . !. $. `'. 0*. -. /. 2. p5. @8. ;. =. @. 6')2r ?Numbering SymbolsNumbering SymbolsGraphicGraphic@;7S<8S=9S>> StandardStandard@HeadingStandard Text body@''2A'DR'  Text bodyStandard Text body2A' Heading 1Heading Text body@''  Heading 2Heading Text body@' '' HeaderStandardHeader@('FooterStandardFooter@('NVGRF51F BM76(FSDx^WYrF!@@voJHOnʏ;) T.(b^!"Z^V V+y?x^yyQqq/xokz^iź RS5ؾkdi֮{>U0o;\g,R.)^SiQUOVj_vZZjRi6K)`((#mayUE'Z7\C)|`B;kӪ,h;dп|h*༡JRثuC q^:^!v<1yBBTG@ d<2Vj=ęt]z2DMV; \g_%;WlFE_,%nJ0Yz [j] :|цcsQ#MPFXCode@΁D 2=m߽G%8(y>?D >V rdo[1sM̖eƙi)]r,)0؝Zm{ts%kҕr qIuZ=~)q[|1 5d}<M!xg4¡jLǮ<6y85:3YS`)5@T)gg'p?>Vu 甛șp{p:O#6)hLkDH`gSjɔeȏ\oN0 ^4͖F Mܬp?3*ycۗG`2o3SG,5ǒ2V*iVwGYMJikKR ,E_+7%686w޴|Y}=@ ԃ##N U2n_]O*ybN3j8vb`Z/q E3+{}3w =%sp˯[_jjSq{{^M8( هIޡ }j=G;ݫ>@qũ>C У,eFv'x3_ҏ@ 1]nG˧Mn";v7#s n{(/#R:cjsGܱϭ.m5KmZ0CZۭfGʆ!'N83(Lmu% 2fX)ʺ^}_E4b %Oh+'0 h t 57@I&H@@@s Tim Hurman Tim HurmanSW5HDR.0/1d!6 Frameformat ZeichenformatTextformatvorlageStandard Heading Text body  Heading 1  Heading 2HeaderFooterNumbering Symbols GraphicRoot 13 Column 14 Column 15 Graphic1 16 17 18 19 20Standard  Illustration Table TextDrawingY .Y .Y .Y .q2x GeneralGeneraldNC#,###.00#,###.00SystemNC #,##0.00 CCC#,##0.00 CCCNC$#,##0.--;[RED]-$#,##0.-- $#,##0.---$#,##0.--REDNC$ MM/DD/YYYYMM/DD/YYYY def/SystemNC%MM/DD/YYMM/DD/YY def/SystemNC&NNNNMMMM DD, YYYYNNNNMMMM  DD, YYYYSystemNC' MMM D, YYMMM D, YY def/SystemNC. [HH]:MM:SS.00 [HH ]:MM:SS .00NC3MM/DD/YYYY HH:MM:SS MM/DD/YYYY HH :MM:SS  NCK MMM D, YYYYMMM D, YYYY def/SystemNCL MMMM D, YYYYMMMM  D, YYYY def/SystemNCM NN, MMM D, YYNN, MMM D, YY def/SystemNCNNN, MMMM D, YYYYNN, MMMM  D, YYYY def/SystemNCONNNNMMMM D, YYYYNNNNMMMM  D, YYYY def/SystemNCP D. MMM. YYYYD. MMM. YYYYDIN 5008 (EN 28601)NCQ D. MMMM YYYYD. MMMM  YYYYDIN 5008 (EN 28601)NCRMM-DDMM-DDDIN 5008 (EN 28601)NCSYY-MM-DDYY-MM-DDDIN 5008 (EN 28601)NCT YYYY-MM-DDYYYY-MM-DDDIN 5008 (EN 28601)NCUWWWWNC GeneralGeneraldNC #,##0.00#,##0.00SystemNC  #,##0.00 CCC#,##0.00 CCCNC #,##0.--;[RED]-#,##0.-- #,##0.---#,##0.--REDNC  DD/MM/YYYYDD/MM/YYYY def/SystemNC DD/MM/YYDD/MM/YY def/SystemNC  DD MMMM YYYYDD MMMM  YYYYSystemNC D MMM YYD MMM YY def/SystemNC  [HH]:MM:SS.00 [HH ]:MM:SS .00NC DD/MM/YYYY HH:MM:SS DD/MM/YYYY HH :MM:SS  NC  D MMM YYYYD MMM YYYY def/SystemNC  D MMMM YYYYD MMMM  YYYY def/SystemNC  NND MMM YYNND MMM YY def/SystemNC  NND MMMM YYYYNND MMMM  YYYY def/SystemNC NNNND MMMM YYYYNNNND MMMM  YYYY def/SystemNC  D. MMM. YYYYD. MMM. YYYYDIN 5008 (EN 28601)NC  D. MMMM YYYYD. MMMM  YYYYDIN 5008 (EN 28601)NC MM-DDMM-DDDIN 5008 (EN 28601)NC YY-MM-DDYY-MM-DDDIN 5008 (EN 28601)NC  YYYY-MM-DDYYYY-MM-DDDIN 5008 (EN 28601)NC WWWWNCBoeoePVpO 2$99 SAP.AAPdddAPddAPr  HeaderSAPddAPNTSA @l:  SAPAPPNGG> PicEFFFC645S(A `A`A  PA  PAPAPA PA Prz FooterShAPddASPNJTA SAd A @A0-SAAP.AAPdddAPddZSW5HDR.0/1dC(517e(Build:4163)(SV517)]DAddress bookaddress!6 Frameformat ZeichenformatTextformatvorlageStandard Heading Text body  Heading 1  Heading 2HeaderFooterNumbering Symbols GraphicRoot 13 Column 14 Column 15 Graphic1 16 17 18 19 20Standard  Illustration Table TextDrawingd ;@1 4 5*j standard.dicY .Y .Y .Y .6FNjpT T'4. Final Testing and ResultsT iTDue to the iterative nature of this project, testing occurred on a continual basis throughout the development processes. Thus, the final testing was exclusively involved with the higher and accessible layers of the protocol stack, focusing on the TCP, UDP and ICMP layers. However, by testing these layers the lower layers have been transparently and extensively tested since they must function correctly for the upper layers to communicate.T iT4.1. Test setupT TUJFor the final testing, the Linux computer was set up in the following way.T T?Both serial ports were linked together with a null modem cable.S2AP6dddQA @ 3125331013 ToSLIP was configured on the first serial port with a speed setting of 9600 baud, via the Linux slattach utility.S2AP6dddQA @ 3125331013 T_The SLIP interface was configured as an active network interface with the following parameters.S2AP6dddQA @ 3125331013 T]IP number 10.0.0.1S2APQdddlA @ 3125331013TSubnet mask 255.255.255.255. This informs Linux that the device attached to the other end of the SLIP line will be standalone, rather than a network.S2APQdddlA @ 3125331013TNo multicast. This disables Linux from sending router discovery and other multicast packets down the SLIP line to the microcontroller.S2APQdddlA @ 3125331013TCNo broadcast. This disables Linux from sending broadcast packets down the SLIP line, including broadcast ICMP echo requests. Although the device would not respond to such packets, it would use memory in the serial buffer and so has been disallowed.S2APQdddlA @ 3125331013TPoint to point. By declaring the interface point to point, Linux knows that it will be involved in a one-to-one communication style.S2APQdddlA @ 3125331013TqThe second serial port was configured as 8 bit, no parity, one stop bit at 9600 baud, with hardware flow control.S2AP6dddQA @ 3139151013 TsThe 8051 simulator was attached to the second serial port and set to run the TCP/IP stack produced in this project.S2AP6dddQA @ 3139151013 T iTtApplications on the simulated 8051 could therefore be exercised from the test programs running on the Linux machine.T3(4.2. Test 1: ICMP echo request and replyT TThis test involved sending an ICMP echo request to the device and receiving the echo reply produced. A five second gap was left between each ICMP echo request to give the microcontroller time to respond. It showed that the ICMP layer was correctly recognising packets and responding to them in the manner specified. The same test was repeated with multiple ICMP echo requests being generated and the same results achieved.T T ping output:T\'PING 10.0.0.2 (10.0.0.2): 56 data bytesS*AcourierAd Tn964 bytes from 10.0.0.2: icmp_seq=0 ttl=255 time=2111.5 msS*AcourierAd Tn964 bytes from 10.0.0.2: icmp_seq=1 ttl=255 time=2120.0 msS*AcourierAd Tn964 bytes from 10.0.0.2: icmp_seq=2 ttl=255 time=2110.0 msS*AcourierAd T5S*AcourierAd TU --- 10.0.0.2 ping statistics ---S*AcourierAd Tn93 packets transmitted, 3 packets received, 0% packet lossS*AcourierAd Ti0round-trip min/avg/max = 2110.0/2113.8/2120.0 msA80d A80courierT Ttcpdump output:Tn910.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 3423)S*AcourierAd Tj510.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 2)S*AcourierAd Tn910.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 3444)S*AcourierAd Tj510.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 3)S*AcourierAd Tn910.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 3481)S*AcourierAd Tw510.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 4)S7AcourierAd A  @TSA  @T;04.3. Test 2: ICMP echo response to an unknown IPT T_TThis test proves that the microcontroller's IP layer is exclusively responding to the specified IP address. In order to accomplish this, the routing tables within Linux were altered to redirect all IPs destined for the 10.0.0.0/24 network down the SLIP line. ICMP echo requests were then sent to address 10.0.0.3. Again, a five second gap was left to ascertain whether the device would respond. Once it was confirmed that the microcontroller was not responding to an incorrect IP address, a single ICMP echo request was sent to the correct IP address to confirm that this was not due to an error.T T ping output:T\'PING 10.0.0.3 (10.0.0.3): 56 data bytesS*AcourierAd T5S*AcourierAd TU --- 10.0.0.3 ping statistics ---S*AcourierAd Tp;3 packets transmitted, 0 packets received, 100% packet lossS*AcourierAd T Ttcpdump output:To:10.0.0.1 > 10.0.0.3: icmp: echo request (ttl 64, id 15276)S*AcourierAd To:10.0.0.1 > 10.0.0.3: icmp: echo request (ttl 64, id 15305)S*AcourierAd To:10.0.0.1 > 10.0.0.3: icmp: echo request (ttl 64, id 15329)S*AcourierAd T|:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 15354)S7AcourierAd A  @Tj510.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 1)S*AcourierAd T TThe results of this test show that the microcontroller was completely ignoring any packets destined to another host, whilst correctly recognising any packets addressed to the device.T T7,4.4. Test 3: UDP/Application layer interfaceT iTThis test used the afore mentioned 'udp_cmd' (appendix 11) program to interface with the device. However during this test an ICMP echo request was generated every five seconds in order to simulate network load.T iTudp_cmd output:TMEnter command (1|0|S): 1S*AcourierAd T=Sent "1"S*AcourierAd TA Received: OKS*AcourierAd TMEnter command (1|0|S): SS*AcourierAd T=Sent "S"S*AcourierAd TA Received: ONS*AcourierAd TMEnter command (1|0|S): 0S*AcourierAd T=Sent "0"S*AcourierAd TA Received: OKS*AcourierAd TMEnter command (1|0|S): SS*AcourierAd T=Sent "S"S*AcourierAd TB Received: OFFS*AcourierAd TMEnter command (1|0|S): AS*AcourierAd T=Sent "A"S*AcourierAd TB Received: ERRS*AcourierAd T5S*AcourierAd T Ttcpdump output:To:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 17790)S*AcourierAd Tj510.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 5)S*AcourierAd Tl710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 17799)S*AcourierAd Ti410.0.0.2.4096 > 10.0.0.1.5000: udp 2 (ttl 255, id 6)S*AcourierAd Tl710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 17823)S*AcourierAd To:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 17827)S*AcourierAd Ti410.0.0.2.4096 > 10.0.0.1.5000: udp 2 (ttl 255, id 7)S*AcourierAd Tl710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 17849)S*AcourierAd Tj510.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 8)S*AcourierAd Ti410.0.0.2.4096 > 10.0.0.1.5000: udp 2 (ttl 255, id 9)S*AcourierAd To:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 17859)S*AcourierAd Tl710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 17861)S*AcourierAd Tk610.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 10)S*AcourierAd Tj510.0.0.2.4096 > 10.0.0.1.5000: udp 3 (ttl 255, id 11)S*AcourierAd To:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 17901)S*AcourierAd Tl710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 17905)S*AcourierAd Tk610.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 12)S*AcourierAd Tj510.0.0.2.4096 > 10.0.0.1.5000: udp 3 (ttl 255, id 13)S*AcourierAd To:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 17929)S*AcourierAd Tk610.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 14)S*AcourierAd T iTIn the results for this test (see above), it can be observed that the UDP command requests and acknowledgements are interleaved with the ICMP echo requests and replies. This reveals that the microcontroller is capable of processing different protocols simultaneously. It also shows that the 8051 is able to respond to packets at the same rate as the SLIP interface is able to produce them.T iTE,4.5. Test 4: TCP/Application layer interfaceSA PT TFor this test the tcp_cmd function was used to perform the same procedure as in test 3. However, in this test the protocol used was TCP rather than UDP. The ICMP echo requests continued to be generated every five seconds.T Ttcp_cmd output:TNEnter command (1|0|S|Q):1S*AcourierAd TA Received: OKS*AcourierAd TC....S4AcourierAd A TQEnter command (1|0|S|Q):testS*AcourierAd TB Received: ERRS*AcourierAd TNEnter command (1|0|S|Q):QS*AcourierAd T Ttcpdump output:T:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 20154)SXAPdddAcourierAd A @ 3008521313T10.0.0.1.1026 > 10.0.0.2.4096: S 143537324:143537324(0) win 32512 (DF) (ttl 64, id 20173)SXAPdddAcourierAd A @ 3008521313T610.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 26)SXAPdddAcourierAd A @ 3008521313T10.0.0.1.1026 > 10.0.0.2.4096: S 143537324:143537324(0) win 32512 (DF) (ttl 64, id 20179)SXAPdddAcourierAd A @ 3008521313To10.0.0.2.4096 > 10.0.0.1.1026: S 7275520:7275520(0) ack 143537325 win 16 (ttl 255, id 27)SXAPdddAcourierAd A @ 3008521313TN10.0.0.1.1026 > 10.0.0.2.4096: . ack 7275521 win 32512 (DF) (ttl 64, id 20181)SXAPdddAcourierAd A @ 3008521313Te10.0.0.1.1026 > 10.0.0.2.4096: P 143537325:143537326(1) ack 7275521 win 32752 (DF) (ttl 64, id 20202)SXAPdddAcourierAd A @ 3008521313TY10.0.0.2.4096 > 10.0.0.1.1026: P 7275521:7275523(2) ack 143537326 win 16 (ttl 255, id 28)SXAPdddAcourierAd A @ 3008521313TN10.0.0.1.1026 > 10.0.0.2.4096: . ack 7275523 win 32750 (DF) (ttl 64, id 20208)SXAPdddAcourierAd A @ 3008521313 TV......S7AcourierAd A  @A8T:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 20296)SXAPdddAcourierAd A @ 3026201313 T610.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 35)SXAPdddAcourierAd A @ 3026201313 Te10.0.0.1.1026 > 10.0.0.2.4096: P 143537329:143537333(4) ack 7275530 win 32752 (DF) (ttl 64, id 20337)SXAPdddAcourierAd A @ 3026201313 T:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 20357)SXAPdddAcourierAd A @ 3026201313 TY10.0.0.2.4096 > 10.0.0.1.1026: P 7275530:7275533(3) ack 143537333 win 16 (ttl 255, id 36)SXAPdddAcourierAd A @ 3026201313TN10.0.0.1.1026 > 10.0.0.2.4096: . ack 7275533 win 32752 (DF) (ttl 64, id 20360)SXAPdddAcourierAd A @ 3026201313T610.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 37)SXAPdddAcourierAd A @ 3026201313Te10.0.0.1.1026 > 10.0.0.2.4096: F 143537333:143537333(0) ack 7275533 win 32752 (DF) (ttl 64, id 20367)SXAPdddAcourierAd A @ 3026201313TF10.0.0.2.4096 > 10.0.0.1.1026: . ack 143537334 win 16 (ttl 255, id 38)SXAPdddAcourierAd A @ 3026201313TY10.0.0.2.4096 > 10.0.0.1.1026: F 7275533:7275533(0) ack 143537334 win 16 (ttl 255, id 39)SXAPdddAcourierAd A @ 3026201313TN10.0.0.1.1026 > 10.0.0.2.4096: . ack 7275534 win 32751 (DF) (ttl 64, id 20388)SXAPdddAcourierAd A @ 3026201313T:10.0.0.1 > 10.0.0.2: icmp: echo request (ttl 64, id 20390)SXAPdddAcourierAd A @ 3026201313T610.0.0.2 > 10.0.0.1: icmp: echo reply (ttl 255, id 40)SXAPdddAcourierAd A @ 3026201313T T_:For clarity only a few of the executed commands are shown in the results (see above). However, this proves how the 8051 is maintaining state whilst still processing the ICMP echo requests and replies. This test shows how retransmissions are handled by the microcontroller. From the tcp output it can be seen that packets two and four are retransmissions, as the microcontroller did not respond in time to the synchronisation packet. This is partly due to the ICMP processing and partly due to the simulator's response time. The packet however is successfully recognised as a packet that has already been received and is discarded. This is shown by the lack of two return synchronisation packets. The TCP synchronisation reply can be seen on line five. Packets seven and eight show a single byte TCP packet being sent to the device and the result being returned with an acknowledgement. Packet nine shows the acknowledgement to the result sent from the 8051. Packets seventeen twenty show the TCP disconnection phase, where each host informs the other it has finished sending data.A8 symbolT T;04.6. Test 5: TCP+UDP/Application layer interfaceT T In this test both the udp_cmd and tcp_cmd programs are used simultaneously to show how the output device is shared between both transport layers. This is achieved by executing a series of commands alternately. The command series can be followed by the ladder below.T I TCP+UDP ResultssRSGA PA  PA/Pdq 89NT(udp_cmd output:SA PTEnter command (1|0|S): SSXAPdddAcourierAd A @ 305839131o+:SA  PA P3T Received: OFFS2APdddA @ 305839131A8 d A8 courier3 TEnter command (1|0|S): SSXAPdddAcourierAd A @ 310061131o+:SA  PA P3Tw Received: ONSXAPdddAcourierAd A @ 3100611313 TEnter command (1|0|S): 0SXAPdddAcourierAd A @ 310109131o+:SA  PA P3Tw Received: OKSXAPdddAcourierAd A @ 3101091313 TEnter command (1|0|S): SSXAPdddAcourierAd A @ 3101331313Tx Received: OFFSXAPdddAcourierAd A @ 3101331313 T) tcp_cmd output:SA PTEnter command (1|0|S|Q):1SXAP6dddQAcourierAd A @ 3058581313 T{ Received: OKSXAPQdddQAcourierAd A @ 3058581313 "TEnter command (1|0|S|Q):SSXAP6dddQAcourierAd A @ 3059101313 T{ Received: ONSXAPQdddQAcourierAd A @ 3059101313 "TEnter command (1|0|S|Q):SSXAP6dddQAcourierAd A @ 3101521313 T| Received: OFFSXAPQdddQAcourierAd A @ 3101521313 "TEnter command (1|0|S|Q):QSXAP6dddQAcourierAd A @ 3101601313 T5S*AcourierAd T Ttcpdump output:T10.0.0.1.1028 > 10.0.0.2.4096: S 1365695164:1365695164(0) win 32512 (DF) (ttl 64, id 25148)SXAPdddAcourierAd A @ 3044511313Tp10.0.0.2.4096 > 10.0.0.1.1028: S 3481344:3481344(0) ack 1365695165 win 16 (ttl 255, id 45)SXAPdddAcourierAd A @ 3044511313TN10.0.0.1.1028 > 10.0.0.2.4096: . ack 3481345 win 32512 (DF) (ttl 64, id 25152)SXAPdddAcourierAd A @ 3044511313T710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 25173)SXAPdddAcourierAd A @ 3044511313T510.0.0.2.4096 > 10.0.0.1.5000: udp 3 (ttl 255, id 46)SXAPdddAcourierAd A @ 3044511313Tg10.0.0.1.1028 > 10.0.0.2.4096: P 1365695165:1365695166(1) ack 3481345 win 32752 (DF) (ttl 64, id 25181)SXAPdddAcourierAd A @ 3044511313TZ10.0.0.2.4096 > 10.0.0.1.1028: P 3481345:3481347(2) ack 1365695166 win 16 (ttl 255, id 47)SXAPdddAcourierAd A @ 3044511313TN10.0.0.1.1028 > 10.0.0.2.4096: . ack 3481347 win 32750 (DF) (ttl 64, id 25201)SXAPdddAcourierAd A @ 3044511313Tg10.0.0.1.1028 > 10.0.0.2.4096: P 1365695166:1365695167(1) ack 3481347 win 32752 (DF) (ttl 64, id 25206)SXAPdddAcourierAd A @ 3044511313 TZ10.0.0.2.4096 > 10.0.0.1.1028: P 3481347:3481349(2) ack 1365695167 win 16 (ttl 255, id 48)SXAPdddAcourierAd A @ 3044511313 TN10.0.0.1.1028 > 10.0.0.2.4096: . ack 3481349 win 32752 (DF) (ttl 64, id 25210)SXAPdddAcourierAd A @ 3044511313 T710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 25215)SXAPdddAcourierAd A @ 3044511313 T510.0.0.2.4096 > 10.0.0.1.5000: udp 2 (ttl 255, id 49)SXAPdddAcourierAd A @ 3044511313 T710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 25239)SXAPdddAcourierAd A @ 3044511313T510.0.0.2.4096 > 10.0.0.1.5000: udp 2 (ttl 255, id 50)SXAPdddAcourierAd A @ 3044511313T710.0.0.1.5000 > 10.0.0.2.4096: udp 1 (ttl 64, id 25263)SXAPdddAcourierAd A @ 3044511313T510.0.0.2.4096 > 10.0.0.1.5000: udp 3 (ttl 255, id 51)SXAPdddAcourierAd A @ 3044511313Tg10.0.0.1.1028 > 10.0.0.2.4096: P 1365695167:1365695168(1) ack 3481349 win 32752 (DF) (ttl 64, id 25271)SXAPdddAcourierAd A @ 3044511313TZ10.0.0.2.4096 > 10.0.0.1.1028: P 3481349:3481352(3) ack 1365695168 win 16 (ttl 255, id 52)SXAPdddAcourierAd A @ 3044511313TN10.0.0.1.1028 > 10.0.0.2.4096: . ack 3481352 win 32752 (DF) (ttl 64, id 25291)SXAPdddAcourierAd A @ 3044511313Tg10.0.0.1.1028 > 10.0.0.2.4096: F 1365695168:1365695168(0) ack 3481352 win 32752 (DF) (ttl 64, id 25296)SXAPdddAcourierAd A @ 3044511313TG10.0.0.2.4096 > 10.0.0.1.1028: . ack 1365695169 win 16 (ttl 255, id 53)SXAPdddAcourierAd A @ 3044511313TZ10.0.0.2.4096 > 10.0.0.1.1028: F 3481352:3481352(0) ack 1365695169 win 16 (ttl 255, id 54)SXAPdddAcourierAd A @ 3044511313TN10.0.0.1.1028 > 10.0.0.2.4096: . ack 3481353 win 32751 (DF) (ttl 64, id 25317)SXAPdddAcourierAd A @ 3044511313T iTIn this tcpdump output, packets one, two and three are the TCP synchronisation packets that initiate the stream. It can then be observed that command one was sent over UDP. Comparing the sequence of events, it can be seen that this command was to request the status. Two commands were then sent over TCP, as shown by packets seven to eleven. These commands turn on the output device and then request the status to confirm the action occurred. Packets twelve to eighteen are the three sequential UDP commands (four, five and six) shown in the command listing. Packets eighteen to twenty-four are the final commands and connection close from the tcp_cmd program.T iTH=The test results show that the device can be controlled from both the TCP and UDP layers simultaneously. Additionally, any number of udp_cmd processes may be sending packets toward the microcontroller. Only one concurrent TCP stream is supported due to the buffering and state space limitations of the 8051's memory. T iT TSA PT5. ConclusionsT T5.1. Current workT TrgThis project has been successful in its primary goal of developing a functional TCP/IP stack for an 8051 microcontroller. The stack supports UDP and ICMP in addition to TCP. The microcontroller can support simultaneous access from all three protocols, however only one open TCP stream may be maintained at any single point in time, due to memory limitations. T Th]In retrospect this project could have been achieved in a far simpler and more efficient way by using a 16-bit microcontroller as the development platform. This is because the TCP/IP stack was optimised at a time when 16-bit processors were the standard. However, this would have meant using a PIC device, of which UNIX support is largely unheard of.T TqfThe secondary objective of this project has not been fully completed. This was to demonstrate the project software running on a small hardware platform that could be connected to a computer and activated over a SLIP link. Although there was no hardware produced for this stage, the circuit diagrams can be seen in the appendix under 'Hardware'. However during development, the simulator was constantly attached via a serial port to the computer. During later tests, the computer controlled the simulator via a live SLIP interface with no additional modifications. The simulator was therefore acting as if it were a real 8051, the only difference being that the simulator has far superior debugging methods available. It will therefore be possible to transfer the program produced for this project directly into hardware and achieve the same results, but with less delay.T TNo hardware was built for this project and thus the budget was not used. All the software used to create the TCP/IP stack is available free from the Internet. Therefore the total cost of this project has been zero.T iT5.2. Future workT TPEAlthough the 8051 supports ICMP, TCP and UDP, there are many enhancements that could be made to increase the performance of this project. The ICMP layer is a functionally required layer only. In other words the current implementation only handles those ICMP message types that were needed for the development of this project.T iTThe UDP layer is fully functional and requires no further alteration. The TCP layer however, is far from a full implementation. There are several items that could be added and enhanced, such as the existence of timers. Presently the 8051 supports only a basic TCP retransmission timer, however several other timers are needed for full TCP operation. The TCP layer could also be updated to use and operate with the new T-TCP standards.T iTC8The application layer needs no further modification to support the protocol that is currently in operation. However it may be wise to update the current application layer to use a standard application layer protocol that would be compatible with current home network devices. One possibility would be to implement would be a simple HTML/CGI form based interface stored within the device. However if security were an issue this would not be possible since the 8051 could not hope to support the algorithms needed to implement the Secure Sockets Layer (SSL) interface.T iTThe final area of enhancement would be to build the hardware and run the TCP/IP stack in a real microcontroller. This would be trivial, following the detail simulation of this project.T JColour DeskjetSGENPRT PostScriptDQtQtd,,lp -d colourcolourSGENPRT7 U׶V88.?3.AUq 6P,Uq (q H-@q 6Uq `2?Bq {B{q kq {Bq xq Bkq Bxq NB q B q Bq Bq ;q K B(q xq  Bq  Bq  Bq E6;  Bq E6;Bq E6;Bq EQ  Bq 'EQ 'B<q EQ BV!q 4EQ 4B%q EQ B'q E6;B)q E6;B+q B,q B-q -U(:q q F@q *U%?$ е3B.AUq 6p,Uq (q H-@q Uq `2?(Bq KBKq xq Bq NB q B+ q B8 q B q B q !B? q "B q #Bq $BFq %Bq &Bq 'Bq (Bq )Bgq *@Bq +ABq ,BBnq -CBq .DBq /EBq ;q K0FBq xq 1GBq [2NB"q 3OB#q 4PB %q 5QB%q 6RBd&q 7SB'q 8TB'q 9UB(q :VB)q ;WB*q <XB2+q =YB+q >ZB,q ?[B9-q @\BF.q 'A_-U(:q q F@q *U%J?$ Ф3%….AUq 6P,Uq (q H-@q Uq `2?4Bq B`B q ;q KCaBHq xq DbBq EcBq 'FfB q GgB q HhB q IiB( q JjB q KkB q LlB/q MmBq NnBq OoB6q PpBq QqBq RrB=q SsBq TtBq UuBDq VvBq WwBq XxBKq YyBq ZzBq [{Bq \|Bq ]}Blq ^~Bq _Bq `Bsq aB q bBq cBzq dB'q eBq fB q gB.!q hB!q iB"q jB5#q kB#q lB$q mB<%q nB%q oB&q pB'q qB(q ArB-q sB.q tB 0q u-U(:q q F@q +e%?$ б3%.AUq 6p,Uq (q H-@q  Uq `2?&Bq KvBKq xq wBq 'xBq yBq zBq {Bq |Bk q }B! q ~B q B{ q B( q B5 q BBq Bq ZBIq Bq ZBPq ZBq ZBq ZB^q ZBq ZBq Bq Buq B"q ZB|q B)q ZBq ZBq B q ZB!q B"q ZB#q ZBE%q B%q B&q B'q  -U(:q q F@q +e%{?$ t3% .AUq 6P,Uq (q H-@q «Uq `2?!Bq dCBdq Bqq ;q KBq xq B1 q 4Be q "rq uS"8u$u?"$u? b$ -b $b$-bg$b$-b$bn$b$b$"E89uE%u?@"E%u? b% b %E6 b%E6 bg%E6 b%E6 b%E6 bn%E6 b%E6 b%Bq Bq Bq ZB[q ZBq ZBq Bq Biq ZBq ZBq ZBw q ZB!q Z B+#q Z B$q  B2%q  B%q B&q B9'q B'q B(q ZB)q ZBG+q ZB,q ZB-q B.q ZB0q Z-U(:q q F@q    +e%\?$ Љ3%eN.AUq 6p,Uq (q H-@q Uq `2? Bq B q  Bq u )B q *B q +B q 4/Bq 0Bq 1Bq 2Bq kq {3-U(:q q F@q +e%=V?$ L3%F.AUq 6P,Uq (q H-@q ¤Uq `2?Bq {4B{q kq {5Bq xq 6Bkq ;q K7Bq xq 8B+ q A=Blq >Byq ACBq DBq OBV!q PBc"q 'SB%q TB&q UB'q ;q KVB)q xq WBd+q A\B0q ]-U(:q q F@q +e%?$ n3%'.AUq 6p,Uq (q H-@q Uq `2? Bq ^B q NdB[q eBhq fBu q [mBq nBq oBq 'rBq s-U(:q q F@q +e%?$ lZRoot Entry ®`VCompObj<Ole persist elements" SfxDocumentInfo  uSfxWindows>DrawingLayerSwNumRules\SfxStyleSheets cEmbeddedPictures" PicEFFFC645:SummaryInformation( S8SwPageStyleSheets$ $StarWriterDocument&(