TrustCore SDK NanoSec API reference  version 7.0
Callback Functions

Customizable EAP callbacks. More...

Variables

MSTATUS(* eapMethodDef_t::funcPtr_llTransmitPacket )(ubyte *app_session_handle, eapHdr_t *eap_hdr, ubyte *eap_data, ubyte4 eap_data_len)
 Transmit (send) an EAP packet out through the lower (physical) layer. More...
 
MSTATUS(* eapMethodDef_t::funcPtr_ulGetDecision )(ubyte *app_session_handle, ubyte4 *decision)
 Enable customized accounting. More...
 
MSTATUS(* eapMethodDef_t::funcPtr_ulGetMethodstate )(ubyte *app_session_handle, ubyte4 *methodState)
 Enable customized accounting. More...
 
MSTATUS(* eapMethodDef_t::funcPtr_ulMICVerify )(ubyte *app_session_handle, ubyte *pkt, ubyte4 pkt_len)
 Verify a packet's MIC (message integrity code). More...
 
MSTATUS(* eapMethodDef_t::funcPtr_ulReceiveCallback )(ubyte *app_session_handle, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)
 Process received EAP messages. More...
 
MSTATUS(* eapMethodDef_t::funcPtr_ulReceiveIndication )(ubyte *app_session_handle, eapIndication ind_type, ubyte *data, ubyte4 data_len)
 Notify the upper layer that an error has occurred or that reauthorization is needed. More...
 
MSTATUS(* eapMethodDef_t::funcPtr_ulReceivePassthruCallback )(ubyte *app_session_handle, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)
 Receive EAP packets in passthrough mode. More...
 
MSTATUS(* eapSimConfig::getAKARes )(void *appCb, void *eapSim, ubyte *rand, ubyte *autn, ubyte *ik, ubyte *ck, ubyte *Res, ubyte2 *resLen, ubyte *auts)
 Get AKA IK and CK values from the application. More...
 
MSTATUS(* eapSimConfig::getSresKc )(void *appCb, void *eapSim, ubyte *rand, ubyte numRand, ubyte *Sres, ubyte *Kc)
 Get SRES and KC values from application. More...
 
MSTATUS(* EAP_PEAP_params::ul2ndStageReceive )(ubyte *appSessionCB, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)
 Process received EAP messages. More...
 
MSTATUS(* EAP_TTLS_params::ul2ndStageReceive )(ubyte *app_session_handle, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)
 Process received EAP messages. More...
 
MSTATUS(* EAP_FAST_params::ul2ndStageReceive )(ubyte *appSessionCB, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)
 Process received EAP messages. More...
 
MSTATUS(* EAP_PEAP_params::ulAuthResultTransmit )(ubyte *appSessionCB, eapAuthStatus authStatus)
 Send the inner method authentication status. More...
 
MSTATUS(* EAP_TTLS_params::ulAuthResultTransmit )(ubyte *appSessionCB, eapAuthStatus authStatus)
 Send the inner method authentication status. More...
 
MSTATUS(* EAP_FAST_params::ulAuthResultTransmit )(ubyte *appSessionCB, ubyte cryptoBindingVerified, eapAuthStatus authStatus)
 Send the inner method authentication status. More...
 
MSTATUS(* EAP_TTLS_params::ulAuthTransmit )(ubyte *appSessionCB, ubyte *eapTTLSCb, ubyte *pkt, ubyte4 pktLen)
 Send a fully formed RADIUS packet for authentication. More...
 
MSTATUS(* EAP_FAST_params::ulGetFastCompoundKey )(ubyte *appSessionCB, ubyte *cmk)
 Get compound session key (CMK). More...
 
MSTATUS(* EAP_FAST_params::ulGetPeapV2CompoundKey )(ubyte *appSessionCB, ubyte *cmk, ubyte *s_nonce, ubyte *c_nonce)
 Get compound session key. More...
 
MSTATUS(* EAP_FAST_params::ulTLSclose )(ubyte *appSessionCB)
 Close the TLS tunnel. More...
 
MSTATUS(* EAP_PEAP_params::ulTransmit )(ubyte *appSessionCB, ubyte *eapPkt, ubyte4 eapPktLen, intBoolean encrypted)
 Send a plain text inner method payload to the application (for further encryption and transmittal). More...
 
