Obtaining and installing cnet

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:


Installation

  1. To begin installation, copy the distribution file and unpack it with the command:

    gunzip -c cnet-1.5-2.tar.gz | tar xvf -
  2. Change to the newly created directory cnet-1.5
  3. Change directory to src.
  4. 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.
  5. 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.
  6. 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.
  7. Change directory back to ..
  8. Type 'make' to hopefully compile cnet for your system (without error).
  9. Type 'make install' to copy the cnet binary and manual to the required (global) directory.
  10. Copy and make world-readable (chmod 644) the file cnet.h to one of the directories given in CNETPATH.
  11. 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)