old-www/HOWTO/NLM-HOWTO-2.html

140 lines
5.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>NetWare Loadable Module Programming HOWTO: Setting Up Your Linux Box and NetWare Server</TITLE>
<LINK HREF="NLM-HOWTO-3.html" REL=next>
<LINK HREF="NLM-HOWTO-1.html" REL=previous>
<LINK HREF="NLM-HOWTO.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="NLM-HOWTO-3.html">Next</A>
<A HREF="NLM-HOWTO-1.html">Previous</A>
<A HREF="NLM-HOWTO.html#toc2">Contents</A>
<HR>
<H2><A NAME="s2">2.</A> <A HREF="NLM-HOWTO.html#toc2">Setting Up Your Linux Box and NetWare Server</A></H2>
<P>You need to install and configure these things for NLM development:</P>
<P>
<UL>
<LI> Linux box with configured IPX and NCPFS</LI>
<LI> GNU C compiler (gcc) for elf-i386
(nearly all i386 Linux Distributions include it)</LI>
<LI> GNU binutils with nlmconv(1) program</LI>
<LI> My nlm-kit package</LI>
<LI> Novell Developer Kit - NDK (include files and documentation)</LI>
<LI> DOSemu (with rconsole) or X11 server for running NetWare Xconsole.</LI>
<LI> ... and, finally, NetWare server :-)</LI>
</UL>
</P>
<P>You might also want to download the nlm-examples package from my FTP site:
<A HREF="ftp://ftp.penguin.cz/pub/users/mhi/nlm/">ftp://ftp.penguin.cz/pub/users/mhi/nlm/</A> or
<A HREF="ftp://ftp.funet.fi/pub/mirrors/ftp.penguin.cz/pub/users/mhi/nlm/">ftp://ftp.funet.fi/pub/mirrors/ftp.penguin.cz/pub/users/mhi/nlm/</A>.</P>
<H2><A NAME="ss2.1">2.1</A> <A HREF="NLM-HOWTO.html#toc2.1">Novell NetWare Server</A>
</H2>
<P>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).</P>
<H2><A NAME="ss2.2">2.2</A> <A HREF="NLM-HOWTO.html#toc2.2">Linux Box With IPX/NCPFS</A>
</H2>
<P>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:</P>
<P>
<HR>
<PRE>
#!/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
</PRE>
<HR>
</P>
<P>For more information about configuring IPX and NCPFS, see the IPX-HOWTO.</P>
<H2><A NAME="ss2.3">2.3</A> <A HREF="NLM-HOWTO.html#toc2.3">GNU C Compiler</A>
</H2>
<P>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.</P>
<H2><A NAME="ss2.4">2.4</A> <A HREF="NLM-HOWTO.html#toc2.4">nlmconv(1) from GNU binutils</A>
</H2>
<P>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.</P>
<H2><A NAME="ss2.5">2.5</A> <A HREF="NLM-HOWTO.html#toc2.5">The nlm-kit Package</A>
</H2>
<P>My nlm-kit package is avaliable from
<A HREF="ftp://ftp.penguin.cz/pub/users/mhi/nlm/">ftp://ftp.penguin.cz/pub/users/mhi/nlm/</A>. It contains necessary
files for NLM development. Extract it and run <CODE>"make all"</CODE> and
<CODE>"make install"</CODE>.
It will create the directory <CODE>/usr/nwsdk/</CODE> and install all import files,
object files and the nlmimp(1) utility.</P>
<H2><A NAME="ss2.6">2.6</A> <A HREF="NLM-HOWTO.html#toc2.6">Include Files and Documentation from the NDK</A>
</H2>
<P>Getting the NDK is easy:
<UL>
<LI> Download it from
<A HREF="http://developer.novell.com/ndk/">http://developer.novell.com/ndk/</A>.</LI>
<LI> Order two NDK CDs from Novell.</LI>
<LI> Get these CDs at no cost at BrainShare, Novell Developer Workshop
or at other Novell Developer events.</LI>
</UL>
</P>
<P>You need these files from the NDK (all are available online at
<A HREF="http://developer.novell.com/ndk/clib.htm">http://developer.novell.com/ndk/clib.htm</A>:
<UL>
<LI> C language header and import files (cdrom:\files\download\clib.exe)</LI>
<LI> C language API documentation (cdrom:\files\download\clib_doc.exe)</LI>
<LI> C language samples (optional) (cdrom:\files\download\clib_sample.exe)</LI>
</UL>
</P>
<P>It's a pity that all the files mentioned above are InstallShield Win32 executables.
You must find some Windows machine to extract them and then copy the include files
to <CODE>/usr/nwsdk/include/</CODE> and documentation/samples to anywhere you want.
The Novell License doesn't allow me to distribute include files or documentation
with the nlm-kit.</P>
<P>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.</P>
<H2><A NAME="ss2.7">2.7</A> <A HREF="NLM-HOWTO.html#toc2.7">Access to the NetWare Server (Xconsole or rconsole)</A>
</H2>
<P>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).</P>
<HR>
<A HREF="NLM-HOWTO-3.html">Next</A>
<A HREF="NLM-HOWTO-1.html">Previous</A>
<A HREF="NLM-HOWTO.html#toc2">Contents</A>
</BODY>
</HTML>