Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 May 2009 03:37:54 -0400
From:      Zach Riggle <zachriggle@gmail.com>
To:        soc-status@freebsd.org
Subject:   Weekly Status Report
Message-ID:  <5D5055A6-8DDA-4D22-94EA-AA05539C7E28@gmail.com>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-41--839697387
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed;
	delsp=yes
Content-Transfer-Encoding: 7bit

Hello All

Not too many blog updates this week.  Spent a lot of time trying to  
get the latest Hg build of PCS to work properly, to no avail.  Tried  
to contact George Neville-Neil (mentor), but I got bounceback from the  
mail server.

Also, working on getting some of the features ported over from PCS-Hg  
so that I can use them in the meantime.  Spent a few hours tonight  
trying to fix a bug that didn't exist -- the output of an operation  
was correct, just not what I thought it should be.

Working on implementing a TCP State machine, that allows for toggle- 
able settings.  For example, in most cases it is desirable for things  
like the data offset, sequence number, and checksum to be  
automatically generated.  It is also generally useful to make sure  
that the TCP send window is not exceeded.  However, these features  
will need to be selectively disabled for various tests.  Working on  
getting all of that set up.

Ideally, the first test will look like this:

> def testTcp3WayHandshake(pcapConnector):
>   # Create the local TCP state machine and network interface
>   local = TcpStateMachine(pcapConnector, (localHost, localPort),  
> (remoteHost,remotePort))
>   local.state = Closed
>
>   # Create a TCP state machine to reflect the *expected* state of  
> the remote host
>   remote = TcpStateMachine(None, (remoteHost, remotePort),  
> (localHost, localPort))
>   remote.state = Closed
>
>   # Syn packet
>   syn = tcp.tcp()
>   syn.syn = 1
>
>   # Send the TCP packet.  The TCP State Machine handles generating  
> fields,
>   # creating the ipv4/ipv6 object and the ethernet object, and the  
> actual sending over the wire.
>   # The 'remote' TCP State object just processes the packet as if it  
> were received, and updates
>   # the internal state information
>   local.send(syn)
>   remote.recv(syn)
>   if not local.state == Syn_Sent and remote.state == Syn_Recvd:
>     fail
>
>   # Receive the next packet, simulate that packet being 'sent' by  
> the remote machine
>   synack = local.recv()
>   remote.send(synack )
>   if not (synack.ack and synack.syn and synack.acknum == syn.seq):
>     fail
>
>   # Auto-generate an 'ack' packet for the second packet
>   ack = local.ack(synack)
>   local.send(ack)
>   remote.recv(ack)
>   if not (local.state == Established and remote.state == Established):
>     fail
>
>   # Test connectivity
>   if not local.testConnectivity():
>     fail
>
>   # Close the connection
>   local.close()
>
>   # Test pass
>   if local.state != Closed:
>     fail


Zach
--Apple-Mail-41--839697387--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5D5055A6-8DDA-4D22-94EA-AA05539C7E28>