Changes between Version 2 and Version 3 of Internal/PacketServer


Ignore:
Timestamp:
Feb 12, 2013, 4:13:55 PM (12 years ago)
Author:
nilanjan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/PacketServer

    v2 v3  
    1010    | CRC - Seq# - pyld[0] - ... - pyld[pkt-size-3]  |
    1111
    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]]
    1515
    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.
    2517
    2618== Packet sink ==
    2719
    28 Similary 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:
     20Similarly 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:
    2921 1. server sends client a ready packet (4 byte word)
    3022 2. client sends server data with the following field (4 byte each):
     
    3224    | CRC - Seq#- pyld[0] - pyld[1] - ... - pyld[pkt-size-3]  |
    3325
    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.
    3830
    39 This handshake process is depicted below:
     31== An example client ==
     32A python based client code has been attached for reference.
     33{{{
     34nilanjan@console.grid:~/CODE/pkt_client$ ./client.py
     35Requesting  1024  bytes
     36Seq #: 0  with CRC [ 0xbf4d4f4dL ]
     37Seq #: 1  with CRC [ 0x6b567e27 ]
     38Seq #: 2  with CRC [ 0x41a3778c ]
     39Seq #: 3  with CRC [ 0x35735fdd ]
     40Seq #: 4  with CRC [ 0x354d9012 ]
     41Seq #: 5  with CRC [ 0x3383b06a ]
     42Seq #: 6  with CRC [ 0xd4e9ed05L ]
     43Seq #: 7  with CRC [ 0x3ee8ee8d ]
     44Seq #: 8  with CRC [ 0x22d07f05 ]
     45Seq #: 9  with CRC [ 0x945f117fL ]
     46Seq #: 10  with CRC [ 0x50ca22f4 ]
     47Seq #: 11  with CRC [ 0x1b87b63f ]
     48Seq #: 12  with CRC [ 0xe8534403L ]
     49Seq #: 13  with CRC [ 0x9ff260caL ]
     50}}}
    4051
    41         Client                                                                 Server
    42 t1        |<---------------------------packet size--------------------------------|
    43 
    44 t2        |<------CRC, Seq#, pyld[0], ... , pyld[pkt-size - 3]------------------|