* Copyright 2005-2007, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _BOOT_REMOTE_DISK_DEFS_H
#define _BOOT_REMOTE_DISK_DEFS_H
#include <inttypes.h>
enum {
REMOTE_DISK_SERVER_PORT = 8765,
REMOTE_DISK_BLOCK_SIZE = 1024,
};
enum {
REMOTE_DISK_HELLO_REQUEST = 0,
REMOTE_DISK_READ_REQUEST = 1,
REMOTE_DISK_WRITE_REQUEST = 2,
REMOTE_DISK_HELLO_REPLY = 3,
REMOTE_DISK_READ_REPLY = 4,
REMOTE_DISK_WRITE_REPLY = 5,
};
enum {
REMOTE_DISK_IO_ERROR = -1,
REMOTE_DISK_BAD_REQUEST = -2,
};
struct remote_disk_header {
uint64_t offset;
uint64_t request_id;
int16_t size;
uint16_t port;
uint8_t command;
uint8_t data[0];
} __attribute__ ((__packed__));
#endif