+/*
+ * Support for Sun's extended RMT protocol
+ * code originally written by Jörg Schilling <schilling@fokus.gmd.de>
+ * and relicensed by his permission from GPL to BSD for use in dump.
+ *
+ * rmt_version is 0 for regular clients (Linux included)
+ * rmt_version is 1 for extended clients (Sun especially). In this case
+ * we support some extended commands (see below) and we remap
+ * the ioctl commands to the UNIX "standard", as per:
+ * ftp://ftp.fokus.gmd.de/pub/unix/star/README.mtio
+ *
+ * In order to use rmt version 1, a client must send "I-1\n0\n"
+ * before issuing the other I commands.
+ */
+static int rmt_version = 0;
+#define RMTI_VERSION -1
+#define RMT_VERSION 1
+
+/* Extended 'i' commands */
+#define RMTI_CACHE 0
+#define RMTI_NOCACHE 1
+#define RMTI_RETEN 2
+#define RMTI_ERASE 3
+#define RMTI_EOM 4
+#define RMTI_NBSF 5
+
+/* Extended 's' comands */
+#define MTS_TYPE 'T'
+#define MTS_DSREG 'D'
+#define MTS_ERREG 'E'
+#define MTS_RESID 'R'
+#define MTS_FILENO 'F'
+#define MTS_BLKNO 'B'
+#define MTS_FLAGS 'f'
+#define MTS_BF 'b'
+