From ad6534cceb7ea682673235810fe28f5b77fabb05 Mon Sep 17 00:00:00 2001 From: bubulle Date: Thu, 22 May 2008 11:51:59 +0000 Subject: Merge upstream 3.0.29 in trunk git-svn-id: svn://svn.debian.org/svn/pkg-samba/trunk/samba@1886 fc4039ab-9d04-0410-8cac-899223bdd6b0 --- .../Samba3-Developers-Guide/internals.html | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'docs/htmldocs/Samba3-Developers-Guide/internals.html') diff --git a/docs/htmldocs/Samba3-Developers-Guide/internals.html b/docs/htmldocs/Samba3-Developers-Guide/internals.html index 75dee2c3ad..01839cac16 100644 --- a/docs/htmldocs/Samba3-Developers-Guide/internals.html +++ b/docs/htmldocs/Samba3-Developers-Guide/internals.html @@ -1,4 +1,4 @@ -Chapter 5. Samba Internals

Chapter 5. Samba Internals

8 May 1996

Character Handling

+Chapter 5. Samba Internals

Chapter 5. Samba Internals

8 May 1996

Character Handling

This section describes character set handling in Samba, as implemented in Samba 3.0 and above

@@ -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. -

The new functions

+

The new functions

The new system works like this:

  1. all char* strings inside Samba are "unix" strings. These are @@ -70,28 +70,28 @@ The new system works like this: parameters is gone.

  2. all vfs functions take unix strings. Don't convert when passing to them -

Macros in byteorder.h

+

Macros in byteorder.h

This section describes the macros defined in byteorder.h. These macros are used extensively in the Samba code. -

CVAL(buf,pos)

+

CVAL(buf,pos)

returns the byte at offset pos within buffer buf as an unsigned character. -

PVAL(buf,pos)

returns the value of CVAL(buf,pos) cast to type unsigned integer.

SCVAL(buf,pos,val)

sets the byte at offset pos within buffer buf to value val.

SVAL(buf,pos)

+

PVAL(buf,pos)

returns the value of CVAL(buf,pos) cast to type unsigned integer.

SCVAL(buf,pos,val)

sets the byte at offset pos within buffer buf to value val.

SVAL(buf,pos)

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". -

IVAL(buf,pos)

returns the value of the unsigned 32 bit little-endian integer at offset -pos within buffer buf.

SVALS(buf,pos)

returns the value of the signed short (16 bit) little-endian integer at -offset pos within buffer buf.

IVALS(buf,pos)

returns the value of the signed 32 bit little-endian integer at offset pos -within buffer buf.

SSVAL(buf,pos,val)

sets the unsigned short (16 bit) little-endian integer at offset pos within -buffer buf to value val.

SIVAL(buf,pos,val)

sets the unsigned 32 bit little-endian integer at offset pos within buffer -buf to the value val.

SSVALS(buf,pos,val)

sets the short (16 bit) signed little-endian integer at offset pos within -buffer buf to the value val.

SIVALS(buf,pos,val)

sets the signed 32 bit little-endian integer at offset pos withing buffer -buf to the value val.

RSVAL(buf,pos)

returns the value of the unsigned short (16 bit) big-endian integer at -offset pos within buffer buf.

RIVAL(buf,pos)

returns the value of the unsigned 32 bit big-endian integer at offset -pos within buffer buf.

RSSVAL(buf,pos,val)

sets the value of the unsigned short (16 bit) big-endian integer at +

IVAL(buf,pos)

returns the value of the unsigned 32 bit little-endian integer at offset +pos within buffer buf.

SVALS(buf,pos)

returns the value of the signed short (16 bit) little-endian integer at +offset pos within buffer buf.

IVALS(buf,pos)

returns the value of the signed 32 bit little-endian integer at offset pos +within buffer buf.

SSVAL(buf,pos,val)

sets the unsigned short (16 bit) little-endian integer at offset pos within +buffer buf to value val.

SIVAL(buf,pos,val)

sets the unsigned 32 bit little-endian integer at offset pos within buffer +buf to the value val.

SSVALS(buf,pos,val)

sets the short (16 bit) signed little-endian integer at offset pos within +buffer buf to the value val.

SIVALS(buf,pos,val)

sets the signed 32 bit little-endian integer at offset pos withing buffer +buf to the value val.

RSVAL(buf,pos)

returns the value of the unsigned short (16 bit) big-endian integer at +offset pos within buffer buf.

RIVAL(buf,pos)

returns the value of the unsigned 32 bit big-endian integer at offset +pos within buffer buf.

RSSVAL(buf,pos,val)

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".

RSIVAL(buf,pos,val)

sets the value of the unsigned 32 bit big-endian integer at offset -pos within buffer buf to value val.

LAN Manager Samba API

+refered to as "USHORT".

RSIVAL(buf,pos,val)

sets the value of the unsigned 32 bit big-endian integer at offset +pos within buffer buf to value val.

LAN Manager Samba API

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,

This function is defined in client.c. It uses an SMB transaction to call a remote api. -

Parameters

The parameters are as follows:

  1. +

    Parameters

    The parameters are as follows:

    1. prcnt: the number of bytes of parameters begin sent.

    2. drcnt: the number of bytes of data begin sent. @@ -118,7 +118,7 @@ remote api. data: a pointer to the data to be sent.

    3. rparam: a pointer to a pointer which will be set to point to the returned - paramters. The caller of call_api() must deallocate this memory. + parameters. The caller of call_api() must deallocate this memory.

    4. rdata: a pointer to a pointer which will be set to point to the returned data. The caller of call_api() must deallocate this memory. @@ -149,7 +149,7 @@ substructures apply, this string is of zero length.

    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. -

    Return value

    +

    Return value

    The returned parameters (pointed to by rparam), in their order of appearance are:

    1. 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. -

    Code character table

    +

Code character table

Certain data structures are described by means of ASCIIz strings containing code characters. These are the code characters:

  1. -- cgit v1.2.3