1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/docs-xml/Samba-Developers-Guide/rpc_plugin.xml
Karolin Seeger cc7ae1098a docs: Rename Samba3-Developers-Guide to Samba-Developers-Guide
This guide is not obsolete but needs an update.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed May 10 19:57:36 CEST 2017 on sn-devel-144
2017-05-10 19:57:36 +02:00

91 lines
2.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
<chapter id="rpc-plugin">
<chapterinfo>
<author>
<firstname>Anthony</firstname><surname>Liguori</surname>
<affiliation>
<orgname>IBM</orgname>
<address><email>aliguor@us.ibm.com</email></address>
</affiliation>
</author>
<author>
<firstname>Jelmer</firstname><surname>Vernooij</surname>
<affiliation>
<orgname>Samba Team</orgname>
<address><email>jelmer@samba.org</email></address>
</affiliation>
</author>
<pubdate>January 2003</pubdate>
</chapterinfo>
<title>RPC Pluggable Modules</title>
<sect1>
<title>About</title>
<para>
This document describes how to make use the new RPC Pluggable Modules features
of Samba 3.0. This architecture was added to increase the maintainability of
Samba allowing RPC Pipes to be worked on separately from the main CVS branch.
The RPM architecture will also allow third-party vendors to add functionality
to Samba through plug-ins.
</para>
</sect1>
<sect1>
<title>General Overview</title>
<para>
When an RPC call is sent to smbd, smbd tries to load a shared library by the
name <filename>librpc_&lt;pipename&gt;.so</filename> to handle the call if
it doesn't know how to handle the call internally. For instance, LSA calls
are handled by <filename>librpc_lsass.so</filename>..
These shared libraries should be located in the <filename>&lt;sambaroot&gt;/lib/rpc</filename>. smbd then attempts to call the init_module function within
the shared library. Check the chapter on modules for more information.
</para>
<para>
In the init_module function, the library should call
rpc_pipe_register_commands(). This function takes the following arguments:
</para>
<para><programlisting>
NTSTATUS rpc_pipe_register_commands(int version, const char *clnt, const char *srv,
const struct api_struct *cmds, int size);
</programlisting></para>
<variablelist>
<varlistentry><term>version</term>
<listitem><para>Version number of the RPC interface. Use the define <emphasis>SMB_RPC_INTERFACE_VERSION</emphasis> for this
argument.</para></listitem>
</varlistentry>
<varlistentry><term>clnt</term>
<listitem><para>the Client name of the named pipe</para></listitem>
</varlistentry>
<varlistentry><term>srv</term>
<listitem><para>the Server name of the named pipe</para></listitem>
</varlistentry>
<varlistentry><term>cmds</term>
<listitem><para>a list of api_structs that map RPC ordinal numbers to function calls</para></listitem>
</varlistentry>
<varlistentry><term>size</term>
<listitem><para>the number of api_structs contained in cmds</para></listitem>
</varlistentry>
</variablelist>
<para>
See rpc_server/srv_reg.c and rpc_server/srv_reg_nt.c for a small example of
how to use this library.
</para>
</sect1>
</chapter>