%%
%%
-\section*{Catalog Services}
+\chapter{Catalog Services}
\label{_ChapterStart30}
\index[general]{Services!Catalog }
\index[general]{Catalog Services }
-\addcontentsline{toc}{section}{Catalog Services}
-\subsection*{General}
+\section{General}
\index[general]{General }
\addcontentsline{toc}{subsection}{General}
supported. Bacula {\bf requires} one of the three databases (MySQL,
PostgreSQL, or SQLite) to run.
-\subsubsection*{Filenames and Maximum Filename Length}
+\subsection{Filenames and Maximum Filename Length}
\index[general]{Filenames and Maximum Filename Length }
\index[general]{Length!Filenames and Maximum Filename }
\addcontentsline{toc}{subsubsection}{Filenames and Maximum Filename Length}
stored by the Storage daemon (normally on tape) allows and handles arbitrarily
long path and filenames.
-\subsubsection*{Installing and Configuring MySQL}
+\subsection{Installing and Configuring MySQL}
\index[general]{MySQL!Installing and Configuring }
\index[general]{Installing and Configuring MySQL }
\addcontentsline{toc}{subsubsection}{Installing and Configuring MySQL}
\ilink{Installing and Configuring MySQL}{_ChapterStart} chapter of
this manual.
-\subsubsection*{Installing and Configuring PostgreSQL}
+\subsection{Installing and Configuring PostgreSQL}
\index[general]{PostgreSQL!Installing and Configuring }
\index[general]{Installing and Configuring PostgreSQL }
\addcontentsline{toc}{subsubsection}{Installing and Configuring PostgreSQL}
\ilink{Installing and Configuring PostgreSQL}{_ChapterStart10}
chapter of this manual.
-\subsubsection*{Installing and Configuring SQLite}
+\subsection{Installing and Configuring SQLite}
\index[general]{Installing and Configuring SQLite }
\index[general]{SQLite!Installing and Configuring }
\addcontentsline{toc}{subsubsection}{Installing and Configuring SQLite}
\ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of
this manual.
-\subsubsection*{Internal Bacula Catalog}
+\subsection{Internal Bacula Catalog}
\index[general]{Catalog!Internal Bacula }
\index[general]{Internal Bacula Catalog }
\addcontentsline{toc}{subsubsection}{Internal Bacula Catalog}
\ilink{Internal Bacula Database}{_ChapterStart42} chapter of this
manual for more details.
-\subsubsection*{Database Table Design}
+\subsection{Database Table Design}
\index[general]{Design!Database Table }
\index[general]{Database Table Design }
\addcontentsline{toc}{subsubsection}{Database Table Design}
in a single database, thus increasing efficiency and reducing the impact of a
lost or damaged database.
-\subsection*{Sequence of Creation of Records for a Save Job}
+\section{Sequence of Creation of Records for a Save Job}
\index[general]{Sequence of Creation of Records for a Save Job }
\index[general]{Job!Sequence of Creation of Records for a Save }
\addcontentsline{toc}{subsection}{Sequence of Creation of Records for a Save
\item Update Job record filling in EndDate and other Job statistics
\end{enumerate}
-\subsection*{Database Tables}
+\section{Database Tables}
\index[general]{Database Tables }
\index[general]{Tables!Database }
\addcontentsline{toc}{subsection}{Database Tables}
\
-\subsubsection*{MySQL Table Definition}
+\subsection{MySQL Table Definition}
\index[general]{MySQL Table Definition }
\index[general]{Definition!MySQL Table }
\addcontentsline{toc}{subsubsection}{MySQL Table Definition}
%%
%%
-\section*{Daemon Protocol}
+\chapter{Daemon Protocol}
\label{_ChapterStart2}
\index{Protocol!Daemon }
\index{Daemon Protocol }
-\addcontentsline{toc}{section}{Daemon Protocol}
-\subsection*{General}
+\section{General}
\index{General }
\addcontentsline{toc}{subsection}{General}
administrators that want or need to know more of the working details of {\bf
Bacula}.
-\subsection*{Low Level Network Protocol}
+\section{Low Level Network Protocol}
\index{Protocol!Low Level Network }
\index{Low Level Network Protocol }
\addcontentsline{toc}{subsection}{Low Level Network Protocol}
not be appropriate for efficiency reasons to make every call to the BSOCK
routines lock and unlock the packet.
-\subsection*{General Daemon Protocol}
+\section{General Daemon Protocol}
\index{General Daemon Protocol }
\index{Protocol!General Daemon }
\addcontentsline{toc}{subsection}{General Daemon Protocol}
-3000 to -3999 for the Storage daemon.
\end{itemize}
-\subsection*{The Protocol Used Between the Director and the Storage Daemon}
+\section{The Protocol Used Between the Director and the Storage Daemon}
\index{Daemon!Protocol Used Between the Director and the Storage }
\index{Protocol Used Between the Director and the Storage Daemon }
\addcontentsline{toc}{subsection}{Protocol Used Between the Director and the
Director resources (there may be several Directors that can access a single
Storage daemon).
-\subsection*{The Protocol Used Between the Director and the File Daemon}
+\section{The Protocol Used Between the Director and the File Daemon}
\index{Daemon!Protocol Used Between the Director and the File }
\index{Protocol Used Between the Director and the File Daemon }
\addcontentsline{toc}{subsection}{Protocol Used Between the Director and the
\end{verbatim}
\normalsize
-\subsection*{The Save Protocol Between the File Daemon and the Storage Daemon}
+\section{The Save Protocol Between the File Daemon and the Storage Daemon}
\index{Save Protocol Between the File Daemon and the Storage Daemon }
\index{Daemon!Save Protocol Between the File Daemon and the Storage }
\addcontentsline{toc}{subsection}{Save Protocol Between the File Daemon and
daemon to the Storage daemon, and SD: refers to information set from the
Storage daemon to the File daemon.
-\subsubsection*{Command and Control Information}
+\subsection{Command and Control Information}
\index{Information!Command and Control }
\index{Command and Control Information }
\addcontentsline{toc}{subsubsection}{Command and Control Information}
\end{verbatim}
\normalsize
-\subsubsection*{Data Information}
+\subsection{Data Information}
\index{Information!Data }
\index{Data Information }
\addcontentsline{toc}{subsubsection}{Data Information}
\parindent 0pt
\title{\includegraphics{./bacula-logo.eps} \\ \bigskip
+ \Huge{Developers' Guide}
\begin{center}
\large{It comes in the night and sucks
the essence from your computers. }
%%
%%
-\section*{Director Services Daemon}
+\chapter{Director Services Daemon}
\label{_ChapterStart6}
\index{Daemon!Director Services }
\index{Director Services Daemon }
%---------------------------------------------------------------------
-\section*{GNU Free Documentation License}
+\chapter{GNU Free Documentation License}
\index[general]{GNU ree Documentation License}
\index[general]{License!GNU ree Documentation}
\addcontentsline{toc}{section}{GNU ree Documentation License}
%%
%%
-\section*{File Services Daemon}
+\chapter{File Services Daemon}
\label{_ChapterStart11}
\index{File Services Daemon }
\index{Daemon!File Services }
normally be sent directly to the Directory (this, of course, depends on how
the Message resource is defined).
-\subsection*{Commands Received from the Director for a Backup}
+\section{Commands Received from the Director for a Backup}
\index{Backup!Commands Received from the Director for a }
\index{Commands Received from the Director for a Backup }
\addcontentsline{toc}{subsection}{Commands Received from the Director for a
To be written ...
-\subsection*{Commands Received from the Director for a Restore}
+\section{Commands Received from the Director for a Restore}
\index{Commands Received from the Director for a Restore }
\index{Restore!Commands Received from the Director for a }
\addcontentsline{toc}{subsection}{Commands Received from the Director for a
%%
%%
-\section*{Bacula Developer Notes}
+\chapter{Bacula Developer Notes}
\label{_ChapterStart10}
\index{Bacula Developer Notes}
\index{Notes!Bacula Developer}
\addcontentsline{toc}{section}{Bacula Developer Notes}
-\subsection*{General}
+\section{General}
\index{General}
\addcontentsline{toc}{subsection}{General}
This document is intended mostly for developers and describes the the general
framework of making Bacula source changes.
-\subsubsection*{Contributions}
+\subsection{Contributions}
\index{Contributions}
\addcontentsline{toc}{subsubsection}{Contributions}
dealing with copyright issues. The following text describes some of the
requirements for such code.
-\subsubsection*{Patches}
+\subsection{Patches}
\index{Patches}
\addcontentsline{toc}{subsubsection}{Patches}
directly to the SVN repository. To do so, you will need a userid on Source
Forge.
-\subsubsection*{Copyrights}
+\subsection{Copyrights}
\index{Copyrights}
\addcontentsline{toc}{subsubsection}{Copyrights}
enhancements, or bug fixes of 5-10 lines of code, which amount to
less than 20% of any particular file.
-\subsubsection*{Copyright Assignment -- Fiduciary License Agreement}
+\subsection{Copyright Assignment -- Fiduciary License Agreement}
\index{Copyright Assignment}
\index{Assignment!Copyright}
\addcontentsline{toc}{subsubsection}{Copyright Assignment -- Fiduciary License Agreement}
-\subsection*{The Development Cycle}
+\section{The Development Cycle}
\index{Developement Cycle}
\index{Cycle!Developement}
\addcontentsline{toc}{subsubsection}{Development Cycle}
\end{verbatim}
-\subsection*{Bacula Code Submissions and Projects}
+\section{Bacula Code Submissions and Projects}
\index{Submissions and Projects}
\addcontentsline{toc}{subsection}{Code Submissions and Projects}
debugging, documentation, and maintenance responsibilities.
\end{itemize}
-\subsection*{Patches for Released Versions}
+\section{Patches for Released Versions}
\index{Patches for Released Versions}
\addcontentsline{toc}{subsection}{Patches for Released Versions}
If you fix a bug in a released version, you should, unless it is
-\subsection*{SVN Usage}
+\section{SVN Usage}
\index{SVN Usage}
\addcontentsline{toc}{subsection}{SVN Usage}
long as you are careful only to change files that you want changed,
you have little to worry about.
-\subsection*{Subversion Resources}
+\section{Subversion Resources}
\index{Subversion (svn) Resources}
\addcontentsline{toc}{subsection}{Subversion Resources}
-\subsection*{Developing Bacula}
+\section{Developing Bacula}
\index{Developing Bacula}
\index{Bacula!Developing}
\addcontentsline{toc}{subsubsection}{Developing Bacula}
./stopit then repeat the process.
-\subsubsection*{Debugging}
+\subsection{Debugging}
\index{Debugging}
\addcontentsline{toc}{subsubsection}{Debugging}
want. If you really need more info, a debug level of 60 is not bad, and for
just about everything a level of 200.
-\subsubsection*{Using a Debugger}
+\subsection{Using a Debugger}
\index{Using a Debugger}
\index{Debugger!Using a}
\addcontentsline{toc}{subsubsection}{Using a Debugger}
developer. For more details on this, please see the chapter in the main Bacula
manual entitled ``What To Do When Bacula Crashes (Kaboom)''.
-\subsubsection*{Memory Leaks}
+\subsection{Memory Leaks}
\index{Leaks!Memory}
\index{Memory Leaks}
\addcontentsline{toc}{subsubsection}{Memory Leaks}
correct any and all memory leaks that are printed at the termination of the
daemons.
-\subsubsection*{Special Files}
+\subsection{Special Files}
\index{Files!Special}
\index{Special Files}
\addcontentsline{toc}{subsubsection}{Special Files}
Kern uses files named 1, 2, ... 9 with any extension as scratch files. Thus
any files with these names are subject to being rudely deleted at any time.
-\subsubsection*{When Implementing Incomplete Code}
+\subsection{When Implementing Incomplete Code}
\index{Code!When Implementing Incomplete}
\index{When Implementing Incomplete Code}
\addcontentsline{toc}{subsubsection}{When Implementing Incomplete Code}
FIXME (in capitals) and no intervening spaces. This is important as it allows
new programmers to easily recognize where things are partially implemented.
-\subsubsection*{Bacula Source File Structure}
+\subsection{Bacula Source File Structure}
\index{Structure!Bacula Source File}
\index{Bacula Source File Structure}
\addcontentsline{toc}{subsubsection}{Bacula Source File Structure}
\end{verbatim}
\normalsize
-\subsubsection*{Header Files}
+\subsection{Header Files}
\index{Header Files}
\index{Files!Header}
\addcontentsline{toc}{subsubsection}{Header Files}
the prototypes for subroutines exported by files in that directory. {\bf
protos.h} is always included by the main directory dependent include file.
-\subsubsection*{Programming Standards}
+\subsection{Programming Standards}
\index{Standards!Programming}
\index{Programming Standards}
\addcontentsline{toc}{subsubsection}{Programming Standards}
Remember this is a C program that is migrating to a {\bf tiny} subset of C++,
so be conservative in your use of C++ features.
-\subsubsection*{Do Not Use}
+\subsection{Do Not Use}
\index{Use!Do Not}
\index{Do Not Use}
\addcontentsline{toc}{subsubsection}{Do Not Use}
\item STL -- it is totally incomprehensible.
\end{itemize}
-\subsubsection*{Avoid if Possible}
+\subsection{Avoid if Possible}
\index{Possible!Avoid if}
\index{Avoid if Possible}
\addcontentsline{toc}{subsubsection}{Avoid if Possible}
\end{itemize}
-\subsubsection*{Do Use Whenever Possible}
+\subsection{Do Use Whenever Possible}
\index{Possible!Do Use Whenever}
\index{Do Use Whenever Possible}
\addcontentsline{toc}{subsubsection}{Do Use Whenever Possible}
\end{itemize}
-\subsubsection*{Indenting Standards}
+\subsection{Indenting Standards}
\index{Standards!Indenting}
\index{Indenting Standards}
\addcontentsline{toc}{subsubsection}{Indenting Standards}
If you are using {\bf vim}, simply set your tabstop to 8 and your shiftwidth
to 3.
-\subsubsection*{Tabbing}
+\subsection{Tabbing}
\index{Tabbing}
\addcontentsline{toc}{subsubsection}{Tabbing}
them with spaces if you wish. Please don't confuse tabbing (use of tab
characters) with indenting (visual alignment of the code).
-\subsubsection*{Don'ts}
+\subsection{Don'ts}
\index{Don'ts}
\addcontentsline{toc}{subsubsection}{Don'ts}
Also please don't use the STL or Templates or any complicated C++ code.
-\subsubsection*{Message Classes}
+\subsection{Message Classes}
\index{Classes!Message}
\index{Message Classes}
\addcontentsline{toc}{subsubsection}{Message Classes}
Currently, there are five classes of messages: Debug, Error, Job, Memory,
and Queued.
-\subsubsection*{Debug Messages}
+\subsection{Debug Messages}
\index{Messages!Debug}
\index{Debug Messages}
\addcontentsline{toc}{subsubsection}{Debug Messages}
Dmsg1(9, ``Created client \%s record\textbackslash{}n'', client->hdr.name);
-\subsubsection*{Error Messages}
+\subsection{Error Messages}
\index{Messages!Error}
\index{Error Messages}
\addcontentsline{toc}{subsubsection}{Error Messages}
Emsg3(M\_FATAL, 0, ``bdird\lt{}filed: bad response from Filed to \%s command:
\%d \%s\textbackslash{}n'', cmd, n, strerror(errno));
-\subsubsection*{Job Messages}
+\subsection{Job Messages}
\index{Job Messages}
\index{Messages!Job}
\addcontentsline{toc}{subsubsection}{Job Messages}
line number will be prefixed to the message. This permits a sort of debug
from user's output.
-\subsubsection*{Queued Job Messages}
+\subsection{Queued Job Messages}
\index{Queued Job Messages}
\index{Messages!Job}
\addcontentsline{toc}{subsubsection}{Queued Job Messages}
event of a network error.
-\subsubsection*{Memory Messages}
+\subsection{Memory Messages}
\index{Messages!Memory}
\index{Memory Messages}
\addcontentsline{toc}{subsubsection}{Memory Messages}
%%
%%
-\section*{Bacula MD5 Algorithm}
+\chapter{Bacula MD5 Algorithm}
\label{MD5Chapter}
\addcontentsline{toc}{section}{}
-\subsection*{Command Line Message Digest Utility }
+\section{Command Line Message Digest Utility }
\index{Utility!Command Line Message Digest }
\index{Command Line Message Digest Utility }
\addcontentsline{toc}{subsection}{Command Line Message Digest Utility}
developing shell scripts or Perl programs for software installation, file
comparison, and detection of file corruption and tampering.
-\subsubsection*{Name}
+\subsection{Name}
\index{Name}
\addcontentsline{toc}{subsubsection}{Name}
{\bf md5} - generate / check MD5 message digest
-\subsubsection*{Synopsis}
+\subsection{Synopsis}
\index{Synopsis }
\addcontentsline{toc}{subsubsection}{Synopsis}
{\bf md5} [ {\bf -c}{\it signature} ] [ {\bf -u} ] [ {\bf -d}{\it input\_text}
| {\it infile} ] [ {\it outfile} ]
-\subsubsection*{Description}
+\subsection{Description}
\index{Description }
\addcontentsline{toc}{subsubsection}{Description}
correct delivery and installation of software packages, comparing the contents
of two different systems, and checking for changes in specific files.
-\subsubsection*{Options}
+\subsection{Options}
\index{Options }
\addcontentsline{toc}{subsubsection}{Options}
Print how-to-call information.
\end{description}
-\subsubsection*{Files}
+\subsection{Files}
\index{Files }
\addcontentsline{toc}{subsubsection}{Files}
output are processed strictly serially; consequently {\bf md5} may be used in
pipelines.
-\subsubsection*{Bugs}
+\subsection{Bugs}
\index{Bugs }
\addcontentsline{toc}{subsubsection}{Bugs}
This program has not been tested on a machine on which {\tt int} and/or {\tt
long} are longer than 32 bits.
-\subsection*{
+\section{
\elink{Download md5.zip}{http://www.fourmilab.ch/md5/md5.zip} (Zipped
archive)}
\index{Archive!Download md5.zip Zipped }
Visual C++ 5.0), and in source code form along with a {\tt Makefile} to build
the program under Unix.
-\subsubsection*{See Also}
+\subsection{See Also}
\index{ALSO!SEE }
\index{See Also }
\addcontentsline{toc}{subsubsection}{SEE ALSO}
{\bf sum}(1)
-\subsubsection*{Exit Status}
+\subsection{Exit Status}
\index{Status!Exit }
\index{Exit Status }
\addcontentsline{toc}{subsubsection}{Exit Status}
of the input, and 2 if processing could not be performed at all due, for
example, to a nonexistent input file.
-\subsubsection*{Copying}
+\subsection{Copying}
\index{Copying }
\addcontentsline{toc}{subsubsection}{Copying}
is provided ``as is'' without express or implied warranty.
\end{quote}
-\subsubsection*{Acknowledgements}
+\subsection{Acknowledgements}
\index{Acknowledgements }
\addcontentsline{toc}{subsubsection}{Acknowledgements}
%%
%%
-\section*{Storage Media Output Format}
+\chapter{Storage Media Output Format}
\label{_ChapterStart9}
\index{Format!Storage Media Output}
\index{Storage Media Output Format}
\addcontentsline{toc}{section}{Storage Media Output Format}
-\subsection*{General}
+\section{General}
\index{General}
\addcontentsline{toc}{subsection}{General}
administrators that want or need to know more of the working details of {\bf
Bacula}.
-\subsection*{Definitions}
+\section{Definitions}
\index{Definitions}
\addcontentsline{toc}{subsection}{Definitions}
Session.
\end{description}
-\subsection*{Storage Daemon File Output Format}
+\section{Storage Daemon File Output Format}
\index{Format!Storage Daemon File Output}
\index{Storage Daemon File Output Format}
\addcontentsline{toc}{subsection}{Storage Daemon File Output Format}
tape is terminated with an End of File mark (this will be removed later).
Sessions written to file are simply appended to the end of the file.
-\subsection*{Overall Format}
+\section{Overall Format}
\index{Format!Overall}
\index{Overall Format}
\addcontentsline{toc}{subsection}{Overall Format}
since Bacula blocks are sequentially numbered within a Job, it is easy to
ensure that no block is missing or duplicated.
-\subsection*{Serialization}
+\section{Serialization}
\index{Serialization}
\addcontentsline{toc}{subsection}{Serialization}
Bacula's serialization routines. These routines guarantee that the data is
written to the output volume in a machine independent format.
-\subsection*{Block Header}
+\section{Block Header}
\index{Header!Block}
\index{Block Header}
\addcontentsline{toc}{subsection}{Block Header}
be in machine independent format. See below for version 2 of the block header.
-\subsection*{Record Header}
+\section{Record Header}
\index{Header!Record}
\index{Record Header}
\addcontentsline{toc}{subsection}{Record Header}
read the next record and concatenate the data record to form a full data
record.
-\subsection*{Version BB02 Block Header}
+\section{Version BB02 Block Header}
\index{Version BB02 Block Header}
\index{Header!Version BB02 Block}
\addcontentsline{toc}{subsection}{Version BB02 Block Header}
which are valid. The Block header is written using the Bacula serialization
routines and thus is guaranteed to be in machine independent format.
-\subsection*{Version 2 Record Header}
+\section{Version 2 Record Header}
\index{Version 2 Record Header}
\index{Header!Version 2 Record}
\addcontentsline{toc}{subsection}{Version 2 Record Header}
VolSessionId and VolSessionTime is filled in the Record Header from the Block
Header.
-\subsection*{Volume Label Format}
+\section{Volume Label Format}
\index{Volume Label Format}
\index{Format!Volume Label}
\addcontentsline{toc}{subsection}{Volume Label Format}
is stored in the record FileIndex field of the Record Header and does not
appear in the data part of the record.
-\subsection*{Session Label}
+\section{Session Label}
\index{Label!Session}
\index{Session Label}
\addcontentsline{toc}{subsection}{Session Label}
JobId. This permits quick filtering without actually reading all the session
data in many cases.
-\subsection*{Overall Storage Format}
+\section{Overall Storage Format}
\index{Format!Overall Storage}
\index{Overall Storage Format}
\addcontentsline{toc}{subsection}{Overall Storage Format}
\end{verbatim}
\normalsize
-\subsection*{Unix File Attributes}
+\section{Unix File Attributes}
\index{Unix File Attributes}
\index{Attributes!Unix File}
\addcontentsline{toc}{subsection}{Unix File Attributes}
\end{longtable}
-\subsection*{Old Depreciated Tape Format}
+\section{Old Depreciated Tape Format}
\index{Old Depreciated Tape Format}
\index{Format!Old Depreciated Tape}
\addcontentsline{toc}{subsection}{Old Depreciated Tape Format}
%%
%%
-\section*{Bacula Memory Management}
+\chapter{Bacula Memory Management}
\label{_ChapterStart7}
\index{Management!Bacula Memory}
\index{Bacula Memory Management}
\addcontentsline{toc}{section}{Bacula Memory Management}
-\subsection*{General}
+\section{General}
\index{General}
\addcontentsline{toc}{subsection}{General}
\item Pooled memory.
\end{itemize}
-\subsubsection*{Statically Allocated Memory}
+\subsection{Statically Allocated Memory}
\index{Statically Allocated Memory}
\index{Memory!Statically Allocated}
\addcontentsline{toc}{subsubsection}{Statically Allocated Memory}
change, particularly to accommodate Unicode, it will remain a relatively small
value.
-\subsubsection*{Dynamically Allocated Memory}
+\subsection{Dynamically Allocated Memory}
\index{Dynamically Allocated Memory}
\index{Memory!Dynamically Allocated}
\addcontentsline{toc}{subsubsection}{Dynamically Allocated Memory}
the free() call, and all malloc'ed memory that is not released prior to
termination of the program will be reported as Orphaned memory.
-\subsubsection*{Pooled and Non-pooled Memory}
+\subsection{Pooled and Non-pooled Memory}
\index{Memory!Pooled and Non-pooled}
\index{Pooled and Non-pooled Memory}
\addcontentsline{toc}{subsubsection}{Pooled and Non-pooled Memory}
%%
%%
-\section*{TCP/IP Network Protocol}
+\chapter{TCP/IP Network Protocol}
\label{_ChapterStart5}
\index{TCP/IP Network Protocol}
\index{Protocol!TCP/IP Network}
\addcontentsline{toc}{section}{TCP/IP Network Protocol}
-\subsection*{General}
+\section{General}
\index{General}
\addcontentsline{toc}{subsection}{General}
low level write() and read() calls are needed. All data transferred are
considered to be binary data.
-\subsection*{bnet and Threads}
+\section{bnet and Threads}
\index{Threads!bnet and}
\index{Bnet and Threads}
\addcontentsline{toc}{subsection}{bnet and Threads}
must implement some locking mechanism. However, it probably would not be
appropriate to put locks inside the bnet subroutines for efficiency reasons.
-\subsection*{bnet\_open}
+\section{bnet\_open}
\index{Bnet\_open}
\addcontentsline{toc}{subsection}{bnet\_open}
error occurred and that you should not repeatedly call bnet\_open(). Any error
message will generally be sent to the JCR.
-\subsection*{bnet\_send}
+\section{bnet\_send}
\index{Bnet\_send}
\addcontentsline{toc}{subsection}{bnet\_send}
In the case of a failure, an error message will be sent to the JCR contained
within the bsock packet.
-\subsection*{bnet\_fsend}
+\section{bnet\_fsend}
\index{Bnet\_fsend}
\addcontentsline{toc}{subsection}{bnet\_fsend}
formatted messages somewhat like fprintf(). The return status is the same as
bnet\_send.
-\subsection*{Additional Error information}
+\section{Additional Error information}
\index{Information!Additional Error}
\index{Additional Error information}
\addcontentsline{toc}{subsection}{Additional Error information}
will return non-zero if there are errors or the line is closed (no more
transmissions should be sent).
-\subsection*{bnet\_recv}
+\section{bnet\_recv}
\index{Bnet\_recv}
\addcontentsline{toc}{subsection}{bnet\_recv}
It should be noted that bnet\_recv() is a blocking read.
-\subsection*{bnet\_sig}
+\section{bnet\_sig}
\index{Bnet\_sig}
\addcontentsline{toc}{subsection}{bnet\_sig}
\item BNET\_PROMPT - Prompt for UA
\end{enumerate}
-\subsection*{bnet\_strerror}
+\section{bnet\_strerror}
\index{Bnet\_strerror}
\addcontentsline{toc}{subsection}{bnet\_strerror}
Returns a formated string corresponding to the last error that occurred.
-\subsection*{bnet\_close}
+\section{bnet\_close}
\index{Bnet\_close}
\addcontentsline{toc}{subsection}{bnet\_close}
void bnet\_close(BSOCK *sock)
-\subsection*{Becoming a Server}
+\section{Becoming a Server}
\index{Server!Becoming a}
\index{Becoming a Server}
\addcontentsline{toc}{subsection}{Becoming a Server}
please refer to the code in bnet\_server.c and the code at the beginning of
each daemon as examples of how to call it.
-\subsection*{Higher Level Conventions}
+\section{Higher Level Conventions}
\index{Conventions!Higher Level}
\index{Higher Level Conventions}
\addcontentsline{toc}{subsection}{Higher Level Conventions}
%%
%%
-\section*{Platform Support}
+\chapter{Platform Support}
\label{_PlatformChapter}
\index{Support!Platform}
\index{Platform Support}
\addcontentsline{toc}{section}{Platform Support}
-\subsection*{General}
+\section{General}
\index{General }
\addcontentsline{toc}{subsection}{General}
where the File daemon (client) is known to run: NetBSD, OpenBSD,
Mac OSX, SGI, ...
-\subsection*{Requirements to become a Supported Platform}
+\section{Requirements to become a Supported Platform}
\index{Requirements!Platform}
\index{Platform Requirements}
\addcontentsline{toc}{subsection}{Platform Requirements}
%%
%%
-\section*{Bacula Porting Notes}
+\chapter{Bacula Porting Notes}
\label{_ChapterStart1}
\index{Notes!Bacula Porting}
\index{Bacula Porting Notes}
Directory and Storage daemons will run on every system capable of supporting
them.
-\subsection*{Porting Requirements}
+\section{Porting Requirements}
\index{Requirements!Porting}
\index{Porting Requirements}
-\addcontentsline{toc}{subsection}{Porting Requirements}
+\addcontentsline{toc}{section}{Porting Requirements}
In General, the following holds true:
should be relatively easy.
\end{itemize}
-\subsection*{Steps to Take for Porting}
+\section{Steps to Take for Porting}
\index{Porting!Steps to Take for}
\index{Steps to Take for Porting}
-\addcontentsline{toc}{subsection}{Steps to Take for Porting}
+\addcontentsline{toc}{section}{Steps to Take for Porting}
\begin{itemize}
\item The first step is to ensure that you have version 2.13 or later of the
Detection}
\includegraphics{./smartall.eps}
-\section*{Smart Memory Allocation With Orphaned Buffer Detection }
+\chapter{Smart Memory Allocation}
\label{_ChapterStart4}
\index{Detection!Smart Memory Allocation With Orphaned Buffer }
\index{Smart Memory Allocation With Orphaned Buffer Detection }
\addcontentsline{toc}{section}{Smart Memory Allocation With Orphaned Buffer
Detection}
-
Few things are as embarrassing as a program that leaks, yet few errors are so
easy to commit or as difficult to track down in a large, complicated program
as failure to release allocated memory. SMARTALLOC replaces the standard C
internal structure of the heap and thus should be compatible with any C
language implementation of the standard memory allocation functions.
-\subsubsection*{ Installing SMARTALLOC}
+\subsection{ Installing SMARTALLOC}
\index{SMARTALLOC!Installing }
\index{Installing SMARTALLOC }
-\addcontentsline{toc}{subsubsection}{Installing SMARTALLOC}
+\addcontentsline{toc}{subsection}{Installing SMARTALLOC}
SMARTALLOC is provided as a Zipped archive,
\elink{smartall.zip}{http://www.fourmilab.ch/smartall/smartall.zip}; see the
\end{verbatim}
\normalsize
-\subsubsection*{ Squelching a SMARTALLOC}
+\subsection{ Squelching a SMARTALLOC}
\index{SMARTALLOC!Squelching a }
\index{Squelching a SMARTALLOC }
-\addcontentsline{toc}{subsubsection}{Squelching a SMARTALLOC}
+\addcontentsline{toc}{subsection}{Squelching a SMARTALLOC}
Usually, when you first install SMARTALLOC in an existing program you'll find
it nattering about lots of orphaned buffers. Some of these turn out to be
all the other safeguards provided by SMARTALLOC remain in effect. You may
release such buffers, if you like; but you don't have to.
-\subsubsection*{ Living with Libraries}
+\subsection{ Living with Libraries}
\index{Libraries!Living with }
\index{Living with Libraries }
-\addcontentsline{toc}{subsubsection}{Living with Libraries}
+\addcontentsline{toc}{subsection}{Living with Libraries}
Some library functions for which source code is unavailable may gratuitously
allocate and return buffers that contain their results, or require you to pass
way you don't forfeit all the other advantages of SMARTALLOC as you do when
using {\tt actuallymalloc()} and {\tt actuallyfree()}.
-\subsubsection*{ SMARTALLOC Details}
+\subsection{ SMARTALLOC Details}
\index{SMARTALLOC Details }
\index{Details!SMARTALLOC }
-\addcontentsline{toc}{subsubsection}{SMARTALLOC Details}
+\addcontentsline{toc}{subsection}{SMARTALLOC Details}
When you include ``smartall.h'' and define SMARTALLOC, the following standard
system library functions are redefined with the \#define mechanism to call
realloc()} permit an old buffer argument of NULL, causing {\tt realloc()} to
allocate a new buffer. The SMARTALLOC version permits this.
-\subsubsection*{ When SMARTALLOC is Disabled}
+\subsection{ When SMARTALLOC is Disabled}
\index{When SMARTALLOC is Disabled }
\index{Disabled!When SMARTALLOC is }
-\addcontentsline{toc}{subsubsection}{When SMARTALLOC is Disabled}
+\addcontentsline{toc}{subsection}{When SMARTALLOC is Disabled}
When SMARTALLOC is disabled by compiling a program with the symbol SMARTALLOC
not defined, calls on the functions otherwise redefined by SMARTALLOC go
defined for testing should require no changes when built without it for
production release.
-\subsubsection*{ The {\tt alloc()} Function}
+\subsection{ The {\tt alloc()} Function}
\index{Function!alloc }
\index{Alloc() Function }
-\addcontentsline{toc}{subsubsection}{alloc() Function}
+\addcontentsline{toc}{subsection}{alloc() Function}
Many programs I've worked on use very few direct calls to {\tt malloc()},
using the identically declared {\tt alloc()} function instead. Alloc detects
advantage of the SMARTALLOC diagnostic information to identify the file and
line number of the call on {\tt alloc()} that failed.
-\subsubsection*{ Overlays and Underhandedness}
+\subsection{ Overlays and Underhandedness}
\index{Underhandedness!Overlays and }
\index{Overlays and Underhandedness }
-\addcontentsline{toc}{subsubsection}{Overlays and Underhandedness}
+\addcontentsline{toc}{subsection}{Overlays and Underhandedness}
String constants in the C language are considered to be static arrays of
characters accessed through a pointer constant. The arrays are potentially
choosing this compiler mode won't wreak havoc on some other part of your
program.
-\subsubsection*{ Test and Demonstration Program}
+\subsection{ Test and Demonstration Program}
\index{Test and Demonstration Program }
\index{Program!Test and Demonstration }
-\addcontentsline{toc}{subsubsection}{Test and Demonstration Program}
+\addcontentsline{toc}{subsection}{Test and Demonstration Program}
A test and demonstration program, smtest.c, is supplied with SMARTALLOC. You
can build this program with the Makefile included. Please refer to the
you're attempting to use SMARTALLOC on a new machine or with a new compiler or
operating system, it's a wise first step to check it out with smtest first.
-\subsubsection*{ Invitation to the Hack}
+\subsection{ Invitation to the Hack}
\index{Hack!Invitation to the }
\index{Invitation to the Hack }
-\addcontentsline{toc}{subsubsection}{Invitation to the Hack}
+\addcontentsline{toc}{subsection}{Invitation to the Hack}
SMARTALLOC is not intended to be a panacea for storage management problems,
nor is it universally applicable or effective; it's another weapon in the
it works in a variety of environments. I hope you'll find SMARTALLOC as useful
for your projects as I've found it in mine.
-\subsection*{
+\section{
\elink{}{http://www.fourmilab.ch/smartall/smartall.zip}
\elink{Download smartall.zip}{http://www.fourmilab.ch/smartall/smartall.zip}
(Zipped archive)}
\index{Archive! Download smartall.zip Zipped }
\index{ Download smartall.zip (Zipped archive) }
-\addcontentsline{toc}{subsection}{ Download smartall.zip (Zipped archive)}
+\addcontentsline{toc}{section}{ Download smartall.zip (Zipped archive)}
SMARTALLOC is provided as
\elink{smartall.zip}{http://www.fourmilab.ch/smartall/smartall.zip}, a
\elink{Zipped}{http://www.pkware.com/} archive containing source code,
documentation, and a {\tt Makefile} to build the software under Unix.
-\subsubsection*{ Copying}
+\subsection{ Copying}
\index{Copying }
-\addcontentsline{toc}{subsubsection}{Copying}
+\addcontentsline{toc}{subsection}{Copying}
\begin{quote}
SMARTALLOC is in the public domain. Permission to use, copy, modify, and
%%
%%
-\section*{Storage Daemon Design}
+\chapter{Storage Daemon Design}
\label{_ChapterStart3}
\index{Storage Daemon Design }
\index{Design!Storage Daemon }
This document is somewhat out of date.
-\subsection*{SD Design Introduction}
+\section{SD Design Introduction}
\index{Introduction!SD Design }
\index{SD Design Introduction }
-\addcontentsline{toc}{subsection}{SD Design Introduction}
+\addcontentsline{toc}{section}{SD Design Introduction}
The Bacula Storage daemon provides storage resources to a Bacula installation.
An individual Storage daemon is associated with a physical permanent storage
security measures) permits automatic off-site backup, possibly to publicly
available backup repositories.
-\subsection*{SD Development Outline}
+\section{SD Development Outline}
\index{Outline!SD Development }
\index{SD Development Outline }
-\addcontentsline{toc}{subsection}{SD Development Outline}
+\addcontentsline{toc}{section}{SD Development Outline}
In order to provide a high performance backup and restore solution that scales
to very large capacity devices and networks, the storage daemon must be able
to high-speed intermediate media, and support for tape changers and jukeboxes.
-\subsection*{SD Connections and Sessions}
+\section{SD Connections and Sessions}
\index{Sessions!SD Connections and }
\index{SD Connections and Sessions }
-\addcontentsline{toc}{subsection}{SD Connections and Sessions}
+\addcontentsline{toc}{section}{SD Connections and Sessions}
A client connects to a storage server by initiating a conventional TCP
connection. The storage server accepts the connection unless its maximum
with a comprehensive list of status codes along with which requests can
produce them in an update to this document.
-\subsubsection*{SD Append Requests}
+\subsection{SD Append Requests}
\index{Requests!SD Append }
\index{SD Append Requests }
-\addcontentsline{toc}{subsubsection}{SD Append Requests}
+\addcontentsline{toc}{subsection}{SD Append Requests}
\begin{description}
stored on that volume.
\end{description}
-\subsubsection*{SD Read Requests}
+\subsection{SD Read Requests}
\index{SD Read Requests }
\index{Requests!SD Read }
-\addcontentsline{toc}{subsubsection}{SD Read Requests}
+\addcontentsline{toc}{subsection}{SD Read Requests}
\begin{description}
\elink{John Walker}{http://www.fourmilab.ch/}
January 30th, MM }
-\subsection*{SD Data Structures}
+\section{SD Data Structures}
\index{SD Data Structures}
-\addcontentsline{toc}{subsection}{SD Data Structures}
+\addcontentsline{toc}{section}{SD Data Structures}
In the Storage daemon, there is a Device resource (i.e. from conf file)
that describes each physical device. When the physical device is used it
DEVICE = Device only control data
\end{verbatim}
-
-
%\author{Landon Fuller}
%\title{Bacula TLS Additions}
-\section{TLS}
+\chapter{TLS}
\label{_Chapter_TLS}
\index{TLS}
-\addcontentsline{toc}{section}{TLS}
Written by Landon Fuller
-\subsection{Introduction to TLS}
+\section{Introduction to TLS}
\index{TLS Introduction}
\index{Introduction!TLS}
-\addcontentsline{toc}{subsection}{TLS Introduction}
+\addcontentsline{toc}{section}{TLS Introduction}
This patch includes all the back-end code necessary to add complete TLS
data encryption support to Bacula. In addition, support for TLS in
\emph{src/lib/tls.c} to facilitate the support of alternative TLS
implementations.
-\subsection{New Configuration Directives}
+\section{New Configuration Directives}
\index{TLS Configuration Directives}
\index{Directives!TLS Configuration}
-\addcontentsline{toc}{subsection}{New Configuration Directives}
+\addcontentsline{toc}{section}{New Configuration Directives}
Additional configuration directives have been added to both the Console and
Director resources. These new directives are defined as follows:
\normalsize
\end{itemize}
-\subsection{TLS API Implementation}
+\section{TLS API Implementation}
\index{TLS API Implimentation}
\index{API Implimentation!TLS}
-\addcontentsline{toc}{subsection}{TLS API Implementation}
+\addcontentsline{toc}{section}{TLS API Implementation}
To facilitate the use of additional TLS libraries, all OpenSSL-specific
code has been implemented within \emph{src/lib/tls.c}. In turn, a generic
TLS API is exported.
-\subsubsection{Library Initialization and Cleanup}
+\subsection{Library Initialization and Cleanup}
\index{Library Initialization and Cleanup}
\index{Initialization and Cleanup!Library}
-\addcontentsline{toc}{subsubsection}{Library Initialization and Cleanup}
+\addcontentsline{toc}{subsection}{Library Initialization and Cleanup}
\footnotesize
\begin{verbatim}
Performs TLS library cleanup.
-\subsubsection{Manipulating TLS Contexts}
+\subsection{Manipulating TLS Contexts}
\index{TLS Context Manipulation}
\index{Contexts!Manipulating TLS}
-\addcontentsline{toc}{subsubsection}{Manipulating TLS Contexts}
+\addcontentsline{toc}{subsection}{Manipulating TLS Contexts}
\footnotesize
\begin{verbatim}
Deallocated a previously allocated \emph{TLS\_CONTEXT} structure.
-\subsubsection{Performing Post-Connection Verification}
+\subsection{Performing Post-Connection Verification}
\index{TLS Post-Connection Verification}
\index{Verification!TLS Post-Connection}
-\addcontentsline{toc}{subsubsection}{Performing Post-Connection Verification}
+\addcontentsline{toc}{subsection}{Performing Post-Connection Verification}
\footnotesize
\begin{verbatim}
strings supplied via the \emph{verify\_list} parameter. Returns
\emph{true} if there is a match, \emph{false} otherwise.
-\subsubsection{Manipulating TLS Connections}
+\subsection{Manipulating TLS Connections}
\index{TLS Connection Manipulation}
\index{Connections!Manipulating TLS}
-\addcontentsline{toc}{subsubsection}{Manipulating TLS Connections}
+\addcontentsline{toc}{subsection}{Manipulating TLS Connections}
\footnotesize
\begin{verbatim}
function returns. Less than \emph{nbytes} may be read if an error occurs.
The actual number of bytes read will be returned.
-\subsection{Bnet API Changes}
+\section{Bnet API Changes}
\index{Bnet API Changes}
\index{API Changes!Bnet}
-\addcontentsline{toc}{subsection}{Bnet API Changes}
+\addcontentsline{toc}{section}{Bnet API Changes}
A minimal number of changes were required in the Bnet socket API. The BSOCK
structure was expanded to include an associated TLS\_CONNECTION structure,
The blocking state flag is required for win32, where it does not appear
possible to discern the current blocking state of a socket.
-\subsubsection{Negotiating a TLS Connection}
+\subsection{Negotiating a TLS Connection}
\index{Negotiating a TLS Connection}
\index{TLS Connection!Negotiating}
-\addcontentsline{toc}{subsubsection}{Negotiating a TLS Connection}
+\addcontentsline{toc}{subsection}{Negotiating a TLS Connection}
\emph{bnet\_tls\_server()} and \emph{bnet\_tls\_client()} were both
implemented using the new TLS API as follows:
\emph{ctx}. If \emph{verify\_list} is non-NULL, it is passed to
\emph{tls\_postconnect\_verify\_cn()} for client certificate verification.
-\subsubsection{Manipulating Socket Blocking State}
+\subsection{Manipulating Socket Blocking State}
\index{Manipulating Socket Blocking State}
\index{Socket Blocking State!Manipulating}
\index{Blocking State!Socket!Manipulating}
-\addcontentsline{toc}{subsubsection}{Manipulating Socket Blocking State}
+\addcontentsline{toc}{subsection}{Manipulating Socket Blocking State}
Three functions were added for manipulating the blocking state of a socket
on both Win32 and Unix-like systems. The Win32 code was written according
\pagebreak
-\subsection{Authentication Negotiation}
+\section{Authentication Negotiation}
\index{Authentication Negotiation}
\index{Negotiation!TLS Authentication}
-\addcontentsline{toc}{subsection}{Authentication Negotiation}
+\addcontentsline{toc}{section}{Authentication Negotiation}
Backwards compatibility with the existing SSL negotiation hooks implemented
in src/lib/cram-md5.c have been maintained. The