MSTATUS(* EAP_TTLS_params::ulTransmit )(ubyte *appSessionCB, ubyte *eapPkt, ubyte4 eapPktLen, intBoolean encrypted)
 Send a plain text inner method payload to the application (for further encryption and transmittal). More...
 
MSTATUS(* EAP_FAST_params::ulTransmit )(ubyte *appSessionCB, ubyte *eapPkt, ubyte4 eapPktLen, intBoolean encrypted)
 Send a plain text inner method payload to the application (for further encryption and transmittal). More...
 

Detailed Description

Variable Documentation

◆ funcPtr_llTransmitPacket

MSTATUS(* eapMethodDef_t::funcPtr_llTransmitPacket) (ubyte *app_session_handle, eapHdr_t *eap_hdr, ubyte *eap_data, ubyte4 eap_data_len)

This callback function is provided to transmit (send) an EAP packet out through the lower (physical) layer.

Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to the session's callback pointer in the eapMethodDef structure.

Since
1.41
Version
1.41 and later

To enable this callback, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__
  • __ENABLE_MOCANA_EAP_AUTH__
Parameters
app_session_handleCookie given by the application to identify the session.
eap_hdrPointer to EAP header.
eap_dataPointer to EAP payload.
eap_data_lenNumber of bytes in eap_data.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap.h

◆ funcPtr_ulGetDecision

MSTATUS(* eapMethodDef_t::funcPtr_ulGetDecision) (ubyte *app_session_handle, ubyte4 *decision)

This callback function is provided to enable customized accounting.

Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to the session's callback pointer in the eapMethodDef structure.

Since
1.41
Version
1.41 and later

To enable this callback, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__
  • __ENABLE_MOCANA_EAP_AUTH__
Parameters
app_session_handleCookie given by the application to identify the session.
decisionPointer to current decision value.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap.h

◆ funcPtr_ulGetMethodstate

MSTATUS(* eapMethodDef_t::funcPtr_ulGetMethodstate) (ubyte *app_session_handle, ubyte4 *methodState)

This callback function is provided to enable customized accounting.

Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to the session's callback pointer in the eapMethodDef structure.

Since
1.41
Version
1.41 and later

To enable this callback, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__
  • __ENABLE_MOCANA_EAP_AUTH__
Parameters
app_session_handleCookie given by the application to identify the session.
methodStatePointer to current state machine value.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap.h

◆ funcPtr_ulMICVerify

MSTATUS(* eapMethodDef_t::funcPtr_ulMICVerify) (ubyte *app_session_handle, ubyte *pkt, ubyte4 pkt_len)

This callback function is provided to verify a packet's MIC (message integrity code).

Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to the session's callback pointer in the eapMethodDef structure.

Since
1.41
Version
1.41 and later

To enable this callback, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__
  • __ENABLE_MOCANA_EAP_AUTH__
Parameters
app_session_handleCookie given by the application to identify the session.
pktPointer to packet.
pkt_lenNumber of bytes in pkt.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap.h

◆ funcPtr_ulReceiveCallback

MSTATUS(* eapMethodDef_t::funcPtr_ulReceiveCallback) (ubyte *app_session_handle, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)

This callback function is provided to process received EAP messages.

Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to the session's callback pointer in the eapMethodDef structure.

Since
1.41
Version
1.41 and later

To enable this callback, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__
  • __ENABLE_MOCANA_EAP_AUTH__
Parameters
app_session_handleCookie given by the application to identify the session.
typeAny of the eapMethodType enumerated values (see eap_proto.h).
codeAny of the eapCode enumerated values (see eap_proto.h).
idEAP packet id.
eap_dataPointer to EAP payload.
eap_data_lenLength of EAP payload.
opaque_dataPointer to any opaque data — extra data that's passed from the lower layer to the upper (method) layer through the EAP stack.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap.h

◆ funcPtr_ulReceiveIndication

MSTATUS(* eapMethodDef_t::funcPtr_ulReceiveIndication) (ubyte *app_session_handle, eapIndication ind_type, ubyte *data, ubyte4 data_len)

This callback function is provided to notify the upper layer that one of the following errors occurred:

  • TIMEOUT — No data received by NanoEAP within the time configured at EAP session creation
  • ERROR — Error number (as defined in merrors.h)
  • REAUTH — Packet received for reauthorization

