summaryrefslogtreecommitdiff
path: root/src/rfid_proto_mifare_ul.c
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-11-28 10:06:24 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2006-11-28 10:06:24 +0000
commit2da53a43badc7bd578ab5df850648f14807aecd2 (patch)
tree7041dc431c25664d9ba280a02504157407eb774d /src/rfid_proto_mifare_ul.c
parentc972071a03825d8fe595d33f9128b4341b0478bd (diff)
- fix mifare write support
- make mifare auth more reliable - add mifare permission / access bit en/decoding - some more 15693 bits - add new 'mifare-tool' program git-svn-id: https://svn.gnumonks.org/trunk/librfid@1928 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'src/rfid_proto_mifare_ul.c')
-rw-r--r--src/rfid_proto_mifare_ul.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rfid_proto_mifare_ul.c b/src/rfid_proto_mifare_ul.c
index 0ea55d2..8981b5e 100644
--- a/src/rfid_proto_mifare_ul.c
+++ b/src/rfid_proto_mifare_ul.c
@@ -112,6 +112,14 @@ static struct rfid_protocol_handle *
mful_init(struct rfid_layer2_handle *l2h)
{
struct rfid_protocol_handle *ph;
+
+ if (l2h->l2->id != RFID_LAYER2_ISO14443A)
+ return NULL;
+
+ /* according to "Functional Specification Rev. 3.0 */
+ if (l2h->uid_len != 7)
+ return NULL;
+
ph = malloc_protocol_handle(sizeof(struct rfid_protocol_handle));
return ph;
}
personal git repositories of Harald Welte. Your mileage may vary