XPlat Linux Libraries for C

Introduction

The XPlat Linux Libraries for C consist of the required linker and header files for Novell related application development on Linux. Applications using the XPlat Linux Libraries for C do not require the Novell Client for Linux. However, certain operations (e.g. mapping of network drives) will not work without the Novell Client for Linux installed. The tarball contains all of the required RPMs for Novell releated Linux application development and deployment. If the Novell Client for Linux or OES2 Beta is installed only the devel and header packages must be installed for application development.

Installation

Without the Novell Client for Linux or OES2 Beta install all of the following RPMs:

novell-xplatlib-devel (linker files)
novell-xplatlib-headers (SDK headers files)
novell-xplatlib (the actual xplat libraries)
novell-xtier-xplat (XTier requester module, xtxplat.so)
novell-xtier-base (XTier base module)
novell-xtier-core (main XTier module)
novell-nmasclient (NMAS authentication modules)
nici or nici64 (NICI Crypto services)


Novell Client for Linux or OES2 Beta installed install only (the other required files are already installed):

novell-xplatlib-devel (linker files)
novell-xplat-headers (SDK headers files)

Configuration

Users other than root need to be added to the novlxtier group for the XPlat to work. If the Novell Linux Client is installed this is not necessary, since XPlat requests are routed through the client's requester interface in novfs to novfsd which runs as root and interfaces with XTier. If the client is not installed, XPlat uses XTier's requester interface module. Because of the two different interfaces, the translated XTier error codes returned to XPlat might not be completely consistent we'll fix these as we find them. Another thing to know is public connections created through the client have user scope, meaning all processes for a given user share the same connection to a server. Without the client, connections have process scope; also multiple private connections from the same process can be created. For now it is recommend to use XPlat without the client. If you need to use the client, you can temporarily disable it by entering rcnovfsd stop at a console, allowing you to test your application with and without the client running.

Compiling & Building

  1. The XPlat Linux Libraries for C are located in /opt/novell/lib and are named clnlnx, ncplnx, callnx, loclnx, and netlnx. The XPlat SDK headers are found in /opt/novell/include/xplat. (See the example makefile with the sample code.) Note: Obsolete XPlat functions are not available in the XPlat Linux Libraries for C and the obsolete headers have been removed.

  2. XPlat Linux Libraries for C uses unicode (UCS-2), not UCS-4, so the gcc compile flag -fshort-wchar must be used for unicode strings.

Changes & Features

  1. The iteration handle used by NWDSSearch and other NDS iteration routines use a new nint_ptr type (integer the size of a pointer), instead of the nint32 type. For 32-bit platforms, the nint_ptr and nint32 types are synonymous, but for 64-bit they are not and nint_ptr must be used.

  2. The XPlat SDK has been updated to support 64-bit platforms. The SDK no longer supports DOS. OS/2, or 16-bit Windows—only 32-bit and 64-bit platforms are supported. Currently the only 64-bit platforms supported by Xplat are Windows Vista and Linux (x86_64). ntypes.h has been changed to detect the machine architecture (N_ARCH_32 or N_ARCH_64) and the OS platform when possible; it can detect the platforms for Windows and UNIX (N_PLAT_MSW and N_PLAT_UNIX), but not for NetWare, so N_PLAT_NLM would still need be be defined.

  3. The VERSION_INFO structure used by NWGetFileServerVersionInfo() has been updated to include the latest info returned by NCP 23,17 Get File Server Information. Some of these are 64BitOffsetsSupportedFlag, NCPServerPlatform, and ServerCodePageString. The server code page was the last addition and is returned by NetWare on Linux servers and by native server for the last year or two.

  4. New functions. The following namespace (NS) and extended (UTF-8) functions have been added to XPlat and are available on all platforms Windows, NetWare, and UNIX:

  5. NWAddTrusteeToDirectoryExt
    NWAddTrusteeToNSDirectoryExt
    NWDeleteTrusteeFromDirectoryExt
    NWDeleteTrusteeFromNSDirectoryExt
    NWGetDirectoryHandlePathExt
    NWGetNSEntryInfo2
    NWGetNSEntryInfo2Ext
    NWScanNSDirectoryForTrustees
    NWScanNSDirectoryForTrusteesExt
    NWScanNSEntryInfoSet2
    NWScanNSEntryInfoSet2Ext
    NWScanNSEntryInfoSetExt

  6. New file access APIs. The following functions have been added to access NetWare files on Linux:
    NWReadFile
    NWWriteFile
    NWSetFilePos
    NWGetFilePos
    NWSetFileSize
    NWGetNegotiatedBufferSize

  7. Various bug fixes.

Limitations

  1. On Linux, the Unicode conversion functions—NWUX and NWUS functions—only support a code page 0 (the system code page, typically UTF-8 on Linux). The system code page is determined by the current locale character type, LC_CTYPE, which is set by NWLsetlocale(). NWLsetlocale() calls the C library function setlocale() to do most of it's work. The problem which this is that NWLsetlocale() on Linux does not accept locale strings like 437 or 932, instead these would have to be translate to en_US.IBM437 and ja_JP.SHIFT-JIS, respectively. We really don't see away around this. We believe that the NWLsetlocale() function was based on older UNIX functions that did not have to specify and language and territory. We will probably rework the NWUX functions to use iconv() so that specific server code pages can be specified.

  2. The extended file/path functions which use UTF-8 names will fall back to the non UTF-8 functions that return names in the server's code page if a volume does not support UTF-8, such as a legacy volume. When this happens, path and files names are converted to UTF-8 using NWUX functions which use the system code page. Currently there is not a good way to control this behavior, other than calling NWLsetlocale(). Besides fixing the NWUS/NWUX functions to handle specific code pages, we think we might have to add a function which sets a default OEM code page for the extended functions or allow them to return an error if UTF-8 is not supported, so that the application can handle it maybe both changes are needed.

Miscellaneous

  1. NetWare and Linux code page compatibility table.

    NETWAREICONV & LOCALE
    437United States English IBM437
    850Multilingual IBM850
    852Slavic IBM852
    855Cyrillic I IBM855
    857Turkish IBM857
    860Portuguese IBM860
    861Icelandic IBM861
    862Hebrew IBM862
    863Canadian French IBM863
    865Nordic IBM865
    866Russian IBM866
    874Thai IBM874
    932Japanese SHIFT_JIS
    936Chinese Simplified GBK
    949Korean IBM949
    950Chinese Traditional BIG5

  2. Troubleshooting XTier Make sure novell-xregd is running (rcnovell-xregd start/stop) and that /etc/opt/novell/xtier and /var/opt/novell/xtier are owned by novlxregd with group novlxtier.


Novell and the Novell logo are registered trademarks of Novell, Inc.

The trademarks, logos and service marks ("Marks") displayed on this Web site are the property of Novell or third parties. You are not permitted to use these Marks without the prior written consent of Novell or such third party which may own the Mark. Use of Novell trademarks almost always requires written permission or a license.