rxdyndns.zip 0.8

0.      Contents of rxdyndns.zip 0.8:
0.1     RXDYNDNS.HTML   this text
0.2     RXDYNDNS.CMD    simple DynDNS update script for OS/2 REXX
0.3     WATCHPPP.CMD    simple OS/2 ppp0 daemon using RXDYNDNS.CMD
0.4     WATCHPPP.ICO    a nice icon for <WATCHPPP.CMD> PPP0.DAEMON

1.      Prerequisites
1.1     RXSOCK.DLL      REXX sockets library from IBM
1.2     ppp0.pid        ?:\mptn\etc\ppp0.pid watched by WATCHPPP.CMD
        ifconfig.exe    dynamic IP determined by IFCONFIG PPP0
1.3     HOSTNAME        your DynDNS host(s) , e.g. test.dnsalias.org
        USERNAME        your DynDNS loginid., e.g. test
        PASSWORD        your DynDNS password, e.g. test for test

2.      Installation
2.1     Copy WATCHPPP.CMD and RXDYNDNS.CMD to a directory in your PATH.
        Edit WATCHPPP.CMD to reflect your HOSTNAME, USERNAME, PASSWORD.
2.2     Optionally specify multiple comma separated hosts as HOSTNAME.
        Optionally specify DynDNS parameters in VARIABLE, i.e. replace
        the dummy 'system=dyndns' by one or more parameter=value pairs
        separated by & or semicolon.  You cannot use wildcard=YES or
        wildcard=NO, RXDYNDNS automatically forces wildcard=NOCHG.  Do
        not use any myip=... or hostname=... (handled by RXDYNDNS.CMD).
2.3     You cannot use system=statdns, offers for individual solutions
        welcome.  Likewise system=custom works only for paying members,
        and offline=YES only for donators.
2.4     Use 'WATCHPPP *' (once) to (re)create a WPS object PPP0.DAEMON.
        Edit PPP0.DAEMON settings as needed, e.g. add the WATCHPPP.ICO
        or modify argument 10 (the ppp0.pid check interval in seconds).
2.5     Create a shadow of PPP0.DAEMON in startup folder <WP_START>.
        Start PPP0.DAEMON manually for the first time, or reboot :-).
        Move object PPP0.DAEMON from the desktop to any other folder.

3.      WATCHPPP.CMD
3.1     The shipped version of WATCHPP.CMD updates a DynDNS host with
        call RXDYNDNS 'ppp0', 'test.dnsalias.org', 'test', 'test'
        You can edit this script as needed, e.g. start other tasks as
        soon as a new IP (= dialup internet connection) is detected.
3.2     WATCHPPP.CMD can be used as VIO program on the command line or
        as PM program (started by CMD.EXE or PMREXX.EXE).  At most one
        instance of WATCHPPP.CMD can run for any given interface, the
        default interface is IFCONFIG = 'ppp0'.
3.3     To start a new PPP0.DAEMON call e.g. WATCHPPP 10 for a poll
        cycle of 10 seconds.  The new PPP0.DAEMON automatically sends
        a termination request to a running daemon.  PPP0.DAEMON uses
        a REXX queue 'PPP0.DAEMON' to read the output of IFCONFIG.EXE,
        and terminates itself if anybody else writes into its queue.
        Use WATCHPPP 0 to send a termination request to a PPP0.DAEMON
        without starting a new instance - or simply abort it with ^C.
3.4     Specify a negative number like WATCHPPP -10 for a poll cycle
        of 10 seconds and messages even for successful (good) updates.
        Normally (positive number) only problems are displayed.  Please
        note that WATCHPPP waits for an OKAY or CANCEL (in PM) resp.
        ENTER or ESC (VIO) after each message.  There is no unattended
        error recovery.  Don't run WATCHPPP in a DETACHed session, use
        a minimized VIO or PM session.
3.5     WATCHPPP called without argument displays a short usage info
        and its actual configuration, the defaults on my system are:
      |  usage: G:\BIN\watchppp.cmd [seconds|0|-|*]
      |  checks E:\MPTN\ETC\ppp0.pid cyclically with the given delay.
      |  If changed and IFCONFIG ppp0 shows a new IP, then host(list)
      |  test.dnsalias.org
      |  is updated with the configured parameters:
      | G:\BIN\RXDYNDNS.CMD ppp0 host(list) test test system=dyndns
      |
      |  Specify seconds < 0 to get a message even for GOOD updates,
      |  use "G:\BIN\watchppp.cmd 0" to kill a running PPP0.DAEMON,
      |  use "G:\BIN\watchppp.cmd -" for offline=YES
      |  use "G:\BIN\watchppp.cmd *" to create a PPP0.DAEMON object.
3.6     Again, to change the default configuration just edit HOSTNAME,
        USERNAME, PASSWORD, and VARIABLE at the begin of WATCHPPP.CMD.

4.      RXDYNDNS.CMD
4.1     RXDYNDNS can be used directly on the command line to update
        a DynDNS host: RXDYNDNS interface hostname username password,
        e.g. try RXDYNDNS ppp0 test.dyndns.org test test
4.2     Please edit the line COPYLEFT = ... in RXDYNDNS.CMD as soon
        as you change anything else in this script, because DynDNS
        can block erroneous resp. abusive update clients.
