2001-11-13 Jens Petersen * linkchk.hs: Simplified description. Updated todo list. (gtksetup): No longer set window policy to auto_skrink. Shorten initial label to just "...". (hopchk): debug "hopchk:". Don't debug out when returning err. (reportTime): Remove quotes around regexp string. (ifaceDown): Use new ifconfig function. Check ifconfig output to be sure interface is really UP with regexp. (ifconfig): New function. (peeraddr): debug "peeraddr:". (ptpAddress): use new ifconfig function. Don't quote regexp string. (popen): Add debug message for popen with commands and opts. 2001-11-01 Jens Petersen * linkchk.hs: Updated todo list. Import elemIndex from List, readFloat and showFFloat from Numeric. (FlagNullary): New type for options with no arg. (FlagUnary): New type for options with one arg. (Flag): Redefined in terms of them. (debugging): -V gone, -v is now --version. Added --interface, and --host. Restructured to use FlagNullary and FlagUnary. (unaryVal): New function that maybe returns value of option with arg. (unaryOpt): New function to test whether a unary option present. (nullaryOpt): New function that tests whether a nullary opt present. (main): Use FlagNullary and FlagUnary. Updated version. Implicit parameter opts to start and optsOk. (optsOk): Tests directly whether both --version and --help, or --host and --interface specified in implicit ?opt. (optOk): Removed. (header): Interface is now an option. (AF): Removed. (start): Use implicit opts, and just test for --tty. (delay): Removed. (chkDelay): Removed. (startTty): Use ?opts. labeltxt replaces ifname. doSleep for sleep. (startGtk): Use ?opts. (gtksetup): Use ?opts. labeltxt instead of ifname. Give window autoshrink policy. signalConnect was widgetSignalConnect. Use containerSetBorderWidth for containerBorderWidth. Rename label to lbl. Fix width at 50 pixels for now. (idleHandler): Use ?opts and doSleep. (interface): New function to return interface. Use ?opts and unaryVal. (labeltxt): was ifname. Use ?opts and interface. (doSleep): New. Use ?opts to read --delay. (hopchk): Use ?opts. Check ifconfig first if --interface given. ifaceAddr is now pingOpts. debug out when failing with err. (ping): Use ?opts. (pingOpts): was ifaceAddr. Use ?opts. (sigfig): New function in reportTime, to round up time to 3sf's. (reportTime): Use it. (ifaceDown): New function to test with ifconfig whether interface is down. (peeraddr): Use ?opts and only maybe return interface. If --host then return host. Use interface and defaultRoute. (maybeRead): New function which maybe ReadS from a string. (readRtGwys): Use ?opts. (gtwyHost): Use ?opts and defaultRoute. (parseRT): Use ?opts and afOpt. (adOpt): Use ?opts. (doParseRTE): Ditto. Drop second guard. (debug): Use ?opts. (defaultRoute): New function. * README: Rewrote description. Updated dependencies' versions. * NEWS: New features in 0.02 2001-10-24 Jens Petersen * linkchk.spec.in: Added defattr. Increased release number. * index.html: add screenshot of window. Restructured Releases and put Building at end. * configure.in: increment version number. Removed AC_CACHE_CHECK for popenhs version. 2001-10-18 Jens Petersen * linkchk.hs: changed description and updated todo list. Don't import readHex from Numeric. (main): Update version to 0.01. (optsOk): use `and'. (startTty): debug count. (gtksetup): window title is now linkchk ++ interface. (hopchk): peeraddr now returns (address, interface). Add interface option to ping if necessary. Handle leaking fixed in ghc-5.02, so drop guard hacks that read all of other stream. "broken" to "dropped". (ifaceAddr): return address arg for ping with interface option if linklocal ipv6. (reportTime): simplify regexp since handle leaking fixed in ghc. (chkError): Removed for same reason. (reportError): Ditto. (linklocal): tests if an ipv6 address is linklocal. (peeraddr): returns (address, interface). * linkchk.hs: * linkchk.spec.in: New file, based on popenhs.spec.in * screenshot.png: new file. * index.html: Add image of window running. Restructured page. * configure.in: added AM_INIT_AUTOMAKE. Don't test for grep and hstags. No more `cat VERSION`. Put gtk+hs cflags in HCFLAGS. Test for popenhs-config. Add popenhs cflags to HCFLAGS. Generate Makefile. * aclocal.m4: Now autogenerated by aclocal from * acinclude.m4: New file. Based on file in popenhs, which turn is based on gtk+hs file, based on ghc.... * VERSION: removed. Version number is now in "configure.in" [and "linkchk.hs" :-( ] * README: updated for 0.01 * NEWS: 0.01 entries, describing --delay, -6, time, netstat, openhs, automake and autoconf * Makefile: now autogenerated by autoconf. * Makefile.in: autogenerated by automake. * Makefile.am: New file. Based on popenhs "Makefile.am". * INSTALL: Moved contents to README. This is now generic GNU file. 2001-10-02 Jens Petersen * linkchk.hs: changed license to GPL 2 only. Program not library. Not LGPL. Improve description. Added Todo section. Don't import IO, since no longer used. Import Popen. Import RegexString is back (LinkState) gone. (Flag) new flags added: Delay, IPv6 and Debug. Derive Eq. (debugging): new unsafe IORef to hold debug state. (main): version 0.01. Pass all options to start. (optsOk): handle multiple options. (AF): new type to denote IP v6 or v4. (start): Set debugging ioref if debug option set and decide whether IP v4 or v6. (delay): New. Converts delay option parameter to integer. (chkDelay): Helper function to read decimal from string. (startTty): Signature has maybe interface, af and delay. pppchk changed to hopchk with af. Instead of report, use a case to display result. sleep for delay. (startGtk): Signature has maybe interface, af and delay. (gtksetup): Ditto. Use ifname to decide name of interface. (idlehandler): pppchk changed to hopchk with af. Instead of report, use a case to display result. sleep for delay. (ifname): new function returns given interface or default as name. (Result): new type to denote result. (hopchk): was pppchk. Signature includes af and Result. peeraddr takes af. If no address return "no route". Use popen2 instead of popen, and use ping. If succeeds and no error or jusr warning -- checking closes err handle! -- return time, report broken if error, otherwise return ping error message. (ping): new function that gives ping command depending on af. (fdCat): removed. (reportTime): new function to read ping time and format it. (chkError): New. If err null or just warning, then fine. (RtEntry): destination back again. (findInterface): removed (peeraddr): signature takes maybe interface and af to maybe string address. readRtHosts renamed to readRtGwys with af. Find with function cased on maybe interface and af. If no address return nothing instead of raising error, otherwise just address. (readRtGwys): was readRtHosts. Takes af. parseRT takes af. (gtwyHost): handle ipv6 "::" too. (parseRT): take af. Don't openFile "/proc/net/route", popen2 netstat -rn instead. afOpt gives inet6 or inet option. If ok, then parse and return list route entries, otherwise empty list. (afOpt): New. Returns inet or inet6 depending on af. (linesRoutingTable): Gone. (doParseRT): Reflect netstat -rn output instead of /proc/net/route format. Don't need to convNtoA since netstat gives decimal ipv4 addresses. Handle both v4 and v6 output. (convNtoA): Removed. (debug): new program to print value when debugging. (popenInOutErr): Moved to POpen, a new separate module. 2001-10-02 Jens Petersen * INSTALL: updated to reflect current versions of dependencies. Removed text about old versions of gtkhs-config. * Makefile: change call of gtkhs-config from variable shell call to backquote eval inside ghc call. Include popen module. * README: GPL 2. Changed description including v4 and v6. Changed text about /proc to Linux options of ping and netstat. * VERSION: 0.01 * index.html: changed description. Added section headings. Improved formatting of releases and add links to rpms. 2001-08-17 Jens Petersen * version 0.00, first public release