Your application must interpret the data returned through the data parameter based on the indication type.

Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to the session's callback pointer in the eapMethodDef structure.

Since
1.41
Version
1.41 and later

To enable this callback, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__
  • __ENABLE_MOCANA_EAP_AUTH__
Parameters
app_session_handleCookie given by the application to identify the session.
ind_typeAny of the eapIndication enumerated values (see eap_proto.h).
dataData specific to the indication type.
data_lenNumber of bytes in data.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap.h

◆ funcPtr_ulReceivePassthruCallback

MSTATUS(* eapMethodDef_t::funcPtr_ulReceivePassthruCallback) (ubyte *app_session_handle, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)

This callback function is provided to receive EAP packets from the EAP layer in passthrough mode. The complete packet, including the EAP header, is passed to this function.

Callback registration happens at session creation and initialization by assigning your custom callback function (which can have any name) to the session's callback pointer in the eapMethodDef structure.

Since
1.41
Version
1.41 and later

To enable this callback, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__
  • __ENABLE_MOCANA_EAP_AUTH__
Parameters
app_session_handleCookie given by the application to identify the session.
typeAny of the eapMethodType enumerated values (see eap_proto.h).
codeAny of the eapCode enumerated values (see eap_proto.h).
idEAP packet ID.
eap_dataPointer to EAP payload.
eap_data_lenNumber of bytes in eap_data.
opaque_dataPointer to any opaque data to be passed from lower layer.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap.h

◆ getAKARes

MSTATUS(* eapSimConfig::getAKARes) (void *appCb, void *eapSim, ubyte *rand, ubyte *autn, ubyte *ik, ubyte *ck, ubyte *Res, ubyte2 *resLen, ubyte *auts)

This function gets AKA IK and CK values from the application.

Since
1.41
Version
2.02 and later

To enable this callback function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_SIM__
  • __ENABLE_MOCANA_EAP_PEER__
Parameters
appCbApplication Handle.
eapSimEAP-SIM Handle.
rand128 bit random number.
autn128bit AUTN Value.
ikoutput IK value.
ckoutput CK value.
Res32 to 128 RES value.
resLenLength of Res.
auts112 bits AUTS value.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_sim.h

◆ getSresKc

MSTATUS(* eapSimConfig::getSresKc) (void *appCb, void *eapSim, ubyte *rand, ubyte numRand, ubyte *Sres, ubyte *Kc)

This function gets SRES and KC values from application.

Since
1.41
Version
2.02 and later

To enable this callback function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_SIM__
  • __ENABLE_MOCANA_EAP_PEER__
Parameters
appCbApplication Handle.
eapSimEAP-SIM Handle.
randArray of Random Value.
numRandNumber of elements in rand.
SresSRES value returned by the application.
KcKC value returned by the application.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_sim.h

◆ ul2ndStageReceive [1/3]

MSTATUS(* EAP_PEAP_params::ul2ndStageReceive) (ubyte *appSessionCB, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)

This callback function is provided to process received EAP messages. It is called by the inner EAP message processing if the inner TTLS method is EAP in order to provide application-specific data. Once the application is done processing the inner EAP method, the application should call EAP_TTLSulPeerTransmit to send the payload using the inner EAP session.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBCookie given by the application to identify the session.
typeAny of the eapMethodType enumerated values (see eap_proto.h).
codeAny of the eapCode enumerated values (see eap_proto.h).
idEAP packet id.
eap_dataPointer to EAP payload.
eap_data_lenLength of EAP payload.
opaque_dataPointer to any opaque data — extra data that's passed from the lower layer to the upper (method) layer through the EAP stack.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_peap.h

◆ ul2ndStageReceive [2/3]

MSTATUS(* EAP_TTLS_params::ul2ndStageReceive) (ubyte *app_session_handle, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)

This callback function is provided to process received EAP messages. It is called by the inner EAP message processing if the inner TTLS method is EAP in order to provide application-specific data. Once the application is done processing the inner EAP method, the application should call EAP_TTLSulPeerTransmit to send the payload using the inner EAP session.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
app_session_handleCookie given by the application to identify the session.
typeAny of the eapMethodType enumerated values (see eap_proto.h).
codeAny of the eapCode enumerated values (see eap_proto.h).
idEAP packet id.
eap_dataPointer to EAP payload.
eap_data_lenLength of EAP payload.
opaque_dataPointer to any opaque data — extra data that's passed from the lower layer to the upper (method) layer through the EAP stack.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_ttls.h

