Ignore:
Timestamp:
May 26, 2007, 10:26:26 PM (14 years ago)
Author:
Paul Smedley
Message:

Upgrade source to 3.0.25a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/docs/htmldocs/Samba3-Developers-Guide/internals.html

    r1 r39  
    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.68.1"><link rel="start" 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 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#id292948">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id292965">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id293071">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id293081">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293092">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293102">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293113">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293124">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293135">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293146">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293157">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293168">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293178">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293189">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293200">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293211">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293222">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id293233">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id293244">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id293269">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id293379">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id293437">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="id292948"></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.71.0"><link rel="start" 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 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#id322561">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id322578">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id322684">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id322694">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322705">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322716">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322726">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322738">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322748">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322759">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322770">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322781">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322792">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322802">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322813">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322824">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322835">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id322846">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id322858">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id322882">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id322992">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id323050">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="id322561"></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" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id292965"></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="id322578"></a>The new functions</h2></div></div></div><p>
    1212The new system works like this:
    1313</p><div class="orderedlist"><ol type="1"><li><p>
     
    7171</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" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id293071"></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="id322684"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293081"></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="id322694"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293092"></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="id293102"></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="id293113"></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="id322705"></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="id322716"></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="id322726"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293124"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293135"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293146"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293157"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293168"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293178"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293189"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293200"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293211"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293222"></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="id322738"></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="id322748"></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="id322759"></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="id322770"></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="id322781"></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="id322792"></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="id322802"></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="id322813"></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="id322824"></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="id322835"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293233"></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" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id293244"></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="id322846"></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="id322858"></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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293269"></a>Parameters</h3></div></div></div><p>The parameters are as follows:</p><div class="orderedlist"><ol type="1"><li><p>
     107</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id322882"></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.
    109109</p></li><li><p>
     
    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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id293379"></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="id322992"></a>Return value</h3></div></div></div><p>
    153153The returned parameters (pointed to by rparam), in their order of appearance
    154154are:</p><div class="orderedlist"><ol type="1"><li><p>
     
    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" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id293437"></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="id323050"></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:
Note: See TracChangeset for help on using the changeset viewer.