summaryrefslogtreecommitdiff
path: root/docs/Samba-Developers-Guide/rpc_plugin.xml
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-06-20 12:43:16 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:45:56 -0500
commit83a17815a7689f1f6f7ca57161a0e804277c75f9 (patch)
treee1cec10510da7038e843f71c9ba95a0e6bc5f494 /docs/Samba-Developers-Guide/rpc_plugin.xml
parent9eb45e211cbc28bbd28837a17dcec3df29d6f455 (diff)
downloadsamba-83a17815a7689f1f6f7ca57161a0e804277c75f9.tar.gz
samba-83a17815a7689f1f6f7ca57161a0e804277c75f9.tar.bz2
samba-83a17815a7689f1f6f7ca57161a0e804277c75f9.zip
New structure for the docs:
- Same name for a doc everywhere (howto -> Samba-HOWTO-Collection, etc) - Shorter and more clearly structured Makefile - Make it possible to change the paths for the images (This used to be commit 96f6c05f25acc8a9bb1977b8bd5cc97ce511b6b1)
Diffstat (limited to 'docs/Samba-Developers-Guide/rpc_plugin.xml')
-rw-r--r--docs/Samba-Developers-Guide/rpc_plugin.xml94
1 files changed, 94 insertions, 0 deletions
diff --git a/docs/Samba-Developers-Guide/rpc_plugin.xml b/docs/Samba-Developers-Guide/rpc_plugin.xml
new file mode 100644
index 0000000000..478847b192
--- /dev/null
+++ b/docs/Samba-Developers-Guide/rpc_plugin.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+ <!ENTITY % global_entities SYSTEM '../entities/global.entities'>
+ %global_entities;
+]>
+<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>