The cnet v1.5-2 distribution is available from:
http://www.cs.uwa.edu.au/cnet/cnet-1.5-2.tar.gz
(31st August 1999)
The full distribution (about 433KB)
includes all source code, Makefiles, documentation,
sub-directories for each of the supported operating and windowing systems,
and a few representative protocol examples.
cnet is currently supported on the following UNIX variants:
Linux (ELF only), DEC-OSF/1 (v4.0), SunOS 4.1.x, Solaris 2.x, and SGI IRIX-5.
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 (Releases 4 and 6 are not supported).
- Older Linux systems with a.out formats are no longer supported.
- cnet has been tested with Tcl/Tk versions
(Tcl7.3+Tk3.6), (Tcl7.4+Tk4.0), (Tcl7.5+Tk4.1) and (Tcl8.0+Tk8.0).
Installation
- To begin installation,
copy the distribution file and unpack it with the command:
gunzip -c cnet-1.5-2.tar.gz | tar xvf -
- Change to the newly created directory cnet-1.5
- 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.
It should not be necessary to manually define your operating system's
constant as the C preprocessor should determine this automatically.
Other constants that you will probably need to modify include the
important value of CNETPATH.
- Read and change site-specific constants in the Makefile
for the operating system you'll be using
(Makefile.sunos, Makefile.linux ...)
Typically, you'll need to modify (or uncomment)
CC, CFLAGS, INCLUDES, XINCLUDES,
LIBDIRS, LIBS, XLIBS, BINDIR
and MANDIR.
Most of these values should already be correct.
- 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.
Change directory to linuxelf and uncompress and untar
the libelf-0.6.4 package.
- Change directory back to ..
- Type 'make' to hopefully compile cnet for your system
(without error).
- Type 'make install' to copy the cnet binary and manual
to the required (global) directory.
- Copy and make world-readable (chmod 644) the file cnet.h
to one of the directories given in CNETPATH.
- If using Tcl/Tk, copy and make world-readable (chmod 644)
the files src/tcltk/cnet.tcl
and the bitmap src/tcltk/cnet_icon.bmp
to one of the directories given in CNETPATH.
In the file cnet.tcl, you'll then need to define the
full pathname of the icon bitmap in the variable CNET_ICON
(about line 12).
Testing
There are some introductory examples
(such as may be used as student introductions to cnet)
in the EXAMPLES directory.
These may be
the sort of things an academic staff member would set as assessible projects,
or to assist students to "get up to speed" quickly.
You should now be able to execute these examples with the commands:
cnet TICKTOCK
cnet STOPANDWAIT
cnet FLOODING1
These examples would typically be invoked from the command-line;
there is a small Makefile to demonstrate typical invocations.
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.
cnet was written and is maintained by Chris McDonald
(chris@cs.uwa.edu.au)