1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#ifndef MTOOLS_FLOPPYDIO_H
#define MTOOLS_FLOPPYDIO_H
/* Copyright 1999 Peter Schlaile.
* Copyright 1998,2000-2002,2009 Alain Knaff.
* This file is part of mtools.
*
* Mtools is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Mtools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Mtools. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef USE_FLOPPYD
#include "stream.h"
/*extern int ConnectToFloppyd(const char* name, Class_t** ioclass);*/
Stream_t *FloppydOpen(struct device *dev, struct device *dev2,
char *name, int mode, char *errmsg,
int mode2, int locked,
mt_size_t *maxSize);
#define FLOPPYD_DEFAULT_PORT 5703
#define FLOPPYD_PROTOCOL_VERSION_OLD 10
#define FLOPPYD_PROTOCOL_VERSION 11
#define FLOPPYD_CAP_EXPLICIT_OPEN 1 /* explicit open. Useful for
* clean signalling of readonly disks */
#define FLOPPYD_CAP_LARGE_SEEK 2 /* large seeks */
enum FloppydOpcodes {
OP_READ,
OP_WRITE,
OP_SEEK,
OP_FLUSH,
OP_CLOSE,
OP_IOCTL,
OP_OPRO,
OP_OPRW,
OP_SEEK64
};
enum AuthErrorsEnum {
AUTH_SUCCESS,
AUTH_PACKETOVERSIZE,
AUTH_AUTHFAILED,
AUTH_WRONGVERSION,
AUTH_DEVLOCKED,
AUTH_BADPACKET,
AUTH_IO_ERROR
};
typedef unsigned long IPaddr_t;
#endif
#endif
|