◆ ul2ndStageReceive [3/3]

MSTATUS(* EAP_FAST_params::ul2ndStageReceive) (ubyte *appSessionCB, eapMethodType type, eapCode code, ubyte id, ubyte *eap_data, ubyte4 eap_data_len, ubyte *opaque_data)

This callback function is provided to process received EAP messages. It is called by the inner EAP message processing if the inner TTLS method is EAP in order to provide application-specific data. Once the application is done processing the inner EAP method, the application should call EAP_TTLSulPeerTransmit to send the payload using the inner EAP session.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBCookie given by the application to identify the session.
typeAny of the eapMethodType enumerated values (see eap_proto.h).
codeAny of the eapCode enumerated values (see eap_proto.h).
idEAP packet id.
eap_dataPointer to EAP payload.
eap_data_lenLength of EAP payload.
opaque_dataPointer to any opaque data — extra data that's passed from the lower layer to the upper (method) layer through the EAP stack.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_fast.h

◆ ulAuthResultTransmit [1/3]

MSTATUS(* EAP_PEAP_params::ulAuthResultTransmit) (ubyte *appSessionCB, eapAuthStatus authStatus)

This callback function is used to send the inner (second stage) method authenticatation status to the application, which in turn sets the outer (first stage) EAP session status.

For example, if the inner method receives an EAP_AUTH_SUCCESS or EAP_AUTH_FAILURE (which are eapAuthStatus enumerations defined in eap_proto.h), the application must be informed of the authentication status. Once informed, the application can set the state machine (methodState) and decision (decision) values.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
authStatusAny of the eapAuthStatus enumerated values (defined in eap_proto.h).
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_peap.h

◆ ulAuthResultTransmit [2/3]

MSTATUS(* EAP_TTLS_params::ulAuthResultTransmit) (ubyte *appSessionCB, eapAuthStatus authStatus)

This callback function is used to send the inner (second stage) method authenticatation status to the application, which in turn sets the outer (first stage) EAP session status.

For example, if the inner method receives an EAP_AUTH_SUCCESS or EAP_AUTH_FAILURE (which are eapAuthStatus enumerations defined in eap_proto.h), the application must be informed of the authentication status. Once informed, the application can set the state machine (methodState) and decision (decision) values.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
authStatusAny of the eapAuthStatus enumerated values (defined in eap_proto.h).
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_ttls.h

◆ ulAuthResultTransmit [3/3]

MSTATUS(* EAP_FAST_params::ulAuthResultTransmit) (ubyte *appSessionCB, ubyte cryptoBindingVerified, eapAuthStatus authStatus)

This callback function is used to send the inner (second stage) method authenticatation status to the application, which in turn sets the outer (first stage) EAP session status.

For example, if the inner method receives an EAP_AUTH_SUCCESS or EAP_AUTH_FAILURE (which are eapAuthStatus enumerations defined in eap_proto.h), the application must be informed of the authentication status. Once informed, the application can set the state machine (methodState) and decision (decision) values.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
cryptoBindingVerifiedStatus of crypto binding attempt. TRUE == success. FALSE == failure.
authStatusAny of the eapAuthStatus enumerated values (defined in eap_proto.h).
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_fast.h

◆ ulAuthTransmit

MSTATUS(* EAP_TTLS_params::ulAuthTransmit) (ubyte *appSessionCB, ubyte *eapTTLSCb, ubyte *pkt, ubyte4 pktLen)

This callback function is used by the EAP TTLS authenticator to send a fully formed RADIUS packet for authentication.

When the RADIUS server returns the response, your application should call EAP_TTLSProcessRadiusAuthResponse to process the response.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
eapTTLSCbEAP-TTLS session handle returned from EAP_TTLSinitSession.
pktPointer to packet to send for authentication.
pktLenNumber of bytes in packet to send (pkt).
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_ttls.h

◆ ulGetFastCompoundKey

MSTATUS(* EAP_FAST_params::ulGetFastCompoundKey) (ubyte *appSessionCB, ubyte *cmk)

