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

: Definition of the types used by the Network Transport Stack (NTS) component of the cloudFPGA shell. More...

#include <hls_stream.h>
#include "AxisEth.hpp"
#include "AxisIp4.hpp"
Include dependency graph for nts_types.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SockAddr
 
class  LE_SockAddr
 
struct  fourTuple
 
class  SocketPair
 
class  LE_SocketPair
 
class  ArpBindPair
 
class  ArpLkpReply
 
class  FourTuple
 
class  CamSessionLookupRequest
 
class  CamSessionLookupReply
 
class  CamSessionUpdateRequest
 
class  CamSessionUpdateReply
 

Macros

#define NTS_OK   1
 
#define NTS_KO   0
 
#define OK   NTS_OK
 
#define KO   NTS_KO
 
#define CMD_INIT   1
 
#define CMD_DROP   1
 
#define CMD_KEEP   0
 
#define CMD_ENABLE   1
 
#define CMD_DISABLE   0
 
#define QUERY_RD   0
 
#define QUERY_WR   1
 
#define QUERY_INIT   1
 
#define QUERY_FAST_RETRANSMIT   true
 
#define FLAG_OFF   0
 
#define FLAG_ON   1
 
#define FLAG_OOO   true
 
#define FLAG_INO   false
 
#define LKP_HIT   true
 
#define LKP_NO_HIT   false
 
#define STS_OK   1
 
#define STS_KO   0
 
#define STS_OPENED   1
 
#define STS_CLOSED   0
 
#define STS_ERROR   1
 
#define STS_NO_ERR   0
 
#define ACK_ON   1
 
#define NO_ACK   0
 
#define ETH_BROADCAST_ADDR   0xFFFFFFFFFFFF
 
#define ETH_ETHERTYPE_IP4   0x0800
 
#define ETH_ETHERTYPE_ARP   0x0806
 
#define ARP_HTYPE_ETHERNET   0x0001
 
#define ARP_PTYPE_IPV4   0x0800
 
#define ARP_HLEN_ETHERNET   6
 
#define ARP_PLEN_IPV4   4
 
#define ARP_OPER_REQUEST   0x0001
 
#define ARP_OPER_REPLY   0x0002
 
#define IP4_BROADCAST_ADDR   0xFFFFFFFF
 
#define IP4_PROT_ICMP   0x01
 
#define IP4_PROT_TCP   0x06
 
#define IP4_PROT_UDP   0x11
 
#define FROM_RXe   0
 
#define FROM_TAi   1
 

Typedefs

typedef ap_uint< 1 > AckBit
 
typedef ap_uint< 1 > CmdBit
 
typedef ap_uint< 1 > ErrBit
 
typedef ap_uint< 1 > FlagBit
 
typedef ap_uint< 1 > RdWrBit
 
typedef ap_uint< 1 > ReqBit
 
typedef ap_uint< 1 > RepBit
 
typedef ap_uint< 1 > RspBit
 
typedef ap_uint< 1 > SigBit
 
typedef ap_uint< 1 > StsBit
 
typedef ap_uint< 1 > ValBit
 
typedef bool AckBool
 
typedef bool CmdBool
 
typedef bool FlagBool
 
typedef bool HitBool
 
typedef bool ReqBool
 
typedef bool RepBool
 
typedef bool RspBool
 
typedef bool SigBool
 
typedef bool StsBool
 
typedef bool ValBool
 
typedef ap_uint< 16 > SessionId
 
typedef ap_uint< 16 > TcpSessId
 
typedef ap_uint< 16 > LE_Ly4Port
 
typedef ap_uint< 16 > LE_Ly4Len
 
typedef ap_uint< 16 > Ly4Port
 
typedef ap_uint< 16 > Ly4Len
 
typedef Ip4Addr ArpLkpRequest
 
typedef ap_uint< 14 > RtlSessId
 
typedef ap_uint< 1 > LkpSrcBit
 

Enumerations

enum  TcpState {
  CLOSED =0 , SYN_SENT , SYN_RECEIVED , ESTABLISHED ,
  FIN_WAIT_1 , FIN_WAIT_2 , CLOSING , TIME_WAIT ,
  LAST_ACK
}
 
enum  TcpAppSndErr { NO_ERROR =0 , NO_SPACE , NO_CONNECTION }
 
enum  LkpOpBit { INSERT =0 , DELETE }
 

Functions

bool operator== (SockAddr const &s1, SockAddr const &s2)
 
bool operator< (fourTuple const &lhs, fourTuple const &rhs)
 
bool operator< (SocketPair const &s1, SocketPair const &s2)
 
bool operator< (LE_SocketPair const &s1, LE_SocketPair const &s2)
 
bool operator== (FourTuple const &s1, FourTuple const &s2)
 

Detailed Description

: Definition of the types used by the Network Transport Stack (NTS) component of the cloudFPGA shell.

System: : cloudFPGA Component : Shell Language : Vivado HLS

Remarks
: In telecommunications, a protocol data unit (PDU) is a single unit of information transmitted among peer entities of a computer network. A PDU is therefore composed of a protocol specific control information (e.g a header) and a user data section. This source code uses the following terminology:
  • a SEGMENT (or TCP Packet) refers to the TCP protocol data unit.
  • a PACKET (or IP Packet) refers to the IP protocol data unit.
  • a FRAME (or MAC Frame) refers to the Ethernet data link layer.

Definition in file nts_types.hpp.