1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
TC Next Generation
==================
Written 2001-2004 by Werner Almesberger
Testing and tcng language design also by Milena Mondini, U. of Napoli
"External" interface and related elements jointly designed with Jacob
Teplitsky, Bivio Networks.
Copyright 2001 EPFL-ICA, Werner Almesberger
Copyright 2001,2002 Bivio Networks, Network Robots, Werner Almesberger
Copyright 2003,2004 Werner Almesberger
New versions of tcng can be found in http://tcng.sourceforge.net/
This package is free software; 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.
See the file COPYING.GPL for details.
The files tcc/ext/tccext.h, tcc/ext/tccext.c, tcc/ext/echoh.h, and
tcc/ext/echoh.c are distributed under the GNU Lesser General Public
License. See the file COPYING.LGPL for details.
Overview
--------
tcng is a redesign of the Linux traffic control architecture. In the first
phase, the configuration language will be improved. In the second phase,
kernel components will be generated directly by configuration utilities.
Throughout all this, full compatibility with the existing traffic control
infrastructure will be maintained.
The documentation for the tcng system can be found in the files
doc/tcng.ps and doc/tcng.txt
Building
--------
Prerequisites:
- programs or packages required for running tcng and tcsim:
cpp, gnuplot, Perl
- additional packages required for building tcng from the distribution:
gcc, binutils, make, flex, yacc, grep, sed, awk, textutils (cat, tr,
etc.), fileutils (ln, rm, etc.), sh-utils (echo, pwd, etc.), LaTeX,
dvips
- additional packages needed after "make immaculate":
transfig (fig2dev), wget
Prepare the other source trees used by tcsim:
- obtain the Linux kernel source, version 2.4.3 or any later 2.4 kernel,
or any 2.5 kernel from 2.5.0 to 2.5.4 (2.5.5 and above will be supported
at a later time)
- if possible, extract it in the tcsim directory
- obtain iproute2, version 991023, 001007, 010803, 010824, 020116-try,
ss040730, or ss040831
- if possible, extract it in the tcsim directory
- run ./configure
If the kernel is not in tcsim/linux or /usr/src/linux, specify its location
with -k <directory> or -k <kernel_tarball>
If the iproute2 is not in tcsim/iproute2, specify its location with
-i <directory>
If you want to use a different version of tcng than the one that will be
built in tcc/tcng, specify the location of the tcng command with
-t <path>
Building tcng:
Just run make
It will first build tcng, then tcsim. For building tcsim, it extracts a
partial kernel source tree (containing mainly traffic control) in tcsim/klib,
compile it, then do the same with iproute2 (mainly tc) in tcsim/ulib.
Testing tcng:
make test
Example:
$ cd tcsim
$ wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.27.tar.bz2
$ bzcat linux-2.4.27.tar.bz2 | tar xf -
$ wget http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.9-ss040831.tar.gz
$ tar xfz iproute2-2.4.7-now-ss010824.tar.gz
$ cd ..
$ ./configure
$ make
$ make test
If taking the iproute2 tarball from a Debian mirror, the commands would
be as follows:
$ wget \
http://ftp.debian.org/debian/pool/main/i/iproute/iproute_20010824.orig.tar.gz
$ tar xfz iproute_20010824.orig.tar.gz
Using HTB
---------
In order to use HTB, tcsim must be built with a recent kernel source
(2.4.20 or later). Furthermore, the HTB patch must be applied to the
iproute2 source tree before building tcsim. If using
iproute2-2.6.8-ss040730 or later, this patch is already included.
Example:
$ wget http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz
$ tar xfz iproute2-2.4.7-now-ss010824.tar.gz
$ mkdir htb
$ tar xCfz htb htb3.6-020525.tgz
$ patch -s -p1 -d iproute2 <htb/htb3.6_tc.diff
Installation
------------
$ make install
tries to install tcng, tcsim, and a few support files in the directories
bin, lib, and include underneath the the installation directory. The
latter defaults to /usr/local, but can be changed using configure -d
Binary distributions of tcng and tcsim can be build with
$ make bindist
The resulting gzip'ed tar archives can be extracted in the desired
installation directory. Both archives contain a script ./localize.sh
that generates wrappers for tcng and tcsim, which convey the location
to those programs. localize.sh can be removed after running it.
The wrappers work by setting the environment variable TCNG_TOPDIR,
which, when defined, takes precedence over the paths built into tcng,
tcsim, etc.
|