13#ifndef CDI_ADAPTER_EFA_PROBE_H__
14#define CDI_ADAPTER_EFA_PROBE_H__
191 struct sockaddr_in source_address;
The declarations in this header file correspond to the definitions in adapter.c.
void(* MessageFromEndpoint)(void *param_ptr, Packet *packet_ptr, EndpointMessageType message_type)
Prototype of function used to process packet messages from the endpoint.
Definition adapter_api.h:105
The declarations in this header file correspond to the definitions in adapter.c.
CdiReturnStatus ProbeEndpointStart(ProbeEndpointHandle handle)
Definition adapter_efa_probe.c:215
ControlCommandType
This enumeration is used to define the type of command specified in the ControlCommand structure.
Definition adapter_efa_probe.h:177
@ kCommandTypeRxPacket
Command contains a packet SGL that was received using the control interface.
Definition adapter_efa_probe.h:179
@ kCommandTypeStateChange
Command contains a value from the ProbeState enumeration.
Definition adapter_efa_probe.h:178
CdiReturnStatus ProbeEndpointError(ProbeEndpointHandle handle)
Definition adapter_efa_probe.c:180
void ProbeEndpointStop(ProbeEndpointHandle handle)
Definition adapter_efa_probe.c:243
ProbeState
This enumeration is used in the TxEndpointProbeState and RxEndpointProbeState structures to indicate ...
Definition adapter_efa_probe.h:39
@ kProbeStateEfaProbe
Definition adapter_efa_probe.h:68
@ kProbeStateEfaStart
Definition adapter_efa_probe.h:64
@ kProbeStateWaitForStart
Definition adapter_efa_probe.h:60
@ kProbeStateDestroy
Endpoint is being destroyed.
Definition adapter_efa_probe.h:87
@ kProbeStateSendProtocolVersion
After ACK from reset has been received by Tx, send protocol version to Rx.
Definition adapter_efa_probe.h:48
@ kProbeStateIdle
Probe just started. Advance to kProbeStateSendReset.
Definition adapter_efa_probe.h:41
@ kProbeStateResetting
Definition adapter_efa_probe.h:52
@ kProbeStateEfaConnected
Definition adapter_efa_probe.h:76
@ kProbeStateResetDone
Definition adapter_efa_probe.h:56
@ kProbeStateSendReset
Definition adapter_efa_probe.h:45
@ kProbeStateEfaTxProbeAcks
The EFA Rx has received all the probe packets and now the TX is waiting to receive all the probe pack...
Definition adapter_efa_probe.h:71
@ kProbeStateEfaReset
Send a request to reset the connection to the Endpoint Manager and advance to the kProbeStateSendRese...
Definition adapter_efa_probe.h:84
@ kProbeStateEfaConnectedPing
Definition adapter_efa_probe.h:81
void ProbeEndpointDestroy(ProbeEndpointHandle handle)
Definition adapter_efa_probe.c:254
void ProbeEndpointReset(ProbeEndpointHandle handle)
Definition adapter_efa_probe.c:237
CdiReturnStatus ProbeEndpointResetDone(ProbeEndpointHandle handle)
Definition adapter_efa_probe.c:197
CdiReturnStatus ProbeEndpointCreate(AdapterEndpointHandle app_adapter_endpoint_handle, CdiLogHandle log_handle, ProbeEndpointHandle *ret_handle_ptr)
Definition adapter_efa_probe.c:111
ProbeEndpointState * ProbeEndpointHandle
Forward declaration to create pointer to probe connection state when used.
Definition adapter_efa_probe.h:32
CdiReturnStatus
Values used for API function return codes.
Definition cdi_core_api.h:189
pthread_mutex_t * CdiCsID
Define portable critical section.
Definition cdi_os_api.h:192
struct CdiThreadID_t * CdiThreadID
Define portable thread type. Separate name from type, otherwise the typedef that follows it will gene...
Definition cdi_os_api.h:312
This header file contains definitions of types and the one global variable used internally by the SDK...
The declarations in this header file correspond to the definitions in protcol.c.
ProbeCommand
This enumeration is used in the ProbePacketHeader structure to indicate a probe command....
Definition protocol.h:146
Structure used to hold adapter endpoint state.
Definition adapter_api.h:110
Structure used to hold state data for a single FIFO.
Definition fifo.c:32
Structure used to hold state data for a single log of any type (stdout, callback or file).
Definition logger.c:79
Structure used to hold negotiated protocol version information.
Definition protocol.h:242
This structure defines a scatter-gather list (SGL) which is used to represent an array of data compri...
Definition cdi_core_api.h:728
This structure represents a single, contiguous region of memory as part of a scatter-gather list.
Definition cdi_core_api.h:709
Structure used to hold a control command.
Definition adapter_efa_probe.h:185
ProbeState probe_state
Valid if kCommandTypeStateChange. Probe state to set.
Definition adapter_efa_probe.h:188
CdiSgList packet_sgl
Scatter-gather List for Rx packet.
Definition adapter_efa_probe.h:190
ControlCommandType command_type
Determines which data in the union is valid.
Definition adapter_efa_probe.h:186
Definition adapter_api.h:42
This defines a structure that contains all of the state information for the sending side of a single ...
Definition adapter_efa_probe.h:121
AdapterEndpointHandle app_adapter_endpoint_handle
Handle to the application's endpoint.
Definition adapter_efa_probe.h:125
void * app_msg_from_endpoint_param_ptr
Saved copy of original parameter.
Definition adapter_efa_probe.h:123
CdiLogHandle log_handle
Handle for the logging function.
Definition adapter_efa_probe.h:133
CdiProtocolHandle protocol_handle_v1
Protocol handle version 1.0.CDI_PROBE_VERSION.
Definition adapter_efa_probe.h:160
CdiThreadID probe_thread_id
Data for worker thread used for ProbeThread().
Definition adapter_efa_probe.h:136
CdiFifoHandle control_packet_fifo_handle
FIFO of control interface packet CdiSgList structures.
Definition adapter_efa_probe.h:139
MessageFromEndpoint app_msg_from_endpoint_func_ptr
Saved copy of original function pointer.
Definition adapter_efa_probe.h:122
uint8_t send_ack_probe_version
Probe protocol version supported by ACK receiver.
Definition adapter_efa_probe.h:155
ProbeCommand ack_command
Definition adapter_efa_probe.h:146
TxEndpointProbeState tx_probe_state
The internal state of the structure if app_adapter_endpoint_handle.direction is kEndpointDirectionSen...
Definition adapter_efa_probe.h:128
bool ack_is_pending
A command is in progress that expects an ack.
Definition adapter_efa_probe.h:145
uint16_t control_packet_num
Packet number used for each packet on the control interface.
Definition adapter_efa_probe.h:142
CdiCsID ack_lock
Provides a critical section for all ack data below.
Definition adapter_efa_probe.h:144
ProbeCommand send_ack_command
Command that needs to have an ACK returned.
Definition adapter_efa_probe.h:153
uint16_t send_ack_control_packet_num
Packet number for returned ACK.
Definition adapter_efa_probe.h:154
CdiProtocolHandle protocol_handle_sdk
Protocol handle of the current CDI-SDK version. See: CDI_PROTOCOL_VERSION.CDI_PROTOCOL_MAJOR_VERSION....
Definition adapter_efa_probe.h:159
bool send_ack_command_valid
If true, the data below is valid.
Definition adapter_efa_probe.h:152
RxEndpointProbeState rx_probe_state
The internal state of the structure if app_adapter_endpoint_handle.direction is kEndpointDirectionRec...
Definition adapter_efa_probe.h:130
uint16_t ack_control_packet_num
Packet number of the ack command being sent. NOTE: The size of this value must match the size of ack_...
Definition adapter_efa_probe.h:150
Structure used to hold a transmit packet work request. The lifespan of a work request starts when a p...
Definition adapter_efa_probe.h:168
Packet packet
The top level packet structure for the data in this work request.
Definition adapter_efa_probe.h:169
CdiRawProbeHeader packet_data
Data for the probe packet.
Definition adapter_efa_probe.h:171
CdiSglEntry sgl_entry
The single SGL entry for the probe packet (we only use 1 for all probe packets).
Definition adapter_efa_probe.h:170
This defines a structure that contains all of the state information for the receiving side of a singl...
Definition adapter_efa_probe.h:106
int packets_received_count
Number of probe packets that have been received.
Definition adapter_efa_probe.h:111
ProbeState rx_state
Definition adapter_efa_probe.h:107
int send_reset_retry_count
When in kProbeStateIdle or kProbeStateSendReset state, this is the number of consecutive reset comman...
Definition adapter_efa_probe.h:110
uint32_t total_packet_count_snapshot
Snapshot of total packet received count.
Definition adapter_efa_probe.h:112
This defines a structure that contains all of the state information for the sending side of a single ...
Definition adapter_efa_probe.h:93
ProbeState tx_state
Definition adapter_efa_probe.h:94
int packets_enqueued_count
Number of probe packets that have been enqueued to send.
Definition adapter_efa_probe.h:98
int packets_ack_wait_count
Number of times have waited for probe packets ACKs to arrive.
Definition adapter_efa_probe.h:100
int send_command_retry_count
When in kProbeStateEfaConnectedPing or kProbeStateSendProtocolVersion state, this is the number of co...
Definition adapter_efa_probe.h:97
int packets_acked_count
Number of probe packets that have been acked.
Definition adapter_efa_probe.h:99