]> git.zerfleddert.de Git - proxmark3-svn/blame - client/hidcardformats.h
Redesign of lf hid card format handler as discussed with @marshmellow42
[proxmark3-svn] / client / hidcardformats.h
CommitLineData
b5a5fc4d 1//-----------------------------------------------------------------------------
2// Copyright (C) 2018 grauerfuchs
3//
4// This code is licensed to you under the terms of the GNU GPL, version 2 or,
5// at your option, any later version. See the LICENSE.txt file for the text of
6// the license.
7//-----------------------------------------------------------------------------
8// HID card format packing/unpacking routines
9//-----------------------------------------------------------------------------
10
11#ifndef HIDCARDFORMATS_H__
12#define HIDCARDFORMATS_H__
13
14#include <stdint.h>
15#include <stdbool.h>
16#include "hidcardformatutils.h"
17
18// Structure for defined HID card formats available for packing/unpacking
19typedef struct hidcardformat_s{
20 const char* Name;
21 bool (*Pack)(/*in*/hidproxcard_t* card, /*out*/hidproxmessage_t* packed);
22 bool (*Unpack)(/*in*/hidproxmessage_t* packed, /*out*/hidproxcard_t* card);
23 const char* Descrp;
24} hidcardformat_t;
25
26void HIDListFormats();
27int HIDFindCardFormat(const char *format);
28hidcardformat_t HIDGetCardFormat(int idx);
29bool HIDPack(/* in */int FormatIndex, /* in */hidproxcard_t* card, /* out */hidproxmessage_t* packed);
30bool HIDTryUnpack(/* in */hidproxmessage_t* packed);
31
32#endif
Impressum, Datenschutz