haiku/headers/private/kernel/boot/net/RemoteDisk.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

55 lines
1.4 KiB
C++

/*
* Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _BOOT_REMOTE_DISK_H
#define _BOOT_REMOTE_DISK_H
#include <boot/vfs.h>
#include <boot/net/NetDefs.h>
#include <boot/net/RemoteDiskDefs.h>
class UDPPacket;
class UDPSocket;
class RemoteDisk : public Node {
public:
RemoteDisk();
~RemoteDisk();
status_t Init(ip_addr_t serverAddress, uint16 serverPort, off_t imageSize);
virtual ssize_t ReadAt(void *cookie, off_t pos, void *buffer,
size_t bufferSize);
virtual ssize_t WriteAt(void *cookie, off_t pos, const void *buffer,
size_t bufferSize);
virtual status_t GetName(char *nameBuffer, size_t bufferSize) const;
virtual off_t Size() const;
ip_addr_t ServerIPAddress() const;
uint16 ServerPort() const;
static RemoteDisk *FindAnyRemoteDisk();
private:
ssize_t _ReadFromPacket(off_t &pos, uint8 *&buffer, size_t &bufferSize);
static status_t _SendRequest(UDPSocket *socket, ip_addr_t serverAddress,
uint16 serverPort, remote_disk_header *request, size_t size,
uint8 expectedReply, UDPPacket **packet);
status_t _SendRequest(remote_disk_header *request, size_t size,
uint8 expectedReply, UDPPacket **packet);
private:
ip_addr_t fServerAddress;
uint16 fServerPort;
off_t fImageSize;
uint64 fRequestID;
UDPSocket *fSocket;
UDPPacket *fPacket;
};
#endif // _BOOT_REMOTE_DISK_H