Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    libband 0.01

    Download button

    No screenshots available
    Downloads: 434  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andrea | More programs
    GPL / FREE
    September 14th, 2005, 15:15 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    libband description

    LibBand is a simple library wrapper which is useful if you want to limit the bandwidth used by a program.

    LibBand is a simple library wrapper written in assembly and C (but I plan to rewrite everything in C) useful if you want to limit the bandwidth used by a program.

    It simply overrides some libc functions, using the LD_PRELOAD environment variable, and puts some pauses in the program to clamp the bandwidth at the specified value, for both upload and download operations.

    You just have to set UPLOAD_BAND and DOWNLOAD_BAND and run your program, for example:

    export LD_PRELOAD=/replace-with-the-path/to/libband.so
    export UPLOAD_BAND=1024
    export DOWNLOAD_BAND=8192
    ftp somewhere.com

    The bandwidth must be expressed in bytes/s, and so in the above example, we want the upload band clamped at 1.0 kb/s, the download band at 8.0 kb/s.

    There's a small utility in the scripts/ directory, called lb: you can use it to set everything and start your program from a nice whiptail/dialog environment.

    You need NASM to build the binary (but don't worry, a pre-assembled version is included in the package).
    Just type "make" to compile, and "make install" to install the library.
    Remember that $HOME/lib is the default installation directory, so you usually have to export LD_PRELOAD by using:
    export LD_PRELOAD=$HOME/lib/libband.so
    The "lb" script is configured to work with this path, but you may change it by editing the script itself (search for the LIBPATH variable).

    Please note that at the moment libBand DOESN'T WORK with multithreaded and _graphic_ applications.

    What's New in This Release:

    · We keep track of sockets by wrapping socket(), accept() and close(). The old fstat() mechanism has been obsoleted.



    Product's homepage

      


    TAGS:

    library wrapper | bandwidth limit | program bandwidth limit | libband | library | wrapper

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM