Ignore:
Timestamp:
Mar 1, 2010, 3:05:48 PM (15 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3.x to 3.3.11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/docs/htmldocs/Samba3-Developers-Guide/internals.html

    r368 r411  
    1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Samba Internals</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="debug.html" title="Chapter 4. The samba DEBUG system"><link rel="next" href="CodingSuggestions.html" title="Chapter 6. Coding Suggestions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Samba Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="CodingSuggestions.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5. Samba Internals"><div class="titlepage"><div><div><h2 class="title"><a name="internals"></a>Chapter 5. Samba Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="surname">Chappell</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:David.Chappell@mail.trincoll.edu">David.Chappell@mail.trincoll.edu</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">8 May 1996</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="internals.html#id2563435">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563456">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2563585">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563596">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563607">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563618">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563628">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563641">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563652">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563664">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563675">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563686">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563698">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563709">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563720">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563732">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563743">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563755">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563768">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2563796">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2563920">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2563990">Code character table</a></span></dt></dl></div><div class="sect1" title="Character Handling"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563435"></a>Character Handling</h2></div></div></div><p>
     1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Samba Internals</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt02.html" title="Part II. Samba Basics"><link rel="prev" href="debug.html" title="Chapter 4. The samba DEBUG system"><link rel="next" href="CodingSuggestions.html" title="Chapter 6. Coding Suggestions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. Samba Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><th width="60%" align="center">Part II. Samba Basics</th><td width="20%" align="right"> <a accesskey="n" href="CodingSuggestions.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="internals"></a>Chapter 5. Samba Internals</h2></div><div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="surname">Chappell</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:David.Chappell@mail.trincoll.edu">David.Chappell@mail.trincoll.edu</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">8 May 1996</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="internals.html#id2557363">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557384">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557513">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557523">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557534">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557545">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557556">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557568">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557580">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557591">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557603">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557614">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557625">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557637">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557648">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557660">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557671">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557683">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557696">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557723">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557848">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557918">Code character table</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557363"></a>Character Handling</h2></div></div></div><p>
    22This section describes character set handling in Samba, as implemented in
    33Samba 3.0 and above
     
    99codepage. This led to a nightmare of code that tried to cope with
    1010particular cases without handlingt the general case.
    11 </p></div><div class="sect1" title="The new functions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563456"></a>The new functions</h2></div></div></div><p>
     11</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557384"></a>The new functions</h2></div></div></div><p>
    1212The new system works like this:
    13 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
     13</p><div class="orderedlist"><ol type="1"><li><p>
    1414        all char* strings inside Samba are "unix" strings. These are
    1515        multi-byte strings that are in the charset defined by the "unix
    1616        charset" option in smb.conf.
    17 </p></li><li class="listitem"><p>
     17</p></li><li><p>
    1818        there is no single fixed character set for unix strings, but any
    1919        character set that is used does need the following properties:
    20         </p><div class="orderedlist"><ol class="orderedlist" type="a"><li class="listitem"><p>
     20        </p><div class="orderedlist"><ol type="a"><li><p>
    2121                must not contain NULLs except for termination
    22         </p></li><li class="listitem"><p>
     22        </p></li><li><p>
    2323                must be 7-bit compatible with C strings, so that a constant
    2424                string or character in C will be byte-for-byte identical to the
    2525                equivalent string in the chosen character set.
    26         </p></li><li class="listitem"><p>
     26        </p></li><li><p>
    2727                when you uppercase or lowercase a string it does not become
    2828                longer than the original string
    29         </p></li><li class="listitem"><p>
     29        </p></li><li><p>
    3030                must be able to correctly hold all characters that your client
    3131                will throw at it
     
    3434        are fine, but UCS2 could not be used for unix strings as they
    3535        contain nulls.
    36         </p></li><li class="listitem"><p>
     36        </p></li><li><p>
    3737        when you need to put a string into a buffer that will be sent on the
    3838        wire, or you need a string in a character set format that is
     
    4141        wire buffer into a (multi-byte) unix string. The push_ functions
    4242        push a string out to a wire buffer.
    43 </p></li><li class="listitem"><p>
     43</p></li><li><p>
    4444        the two main pull_ and push_ functions you need to understand are
    4545        pull_string and push_string. These functions take a base pointer
     
    5858        charcnv.c that call the pull_/push_ functions with particularly
    5959        common arguments, such as pull_ascii_pstring()
    60         </p></li><li class="listitem"><p>
     60        </p></li><li><p>
    6161        The biggest thing to remember is that internal (unix) strings in Samba
    6262        may now contain multi-byte characters. This means you cannot assume
     
    6666        like strchr_m(). I know this is very slow, and we will eventually
    6767        speed it up but right now we want this stuff correct not fast.
    68 </p></li><li class="listitem"><p>
     68</p></li><li><p>
    6969        all lp_ functions now return unix strings. The magic "DOS" flag on
    7070        parameters is gone.
    71 </p></li><li class="listitem"><p>
     71</p></li><li><p>
    7272        all vfs functions take unix strings. Don't convert when passing to them
    73 </p></li></ol></div></div><div class="sect1" title="Macros in byteorder.h"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563585"></a>Macros in byteorder.h</h2></div></div></div><p>
     73</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557513"></a>Macros in byteorder.h</h2></div></div></div><p>
    7474This section describes the macros defined in byteorder.h.  These macros
    7575are used extensively in the Samba code.
    76 </p><div class="sect2" title="CVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563596"></a>CVAL(buf,pos)</h3></div></div></div><p>
     76</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557523"></a>CVAL(buf,pos)</h3></div></div></div><p>
    7777returns the byte at offset pos within buffer buf as an unsigned character.
    78 </p></div><div class="sect2" title="PVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563607"></a>PVAL(buf,pos)</h3></div></div></div><p>returns the value of CVAL(buf,pos) cast to type unsigned integer.</p></div><div class="sect2" title="SCVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563618"></a>SCVAL(buf,pos,val)</h3></div></div></div><p>sets the byte at offset pos within buffer buf to value val.</p></div><div class="sect2" title="SVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563628"></a>SVAL(buf,pos)</h3></div></div></div><p>
     78</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557534"></a>PVAL(buf,pos)</h3></div></div></div><p>returns the value of CVAL(buf,pos) cast to type unsigned integer.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557545"></a>SCVAL(buf,pos,val)</h3></div></div></div><p>sets the byte at offset pos within buffer buf to value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557556"></a>SVAL(buf,pos)</h3></div></div></div><p>
    7979        returns the value of the unsigned short (16 bit) little-endian integer at
    8080        offset pos within buffer buf.  An integer of this type is sometimes
    8181        refered to as "USHORT".
    82 </p></div><div class="sect2" title="IVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563641"></a>IVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit little-endian integer at offset
    83 pos within buffer buf.</p></div><div class="sect2" title="SVALS(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563652"></a>SVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed short (16 bit) little-endian integer at
    84 offset pos within buffer buf.</p></div><div class="sect2" title="IVALS(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563664"></a>IVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed 32 bit little-endian integer at offset pos
    85 within buffer buf.</p></div><div class="sect2" title="SSVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563675"></a>SSVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned short (16 bit) little-endian integer at offset pos within
    86 buffer buf to value val.</p></div><div class="sect2" title="SIVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563686"></a>SIVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned 32 bit little-endian integer at offset pos within buffer
    87 buf to the value val.</p></div><div class="sect2" title="SSVALS(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563698"></a>SSVALS(buf,pos,val)</h3></div></div></div><p>sets the short (16 bit) signed little-endian integer at offset pos within
    88 buffer buf to the value val.</p></div><div class="sect2" title="SIVALS(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563709"></a>SIVALS(buf,pos,val)</h3></div></div></div><p>sets the signed 32 bit little-endian integer at offset pos withing buffer
    89 buf to the value val.</p></div><div class="sect2" title="RSVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563720"></a>RSVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned short (16 bit) big-endian integer at
    90 offset pos within buffer buf.</p></div><div class="sect2" title="RIVAL(buf,pos)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563732"></a>RIVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit big-endian integer at offset
    91 pos within buffer buf.</p></div><div class="sect2" title="RSSVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563743"></a>RSSVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned short (16 bit) big-endian integer at
     82</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557568"></a>IVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit little-endian integer at offset
     83pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557580"></a>SVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed short (16 bit) little-endian integer at
     84offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557591"></a>IVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed 32 bit little-endian integer at offset pos
     85within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557603"></a>SSVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned short (16 bit) little-endian integer at offset pos within
     86buffer buf to value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557614"></a>SIVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned 32 bit little-endian integer at offset pos within buffer
     87buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557625"></a>SSVALS(buf,pos,val)</h3></div></div></div><p>sets the short (16 bit) signed little-endian integer at offset pos within
     88buffer buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557637"></a>SIVALS(buf,pos,val)</h3></div></div></div><p>sets the signed 32 bit little-endian integer at offset pos withing buffer
     89buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557648"></a>RSVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned short (16 bit) big-endian integer at
     90offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557660"></a>RIVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit big-endian integer at offset
     91pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557671"></a>RSSVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned short (16 bit) big-endian integer at
    9292offset pos within buffer buf to value val.
    93 refered to as "USHORT".</p></div><div class="sect2" title="RSIVAL(buf,pos,val)"><div class="titlepage"><div><div><h3 class="title"><a name="id2563755"></a>RSIVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned 32 bit big-endian integer at offset
    94 pos within buffer buf to value val.</p></div></div><div class="sect1" title="LAN Manager Samba API"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563768"></a>LAN Manager Samba API</h2></div></div></div><p>
     93refered to as "USHORT".</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557683"></a>RSIVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned 32 bit big-endian integer at offset
     94pos within buffer buf to value val.</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557696"></a>LAN Manager Samba API</h2></div></div></div><p>
    9595This section describes the functions need to make a LAN Manager RPC call.
    9696This information had been obtained by examining the Samba code and the LAN
     
    105105This function is defined in client.c.  It uses an SMB transaction to call a
    106106remote api.
    107 </p><div class="sect2" title="Parameters"><div class="titlepage"><div><div><h3 class="title"><a name="id2563796"></a>Parameters</h3></div></div></div><p>The parameters are as follows:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
     107</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557723"></a>Parameters</h3></div></div></div><p>The parameters are as follows:</p><div class="orderedlist"><ol type="1"><li><p>
    108108        prcnt: the number of bytes of parameters begin sent.
    109 </p></li><li class="listitem"><p>
     109</p></li><li><p>
    110110        drcnt:   the number of bytes of data begin sent.
    111 </p></li><li class="listitem"><p>
     111</p></li><li><p>
    112112        mprcnt:  the maximum number of bytes of parameters which should be returned
    113 </p></li><li class="listitem"><p>
     113</p></li><li><p>
    114114        mdrcnt:  the maximum number of bytes of data which should be returned
    115 </p></li><li class="listitem"><p>
     115</p></li><li><p>
    116116        param:   a pointer to the parameters to be sent.
    117 </p></li><li class="listitem"><p>
     117</p></li><li><p>
    118118        data:    a pointer to the data to be sent.
    119 </p></li><li class="listitem"><p>
     119</p></li><li><p>
    120120        rparam:  a pointer to a pointer which will be set to point to the returned
    121121        parameters.  The caller of call_api() must deallocate this memory.
    122 </p></li><li class="listitem"><p>
     122</p></li><li><p>
    123123        rdata:   a pointer to a pointer which will be set to point to the returned
    124124        data.  The caller of call_api() must deallocate this memory.
     
    126126These are the parameters which you ought to send, in the order of their
    127127appearance in the parameter block:
    128 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
     128</p><div class="orderedlist"><ol type="1"><li><p>
    129129An unsigned 16 bit integer API number.  You should set this value with
    130130SSVAL().  I do not know where these numbers are described.
    131 </p></li><li class="listitem"><p>
     131</p></li><li><p>
    132132An ASCIIZ string describing the parameters to the API function as defined
    133133in the LAN Manager documentation.  The first parameter, which is the server
    134134name, is ommited.  This string is based uppon the API function as described
    135135in the manual, not the data which is actually passed.
    136 </p></li><li class="listitem"><p>
     136</p></li><li><p>
    137137An ASCIIZ string describing the data structure which ought to be returned.
    138 </p></li><li class="listitem"><p>
     138</p></li><li><p>
    139139Any parameters which appear in the function call, as defined in the LAN
    140140Manager API documentation, after the "Server" and up to and including the
    141141"uLevel" parameters.
    142 </p></li><li class="listitem"><p>
     142</p></li><li><p>
    143143An unsigned 16 bit integer which gives the size in bytes of the buffer we
    144144will use to receive the returned array of data structures.  Presumably this
    145145should be the same as mdrcnt.  This value should be set with SSVAL().
    146 </p></li><li class="listitem"><p>
     146</p></li><li><p>
    147147An ASCIIZ string describing substructures which should be returned.  If no
    148148substructures apply, this string is of zero length.
     
    150150The code in client.c always calls call_api() with no data.  It is unclear
    151151when a non-zero length data buffer would be sent.
    152 </p></div><div class="sect2" title="Return value"><div class="titlepage"><div><div><h3 class="title"><a name="id2563920"></a>Return value</h3></div></div></div><p>
     152</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2557848"></a>Return value</h3></div></div></div><p>
    153153The returned parameters (pointed to by rparam), in their order of appearance
    154 are:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
     154are:</p><div class="orderedlist"><ol type="1"><li><p>
    155155An unsigned 16 bit integer which contains the API function's return code.
    156156This value should be read with SVAL().
    157 </p></li><li class="listitem"><p>
     157</p></li><li><p>
    158158An adjustment which tells the amount by which pointers in the returned
    159159data should be adjusted.  This value should be read with SVAL().  Basically,
     
    161161pointer value added to it and then have this value subtracted from it in
    162162order to obtain the currect offset into the returned data buffer.
    163 </p></li><li class="listitem"><p>
     163</p></li><li><p>
    164164A count of the number of elements in the array of structures returned.
    165165It is also possible that this may sometimes be the number of bytes returned.
     
    181181do with indicating the amount of data returned or possibly the amount of
    182182data which can be returned if enough buffer space is allowed.
    183 </p></div></div><div class="sect1" title="Code character table"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2563990"></a>Code character table</h2></div></div></div><p>
     183</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2557918"></a>Code character table</h2></div></div></div><p>
    184184Certain data structures are described by means of ASCIIz strings containing
    185185code characters.  These are the code characters:
    186 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
     186</p><div class="orderedlist"><ol type="1"><li><p>
    187187W       a type byte little-endian unsigned integer
    188 </p></li><li class="listitem"><p>
     188</p></li><li><p>
    189189N       a count of substructures which follow
    190 </p></li><li class="listitem"><p>
     190</p></li><li><p>
    191191D       a four byte little-endian unsigned integer
    192 </p></li><li class="listitem"><p>
     192</p></li><li><p>
    193193B       a byte (with optional count expressed as trailing ASCII digits)
    194 </p></li><li class="listitem"><p>
     194</p></li><li><p>
    195195z       a four byte offset to a NULL terminated string
    196 </p></li><li class="listitem"><p>
     196</p></li><li><p>
    197197l       a four byte offset to non-string user data
    198 </p></li><li class="listitem"><p>
     198</p></li><li><p>
    199199b       an offset to data (with count expressed as trailing ASCII digits)
    200 </p></li><li class="listitem"><p>
     200</p></li><li><p>
    201201r       pointer to returned data buffer???
    202 </p></li><li class="listitem"><p>
     202</p></li><li><p>
    203203L       length in bytes of returned data buffer???
    204 </p></li><li class="listitem"><p>
     204</p></li><li><p>
    205205h       number of bytes of information available???
    206206</p></li></ol></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="debug.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pt02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="CodingSuggestions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. The samba DEBUG system </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Coding Suggestions</td></tr></table></div></body></html>
Note: See TracChangeset for help on using the changeset viewer.