first beta - patch sent to librfid list
[rfid/librfid.git] / gemtag / gemtag.h
index dfdfa64..e5c24bf 100644 (file)
@@ -1,5 +1,6 @@
 /*
 /*
- * (C) 2006 by Frank Zirkelbach <hackbard@hackdaworld.org>
+ * (C) 2006 by Harald Welte <laforge@gnumonks.org>
+ *             Frank Zirkelbach <hackbard@hackdaworld.org>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 
@@ -47,6 +48,8 @@ struct gemtag_cmd_hdr {
 #define WRITE_FAILED                   0x07
 #define NO_PICC                                0x08
 #define PICC_SELECT_ERROR              0x09
 #define WRITE_FAILED                   0x07
 #define NO_PICC                                0x08
 #define PICC_SELECT_ERROR              0x09
+#define LOAD_E2_FAILED                 0x0a
+#define AUTH_E2_FAILED                 0x0b
 
 /* gemtag commands */
 
 
 /* gemtag commands */
 
@@ -122,6 +125,7 @@ struct gemtag_cmd_hdr {
 
 
 /* function prototypes */
 
 
 /* function prototypes */
+
 int asciidump(unsigned char *data,int len);
 int hexdump(unsigned char *data,int len);
 struct usb_device *find_device(unsigned short vendor,unsigned short device);
 int asciidump(unsigned char *data,int len);
 int hexdump(unsigned char *data,int len);
 struct usb_device *find_device(unsigned short vendor,unsigned short device);
@@ -133,6 +137,8 @@ struct gemtag_handle *gemtag_open(void);
 int gemtag_close(struct gemtag_handle *gh);
 int gemtag_transform_mifare_key(struct gemtag_handle *gh,
                                 unsigned char *key6,unsigned char *key12);
 int gemtag_close(struct gemtag_handle *gh);
 int gemtag_transform_mifare_key(struct gemtag_handle *gh,
                                 unsigned char *key6,unsigned char *key12);
+int gemtag_auth_e2(struct gemtag_handle *gh,unsigned char authmode,
+                   int sector,unsigned char *key6);
 int gemtag_auth_mifare_key(struct gemtag_handle *gh,
                            unsigned char *key6,int sector);
 int gemtag_read16(struct gemtag_handle *gh,int sector,unsigned char *data);
 int gemtag_auth_mifare_key(struct gemtag_handle *gh,
                            unsigned char *key6,int sector);
 int gemtag_read16(struct gemtag_handle *gh,int sector,unsigned char *data);