SPX10LOCK(1)							  SPX10LOCK(1)



NAME
       spx10lock - query spx10S0 variables/commands

SYNOPSIS
       spx10lock [-i infilename] [-l] [-o outfilename] [-q queryfilename] [-r] [-u] [-v] [commands ...]

DESCRIPTION
       Spx10lock  is  for providing interoperability between the input file of
       the spx10S0 program and externally applied commands-the spx10S0 program
       writes  internally  generated  commands	to its input file, which would
       create concurrency issues with externally generated commands; both  the
       spx10lock  and  spx10S0	programs  use fcntl(2) advisory locking of the
       spx10S0 input file for interoperability	between  internally  generated
       commands  within the spx10S0 program, and externally generated commands
       by the spx10lock program.

       Queries are submitted to the spx10lock program on stdin.   The  results
       to queries are printed to stdout.

       Multiple '0 terminated queries can be submitted in a single transaction
       to the input file of the spx10lock program,  and  all  queries  in  the
       transaction processed to stdout before the input file lock is released.

       Only text transactions are permitted, (the program uses the EOT = ^D  =
       end  of transmission/transaction character for EOF and transaction con-
       currency control across the link, which is not compatible  with	binary
       data, as in telnet(1).)

       If  the	program  is  invoked with arguments, they are sent to outfile,
       instead of the input file being read.

       An appropriate example usage would be:

	   mknod infile p

	   spx10S0 -f spx10S0db -i infile -q queryfile
	   spx10lock -o infile -q queryfile -i commands

       or

	   spx10lock -o infile -q queryfile "command1" "command2" ...

       The spx10lock program writes externally supplied, (via stdin,) x10 com-
       mands to the named pipe, infile, and the spx10S0 program reads the com-
       mands from the pipe, and writes resulting data to queryfile,  which  is
       read by the spx10lock program and printed to stdout.

       To  provide  TCP/Ethernet  connectivity,  the ucspi tcpserver/tcpclient
       programs at http://cr.yp.to/ucspi-tcp.html can be used for  transaction
       processing  between  two spx10lock programs; for example, on the server
       machine, machine1:

	   mknod infile p

	   spx10S0 -f spx10S0db -i infile -q queryfile
	   tcpserver -v 0 23456 spx10lock -r -o infile -q queryfile

       and, on the client machine:

	   tcpclient -v machine1 23456 spx10lock -u "a5 on"

       would turn device a5 on, using TCP socket 23456.

       The ucspi-tcp programs are robust network programs with enhanced  secu-
       rity features.

OPTIONS
       -i infilename
	      Input filename, (stdin).

       -l     Limit input transaction size to BUFSIZE characters.

       -o outfilename
	      Output filename.

       -q queryfilename
	      Query filename.

       -r     Do not remove EOT transmission/transaction marker.

       -u     Ucspi-tcp client file descriptors.

       -v     Print the version and copyright banner of the program.

       commands ...
	      List of commands instead of input file.

SEE ALSO
       spx10S0(1), spx10S1(1), spx10lock(1), spx10delay(1).

DIAGNOSTICS
       Error  messages	for  incompatible  arguments,  inaccessible files, and
       opening and closing files.

AUTHORS
       ----------------------------------------------------------------------

       A license is hereby granted to reproduce this software source code and
       to create executable versions from this source code.  The copyright
       notice included with the software must be maintained in all copies
       produced.

       THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES
       WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF
       MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE.  THE
       AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE
       INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY.

       Copyright (c) 1994-2007, John Conover, All Rights Reserved.

       The CM17A section of the code is based on code from the BottleRocket
       program, (http://www.linuxha.com/bottlerocket/,) by Tymm Twillman,
       Ashley Clark, David Anderson, Warner Losh, and, Christian Gafton. (c)
       1999 Ashley Clark (aclark@ghoti.org) and Tymm Twillman (tymm@acm.org)
       Free Software.  LGPL applies.  No warranties expressed or implied.

       Comments and/or bug reports should be addressed to:

	   john@email.johncon.com (John Conover)

	   http://www.johncon.com/

       ----------------------------------------------------------------------



			       January 10, 2007 		  SPX10LOCK(1)