#7 Configurable categories/ports

open
nobody
None
5
2004-03-18
2004-03-18
No

This patch implements user configurable
categories/ports for traffic tracking.

The patch is against the 1.2.0b version. To apply it
the following sequence of commands can be used:

$ tar xzf bandwidthd-1.2.0b.tgz
$ cd bandwidthd-1.2.0b
$ zcat ../configurable-ports-v2.patch.gz | patch -p1

The main changes are:
- Now the etc/bandwidthd.conf has a new "item" (could be
replaced by something more meaningfull) option that
describes a class of traffic to be monitored. I
think that
the syntax is straightfoward.
- The management of these configuration data is done
using a couple of linked lists and a hash table
implemented at the new tables.h and tables.c files.
- The htdocs/legend.gif file is replaced by a
htdocs/legend.png one rebuilt at runtime based on the
given configuration. A new function named drawLegend()
in bandwidthd.c does the magic.
- The Statistics and IPData structS where changed to
support the new design.
- The GraphData() function suffered some major changes.
- The CDF file format now depends on the number of
configured itens and should be erased on configuration
changes.

The default configuration file more or less reproduces
the old behavior, but old data files need to be
converted to the new format. It shouldn't be difficult
to write a simple script to do that conversion.

My first intention was to make the configuration
completely dynamic, but the IPC structures made this a
difficult task. So, the number of items is limited by
the MAX_ITENS configuration option in bandwidthd.h.

The hash table size is configurable by simultaneously
modifying the HASH_TABLE_SIZE and HASH_TABLE_MASK
options in tables.h. The hash function (if it can be
called so) is only a simple bitmask. A more
sophisticated one could be used, but I saw no obvious
reason for it.

Discussion

1 2 3 > >> (Page 1 of 3)
  • Roberto Gliese

    Roberto Gliese - 2004-03-18

    Configurable categories/ports patch against version 1.2.0b

     
  • David R Hinkle

    David R Hinkle - 2004-04-09

    Logged In: YES
    user_id=863707

    Nice work! Something I'd like to integrate into the main tree,
    but I'll have to spend some time getting to know it first.

     
  • Roberto Gliese

    Roberto Gliese - 2004-06-23

    Configurable categories/ports patch against version 1.2.1b

     
  • Nobody/Anonymous

    Logged In: NO

    固化剂

     
  • Nobody/Anonymous

    Logged In: NO

    bnhbn

     
  • Nobody/Anonymous

    Logged In: NO

    look

     
  • Nobody/Anonymous

    Logged In: NO

    cool

     
  • Nobody/Anonymous

    Logged In: NO

    look look

     
  • Nobody/Anonymous

    Logged In: NO

    well

     
  • Nobody/Anonymous

    Logged In: NO

    WELL

     
  • Nobody/Anonymous

    Logged In: NO

    baiyq

     
  • Nobody/Anonymous

    Logged In: NO

    does anyone know if this patch works on v2 and on redhat?

     
  • Nobody/Anonymous

    Logged In: NO

    ok look

     
  • Nobody/Anonymous

    Logged In: NO

    ok

     
  • Nobody/Anonymous

    Logged In: NO

    ;;;;

     
  • Nobody/Anonymous

    Logged In: NO

    ok

     
  • Nobody/Anonymous

    Logged In: NO

    ok!

     
  • Nobody/Anonymous

    Logged In: NO

    OK !! Thank you very much

     
  • Nobody/Anonymous

    Logged In: NO

    try

     
  • wolf

    wolf - 2006-06-23

    Logged In: YES
    user_id=1544692

    fgafasfsf

     
  • Nobody/Anonymous

    Logged In: NO

    ok

     
  • Nobody/Anonymous

    Logged In: NO

    r

     
  • Nobody/Anonymous

    Logged In: NO

    hhh

     
  • Anonymous - 2006-07-30

    Logged In: YES
    user_id=1564700

    hao rangwo kankan

     
  • Nobody/Anonymous

    Logged In: NO

    good

     
1 2 3 > >> (Page 1 of 3)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks