Ignore:
Timestamp:
May 27, 2009, 9:08:03 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.8 docs

File:
1 edited

Legend:

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

    r226 r231  
    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.73.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 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#id2549793">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2549815">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2549946">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2549957">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2549968">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2549979">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2549990">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550003">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550015">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550027">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550039">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550050">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550062">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550074">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550086">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550098">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550109">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550122">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2550135">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2550163">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2550289">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2550361">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="id2549793"></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#id2557379">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557400">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2557529">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557539">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557550">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557561">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557572">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557584">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557596">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557607">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557619">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557630">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557641">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557653">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557664">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557676">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557687">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557699">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557712">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2557739">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2557864">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2557934">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="id2557379"></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="id2549815"></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="id2557400"></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="id2549946"></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="id2557529"></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="id2549957"></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="id2557539"></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="id2549968"></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="id2549979"></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="id2549990"></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="id2557550"></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="id2557561"></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="id2557572"></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="id2550003"></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="id2550015"></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="id2550027"></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="id2550039"></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="id2550050"></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="id2550062"></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="id2550074"></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="id2550086"></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="id2550098"></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="id2550109"></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="id2557584"></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="id2557596"></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="id2557607"></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="id2557619"></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="id2557630"></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="id2557641"></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="id2557653"></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="id2557664"></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="id2557676"></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="id2557687"></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="id2550122"></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="id2550135"></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="id2557699"></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="id2557712"></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="id2550163"></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="id2557739"></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="id2550289"></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="id2557864"></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="id2550361"></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="id2557934"></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.