freefare_get_tags(3) freefare_get_tag_friendly_name

Other Alias

freefare_get_tag_type

LIBRARY

Mifare card manipulation library (libfreefare, -lfreefare)

SYNOPSIS

In freefare.h Ft MifareTag * Fn freefare_get_tags nfc_device_t *device


enum mifare_tag_type {
ULTRALIGHT,
CLASSIC_1K,
CLASSIC_4K
};

Ft enum mifare_tag_type Fn freefare_get_tag_type MifareTag tag Ft const char * Fn freefare_get_tag_friendly_name MifareTag tag Ft char * Fn freefare_get_tag_uid MifareTag tag Ft void Fn freefare_free_tag MifareTag tags Ft void Fn freefare_free_tags MifareTag *tags

DESCRIPTION

The Fn freefare_* family of functions allow agnostic access to the Vt MifareTag present on a given NFC device.

Fn freefare_get_tags returns a NULL-terminated list of Vt MifareTag present on Vt device . This list has to be freed after usage by either:

calling the
Fn freefare_free_tags function. All tags in the list are automatically freed;
calling the
Fn freefare_free_tag function to free each tag in the list individually, and freeing the list itself using the Fn free function.

Because of the nature of the target detection process, any previously detected target will be in an inconsistent state after a call to Fn freefare_get_tags . It is the programmer's responsibility to free these targets before calling the Fn freefare_get_tags function.

Information about a given Vt MifareTag can be gathered using the Fn freefare_get_tag_type , Fn freefare_get_tag_uid and Fn freefare_get_tag_friendly_name functions.

RETURN VALUES

Unless stated otherwise, all functions return a value greater than or equal to 0 on success or -1 on failure.

AUTHORS

An Romain Tartiere Aq [email protected] An Romuald Conty Aq [email protected]