I need to capture UDP information coming to me via an Ethernet frame. I have a point to point connection by fiber with 1000BASE-X Ethernet. The information coming to me is in GMII format; which is bytes at a rate of 125 MHz.
The UDP header format is shown below.
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| Source | Destination |
| Port | Port |
+--------+--------+--------+--------+
| | |
| Length | Checksum |
+--------+--------+--------+--------+
| |
| data octets |
+-----------------------------------+
Source Port = SP Destination Port = DP Length = L Checksum = CS
For reference, the Ethernet frame is shown below.
+-----------+-------+---------+---------+--------+------------------+---------+
| Preamble | SFD | DA | SA | TL | Data (Payload) | CRC-32 |
| 6 bytes |1 Byte | 6 bytes | 6 bytes |2 bytes | 46 to 1500 bytes | 4 bytes |
+-----------+-------+---------+---------+--------+------------------+---------+
Assuming that my data will be placed in the Data (Payload) field of the Etnernet frame, my question is:
1) Will the order of the double bytes be, first DP, second SP, third CS, fourth L, fifth data byte1, sixth data byte2, etc.? 2) Least significant bytes first?