freefare_error(3)

freefare_error3

Error reporting functions.

Usage

#include <freefare.h>

const char *

freefare_strerror(MifareTag tag);

int

freefare_strerror_r(MifareTag tag, char *buffer, size_t len);

void

freefare_strerror(MifareTag tag, char *string);

uint8_t

mifare_desfire_last_pcd_error(MifareTag tag);

uint8_t

mifare_desfire_last_picc_error(MifareTag tag);

Library

Mifare card manipulation library (libfreefare, -lfreefare)

Overview

The freefare_strerror() functions returns the error string corresponding to the last PCD or PICC error encounred using tag.

The freefare_strerror_r() functions does the same as freefare_strerror() but the error message is copied into buffer for a maximum size of len chars.

The freefare_strerror() function displays the last PCD or PICC error encounred using tag to stderr.

The mifare_desfire_last_pcd_error() function returns the error code of the last function call from the library.

The mifare_desfire_last_picc_error() function returns the error code returned by the last command run on tag.

Return values

freefare_strerror() returns the error message, freefare_strerror_r() returns 0 on success, -1 on failure; mifare_desfire_last_pcd_error() and mifare_desfire_last_picc_error() return an error code or 0 if no error occured or if tag is not a Mifare DESFire target.

Releases

Unchanged in 6 releases since Debian 8 (Jessie).

  1. 8–13

Authors

Romain Tartiere ⟨[email protected]⟩

From libfreefare-doc 0.4.0-2.3 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.