Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > df754e4e6f7f5fc8ab9d6ed8559f3e3d > files > 40

bacula-docs-5.0.3-19.fc16.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Building Bacula Plugins</TITLE>
<META NAME="description" CONTENT="Building Bacula Plugins">
<META NAME="keywords" CONTENT="developers">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="developers.css">

<LINK REL="previous" HREF="Bacula_Plugin_Entrypoints.html">
<LINK REL="up" HREF="Bacula_FD_Plugin_API.html">
<LINK REL="next" HREF="Platform_Support.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html744"
  HREF="Platform_Support.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html738"
  HREF="Bacula_FD_Plugin_API.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html734"
  HREF="Bacula_Plugin_Entrypoints.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html740"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html742"
  HREF="GNU_Free_Documentation_Lice.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html745"
  HREF="Platform_Support.html">Platform Support</A>
<B> Up:</B> <A NAME="tex2html739"
  HREF="Bacula_FD_Plugin_API.html">Bacula FD Plugin API</A>
<B> Previous:</B> <A NAME="tex2html735"
  HREF="Bacula_Plugin_Entrypoints.html">Bacula Plugin Entrypoints</A>
 &nbsp; <B>  <A NAME="tex2html741"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html743"
  HREF="GNU_Free_Documentation_Lice.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION00460000000000000000">
Building Bacula Plugins</A>
</H1>
There is currently one sample program <B>example-plugin-fd.c</B> and
one working plugin <B>bpipe-fd.c</B> that can be found in the Bacula
<B>src/plugins/fd</B> directory.  Both are built with the following:

<P>
<PRE>
 cd &lt;bacula-source&gt;
 ./configure &lt;your-options&gt;
 make
 ...
 cd src/plugins/fd
 make
 make test
</PRE>

<P>
After building Bacula and changing into the src/plugins/fd directory,
the <B>make</B> command will build the <B>bpipe-fd.so</B> plugin, which 
is a very useful and working program.

<P>
The <B>make test</B> command will build the <B>example-plugin-fd.so</B>
plugin and a binary named <B>main</B>, which is build from the source
code located in <B>src/filed/fd_plugins.c</B>. 

<P>
If you execute <B>./main</B>, it will load and run the example-plugin-fd
plugin simulating a small number of the calling sequences that Bacula uses
in calling a real plugin.  This allows you to do initial testing of 
your plugin prior to trying it with Bacula.

<P>
You can get a good idea of how to write your own plugin by first 
studying the example-plugin-fd, and actually running it.  Then
it can also be instructive to read the bpipe-fd.c code as it is 
a real plugin, which is still rather simple and small.

<P>
When actually writing your own plugin, you may use the example-plugin-fd.c
code as a template for your code.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html744"
  HREF="Platform_Support.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html738"
  HREF="Bacula_FD_Plugin_API.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html734"
  HREF="Bacula_Plugin_Entrypoints.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html740"
  HREF="Contents.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html742"
  HREF="GNU_Free_Documentation_Lice.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html745"
  HREF="Platform_Support.html">Platform Support</A>
<B> Up:</B> <A NAME="tex2html739"
  HREF="Bacula_FD_Plugin_API.html">Bacula FD Plugin API</A>
<B> Previous:</B> <A NAME="tex2html735"
  HREF="Bacula_Plugin_Entrypoints.html">Bacula Plugin Entrypoints</A>
 &nbsp; <B>  <A NAME="tex2html741"
  HREF="Contents.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html743"
  HREF="GNU_Free_Documentation_Lice.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2012-01-24
</ADDRESS>
</BODY>
</HTML>