Hi, Peter,

Here is a tcpdump snapshot of the first part of a PAPER packet.  The data from 
tcpdump includes headers from other network layers that encapsulate the 
application data.

Here is the output:

$ sudo tcpdump -i eth4 -s 100 -xx -c 1 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth4, link-type EN10MB (Ethernet), capture size 100 bytes
20:36:04.678013 IP 10.10.4.1.8511 > 10.0.4.54.8511: UDP, length 8208
        0x0000:  ffff ffff ffff 0202 c0a8 0401 0800 4500
        0x0010:  202c 0000 4000 ff11 3f80 0a0a 0401 0a00
        0x0020:  0436 213f 213f 2018 0000 0006 e74d 2d6d
        0x0030:  0510 c003 1f1f f200 eefe 0fed e2dd dbf0
        0x0040:  e00f e5c3 eef4 03e2 ff11 31ed 1011 1e3c
        0x0050:  4ce5 f342 10bf 1ff9 1f2a 9f26 e334 4e60
        0x0060:  1010 1ff2 ...

Here is a breakdown of what is there...

# Ethernet Header

  Note the broadcast destination MAC (ff:ff:ff:ff:ff:ff) is used because this is
  a direct connection from ROACH2 to 10 GbE NIC (i.e. no switch).

    0x0000:  ffff ffff ffff 0202 c0a8 0401 0800

# IP Header

  Note the source IP (10.10.4.1) and destination IP (10.0.4.45) in the last 8 
octets.

    0x0000:                                     4500
    0x0010:  202c 0000 4000 ff11 3f80 0a0a 0401 0a00
    0x0020:  0436

# UDP Header

  PAPER uses port 8511 (0x213f) because US "Letter Size" paper is 8.5x11 
inches. :-)
  The same port number is used for both source and destination ports.
  0x2018 is UDP packet length == UDP header length + application packet length.
  Here we have 8216 == 8 + 8208.

    0x0020:       213f 213f 2018 0000

# PAPER Packet (finally!)

  The first 6 bytes are MCOUNT (0x0006e74d2d6d).
  The next 1 byte is FID (5).
  The next 1 byte is XID (16).
  The next 8192 bytes (not all shown) are the data.
  The final 8 bytes (not shown) are 4 bytes CRC + 4 bytes of zeros.
  The CRC is of the PAPER header and data (mcount+fid+xid+data).

    0x0020:                           0006 e74d 2d6d
    0x0030:  0510 c003 1f1f f200 eefe 0fed e2dd dbf0
    0x0040:  e00f e5c3 eef4 03e2 ff11 31ed 1011 1e3c
    0x0050:  4ce5 f342 10bf 1ff9 1f2a 9f26 e334 4e60
    0x0060:  1010 1ff2 ...

Hope this helps,
Dave


Reply via email to