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