- Timestamp:
- Mar 1, 2010, 3:05:48 PM (15 years ago)
- 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.7 5.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"><<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#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"><<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#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> 2 2 This section describes character set handling in Samba, as implemented in 3 3 Samba 3.0 and above … … 9 9 codepage. This led to a nightmare of code that tried to cope with 10 10 particular 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> 12 12 The 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> 14 14 all char* strings inside Samba are "unix" strings. These are 15 15 multi-byte strings that are in the charset defined by the "unix 16 16 charset" option in smb.conf. 17 </p></li><li class="listitem"><p>17 </p></li><li><p> 18 18 there is no single fixed character set for unix strings, but any 19 19 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> 21 21 must not contain NULLs except for termination 22 </p></li><li class="listitem"><p>22 </p></li><li><p> 23 23 must be 7-bit compatible with C strings, so that a constant 24 24 string or character in C will be byte-for-byte identical to the 25 25 equivalent string in the chosen character set. 26 </p></li><li class="listitem"><p>26 </p></li><li><p> 27 27 when you uppercase or lowercase a string it does not become 28 28 longer than the original string 29 </p></li><li class="listitem"><p>29 </p></li><li><p> 30 30 must be able to correctly hold all characters that your client 31 31 will throw at it … … 34 34 are fine, but UCS2 could not be used for unix strings as they 35 35 contain nulls. 36 </p></li><li class="listitem"><p>36 </p></li><li><p> 37 37 when you need to put a string into a buffer that will be sent on the 38 38 wire, or you need a string in a character set format that is … … 41 41 wire buffer into a (multi-byte) unix string. The push_ functions 42 42 push a string out to a wire buffer. 43 </p></li><li class="listitem"><p>43 </p></li><li><p> 44 44 the two main pull_ and push_ functions you need to understand are 45 45 pull_string and push_string. These functions take a base pointer … … 58 58 charcnv.c that call the pull_/push_ functions with particularly 59 59 common arguments, such as pull_ascii_pstring() 60 </p></li><li class="listitem"><p>60 </p></li><li><p> 61 61 The biggest thing to remember is that internal (unix) strings in Samba 62 62 may now contain multi-byte characters. This means you cannot assume … … 66 66 like strchr_m(). I know this is very slow, and we will eventually 67 67 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> 69 69 all lp_ functions now return unix strings. The magic "DOS" flag on 70 70 parameters is gone. 71 </p></li><li class="listitem"><p>71 </p></li><li><p> 72 72 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> 74 74 This section describes the macros defined in byteorder.h. These macros 75 75 are 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> 77 77 returns 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> 79 79 returns the value of the unsigned short (16 bit) little-endian integer at 80 80 offset pos within buffer buf. An integer of this type is sometimes 81 81 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 offset83 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 at84 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 pos85 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 within86 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 buffer87 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 within88 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 buffer89 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 at90 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 offset91 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 at82 </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 83 pos 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 84 offset 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 85 within 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 86 buffer 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 87 buf 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 88 buffer 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 89 buf 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 90 offset 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 91 pos 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 92 92 offset 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 offset94 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>93 refered 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 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="id2557696"></a>LAN Manager Samba API</h2></div></div></div><p> 95 95 This section describes the functions need to make a LAN Manager RPC call. 96 96 This information had been obtained by examining the Samba code and the LAN … … 105 105 This function is defined in client.c. It uses an SMB transaction to call a 106 106 remote 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> 108 108 prcnt: the number of bytes of parameters begin sent. 109 </p></li><li class="listitem"><p>109 </p></li><li><p> 110 110 drcnt: the number of bytes of data begin sent. 111 </p></li><li class="listitem"><p>111 </p></li><li><p> 112 112 mprcnt: the maximum number of bytes of parameters which should be returned 113 </p></li><li class="listitem"><p>113 </p></li><li><p> 114 114 mdrcnt: the maximum number of bytes of data which should be returned 115 </p></li><li class="listitem"><p>115 </p></li><li><p> 116 116 param: a pointer to the parameters to be sent. 117 </p></li><li class="listitem"><p>117 </p></li><li><p> 118 118 data: a pointer to the data to be sent. 119 </p></li><li class="listitem"><p>119 </p></li><li><p> 120 120 rparam: a pointer to a pointer which will be set to point to the returned 121 121 parameters. The caller of call_api() must deallocate this memory. 122 </p></li><li class="listitem"><p>122 </p></li><li><p> 123 123 rdata: a pointer to a pointer which will be set to point to the returned 124 124 data. The caller of call_api() must deallocate this memory. … … 126 126 These are the parameters which you ought to send, in the order of their 127 127 appearance 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> 129 129 An unsigned 16 bit integer API number. You should set this value with 130 130 SSVAL(). I do not know where these numbers are described. 131 </p></li><li class="listitem"><p>131 </p></li><li><p> 132 132 An ASCIIZ string describing the parameters to the API function as defined 133 133 in the LAN Manager documentation. The first parameter, which is the server 134 134 name, is ommited. This string is based uppon the API function as described 135 135 in the manual, not the data which is actually passed. 136 </p></li><li class="listitem"><p>136 </p></li><li><p> 137 137 An ASCIIZ string describing the data structure which ought to be returned. 138 </p></li><li class="listitem"><p>138 </p></li><li><p> 139 139 Any parameters which appear in the function call, as defined in the LAN 140 140 Manager API documentation, after the "Server" and up to and including the 141 141 "uLevel" parameters. 142 </p></li><li class="listitem"><p>142 </p></li><li><p> 143 143 An unsigned 16 bit integer which gives the size in bytes of the buffer we 144 144 will use to receive the returned array of data structures. Presumably this 145 145 should be the same as mdrcnt. This value should be set with SSVAL(). 146 </p></li><li class="listitem"><p>146 </p></li><li><p> 147 147 An ASCIIZ string describing substructures which should be returned. If no 148 148 substructures apply, this string is of zero length. … … 150 150 The code in client.c always calls call_api() with no data. It is unclear 151 151 when 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> 153 153 The 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>154 are:</p><div class="orderedlist"><ol type="1"><li><p> 155 155 An unsigned 16 bit integer which contains the API function's return code. 156 156 This value should be read with SVAL(). 157 </p></li><li class="listitem"><p>157 </p></li><li><p> 158 158 An adjustment which tells the amount by which pointers in the returned 159 159 data should be adjusted. This value should be read with SVAL(). Basically, … … 161 161 pointer value added to it and then have this value subtracted from it in 162 162 order to obtain the currect offset into the returned data buffer. 163 </p></li><li class="listitem"><p>163 </p></li><li><p> 164 164 A count of the number of elements in the array of structures returned. 165 165 It is also possible that this may sometimes be the number of bytes returned. … … 181 181 do with indicating the amount of data returned or possibly the amount of 182 182 data 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> 184 184 Certain data structures are described by means of ASCIIz strings containing 185 185 code 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> 187 187 W a type byte little-endian unsigned integer 188 </p></li><li class="listitem"><p>188 </p></li><li><p> 189 189 N a count of substructures which follow 190 </p></li><li class="listitem"><p>190 </p></li><li><p> 191 191 D a four byte little-endian unsigned integer 192 </p></li><li class="listitem"><p>192 </p></li><li><p> 193 193 B a byte (with optional count expressed as trailing ASCII digits) 194 </p></li><li class="listitem"><p>194 </p></li><li><p> 195 195 z a four byte offset to a NULL terminated string 196 </p></li><li class="listitem"><p>196 </p></li><li><p> 197 197 l a four byte offset to non-string user data 198 </p></li><li class="listitem"><p>198 </p></li><li><p> 199 199 b an offset to data (with count expressed as trailing ASCII digits) 200 </p></li><li class="listitem"><p>200 </p></li><li><p> 201 201 r pointer to returned data buffer??? 202 </p></li><li class="listitem"><p>202 </p></li><li><p> 203 203 L length in bytes of returned data buffer??? 204 </p></li><li class="listitem"><p>204 </p></li><li><p> 205 205 h number of bytes of information available??? 206 206 </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.