wmifs: Delete trailing whitespace.
This commit is contained in:
parent
44300ffec2
commit
a62dcaebc7
12 changed files with 163 additions and 163 deletions
14
wmifs/BUGS
14
wmifs/BUGS
|
@ -6,7 +6,7 @@ WMiFS-1.3b
|
||||||
* First initial BETA release, WMiFS is now a separate
|
* First initial BETA release, WMiFS is now a separate
|
||||||
package, due to the mayor rewrite, there probably
|
package, due to the mayor rewrite, there probably
|
||||||
will be some ;-)
|
will be some ;-)
|
||||||
|
|
||||||
|
|
||||||
WMPPP/WMiFS 1.2p1
|
WMPPP/WMiFS 1.2p1
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
@ -21,26 +21,26 @@ WMPPP/WMiFS 1.2p1
|
||||||
one, but we're looking into this.
|
one, but we're looking into this.
|
||||||
* WMPPP: ppp0 is still hardcoded (sigh), will be fixed.
|
* WMPPP: ppp0 is still hardcoded (sigh), will be fixed.
|
||||||
* WMiFS: SEGV with the dummy interface, we're looking
|
* WMiFS: SEGV with the dummy interface, we're looking
|
||||||
into this (needs to be ignored like lo).
|
into this (needs to be ignored like lo).
|
||||||
* WMiFS: Manages to get X CPU usage way to high on
|
* WMiFS: Manages to get X CPU usage way to high on
|
||||||
some systems somehow (reported myself) :)
|
some systems somehow (reported myself) :)
|
||||||
|
|
||||||
* Special thanks to Marcelo <mmagallo@efis.ucr.ac.cr>
|
* Special thanks to Marcelo <mmagallo@efis.ucr.ac.cr>
|
||||||
for providing some real usefull patches for WMPPP,
|
for providing some real usefull patches for WMPPP,
|
||||||
they will be in the next update for sure!
|
they will be in the next update for sure!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WMPPP/WMiFS 1.2
|
WMPPP/WMiFS 1.2
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
* The pixmap 'shift' in AfterStep's Wharf seems
|
* The pixmap 'shift' in AfterStep's Wharf seems
|
||||||
not to be our fault, but a bug in Wharf!
|
not to be our fault, but a bug in Wharf!
|
||||||
|
|
||||||
Please notify the authors of AfterStep about
|
Please notify the authors of AfterStep about
|
||||||
this if you like to see this fixed, Wharf can't
|
this if you like to see this fixed, Wharf can't
|
||||||
handle pixmaps that are larger than 60x60 pixels
|
handle pixmaps that are larger than 60x60 pixels
|
||||||
very well :(
|
very well :(
|
||||||
|
|
||||||
* Most code is yet again quite rewritten, but we
|
* Most code is yet again quite rewritten, but we
|
||||||
think all previous annoyances are gone now ;-)
|
think all previous annoyances are gone now ;-)
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
Version Description
|
Version Description
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
1.3b * Released 980513
|
1.3b * Released 980513
|
||||||
|
|
||||||
* Splitted up WMPPP and WMiFS into separate programs.
|
* Splitted up WMPPP and WMiFS into separate programs.
|
||||||
|
|
||||||
* WMiFS now uses our 'newstyle' shared dockapps code,
|
* WMiFS now uses our 'newstyle' shared dockapps code,
|
||||||
it's quite rewritten again.
|
it's quite rewritten again.
|
||||||
|
|
||||||
* WMiFS now reads /proc/dev/net instead of /proc/net/route.
|
* WMiFS now reads /proc/dev/net instead of /proc/net/route.
|
||||||
|
|
||||||
* Changed the RC file parsing and handling again.
|
* Changed the RC file parsing and handling again.
|
||||||
|
|
||||||
* Now ignores DUMMY interface too :)
|
* Now ignores DUMMY interface too :)
|
||||||
|
|
||||||
* Fixed the 'Zombie' bug :)
|
* Fixed the 'Zombie' bug :)
|
||||||
|
|
||||||
* Better 'execvp' code :)
|
* Better 'execvp' code :)
|
||||||
|
|
||||||
* Vastly reduced X CPU usage :)
|
* Vastly reduced X CPU usage :)
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,72 +31,72 @@ Version Description
|
||||||
|
|
||||||
* Updated the WMPPP rc files, again, due to some last
|
* Updated the WMPPP rc files, again, due to some last
|
||||||
minute changes in the code, WMPPP's rc files where
|
minute changes in the code, WMPPP's rc files where
|
||||||
no longer working properly.
|
no longer working properly.
|
||||||
|
|
||||||
|
|
||||||
1.2 * Released 980429
|
1.2 * Released 980429
|
||||||
|
|
||||||
* Completely revamped the WMPPP & WMiFS GUI :)
|
* Completely revamped the WMPPP & WMiFS GUI :)
|
||||||
|
|
||||||
* Added 'forceleft, forcemiddle and forceright'
|
* Added 'forceleft, forcemiddle and forceright'
|
||||||
options in WMiFS for 'real' multiuser systems,
|
options in WMiFS for 'real' multiuser systems,
|
||||||
when 'force*' is detected in /etc/wmifsrc the
|
when 'force*' is detected in /etc/wmifsrc the
|
||||||
user settings in ~/.wmifsrc are overridden
|
user settings in ~/.wmifsrc are overridden
|
||||||
(usefull for sites where users may not fiddle
|
(usefull for sites where users may not fiddle
|
||||||
with pppd's options :)
|
with pppd's options :)
|
||||||
|
|
||||||
* WMPPP: Ditto, added 'force' facility here too
|
* WMPPP: Ditto, added 'force' facility here too
|
||||||
|
|
||||||
* WMPPP: now correctly redisplays time when killed
|
* WMPPP: now correctly redisplays time when killed
|
||||||
and restarted
|
and restarted
|
||||||
|
|
||||||
* WMPPP: timer now starts to run when the actual
|
* WMPPP: timer now starts to run when the actual
|
||||||
connection is made
|
connection is made
|
||||||
|
|
||||||
* WMPPP: added BAUD CONNECT value display
|
* WMPPP: added BAUD CONNECT value display
|
||||||
|
|
||||||
* WMPPP: added 'getmodemspeed', a SUID proggie to
|
* WMPPP: added 'getmodemspeed', a SUID proggie to
|
||||||
read the CONNECT value from /var/log/messages
|
read the CONNECT value from /var/log/messages
|
||||||
|
|
||||||
* WMPPP: dropped the config GUI and added an
|
* WMPPP: dropped the config GUI and added an
|
||||||
.wmppprc file instead > motivation to do so:
|
.wmppprc file instead > motivation to do so:
|
||||||
this way, WMPPP is much more platform and
|
this way, WMPPP is much more platform and
|
||||||
distribution independant :)
|
distribution independant :)
|
||||||
|
|
||||||
* WMPPP: enhanced the status LED, yellow means
|
* WMPPP: enhanced the status LED, yellow means
|
||||||
dialing, green means online, red means error
|
dialing, green means online, red means error
|
||||||
|
|
||||||
* WMPPP: added -display commandline option
|
* WMPPP: added -display commandline option
|
||||||
|
|
||||||
* WMPPP: added -t commandline option, default
|
* WMPPP: added -t commandline option, default
|
||||||
the timer will display HH:MM, -t will display
|
the timer will display HH:MM, -t will display
|
||||||
MM:SS and switch to HH:MM after 60 minutes
|
MM:SS and switch to HH:MM after 60 minutes
|
||||||
|
|
||||||
* WMiFS: added support for all interfaces in
|
* WMiFS: added support for all interfaces in
|
||||||
/proc/net/, now all interfaces are supported :)
|
/proc/net/, now all interfaces are supported :)
|
||||||
|
|
||||||
* WMiFS: added -display commandline option
|
* WMiFS: added -display commandline option
|
||||||
|
|
||||||
* WMiFS: added -w commandline option, this will
|
* WMiFS: added -w commandline option, this will
|
||||||
draw the graph in our new 'waveform' look :)
|
draw the graph in our new 'waveform' look :)
|
||||||
|
|
||||||
* WMiFS: fixed the coredump problems that occured
|
* WMiFS: fixed the coredump problems that occured
|
||||||
on some systems with or without .wmifsrc file
|
on some systems with or without .wmifsrc file
|
||||||
typo's, errors, etc. in the .wmifsrc file are
|
typo's, errors, etc. in the .wmifsrc file are
|
||||||
now also being ignored/rejected, the worst
|
now also being ignored/rejected, the worst
|
||||||
thing that can happen now is that the scripts
|
thing that can happen now is that the scripts
|
||||||
do not execute (i.e. luser error) ;-)
|
do not execute (i.e. luser error) ;-)
|
||||||
|
|
||||||
* WMiFS: when monitoring a ppp interface, bytes
|
* WMiFS: when monitoring a ppp interface, bytes
|
||||||
are used to draw the graph, otherwise packets
|
are used to draw the graph, otherwise packets
|
||||||
|
|
||||||
* WMiFS: made the RX/TX/Status LED box identical
|
* WMiFS: made the RX/TX/Status LED box identical
|
||||||
to the one in WMPPP, the right LED is the status
|
to the one in WMPPP, the right LED is the status
|
||||||
LED, green means interface is working, red means
|
LED, green means interface is working, red means
|
||||||
error (interface down, NIC broken, etc.)
|
error (interface down, NIC broken, etc.)
|
||||||
|
|
||||||
|
|
||||||
1.1 - Released 980407
|
|
||||||
|
1.1 - Released 980407
|
||||||
- Added WMiFS, the no button more stats version
|
- Added WMiFS, the no button more stats version
|
||||||
- All ppp/eth load graphs are now autoscaling
|
- All ppp/eth load graphs are now autoscaling
|
||||||
- Autosensing of all active ppp/eth interfaces
|
- Autosensing of all active ppp/eth interfaces
|
||||||
|
@ -118,7 +118,7 @@ Version Description
|
||||||
Bugfixes
|
Bugfixes
|
||||||
|
|
||||||
1.0pre6 - Not released, developers release
|
1.0pre6 - Not released, developers release
|
||||||
Redesigned WMPPP's dock.app GUI
|
Redesigned WMPPP's dock.app GUI
|
||||||
Added failsave Yes/No disconnect
|
Added failsave Yes/No disconnect
|
||||||
requester
|
requester
|
||||||
Some code cleaning
|
Some code cleaning
|
||||||
|
|
18
wmifs/HINTS
18
wmifs/HINTS
|
@ -16,7 +16,7 @@ Without the -i option (wmifs &) WMiFS automagicly
|
||||||
grabs the default interface and will display the
|
grabs the default interface and will display the
|
||||||
name and statistics of that interface.
|
name and statistics of that interface.
|
||||||
|
|
||||||
You can cycle in realtime through all available
|
You can cycle in realtime through all available
|
||||||
active interfaces by simply clicking with the left
|
active interfaces by simply clicking with the left
|
||||||
mousebutton on the interface name gadget in the
|
mousebutton on the interface name gadget in the
|
||||||
upperleft corner of WMiFS...
|
upperleft corner of WMiFS...
|
||||||
|
@ -29,7 +29,7 @@ lo was mainly build in for testing purposes ;-)
|
||||||
WindowMaker
|
WindowMaker
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
WindowMaker users simply drag and drop the WMiFS dock.app on
|
WindowMaker users simply drag and drop the WMiFS dock.app on
|
||||||
the WindowMaker Dock (preferred) or on the Fiend, and then
|
the WindowMaker Dock (preferred) or on the Fiend, and then
|
||||||
press the rightmouse button on the outer edges of WMiFS and
|
press the rightmouse button on the outer edges of WMiFS and
|
||||||
then enable 'Autolaunch' from the Dock/Fiend popup menu.
|
then enable 'Autolaunch' from the Dock/Fiend popup menu.
|
||||||
|
|
||||||
|
@ -52,16 +52,16 @@ shaped icon on your desktop.
|
||||||
p.s. FVWM can swallow it too, so we've heard ;-)
|
p.s. FVWM can swallow it too, so we've heard ;-)
|
||||||
|
|
||||||
|
|
||||||
Dragging WMiFS
|
Dragging WMiFS
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
Be sure to drag WMIFS on it's outer edges, it's a bit
|
Be sure to drag WMIFS on it's outer edges, it's a bit
|
||||||
picky due to the large gfx pixmap it keeps ;-)
|
picky due to the large gfx pixmap it keeps ;-)
|
||||||
|
|
||||||
|
|
||||||
Setting up the WMiFS RC file
|
Setting up the WMiFS RC file
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
WMIFS can (optionally) launch your ppp scripts with a simple
|
WMIFS can (optionally) launch your ppp scripts with a simple
|
||||||
left mouse click on the interface statistics display.
|
left mouse click on the interface statistics display.
|
||||||
|
|
||||||
You may define your settings in ~/.wmifsrc like:
|
You may define your settings in ~/.wmifsrc like:
|
||||||
|
|
||||||
|
@ -70,9 +70,9 @@ middle: /home/foobar/MyPPP-disconnect-script
|
||||||
right: /home/foobar/MyPPP-reconnect-script
|
right: /home/foobar/MyPPP-reconnect-script
|
||||||
|
|
||||||
Note: If you run a site where users may not fiddle with the
|
Note: If you run a site where users may not fiddle with the
|
||||||
PPP scripts, read INSTALL > Info For Site Admins!
|
PPP scripts, read INSTALL > Info For Site Admins!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Creating PPP dialup scripts
|
Creating PPP dialup scripts
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
Because a very good PPP HowTo already exists,
|
Because a very good PPP HowTo already exists,
|
||||||
|
@ -86,7 +86,7 @@ very easy to create your own PPP scripts ;-)
|
||||||
Permissions to allow non-root WMPPP connections
|
Permissions to allow non-root WMPPP connections
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
WMiFS will connect just fine when run as root, but if you want
|
WMiFS will connect just fine when run as root, but if you want
|
||||||
to run WMiFS as a non-root user, there are a few files and
|
to run WMiFS as a non-root user, there are a few files and
|
||||||
programs to make permissions changes to.
|
programs to make permissions changes to.
|
||||||
|
|
||||||
WMiFS needs access to the device file your modem is on, so if
|
WMiFS needs access to the device file your modem is on, so if
|
||||||
|
@ -98,7 +98,7 @@ Change the permissions so that it is world read/writable:
|
||||||
The pppd daemon also makes calls to the kernel which require root
|
The pppd daemon also makes calls to the kernel which require root
|
||||||
permissions. The pppd daemon must be owned by root, and then have
|
permissions. The pppd daemon must be owned by root, and then have
|
||||||
it's set-user-id bit turned on. This way, the pppd daemon will
|
it's set-user-id bit turned on. This way, the pppd daemon will
|
||||||
always run as SUID root. Change the owner and SUID bit like:
|
always run as SUID root. Change the owner and SUID bit like:
|
||||||
|
|
||||||
chown root.root pppd
|
chown root.root pppd
|
||||||
chmod +s pppd
|
chmod +s pppd
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
Installation instructions for WMiFS.
|
Installation instructions for WMiFS.
|
||||||
|
|
||||||
|
|
||||||
NOTE!
|
NOTE!
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
Installing this program requires root privileges, ask your
|
Installing this program requires root privileges, ask your
|
||||||
local system/network administrator kindly if she/he wants
|
local system/network administrator kindly if she/he wants
|
||||||
to install this software for you ;-)
|
to install this software for you ;-)
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ Installation
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
1) % tar -zxvf wmifs-1.3b.tar.gz
|
1) % tar -zxvf wmifs-1.3b.tar.gz
|
||||||
2)* % cd wmifs.app/wmifs
|
2)* % cd wmifs.app/wmifs
|
||||||
3) % make
|
3) % make
|
||||||
4) % su root
|
4) % su root
|
||||||
5) # make install
|
5) # make install
|
||||||
6)* # vi ~/.wmifsrc and/or /etc/wmifsrc
|
6)* # vi ~/.wmifsrc and/or /etc/wmifsrc
|
||||||
|
@ -38,14 +38,14 @@ Installation
|
||||||
it's entirely up to you ;-)
|
it's entirely up to you ;-)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Extra Install Info For Site Administrators!
|
Extra Install Info For Site Administrators!
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
For site administrators who don't want their users messing
|
For site administrators who don't want their users messing
|
||||||
up pppd's configuration files, WMiFS now supports an
|
up pppd's configuration files, WMiFS now supports an
|
||||||
/etc/wmifsrc.fixed file.
|
/etc/wmifsrc.fixed file.
|
||||||
|
|
||||||
The installation will install the normal user and global
|
The installation will install the normal user and global
|
||||||
wmifsrc files in $HOME and /etc, NOT the fixed one!
|
wmifsrc files in $HOME and /etc, NOT the fixed one!
|
||||||
|
|
||||||
WMiFS scan for 3 files at startup, in the following order:
|
WMiFS scan for 3 files at startup, in the following order:
|
||||||
|
@ -53,16 +53,16 @@ WMiFS scan for 3 files at startup, in the following order:
|
||||||
1. /etc/wmifsrc
|
1. /etc/wmifsrc
|
||||||
2. $HOME/.wmifsrc
|
2. $HOME/.wmifsrc
|
||||||
3. /etc/wmifsrc.fixed
|
3. /etc/wmifsrc.fixed
|
||||||
|
|
||||||
If no .wmifsrc file is found in the users home directory,
|
If no .wmifsrc file is found in the users home directory,
|
||||||
WMiFS will use the global one (/etc/wmifsrc, if present
|
WMiFS will use the global one (/etc/wmifsrc, if present
|
||||||
and valid).
|
and valid).
|
||||||
|
|
||||||
When WMiFS finds a /etc/wmifs.fixed file, all settings
|
When WMiFS finds a /etc/wmifs.fixed file, all settings
|
||||||
that WMiFS detected in /etc/wmifsrc and/or $HOME/.wmifsrc
|
that WMiFS detected in /etc/wmifsrc and/or $HOME/.wmifsrc
|
||||||
will be discarted i.e. OVERRIDDEN!
|
will be discarted i.e. OVERRIDDEN!
|
||||||
|
|
||||||
If you want your users to be able to dialout, but you
|
If you want your users to be able to dialout, but you
|
||||||
don't want them to mess around, simply move or copy
|
don't want them to mess around, simply move or copy
|
||||||
the default /etc/wmifsrc to /etc/wmifsrc.fixed :)
|
the default /etc/wmifsrc to /etc/wmifsrc.fixed :)
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ WMiFS support the following commandline options:
|
||||||
-i interface name, note: 'lo' can ONLY
|
-i interface name, note: 'lo' can ONLY
|
||||||
be specified with '-i lo' ;-)
|
be specified with '-i lo' ;-)
|
||||||
(default = default interface as it
|
(default = default interface as it
|
||||||
appears in /proc/net/route)
|
appears in /proc/net/route)
|
||||||
-w draw the statistics graph in waveform
|
-w draw the statistics graph in waveform
|
||||||
like mode, try it! (default = normal)
|
like mode, try it! (default = normal)
|
||||||
-v print wmifs version number
|
-v print wmifs version number
|
||||||
|
@ -95,5 +95,5 @@ Note 1: If "make install" fails on your system, please edit
|
||||||
"make install" defaults to /usr/local/bin, $HOME & /etc.
|
"make install" defaults to /usr/local/bin, $HOME & /etc.
|
||||||
|
|
||||||
Note 2: Please DO read the HINTS, this file contains some
|
Note 2: Please DO read the HINTS, this file contains some
|
||||||
very usefull tips about WMiFS.
|
very usefull tips about WMiFS.
|
||||||
|
|
||||||
|
|
16
wmifs/README
16
wmifs/README
|
@ -2,16 +2,16 @@ WMiFS-1.3b - The public BETA release
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
Authors...: Martijn Pieterse (pieterse@xs4all.nl)
|
Authors...: Martijn Pieterse (pieterse@xs4all.nl)
|
||||||
Antoine Nulle (warp@xs4all.nl)
|
Antoine Nulle (warp@xs4all.nl)
|
||||||
|
|
||||||
Note......: WMiFS has it's own mailbox, as our pop3 accounts
|
Note......: WMiFS has it's own mailbox, as our pop3 accounts
|
||||||
are already way too crowded :)
|
are already way too crowded :)
|
||||||
Please mail bugreports, comments, suggestions,
|
Please mail bugreports, comments, suggestions,
|
||||||
requests and flames to:
|
requests and flames to:
|
||||||
|
|
||||||
dockapps@windowmaker.mezaway.org
|
dockapps@windowmaker.mezaway.org
|
||||||
|
|
||||||
The official WMiFS support website address:
|
The official WMiFS support website address:
|
||||||
|
|
||||||
http://windowmaker.mezaway.org
|
http://windowmaker.mezaway.org
|
||||||
|
|
||||||
Credits...: Bobby Mezaway (bobby@mezaway.org) for generously
|
Credits...: Bobby Mezaway (bobby@mezaway.org) for generously
|
||||||
|
@ -26,7 +26,7 @@ nice & nifty features like:
|
||||||
|
|
||||||
* Autosensing of *ALL* active network interfaces;
|
* Autosensing of *ALL* active network interfaces;
|
||||||
* Integrated autoscaling (per interface) transfer
|
* Integrated autoscaling (per interface) transfer
|
||||||
statistics, tested upto 100Mbit;
|
statistics, tested upto 100Mbit;
|
||||||
* Displays a 'normal' xload style graph or our new
|
* Displays a 'normal' xload style graph or our new
|
||||||
'waveform' like load graph;
|
'waveform' like load graph;
|
||||||
* Realtime cycling through active interfaces by simply
|
* Realtime cycling through active interfaces by simply
|
||||||
|
@ -39,7 +39,7 @@ nice & nifty features like:
|
||||||
buttons which are read from ~/.wmifsrc (optional);
|
buttons which are read from ~/.wmifsrc (optional);
|
||||||
* Fixed rc file option, usefull for sites where users
|
* Fixed rc file option, usefull for sites where users
|
||||||
are not allowed to mess with pppd;
|
are not allowed to mess with pppd;
|
||||||
|
|
||||||
WMiFS is developped on DEC Alpha machines running RedHat-5.0/Linux,
|
WMiFS is developped on DEC Alpha machines running RedHat-5.0/Linux,
|
||||||
but, WMiFS has also been intensively tested on x86 and 68K RedHat/
|
but, WMiFS has also been intensively tested on x86 and 68K RedHat/
|
||||||
Linux machines ;-)
|
Linux machines ;-)
|
||||||
|
@ -54,11 +54,11 @@ BUGS Things you don't want to know ;-)
|
||||||
CHANGES Description of changes.
|
CHANGES Description of changes.
|
||||||
TODO Things we've already planned for WMiFS.
|
TODO Things we've already planned for WMiFS.
|
||||||
COPYING GNU General Public License Version 2.
|
COPYING GNU General Public License Version 2.
|
||||||
|
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
If you discover any bugs in this software, please send a
|
If you discover any bugs in this software, please send a
|
||||||
bugreport to dockapps@windowmaker.mezaway.org and describe
|
bugreport to dockapps@windowmaker.mezaway.org and describe
|
||||||
the problem as detailed as you can.
|
the problem as detailed as you can.
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ the problem as detailed as you can.
|
||||||
Copyright
|
Copyright
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
WMiFS.app is copyright (c) 1997, 1998 by Martijn Pieterse and
|
WMiFS.app is copyright (c) 1997, 1998 by Martijn Pieterse and
|
||||||
Antoine Nulle and licensed through the GNU General Public License.
|
Antoine Nulle and licensed through the GNU General Public License.
|
||||||
Read the COPYING file for the complete GNU license.
|
Read the COPYING file for the complete GNU license.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ TODO list for WMiFS.
|
||||||
* Commandline option for LED colors;
|
* Commandline option for LED colors;
|
||||||
* Optional LCD GUI, either compile or runtime;
|
* Optional LCD GUI, either compile or runtime;
|
||||||
* Make the status LED also display collisions;
|
* Make the status LED also display collisions;
|
||||||
|
|
||||||
Your feedback! If you have nice suggestions, ideas, whatever,
|
Your feedback! If you have nice suggestions, ideas, whatever,
|
||||||
that aren't on this list, feel free to mail them to:
|
that aren't on this list, feel free to mail them to:
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/* Generic single linked list to keep various information
|
/* Generic single linked list to keep various information
|
||||||
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
|
||||||
Author: Kresten Krab Thorup
|
Author: Kresten Krab Thorup
|
||||||
|
|
||||||
Many modifications by Alfredo K. Kojima
|
Many modifications by Alfredo K. Kojima
|
||||||
|
|
||||||
|
|
||||||
This file is part of GNU CC.
|
This file is part of GNU CC.
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
/* Return a cons cell produced from (head . tail) */
|
/* Return a cons cell produced from (head . tail) */
|
||||||
|
|
||||||
INLINE LinkedList*
|
INLINE LinkedList*
|
||||||
list_cons(void* head, LinkedList* tail)
|
list_cons(void* head, LinkedList* tail)
|
||||||
{
|
{
|
||||||
LinkedList* cell;
|
LinkedList* cell;
|
||||||
|
@ -63,7 +63,7 @@ list_length(LinkedList* list)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the Nth element of LIST, where N count from zero. If N
|
/* Return the Nth element of LIST, where N count from zero. If N
|
||||||
larger than the list length, NULL is returned */
|
larger than the list length, NULL is returned */
|
||||||
|
|
||||||
INLINE void*
|
INLINE void*
|
||||||
|
@ -84,7 +84,7 @@ list_nth(int index, LinkedList* list)
|
||||||
INLINE void
|
INLINE void
|
||||||
list_remove_head(LinkedList** list)
|
list_remove_head(LinkedList** list)
|
||||||
{
|
{
|
||||||
if (!*list) return;
|
if (!*list) return;
|
||||||
if ((*list)->tail)
|
if ((*list)->tail)
|
||||||
{
|
{
|
||||||
LinkedList* tail = (*list)->tail; /* fetch next */
|
LinkedList* tail = (*list)->tail; /* fetch next */
|
||||||
|
@ -116,7 +116,7 @@ INLINE LinkedList *
|
||||||
list_remove_elem(LinkedList* list, void* elem)
|
list_remove_elem(LinkedList* list, void* elem)
|
||||||
{
|
{
|
||||||
LinkedList *tmp;
|
LinkedList *tmp;
|
||||||
|
|
||||||
if (list) {
|
if (list) {
|
||||||
if (list->head == elem) {
|
if (list->head == elem) {
|
||||||
tmp = list->tail;
|
tmp = list->tail;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Generic single linked list to keep various information
|
/* Generic single linked list to keep various information
|
||||||
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Author: Kresten Krab Thorup
|
Author: Kresten Krab Thorup
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* dock.c- built-in Dock module for WindowMaker
|
/* dock.c- built-in Dock module for WindowMaker
|
||||||
*
|
*
|
||||||
* WindowMaker window manager
|
* WindowMaker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997 Alfredo K. Kojima
|
* Copyright (c) 1997 Alfredo K. Kojima
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
*----------------------------------------------------------------------
|
*----------------------------------------------------------------------
|
||||||
* parse_command--
|
* parse_command--
|
||||||
* Divides a command line into a argv/argc pair.
|
* Divides a command line into a argv/argc pair.
|
||||||
*----------------------------------------------------------------------
|
*----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#define PRC_ALPHA 0
|
#define PRC_ALPHA 0
|
||||||
#define PRC_BLANK 1
|
#define PRC_BLANK 1
|
||||||
|
@ -64,11 +64,11 @@ next_token(char *word, char **next)
|
||||||
|
|
||||||
t = ret = malloc(strlen(word)+1);
|
t = ret = malloc(strlen(word)+1);
|
||||||
ptr = word;
|
ptr = word;
|
||||||
|
|
||||||
state = 0;
|
state = 0;
|
||||||
*t = 0;
|
*t = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
if (*ptr==0)
|
if (*ptr==0)
|
||||||
ctype = PRC_EOS;
|
ctype = PRC_EOS;
|
||||||
else if (*ptr=='\\')
|
else if (*ptr=='\\')
|
||||||
ctype = PRC_ESCAPE;
|
ctype = PRC_ESCAPE;
|
||||||
|
@ -98,12 +98,12 @@ next_token(char *word, char **next)
|
||||||
t = strdup(ret);
|
t = strdup(ret);
|
||||||
|
|
||||||
free(ret);
|
free(ret);
|
||||||
|
|
||||||
if (ctype==PRC_EOS)
|
if (ctype==PRC_EOS)
|
||||||
*next = NULL;
|
*next = NULL;
|
||||||
else
|
else
|
||||||
*next = ptr;
|
*next = ptr;
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ parse_command(char *command, char ***argv, int *argc)
|
||||||
line = command;
|
line = command;
|
||||||
do {
|
do {
|
||||||
token = next_token(line, &line);
|
token = next_token(line, &line);
|
||||||
if (token) {
|
if (token) {
|
||||||
list = list_cons(token, list);
|
list = list_cons(token, list);
|
||||||
}
|
}
|
||||||
} while (token!=NULL && line!=NULL);
|
} while (token!=NULL && line!=NULL);
|
||||||
|
@ -141,15 +141,15 @@ execCommand(char *command)
|
||||||
int argc;
|
int argc;
|
||||||
|
|
||||||
parse_command(command, &argv, &argc);
|
parse_command(command, &argv, &argc);
|
||||||
|
|
||||||
if (argv==NULL) {
|
if (argv==NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pid=fork())==0) {
|
if ((pid=fork())==0) {
|
||||||
char **args;
|
char **args;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
args = malloc(sizeof(char*)*(argc+1));
|
args = malloc(sizeof(char*)*(argc+1));
|
||||||
if (!args)
|
if (!args)
|
||||||
exit(10);
|
exit(10);
|
||||||
|
|
|
@ -124,7 +124,7 @@ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) {
|
||||||
|
|
||||||
err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap),
|
err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap),
|
||||||
&(wmgen->mask), &(wmgen->attributes));
|
&(wmgen->mask), &(wmgen->attributes));
|
||||||
|
|
||||||
if (err != XpmSuccess) {
|
if (err != XpmSuccess) {
|
||||||
fprintf(stderr, "Not enough free colorcells.\n");
|
fprintf(stderr, "Not enough free colorcells.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -171,9 +171,9 @@ static int flush_expose(Window w) {
|
||||||
\*******************************************************************************/
|
\*******************************************************************************/
|
||||||
|
|
||||||
void RedrawWindow(void) {
|
void RedrawWindow(void) {
|
||||||
|
|
||||||
flush_expose(iconwin);
|
flush_expose(iconwin);
|
||||||
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
|
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
|
||||||
0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0);
|
0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0);
|
||||||
flush_expose(win);
|
flush_expose(win);
|
||||||
XCopyArea(display, wmgen.pixmap, win, NormalGC,
|
XCopyArea(display, wmgen.pixmap, win, NormalGC,
|
||||||
|
@ -185,9 +185,9 @@ void RedrawWindow(void) {
|
||||||
\*******************************************************************************/
|
\*******************************************************************************/
|
||||||
|
|
||||||
void RedrawWindowXY(int x, int y) {
|
void RedrawWindowXY(int x, int y) {
|
||||||
|
|
||||||
flush_expose(iconwin);
|
flush_expose(iconwin);
|
||||||
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
|
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
|
||||||
x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0);
|
x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0);
|
||||||
flush_expose(win);
|
flush_expose(win);
|
||||||
XCopyArea(display, wmgen.pixmap, win, NormalGC,
|
XCopyArea(display, wmgen.pixmap, win, NormalGC,
|
||||||
|
@ -281,12 +281,12 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=1; argv[i]; i++) {
|
for (i=1; argv[i]; i++) {
|
||||||
if (!strcmp(argv[i], "-display"))
|
if (!strcmp(argv[i], "-display"))
|
||||||
display_name = argv[i+1];
|
display_name = argv[i+1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(display = XOpenDisplay(display_name))) {
|
if (!(display = XOpenDisplay(display_name))) {
|
||||||
fprintf(stderr, "%s: can't open display %s\n",
|
fprintf(stderr, "%s: can't open display %s\n",
|
||||||
wname, XDisplayName(display_name));
|
wname, XDisplayName(display_name));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -311,10 +311,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
|
||||||
|
|
||||||
mysizehints.width = 64;
|
mysizehints.width = 64;
|
||||||
mysizehints.height = 64;
|
mysizehints.height = 64;
|
||||||
|
|
||||||
win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y,
|
win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y,
|
||||||
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
|
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
|
||||||
|
|
||||||
iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y,
|
iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y,
|
||||||
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
|
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
|
||||||
XSetWMName(display, win, &name);
|
XSetWMName(display, win, &name);
|
||||||
|
|
||||||
/* Create GC for drawing */
|
/* Create GC for drawing */
|
||||||
|
|
||||||
gcm = GCForeground | GCBackground | GCGraphicsExposures;
|
gcm = GCForeground | GCBackground | GCGraphicsExposures;
|
||||||
gcv.foreground = fore_pix;
|
gcv.foreground = fore_pix;
|
||||||
gcv.background = back_pix;
|
gcv.background = back_pix;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
How do I create a not so solid window?
|
How do I create a not so solid window?
|
||||||
How do I open a window?
|
How do I open a window?
|
||||||
How do I use pixmaps?
|
How do I use pixmaps?
|
||||||
|
|
||||||
pppstats
|
pppstats
|
||||||
A program that prints the amount of data that
|
A program that prints the amount of data that
|
||||||
is transferred over a ppp-line.
|
is transferred over a ppp-line.
|
||||||
|
@ -36,40 +36,40 @@
|
||||||
* only ppp0 will be read
|
* only ppp0 will be read
|
||||||
use wmifs if you want to read more than one ppp connection
|
use wmifs if you want to read more than one ppp connection
|
||||||
not sure about this.
|
not sure about this.
|
||||||
* the leds won't be reliable with
|
* the leds won't be reliable with
|
||||||
more than 1 ppp connection
|
more than 1 ppp connection
|
||||||
* there is an iconwin, and win variable.
|
* there is an iconwin, and win variable.
|
||||||
I have no clue why only win shouldn't
|
I have no clue why only win shouldn't
|
||||||
be enough. Will check it out later.
|
be enough. Will check it out later.
|
||||||
* The afterstep what seems the shift the
|
* The afterstep what seems the shift the
|
||||||
pixmap a bit. Don't know how and why.
|
pixmap a bit. Don't know how and why.
|
||||||
It works in the WindowManager.
|
It works in the WindowManager.
|
||||||
|
|
||||||
Things to do:
|
Things to do:
|
||||||
Split up main()
|
Split up main()
|
||||||
|
|
||||||
----
|
----
|
||||||
Thanks
|
Thanks
|
||||||
----
|
----
|
||||||
|
|
||||||
Most of the ideas, and jumpstarting it:
|
Most of the ideas, and jumpstarting it:
|
||||||
|
|
||||||
#linuxnl, without this irc-channel wmppp would've never seen the light!
|
#linuxnl, without this irc-channel wmppp would've never seen the light!
|
||||||
|
|
||||||
CCC (Constructive Code Criticism):
|
CCC (Constructive Code Criticism):
|
||||||
|
|
||||||
Marcelo E. Magallon
|
Marcelo E. Magallon
|
||||||
Thanks a LOT! It takes a while to get me convinced... :)
|
Thanks a LOT! It takes a while to get me convinced... :)
|
||||||
|
|
||||||
|
|
||||||
Minor bugs and ideas:
|
Minor bugs and ideas:
|
||||||
|
|
||||||
Marc De Scheemaecker / David Mihm / Chris Soghoian /
|
Marc De Scheemaecker / David Mihm / Chris Soghoian /
|
||||||
Alessandro Usseglio Viretta / Dan Pascu
|
Alessandro Usseglio Viretta / Dan Pascu
|
||||||
|
|
||||||
and ofcourse numerous ppl who send us bug reports.
|
and ofcourse numerous ppl who send us bug reports.
|
||||||
(numerous? hmm.. todo: rephrase this :) )
|
(numerous? hmm.. todo: rephrase this :) )
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
Changes:
|
Changes:
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
* Made wmifs.c libc5 compatible version
|
* Made wmifs.c libc5 compatible version
|
||||||
04/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
04/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
||||||
* Changed the "middle of the waveform" line color
|
* Changed the "middle of the waveform" line color
|
||||||
* Moved the RedrawWindow out of the main loop.
|
* Moved the RedrawWindow out of the main loop.
|
||||||
Lightens the system load
|
Lightens the system load
|
||||||
02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
||||||
* Torn wmppp and wmifs apart.
|
* Torn wmppp and wmifs apart.
|
||||||
|
@ -252,14 +252,14 @@ void get_ppp_stats(struct ppp_stats *cur);
|
||||||
void main(int argc, char *argv[]) {
|
void main(int argc, char *argv[]) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
/* Parse Command Line */
|
/* Parse Command Line */
|
||||||
|
|
||||||
ProgName = argv[0];
|
ProgName = argv[0];
|
||||||
if (strlen(ProgName) >= 5)
|
if (strlen(ProgName) >= 5)
|
||||||
ProgName += (strlen(ProgName) - 5);
|
ProgName += (strlen(ProgName) - 5);
|
||||||
|
|
||||||
for (i=1; i<argc; i++) {
|
for (i=1; i<argc; i++) {
|
||||||
char *arg = argv[i];
|
char *arg = argv[i];
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ typedef struct {
|
||||||
int his[55][2];
|
int his[55][2];
|
||||||
long istatlast;
|
long istatlast;
|
||||||
long ostatlast;
|
long ostatlast;
|
||||||
|
|
||||||
} stat_dev;
|
} stat_dev;
|
||||||
|
|
||||||
stat_dev stat_devices[MAX_STAT_DEVICES];
|
stat_dev stat_devices[MAX_STAT_DEVICES];
|
||||||
|
@ -362,7 +362,7 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
stat_current = i;
|
stat_current = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LEFT_ACTION) left_action = strdup(LEFT_ACTION);
|
if (LEFT_ACTION) left_action = strdup(LEFT_ACTION);
|
||||||
if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
|
if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
|
||||||
if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
|
if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
|
||||||
|
@ -417,18 +417,18 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
SetOffLED(LED_NET_RX);
|
SetOffLED(LED_NET_RX);
|
||||||
else
|
else
|
||||||
SetOnLED(LED_NET_RX);
|
SetOnLED(LED_NET_RX);
|
||||||
|
|
||||||
if (stat_devices[i].ostatlast == ostat)
|
if (stat_devices[i].ostatlast == ostat)
|
||||||
SetOffLED(LED_NET_TX);
|
SetOffLED(LED_NET_TX);
|
||||||
else
|
else
|
||||||
SetOnLED(LED_NET_TX);
|
SetOnLED(LED_NET_TX);
|
||||||
}
|
}
|
||||||
|
|
||||||
stat_devices[i].istatlast = istat;
|
stat_devices[i].istatlast = istat;
|
||||||
stat_devices[i].ostatlast = ostat;
|
stat_devices[i].ostatlast = ostat;
|
||||||
RedrawWindow();
|
RedrawWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curtime >= nexttime) {
|
if (curtime >= nexttime) {
|
||||||
nexttime+=5;
|
nexttime+=5;
|
||||||
|
|
||||||
|
@ -444,11 +444,11 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
stat_devices[i].his[53][0] = 0;
|
stat_devices[i].his[53][0] = 0;
|
||||||
stat_devices[i].his[53][1] = 0;
|
stat_devices[i].his[53][1] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RedrawWindow();
|
RedrawWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (XPending(display)) {
|
while (XPending(display)) {
|
||||||
XNextEvent(display, &Event);
|
XNextEvent(display, &Event);
|
||||||
switch (Event.type) {
|
switch (Event.type) {
|
||||||
|
@ -479,12 +479,12 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
stat_current = i;
|
stat_current = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stat_current++;
|
stat_current++;
|
||||||
if (stat_current == stat_online) stat_current = 0;
|
if (stat_current == stat_online) stat_current = 0;
|
||||||
|
|
||||||
DrawActiveIFS(stat_devices[stat_current].name);
|
DrawActiveIFS(stat_devices[stat_current].name);
|
||||||
|
|
||||||
DrawStats(&stat_devices[stat_current].his[0][0], 54, 40, 5, 58);
|
DrawStats(&stat_devices[stat_current].his[0][0], 54, 40, 5, 58);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -503,7 +503,7 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
but_stat = -1;
|
but_stat = -1;
|
||||||
|
@ -573,12 +573,12 @@ int get_statistics(char *devname, long *ip, long *op, long *is, long *os) {
|
||||||
struct ppp_stats ppp_cur, ppp_old;
|
struct ppp_stats ppp_cur, ppp_old;
|
||||||
static int ppp_opened = 0;
|
static int ppp_opened = 0;
|
||||||
|
|
||||||
|
|
||||||
if (!strncmp(devname, "ppp", 3)) {
|
if (!strncmp(devname, "ppp", 3)) {
|
||||||
if (!ppp_opened) {
|
if (!ppp_opened) {
|
||||||
/* Open the ppp device. */
|
/* Open the ppp device. */
|
||||||
memset(&ppp_cur, 0, sizeof(ppp_cur));
|
memset(&ppp_cur, 0, sizeof(ppp_cur));
|
||||||
if ((ppp_h = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
|
if ((ppp_h = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
get_ppp_stats(&ppp_cur);
|
get_ppp_stats(&ppp_cur);
|
||||||
ppp_old = ppp_cur;
|
ppp_old = ppp_cur;
|
||||||
|
@ -691,15 +691,15 @@ int checknetdevs(void) {
|
||||||
fgets(temp, 128, fd);
|
fgets(temp, 128, fd);
|
||||||
while (fgets(temp, 128, fd)) {
|
while (fgets(temp, 128, fd)) {
|
||||||
p = strtok(temp, tokens);
|
p = strtok(temp, tokens);
|
||||||
|
|
||||||
/* Skip dummy code */
|
/* Skip dummy code */
|
||||||
|
|
||||||
if (!strncmp(p, "dummy", 5))
|
if (!strncmp(p, "dummy", 5))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* If p == "lo", and active_interface (as given on the cmd line) != "lo",
|
/* If p == "lo", and active_interface (as given on the cmd line) != "lo",
|
||||||
skip it! */
|
skip it! */
|
||||||
|
|
||||||
if (strcmp(p, "lo") || (active_interface && !strcmp(active_interface, "lo"))) {
|
if (strcmp(p, "lo") || (active_interface && !strcmp(active_interface, "lo"))) {
|
||||||
strcpy(foundbuffer[devsfound], p);
|
strcpy(foundbuffer[devsfound], p);
|
||||||
devsfound++;
|
devsfound++;
|
||||||
|
@ -733,16 +733,16 @@ int checknetdevs(void) {
|
||||||
if (j < MAX_STAT_DEVICES && i != j) {
|
if (j < MAX_STAT_DEVICES && i != j) {
|
||||||
stat_devices[i] = stat_devices[j];
|
stat_devices[i] = stat_devices[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
for (j=0; j<MAX_STAT_DEVICES; j++) {
|
for (j=0; j<MAX_STAT_DEVICES; j++) {
|
||||||
if (foundbuffer[j][0]) {
|
if (foundbuffer[j][0]) {
|
||||||
|
|
||||||
strcpy(stat_devices[i].name, foundbuffer[j]);
|
strcpy(stat_devices[i].name, foundbuffer[j]);
|
||||||
|
|
||||||
for (k=0; k<48; k++) {
|
for (k=0; k<48; k++) {
|
||||||
stat_devices[i].his[k][0] = 0;
|
stat_devices[i].his[k][0] = 0;
|
||||||
stat_devices[i].his[k][1] = 0;
|
stat_devices[i].his[k][1] = 0;
|
||||||
|
@ -793,7 +793,7 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
|
||||||
copyXPMArea(100+1, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
copyXPMArea(100+1, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
||||||
else
|
else
|
||||||
copyXPMArea(100+0, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
copyXPMArea(100+0, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
||||||
|
|
||||||
p2 = (p2 + p3);
|
p2 = (p2 + p3);
|
||||||
p3 *= -1;
|
p3 *= -1;
|
||||||
p2 *= -1;
|
p2 *= -1;
|
||||||
|
@ -862,11 +862,11 @@ void get_ppp_stats(struct ppp_stats *cur) {
|
||||||
#define LED_SZE_X (4)
|
#define LED_SZE_X (4)
|
||||||
#define LED_SZE_Y (4)
|
#define LED_SZE_Y (4)
|
||||||
|
|
||||||
#define LED_ON_NET_X (87)
|
#define LED_ON_NET_X (87)
|
||||||
#define LED_ON_NET_Y (66)
|
#define LED_ON_NET_Y (66)
|
||||||
#define LED_OFF_NET_X (93)
|
#define LED_OFF_NET_X (93)
|
||||||
#define LED_OFF_NET_Y (66)
|
#define LED_OFF_NET_Y (66)
|
||||||
#define LED_ERR_NET_X (81)
|
#define LED_ERR_NET_X (81)
|
||||||
#define LED_ERR_NET_Y (66)
|
#define LED_ERR_NET_Y (66)
|
||||||
#define LED_ON_SW_NET_X (49)
|
#define LED_ON_SW_NET_X (49)
|
||||||
#define LED_ON_SW_NET_Y (85)
|
#define LED_ON_SW_NET_Y (85)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
How do I create a not so solid window?
|
How do I create a not so solid window?
|
||||||
How do I open a window?
|
How do I open a window?
|
||||||
How do I use pixmaps?
|
How do I use pixmaps?
|
||||||
|
|
||||||
pppstats
|
pppstats
|
||||||
A program that prints the amount of data that
|
A program that prints the amount of data that
|
||||||
is transferred over a ppp-line.
|
is transferred over a ppp-line.
|
||||||
|
@ -36,40 +36,40 @@
|
||||||
* only ppp0 will be read
|
* only ppp0 will be read
|
||||||
use wmifs if you want to read more than one ppp connection
|
use wmifs if you want to read more than one ppp connection
|
||||||
not sure about this.
|
not sure about this.
|
||||||
* the leds won't be reliable with
|
* the leds won't be reliable with
|
||||||
more than 1 ppp connection
|
more than 1 ppp connection
|
||||||
* there is an iconwin, and win variable.
|
* there is an iconwin, and win variable.
|
||||||
I have no clue why only win shouldn't
|
I have no clue why only win shouldn't
|
||||||
be enough. Will check it out later.
|
be enough. Will check it out later.
|
||||||
* The afterstep what seems the shift the
|
* The afterstep what seems the shift the
|
||||||
pixmap a bit. Don't know how and why.
|
pixmap a bit. Don't know how and why.
|
||||||
It works in the WindowManager.
|
It works in the WindowManager.
|
||||||
|
|
||||||
Things to do:
|
Things to do:
|
||||||
Split up main()
|
Split up main()
|
||||||
|
|
||||||
----
|
----
|
||||||
Thanks
|
Thanks
|
||||||
----
|
----
|
||||||
|
|
||||||
Most of the ideas, and jumpstarting it:
|
Most of the ideas, and jumpstarting it:
|
||||||
|
|
||||||
#linuxnl, without this irc-channel wmppp would've never seen the light!
|
#linuxnl, without this irc-channel wmppp would've never seen the light!
|
||||||
|
|
||||||
CCC (Constructive Code Criticism):
|
CCC (Constructive Code Criticism):
|
||||||
|
|
||||||
Marcelo E. Magallon
|
Marcelo E. Magallon
|
||||||
Thanks a LOT! It takes a while to get me convinced... :)
|
Thanks a LOT! It takes a while to get me convinced... :)
|
||||||
|
|
||||||
|
|
||||||
Minor bugs and ideas:
|
Minor bugs and ideas:
|
||||||
|
|
||||||
Marc De Scheemaecker / David Mihm / Chris Soghoian /
|
Marc De Scheemaecker / David Mihm / Chris Soghoian /
|
||||||
Alessandro Usseglio Viretta
|
Alessandro Usseglio Viretta
|
||||||
|
|
||||||
and ofcourse numerous ppl who send us bug reports.
|
and ofcourse numerous ppl who send us bug reports.
|
||||||
(numerous? hmm.. todo: rephrase this :) )
|
(numerous? hmm.. todo: rephrase this :) )
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
Changes:
|
Changes:
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
one line of /proc/net/dev was longer than 128 bytes
|
one line of /proc/net/dev was longer than 128 bytes
|
||||||
04/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
04/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
||||||
* Changed the "middle of the waveform" line color
|
* Changed the "middle of the waveform" line color
|
||||||
* Moved the RedrawWindow out of the main loop.
|
* Moved the RedrawWindow out of the main loop.
|
||||||
Lightens the system load
|
Lightens the system load
|
||||||
02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
|
||||||
* Torn wmppp and wmifs apart.
|
* Torn wmppp and wmifs apart.
|
||||||
|
@ -293,7 +293,7 @@ void get_ppp_stats(struct ppp_stats *cur);
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
/* Parse Command Line */
|
/* Parse Command Line */
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ typedef struct {
|
||||||
int his[55][2];
|
int his[55][2];
|
||||||
long istatlast;
|
long istatlast;
|
||||||
long ostatlast;
|
long ostatlast;
|
||||||
|
|
||||||
} stat_dev;
|
} stat_dev;
|
||||||
|
|
||||||
stat_dev stat_devices[MAX_STAT_DEVICES];
|
stat_dev stat_devices[MAX_STAT_DEVICES];
|
||||||
|
@ -415,7 +415,7 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LEFT_ACTION) left_action = strdup(LEFT_ACTION);
|
if (LEFT_ACTION) left_action = strdup(LEFT_ACTION);
|
||||||
if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
|
if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
|
||||||
if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
|
if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
|
||||||
|
@ -447,7 +447,7 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
curtime = (tv.tv_sec - tv2.tv_sec) * 1000
|
curtime = (tv.tv_sec - tv2.tv_sec) * 1000
|
||||||
+ (tv.tv_usec - tv2.tv_usec) / 1000;
|
+ (tv.tv_usec - tv2.tv_usec) / 1000;
|
||||||
|
|
||||||
waitpid(0, NULL, WNOHANG);
|
waitpid(0, NULL, WNOHANG);
|
||||||
|
@ -469,18 +469,18 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
SetOffLED(LED_NET_RX);
|
SetOffLED(LED_NET_RX);
|
||||||
else
|
else
|
||||||
SetOnLED(LED_NET_RX);
|
SetOnLED(LED_NET_RX);
|
||||||
|
|
||||||
if (stat_devices[i].ostatlast == ostat)
|
if (stat_devices[i].ostatlast == ostat)
|
||||||
SetOffLED(LED_NET_TX);
|
SetOffLED(LED_NET_TX);
|
||||||
else
|
else
|
||||||
SetOnLED(LED_NET_TX);
|
SetOnLED(LED_NET_TX);
|
||||||
}
|
}
|
||||||
|
|
||||||
stat_devices[i].istatlast = istat;
|
stat_devices[i].istatlast = istat;
|
||||||
stat_devices[i].ostatlast = ostat;
|
stat_devices[i].ostatlast = ostat;
|
||||||
}
|
}
|
||||||
RedrawWindow();
|
RedrawWindow();
|
||||||
|
|
||||||
if (curtime >= nexttime) {
|
if (curtime >= nexttime) {
|
||||||
nexttime=curtime+ScrollSpeed;
|
nexttime=curtime+ScrollSpeed;
|
||||||
|
|
||||||
|
@ -493,11 +493,11 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
stat_devices[i].his[53][0] = 0;
|
stat_devices[i].his[53][0] = 0;
|
||||||
stat_devices[i].his[53][1] = 0;
|
stat_devices[i].his[53][1] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RedrawWindow();
|
RedrawWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
while (XPending(display)) {
|
while (XPending(display)) {
|
||||||
XNextEvent(display, &Event);
|
XNextEvent(display, &Event);
|
||||||
switch (Event.type) {
|
switch (Event.type) {
|
||||||
|
@ -526,12 +526,12 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
stat_current = i;
|
stat_current = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stat_current++;
|
stat_current++;
|
||||||
if (stat_current == stat_online) stat_current = 0;
|
if (stat_current == stat_online) stat_current = 0;
|
||||||
|
|
||||||
DrawActiveIFS(stat_devices[stat_current].name);
|
DrawActiveIFS(stat_devices[stat_current].name);
|
||||||
|
|
||||||
DrawStats(&stat_devices[stat_current].his[0][0], 54, 40, 5, 58);
|
DrawStats(&stat_devices[stat_current].his[0][0], 54, 40, 5, 58);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -550,7 +550,7 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
but_stat = -1;
|
but_stat = -1;
|
||||||
|
@ -631,12 +631,12 @@ int get_statistics(char *devname, long *ip, long *op, long *is, long *os) {
|
||||||
struct ppp_stats ppp_cur, ppp_old;
|
struct ppp_stats ppp_cur, ppp_old;
|
||||||
static int ppp_opened = 0;
|
static int ppp_opened = 0;
|
||||||
|
|
||||||
|
|
||||||
if (!strncmp(devname, "ppp", 3)) {
|
if (!strncmp(devname, "ppp", 3)) {
|
||||||
if (!ppp_opened) {
|
if (!ppp_opened) {
|
||||||
/* Open the ppp device. */
|
/* Open the ppp device. */
|
||||||
memset(&ppp_cur, 0, sizeof(ppp_cur));
|
memset(&ppp_cur, 0, sizeof(ppp_cur));
|
||||||
if ((ppp_h = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
|
if ((ppp_h = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
get_ppp_stats(&ppp_cur);
|
get_ppp_stats(&ppp_cur);
|
||||||
ppp_old = ppp_cur;
|
ppp_old = ppp_cur;
|
||||||
|
@ -755,13 +755,13 @@ int checknetdevs(void) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Skip dummy code */
|
/* Skip dummy code */
|
||||||
|
|
||||||
if (!strncmp(p, "dummy", 5))
|
if (!strncmp(p, "dummy", 5))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* If p == "lo", and active_interface (as given on the cmd line) != "lo",
|
/* If p == "lo", and active_interface (as given on the cmd line) != "lo",
|
||||||
skip it! */
|
skip it! */
|
||||||
|
|
||||||
if (strcmp(p, "lo") || (active_interface && !strcmp(active_interface, "lo"))) {
|
if (strcmp(p, "lo") || (active_interface && !strcmp(active_interface, "lo"))) {
|
||||||
strcpy(foundbuffer[devsfound], p);
|
strcpy(foundbuffer[devsfound], p);
|
||||||
devsfound++;
|
devsfound++;
|
||||||
|
@ -802,9 +802,9 @@ int checknetdevs(void) {
|
||||||
|
|
||||||
for (j=0; j<MAX_STAT_DEVICES; j++) {
|
for (j=0; j<MAX_STAT_DEVICES; j++) {
|
||||||
if (foundbuffer[j][0]) {
|
if (foundbuffer[j][0]) {
|
||||||
|
|
||||||
strcpy(stat_devices[i].name, foundbuffer[j]);
|
strcpy(stat_devices[i].name, foundbuffer[j]);
|
||||||
|
|
||||||
for (k=0; k<48; k++) {
|
for (k=0; k<48; k++) {
|
||||||
stat_devices[i].his[k][0] = 0;
|
stat_devices[i].his[k][0] = 0;
|
||||||
stat_devices[i].his[k][1] = 0;
|
stat_devices[i].his[k][1] = 0;
|
||||||
|
@ -870,7 +870,7 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
|
||||||
copyXPMArea(100+1, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
copyXPMArea(100+1, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
||||||
else
|
else
|
||||||
copyXPMArea(100+0, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
copyXPMArea(100+0, 68, 1, 1, k+x_left, y_bottom-size/2+p2/2);
|
||||||
|
|
||||||
p2 = (p2 + p3);
|
p2 = (p2 + p3);
|
||||||
p3 *= -1;
|
p3 *= -1;
|
||||||
p2 *= -1;
|
p2 *= -1;
|
||||||
|
@ -941,11 +941,11 @@ void get_ppp_stats(struct ppp_stats *cur) {
|
||||||
#define LED_SZE_X (4)
|
#define LED_SZE_X (4)
|
||||||
#define LED_SZE_Y (4)
|
#define LED_SZE_Y (4)
|
||||||
|
|
||||||
#define LED_ON_NET_X (87)
|
#define LED_ON_NET_X (87)
|
||||||
#define LED_ON_NET_Y (66)
|
#define LED_ON_NET_Y (66)
|
||||||
#define LED_OFF_NET_X (93)
|
#define LED_OFF_NET_X (93)
|
||||||
#define LED_OFF_NET_Y (66)
|
#define LED_OFF_NET_Y (66)
|
||||||
#define LED_ERR_NET_X (81)
|
#define LED_ERR_NET_X (81)
|
||||||
#define LED_ERR_NET_Y (66)
|
#define LED_ERR_NET_Y (66)
|
||||||
#define LED_ON_SW_NET_X (49)
|
#define LED_ON_SW_NET_X (49)
|
||||||
#define LED_ON_SW_NET_Y (85)
|
#define LED_ON_SW_NET_Y (85)
|
||||||
|
|
Loading…
Reference in a new issue