cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
AxisIcmp.hpp File Reference

: A class to access ICMP header fields within data chunks transmitted over an AXI4-Stream interface. More...

#include "./AxisRaw.hpp"
Include dependency graph for AxisIcmp.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AxisIcmp
 

Macros

#define ICMP_HEADER_LEN   8
 

Typedefs

typedef ap_uint< 8 > LE_IcmpType
 
typedef ap_uint< 8 > LE_IcmpCode
 
typedef ap_uint< 16 > LE_IcmpCsum
 
typedef ap_uint< 8 > IcmpType
 
typedef ap_uint< 8 > IcmpCode
 
typedef ap_uint< 16 > IcmpCsum
 
typedef ap_uint< 16 > IcmpIdent
 
typedef ap_uint< 16 > IcmpSeqNum
 

Detailed Description

: A class to access ICMP header fields within data chunks transmitted over an AXI4-Stream interface.

Copyright 2016 – 2021 IBM Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

System: : cloudFPGA Component : Shell, Network Transport Stack (NTS) Language : Vivado HLS


: The Internet Control Message Protocol (ICMP) fields defined in this class refer to the format generated by the 10GbE MAC of Xilinx which organizes its two 64-bit Rx and Tx interfaces into 8 lanes (see PG157). The result of this division into lanes, is that the ICMP fields end up being stored in LITTLE-ENDIAN order instead of the initial big-endian order used to transmit bytes over the physical media. As an example, assume that the 16 bits of the ICMP "Checksum" packet has a value of '0xA1B2'. This field will be transmitted on the media in big- endian order .i.e, a '0xA1' followed by '0xB2'. However, this field will end up being ordered in little-endian mode (.i.e, 0xB2A1) by the AXI4- Stream interface of the 10GbE MAC.

Warning
: This class is to be used when an ICMP packet is aligned to a 64-bit quadword. Refer to the methods of 'AxisIp4.hpp' to access the fields of an ICMP packet that is embedded into an IPv4 packet, or the the methods of 'AxisEth.hpp' to access the fields of an ICMP packet that is embedded into IPv4 into an Ethernet frame.

@info : The format of an ICMP packet transferred over an AXI4-Stream interface of quadwords is done in LITTLE-ENDIAN and is mapped as follows:

   6                   5                   4                   3                   2                   1                   0

3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Rest of Header (Part-Hi) | Checksum | Code | Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | Rest of Header (Part-Lo) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Definition in file AxisIcmp.hpp.