diff options
Diffstat (limited to 'docs/htmldocs/Samba3-Developers-Guide/internals.html')
-rw-r--r-- | docs/htmldocs/Samba3-Developers-Guide/internals.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/docs/htmldocs/Samba3-Developers-Guide/internals.html b/docs/htmldocs/Samba3-Developers-Guide/internals.html index 6dd18957bc..4492bc5c94 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/internals.html +++ b/docs/htmldocs/Samba3-Developers-Guide/internals.html @@ -1,4 +1,4 @@ -<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.72.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"><<a href="mailto:David.Chappell@mail.trincoll.edu">David.Chappell@mail.trincoll.edu</a>></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#id330662">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id330682">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id330789">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id330799">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330809">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330820">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330830">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330842">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330853">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330864">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330874">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330885">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330896">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330907">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330918">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330928">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330939">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id330950">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id330962">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id330987">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id331097">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id331155">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="id330662"></a>Character Handling</h2></div></div></div><p> +<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"><<a class="email" href="mailto:David.Chappell@mail.trincoll.edu">David.Chappell@mail.trincoll.edu</a>></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#id2578800">Character Handling</a></span></dt><dt><span class="sect1"><a href="internals.html#id2578821">The new functions</a></span></dt><dt><span class="sect1"><a href="internals.html#id2578952">Macros in byteorder.h</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2578963">CVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2578974">PVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2578986">SCVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2578997">SVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579010">IVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579021">SVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579033">IVALS(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579045">SSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579057">SIVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579069">SSVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579080">SIVALS(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579092">RSVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579104">RIVAL(buf,pos)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579116">RSSVAL(buf,pos,val)</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579128">RSIVAL(buf,pos,val)</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2579141">LAN Manager Samba API</a></span></dt><dd><dl><dt><span class="sect2"><a href="internals.html#id2579170">Parameters</a></span></dt><dt><span class="sect2"><a href="internals.html#id2579296">Return value</a></span></dt></dl></dd><dt><span class="sect1"><a href="internals.html#id2579367">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="id2578800"></a>Character Handling</h2></div></div></div><p> This section describes character set handling in Samba, as implemented in Samba 3.0 and above </p><p> @@ -8,7 +8,7 @@ strings to/from DOS codepages. The problem is that there was no way of telling if a particular char* is in dos codepage or unix codepage. This led to a nightmare of code that tried to cope with particular cases without handlingt the general case. -</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id330682"></a>The new functions</h2></div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2578821"></a>The new functions</h2></div></div></div><p> The new system works like this: </p><div class="orderedlist"><ol type="1"><li><p> all char* strings inside Samba are "unix" strings. These are @@ -70,28 +70,28 @@ The new system works like this: parameters is gone. </p></li><li><p> all vfs functions take unix strings. Don't convert when passing to them -</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id330789"></a>Macros in byteorder.h</h2></div></div></div><p> +</p></li></ol></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2578952"></a>Macros in byteorder.h</h2></div></div></div><p> This section describes the macros defined in byteorder.h. These macros are used extensively in the Samba code. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330799"></a>CVAL(buf,pos)</h3></div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2578963"></a>CVAL(buf,pos)</h3></div></div></div><p> returns the byte at offset pos within buffer buf as an unsigned character. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330809"></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="id330820"></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="id330830"></a>SVAL(buf,pos)</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2578974"></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="id2578986"></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="id2578997"></a>SVAL(buf,pos)</h3></div></div></div><p> returns the value of the unsigned short (16 bit) little-endian integer at offset pos within buffer buf. An integer of this type is sometimes refered to as "USHORT". -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330842"></a>IVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit little-endian integer at offset -pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330853"></a>SVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed short (16 bit) little-endian integer at -offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330864"></a>IVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed 32 bit little-endian integer at offset pos -within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330874"></a>SSVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned short (16 bit) little-endian integer 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="id330885"></a>SIVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned 32 bit little-endian integer at offset pos within buffer -buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330896"></a>SSVALS(buf,pos,val)</h3></div></div></div><p>sets the short (16 bit) signed little-endian integer at offset pos within -buffer buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330907"></a>SIVALS(buf,pos,val)</h3></div></div></div><p>sets the signed 32 bit little-endian integer at offset pos withing buffer -buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330918"></a>RSVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned short (16 bit) big-endian integer at -offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330928"></a>RIVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit big-endian integer at offset -pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330939"></a>RSSVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned short (16 bit) big-endian integer at +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579010"></a>IVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit little-endian integer at offset +pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579021"></a>SVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed short (16 bit) little-endian integer at +offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579033"></a>IVALS(buf,pos)</h3></div></div></div><p>returns the value of the signed 32 bit little-endian integer at offset pos +within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579045"></a>SSVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned short (16 bit) little-endian integer 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="id2579057"></a>SIVAL(buf,pos,val)</h3></div></div></div><p>sets the unsigned 32 bit little-endian integer at offset pos within buffer +buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579069"></a>SSVALS(buf,pos,val)</h3></div></div></div><p>sets the short (16 bit) signed little-endian integer at offset pos within +buffer buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579080"></a>SIVALS(buf,pos,val)</h3></div></div></div><p>sets the signed 32 bit little-endian integer at offset pos withing buffer +buf to the value val.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579092"></a>RSVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned short (16 bit) big-endian integer at +offset pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579104"></a>RIVAL(buf,pos)</h3></div></div></div><p>returns the value of the unsigned 32 bit big-endian integer at offset +pos within buffer buf.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579116"></a>RSSVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned short (16 bit) big-endian integer at offset pos within buffer buf to value val. -refered to as "USHORT".</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330950"></a>RSIVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned 32 bit big-endian integer at offset -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="id330962"></a>LAN Manager Samba API</h2></div></div></div><p> +refered to as "USHORT".</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579128"></a>RSIVAL(buf,pos,val)</h3></div></div></div><p>sets the value of the unsigned 32 bit big-endian integer at offset +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="id2579141"></a>LAN Manager Samba API</h2></div></div></div><p> This section describes the functions need to make a LAN Manager RPC call. This information had been obtained by examining the Samba code and the LAN Manager 2.0 API documentation. It should not be considered entirely @@ -104,7 +104,7 @@ call_api(int prcnt, int drcnt, int mprcnt, int mdrcnt, </p><p> This function is defined in client.c. It uses an SMB transaction to call a remote api. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id330987"></a>Parameters</h3></div></div></div><p>The parameters are as follows:</p><div class="orderedlist"><ol type="1"><li><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579170"></a>Parameters</h3></div></div></div><p>The parameters are as follows:</p><div class="orderedlist"><ol type="1"><li><p> prcnt: the number of bytes of parameters begin sent. </p></li><li><p> drcnt: the number of bytes of data begin sent. @@ -149,7 +149,7 @@ substructures apply, this string is of zero length. </p></li></ol></div><p> The code in client.c always calls call_api() with no data. It is unclear when a non-zero length data buffer would be sent. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id331097"></a>Return value</h3></div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2579296"></a>Return value</h3></div></div></div><p> The returned parameters (pointed to by rparam), in their order of appearance are:</p><div class="orderedlist"><ol type="1"><li><p> An unsigned 16 bit integer which contains the API function's return code. @@ -180,7 +180,7 @@ fix_char_ptr() in client.c can be used for this purpose. The third parameter (which may be read as "SVAL(rparam,4)") has something to do with indicating the amount of data returned or possibly the amount of data which can be returned if enough buffer space is allowed. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id331155"></a>Code character table</h2></div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2579367"></a>Code character table</h2></div></div></div><p> Certain data structures are described by means of ASCIIz strings containing code characters. These are the code characters: </p><div class="orderedlist"><ol type="1"><li><p> |