cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
icmp.hpp
Go to the documentation of this file.
1 
17 
43 
56 #ifndef _ICMP_H_
57 #define _ICMP_H_
58 
59 #include "../../../NTS/nts.hpp"
60 #include "../../../NTS/nts_utils.hpp"
61 #include "../../../NTS/SimNtsUtils.hpp"
62 #include "../../AxisEth.hpp"
63 
64 
65 const IcmpType ICMP_ECHO_REPLY = 0x00; // Echo reply (used to ping)
67 const IcmpType ICMP_ECHO_REQUEST = 0x08; // Echo request (used to ping)
69 
72 
73 const Ip4Prot ICMP_PROTOCOL = 0x01; // IP protocol number for ICMP
74 
75 typedef ap_uint<17> Sum17; // 16-bit 1's complement sum with carry
76 typedef ap_uint<17> LE_Sum17; // 16-bit 1's complement sum with carry
77 
78 
83 #if HLS_VERSION == 2017
84 
85  void icmp_top(
86  //------------------------------------------------------
87  //-- MMIO Interface
88  //------------------------------------------------------
89  Ip4Addr piMMIO_Ip4Address,
90 
91  //------------------------------------------------------
92  //-- IPRX Interfaces
93  //------------------------------------------------------
94  stream<AxisIp4> &siIPRX_Data,
95  stream<AxisIp4> &siIPRX_Derr,
96 
97  //------------------------------------------------------
98  //-- UOE Interface
99  //------------------------------------------------------
100  stream<AxisIcmp> &siUOE_Data,
101 
102  //------------------------------------------------------
103  //-- IPTX Interface
104  //------------------------------------------------------
105  stream<AxisIp4> &soIPTX_Data
106  );
107 
108 #else
109 
110  void icmp_top(
111  //------------------------------------------------------
112  //-- MMIO Interface
113  //------------------------------------------------------
114  Ip4Addr piMMIO_Ip4Address,
115 
116  //------------------------------------------------------
117  //-- IPRX Interfaces
118  //------------------------------------------------------
119  stream<AxisRaw> &siIPRX_Data,
120  stream<AxisRaw> &siIPRX_Derr,
121 
122  //------------------------------------------------------
123  //-- UOE Interface
124  //------------------------------------------------------
125  stream<AxisRaw> &siUOE_Data,
126 
127  //------------------------------------------------------
128  //-- IPTX Interface
129  //------------------------------------------------------
130  stream<AxisRaw> &soIPTX_Data
131  );
132 
133 #endif // HLS_VERSION
134 
135 #endif
136 
const IcmpType ICMP_TIME_EXCEEDED
Definition: icmp.hpp:68
const IcmpCode ICMP_DESTINATION_PORT_UNREACHABLE
Definition: icmp.hpp:71
void icmp_top(Ip4Addr piMMIO_Ip4Address, stream< AxisRaw > &siIPRX_Data, stream< AxisRaw > &siIPRX_Derr, stream< AxisRaw > &siUOE_Data, stream< AxisRaw > &soIPTX_Data)
Top of the Internet Control Message Protocol (ICMP) Server.
Definition: icmp.cpp:832
const IcmpType ICMP_ECHO_REPLY
Definition: icmp.hpp:65
const Ip4Prot ICMP_PROTOCOL
Definition: icmp.hpp:73
const IcmpType ICMP_ECHO_REQUEST
Definition: icmp.hpp:67
const IcmpCode ICMP_TTL_EXPIRED_IN_TRANSIT
Definition: icmp.hpp:70
ap_uint< 17 > Sum17
Definition: icmp.hpp:75
ap_uint< 17 > LE_Sum17
Definition: icmp.hpp:76
const IcmpType ICMP_DESTINATION_UNREACHABLE
Definition: icmp.hpp:66
ap_uint< 8 > Ip4Prot
Definition: AxisIp4.hpp:164
ap_uint< 32 > Ip4Addr
Definition: AxisIp4.hpp:169
ap_uint< 8 > IcmpCode
Definition: AxisIcmp.hpp:92
ap_uint< 8 > IcmpType
Definition: AxisIcmp.hpp:91