FREEFARE(3) Library Functions Manual FREEFARE(3)

freefare_get_tags, freefare_get_tag_type, freefare_get_tag_friendly_name, freefare_get_tag_uid, freefare_free_tag, freefare_free_tagsGeneric target manipulation functions

Mifare card manipulation library (libfreefare, -lfreefare)

#include <freefare.h>

MifareTag *
freefare_get_tags(nfc_device_t *device);

enum mifare_tag_type {
    ULTRALIGHT,
    CLASSIC_1K,
    CLASSIC_4K
};

enum mifare_tag_type
freefare_get_tag_type(MifareTag tag);

const char *
freefare_get_tag_friendly_name(MifareTag tag);

char *
freefare_get_tag_uid(MifareTag tag);

void
freefare_free_tag(MifareTag tags);

void
freefare_free_tags(MifareTag *tags);

The () family of functions allow agnostic access to the MifareTag present on a given NFC device.

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

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

Information about a given MifareTag can be gathered using the (), () and () functions.

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

free(3), mifare_classic(3), mifare_ultralight(3)

Romain Tartiere ⟨romain@blogreen.org⟩
Romuald Conty ⟨romuald@libnfc.org⟩

March 30, 2010 Debian