Westell stat collector
Copyright Josh Carroll (josh.carroll@gmail.com)
Released under the GPLv2.

==============================================

I wrote this utility so I could check my modem's line stats from
Linux, since the Westell diagnostic utility only works on win32
platforms. With the 6100, I could use the web interface to get the
stats for mrtg, but since the westell is sending multicast packets
with the information already, I figured it would be a cleaner way
to collect the stats.

The code simply listens for udp packets destined for the multicast
group being broadcast to by the modem. Note that the modem does NOT
do this by default (e.g. after a power cycle). Instead, you must
initialize the modem with the diagnostic software or send a specially
crafted IGMP packet and/or a broadcast udp packet to enabled the modem.
A facility within the script to initialize the modem is planned in the
near future.

A configuration file is now supported. By default wdiag will look in
/etc/wdiag.conf or /usr/local/etc/wdiag.conf. An example configuration
is included in the examples directory.

==============================================

source

	The source code (native Linux code, may work in FreeBSD,
	compiles in cygwin but does not use wsock, only sockets so it
	requires the cygwin dll). I removed support for OpenBSD, since
	OpenBSD does not support raw packet creation like Linux. Instead,
	I will probably port these programs to libpcap so that it is portable
	by design.

	Code compiled and ran (but functionality not tested) on:

	Debian GNU/Linux (sid) - Linux 2.6.7+pax
	Gentoo Linux 2004.2 - Linux 2.4.27-grsec-2.0.1
	Redhat Linux 7.1 - Linux 2.4.9
	Redhat Advanced Workstation Release 2 - Linux 2.4.18 (IA64)
	FreeBSD 4.5-RELEASE
	FreeBSD 5.2-CURRENT
	Windows XP Professional - Cygwin


compatibility

	The code should work for most Westell modems that broadcast
	stats via multicast, but only the 6100 was tested.
	If the data values are incorrect, you can try adding another
	modem definition in the code and recompiling it with the included
	Makefile (just type: make, assuming you have all the necessary
	libraries and a compiler installed).

Firewalls

	Note that if you have a firewall between your Unix
	box and the DSL modem, you should allow the appropriate traffic
	to/fro said firewall so that you can communicate with the modem.
	E.g. for the 6100, you should allow broadcast packets on
	192.168.1.255 and multicast packets destined for 224.73.193.62.

Problems / Help

	If you have any problems, feel free to contact me at josh.carroll@gmail.com.
	The code is fairly well commented, but I'm sure there are mistakes and
	things I'm doing that could be done more efficiently or cleanly. I accept
	patches ;)

	Also, please let me know if you've had success with the program talking
	to westells other than the 610030 out of the box.

	Thanks, and happy stat collecting!

ISP Specific Information:
	The Westell 2200 with Bellsouth connections may run on the 192.168.0.255
	broadcast instead of the default 192.168.1.255. If wstart is not properly
	"turning on" the stats broadcast for the modem, try adding the -b
	argument to wstart (e.g. wstart -m 3 -b 192.168.0.255). Thanks to Chris
	Clark for pointing this out for Bellsouth modems.

Licensed under the GPLv2:

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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
==============================================
