Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bignaux/lwnbd
A Lightweight NBD server library
https://github.com/bignaux/lwnbd
disks driver embedded library libuv linux lwip nbd playstation2 reverse-engineering
Last synced: 3 months ago
JSON representation
A Lightweight NBD server library
- Host: GitHub
- URL: https://github.com/bignaux/lwnbd
- Owner: bignaux
- License: bsd-2-clause
- Created: 2021-04-28T10:47:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T18:58:28.000Z (over 1 year ago)
- Last Synced: 2023-09-21T09:10:32.770Z (over 1 year ago)
- Topics: disks, driver, embedded, library, libuv, linux, lwip, nbd, playstation2, reverse-engineering
- Language: C
- Homepage:
- Size: 178 KB
- Stars: 10
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
lwNBD(3) -- A Lightweight NBD server library
=============================================## SYNOPSIS
#include
#include
#include## âĻ DESCRIPTION
* Official repository :
* BSD-style socket API: lwIP 2.0.0 and Linux supported.Targeting first the use on Playstation 2 IOP, a 37.5 MHz MIPS processor
and 2 MB of RAM, lwNBD is designed to run on bare metal or OS embedded system.
With modulararity and portability in mind, it is developed according to several
code standards, including :* no dynamically allocate memory
* static-linking
* written in C99 (using -std=c99 compile-time flag), use standard library usage
* thread-safe synchronous NBD protocol implementation
* optional and experimental query supportThe lwNBD API is broken down into 3:
* an API to manage server and content to be embbed in apps. The idea is to be able to manage servers as xinetd would.
* a server API to create protocol and transport plugins. Currently, only support NBD protocol, but could extend to Zmodem, AoE ... You then benefit from the mechanisms put in place for NBD such as content and management plugins.
* a plugin API to create content plugins. The plugin API has been entirely rewritten to be closer to the [nbdkit-plugin](https://libguestfs.org/nbdkit-plugin.3.html) one in order to benefit from the experience of their software architecture, and to facilitate the porting of code from one or the other library. An obstacle to this convergence is that nbdkit does not support the use of multiple plugins in a single instance.
There are 2 targets supported :
* GNU/Linux that use *file* plugin to
serve a list of files as command line parameters. For the time being, the main
purpose of the support is to facilitate development. It uses libuv as event loop, and can serve multiple client.* Playstation 2 IOP via an IRX module for [Open-PS2-Loader](https://github.com/ps2homebrew/Open-PS2-Loader).
It can export [hdd drive (atad plugin)](./plugins/atad/lwnbd-atad-plugin.md), [MemoryCard (mcman plugin)](./plugins/mcman/lwnbd-mcman-plugin.md), rom0 and IOP ram (*memory* plugin). Read more about this on [my Playstation 2 port notes](./ports/playstation2/lwnbd-playstation2-port.md).## HISTORY
On Playstation 2, there is no standardized central partition table like GPT for
hard disk partitioning, nor is there a standard file system but PFS and
HDLoader. In fact, there are few tools capable of handling hard disks,
especially under Linux, and the servers developed in the past to handle these
disks via the network did not use a standard protocol, which required each
software wishing to handle the disks to include a specific client part,
which were broken when the toolchain was updated. The same goes for the memory
cards and other block devices on this console, which is why I decided to
implement NBD on this target first.## STATUS
Although this server is not yet complete in respect of the minimal requirements
defined by the [NBD protocol](https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md#baseline),
it is nevertheless usable with certain clients. In a [RERO spirit](https://en.wikipedia.org/wiki/Release_early,_release_often)
i publish this "AS-IS".Known supported clients :
* nbdcopy (provided by libnbd)
* nbdfuse (provided by libnbd), works on windows with WSL2.
* nbd-client
* Ceph for Windows (wnbd-client.exe)## ðŠķ AUTHOR
Bignaux Ronan <ronan at aimao.org>
## LICENSE
BSD