The most recent public release of cnet is available from:
http://www.cs.uwa.edu.au/cnet/cnet-1.7.3.tgz
(15th August 2001)
The full distribution (about 460KB)
includes all source code, Makefiles, documentation,
sub-directories for each of the supported operating systems,
and a few representative protocol examples.
cnet is supported only on the following platforms:
Linux (kernel 2.x, ELF only),
DEC-OSF/1 (v4.0),
NetBSD (1.5 onwards),
SunOS 4.1.x,
Solaris 2.x,
and SGI IRIX (Rel. 5 or 6).
In particular,
cnet does not run on either Windows or the Apple Macintosh.
Thanks to Mark Davies, Victoria University of Wellington, NZ
<mark@mcs.vuw.ac.nz> for contributing his patches for NetBSD.
Please appreciate that there are thousands of students worldwide
using cnet.
I am unable to respond to individual questions about cnet,
unless they are from students enrolled in a course that I'm presenting.
Please ask your professor or instructor.
If you find these instructions confusing,
but eventually get cnet installed,
please email
chris@cs.uwa.edu.au
with any suggestions on how the instructions could be clearer.
Requirements
To install cnet you should be prepared and able to:
- Be able to create a publically-accessible directory (for a shared
installation) or a private directory (for a private installation).
The recommended publically-accessible locations are places like
/usr/local/cnetlib or /usr/lib/cnet.
- Know the full pathname of your system's ANSI-C compiler and standard
linker. If your system has the preferred gcc,
use gcc for both compiling and linking.
- Have Tcl/Tk correctly installed, preferably version 8.0 or
beyond, and know where its header files and libraries are installed.
Installation
- To begin installation,
copy the distribution file and unpack it with the command:
tar zpxvf cnet-1.7.3.tgz
- Change to the newly created directory cnet-1.7.3
- Edit the Makefile to change the constants local to your
installation:
BINDIR,
CNETDIR,
MANDIR,
MANEXT, and
WEBDIR.
- Change directory to ./src.
- Read and modify the C #defines in config.h,
such as the full pathname of the C compiler and linker on your system.
In particular, ensure that the value you gave to CNETDIR
in the top-level Makefile
is recorded in the string constant CNETPATH.
- Read and change site-specific constants in the Makefile
for the operating system you'll be using
(Makefile.linux, Makefile.sunos ...)
Typically, you'll need to modify (or uncomment)
CC, CFLAGS, INCLUDES, XINCLUDES,
LIBDIRS, LIBS, XLIBS, BINDIR
and MANDIR.
- If running a Linux(ELF) system and your system doesn't provide the
libelf package, you'll need the libelf package
provided in the distribution.
The libelf archive library and header files should already
be in their correct locations for successful compilation and
linking, but you may with to uncompress, untar and build
the libelf-0.6.4 package yourself (as a last resort!).
- Change directory back (up) to the top-level cnet-1.7.3 directory.
- Type 'make' to build cnet for your system
(it should compile and link without error).
- Type 'make install' (perhaps as root)
to copy the cnet binary, Tcl/Tk, and GIF files
to their required (global) locations.
Installation restrictions
You should note the following requirements and restrictions for various
systems:
- If using a Linux(ELF) system,
the freely-available libelf package is required.
Most Linux(ELF) systems (with at least version 2.0.x kernels) now
provide a copy of libelf, but if yours doesn't it
greatly simplifies things if you can install libelf
globally on your system. A full copy of libelf
is included in the cnet distribution.
- If using SunOS you should be using Release 4.1.2 or beyond.
If still using Release 4.1.1 you must obtain and install
Sun-Patch-ID#100257-03 (4-Oct-91).
- If using an SGI-IRIX machine, you must be using
Release 5 or 6 (Release 4 is not supported).
- Older Linux systems with a.out formats are no longer supported.
- cnet has been tested with most Tcl/Tk versions,
(Tcl7.X+Tk3.X),
(Tcl7.X+Tk4.X),
(Tcl8.0+Tk8.0), and.
(Tcl8.3+Tk8.3).
Testing
There are some introductory examples
(such as may be used as student introductions to cnet)
in the EXAMPLES directory.
These are the sort of things an academic staff member may set as
introductory exercises,
or to assist students to "get up to speed" quickly.
You should now be able to execute these examples from the command-line
with the commands:
cnet TICKTOCK
cnet STOPANDWAIT
cnet FLOODING1
Each example has its own topology file defining the network to be simulated,
for example
T2, CLICK, and FLOODING1.
When cnet appears to work,
the example files such as
{TICKTOCK + ticktock.c},
{CLICK + click.c},
{KEYBOARD + keyboard.c},
{LINKSTATE + linkstate.c}, and
{STOPANDWAIT + stopandwait.c}
in the EXAMPLES directory should all be placed in a system-wide
examples directory for everyone to copy and run.
- REMEMBER:
-
If you can demonstrate that you are a member of academic staff somewhere
(business card, FAX on University letterhead, or official Web page),
I'll email some more detailed examples to you -
ones that may typically be set for student projects.