44 #include <hls_stream.h>
68 #define QUERY_FAST_RETRANSMIT true
74 #define FLAG_INO false
77 #define LKP_NO_HIT false
152 #define ETH_BROADCAST_ADDR 0xFFFFFFFFFFFF
155 #define ETH_ETHERTYPE_IP4 0x0800
156 #define ETH_ETHERTYPE_ARP 0x0806
161 #define ARP_HTYPE_ETHERNET 0x0001
162 #define ARP_PTYPE_IPV4 0x0800
163 #define ARP_HLEN_ETHERNET 6
164 #define ARP_PLEN_IPV4 4
165 #define ARP_OPER_REQUEST 0x0001
166 #define ARP_OPER_REPLY 0x0002
181 #define IP4_BROADCAST_ADDR 0xFFFFFFFF
183 #define IP4_PROT_ICMP 0x01
184 #define IP4_PROT_TCP 0x06
185 #define IP4_PROT_UDP 0x11
213 addr(ip4Addr),
port(layer4Port) {}
235 fourTuple(ap_uint<32> srcIp, ap_uint<32> dstIp, ap_uint<16> srcPort, ap_uint<16> dstPort)
236 : srcIp(srcIp), dstIp(dstIp), srcPort(srcPort), dstPort(dstPort) {}
252 src(src), dst(dst) {}
266 src(src), dst(dst) {}
338 macAddr(newMac), ip4Addr(newIp4) {}
355 macAddress(macAdd), hit(hit) {}
401 myIp(myIp), theirIp(theirIp), myPort(myPort), theirPort(theirPort) {}
404 if (myIp < other.
myIp) {
407 else if (myIp == other.
myIp) {
411 else if(theirIp == other.
theirIp) {
412 if (myPort < other.
myPort) {
415 else if (myPort == other.
myPort) {
441 : key(tuple),
source(src) {}
455 hit(hit), sessionID(0),
source(src) {}
457 hit(hit), sessionID(id),
source(src) {}
472 key(key), value(value), op(op),
source(src) {}
488 sessionID(id), op(op),
source(src) {}
: A class to access an ETHernet data chunk transmitted over an AXI4-Stream interface.
: A class to access an IPv4 data chunk transmitted over an AXI4-Stream interface.
ArpBindPair(EthAddr newMac, Ip4Addr newIp4)
ArpLkpReply(EthAddr macAdd, HitBool hit)
CamSessionLookupReply(bool hit, RtlSessId id, LkpSrcBit src)
CamSessionLookupReply(bool hit, LkpSrcBit src)
CamSessionLookupRequest(FourTuple tuple, LkpSrcBit src)
CamSessionLookupRequest()
CamSessionUpdateReply(LkpOpBit op, LkpSrcBit src)
CamSessionUpdateReply(RtlSessId id, LkpOpBit op, LkpSrcBit src)
CamSessionUpdateRequest()
CamSessionUpdateRequest(FourTuple key, RtlSessId value, LkpOpBit op, LkpSrcBit src)
FourTuple(LE_Ip4Addr myIp, LE_Ip4Addr theirIp, LE_TcpPort myPort, LE_TcpPort theirPort)
LE_SockAddr(LE_Ip4Address addr, LE_Ly4Port port)
LE_SocketPair(LE_SockAddr src, LE_SockAddr dst)
SockAddr(Ip4Addr ip4Addr, Ly4Port layer4Port)
SocketPair(SockAddr src, SockAddr dst)
bool operator<(fourTuple const &lhs, fourTuple const &rhs)
bool operator==(SockAddr const &s1, SockAddr const &s2)
ap_uint< 32 > LE_Ip4Address
fourTuple(ap_uint< 32 > srcIp, ap_uint< 32 > dstIp, ap_uint< 16 > srcPort, ap_uint< 16 > dstPort)