-NetWare Loadable Modules (NLMs) are programs which run on Novell NetWare -server. NLMs become part of the NetWare OS. You can load and unload NLMs while -the server is running.
-
-"Official" compilers for NLMs are:
-
-
-
-This document describes how to get started with NLM development under Linux (and
-possibly other Unixes). Please note that this project is in very early
-stages of development, so a lot of things may not work as you'd expect.
-
-
-This document assumes that you are familiar with Novell NetWare, and that you
-have at least basic knowledge of writing NLMs. For more information about
-writing NLMs, see Novell's developer site,
-
-As far as I know, C++ development with gcc is currently impossible,
-till somebody ports at least the libstdc++ and libgcc
-libraries from the gcc package.
-
-
-
-Other documents that might be useful are:
-
-
-Copyright (c) 2000 Martin Hinner, <
-
-This HOWTO is Free documentation; you can redistribute it and/or
-modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-This document is distributed in the hope that it will be useful,
-but without any warranty; without even the implied warranty of
-merchantability or fitness for a particular purpose. See the GNU
-General Public License for more details.
-
-You can obtain a copy of the GNU General Public License by writing
-to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
-02139, USA.
-
-
-
-You need to install and configure these things for NLM development:
-
-
-Let's start with the NetWare server. You can use NetWare versions 3.X, 4.X
-or 5.X.
-NetWare 5 (or 5.1) three user "demo" version can be ordered from
-Novell Inc. for a few dollars. Don't be confused with word "demo", it's fully
-functional NetWare, except that it is limited to three users. By the way, this license can
-be upgraded online, at no cost, to five users. You might also try asking your
-local Novell partner for demo CDs (they may be free).
-
-
-You need to recompile your kernel with "The IPX protocol" and
-"NCP file system support" options enabled. Don't forget to say YES to
-"NDS authentication support" if you are using the NDS. Then you must
-configure the IPX protocol and mount your NetWare server volumes.
-Make sure that you
-have installed the ncpfs package! I use this script:
-
-
-I think that all modern Linuxes for the Intel x86 include gcc, which generates
-ELF32/i386 object files. If you have an older Linux distribution, it may
-use the a.out format instead of ELF. If your Linux doesn't use ELF, get and
-install a newer gcc.
-
-
-The nlmconv(1) utility links object files to the NLM format. It is a standard
-part of GNU binutils, but unfortunately it is not included in current distributions (RedHat,
-SuSE, Debian, ...). Get the binutils sources from ftp.gnu.org, and compile them, or
-simply use the pre-compiled nlmconv from my nlm-kit package.
-
-
-
-My nlm-kit package is avaliable from
-
-
-Getting the NDK is easy:
-
-
-You need these files from the NDK (all are available online at
-
-
-Because the NDK include files don't work under Linux, you need to patch
-them manually by typing "make install-include" in the nlm-kit-X.Y/
-directory.
-
-
-You can access the NetWare server console directly (keyboard and monitor),
-using rconsole.exe (from dosemu), or using telnetd.nlm/Xconsole (you need
-X server for this).
-
-
-As usual, we will start with the famous "Hello world" program. The source
-code for hello.nlm is available in the nlm-samples package. You can download
-it from
-
-
-
-You must pass these arguments to the gcc:
-
-
-Copy hello.nlm to the SYS:\SYSTEM directory on your NetWare server. Then, on
-the system console, type "load hello.nlm". If everything went fine, you should
-see NLM version information, a copyright message and "Hello world".
-
-
-The NLM header file contains information for nlmconv(1). Each
-line contains one option or directive; everything after "#" is comment.
-This chapter describes all options and directives.
-
-
-This chapter is not yet finished, sorry.
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-This directive specifies the function to be
-executed when the NLM is unloaded using the UNLOAD Server console
-command. If this function returns zero, the NLM can be unloaded, else
-the NLM is not ready to be unloaded.
-
-
-Example:
-
-Syntax:
-
-Map file start offset may be decimal or Xhex.
-
-
-Syntax:
-
-The copyright string is displayed on the server console screen when the
-NLM is loaded. If this option is not used, no copyright information is
-displayed.
-
-
-Example:
-
-Syntax:
-
-
-Syntax:
-
-Map file data start offset may be decimal or Xhex.
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-This directive tells the nlmconv(1) to include debugging information in
-the NLM file.
-
-Example:
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-
-Syntax:
-
-
-
-This directive lists the input ELF (.o) object files that are to be linked.
-You can also list the object files in the list file, each object file on
-one line.
-
-
-Example:
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-Default is 31. Zero is no limit.
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-for following CUSTOM, HELP, INPUT, MESSAGES, SHARELIB, STAMPEDDATA and XDCDATA.
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-Stamp is 8 char max.
-
-
-Syntax:
-
-Default is _Prelude.
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-
-Syntax:
-
-
-This directive specifies the format (NLM, LAN, DSK, NAM) of
-the NLM file to be generated. Valid values are:
-
-
-
-Example:
-
-Syntax:
-
-
-
-The version information is displayed on the server system console when the NLM
-loads. The major and minor version numbers can be 0 - 99. The revision
-can be 0 - 26 ("a" - "z") and is optional.
-
-Syntax:
-
-
-
-A message file contains (as you guess) text messages generated by the NLM. You can create it
-using DOS programs MSGLIB.EXE and MSGMAKE.EXE. I don't know any similar utility
-for Unix. Sorry, you'll have to use dosemu or DOS machine :-(
-
-
-Help files contain help for use with the NWSNUT user interface library.
-There is no known Linux utility for creating help files. You must use
-the DOS program HELPLIB.EXE, which is available from Novell developer site.
-
-
-XDC files are used by NetWare 5 (or SMP NetWare 4.x), and store information
-about symmetric multiprocessing (SMP). You will probably not need them. At least
-not now :-) Again, there is no Unix utility for creating XDC files,
-you will have to use the MPKXDC.EXE program (also available on the Novell
-developer site).
-
-
-(todo)
-
-
-(todo)
-
-
-Program nlmimp(1) is part of my nlm-kit package. (todo)
-
-
-#!/bin/sh
-
-ipx_interface delall
-ipx_interface add -p eth0 802.2 120 # Frame Ethernet_802.2, ipx net num 120
-insmod ncpfs # I have NCPfs compiled as module
-ncpmount -U admin -S elf -P XYZ /nw # mount all ELF's volumes as /nw
-
-
-For more information about configuring IPX and NCPFS, see the IPX-HOWTO.
-
-
-#define N_PLAT_NLM /* Define dest. platform */
-
-#include
-#
-# hello.def - NLM Header definition file for nlmconv(1)
-# Copyright (c) 2000 Martin Hinner
-
-
-# makefile for "hello world" NLM
-
-CC = gcc
-CFLAGS = -Wall -O2 -g -I/usr/nwsdk/include/ -nostdinc -fno-builtin -fpack-struct
-
-hello.nlm: hello.o hello.def
- nlmconv --output-target=nlm32-i386 -T hello.def
-
-hello.o: hello.c
- $(CC) $(CFLAGS) -c hello.c
-
-
-
-CHECK CheckUnload
-
-
-
-COPYRIGHT "Copyright (c) 1998 ABC Inc."
-
-
-
-DEBUG
-
-
-INPUT @objectfiles.txt
-INPUT main.o
-INPUT /usr/nwsdk/lib/prelude.o
-
-
-
-TYPE 0
-
-
-
-VERSION 1,5
-
-
-