3 nbdkit-example2-plugin - example nbdkit plugin
7 nbdkit example2 file=FILENAME
11 C<nbdkit-example2-plugin> is an example L<nbdkit(1)> plugin.
13 It serves the named C<FILENAME> over NBD, readonly.
15 Mainly this is useful for testing nbdkit and as an example for writing
16 nbdkit plugins (L<nbdkit-plugin(3)>).
18 There are two variations of this plugin which can be found in the
19 source directory. F<example2.c> is the regular plugin for Linux and
20 other Unix-like systems. F<winexample2.c> is the same plugin written
21 for Windows using Win32 APIs to access the file.
25 For extra debugging (only useful for developers) use
26 S<I<-D example2.extra=1>>
32 =item F<$plugindir/nbdkit-example2-plugin.so>
36 Use C<nbdkit --dump-config> to find the location of C<$plugindir>.
42 C<nbdkit-example2-plugin> first appeared in nbdkit 1.0.
46 L<https://gitlab.com/nbdkit/nbdkit/blob/master/plugins/example2/example2.c>,
47 L<https://gitlab.com/nbdkit/nbdkit/blob/master/plugins/example2/winexample2.c>,