30 #ifndef _SIM_ARP_PACKET_
31 #define _SIM_ARP_PACKET_
53 std::deque<AxisArp> pktQ;
57 void setLen(
int pktLen) {
72 return this->pktQ.front();
76 this->pktQ.pop_front();
79 void push_back(
AxisArp arpChunk) {
80 this->pktQ.push_back(arpChunk);
87 this->myName =
"SimArpPacket";
89 if (pktLen > 0 && pktLen <=
MTU) {
99 this->myName =
"SimArpPacket";
105 if (this->
size() > 0) {
107 this->pktQ[this->
size()-1].setLE_TLast(0);
109 this->push_back(arpChunk);
110 this->setLen(this->getLen() + arpChunk.
getLen());
114 AxisArp headingChunk = this->front();
116 setLen(getLen() - headingChunk.
getLen());
125 return this->pktQ.size();
151 pktQ[2].setArpSenderProtAddrLo(spa); }
155 return(spaHi | spaLo); }
Class ARP Packet for simulation.
ArpTargHwAddr getTargetHwAddr()
void setSenderProtAddr(ArpSendProtAddr spa)
ArpProtType getProtocolType()
void pushChunk(AxisArp arpChunk)
void setHardwareType(ArpHwType htype)
void setTargetHwAddr(ArpTargHwAddr tha)
ArpTargProtAddr getTargetProtAddr()
void setSenderHwAddr(ArpSendHwAddr sha)
ArpProtLen getProtocolLength()
void setTargetProtAddr(ArpTargProtAddr tpa)
ArpSendProtAddr getSenderProtAddr()
void setProtocolLength(ArpProtLen plen)
ArpProtType getOperation()
ArpSendHwAddr getSenderHwAddr()
void setHardwareLength(ArpHwLen hlen)
ArpHwType getHardwareType()
void setOperation(ArpOper oper)
ArpHwLen getHardwareLength()
void setProtocolType(ArpProtType ptype)
ap_uint< 16 > ArpProtType
ap_uint< 48 > ArpSendHwAddr
LE_tKeep lenToLE_tKeep(ap_uint< 4 > noValidBytes)
A function to set a number of '1' in an 8-bit field. It is used here to set the number of valid bytes...
ap_uint< 32 > ArpSendProtAddr
ap_uint< 32 > ArpTargProtAddr
ap_uint< 48 > ArpTargHwAddr
: Definition of the Network Transport Stack (NTS) component as if it was an HLS IP core.
: Utilities and helpers for the Network-Transport-Stack (NTS) components.