# OpenSC API Reference

sc_format_apdu
3
opensc

# sc_format_apdu

Populate an APDU structure

## Synopsis

    #include <opensc.h>

    void sc_format_apdu(struct sc_card *card, sc_apdu_t *apdu,
                        int cse, int ins, int p1, int p2);

## Description

This function populates the sc_apdu_t structure pointed to by apdu on card. It does not allocate memory. The cse, ins, p1 and p2 parameters correspond to the respective APDU parameters as described in the ISO 7816 standard.