Changes between Version 2 and Version 3 of Internal/PacketServer
- Timestamp:
- Feb 12, 2013, 4:13:55 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/PacketServer
v2 v3 10 10 | CRC - Seq# - pyld[0] - ... - pyld[pkt-size-3] | 11 11 12 CRC is calculate from Seq#to pyld[pkt-size - 3]13 Seq#is an incrementing count for the packet number 14 pyld[n] is the random data. 12 CRC is calculate from Seq#to pyld[pkt-size - 3] [[BR]] 13 Seq#is an incrementing count for the packet number [[BR]] 14 pyld[n] is the random data. [[BR]] 15 15 16 The handshake process is depicted below: 17 18 Client Server 19 t1 |---------------------------packet size------------------------------->| 20 21 t2 |<-------CRC, Seq#, pyld[0], ... , pyld[pkt-size - 3]------------------| 22 23 24 The above handshake process [t1,t2] will repeat for 120 seconds after which the connection will be terminated. 16 The above handshake process [t1,t2] will repeat for 120 seconds after which the connection will be terminated. 25 17 26 18 == Packet sink == 27 19 28 Similar y a TCP based packet sink available on idb2:5125 which receive packets from client. and verifies the crc. As of right now this packet sink is best used for looping back data from the packet server. Clients can send data to server after a connection has been established:20 Similarly a TCP based packet sink available on idb2:5125 which receive packets from client. and verifies the CRC. As of right now this packet sink is best used for looping back data from the packet server. Clients can send data to server after a connection has been established: 29 21 1. server sends client a ready packet (4 byte word) 30 22 2. client sends server data with the following field (4 byte each): … … 32 24 | CRC - Seq#- pyld[0] - pyld[1] - ... - pyld[pkt-size-3] | 33 25 34 CRC is calculate from SeqNo to pyld[pkt-size - 3]35 Seq#is an incrementing count for the packet number 36 pyld[n] is the random data. 37 Note: pkt-size is determined from a socket read function in server.26 CRC is calculate from Seq#to pyld[pkt-size - 3] [[BR]] 27 Seq#is an incrementing count for the packet number [[BR]] 28 pyld[n] is the random data. [[BR]] 29 Note: pkt-size is determined from a socket read function in server. 38 30 39 This handshake process is depicted below: 31 == An example client == 32 A python based client code has been attached for reference. 33 {{{ 34 nilanjan@console.grid:~/CODE/pkt_client$ ./client.py 35 Requesting 1024 bytes 36 Seq #: 0 with CRC [ 0xbf4d4f4dL ] 37 Seq #: 1 with CRC [ 0x6b567e27 ] 38 Seq #: 2 with CRC [ 0x41a3778c ] 39 Seq #: 3 with CRC [ 0x35735fdd ] 40 Seq #: 4 with CRC [ 0x354d9012 ] 41 Seq #: 5 with CRC [ 0x3383b06a ] 42 Seq #: 6 with CRC [ 0xd4e9ed05L ] 43 Seq #: 7 with CRC [ 0x3ee8ee8d ] 44 Seq #: 8 with CRC [ 0x22d07f05 ] 45 Seq #: 9 with CRC [ 0x945f117fL ] 46 Seq #: 10 with CRC [ 0x50ca22f4 ] 47 Seq #: 11 with CRC [ 0x1b87b63f ] 48 Seq #: 12 with CRC [ 0xe8534403L ] 49 Seq #: 13 with CRC [ 0x9ff260caL ] 50 }}} 40 51 41 Client Server42 t1 |<---------------------------packet size--------------------------------|43 44 t2 |<------CRC, Seq#, pyld[0], ... , pyld[pkt-size - 3]------------------|