Menu

Tree [fc5c6d] master /
 History

HTTPS access


File Date Author Commit
 TrafficMonTest 2011-09-02 Qiyi Caitian Qiyi Caitian [d74fa2] added traffic transfer function
 ChangeLog.txt 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 LICENSE.txt 2011-08-31 Qiyi Caitian Qiyi Caitian [978182] added documents
 Makefile 2011-08-31 Qiyi Caitian Qiyi Caitian [af8100] add view network adapter list option
 README.txt 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 TrafficMeter.cpp 2011-09-02 Qiyi Caitian Qiyi Caitian [d74fa2] added traffic transfer function
 TrafficMeter.h 2011-09-02 Qiyi Caitian Qiyi Caitian [d74fa2] added traffic transfer function
 TrafficMon.cpp 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 TrafficMon.h 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 TrafficMon.sln 2011-08-31 Qiyi Caitian Qiyi Caitian [978182] added documents
 TrafficMon.vcproj 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 TrafficSniffer.cpp 2011-09-11 Qiyi Caitian Qiyi Caitian [fb3548] examine LAN address for packets before counting
 TrafficSniffer.h 2011-08-30 Qiyi Caitian Qiyi Caitian [42c13e] implemented filter dns option
 WebUI.cpp 2011-09-02 Qiyi Caitian Qiyi Caitian [d74fa2] added traffic transfer function
 WebUI.h 2011-09-02 Qiyi Caitian Qiyi Caitian [d74fa2] added traffic transfer function
 config.cpp 2011-09-18 Qiyi Caitian Qiyi Caitian [950913] added "message" option in config file
 config.h 2011-09-18 Qiyi Caitian Qiyi Caitian [950913] added "message" option in config file
 entry.cpp 2011-08-31 Qiyi Caitian Qiyi Caitian [978182] added documents
 entry.h 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 linux_entry.cpp 2011-08-31 Qiyi Caitian Qiyi Caitian [af8100] add view network adapter list option
 platform.cpp 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 platform.h 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 resource.h 2011-08-31 Qiyi Caitian Qiyi Caitian [978182] added documents
 resource.rc 2012-11-18 Qiyi Caitian Qiyi Caitian [309131] Fixed a bug on "auto log and reset traffic reco...
 trafficmon.ini 2011-09-18 Qiyi Caitian Qiyi Caitian [950913] added "message" option in config file
 win_entry.cpp 2011-08-31 Qiyi Caitian Qiyi Caitian [af8100] add view network adapter list option

Read Me

                TrafficMon - Traffic Monitor for LAN

1. Instructions

    This is a traffic monitor for LAN. Run it on the gateway PC and it
    can monitor everyone's network traffic in the LAN.

    Before running this, please configure "trafficmon.ini" first. The
    file should be put at:
        * /opt/trafficmon/ for Linux;
        * The same directory as TrafficMon.exe for Windows;
    There is an example "trafficmon.ini" file in the software folder.

    Usage:
        trafficmon [-i]
        -i      list all network adapters

    The meanings of the keys in the "trafficmon.ini" file are as follows:
    [User]
    MAC address=user name
        MAC address is in format of XX:XX:XX:XX:XX:XX or 
        XX-XX-XX-XX-XX-XX, case insensitive;

    [Main]
    adapter:
        Adapter name such as "eth0" in Linux and "\Device\NPF_{...}"
        in Windows. Using "-i" switch to view complete adapter list;
    dns_is_free:
        Whether DNS query traffic is free or not. Set this to 0 will
        count DNS traffic and 1 will not;
    log_and_reset_on_new_month:
        When new month comes, log current traffic record and return it
        to zero (useful for monthly payment service);
    web_ui_port:
        You can visit http://your_gateway_ip:web_ui_port/ to view the
        web page of traffic usage (total and per user).
    charset:
        Character set of this ini file. On Linux it should always be
        "utf-8";

    [TrafficLimit]
    traffic_limit_per_user_in_bytes:
        Traffic limit per user (in bytes);
    ban_anonymous_user:
        Ban anonymous user (user who uses a MAC address not appeared on
        [User] section) or not (1/0);

    [Message]
    message:
        Message to be show in the traffic usage page.

    [WhiteList]
    IP address=subnet mask
        Put traffic-free IP addresses and corresponding subnet masks here.


2. System Requirements

    Linux:
        * You need libpcap (http://www.tcpdump.org/) installed.

    Windows:
        * You need WinPcap (http://www.winpcap.org/) installed;
        * If you haven't installed Microsoft Visual C++ 2008 Redistributable
    Package (x86), please use "Release\TrafficMon.exe". Otherwise, use
    "Release_DLL\TrafficMon.exe" as it is smaller.


3. Functions

    * Monitor everyone's network traffic in LAN;
    * Web UI of network traffic usage (total and per user);
    * Ban users who exceeded traffic limit;
    * Support IP whitelist (traffics to/from these IPs won't be count);
    * Option of ban users with unregistered MAC address;
    * Option of automatically log and reset traffic record on new month.


4. Web UI

    http://your_gateway_ip:web_ui_port/PAGE

    If PAGE is:
    (empty) :
        display the page of traffic usage;
    reload :
        reload [User], [TrafficLimit] and [Message] sections in
        "trafficmon.ini";
    flush :
        save current traffic record. Generally, you don't need to visit
        this page for traffic record will be automatically saved;
    clear-time-error :
        clear date/time error state. If system date/time went wrong, there
        will be a warning in the traffic usage page and the "auto log and
        reset traffic record on new month" function will be suspended.
        After corrected system date/time, visit this page to clear the
        error state and the "auto log and reset" function will be resumed;


5. License (GPL License)

    Copyright (C) 2011-2012 CTQY <qiyi.caitian@gmail.com>

    This program 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.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.