4.3     RXDYNDNS.CMD does not actually handle the DynDNS protocol,
        it only displays resp. returns the result of an attempted
        update. The caller has to evaluate the result messages as
        specified in DynDNS return codes.
4.4     WATCHPPP.CMD simply displays any RXDYNDNS.CMD problem, so the
        user is responsible for the proper reaction like waiting for
        a certain period or correcting invalid WATCHPPP parameters.
4.5     RXDYNDNS.CMD called without argument shows a short usage info:
      |  usage: rxdyndns.cmd interface hosts login password [param]
      |   e.g.: rxdyndns.cmd ppp0 test.dnsalias.org test test offline=YES
      |   e.g.: rxdyndns.cmd ppp0 test.dnsalias.org test test
      |  where multiple comma separated hosts are allowed.
      |  Separate parameters with "&" or ";" (not spaces),
      |  parameter wildcard=NOCHG enforced by rxdyndns.cmd.
4.6     If called as REXX FUNCTION / PROCEDURE by WATCHPPP (instead of
        a COMMAND line call) RXDYNDNS only returns the update result
        to its caller.  Otherwise the result is also written on STDOUT,
        normally the screen.  In both cases update results are sent to
        a local SysLog daemon (RfC 3164, UDP port 514) if available.

5.      History
5.1     I've written RXDYNDNS 0.3 because DNSAlias-Net 2.0 had been
        removed from the list of "other clients" for unknown reasons.
        It's now back again, see the list of other DynDNS clients.

5.2     New features in RXDYNDNS.CMD version 0.7:
        You can specify multiple comma separated hosts, example line:
        RXDYNDNS.CMD ppp0 test.dnsalias.org,test.dyndns.org test test

        You can't mix DynDNS and OrgDNS hosts, the relevant server is
        derived from the last host, default members.dyndns.org:8245
        - for last host *.orgdns.org server members.orgdns.org:80
        - for tests use *localhost   server          localhost:80

        You can add certain DynDNS parameters as fifth argument, e.g.:
        RXDYNDNS.CMD ppp0 test.dnsalias.org test test offline=YES
        RXDYNDNS.CMD ppp0 test.dnsalias.org test test system=custom
        RXDYNDNS.CMD ppp0 test.dnsalias.org test test mx=your.mx.test

        Separate multiple additional parameters with '&' or semicolon
        as in system=custom&offline=YES or system=custom;offline=YES
        Internally commata, ampersands, semicolons, and even blanks
        are accepted as separators, but in the resulting GET HTTP/1.0
        query parameters are separated by ampersands and hostnames by
        commata, resulting in query parameter hostname=host1,host2 etc.

        Normally RXDYNDNS does not allow you to update a host, if its
        IP is already set.  Now the presence of parameter &offline=YES
        bypasses this restriction.   You MUST NOT specify &offline=NO,
        this feature is reserved for manual tests.  Only donators are
        allowed to use &offline=YES, otherwise you'd get a "!donator".

        The error message "nohost" normally indicates an unknown host.
        In the case of parameter &system=custom resp. &system=statdns
        "nohost" can also indicate a host not known in the specified
        system.

5.3     Do not use parameters mx=what.ever.test and backmx=NO (or YES)
        without the prior consent of postmaster@what.ever.test, and do
        not specify your own single host as MX.  With dynamic IPs it's
        utter dubious to run a SMTP daemon.  At certain times your host
        name will be resolved to a dynamic IP of another online system,
        e.g. if old (= cached) DNS records are used beyond expiration.

5.4     In one trivial case feel free to edit RXDYNDNS.CMD keeping its
        original COPYLEFT:  If you're behind a firewall blocking port
        8245, simply replace 8245 by 80.  A certain German ISP is known
        to redirect the very first HTTP GET on port 80 to its own site.
        Maybe add a dummy RXGETURL to WATCHPPP before calling RXDYNDNS
        if you are forced to use this ISP and port 80.

5.5     Version 0.8 is a bug fix.  RxSock.dll SockGetHostId() returns
        the local IP as reported by HOSTID.exe without argument.  This
        only works if the IP is set, explicitly with HOSTID.exe IP, or
        implicitly by configuring a "primary interface" in the TCP/IP
        settings.  On a system without "primary interface" the IP of
        the first dialup connection replaces 0.0.0.0 as local hostid,
        and later connections don't update this hostid.

        The code to send syslog messages used the SockGetHostId() IP to
        determine the local host name if possible.  If this IP (hostid)
        was used by another host, then the syslog message was lost with
        socket error NETUNREACH.  No harm done, but obviously incorrect.
        For details see also the fixed and simplified RXSYSLOG demo.

        WATCHPPP 0 to terminate a running daemon in a PM session could
        take some time depending on its poll cycle.  Therefore I added
        MAXSLEEP = 100 or less seconds.

5.6     This is version 0.8 of RXDYNDNS.CMD, for future updates see
        <URL:http://purl.net/xyzzy/src/rxdyndns.zip> (= ZIP archive),
        <URL:http://purl.net/xyzzy/rxdyndns.htm>     (= HTML manual),
        <URL:http://purl.net/xyzzy/sources.htm>      (other scripts).

XHTML validator Last update: 22 Jul 2003 23:00 by F.Ellermann