haiku/headers/private/kernel/boot/net/RemoteDiskDefs.h
Andreas Färber 04ec719a70 Convert line endings to LF
In r33670 the svn:eol-style property was dropped, which took care of
locally converting the line endings to the user's native style.
While most files use Unix-style LF line endings, some files have
Windows-style CR LF line endings.

Assure that the following r37262 directories use Unix-style line endings:

src/system/boot/
src/system/boot/arch/
src/system/boot/arch/ppc/
src/system/boot/loader/
src/system/boot/loader/net/
src/system/boot/platform/
src/system/boot/platform/openfirmware/
src/system/boot/platform/openfirmware/arch/
src/system/boot/platform/openfirmware/arch/ppc/
src/system/kernel/
src/system/kernel/arch/
src/system/kernel/arch/ppc/
src/system/kernel/platform/
src/system/kernel/platform/openfirmware/
headers/private/kernel/
headers/private/kernel/arch/
headers/private/kernel/arch/ppc/
headers/private/kernel/platform/
headers/private/kernel/platform/openfirmware/
headers/private/kernel/boot/
headers/private/kernel/boot/net/
headers/private/kernel/boot/platform/
headers/private/kernel/boot/platform/openfirmware/

This avoids patches containing irrelevant lines unintentionally converted.

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:38:03 +00:00

65 lines
1.3 KiB
C

/*
* 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 {
// requests
REMOTE_DISK_HELLO_REQUEST = 0,
// port: client port
REMOTE_DISK_READ_REQUEST = 1,
// port: client port
// offset: byte offset of data to read
// size: number of bytes to read (server might serve more, though)
REMOTE_DISK_WRITE_REQUEST = 2,
// port: client port
// offset: byte offset of data to write
// size: number of bytes to write
// data: the data
// replies
REMOTE_DISK_HELLO_REPLY = 3,
// offset: disk size
REMOTE_DISK_READ_REPLY = 4, // port unused
// offset: byte offset of read data
// size: number of bytes of data read; < 0 => error
// data: read data
REMOTE_DISK_WRITE_REPLY = 5, // port, data unused
// offset: byte offset of data written
// size: number of bytes of data written; < 0 => error
};
// errors
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 // _BOOT_REMOTE_DISK_DEFS_H