> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/madk__pp__protocol_8cpp.md).

# madk\_pp\_protocol.cpp

[Data Structures](#nested-classes) | [Macros](#define-members) | [Functions](#func-members)

`#include "`[madk\_pp\_protocol.h](/s-adk-5.1-programmers-guide/madk__pp__protocol_8h_source.md)`"` `#include "`[main.h](/s-adk-5.1-programmers-guide/main_8h_source.md)`"` `#include "`[filesystem.h](/s-adk-5.1-programmers-guide/filesystem_8h_source.md)`"` `#include "`[pathutil.h](/s-adk-5.1-programmers-guide/pathutil_8h_source.md)`"` `#include "`[pthreadutil.h](/s-adk-5.1-programmers-guide/pthreadutil_8h_source.md)`"` `#include "`[ui\_mode.h](/s-adk-5.1-programmers-guide/ui__mode_8h_source.md)`"` `#include "`[\_logf.h](/s-adk-5.1-programmers-guide/__logf_8h_source.md)`"` `#include "`[sys.h](/s-adk-5.1-programmers-guide/sys_8h_source.md)`"` `#include "`[sec.h](/s-adk-5.1-programmers-guide/sec_8h_source.md)`"` `#include "`[ped.h](/s-adk-5.1-programmers-guide/sdi_2src_2ped_8h_source.md)`"` `#include "card_dt.h"` `#include "epp/counterTop.h"` `#include <dlfcn.h>` `#include <sys/stat.h>` `#include "lib_mADK_PP_Prot/mADK_PP_Prot.h"`

Include dependency graph for madk\_pp\_protocol.cpp:

![](/files/PCoZdRLM0a7aWN0sTSKc)

|                 |                                                                                                                |
| --------------- | -------------------------------------------------------------------------------------------------------------- |
| Data Structures |                                                                                                                |
| class           | [ConnectionContext](/s-adk-5.1-programmers-guide/readme/annotated/class_connection_context.md)                 |
| struct          | [mADK\_PP\_Prot\_Loader](/s-adk-5.1-programmers-guide/readme/annotated/structm_a_d_k___p_p___prot___loader.md) |

|         |                                                                                                                            |
| ------- | -------------------------------------------------------------------------------------------------------------------------- |
| Macros  |                                                                                                                            |
| #define | [PROT\_TYPE\_VALID](#ab9bafea5a62aef8469d807060b6c26c2)(t)   ((t=='A' \|\| t=='B' \|\| t=='C' \|\| t=='D') ? true : false) |
| #define | [SDI\_COM\_LOG\_CHANNEL](#af39457e0edaaf4924748bee2ea7e61c0)   "SDICOM"                                                    |

|           |                                                                                                                  |
| --------- | ---------------------------------------------------------------------------------------------------------------- |
| Functions |                                                                                                                  |
| void      | [protocol\_status\_callback](#a68226f5dfe1781967a021e9de6ea34fe) (const struct ProtStatus \*status, void \*data) |

### MacroDefinition Documentation <a href="#macro-definition-documentation" id="macro-definition-documentation"></a>

### PROT\_TYPE\_VALID <a href="#ab9bafea5a62aef8469d807060b6c26c2" id="ab9bafea5a62aef8469d807060b6c26c2"></a>

\#define PROT\_TYPE\_VALID

### SDI\_COM\_LOG\_CHANNEL <a href="#af39457e0edaaf4924748bee2ea7e61c0" id="af39457e0edaaf4924748bee2ea7e61c0"></a>

\#define SDI\_COM\_LOG\_CHANNEL   \\"SDICOM\\"

### FunctionDocumentation <a href="#function-documentation" id="function-documentation"></a>

### protocol\_status\_callback() <a href="#a68226f5dfe1781967a021e9de6ea34fe" id="a68226f5dfe1781967a021e9de6ea34fe"></a>

void protocol\_status\_callback

callback function invoked by SDI protocol to notify SDI about new connection state. The callback function passes the protocol status, same as returned by [mADK\_PP\_Prot::get\_status()](/s-adk-5.1-programmers-guide/readme/annotated/classm_a_d_k___p_p___prot.md#ab830518e59100970fe386745510590f5) function. For more details, see description of mADK\_PP\_Prot\_GetStatus() and mADK\_PP\_Prot\_StatusCallback()

**Parameters**

\[in] **status** pointer to protocol status structure \[in] **data** application pointer (always NULL, recently unused)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/madk__pp__protocol_8cpp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
