cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
IP Transmitter packet handler (IPTX) of the Network Transport Stack (NTS). More...
Modules | |
IPTX_TEST | |
Testbench for the IP Transmitter packet handler (IPTX) of the Network Transport Stack (NTS). | |
Files | |
file | test_iptx.cpp |
: Testbench for the IP Transmit frame handler (IPTX). | |
file | test_iptx.hpp |
: Testbench for the IP Transmitter packet handler (IPTX). | |
Macros | |
#define | THIS_NAME "IPTX" |
#define | TRACE_OFF 0x0000 |
#define | TRACE_ICA 1 << 1 |
#define | TRACE_ICI 1 << 2 |
#define | TRACE_IAE 1 << 3 |
#define | TRACE_MAI 1 << 4 |
#define | TRACE_ALL 0xFFFF |
#define | DEBUG_LEVEL (TRACE_OFF) |
Functions | |
void | pHeaderChecksumAccumulator (stream< AxisIp4 > &siL3MUX_Data, stream< AxisIp4 > &soICi_Data, stream< Ip4HdrCsum > &soICi_Csum) |
void | pIpChecksumInsert (stream< AxisIp4 > &siHCa_Data, stream< Ip4HdrCsum > &siHCa_Csum, stream< AxisIp4 > &soIAe_Data) |
void | pIp4AddressExtractor (Ip4Addr piMMIO_SubNetMask, Ip4Addr piMMIO_GatewayAddr, stream< AxisIp4 > &siICi_Data, stream< AxisIp4 > &soMAi_Data, stream< Ip4Addr > &soARP_LookupReq) |
void | pMacAddressInserter (EthAddr piMMIO_MacAddress, stream< AxisIp4 > &siIAe_Data, stream< ArpLkpReply > &siARP_LookupRsp, stream< AxisEth > &soL2MUX_Data) |
void | iptx (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_SubNetMask, Ip4Addr piMMIO_GatewayAddr, stream< AxisIp4 > &siL3MUX_Data, stream< AxisEth > &soL2MUX_Data, stream< Ip4Addr > &soARP_LookupReq, stream< ArpLkpReply > &siARP_LookupRep) |
Main process of the IP Transmitter Handler (IPTX). More... | |
void | iptx_top (EthAddr piMMIO_MacAddress, Ip4Addr piMMIO_SubNetMask, Ip4Addr piMMIO_GatewayAddr, stream< AxisRaw > &siL3MUX_Data, stream< AxisRaw > &soL2MUX_Data, stream< Ip4Addr > &soARP_LookupReq, stream< ArpLkpReply > &siARP_LookupRep) |
Top of IP Transmitter Handler (IPTX) More... | |
Variables | |
bool | gTraceEvent |
IP Transmitter packet handler (IPTX) of the Network Transport Stack (NTS).
void iptx | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_SubNetMask, | ||
Ip4Addr | piMMIO_GatewayAddr, | ||
stream< AxisIp4 > & | siL3MUX_Data, | ||
stream< AxisEth > & | soL2MUX_Data, | ||
stream< Ip4Addr > & | soARP_LookupReq, | ||
stream< ArpLkpReply > & | siARP_LookupRep | ||
) |
Main process of the IP Transmitter Handler (IPTX).
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_SubNetMask | The sub-network-mask from [MMIO]. |
[in] | piMMIO_GatewayAddr | The default gateway address from [MMIO]. |
[in] | siL3MUX_Data | The IP4 data stream from the L3 Multiplexer (L3MUX). |
[out] | soL2MUX_Data | The ETH data stream to the L2 Multiplexer (L2MUX). |
[out] | soARP_LookupReq | The IP4 address lookup request to AddressResolutionProtocol (ARP). |
[in] | siARP_LookupRep | The MAC address looked-up from [ARP]. |
: This process receives IP packets from the TCP-offload-engine (TOE), the Internet Control Message Protocol (ICMP) engine or the UDP Offload Engine (UOE). It first computes the IP header checksum and inserts it into the IP packet. Next, it extracts the IP_DA from the incoming data stream and forwards it to the Address Resolution Protocol server (ARP) in order to look up the corresponding MAC address. Final, an Ethernet header is created and is prepended to the outgoing IPv4 packet.
Definition at line 530 of file iptx.cpp.
void iptx_top | ( | EthAddr | piMMIO_MacAddress, |
Ip4Addr | piMMIO_SubNetMask, | ||
Ip4Addr | piMMIO_GatewayAddr, | ||
stream< AxisRaw > & | siL3MUX_Data, | ||
stream< AxisRaw > & | soL2MUX_Data, | ||
stream< Ip4Addr > & | soARP_LookupReq, | ||
stream< ArpLkpReply > & | siARP_LookupRep | ||
) |
Top of IP Transmitter Handler (IPTX)
[in] | piMMIO_MacAddress | The MAC address from MMIO (in network order). |
[in] | piMMIO_SubNetMask | The sub-network-mask from [MMIO]. |
[in] | piMMIO_GatewayAddr | The default gateway address from [MMIO]. |
[in] | siL3MUX_Data | The IP4 data stream from the L3 Multiplexer (L3MUX). |
[out] | soL2MUX_Data | The ETH data stream to the L2 Multiplexer (L2MUX). |
[out] | soARP_LookupReq | The IP4 address lookup request to AddressResolutionProtocol (ARP). |
[in] | siARP_LookupRep | The MAC address looked-up from [ARP]. |
ENTITY - IP TX HANDLER (IPTX)
Definition at line 676 of file iptx.cpp.
void pHeaderChecksumAccumulator | ( | stream< AxisIp4 > & | siL3MUX_Data, |
stream< AxisIp4 > & | soICi_Data, | ||
stream< Ip4HdrCsum > & | soICi_Csum | ||
) |
IPv4 Header Checksum Accumulator (HCa)
[in] | siL3MUX_Data | Data stream from the L3 Multiplexer (L3MUX). |
[out] | soICi_Data | Data stream to the IpChecksumInserter (ICi). |
[out] | soICi_Csum | IP header checksum. |
This process computes the IPv4 header checksum and forwards it to the next process which will insert it into the header of the incoming packet.
@Warning The IP header is formatted for transmission over a 64-bits interface which is logically divided into 8 lanes, with lane[0]=bits(7:0) and lane[7]=bits(63:56). The format of the incoming IPv4 header is then:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Frag Ofst (L) |Flags| FO(H) | Ident (L) | Ident (H) | Total Len (L) | Total Len (H) |Type of Service|Version| IHL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SA (LL) | SA (L) | SA (H) | SA (HH) | Hd Chksum (L) | Hd Chksum (H) | Protocol | Time to Live | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | DA (LL) | DA (L) | DA (H) | DA (HH) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Definition at line 107 of file iptx.cpp.
void pIp4AddressExtractor | ( | Ip4Addr | piMMIO_SubNetMask, |
Ip4Addr | piMMIO_GatewayAddr, | ||
stream< AxisIp4 > & | siICi_Data, | ||
stream< AxisIp4 > & | soMAi_Data, | ||
stream< Ip4Addr > & | soARP_LookupReq | ||
) |
IPv4 Address Extractor (IAe)
[in] | piMMIO_SubNetMask | The sub-network-mask from [MMIO]. |
[in] | piMMIO_GatewayAddrThe | default gateway address from [MMIO]. |
[in] | siICi_Data | The data stream from IpChecksumInserter ICi). |
[out] | soMAi_Data | The data stream to MacAddressInserter (MAi). |
[out] | soARP_LookupReq | IPv4 address lookup request to [ARP]. |
This process extracts the IP destination address from the incoming stream and forwards it to the Address Resolution Protocol server (ARP) in order to look up the corresponding MAC address.
Definition at line 320 of file iptx.cpp.
void pIpChecksumInsert | ( | stream< AxisIp4 > & | siHCa_Data, |
stream< Ip4HdrCsum > & | siHCa_Csum, | ||
stream< AxisIp4 > & | soIAe_Data | ||
) |
IP Checksum Inserter (ICi)
[in] | siHCa_Data | The data stream from HeaderChecksumAccumulator (HCa). |
[in] | siHCa_Csum | The computed IP header checksum from [HCa]. |
[out] | soIAe_Data | The data stream to IpAddressExtratcor (IAe). |
This process inserts the computed IP header checksum in the IPv4 packet being streamed on the data interface.
Definition at line 255 of file iptx.cpp.
void pMacAddressInserter | ( | EthAddr | piMMIO_MacAddress, |
stream< AxisIp4 > & | siIAe_Data, | ||
stream< ArpLkpReply > & | siARP_LookupRsp, | ||
stream< AxisEth > & | soL2MUX_Data | ||
) |
MAC Address Inserter (MAi)
[in] | piMMIO_MacAddress | My Ethernet MAC address from [MMIO]. |
[in] | siIAe_Data | The data stream from IpAddressExtractor (IAe). |
[out] | siARP_LookupRsp | MAC address looked-up from [ARP]. |
[in] | soL2MUX_Data | The data stream to [L2MUX]. |
This process prepends the appropriate Ethernet header to the outgoing IPv4 packet.
Definition at line 379 of file iptx.cpp.
|
extern |
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (TRACE_MAI | TRACE_ICA)
HELPERS FOR THE DEBUGGING TRACES .e.g: DEBUG_LEVEL = (MDL_TRACE | IPS_TRACE)
Definition at line 151 of file tb_nal.cpp.