Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
address_book.c File Reference

Address Book APDU dispatcher. More...

#include <string.h>
#include "os_apdu.h"
#include "os_helpers.h"
#include "os_print.h"
#include "os_utils.h"
#include "address_book.h"
#include "status_words.h"
#include "identity.h"
Include dependency graph for address_book.c:

Go to the source code of this file.

Detailed Description

Address Book APDU dispatcher.

Entry point for all Address Book sub-commands. Routes each APDU to the appropriate handler based on P1:

Chunked transport

Every sub-command uses the same chunked transport, regardless of payload size. The first chunk (P2=0x00) is prefixed with a 2-byte big-endian total payload length. Continuation chunks (P2=0x80) are appended directly. The function reassemble_chunks() accumulates the data and returns the assembled buffer. Once complete, the handler is then dispatched on P1. A uniform format keeps the protocol consistent and eases future payload-size evolutions.

Definition in file address_book.c.