Giter Site home page Giter Site logo

bignaux / lwnbd Goto Github PK

View Code? Open in Web Editor NEW
13.0 7.0 2.0 277 KB

A Lightweight NBD server library

Home Page: https://bignaux.github.io/lwNBD/

License: BSD 2-Clause "Simplified" License

C 93.81% Nix 0.49% Makefile 5.70%
nbd lwip embedded disks linux driver library reverse-engineering playstation2 libuv

lwnbd's Introduction

lwNBD(3) -- A Lightweight NBD server library

SYNOPSIS

#include <lwnbd.h>
#include <lwnbd-server.h>
#include <lwnbd-plugin.h>

✨ DESCRIPTION

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 support

The 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 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 :

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, it is nevertheless usable with certain clients. In a RERO spirit 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

lwnbd's People

Contributors

bignaux avatar parrado avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

parrado wolf3s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.