This callback is used by the EAP-FAST method implementation to get the compound session key(CMK) from the application. The CMK is used to calculate the Compound MAC as part of the Crypto-Binding TLV, which helps provide assurance that the same entities are involved in all communications in EAP-FAST.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBCookie given by the application to identify the session.
cmkPointer to compund session key.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_fast.h

◆ ulGetPeapV2CompoundKey

MSTATUS(* EAP_FAST_params::ulGetPeapV2CompoundKey) (ubyte *appSessionCB, ubyte *cmk, ubyte *s_nonce, ubyte *c_nonce)

This callback is similar to ulGetFastCompoundKey, but it is needed if the method type is EAP-PEAP instead of EAP-FAST. This call back takes 2 additional parameters viz. s_nonce which is server nonce and c_nonce which is client nonce. these nonce values are used in calculation of CMK.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBCookie given by the application to identify the session.
cmkPointer to compund session key.
s_nonceServer nonce used to calculate CMK.
c_nonceClient nonce used to calculate CMK.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_fast.h

◆ ulTLSclose

MSTATUS(* EAP_FAST_params::ulTLSclose) (ubyte *appSessionCB)

This callback takes an application handle and closes the TLS tunnel. This is applicable if the session type is EAP_SESSION_TYPE_AUTHENTICATOR.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_fast.h

◆ ulTransmit [1/3]

MSTATUS(* EAP_PEAP_params::ulTransmit) (ubyte *appSessionCB, ubyte *eapPkt, ubyte4 eapPktLen, intBoolean encrypted)

This callback function sends a plain text inner method payload to the application (which will then further encrypt the message and send out the payload).

If the encrypted parameter value is TRUE, which occurs when the inner method is sending an ACK or handling fragmented packets, the application does not need to encrypt the payload.

However, if the encrypted parameter value is FALSE, indicating that the payload is not yet encrypted, this callback should encrypt the payload (TTLS Attribute Value Pairs, such as EAP or UserName/Password) using the lower layer TLS connection and then send the packet using the outer EAP ulTransmit.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
eapPktPointer to plain text inner method payload to send.
eapPktLenNumber of bytes in payload to send (eapPkt).
encryptedTRUE if the payload to send is encrypted; FALSE otherwise.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_peap.h

◆ ulTransmit [2/3]

MSTATUS(* EAP_TTLS_params::ulTransmit) (ubyte *appSessionCB, ubyte *eapPkt, ubyte4 eapPktLen, intBoolean encrypted)

This callback function sends a plain text inner method payload to the application (which will then further encrypt the message and send out the payload).

If the encrypted parameter value is TRUE, which occurs when the inner method is sending an ACK or handling fragmented packets, the application does not need to encrypt the payload.

However, if the encrypted parameter value is FALSE, indicating that the payload is not yet encrypted, this callback should encrypt the payload (TTLS Attribute Value Pairs, such as EAP or UserName/Password) using the lower layer TLS connection and then send the packet using the outer EAP ulTransmit.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
eapPktPointer to plain text inner method payload to send.
eapPktLenNumber of bytes in payload to send (eapPkt).
encryptedTRUE if the payload to send is encrypted; FALSE otherwise.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_ttls.h

◆ ulTransmit [3/3]

MSTATUS(* EAP_FAST_params::ulTransmit) (ubyte *appSessionCB, ubyte *eapPkt, ubyte4 eapPktLen, intBoolean encrypted)

This callback function sends a plain text inner method payload to the application (which will then further encrypt the message and send out the payload).

If the encrypted parameter value is TRUE, which occurs when the inner method is sending an ACK or handling fragmented packets, the application does not need to encrypt the payload.

However, if the encrypted parameter value is FALSE, indicating that the payload is not yet encrypted, this callback should encrypt the payload (TTLS Attribute Value Pairs, such as EAP or UserName/Password) using the lower layer TLS connection and then send the packet using the outer EAP ulTransmit.

Since
1.41
Version
1.41 and later

There are no flag dependencies to enable this callback.

Parameters
appSessionCBApplication-specific session identifier.
eapPktPointer to plain text inner method payload to send.
eapPktLenNumber of bytes in payload to send (eapPkt).
encryptedTRUE if the payload to send is encrypted; FALSE otherwise.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

eap_fast.h