API
API
Define the following APIs using the __stdcall (WINAPI) calling convention.
| API Name | Function |
|---|---|
| UserCallOut_GetUserCfg | Get callout custom parameters |
| UserCallOut_SetUserCfg | Set callout custom parameters |
| UserCallOut_ChInit | Initialize channel information |
| UserCallOut_ChDeInit | Deinitialize channel information |
| UserCallOut_MonStart | Monitor start notification |
| UserCallOut_CreMacDaPreFixReq | Request prefix data for transmit MAC generation |
| UserCallOut_CreMacDaPostFixReq | Request postfix data for transmit MAC generation |
| UserCallOut_TruncatedFvReq | Request truncated FV |
| UserCallOut_MacDaPreFixReq | Request prefix data for verification MAC generation |
| UserCallOut_MacDaPostFixReq | Request postfix data for verification MAC generation |
| UserCallOut_AfterMacVerify | Notify MAC verification result |
| UserCallOut_AfterTransMsg | Notify completion of MAC transmit request |
| UserCallOut_MonStop | Monitor stop notification |
Each API is described in the following format.
For return values, all APIs should return DWORD MPX_COUT_OK (see constant definition: error codes).
| Item | Content | |||
|---|---|---|---|---|
| Format | <API type> <API name>(<arguments>, ...) | |||
| Arguments | <Argument type> (*1) | (<Argument name>) | <in/out> (*2) | <Argument description> |
| Function | <Function description> | |||
| Called | <When the API is called> | |||
| Notes | <Supplemental notes> | |||
1: For values set to/from structures, refer to Structure Definitions.
2: in means value is set before calling; out means value is set by function processing.
UserCallOut_GetUserCfg
Notifies the security plugin of callout custom parameters.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_GetUserCfg ( StCustomParamCfg CalloutCfgs[] , LPDWORD CfgNum ) | |||
| Arguments | StCustomParamCfg [] | CalloutCfgs | out | Array of parameter information |
| LPDWORD | CfgNum | out | Number of parameter information elements | |
| Function | Notifies the security plugin of callout custom parameters. | |||
| Called | Called when Callout Custom Param Setting dialog is displayed. | |||
UserCallOut_SetUserCfg
Receives callout custom parameters from the security plugin.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_SetUserCfg ( StCustomParamCfg CalloutCfgs[] , DWORD CfgNum ) | |||
| Arguments | StCustomParamCfg [] | CalloutCfgs | in | Array of parameter information |
| LPDWORD | CfgNum | in | Number of parameter information elements | |
| Function | Receives callout custom parameters from the security plugin. | |||
| Called | Called when OK is clicked in Callout Custom Param Setting dialog. | |||
UserCallOut_ChInit
Performs channel-specific initialization.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_ChInit ( DWORD Ch , DWORD InnerCh ) | |||
| Arguments | DWORD | Ch | in | Channel |
| DWORD | InnerCh | in | Internal channel | |
| Function | Performs channel-specific initialization. | |||
| Called | Called once per channel immediately before starting TX/RX threads for each channel at monitor start. | |||
UserCallOut_ChDeInit
Performs channel-specific deinitialization.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_ChDeInit ( DWORD Ch , DWORD InnerCh ) | |||
| Arguments | DWORD | Ch | in | Channel |
| DWORD | InnerCh | in | Internal channel | |
| Function | Performs channel-specific deinitialization. | |||
| Called | Called once per channel immediately before stopping TX/RX threads for each channel at monitor stop. | |||
UserCallOut_MonStart
Notifies monitor start.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_MonStart ( DWORD Ch , DWORD InnerCh , DWORD ThreadType , StMsgConfig PrefixCfg , StMsgConfig PostfixCfg ) | |||
| Arguments | DWORD | Ch | in | Channel |
| DWORD | InnerCh | in | Internal channel | |
| DWORD | ThreadType | in | Caller thread | |
| StMsgConfig | PrefixCfg | in | Prefix security settings | |
| StMsgConfig | PostfixCfg | in | Postfix security settings | |
| Function | Notifies monitor start. | |||
| Called | Called from TX and RX threads of each channel where message authentication is enabled at monitor start. | |||
| Notes | For values of ThreadType, refer to Thread Type constants. | |||
UserCallOut_CreMacDaPreFixReq
Requests prefix used for transmit-side MAC generation.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_CreMacDaPreFixReq ( StFrameCfg FrameCfg , StFrameInfo FrameInfo , LPBYTE Prefix , LPDWORD PrefixLen ) | |||
| Arguments | StFrameCfg | FrameCfg | in | Transmit frame configuration information |
| StFrameInfo | FrameInfo | in | Transmit frame information | |
| LPBYTE | Prefix | out | Pointer to prefix output buffer | |
| LPDWORD | PrefixLen | out | Pointer to prefix data length output (byte unit) | |
| Function | Requests prefix used for transmit-side MAC generation. | |||
| Called | Called from TX thread before MAC generation during transmit message creation. | |||
UserCallOut_CreMacDaPostFixReq
Requests postfix used for transmit-side MAC generation.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_CreMacDaPostFixReq ( StFrameCfg FrameCfg , StFrameInfo FrameInfo , LPBYTE Postfix , LPDWORD PostfixLen ) | |||
| Arguments | StFrameCfg | FrameCfg | in | Transmit frame configuration information |
| StFrameInfo | FrameInfo | in | Transmit frame information | |
| LPBYTE | Postfix | out | Pointer to postfix output buffer | |
| LPDWORD | PostfixLen | out | Pointer to postfix data length output (byte unit) | |
| Function | Requests postfix used for transmit-side MAC generation. | |||
| Called | Called from TX thread before MAC generation during transmit message creation. | |||
UserCallOut_TruncatedFvReq
Requests truncated FV to be placed in the message.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_TruncatedFvReq ( StFrameCfg FrameCfg , StFrameInfo FrameInfo , StPrePostData Prefix , StPrePostData Postfix , LPBYTE TruncatedFv , LPDWORD TruncatedFvLen ) | |||
| Arguments | StFrameCfg | FrameCfg | in | Transmit frame configuration information |
| StFrameInfo | FrameInfo | in | Transmit frame information | |
| StPrePostData | Prefix | in | Prefix used for MAC generation | |
| StPrePostData | Postfix | in | Postfix used for MAC generation | |
| LPBYTE | TruncatedFv | out | Pointer to truncated FV output buffer | |
| LPDWORD | TruncatedFvLen | out | Pointer to truncated FV data length output (byte unit) | |
| Function | Requests truncated FV to be placed in the message. | |||
| Called | Called from TX thread immediately before transmit request to MicroPeckerX. | |||
UserCallOut_MacDaPreFixReq
Requests prefix used for verification-side MAC generation.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_MacDaPreFixReq ( DWORD VeryAttemptCnt , StFrameCfg FrameCfg , StFrameInfo FrameInfo , LPBYTE Prefix , LPDWORD PrefixLen ) | |||
| Arguments | DWORD | VeryAttemptCnt | in | Verification attempt count |
| StFrameCfg | FrameCfg | in | Transmit frame configuration information | |
| StFrameInfo | FrameInfo | in | Transmit frame information | |
| LPBYTE | Prefix | out | Pointer to prefix output buffer | |
| LPDWORD | PrefixLen | out | Pointer to prefix data length output (byte unit) | |
| Function | Requests prefix used for verification-side MAC generation. | |||
| Called | Called from monitor thread before MAC verification. | |||
UserCallOut_MacDaPostFixReq
Requests postfix used for verification-side MAC generation.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_MacDaPostFixReq ( DWORD VeryAttemptCnt , StFrameCfg FrameCfg , StFrameInfo FrameInfo , LPBYTE Postfix , LPDWORD PostfixLen ) | |||
| Arguments | DWORD | VeryAttemptCnt | in | Verification attempt count |
| StFrameCfg | FrameCfg | in | Transmit frame configuration information | |
| StFrameInfo | FrameInfo | in | Transmit frame information | |
| LPBYTE | Postfix | out | Pointer to postfix output buffer | |
| LPDWORD | PostfixLen | out | Pointer to postfix data length output (byte unit) | |
| Function | Requests postfix used for verification-side MAC generation. | |||
| Called | Called from monitor thread before MAC verification. | |||
UserCallOut_AfterMacVerify
Notifies MAC verification result.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_AfterMacVerify ( StFrameCfg FrameCfg , StFrameInfo FrameInfo , StPrePostData Prefix , StPrePostData Postfix , DWORD VerifyResult ) | |||
| Arguments | StFrameCfg | FrameCfg | in | Transmit frame configuration information |
| StFrameInfo | FrameInfo | in | Transmit frame information | |
| StPrePostData | Prefix | in | Prefix used for MAC generation | |
| StPrePostData | Postfix | in | Postfix used for MAC generation | |
| DWORD | VerifyResult | in | MAC verification result | |
| Function | Notifies MAC verification result. | |||
| Called | Called from monitor thread after MAC verification. | |||
UserCallOut_AfterTransMsg
Notifies completion of MAC transmit request.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_AfterTransMsg ( StFrameCfg FrameCfg , StFrameInfo FrameInfo ) | |||
| Arguments | StFrameCfg | FrameCfg | in | Transmit frame configuration information |
| StFrameInfo | FrameInfo | in | Transmit frame information | |
| Function | Notifies completion of MAC transmit request. | |||
| Called | Called immediately after transmit request to MicroPeckerX. | |||
UserCallOut_MonStop
Notifies monitor stop.
| Item | Content | |||
|---|---|---|---|---|
| Format | DWORD UserCallOut_MonStop ( DWORD Ch , DWORD InnerCh , DWORD ThreadType , StMsgConfig PrefixCfg , StMsgConfig PostfixCfg ) | |||
| Arguments | DWORD | Ch | in | Channel |
| DWORD | InnerCh | in | Internal channel | |
| DWORD | ThreadType | in | Caller thread | |
| StMsgConfig | PrefixCfg | in | Prefix security settings | |
| StMsgConfig | PostfixCfg | in | Postfix security settings | |
| Function | Notifies monitor stop. | |||
| Called | Called from TX and RX threads of each channel where message authentication is enabled at monitor stop. | |||
| Notes | For values of ThreadType, refer to Thread Type constants. | |||