=head1 NAME

nbdkit-example2-plugin - example nbdkit plugin

=head1 SYNOPSIS

 nbdkit example2 file=FILENAME

=head1 DESCRIPTION

C<nbdkit-example2-plugin> is an example L<nbdkit(1)> plugin.

It serves the named C<FILENAME> over NBD, readonly.

Mainly this is useful for testing nbdkit and as an example for writing
nbdkit plugins (L<nbdkit-plugin(3)>).

There are two variations of this plugin which can be found in the
source directory.  F<example2.c> is the regular plugin for Linux and
other Unix-like systems.  F<winexample2.c> is the same plugin written
for Windows using Win32 APIs to access the file.

=head1 DEBUG FLAGS

For extra debugging (only useful for developers) use
S<I<-D example2.extra=1>>

=head1 FILES

=over 4

=item F<$plugindir/nbdkit-example2-plugin.so>

The plugin.

Use C<nbdkit --dump-config> to find the location of C<$plugindir>.

=back

=head1 VERSION

C<nbdkit-example2-plugin> first appeared in nbdkit 1.0.

=head1 SEE ALSO

L<https://gitlab.com/nbdkit/nbdkit/blob/master/plugins/example2/example2.c>,
L<https://gitlab.com/nbdkit/nbdkit/blob/master/plugins/example2/winexample2.c>,
L<nbdkit(1)>,
L<nbdkit-plugin(3)>

=head1 AUTHORS

Richard W.M. Jones

=head1 COPYRIGHT

Copyright Red Hat
