diff --git a/docbook/.gitignore b/docbook/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/docbook/AMP.png b/docbook/AMP.png deleted file mode 100644 index 5695567d..00000000 Binary files a/docbook/AMP.png and /dev/null differ diff --git a/docbook/ARPCPeek.c.html b/docbook/ARPCPeek.c.html deleted file mode 100644 index 55f30dbc..00000000 --- a/docbook/ARPCPeek.c.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - ARPCPeek.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   unsigned ARPCPeek (void const * memory, size_t extent, FILE * fp);
- *
- *   mme.h
- *
- *
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <unistd.h>
-
-#include "../tools/types.h"
-#include "../tools/endian.h"
-
-void ARPCPeek (void const * memory, size_t extent, FILE * fp)
-
-{
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_arpc_data
-	{
-		uint32_t BYPASS;
-		uint16_t ARPCID;
-		uint16_t DATALENGTH;
-		uint8_t DATAOFFSET;
-		uint8_t RESERVED [3];
-		uint16_t ARGOFFSET;
-		uint16_t STROFFSET;
-		uint16_t ARGLENGTH;
-		uint16_t STRLENGTH;
-		uint8_t LIST [1];
-	}
-	* data = (struct vs_arpc_data *)(memory);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	fprintf (fp, "BYPASS=%d ", data->BYPASS);
-	fprintf (fp, "ARPCID=%d ", data->ARPCID);
-	fprintf (fp, "DATALENGTH=%d ", LE16TOH (data->DATALENGTH));
-	fprintf (fp, "DATAOFFSET=%d ", data->DATAOFFSET);
-	fprintf (fp, "ARGOFFSET=%d ", LE16TOH (data->ARGOFFSET));
-	fprintf (fp, "STROFFSET=%d ", LE16TOH (data->STROFFSET));
-	fprintf (fp, "ARGLENGTH=%d ", LE16TOH (data->ARGLENGTH));
-	fprintf (fp, "STRLENGTH=%d ", LE16TOH (data->STRLENGTH));
-	if (data->ARPCID == 1)
-	{
-		fprintf (fp, "FORMAT=[%s]\n", &data->LIST [data->STROFFSET]);
-	}
-	return;
-}
-
-
-
- - - diff --git a/docbook/ARPCPrint.c.html b/docbook/ARPCPrint.c.html deleted file mode 100644 index 667ec769..00000000 --- a/docbook/ARPCPrint.c.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - ARPCPrint.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void ARPCPrint (FILE * fp, void const * memory, size_t extent);
- *
- *   mme.h
- *
- *   print formatted VS_ARPC payload on the specified output stream;
- *   this implementation is generic; memory is the start address of
- *   the message data (&RDATA [RDATAOFFSET]) and extent is the data
- *   length (RDATALENGTH); the call might look like this ...
- *
- *   ARPCPrint (fp, &ARPC->RDATA [ARPC->RDATAOFFSET], LE16TOH (ARPC->RDATALENGTH) - ARPC->RDATAOFFSET);
- *
- *   ... where LE16TOH () performs 16-bit host endian conversion;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *	Florian Fainelli <f.fainelli@gmail.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ARPCPRINT_SOURCE
-#define ARPCPRINT_SOURCE
-
-#include <stdio.h>
-#include <stddef.h>
-
-#include "../tools/types.h"
-#include "../tools/endian.h"
-#include "../tools/memory.h"
-#include "../mme/mme.h"
-
-void ARPCPrint (FILE * fp, void const * memory, size_t extent)
-
-{
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_arpc_data
-	{
-		uint32_t BYPASS;
-		uint16_t ARPCID;
-		uint16_t DATALENGTH;
-		uint8_t DATAOFFSET;
-		uint8_t RESERVED [3];
-		uint16_t ARGOFFSET;
-		uint16_t STROFFSET;
-		uint16_t ARGLENGTH;
-		uint16_t STRLENGTH;
-		uint8_t LIST [1];
-	}
-	* data = (struct vs_arpc_data *)(memory);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t * argp = (uint32_t *)(&data->LIST [LE16TOH (data->ARGOFFSET)]);
-	uint16_t argc = LE16TOH (data->ARGLENGTH) >> 2;
-	while (argc--)
-	{
-		*argp = LE32TOH (*argp);
-		argp++;
-	}
-
-#if defined (__UCLIBC__) 
-
-/*
- *	This is a simple fix to work around uclibc implementation issue with variable arugment lists; We are
- *	testing a better one but most PLC users will not have access to firmware that exercises this module;
- */
-
-	argp = (uint32_t *)(&data->LIST [LE16TOH (data->ARGOFFSET)]);
-	fprintf (fp, (char *)(&data->LIST [LE16TOH (data->STROFFSET)]), argp [0], argp [1], argp [2], argp [3], argp [4], argp [5], argp [6], argp [7], argp [8], argp [9], argp [10], argp [11], argp [12], argp [13], argp [14], argp [15], argp [16], argp [17], argp [18], argp [19], argp [20], argp [21], argp [22], argp [23], argp [24], argp [25], argp [26], argp [27], argp [28], argp [29], argp [30], argp [31], argp [32], argp [33], argp [34], argp [35], argp [36], argp [37], argp [38], argp [39]);
-
-#else
-
-	vfprintf (fp, (char *)(&data->LIST [LE16TOH (data->STROFFSET)]), (void *)(&data->LIST [LE16TOH (data->ARGOFFSET)]));
-
-#endif
-
-	fprintf (fp, "\n");
-	fflush (fp);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ARPCWrite.c.html b/docbook/ARPCWrite.c.html deleted file mode 100644 index 6b4a457d..00000000 --- a/docbook/ARPCWrite.c.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - ARPCWrite.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void ARPCWrite (signed fd, void const * memory, size_t extent);
- *
- *   mme.h
- *
- *   write an unformatted VS_ARPC payload on the specified output
- *   stream; this implementation is generic; memory is the start
- *   address of the message data (&RDATA [RDATAOFFSET]) and extent
- *   is the data length (RDATALENGTH); the call might look like
- *   this ...
- *
- *   ARPCWrite (fd, &ARPC->RDATA [ARPC->RDATAOFFSET], LE16TOH (ARPC->RDATALENGTH - ARPC->RDATAOFFSET));
- *
- *   ... where LE16TOH () performs 16-bit host endian conversion;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ARPCWRITE_SOURCE
-#define ARPCWRITE_SOURCE
-
-#include <stdio.h>
-
-#include "../tools/types.h"
-#include "../tools/endian.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../mme/mme.h"
-
-void ARPCWrite (signed fd, void const * memory, size_t extent)
-
-{
-
-#if 0
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_arpc_data
-	{
-		uint32_t BYPASS;
-		uint16_t ARPCID;
-		uint16_t DATALENGTH;
-		uint8_t DATAOFFSET;
-		uint8_t RESERVED [3];
-		uint16_t ARGOFFSET;
-		uint16_t STROFFSET;
-		uint16_t ARGLENGTH;
-		uint16_t STRLENGTH;
-		uint8_t LIST [1];
-	}
-	* data = (struct vs_arpc_data *)(memory);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-#endif
-    uint16_t length = (uint16_t)(extent);
-	if (isatty (fd))
-	{
-		hexwrite (fd, &length, sizeof (length));
-		hexwrite (fd, memory, length);
-
-#if defined (_WIN32)
-
-		write (fd, "\r", sizeof (char));
-
-#endif
-
-		write (fd, "\n", sizeof (char));
-	}
-	else
-	{
-		write (fd, &length, sizeof (length));
-		write (fd, memory, length);
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Antiphon.c.html b/docbook/Antiphon.c.html deleted file mode 100644 index 393a8f73..00000000 --- a/docbook/Antiphon.c.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - Antiphon.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Antiphon (struct plc * plc);
- *
- *   plc.h
- *
- *   instruct one powerline device to send trash frames to another
- *   for a given period (in seconds) to establish source device RX
- *   PHY rate and target device TX PHY rate; this does not work if
- *   the source device is also the local device, for some reason;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ANTIPHON_SOURCE
-#define ANTIPHON_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed Antiphon (struct plc * plc, byte source [], byte target [])
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_fr_lbk_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t DURATION;
-		uint8_t RESERVED;
-		uint16_t LENGTH;
-		uint8_t PACKET [1038];
-	}
-	* request = (struct vs_fr_lbk_request *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	if (_allclr (plc->flags, PLC_SILENCE))
-	{
-		char sourcename [ETHER_ADDR_LEN * 3];
-		char targetname [ETHER_ADDR_LEN * 3];
-		hexdecode (source, ETHER_ADDR_LEN, sourcename, sizeof (sourcename));
-		hexdecode (target, ETHER_ADDR_LEN, targetname, sizeof (targetname));
-		fprintf (stderr, "%s %s %s\n", channel->ifname, sourcename, targetname);
-	}
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, source, target, channel->type);
-	QualcommHeader (&request->qualcomm, 0, 41036);
-	request->DURATION = plc->timer;
-	request->LENGTH = HTOLE16 (sizeof (request->PACKET));
-	memset (request->PACKET, 0xA5, sizeof (request->PACKET));
-	EthernetHeader (request->PACKET, target, source, ETHERTYPE_IP);
-	plc->packetsize = sizeof (* request);
-	if (SendMME (plc) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-
-#if 0
-
-/*
- *	This causes a multi-device session to terminate if the device has recently
- *	been removed or powered-off; The device appears to be present but will not
- *	respond; Also, this terminates a session if the network is overloaded with
- *	traffic;
- */
-
-	if (ReadMME (plc, 0, 41037) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTREAD);
-	}
-
-#endif
-
-	sleep (plc->timer);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Attributes.c.html b/docbook/Attributes.c.html deleted file mode 100644 index 03e0192b..00000000 --- a/docbook/Attributes.c.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Attributes.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Attributes (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ATTRIBUTES_SOURCE
-#define ATTRIBUTES_SOURCE
-
-#include "../plc/plc.h"
-
-signed Attributes (struct plc * plc)
-
-{
-	return (PLCSelect (plc, Attributes1, Attributes2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Attributes1.c.html b/docbook/Attributes1.c.html deleted file mode 100644 index 34252664..00000000 --- a/docbook/Attributes1.c.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - Attributes1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Attributes1 (struct plc * plc);
- *
- *   plc.h
- *
- *   This plugin for program plc requests device attributes using
- *   a VS_OP_ATTRIBUTES message; attributes are pre-parsed versions
- *   of information returned by VS_SW_VER and other messages;
- *
- *   The VS_OP_ATTRIBUTES message structure changed between FW 3.3.4
- *   and 3.3.5 and fields are ocassionally appended to the end; you
- *   should not use this message for operational systems because the
- *   format may change again; it was originally intended for PTS use
- *   only;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ATTRIBUTES1_SOURCE
-#define ATTRIBUTES1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/format.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-
-#ifdef WIN32
-#define snprintf _snprintf
-#endif
-
-signed Attributes1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_op_attributes_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t COOKIE;
-		uint8_t RTYPE;
-	}
-	* request = (struct vs_op_attributes_request *) (message);
-	struct __packed vs_op_attributes_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint32_t COOKIE;
-		uint8_t RTYPE;
-		uint16_t MLENGTH;
-		uint8_t MBUFFER [1024];
-	}
-	* confirm = (struct vs_op_attributes_confirm *) (message);
-	struct __packed attributes
-	{
-		uint8_t HARDWARE [16];
-		uint8_t SOFTWARE [16];
-		uint32_t FWVERSION [5];
-		uint8_t RELEASEDATE [8];
-		uint8_t RELEASETYPE [12];
-		uint8_t SDRAMTYPE;
-		uint8_t RESERVED;
-		uint8_t LINEFREQ;
-		uint32_t SDRAMSIZE;
-		uint8_t AUTHMODE;
-	}
-	* attributes = (struct attributes *)(confirm->MBUFFER);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Fetch Device Attributes");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_OP_ATTRIBUTES | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->COOKIE = HTOLE32 (plc->cookie);
-	request->RTYPE = 0;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_OP_ATTRIBUTES | MMTYPE_CNF)) > 0)
-	{
-		static char const * frequency [] =
-		{
-			"Unknown frequency",
-			"50Hz",
-			"60Hz",
-		};
-		static char const * zero_cross [] =
-		{
-			"Not yet detected",
-			"Detected",
-			"Missing",
-		};
-		char string [512];
-		size_t length = 0;
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-
-#if 0
-#if defined (__GNUC__)
-#warning "Debug code active in module Attributes1"
-#endif
-
-		fprintf (stderr, "HARDWARE=[%-16.16s]\n", attributes->HARDWARE);
-		fprintf (stderr, "SOFTWARE=[%-16.16s]\n", attributes->SOFTWARE);
-		fprintf (stderr, "FIRMWARE MAJOR VERSION=(%d)\n", LE32TOH (attributes->FWVERSION [0]));
-		fprintf (stderr, "FIRMWARE MINOR VERSION=(%d)\n", LE32TOH (attributes->FWVERSION [1]));
-		fprintf (stderr, "FIRMWARE [2]=(%d)\n", LE32TOH (attributes->FWVERSION [2]));
-		fprintf (stderr, "FIRMWARE [3]=(%d)\n", LE32TOH (attributes->FWVERSION [3]));
-		fprintf (stderr, "FIRMWARE [4]=(%d)\n", LE32TOH (attributes->FWVERSION [4]));
-		fprintf (stderr, "RELEASE DATE=[%-8.8s]\n", attributes->RELEASEDATE);
-		fprintf (stderr, "RELEASE TYPE=[%-12.12s]\n", attributes->RELEASETYPE);
-		fprintf (stderr, "SDRAM SIZE=[0x%08X]\n", LE32TOH (attributes->SDRAMSIZE));
-		fprintf (stderr, "SDRAM TYPE=[0x%02X]\n", attributes->SDRAMTYPE);
-		fprintf (stderr, "RESERVED=[0x%02X]\n", attributes->RESERVED);
-		fprintf (stderr, "LINE FREQUENCY=[0x%02X]\n", attributes->LINEFREQ);
-		fprintf (stderr, "AUTHORIZATION MODE=[0x%02X]\n", attributes->AUTHMODE);
-
-#endif
-
-		length += snprintf (string + length, sizeof (string) - length, "%s", attributes->HARDWARE);
-		length += snprintf (string + length, sizeof (string) - length, "-%s", attributes->SOFTWARE);
-		length += snprintf (string + length, sizeof (string) - length, "-%d", LE32TOH (attributes->FWVERSION [0]));
-		length += snprintf (string + length, sizeof (string) - length, "-%d", LE32TOH (attributes->FWVERSION [1]));
-		length += snprintf (string + length, sizeof (string) - length, "-%04d", LE32TOH (attributes->FWVERSION [2]));
-		length += snprintf (string + length, sizeof (string) - length, "-%02d", LE32TOH (attributes->FWVERSION [3]));
-		length += snprintf (string + length, sizeof (string) - length, "-%04d", LE32TOH (attributes->FWVERSION [4]));
-		length += snprintf (string + length, sizeof (string) - length, "-%-8.8s", attributes->RELEASEDATE);
-		length += snprintf (string + length, sizeof (string) - length, "-%s", attributes->RELEASETYPE);
-		length += snprintf (string + length, sizeof (string) - length, "-%c", attributes->SDRAMTYPE);
-		length += snprintf (string + length, sizeof (string) - length, " (%dmb)", LE32TOH (attributes->SDRAMSIZE));
-		length += snprintf (string + length, sizeof (string) - length, " (0x%02X) \"%s\" \"%s\" ", attributes->LINEFREQ, frequency [attributes->LINEFREQ & 0x03], zero_cross [(attributes->LINEFREQ & 0x0C) >> 2]);
-		length += snprintf (string + length, sizeof (string) - length, " 0x%02X", attributes->AUTHMODE);
-		Display (plc, "%s", string);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Attributes2.c.html b/docbook/Attributes2.c.html deleted file mode 100644 index eaae487b..00000000 --- a/docbook/Attributes2.c.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - Attributes2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Attributes2 (struct plc * plc);
- *
- *   plc.h
- *
- *   This plugin for program plc requests device attributes using
- *   a VS_OP_ATTRIBUTES message; attributes are pre-parsed versions
- *   of information returned by VS_SW_VER and other messages;
- *
- *   The VS_OP_ATTRIBUTES message structure changed between FW 3.3.4
- *   and 3.3.5 and fields are ocassionally appended to the end; you
- *   should not use this message for operational systems because the
- *   format may change again; it was originally intended for PTS use
- *   only;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ATTRIBUTES2_SOURCE
-#define ATTRIBUTES2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/format.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-
-#ifdef WIN32
-#define snprintf _snprintf
-#endif
-
-signed Attributes2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_op_attributes_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t COOKIE;
-		uint8_t RTYPE;
-	}
-	* request = (struct vs_op_attributes_request *) (message);
-	struct __packed vs_op_attributes_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint32_t COOKIE;
-		uint8_t RTYPE;
-		uint16_t MLENGTH;
-		uint8_t MBUFFER [1024];
-	}
-	* confirm = (struct vs_op_attributes_confirm *) (message);
-	struct __packed attributes
-	{
-		uint8_t DEVICEFAMILY [16];
-		uint8_t DEVICETYPE [16];
-		uint32_t FWMAJORVERSION;
-		uint32_t FWMINORVERSION;
-		uint32_t COMPOSITEVERSION;
-		uint32_t SUSTAININGVERSION;
-		uint32_t BUILDNUMBER;
-		uint8_t BUILDDATE [8];
-		uint8_t RELEASETYPE [12];
-		uint8_t FLAGS [3];
-		uint32_t DRAMSIZE;
-		uint32_t RAMBLOCKRXCOUNT;
-		uint32_t RAMBLOCKTXCOUNT;
-		uint32_t RAMBLOCKSHAREDCOUNT;
-		uint32_t RAMBLOCKFREERXCOUNT;
-		uint32_t RAMBLOCKFREETXCOUNT;
-		uint32_t RAMBLOCKFREESHAREDCOUNT;
-		uint32_t RELATIVESNRDIFFDB;
-		uint32_t DSP384THREGVAL;
-		uint8_t AFETXGAINDB;
-		uint8_t AUTHMODE;
-		uint8_t MICROCONTROLLERDIAGENABLED;
-	}
-	* attributes = (struct attributes *)(confirm->MBUFFER);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Fetch Device Attributes");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_OP_ATTRIBUTES | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->COOKIE = HTOLE32 (plc->cookie);
-	request->RTYPE = 0;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_OP_ATTRIBUTES | MMTYPE_CNF)) > 0)
-	{
-
-#if 0
-
-		static char const * frequency [] =
-		{
-			"Unknown Frequency",
-			"50Hz",
-			"60Hz",
-		};
-		static char const * zero_cross [] =
-		{
-			"Not yet detected",
-			"Detected",
-			"Missing",
-		};
-
-#endif
-
-		char string [512];
-		size_t length = 0;
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-
-#if 0
-#if defined (__GNUC__)
-#warning "Debug code active in module Attributes2"
-#endif
-
-		fprintf (stderr, "DEVICE FAMILY=[%-16.16s]\n", attributes->DEVICEFAMILY);
-		fprintf (stderr, "DEVICE TYPE=[%-16.16s]\n", attributes->DEVICETYPE);
-		fprintf (stderr, "FIRMWARE MAJOR VERSION=(%d)\n", LE32TOH (attributes->FWMAJORVERSION));
-		fprintf (stderr, "FIRMWARE MINOR VERSION=(%d)\n", LE32TOH (attributes->FWMINORVERSION));
-		fprintf (stderr, "COMPOSITE VERSION=(%d)\n", LE32TOH (attributes->COMPOSITEVERSION));
-		fprintf (stderr, "SUSTAINING VERSION=(%d)\n", LE32TOH (attributes->SUSTAININGVERSION));
-		fprintf (stderr, "BUILD NUMBER=(%d)\n", LE32TOH (attributes->BUILDNUMBER));
-		fprintf (stderr, "BUILD DATE=[%-8.8s]\n", attributes->BUILDDATE);
-		fprintf (stderr, "RELEASE TYPE=[%-12.12s]\n", attributes->RELEASETYPE);
-		fprintf (stderr, "DRAM SIZE=[0x%08X](%d)\n", LE32TOH (attributes->DRAMSIZE), LE32TOH (attributes->DRAMSIZE));
-		fprintf (stderr, "DRAM TYPES=[0x%02X]\n", attributes->FLAGS [0]);
-		fprintf (stderr, "RESERVED FLAG=[0x%02X]\n", attributes->FLAGS [1]);
-		fprintf (stderr, "LINE FREQUENCY=[0x%02X]\n", attributes->FLAGS [2]);
-		fprintf (stderr, "AUTHORIZATION MODE=[0x%02X]\n", attributes->AUTHMODE);
-		fprintf (stderr, "DSP384THREGVAL=[0x%02X]\n", attributes->DSP384THREGVAL);
-		fprintf (stderr, "AFETXGAINDB=[0x%02X]\n", attributes->AFETXGAINDB);
-		fprintf (stderr, "AUTHORIZATION MODE=[0x%02X]\n", attributes->AUTHMODE);
-
-#if 0
-
-		fprintf (stderr, "DSP384THREGVAL=[0x%08X]\n", LE32TOH (attributes->DSP384THREGVAL));
-		fprintf (stderr, "AFETXGAINDB=[0x%02X]\n", attributes->AFETXGAINDB);
-
-#endif
-#endif
-
-		length += snprintf (string + length, sizeof (string) - length, "%s", attributes->DEVICEFAMILY);
-		length += snprintf (string + length, sizeof (string) - length, "-%s", attributes->DEVICETYPE);
-		length += snprintf (string + length, sizeof (string) - length, "-%s", attributes->DEVICEFAMILY);
-		length += snprintf (string + length, sizeof (string) - length, "-%d", LE32TOH (attributes->FWMAJORVERSION));
-		length += snprintf (string + length, sizeof (string) - length, ".%d", LE32TOH (attributes->FWMINORVERSION));
-		length += snprintf (string + length, sizeof (string) - length, ".%d", LE32TOH (attributes->COMPOSITEVERSION));
-		length += snprintf (string + length, sizeof (string) - length, ".%d", LE32TOH (attributes->BUILDNUMBER));
-		length += snprintf (string + length, sizeof (string) - length, "-%02d", LE32TOH (attributes->SUSTAININGVERSION));
-		length += snprintf (string + length, sizeof (string) - length, "-%8.8s", attributes->BUILDDATE);
-		length += snprintf (string + length, sizeof (string) - length, "-%s", attributes->RELEASETYPE);
-		length += snprintf (string + length, sizeof (string) - length, " (%dmb)", LE32TOH (attributes->DRAMSIZE));
-		Display (plc, "%s", string);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/BootDevice.c.html b/docbook/BootDevice.c.html deleted file mode 100644 index 9074327a..00000000 --- a/docbook/BootDevice.c.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - BootDevice.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed BootDevice (struct plc * plc);
- *
- *   plc.h
- *
- *   call appropriate function based on the image file format;
- *
- *   boot a powerline device by writing parameters and firmware into
- *   memory and starting execution; this function may be called when
- *   a VS_HOST_ACTION.IND is received with HOST_ACTION_REQ set to 0;
- *
- *   this implementation handles both old and new image file formats;
- *   call BootDevice1 or BootDevice2 directly if you know which file
- *   format will be used;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BOOTDEVICE_SOURCE
-#define BOOTDEVICE_SOURCE
-
-#include "../plc/plc.h"
-
-signed BootDevice (struct plc * plc)
-
-{
-	return (NVMSelect (plc, BootDevice1, BootDevice2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/BootDevice1.c.html b/docbook/BootDevice1.c.html deleted file mode 100644 index 5bf2df20..00000000 --- a/docbook/BootDevice1.c.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - BootDevice1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed BootDevice1 (struct plc * plc);
- *
- *   plc.h
- *
- *   boot a powerline device by writing parameters and firmware into
- *   volatile memory and starting execution; volatile memory must be
- *   initialized and configured before calling this function;
- *
- *   this function is identical to BootDevice2 but calls functions
- *   that expect the older image file format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BOOTDEVICE1_SOURCE
-#define BOOTDEVICE1_SOURCE
-
-#include <memory.h>
-
-#include "../plc/plc.h"
-
-signed BootDevice1 (struct plc * plc)
-
-{
-	char string [PLC_VERSION_STRING];
-	if (BootParameters1 (plc))
-	{
-		return (-1);
-	}
-	if (BootFirmware1 (plc))
-	{
-		return (-1);
-	}
-	if (WaitForStart (plc, string, sizeof (string)))
-	{
-		return (-1);
-	}
-	Confirm (plc, "%s is running", string);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/BootDevice2.c.html b/docbook/BootDevice2.c.html deleted file mode 100644 index 330a1f5f..00000000 --- a/docbook/BootDevice2.c.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - BootDevice2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed BootDevice2 (struct plc * plc);
- *
- *   plc.h
- *
- *   boot a powerline device by writing parameters and firmware into
- *   volatile memory and starting execution; volatile memory must be
- *   initialized and configured before calling this function;
- *
- *   this function is identical to BootDevice1 but calls functions
- *   that expect the newer image file format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BOOTDEVICE2_SOURCE
-#define BOOTDEVICE2_SOURCE
-
-#include <memory.h>
-
-#include "../plc/plc.h"
-
-signed BootDevice2 (struct plc * plc)
-
-{
-	char string [PLC_VERSION_STRING];
-	if (BootParameters2 (plc))
-	{
-		return (-1);
-	}
-	if (BootFirmware2 (plc))
-	{
-		return (-1);
-	}
-	if (WaitForStart (plc, string, sizeof (string)))
-	{
-		return (-1);
-	}
-	Confirm (plc, "%s is running", string);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/BootFirmware1.c.html b/docbook/BootFirmware1.c.html deleted file mode 100644 index 04355f7b..00000000 --- a/docbook/BootFirmware1.c.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - BootFirmware1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed BootFirmware1 (struct plc * plc);
- *
- *   plc.h
- *
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BOOTFIRMWARE1_SOURCE
-#define BOOTFIRMWARE1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-#include "../nvm/nvm.h"
-
-signed BootFirmware1 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header1 nvm_header;
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->NVM.name);
-	}
-	do
-	{
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			error (PLC_EXIT (plc), errno, NVM_HDR_CANTREAD, plc->NVM.name, module);
-		}
-		if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
-		{
-			error (PLC_EXIT (plc), ECANCELED, NVM_HDR_VERSION, plc->NVM.name, module);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			error (PLC_EXIT (plc), ECANCELED, NVM_HDR_CHECKSUM, plc->NVM.name, module);
-		}
-
-#if 0
-
-		if (_anyset (LE16TOH (nvm_header.IGNOREMASK), (1 << (plc->hardwareID - 1))))
-		{
-			if (lseek (plc->NVM.file, LE32TOH (nvm_header.NEXTHEADER), SEEK_SET) == -1)
-			{
-				error (PLC_EXIT (plc), errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-			}
-		}
-		else
-
-#endif
-
-		if (nvm_header.IMAGETYPE == NVM_IMAGE_FIRMWARE)
-		{
-			if (plc->hardwareID < CHIPSET_AR7400)
-			{
-				if (WriteFirmware1 (plc, module, &nvm_header))
-				{
-					return (-1);
-				}
-				if (StartFirmware1 (plc, module, &nvm_header))
-				{
-					return (-1);
-				}
-				break;
-			}
-			if (WriteExecuteFirmware1 (plc, module, &nvm_header))
-			{
-				return (-1);
-			}
-			break;
-		}
-		if (lseek (plc->NVM.file, LE32TOH (nvm_header.NEXTHEADER), SEEK_SET) == -1)
-		{
-			error (PLC_EXIT (plc), errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-		}
-		module++;
-	}
-	while (nvm_header.NEXTHEADER);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/BootFirmware2.c.html b/docbook/BootFirmware2.c.html deleted file mode 100644 index 243aeb0c..00000000 --- a/docbook/BootFirmware2.c.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - BootFirmware2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed BootFirmware2 (struct plc * plc)
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BOOTFIRMWARE2_SOURCE
-#define BOOTFIRMWARE2_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-#include "../nvm/nvm.h"
-
-signed BootFirmware2 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header2 nvm_header;
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->NVM.name);
-	}
-	do
-	{
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			error (1, errno, NVM_HDR_CANTREAD, plc->NVM.name, module);
-		}
-		if (LE16TOH (nvm_header.MajorVersion) != 1)
-		{
-			error (1, ECANCELED, NVM_HDR_VERSION, plc->NVM.name, module);
-		}
-		if (LE16TOH (nvm_header.MinorVersion) != 1)
-		{
-			error (1, ECANCELED, NVM_HDR_VERSION, plc->NVM.name, module);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			error (1, ECANCELED, NVM_HDR_CHECKSUM, plc->NVM.name, module);
-		}
-
-#if 0
-
-		if (_allclr (LE16TOH (nvm_header.ExecuteMask), (1 << (plc->hardwareID - 1))))
-		{
-			if (lseek (plc->NVM.file, LE32TOH (nvm_header.NextHeader), SEEK_SET) == -1)
-			{
-				error (1, errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-			}
-		}
-		else
-
-#endif
-
-		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_FIRMWARE)
-		{
-			if (WriteExecuteFirmware2 (plc, module, &nvm_header))
-			{
-				return (-1);
-			}
-			break;
-		}
-		if (lseek (plc->NVM.file, LE32TOH (nvm_header.NextHeader), SEEK_SET) == -1)
-		{
-			error (1, errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-		}
-		module++;
-	}
-	while (~nvm_header.NextHeader);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/BootFromHost.png b/docbook/BootFromHost.png deleted file mode 100644 index 593a512e..00000000 Binary files a/docbook/BootFromHost.png and /dev/null differ diff --git a/docbook/BootParameters1.c.html b/docbook/BootParameters1.c.html deleted file mode 100644 index f85d0888..00000000 --- a/docbook/BootParameters1.c.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - BootParameters1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed BootParameters1 (struct plc * plc)
- *
- *   pib.h
- *
- *   write the parameter information block to SDRAM on a thunderbolt/
- *   lightning powerline device;
- *
- *   The PIB is written to different SDRAM locations depending on the
- *   chipset used; we use PIB major/minor version to determine where
- *   to write the PIB but may switch to using the hardware platform
- *   code derived from the VS_SW_VER message;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BOOTPARAMETERS1_SOURCE
-#define BOOTPARAMETERS1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-#include "../pib/pib.h"
-
-signed BootParameters1 (struct plc * plc)
-
-{
-	struct pib_header pib_header;
-	uint32_t offset;
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (read (plc->PIB.file, &pib_header, sizeof (pib_header)) != sizeof (pib_header))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTREAD, plc->PIB.name);
-	}
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->PIB.name);
-	}
-
-#if 1
-
-/*
- *   this code is a fix to accommodate PIB relocation in memory; it is not needed when
- *   the PIB is stored in an NVM file since the memory address is recorded in the image
- *   header;
- */
-
-	if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0305)
-	{
-		offset = LEGACY_PIBOFFSET;
-	}
-	else if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0500)
-	{
-		offset = INT6x00_PIBOFFSET;
-	}
-	else
-	{
-		offset = AR7x00_PIBOFFSET;
-	}
-
-#endif
-
-	if (plc->hardwareID < CHIPSET_AR7400)
-	{
-		if (WriteMEM (plc, &plc->PIB, 0, offset, LE16TOH (pib_header.PIBLENGTH)))
-		{
-			return (-1);
-		}
-		return (0);
-	}
-	if (WriteExecutePIB (plc, offset, &pib_header))
-	{
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/BootParameters2.c.html b/docbook/BootParameters2.c.html deleted file mode 100644 index b84b7675..00000000 --- a/docbook/BootParameters2.c.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - BootParameters2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed BootParameters2 (struct plc * plc)
- *
- *   pib.h
- *
- *   write the parameter information block to SDRAM on a panther/
- *   lynx powerline device;
- *
- *   the parameter information block is stored in an NVM image chain
- *   and the image header specifies the memory location;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BOOTPARAMETERS2_SOURCE
-#define BOOTPARAMETERS2_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-#include "../pib/pib.h"
-
-signed BootParameters2 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header2 nvm_header;
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	do
-	{
-		if (read (plc->PIB.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			error (1, errno, NVM_HDR_CANTREAD, plc->PIB.name, module);
-		}
-		if (LE16TOH (nvm_header.MajorVersion) != 1)
-		{
-			error (1, ECANCELED, NVM_HDR_VERSION, plc->PIB.name, module);
-		}
-		if (LE16TOH (nvm_header.MinorVersion) != 1)
-		{
-			error (1, ECANCELED, NVM_HDR_VERSION, plc->PIB.name, module);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			error (1, ECANCELED, NVM_HDR_CHECKSUM, plc->PIB.name, module);
-		}
-
-#if 0
-
-		if (_allclr (LE16TOH (nvm_header.ExecuteMask), (1 << (plc->hardwareID - 1))))
-		{
-			if (lseek (plc->PIB.file, LE32TOH (nvm_header.NextHeader), SEEK_SET) == -1)
-			{
-				error (1, errno, "Can't skip module: %s (%d)", plc->PIB.name, module);
-			}
-		}
-		else
-
-#endif
-
-		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_PIB)
-		{
-			if (WriteExecuteParameters2 (plc, module, &nvm_header))
-			{
-				return (-1);
-			}
-			break;
-		}
-		if (lseek (plc->PIB.file, LE32TOH (nvm_header.NextHeader), SEEK_SET) == -1)
-		{
-			error (1, errno, "Can't skip module: %s (%d)", plc->PIB.name, module);
-		}
-		module++;
-	}
-	while (~nvm_header.NextHeader);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/CMEncrypt.1.html b/docbook/CMEncrypt.1.html deleted file mode 100644 index 9721b5dc..00000000 --- a/docbook/CMEncrypt.1.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - CMEncrypt.1 - - - - - - - - - -
-CMEncrypt(1)                                 Qualcomm Atheros Open Powerline Toolkit                                CMEncrypt(1)
-
-NAME
-       CMEncrypt - Send Encrypted Payload
-
-SYNOPSIS
-       CMEncrypt [options] [device] [device] [...]
-
-DESCRIPTION
-       Transmit  a  file  over  powerline  using  CM_ENCRYPTED_PAYLOAD messages.  This program tests and demonstrates proper (or
-       improper) message routing but does not support encrypted transmission.  All payloads are sent unencrypted at this time.
-
-OPTIONS
-       -A status
-              The AVLN Status.  This indicates the current association status and capabilities of the sending station.   Permit‐
-              ted  values  are  0  through  255  but only value 0 through 5 and 8 are recognized by the firmware.  Values may be
-              entered in decimal, hexadecimal or binary format.  Hexadecimal value are prefixed with "0x" or "0X".  Binary  val‐
-              ues are prefixed with "0b" or "0B".  The default is 0.
-
-       -f file
-              The  name  of the payload file.  File content may be text or binary and forms the payload of one or more messages.
-              Payloads are transmitted unencrypted when PID is 4 and PEKS is 15 which is default.
-
-       -K PEKS
-              The Payload Encryption Key Select.  This value indicates the key used to encrypt the  payload.   Permitted  values
-              are 0 through 15.  Values may be entered in decimal, hexadecimal or binary format.  Hexadecimal value are prefixed
-              with "0x" or "0X".  Binary values are prefixed with "0b" or "0B"..  The default is 15 for "No Encryption".
-
-       -P PID The Protocol Identifier.  This value detemines how the payload is interpreted  by  powerline  devices.   Permitted
-              values are 0 through 4.  The default is 4 for "HLE Protocol".
-
-       -v     Print incoming and outgoing Ethernet frames in hex dump format on stdout.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  Media  Access  Control  (MAC)  address of a remote host, not a powerline device.  Addresses are 6 hexadecimal
-              octets optionally separated  by  colon.   For  example,  the  addresses  "00b052000001",  "00:b0:52:00:00:01"  and
-              "00b052:000001"  are  all  valid  and  equivalent.   For  convenience,  the  symbolic  address "local" resolves to
-              "00:b0:52:00:00:01" and the symbolic addresses "all" and "broadcast" both resolve to "ff:ff:ff:ff:ff:ff".
-
-INTERNALS
-       This program lets the user specify some CM_ENCRYPTED_PAYLOAD fields but not others.  The following are  fields  that  the
-       user cannot specify.  The program automatically computes these values.
-
-       PRN    The Protocol Run Number.  This is a random number used to distinguish between runs having the same protocol.  This
-              program uses the system time variable.
-
-       UUID   The Universally Unique Identifier.  This program uses the left-most 16 bytes of the SHA256 digest for the payload.
-
-REFERENCES
-       Consult the HomePlug AV Specification or Atheros Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The following example transmits file myfile.txt to host 00:85:73:00:94:01 in unecrypted format because that is  the  pro‐
-       gram default.  The remote address is required and refers to the ultimate recipient, not the local device.
-
-          #  CMEncrypt  -f  myfile.txt  00:85:73:00:94:01  The  next  example  does the same but specifies the program defaults.
-       Observe that operands can be expressed in decimal, binary or hexadecimal format.
-
-          # CMEncrypt -f myfile.txt -A 0 -P 0b0100 -K 0x0F 00:85:73:00:94:01
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information is not available.  Qualcomm Atheros reserves the right to modify message structure
-       or content in future firmware releases without any obligation to notify or compensate users of this program.
-
-SEE ALSO
-       None.
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                CMEncrypt(1)
-
- - - diff --git a/docbook/CMEncrypt.c.html b/docbook/CMEncrypt.c.html deleted file mode 100644 index ff2d5067..00000000 --- a/docbook/CMEncrypt.c.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - - CMEncrypt.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   CMEncrypt - Send Encrypted Payload;
- *
- *   this program sends and receives raw ethernet frames and so needs
- *   root privileges; if you install it using "chmod 555" and "chown
- *   root:root" then you must login as root to run it; otherwise, you
- *   can install it using "chmod 4555" and "chown root:root" so that
- *   anyone can run it; the program will refuse to run until you get
- *   things right;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <time.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../key/SHA256.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexdump.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/SHA256Reset.c"
-#include "../key/SHA256Write.c"
-#include "../key/SHA256Block.c"
-#include "../key/SHA256Fetch.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/HomePlugHeader.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define CMENCRYPT_PEKS 0x0F
-#define CMENCRYPT_AVLN 0x00
-#define CMENCRYPT_PID 0x04
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"A:f:i:K:P:qv",
-		"device [device] [...]",
-		"Send an encrypted payload using CM_ENCRYPTED_PAYLOAD",
-		"A n\tAVLN Status [" LITERAL (CMENCRYPT_AVLN) "]",
-		"K n\tPayload Encryption Key Select (PEKS) [" LITERAL (CMENCRYPT_PEKS) "]",
-		"P n\tProtocol Identifier (PID) [" LITERAL (CMENCRYPT_PID) "]",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"f f\tpayload file",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#ifndef __GNUC__
-#pragma pack(push,1)
-#endif
-
-	struct __packed cm_encrypted_payload
-	{
-		uint8_t PEKS;
-		uint8_t AVLN;
-		uint8_t PID;
-		uint16_t PRN;
-		uint8_t PMN;
-		uint8_t UUID [16];
-		uint16_t LEN;
-	}
-	template =
-	{
-		CMENCRYPT_PEKS,
-		CMENCRYPT_AVLN,
-		CMENCRYPT_PID,
-		0x0000,
-		0x00,
-		{
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00
-		},
-		0x0000
-	};
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	struct _file_ file =
-	{
-		-1,
-		(char const *) (0)
-	};
-	struct sha256 sha256;
-	uint8_t digest [SHA256_DIGEST_LENGTH];
-	time_t timer = time ((time_t *)(0));
-	uint8_t packet [ETHER_MAX_LEN];
-	uint8_t * buffer;
-	signed extent;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'f':
-			if ((file.file = open (file.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", file.name);
-			}
-			break;
-		case 'P':
-			template.PID = (byte)(uintspec (optarg, 0x00, 0x0F));
-			break;
-		case 'A':
-			template.AVLN = (byte)(uintspec (optarg, 0x00, 0x08));
-			break;
-		case 'K':
-			template.PEKS = (byte)(uintspec (optarg, 0x00, 0xFF));
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-
-/*
- *	load entire file into memory;
- */
-
-	if (file.file == -1)
-	{
-		error (1, ECANCELED, "No payload file given: Use -f <file>");
-	}
-	if ((extent = lseek (file.file, 0, SEEK_END)) == -1)
-	{
-		error (1, errno, FILE_CANTSIZE, file.name);
-	}
-	if (!(buffer = malloc (extent)))
-	{
-		error (1, errno, FILE_CANTLOAD, file.name);
-	}
-	if (lseek (file.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, file.name);
-	}
-	if (read (file.file, buffer, extent) != extent)
-	{
-		error (1, errno, FILE_CANTREAD, file.name);
-	}
-	close (file.file);
-	SHA256Reset (&sha256);
-	SHA256Write (&sha256, buffer, extent);
-	SHA256Fetch (&sha256, digest);
-	if (!argc)
-	{
-		error (1, ECANCELED, "No destination given");
-	}
-	openchannel (&channel);
-	while ((argc) && (* argv))
-	{
-		signed offset = 0;
-		signed remain = extent;
-
-#if 0
-
-		signed length = sizeof (struct packet_ms) - sizeof (template);
-
-#else
-
-		signed length = 502 - sizeof (template);
-
-#endif
-
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		template.PRN = (uint16_t)(timer);
-		template.PMN = 0;
-		memcpy (template.UUID, digest, sizeof (template.UUID));
-		while (remain)
-		{
-			uint8_t * memory = packet;
-			if (length > remain)
-			{
-				length = remain;
-			}
-			template.PMN++;
-			template.LEN = HTOLE16 (length);
-			memset (memory, 0, sizeof (struct message));
-			memory += EthernetHeader ((struct ethernet_hdr *)(memory), channel.peer, channel.host, channel.type);
-			memory += HomePlugHeader ((struct homeplug_hdr *)(memory), 0, (CM_ENCRYPTED_PAYLOAD | MMTYPE_IND));
-			memcpy (memory, &template, sizeof (template));
-			memory += sizeof (template);
-			memcpy (memory, buffer + offset, length);
-			memory += length;
-			extent = (signed)(memory - packet);
-			if (extent < (ETHER_MIN_LEN - ETHER_CRC_LEN))
-			{
-				extent = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-			}
-			if (sendpacket (&channel, packet, extent) < extent)
-			{
-				error (1, errno, CHANNEL_CANTSEND);
-			}
-			offset += length;
-			remain -= length;
-		}
-		argc--;
-		argv++;
-	}
-	closechannel (&channel);
-	free (buffer);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/CM_ENCRYPTED.sh.html b/docbook/CM_ENCRYPTED.sh.html deleted file mode 100644 index 680db098..00000000 --- a/docbook/CM_ENCRYPTED.sh.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - CM_ENCRYPTED.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/CM_ENCRYPTED.sh
-
-# This script formats and sends a CM_ENCRYPTED_PAYBOOT message to a
-# specific slave device; the message is written as a text file then
-# passed to efsu to send;  
- 
-# ====================================================================
-# host symbols;
-# --------------------------------------------------------------------
-
-. ./hardware.sh
-
-# ====================================================================
-# file symbols;
-# --------------------------------------------------------------------
-
-COUNT=1
-FRAME=test.hex
-
-# ====================================================================
-#  display usage information;e
-# --------------------------------------------------------------------
-
-usage()
-{
-cat << EOF
-usage: ${options}
-
-This scripts sets the up and down bandwidth on Slave devices in the network
-
-OPTIONS
-	-h	show this message
-	-s	slave device name
-	-u	Upstream Bandwidth required in Mbps
-	-d	Downstream Bandwidth required in Mbps
-
-Note: Bandwidth value support 0-15 input values and 0 selects full line rate
-
-EOF
-}
-
-# ====================================================================
-#  command line parser routine
-# --------------------------------------------------------------------
-
-device=
-
-while getopts "hs:u:d:" OPTION
-do
-	case ${OPTION} in
-	h)
-	usage
-	exit 1
-	;;
-	s)
-	device=${OPTARG}
-	;;
-	esac
-done
-
-if [[ -z ${device} ]]; then
-	usage
-	exit 1
-elif [ ${device} = slave1 ]; then 
-	target=${slave1}
-elif [ ${device} = slave2 ]; then 
-	target=${slave2}
-elif [ ${device} = slave3 ]; then 
-	target=${slave3}
-elif [ ${device} = slave4 ]; then 
-	target=${slave4}
-elif [ ${device} = slave5 ]; then 
-	target=${slave5}
-else 
-	target=${master}
-fi
-
-# ====================================================================
-# Format the MME with processed values from command line
-# --------------------------------------------------------------------
-
-da="ff ff ff ff ff ff"
-sa="ff ff ff ff ff ff"
-mtype="88 e1"
-mmv="01"
-mmtype="06 60"
-FMI="00 00"
-PEKS="0F"
-AVLN="00"
-PID="04"
-PRN="09 75"
-PMN="01"
-UUID="55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa"
-LEN="00 00"
-HLE="AA 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55 aa 55"
-fill="ff ff ff ff ff ff ff ff ff" 
-
-cat > ${FRAME} <<EOF
-${da} ${sa} ${mtype} ${mmv} ${mmtype} ${FMI} ${PEKS} ${AVLN} ${PID} ${PRN} ${PMN} ${UUID} ${LEN} ${HLE} ${fill} ${fill} ${fill} ${fill} ${fill} ${fill} ${fill} ${fill}
-EOF
-
-# ====================================================================
-# check environment; 
-# --------------------------------------------------------------------
-
-if [ ! -f ${FRAME} ]; then
-	echo "File ${FRAME} is missing or misplaced"
-	exit 1
-fi
-	
-
-# ====================================================================
-# send traffic in both directions;
-# --------------------------------------------------------------------
-
-efsu -i ${ETH2} -h ${FRAME} -l ${COUNT} -v
-
-rm ${FRAME}
-
-
-
- - - diff --git a/docbook/ChangeIdent.c.html b/docbook/ChangeIdent.c.html deleted file mode 100644 index 2731d61d..00000000 --- a/docbook/ChangeIdent.c.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - ChangeIdent.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ChangeIdent (struct plc * plc);
- *
- *   plc.h
- *
- *   read PIB file header; replace MAC, DAK and NMK; update preferred
- *   NID; re-write PIB file header and PIB file checksum; use the MAC,
- *   DAK and NMK values stored in struct plc;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHANGEIDENT_SOURCE
-#define CHANGEIDENT_SOURCE
-
-#include <unistd.h>
-#include <stdint.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../key/HPAVKey.h"
-#include "../pib/pib.h"
-
-signed ChangeIdent (struct plc * plc)
-
-{
-	struct simple_pib simple_pib;
-	memset (&simple_pib, 0, sizeof (simple_pib));
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (read (plc->PIB.file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
-	{
-		error (1, errno, FILE_CANTREAD, plc->PIB.name);
-	}
-	memcpy (simple_pib.MAC, plc->MAC, sizeof (simple_pib.MAC));
-	memcpy (simple_pib.DAK, plc->DAK, sizeof (simple_pib.DAK));
-	memcpy (simple_pib.NMK, plc->NMK, sizeof (simple_pib.NMK));
-	{
-		uint8_t level = simple_pib.PreferredNID [HPAVKEY_NID_LEN-1] >> 4;
-		HPAVKeyNID (simple_pib.PreferredNID, simple_pib.NMK, level & 1);
-	}
-	simple_pib.CHECKSUM = 0;
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (write (plc->PIB.file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
-	{
-		error (1, errno, FILE_CANTSAVE, plc->PIB.name);
-	}
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	simple_pib.CHECKSUM = fdchecksum32 (plc->PIB.file, LE16TOH (simple_pib.PIBLENGTH), 0);
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (write (plc->PIB.file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
-	{
-		error (1, errno, FILE_CANTSAVE, plc->PIB.name);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Confirm.c.html b/docbook/Confirm.c.html deleted file mode 100644 index 780f8e0d..00000000 --- a/docbook/Confirm.c.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Confirm.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void Confirm (struct plc * plc, char const * message);
- *
- *   plc.h
- *
- *   Inform the user that an operation has completed; print the channel
- *   name, frame source address and user message on stdout unless the
- *   PLC_SILENCE flag is set;
- *
- *   this function is identical to Request () except that it prints the
- *   packet source address instead of the template destination address;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CONFIRM_SOURCE
-#define CONFIRM_SOURCE
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/flags.h"
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 2, 3)))
-
-#endif
-
-void Confirm (struct plc * plc, char const *format, ...)
-
-{
-	if (_allclr (plc->flags, PLC_SILENCE))
-	{
-		char address [ETHER_ADDR_LEN * 3];
-		struct channel * channel = (struct channel *)(plc->channel);
-		struct message * message = (struct message *)(plc->message);
-		hexdecode (message->ethernet.OSA, sizeof (message->ethernet.OSA), address, sizeof (address));
-		fprintf (stderr, "%s %s ", channel->ifname, address);
-		if ((format) && (*format))
-		{
-			va_list arglist;
-			va_start (arglist, format);
-			vfprintf (stderr, format, arglist);
-			va_end (arglist);
-		}
-		fprintf (stderr, "\n");
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/DeviceIdent.c.html b/docbook/DeviceIdent.c.html deleted file mode 100644 index 78de72d3..00000000 --- a/docbook/DeviceIdent.c.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - DeviceIdent.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed DeviceIdent (struct plc * plc);
- *
- *   plc.h
- *
- *   This plugin for program plc reads the first block of a device
- *   PIB using VS_RD_MOD and updates the plc structure with device
- *   network identity information, including MAC, DAK and NMK;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DEVICEIDENT_SOURCE
-#define DEVICEIDENT_SOURCE
-
-#include <string.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/memory.h"
-#include "../pib/pib.h"
-
-signed DeviceIdent (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t MSECRET [16];
-	}
-	* request = (struct vs_rd_mod_request *) (message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RES [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t MCHKSUM;
-		struct simple_pib IDENT;
-	}
-	* confirm = (struct vs_rd_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->MODULEID = VS_MODULE_PIB;
-	request->MLENGTH = HTOLE16 (sizeof (confirm->IDENT));
-	request->MOFFSET = 0;
-	if (SendMME (plc) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while (ReadMME (plc, 0, (VS_RD_MOD | MMTYPE_CNF)) <= 0)
-	{
-		plc->flags |= PLC_BAILOUT;
-		Failure (plc, PLC_NODETECT);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-	}
-	memcpy (plc->MAC, confirm->IDENT.MAC, sizeof (plc->MAC));
-	memcpy (plc->DAK, confirm->IDENT.DAK, sizeof (plc->DAK));
-	memcpy (plc->NMK, confirm->IDENT.NMK, sizeof (plc->NMK));
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Devices.c.html b/docbook/Devices.c.html deleted file mode 100644 index 923dd345..00000000 --- a/docbook/Devices.c.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - Devices.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   Devices.c - device address synonym tables
- *
- *   plc.h
- *
- *   some device addresses are so common or significant that we give
- *   them names; users can enter the name instead of the address; all
- *   toolkit programs reference this table via function synonym();
- *
- *   function synonym() uses a binary search to lookup symbols and so
- *   they must be entered in alphabetical order or lookup errors will
- *   occur;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DEVICES_SOURCE
-#define DEVICES_SOURCE
-
-/*====================================================================*
- *   custom include files;
- *--------------------------------------------------------------------*/
-
-#include "../plc/plc.h"
-#include "../mme/mme.h"
-#include "../tools/types.h"
-
-/*====================================================================*
- *   variables;
- *--------------------------------------------------------------------*/
-
-struct _term_ const devices [PLCDEVICES] =
-
-{
-	{
-		"all",
-		BROADCAST
-	},
-	{
-		"broadcast",
-		BROADCAST
-	},
-	{
-		"local",
-		LOCALCAST
-	}
-};
-
-uint8_t const broadcast [ETHER_ADDR_LEN] =
-
-{
-	0xFF,
-	0xFF,
-	0xFF,
-	0xFF,
-	0xFF,
-	0xFF
-};
-
-uint8_t const localcast [ETHER_ADDR_LEN] =
-
-{
-	0x00,
-	0xB0,
-	0x52,
-	0x00,
-	0x00,
-	0x01
-};
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/Display.c.html b/docbook/Display.c.html deleted file mode 100644 index 3472032b..00000000 --- a/docbook/Display.c.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - Display.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void Display (struct plc * plc, char const * message);
- *
- *   plc.h
- *
- *   Inform the user that an operation suceeded; print channel name,
- *   packet source device and user defined message on stdout;
- *
- *   This function is identical to Confirm () except that a message
- *   is always printed on stdout and cannot be suppressed;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DISPLAY_SOURCE
-#define DISPLAY_SOURCE
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 2, 3)))
-
-#endif
-
-void Display (struct plc * plc, char const *format, ...)
-
-{
-	char address [ETHER_ADDR_LEN * 3];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	hexdecode (message->ethernet.OSA, sizeof (message->ethernet.OSA), address, sizeof (address));
-	printf ("%s %s ", channel->ifname, address);
-	if ((format) && (*format))
-	{
-		va_list arglist;
-		va_start (arglist, format);
-		vprintf (format, arglist);
-		va_end (arglist);
-	}
-	printf ("\n");
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/EmulateHost.c.html b/docbook/EmulateHost.c.html deleted file mode 100644 index 1d40af13..00000000 --- a/docbook/EmulateHost.c.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - EmulateHost.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed EmulateHost (struct plc * plc);
- *
- *   plc.h
- *
- *   wait indefinitely for VS_HOST_ACTION messages; service requests
- *   only; it stops dead - like a bug! - on error;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EMULATEHOST_SOURCE
-#define EMULATEHOST_SOURCE
-
-#include <unistd.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../ether/channel.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-signed EmulateHost (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	static char const * actions [] =
-	{
-		"start device",
-		"store firmware",
-		"store parameters",
-		"update host",
-		"config memory",
-		"restore defaults",
-		"unknown"
-	};
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_host_action_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MACTION;
-		uint8_t MAJOR_VERSION;
-		uint8_t MINOR_VERSION;
-	}
-	* indicate = (struct vs_host_action_ind *) (message);
-
-#if 0
-
-	struct __packed vs_host_action_rsp
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* response = (struct vs_host_action_rsp *) (message);
-
-#endif
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	struct nvm_header1 nvm_header;
-	struct pib_header pib_header;
-	uint32_t offset;
-	char const * PIB = plc->PIB.name;
-	char const * NVM = plc->NVM.name;
-	signed timer = channel->timeout;
-	signed status = 0;
-	Request (plc, "Waiting for Host Action");
-	while (1)
-	{
-		channel->timeout = plc->timer;
-		status = ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND));
-		channel->timeout = timer;
-		if (status < 0)
-		{
-			break;
-		}
-		if (status > 0)
-		{
-			printf ("\n");
-			if (indicate->MACTION < (sizeof (actions) / sizeof (char const *)))
-			{
-				Confirm (plc, "Host Action Request is (%d) %s.", indicate->MACTION, actions [indicate->MACTION]);
-			}
-			else
-			{
-				error (0, ENOTSUP, "Host Action 0x%0X", indicate->MACTION);
-				continue;
-			}
-			memcpy (channel->peer, indicate->ethernet.OSA, sizeof (channel->peer));
-			channel->timeout = timer;
-			if (indicate->MACTION == 0x00)
-			{
-				unsigned module = 0;
-				char firmware [PLC_VERSION_STRING];
-				if (HostActionResponse (plc))
-				{
-					return (-1);
-				}
-				if (lseek (plc->PIB.file, 0, SEEK_SET))
-				{
-					error (1, errno, FILE_CANTHOME, plc->PIB.name);
-				}
-				if (read (plc->PIB.file, &pib_header, sizeof (pib_header)) != sizeof (pib_header))
-				{
-					error (1, errno, FILE_CANTREAD, plc->PIB.name);
-				}
-				if (lseek (plc->PIB.file, 0, SEEK_SET))
-				{
-					error (1, errno, FILE_CANTHOME, plc->PIB.name);
-				}
-				if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0305)
-				{
-					offset = LEGACY_PIBOFFSET;
-				}
-				else if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0500)
-				{
-					offset = INT6x00_PIBOFFSET;
-				}
-				else
-				{
-					offset = AR7x00_PIBOFFSET;
-				}
-				if (WriteMEM (plc, &plc->PIB, 0, offset, LE16TOH (pib_header.PIBLENGTH)))
-				{
-					return (-1);
-				}
-				if (lseek (plc->NVM.file, 0, SEEK_SET))
-				{
-					error (1, errno, FILE_CANTHOME, plc->NVM.name);
-				}
-				if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-				{
-					error (1, errno, FILE_CANTREAD, plc->NVM.name);
-				}
-				while (nvm_header.NEXTHEADER)
-				{
-					lseek (plc->NVM.file, LE32TOH (nvm_header.NEXTHEADER), SEEK_SET);
-					if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-					{
-						error (1, errno, FILE_CANTREAD, plc->NVM.name);
-					}
-					module++;
-				}
-				if (WriteFirmware1 (plc, module, &nvm_header))
-				{
-					return (-1);
-				}
-				if (StartFirmware1 (plc, module, &nvm_header))
-				{
-					return (-1);
-				}
-				if (WaitForStart (plc, firmware, sizeof (firmware)))
-				{
-					return (-1);
-				}
-				if (_anyset (plc->flags, PLC_FLASH_DEVICE))
-				{
-					if (WriteNVM (plc))
-					{
-						return (-1);
-					}
-					if (WritePIB (plc))
-					{
-						return (-1);
-					}
-					if (FlashNVM (plc))
-					{
-						return (-1);
-					}
-				}
-				continue;
-			}
-			if (indicate->MACTION == 0x01)
-			{
-				if (HostActionResponse (plc))
-				{
-					return (-1);
-				}
-				close (plc->NVM.file);
-				if (ReadFirmware1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (indicate->MACTION == 0x02)
-			{
-				if (HostActionResponse (plc))
-				{
-					return (-1);
-				}
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (indicate->MACTION == 0x03)
-			{
-				if (HostActionResponse (plc))
-				{
-					return (-1);
-				}
-				close (plc->NVM.file);
-				if (ReadFirmware1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (indicate->MACTION == 0x04)
-			{
-
-#if 0
-
-/*
- *	Due to an omission in the INT6300 BootLoader, responding to this VS_HOST_ACTION
- *      indication will suppress subsequent VS_HOST_ACTION messages and the device will
- *     	not request firmware and parameters; this may be corrected on the INT6400;
- */
-
-				if (HostActionResponse (plc))
-				{
-					return (-1);
-				}
-
-#endif
-
-				if (WriteCFG (plc))
-				{
-					return (-1);
-				}
-
-/*
- *	At this point, one could download firmware and parameters without waiting for
- *	further  requests from the device; however, we elect to wait for them since it
- *	is 'good form'; a device should send code 0x00 within 10 seconds of this one;
- */
-
-				continue;
-			}
-			if (indicate->MACTION == 0x05)
-			{
-				if (HostActionResponse (plc))
-				{
-					return (-1);
-				}
-				close (plc->NVM.file);
-				if ((plc->NVM.file = open (plc->NVM.name = NVM, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				close (plc->PIB.file);
-				if ((plc->PIB.file = open (plc->PIB.name = PIB, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			error (0, ENOSYS, "Host Action 0x%0X", indicate->MACTION);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/EmulateHost64.c.html b/docbook/EmulateHost64.c.html deleted file mode 100644 index 1913929b..00000000 --- a/docbook/EmulateHost64.c.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - EmulateHost64.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int EmulateHost64 (struct plc * plc);
- *
- *   plc.h
- *
- *   wait indefinitely for VS_HOST_ACTION messages; service the device
- *   only; it will stop dead - like a bug! - on error;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EMULATEHOST64_SOURCE
-#define EMULATEHOST64_SOURCE
-
-#include <unistd.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../ether/channel.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-signed EmulateHost64 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	static char const * actions [] =
-	{
-		"start device",
-		"store firmware",
-		"store parameters",
-		"update host",
-		"config memory",
-		"restore defaults",
-		"unknown"
-	};
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_host_action_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MACTION;
-		uint8_t MAJOR_VERSION;
-		uint8_t MINOR_VERSION;
-	}
-	* indicate = (struct vs_host_action_ind *) (message);
-
-#if 0
-
-	struct __packed vs_host_action_rsp
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* response = (struct vs_host_action_rsp *) (message);
-
-#endif
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	char const * NVM = plc->NVM.name;
-	char const * PIB = plc->PIB.name;
-	signed status;
-	signed action;
-	Request (plc, "Waiting for Host Action");
-	while (1)
-	{
-		status = ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND));
-		if (status < 0)
-		{
-			break;
-		}
-		if (status > 0)
-		{
-			printf ("\n");
-			if (indicate->MACTION < (sizeof (actions) / sizeof (char const *)))
-			{
-				Confirm (plc, "Host Action Request is (%d) %s.", indicate->MACTION, actions [indicate->MACTION]);
-			}
-			else
-			{
-				error (0, ENOTSUP, "Host Action 0x%0X", indicate->MACTION);
-				continue;
-			}
-			action = indicate->MACTION;
-			memcpy (channel->peer, indicate->ethernet.OSA, sizeof (channel->peer));
-			if (HostActionResponse (plc))
-			{
-				return (-1);
-			}
-			if (action == 0x00)
-			{
-				if (BootDevice1 (plc))
-				{
-					return (-1);
-				}
-				if (_anyset (plc->flags, PLC_FLASH_DEVICE))
-				{
-					if (WriteNVM (plc))
-					{
-						return (-1);
-					}
-					if (WritePIB (plc))
-					{
-						return (-1);
-					}
-					if (FlashNVM (plc))
-					{
-						return (-1);
-					}
-				}
-				continue;
-			}
-			if (action == 0x01)
-			{
-				close (plc->NVM.file);
-				if (ReadFirmware1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x02)
-			{
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x03)
-			{
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				close (plc->NVM.file);
-				if (ReadFirmware1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x04)
-			{
-				if (InitDevice1 (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x05)
-			{
-				close (plc->NVM.file);
-				if ((plc->NVM.file = open (plc->NVM.name = NVM, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				close (plc->PIB.file);
-				if ((plc->PIB.file = open (plc->PIB.name = PIB, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x06)
-			{
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				continue;
-			}
-			error (0, ENOSYS, "Host Action 0x%02X", action);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/EthernetHeader.c.html b/docbook/EthernetHeader.c.html deleted file mode 100644 index 1ab445b3..00000000 --- a/docbook/EthernetHeader.c.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - EthernetHeader.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed EthernetHeader (void * memory, const uint8_t peer [], const uint8_t host [], uint16_t protocol);
- *
- *   mme.h
- *
- *   encode a memory region with a standard Ethernet frame header in
- *   network byte order;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ETHERNETHEADER_SOURCE
-#define ETHERNETHEADER_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../mme/mme.h"
-
-signed EthernetHeader (void * memory, const uint8_t peer [], const uint8_t host [], uint16_t protocol)
-
-{
-	struct ether_header * header = (struct ether_header *)(memory);
-	memcpy (header->ether_dhost, peer, sizeof (header->ether_dhost));
-	memcpy (header->ether_shost, host, sizeof (header->ether_shost));
-	header->ether_type = htons (protocol);
-	return (sizeof (* header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ExecuteApplets.c.html b/docbook/ExecuteApplets.c.html deleted file mode 100644 index 4cab1bbf..00000000 --- a/docbook/ExecuteApplets.c.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - ExecuteApplets.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ExecuteApplets (struct plc * plc);
- *
- *   plc.h
- *
- *   call appropriate ExecuteApplets function based on detected NVM
- *   file format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EXECUTEAPPLETS_SOURCE
-#define EXECUTEAPPLETS_SOURCE
-
-#include "../plc/plc.h"
-
-signed ExecuteApplets (struct plc * plc)
-
-{
-	return (NVMSelect (plc, ExecuteApplets1, ExecuteApplets2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ExecuteApplets1.c.html b/docbook/ExecuteApplets1.c.html deleted file mode 100644 index 8a82c5d7..00000000 --- a/docbook/ExecuteApplets1.c.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - ExecuteApplets1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ExecuteApplets1 (struct plc * plc);
- *
- *   plc.h
- *
- *   download and execute all modules in an older nvm file chain;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EXECUTEAPPLETS1_SOURCE
-#define EXECUTEAPPLETS1_SOURCE
-
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed ExecuteApplets1 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header1 nvm_header;
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		if (_allclr (plc->flags, PLC_SILENCE))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->NVM.name);
-		}
-		return (-1);
-	}
-	do
-	{
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (PLC_EXIT (plc), errno, NVM_HDR_CANTREAD, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (PLC_EXIT (plc), 0, NVM_HDR_VERSION, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (PLC_EXIT (plc), 0, NVM_HDR_CHECKSUM, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (plc->hardwareID < CHIPSET_AR7400)
-		{
-			if (WriteFirmware1 (plc, module, &nvm_header))
-			{
-				return (-1);
-			}
-			if (StartFirmware1 (plc, module, &nvm_header))
-			{
-				return (-1);
-			}
-		}
-		else
-		{
-			if (WriteExecuteFirmware1 (plc, module, &nvm_header))
-			{
-				return (-1);
-			}
-		}
-		if (_anyset (plc->flags, PLC_QUICK_FLASH))
-		{
-			break;
-		}
-		while (!ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND)));
-		module++;
-	}
-	while (nvm_header.NEXTHEADER);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ExecuteApplets2.c.html b/docbook/ExecuteApplets2.c.html deleted file mode 100644 index 06652213..00000000 --- a/docbook/ExecuteApplets2.c.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - ExecuteApplets2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ExecuteApplets2 (struct plc * plc);
- *
- *   plc.h
- *
- *   download and execute all modules in a new nvm image files;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EXECUTEAPPLETS2_SOURCE
-#define EXECUTEAPPLETS2_SOURCE
-
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed ExecuteApplets2 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header2 nvm_header;
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		if (_allclr (plc->flags, PLC_SILENCE))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->NVM.name);
-		}
-		return (-1);
-	}
-	do
-	{
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (PLC_EXIT (plc), errno, NVM_HDR_CANTREAD, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header.MajorVersion) != 1)
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (PLC_EXIT (plc), 0, NVM_HDR_VERSION, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header.MinorVersion) != 1)
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (PLC_EXIT (plc), 0, NVM_HDR_VERSION, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (PLC_EXIT (plc), 0, NVM_HDR_CHECKSUM, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (WriteExecuteApplet2 (plc, module, &nvm_header))
-		{
-			return (-1);
-		}
-		if (_anyset (plc->flags, PLC_QUICK_FLASH))
-		{
-			break;
-		}
-		while (!ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND)));
-		module++;
-	}
-	while (~nvm_header.NextHeader);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FactoryDefaults.c.html b/docbook/FactoryDefaults.c.html deleted file mode 100644 index d5983633..00000000 --- a/docbook/FactoryDefaults.c.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - FactoryDefaults.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FactoryDefaults (struct plc * plc);
- *
- *   plc.h
- *
- *   This plug-in for program plc restores factory defaults using
- *   a VS_FAC_DEFAULTS message;
- *
- *
- *   Contributor(s):
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FACTORYDEFAULTS_SOURCE
-#define FACTORYDEFAULTS_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-
-signed FactoryDefaults (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_fac_defaults_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_fac_defaults_request *) (message);
-	struct __packed vs_fac_defaults_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_fac_defaults_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Restore Factory Defaults");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_FAC_DEFAULTS | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_FAC_DEFAULTS | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		Confirm (plc, "Restoring ...");
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FactoryReset.c.html b/docbook/FactoryReset.c.html deleted file mode 100644 index f9eacd4a..00000000 --- a/docbook/FactoryReset.c.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - FactoryReset.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FactoryReset (struct plc * plc);
- *
- *   plc.h
- *
- *   This plug-in for program plc restores factory defaults using
- *   a VS_FAC_DEFAULTS message;
- *
- *
- *   Contributor(s):
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FACTORYRESET_SOURCE
-#define FACTORYRESET_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-
-signed FactoryReset (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_fac_defaults_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_fac_defaults_request *) (message);
-	struct __packed vs_fac_defaults_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_fac_defaults_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_FAC_DEFAULTS | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_FAC_DEFAULTS | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Failure.c.html b/docbook/Failure.c.html deleted file mode 100644 index 92b90a5e..00000000 --- a/docbook/Failure.c.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Failure.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void Failure (struct plc * plc, char const *format, ...)
- *
- *   error.h
- *
- *   Inform the user that an operation failed; print the channel name,
- *   source device, error message and user defined message on stderr
- *   unless the PLC_SILENCE flags is set;
- *
- *   This function is similar to Confirm () except that the message
- *   status or result code and description is output when the code
- *   is non-zero; overtime, result codes have replaced status codes
- *   and so we look in different places for codes in some MMEs;
- *
- *   the status and result code fields appear at different offsets
- *   in different messages; consequently, check the MMTYPE to find
- *   field;
- *
- *
- *   Contributor(s);
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FAILURE_SOURCE
-#define FAILURE_SOURCE
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/memory.h"
-#include "../mme/mme.h"
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 2, 3)))
-
-#endif
-
-void Failure (struct plc * plc, char const *format, ...)
-
-{
-	if (_allclr (plc->flags, PLC_SILENCE))
-	{
-		char address [ETHER_ADDR_LEN * 3];
-		struct channel * channel = (struct channel *)(plc->channel);
-		struct message * message = (struct message *)(plc->message);
-		struct __packed header_confirm
-		{
-			ethernet_hdr ethernet;
-			qualcomm_hdr qualcomm;
-			uint8_t MSTATUS;
-		}
-		* header = (struct header_confirm *)(message);
-		hexdecode (header->ethernet.OSA, sizeof (header->ethernet.OSA), address, sizeof (address));
-		fprintf (stderr, "%s %s ", channel->ifname, address);
-		switch (LE16TOH (header->qualcomm.MMTYPE))
-		{
-		case VS_CONN_ADD | MMTYPE_CNF:
-		case VS_CONN_MOD | MMTYPE_CNF:
-		case VS_CONN_REL | MMTYPE_CNF:
-		case VS_CONN_INFO | MMTYPE_CNF:
-			{
-				struct __packed header_confirm
-				{
-					struct ethernet_hdr ethernet;
-					struct qualcomm_hdr qualcomm;
-					uint32_t REQUEST;
-					uint8_t MSTATUS;
-				}
-				* header = (struct header_confirm *)(message);
-				if (header->MSTATUS)
-				{
-					fprintf (stderr, "%s (0x%02X): ", MMECode (header->qualcomm.MMTYPE, header->MSTATUS), header->MSTATUS);
-				}
-			}
-			break;
-		case VS_SELFTEST_RESULTS | MMTYPE_CNF:
-		case VS_FORWARD_CONFIG | MMTYPE_CNF:
-			{
-				struct __packed header_confirm
-				{
-					struct ethernet_hdr ethernet;
-					struct qualcomm_hdr qualcomm;
-					uint8_t MVERSION;
-					uint8_t RESULTCODE;
-				}
-				* header = (struct header_confirm *)(message);
-				if (header->RESULTCODE)
-				{
-					fprintf (stderr, "%s (0x%02X): ", MMECode (header->qualcomm.MMTYPE, header->RESULTCODE), header->RESULTCODE);
-				}
-			}
-			break;
-		default:
-			if (header->MSTATUS)
-			{
-				fprintf (stderr, "%s (0x%02X): ", MMECode (header->qualcomm.MMTYPE, header->MSTATUS), header->MSTATUS);
-			}
-			break;
-		}
-		if ((format) && (*format))
-		{
-			va_list arglist;
-			va_start (arglist, format);
-			vfprintf (stderr, format, arglist);
-			va_end (arglist);
-		}
-		fprintf (stderr, "\n");
-	}
-	if (_anyset (plc->flags, PLC_BAILOUT))
-	{
-		if (_allclr (plc->flags, PLC_SILENCE))
-		{
-			error (1, 0, "Bailing Out!");
-		}
-		exit (1);
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FirmwareMessage.c.html b/docbook/FirmwareMessage.c.html deleted file mode 100644 index 1c9efcf4..00000000 --- a/docbook/FirmwareMessage.c.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - FirmwareMessage.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FirmwareMessage (void const * memory);
- *
- *   mme.h
- *
- *   intercept and print Qualcomm Atheros vendor-specific VS_ARPC
- *   messages on stdout; this message type is used for diagnostic
- *   reporting and should not appear in released firmware;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FIRMWAREMESSAGE_SOURCE
-#define FIRMWAREMESSAGE_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/endian.h"
-#include "../mme/mme.h"
-
-signed FirmwareMessage (void const * memory)
-
-{
-	const struct message * message = (const struct message *)(memory);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	static struct qualcomm_hdr header_arpc =
-	{
-		0,
-		0,
-		{
-			0x00,
-			0xB0,
-			0x52
-		}
-	};
-	struct __packed vs_arpc_indicate
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t RDATALENGTH;
-		uint8_t RDATAOFFSET;
-		uint8_t RDATA [1];
-	}
-	* indicate = (struct vs_arpc_indicate *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	header_arpc.MMTYPE = HTOLE16 (VS_ARPC | MMTYPE_IND);
-	if (!memcmp (&indicate->qualcomm, &header_arpc, sizeof (header_arpc)))
-	{
-		ARPCPrint (stderr, &indicate->RDATA [indicate->RDATAOFFSET], LE16TOH (indicate->RDATALENGTH) - indicate->RDATAOFFSET);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashDevice.c.html b/docbook/FlashDevice.c.html deleted file mode 100644 index 6c071d66..00000000 --- a/docbook/FlashDevice.c.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - FlashDevice.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashDevice (struct plc * plc);
- *
- *   plc.h
- *
- *   wait for device to start; determin chipset type and confirm that
- *   firmware is running; call appropriate FlashDevice function based
- *   on the PLC device type;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHDEVICE_SOURCE
-#define FLASHDEVICE_SOURCE
-
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed FlashDevice (struct plc * plc)
-
-{
-	return (PLCSelect (plc, FlashDevice1, FlashDevice2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashDevice1.c.html b/docbook/FlashDevice1.c.html deleted file mode 100644 index a061a312..00000000 --- a/docbook/FlashDevice1.c.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - FlashDevice1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashDevice1 (struct plc * plc);
- *
- *   plc.h
- *
- *   permanently write parameters and firmware to flash memory using
- *   VS_WR_MOD messagesand VS_MOD_NVM messages;
- *
- *   paramters and firmware are written to device SDRAM and stored
- *   until commited to flash memory;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHDEVICE1_SOURCE
-#define FLASHDEVICE1_SOURCE
-
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed FlashDevice1 (struct plc * plc)
-
-{
-	if (WritePIB (plc))
-	{
-		return (-1);
-	}
-	if (WriteNVM (plc))
-	{
-		return (-1);
-	}
-	if (FlashNVM (plc))
-	{
-		return (-1);
-	}
-	if (WaitForRestart (plc))
-	{
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashDevice2.c.html b/docbook/FlashDevice2.c.html deleted file mode 100644 index 48bf597c..00000000 --- a/docbook/FlashDevice2.c.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - FlashDevice2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashDevice2 (struct plc * plc, uint32_t options);
- *
- *   plc.h
- *   
- *   flash a QCA7420 device; force a reset because a reset is not
- *   automatic;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHDEVICE2_SOURCE
-#define FLASHDEVICE2_SOURCE
-
-#include "../plc/plc.h"
-
-signed FlashDevice2 (struct plc * plc, uint32_t options)
-
-{
-	char firmware [256];
-	if (plc->SFT.file != -1)
-	{
-		if (FlashSoftloader (plc, options))
-		{
-			return (-1);
-		}
-	}
-	if ((plc->NVM.file != -1) && (plc->PIB.file != -1))
-	{
-		if (FlashFirmware (plc, options))
-		{
-			return (-1);
-		}
-	}
-	else if (plc->PIB.file != -1)
-	{
-		if (FlashParameters (plc, options))
-		{
-			return (-1);
-		}
-	}
-	if (ResetDevice (plc))
-	{
-		return (-1);
-	}
-	sleep (5);
-	if (WaitForStart (plc, firmware, sizeof (firmware)))
-	{
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashFirmware.c.html b/docbook/FlashFirmware.c.html deleted file mode 100644 index e54ae40d..00000000 --- a/docbook/FlashFirmware.c.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - FlashFirmware.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashFirmware (struct plc * plc, uint32_t options);
- *
- *   plc.h
- *
- *   write powerline parameters and firmware into flash memory using
- *   VS_MODULE_OPERATION messages; force flash and do not reset;
- *
- *   struct vs_module_spec is defined in plc.h;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHFIRMWARE_SOURCE
-#define FLASHFIRMWARE_SOURCE
-
-#include "../plc/plc.h"
-
-signed FlashFirmware (struct plc * plc, uint32_t options)
-
-{
-	struct vs_module_spec vs_module_spec [] =
-	{
-		{
-			PLC_MODULEID_PARAMETERS,
-			0,
-			0,
-			0
-		},
-		{
-			PLC_MODULEID_FIRMWARE,
-			0,
-			0,
-			0
-		}
-	};
-	ModuleSpec (&plc->PIB, &vs_module_spec [0]);
-	ModuleSpec (&plc->NVM, &vs_module_spec [1]);
-	if (ModuleSession (plc, (sizeof (vs_module_spec) / sizeof (struct vs_module_spec)), vs_module_spec))
-	{
-		return (-1);
-	}
-	if (ModuleWrite (plc, &plc->PIB, 0, &vs_module_spec [0]))
-	{
-		return (-1);
-	}
-	if (ModuleWrite (plc, &plc->NVM, 1, &vs_module_spec [1]))
-	{
-		return (-1);
-	}
-	if (ModuleCommit (plc, options))
-	{
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashMOD.c.html b/docbook/FlashMOD.c.html deleted file mode 100644 index 6c1a5202..00000000 --- a/docbook/FlashMOD.c.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - FlashMOD.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashMOD (struct channel * channel, uint8_t module);
- *
- *   plc.h
- *
- *   commit downloaded firmware and/or parameters to NVRAM using a
- *   VS_MOD_NVM message; flash-less devices will attempt to upload
- *   to the local host since they have no NVRAM; the host must be
- *   ready to receive the module;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHMOD_SOURCE
-#define FLASHMOD_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-signed FlashMOD (struct channel * channel, uint8_t module)
-
-{
-	struct message message;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_mod_nvm_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-	}
-	* request = (struct vs_mod_nvm_request *) (&message);
-	struct __packed vs_mod_nvm_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MODULEID;
-	}
-	* confirm = (struct vs_mod_nvm_confirm *) (&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	ssize_t packetsize;
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MOD_NVM | MMTYPE_REQ));
-	request->MODULEID = module;
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	if ((packetsize = readpacket (channel, &message, sizeof (message))) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTREAD);
-	}
-	if (UnwantedMessage (&message, packetsize, 0, (VS_MOD_NVM | MMTYPE_CNF)))
-	{
-		error (1, ECANCELED, PLC_BADFRAME);
-	}
-	if (confirm->MSTATUS)
-	{
-		error (1, ECANCELED, PLC_WONTDOIT);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashNVM.c.html b/docbook/FlashNVM.c.html deleted file mode 100644 index 84b4afa5..00000000 --- a/docbook/FlashNVM.c.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - FlashNVM.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashNVM (struct plc * plc);
- *
- *   plc.h
- *
- *   commit downloaded firmware and/or parameters to NVRAM using a
- *   VS_MOD_NVM message; flash-less devices will attempt to upload
- *   to their local host because they have no NVRAM; the host must
- *   be prepared to handle this situation;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHNVM_SOURCE
-#define FLASHNVM_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-signed FlashNVM (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_mod_nvm_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-	}
-	* request = (struct vs_mod_nvm_request *) (message);
-	struct __packed vs_mod_nvm_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MODULEID;
-	}
-	* confirm = (struct vs_mod_nvm_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Flash device");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MOD_NVM | MMTYPE_REQ));
-	request->MODULEID = plc->module;
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_MOD_NVM | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashParameters.c.html b/docbook/FlashParameters.c.html deleted file mode 100644 index 36fd20ec..00000000 --- a/docbook/FlashParameters.c.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - FlashParameters.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashParameters (struct plc * plc, uint32_t options);
- *
- *   plc.h
- *
- *   write runtime powerline parameters into flash memory using
- *   VS_MODULE_OPERATION messages;
- *
- *   struct vs_module_spec is defined in plc.h;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHPARAMETERS_SOURCE
-#define FLASHPARAMETERS_SOURCE
-
-#include "../plc/plc.h"
-
-signed FlashParameters (struct plc * plc, uint32_t options)
-
-{
-	struct vs_module_spec vs_module_spec =
-	{
-		PLC_MODULEID_PARAMETERS,
-		0,
-		0,
-		0
-	};
-	ModuleSpec (&plc->PIB, &vs_module_spec);
-	if (ModuleSession (plc, 1, &vs_module_spec))
-	{
-		return (-1);
-	}
-	if (ModuleWrite (plc, &plc->PIB, 0, &vs_module_spec))
-	{
-		return (-1);
-	}
-	if (ModuleCommit (plc, options))
-	{
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FlashSoftloader.c.html b/docbook/FlashSoftloader.c.html deleted file mode 100644 index 0eeafdeb..00000000 --- a/docbook/FlashSoftloader.c.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - FlashSoftloader.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed FlashSoftloader (struct plc * plc, uint32_t options);
- *
- *   plc.h
- *
- *   This plugin upgrades a device having NVRAM; runtime firmware must
- *   be running for this to work; NVM and PIB files in struct plc must
- *   be opened before calling this plugin; this plugin is used by many
- *   programs;
- *
- *   This function is for panther/lynx devices although is should also
- *   work for AR7400 devices, too.
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLASHSOFTLOADER_SOURCE
-#define FLASHSOFTLOADER_SOURCE
-
-#include "../plc/plc.h"
-
-signed FlashSoftloader (struct plc * plc, uint32_t options)
-
-{
-	struct vs_module_spec vs_module_spec =
-	{
-		PLC_MODULEID_SOFTLOADER,
-		0,
-		0,
-		0
-	};
-	ModuleSpec (&plc->SFT, &vs_module_spec);
-	if (ModuleSession (plc, 1, &vs_module_spec))
-	{
-		return (-1);
-	}
-	if (ModuleWrite (plc, &plc->SFT, 0, &vs_module_spec))
-	{
-		return (-1);
-	}
-	if (ModuleCommit (plc, options))
-	{
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/FragmentHeader.c.html b/docbook/FragmentHeader.c.html deleted file mode 100644 index c73f0e36..00000000 --- a/docbook/FragmentHeader.c.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - FragmentHeader.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed QualcommHeader1 (struct qualcomm_fmi * header, uint8_t MMV, uint16_t MMTYPE, uint16_tFMI);
- *
- *   mme.h
- *
- *   Encode memory with an Atheros vendor specific message header
- *   having HomePlug message protocol version (INTELLON_MMV) and
- *   Atheros message type (MMTYPE);
- *
- *   return the number of bytes actually encoded or 0 on encode error;
- *   the error code is stored in errno;
- *
- *   see the INT6000 Firmware Technical Reference Manual for more
- *   about MME headers and message types; the Atheros OUI is
- *   implicit in this function;
- *
- *   MMV is the version number of the MME command set; currently,
- *   there is only one command set for Atheros MMEs;
- *
- *   MMTYPE indicates the desired Atheros device operation taken
- *   from the TRM; some operations are undocumented and should not
- *   be used;
- *
- *   OUI is the Organizationally Unique Identifier resgistered with
- *   the IEEE by the vendor and is a constant for Atheros Devices;
- *
- *   There is no need to flush the header since this function writes
- *   to all locations unless there is an error; the caller may elect
- *   to flush the buffer before calling this function;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FRAGMENTHEADER_SOURCE
-#define FRAGMENTHEADER_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/endian.h"
-#include "../mme/mme.h"
-
-signed QualcommHeader1 (struct qualcomm_fmi * header, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	header->MMV = MMV;
-	header->MMTYPE = HTOLE16 (MMTYPE);
-	header->FMSN = 0;
-	header->FMID = 0;
-	header->OUI [0] = 0x00;
-	header->OUI [1] = 0xB0;
-	header->OUI [2] = 0x52;
-	return (sizeof (* header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/GetProperty.c.html b/docbook/GetProperty.c.html deleted file mode 100644 index b9104e96..00000000 --- a/docbook/GetProperty.c.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - GetProperty.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed GetProperty (struct plc * plc, struct property * property);
- *
- *   plc.h
- *
- *   interrogte PLC devices for a property using the VS_GET_PROPERTY
- *   message and display the property value on stdout as a series of
- *   binary, decimal or hexadecimal bytes or an ASCII string;
- *
- *   the current implementation retrieves properties by number, not
- *   by name;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef GETPROPERTY_SOURCE
-#define GETPROPERTY_SOURCE
-
-#include <ctype.h>
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../plc/plc.h"
-
-signed GetProperty (struct plc * plc, struct plcproperty * plcproperty)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_get_property_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t COOKIE;
-		uint8_t DATA_FORMAT;
-		uint8_t PROP_FORMAT;
-		uint8_t RESERVED [2];
-		uint32_t PROP_VERSION;
-		uint32_t PROP_LENGTH;
-		uint8_t PROP_NUMBER;
-	}
-	* request = (struct vs_get_property_request *) (message);
-	struct __packed vs_get_property_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t COOKIE;
-		uint8_t DATA_FORMAT;
-		uint8_t RESERVED [3];
-		uint32_t DATA_LENGTH;
-		uint32_t DATA_BUFFER [1];
-	}
-	* confirm = (struct vs_get_property_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Get Property");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_GET_PROPERTY | MMTYPE_REQ));
-	request->COOKIE = HTOLE32 (plc->cookie);
-	request->DATA_FORMAT = plcproperty->DATA_FORMAT;
-	request->PROP_FORMAT = plcproperty->PROP_FORMAT;
-	request->PROP_VERSION = HTOLE32 (plcproperty->PROP_VERSION);
-	request->PROP_LENGTH = HTOLE32 (plcproperty->PROP_LENGTH);
-	request->PROP_NUMBER = HTOLE32 (plcproperty->PROP_NUMBER);
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_GET_PROPERTY | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		if (plcproperty->DATA_FORMAT == PLC_FORMAT_BIN)
-		{
-			binout (confirm->DATA_BUFFER, confirm->DATA_LENGTH, ' ', '\n', stdout);
-			continue;
-		}
-		if (plcproperty->DATA_FORMAT == PLC_FORMAT_HEX)
-		{
-			hexout (confirm->DATA_BUFFER, confirm->DATA_LENGTH, ' ', '\n', stdout);
-			continue;
-		}
-		if (plcproperty->DATA_FORMAT == PLC_FORMAT_DEC)
-		{
-			decout (confirm->DATA_BUFFER, confirm->DATA_LENGTH, ' ', '\n', stdout);
-			continue;
-		}
-		if (plcproperty->DATA_FORMAT == PLC_FORMAT_ASC)
-		{
-			chrout (confirm->DATA_BUFFER, confirm->DATA_LENGTH, '.', '\n', stdout);
-			continue;
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HPAVKey.h.html b/docbook/HPAVKey.h.html deleted file mode 100644 index f52880c3..00000000 --- a/docbook/HPAVKey.h.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - HPAVKey.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   HPAVKey.h - HomePlug AV key definitions and constants;
- *
- *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
- *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
- *;  For demonstration and evaluation only; Not for production use.
- *
- *   Contributor(s);
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HPAVKEY_HEADER
-#define HPAVKEY_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-#include <string.h>
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define HPAVKEY_CHAR_MIN 0x20
-#define HPAVKEY_CHAR_MAX 0x7E
-#define HPAVKEY_PHRASE_MIN 12
-#define HPAVKEY_PHRASE_MAX 64
-#define HPAVKEY_DIGEST_LEN 32
-#define HPAVKEY_SHA_LEN 32
-#define HPAVKEY_DAK_LEN 16
-#define HPAVKEY_NMK_LEN 16
-#define HPAVKEY_NID_LEN 7
-
-#define HPAVKEY_SHA 0
-#define HPAVKEY_DAK 1
-#define HPAVKEY_NMK 2
-#define HPAVKEY_NID 3
-
-#define HPAVKEY_VERBOSE (1 << 0)
-#define HPAVKEY_SILENCE (1 << 1)
-#define HPAVKEY_ENFORCE (1 << 2)
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-void HPAVKeyNMK (uint8_t NMK [], char const * string);
-void HPAVKeyDAK (uint8_t DAK [], char const * string);
-void HPAVKeyNID (uint8_t NID [], const uint8_t NMK [], uint8_t mode);
-void HPAVKeySHA (uint8_t digest [], char const * string);
-void HPAVKeyOut (const uint8_t digest [], size_t length, char const * phrase, unsigned flags);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/HPAVKeyDAK.c.html b/docbook/HPAVKeyDAK.c.html deleted file mode 100644 index 292c134e..00000000 --- a/docbook/HPAVKeyDAK.c.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - HPAVKeyDAK.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void HPAVKeyDAK (uint8_t DAK [], const char * string);
- *
- *   HPAVKey.h
- *
- *   compute the HomePlugAV compliant Device Access Key (DAK) for a
- *   NUL terminated string; return the key in buffer DAK[]; the key
- *   will be HPAVKEY_DAK_LEN bytes as defined in HPAVKey.h;
- *
- *   seed the digest then salt the digest then rehash the digest 999
- *   times per HomePlug AV Specification;
- *
- *
- *   Contributor(s);
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HPAVKEYDAK_SOURCE
-#define HPAVKEYDAK_SOURCE
-
-#include <memory.h>
-
-#include "../key/HPAVKey.h"
-#include "../key/SHA256.h"
-
-void HPAVKeyDAK (uint8_t DAK [], const char * string)
-
-{
-	struct sha256 sha256;
-	uint8_t digest [SHA256_DIGEST_LENGTH];
-	const uint8_t secret [] =
-	{
-		0x08,
-		0x85,
-		0x6D,
-		0xAF,
-		0x7C,
-		0xF5,
-		0x81,
-		0x85
-	};
-	unsigned rehash = 999;
-	SHA256Reset (&sha256);
-	SHA256Write (&sha256, string, strlen (string));
-	SHA256Write (&sha256, secret, sizeof (secret));
-	SHA256Fetch (&sha256, digest);
-	while (rehash--)
-	{
-		SHA256Reset (&sha256);
-		SHA256Write (&sha256, digest, sizeof (digest));
-		SHA256Fetch (&sha256, digest);
-	}
-	memcpy (DAK, digest, HPAVKEY_DAK_LEN);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HPAVKeyNID.c.html b/docbook/HPAVKeyNID.c.html deleted file mode 100644 index 64bf3a15..00000000 --- a/docbook/HPAVKeyNID.c.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - HPAVKeyNID.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void HPAVKeyNID (uint8_t NID [], const uint8_t NMK [], signed level);
- *
- *   HPAVKey.h
- *
- *   compute the HomePlugAV compliant Network Identification Key (NID)
- *   for a given Network Membership Key (NMK); return the key in buffer
- *   NID []; the key will be HPAVKEY_NID_LEN bytes as defined in
- *   HPAVKey.h;
- *
- *   unlike the NMK, the NID is 54-bits and includes a 2-bit security
- *   level; See the HomePlug AV Specification for more info;
- *
- *   hash the NMK then rehash the digest 4 times per HomePlug AV
- *   Specification; no salt is used;
- *
- *
- *   Contributor(s);
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HPAVKEYNID_SOURCE
-#define HPAVKEYNID_SOURCE
-
-#include <memory.h>
-
-#include "../key/HPAVKey.h"
-#include "../key/SHA256.h"
-
-void HPAVKeyNID (uint8_t NID [], const uint8_t NMK [], uint8_t level)
-
-{
-	struct sha256 sha256;
-	uint8_t digest [SHA256_DIGEST_LENGTH];
-	unsigned rehash = 4;
-	SHA256Reset (&sha256);
-	SHA256Write (&sha256, NMK, HPAVKEY_NMK_LEN);
-	SHA256Fetch (&sha256, digest);
-	while (rehash--)
-	{
-		SHA256Reset (&sha256);
-		SHA256Write (&sha256, digest, sizeof (digest));
-		SHA256Fetch (&sha256, digest);
-	}
-
-#if 1
-
-	level <<= 4;
-	digest [HPAVKEY_NID_LEN - 1] >>= 4;
-	digest [HPAVKEY_NID_LEN - 1] |= level;
-
-#else
-
-	digest [HPAVKEY_NID_LEN - 1] &= ~0xC0;
-	digest [HPAVKEY_NID_LEN - 1] |= level << 6;
-
-#endif
-
-	memcpy (NID, digest, HPAVKEY_NID_LEN);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HPAVKeyNMK.c.html b/docbook/HPAVKeyNMK.c.html deleted file mode 100644 index c8e1f495..00000000 --- a/docbook/HPAVKeyNMK.c.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - HPAVKeyNMK.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void HPAVKeyNMK (uint8_t NMK [], const char * string);
- *
- *   HPAVKey.h
- *
- *   compute the HomePlugAV compliant Network Membership Key (NMK)
- *   for a NUL terminated string; return the key in buffer NMK [];
- *   the key will be HPAVKEY_NMK_LEN bytes as defined in HPAVKey.h;
- *
- *   seed the digest then salt the digest then rehash the digest 999
- *   times per HomePlug AV Specification;
- *
- *
- *   Contributor(s);
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HPAVKEYNMK_SOURCE
-#define HPAVKEYNMK_SOURCE
-
-#include <memory.h>
-
-#include "../key/HPAVKey.h"
-#include "../key/SHA256.h"
-
-void HPAVKeyNMK (uint8_t NMK [], const char * string)
-
-{
-	struct sha256 sha256;
-	uint8_t digest [SHA256_DIGEST_LENGTH];
-	const uint8_t secret [] =
-	{
-		0x08,
-		0x85,
-		0x6D,
-		0xAF,
-		0x7C,
-		0xF5,
-		0x81,
-		0x86
-	};
-	unsigned rehash = 999;
-	SHA256Reset (&sha256);
-	SHA256Write (&sha256, string, strlen (string));
-	SHA256Write (&sha256, secret, sizeof (secret));
-	SHA256Fetch (&sha256, digest);
-	while (rehash--)
-	{
-		SHA256Reset (&sha256);
-		SHA256Write (&sha256, digest, sizeof (digest));
-		SHA256Fetch (&sha256, digest);
-	}
-	memcpy (NMK, digest, HPAVKEY_NMK_LEN);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HPAVKeyOut.c.html b/docbook/HPAVKeyOut.c.html deleted file mode 100644 index b8af9dfd..00000000 --- a/docbook/HPAVKeyOut.c.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - HPAVKeyOut.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void HPAVKeyOut (byte digest [], size_t length, const char * phrase, flag_t flags);
- *
- *   HPAVKey.h
- *
- *   print a digest in hexadecimal format on stdout; also print the
- *   phrase after the digest if the HPAVKEY_VERBOSE flag bit is set;
- *
- *
- *   Contributor(s);
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HPAVKEYOUT_SOURCE
-#define HPAVKEYOUT_SOURCE
-
-#include <stdio.h>
-
-#include "../key/HPAVKey.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-
-void HPAVKeyOut (const uint8_t digest [], size_t length, const char * phrase, flag_t flags)
-
-{
-	hexout (digest, length, 0, 0, stdout);
-	if (_anyset (flags, HPAVKEY_VERBOSE))
-	{
-		printf (" %s", phrase);
-	}
-	printf ("\n");
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HPAVKeySHA.c.html b/docbook/HPAVKeySHA.c.html deleted file mode 100644 index 6d692b6f..00000000 --- a/docbook/HPAVKeySHA.c.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - HPAVKeySHA.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void HPAVKeySHA (uint8_t digest [], const char * string);
- *
- *   HPAVKey.h
- *
- *   compute the SHA256 digest for a NUL terminated string; the
- *   will always 256 bits (32 bytes) long for any string length;
- *
- *
- *   Contributor(s);
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HPAVKEYSHA_SOURCE
-#define HPAVKEYSHA_SOURCE
-
-#include "../key/HPAVKey.h"
-#include "../key/SHA256.h"
-
-void HPAVKeySHA (uint8_t digest [], const char * string)
-
-{
-	struct sha256 sha256;
-	SHA256Reset (&sha256);
-	SHA256Write (&sha256, string, strlen (string));
-	SHA256Fetch (&sha256, digest);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HPAVKeySpec.c.html b/docbook/HPAVKeySpec.c.html deleted file mode 100644 index e8df0985..00000000 --- a/docbook/HPAVKeySpec.c.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - HPAVKeySpec.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void HPAVKeySpec (const char * string);
- *
- *   HPAVKey.h
- *
- *   confirm that a string is a legal HomePlug AV pass phrase; return
- *   on success; exit the program on failure; legal pass phrases have
- *   12 to 64 characters ranging from 0x20 thru 0x7F;
- *
- *   this function is intended to check pass phrases entered from the
- *   command line as arguments therefore it explains why it failed;
- *
- *
- *   Contributor(s);
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HPAVKEYSPEC_SOURCE
-#define HPAVKEYSPEC_SOURCE
-
-#include <ctype.h>
-
-#include "../tools/error.h"
-#include "../key/HPAVKey.h"
-
-void HPAVKeySpec (const char * string)
-
-{
-	const char * sp = string;
-	while (isprint (*sp))
-	{
-		sp++;
-	}
-	if (*sp)
-	{
-		error (1, ENOTSUP, "Phrase \"%s\" has illegal characters", string);
-	}
-	if ((sp - string) < HPAVKEY_PHRASE_MIN)
-	{
-		error (1, ENOTSUP, "Phrase \"%s\" less than %d characters", string, HPAVKEY_PHRASE_MIN);
-	}
-	if ((sp - string) > HPAVKEY_PHRASE_MAX)
-	{
-		error (1, ENOTSUP, "Phrase \"%s\" more than %d characters", string, HPAVKEY_PHRASE_MAX);
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HomePlugHeader.c.html b/docbook/HomePlugHeader.c.html deleted file mode 100644 index 2d2ecde6..00000000 --- a/docbook/HomePlugHeader.c.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - HomePlugHeader.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed HomePlugHeader (struct homeplug_hdr * header, uint8_t MMV, uint16_t MMTYPE);
- *
- *   mme.h
- *
- *   encode memory with a standard HomePlug AV header having HomePlug
- *   protocol version (HOMEPLUG_MMV) and HomePlug message type (MMTYPE);
- *   return the number of bytes actually encoded;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HOMEPLUGHEADER_SOURCE
-#define HOMEPLUGHEADER_SOURCE
-
-#include <stdint.h>
-
-#include "../mme/mme.h"
-#include "../tools/endian.h"
-
-signed HomePlugHeader (struct homeplug_hdr * header, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	header->MMV = MMV;
-	header->MMTYPE = HTOLE16 (MMTYPE);
-	return (sizeof (* header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HomePlugHeader1.c.html b/docbook/HomePlugHeader1.c.html deleted file mode 100644 index 460a3592..00000000 --- a/docbook/HomePlugHeader1.c.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - HomePlugHeader1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed HomePlugHeader1 (struct homeplug_fmi * header, uint8_t MMV, uint16_t MMTYPE);
- *
- *   mme.h
- *
- *   encode memory with a standard HomePlug AV header having HomePlug
- *   protocol version (HOMEPLUG_MMV) and HomePlug message type (MMTYPE);
- *   return the number of bytes actually encoded;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HOMEPLUGHEADER1_SOURCE
-#define HOMEPLUGHEADER1_SOURCE
-
-#include <stdint.h>
-
-#include "../mme/mme.h"
-#include "../tools/endian.h"
-
-signed HomePlugHeader1 (struct homeplug_fmi * header, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	header->MMV = MMV;
-	header->MMTYPE = HTOLE16 (MMTYPE);
-	header->FMSN = 0;
-	header->FMID = 0;
-	return (sizeof (* header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HostActionIndicate.c.html b/docbook/HostActionIndicate.c.html deleted file mode 100644 index 15659bf9..00000000 --- a/docbook/HostActionIndicate.c.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - HostActionIndicate.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed HostActionIndicate (struct plc * plc);
- *
- *   plc.h
- *
- *   This test plugin requests come action from a local host using a
- *   VS_HOST_ACTION indication message; the message must be sent to a
- *   host, not a device; it can be used to verify that your host
- *   application correctly responds to device requests;
- *
- *   this function is provided so that you can emulate a device boot
- *   sequence by prompting a listening host to download firmware; it
- *   has no practical purpose other than development and test;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HOSTACTIONINDICATE_SOURCE
-#define HOSTACTIONINDICATE_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-signed HostActionIndicate (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_host_action_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MACTION;
-		uint8_t MAJOR_VERSION;
-		uint8_t MINOR_VERSION;
-	}
-	* indicate = (struct vs_host_action_ind *) (message);
-	struct __packed vs_host_action_rsp
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* response = (struct vs_host_action_rsp *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Start Host Action");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&indicate->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&indicate->qualcomm, 0, (VS_HOST_ACTION | MMTYPE_IND));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	indicate->MACTION = plc->action;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_RSP)) > 0)
-	{
-		if (response->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		Confirm (plc, "Start.");
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/HostActionResponse.c.html b/docbook/HostActionResponse.c.html deleted file mode 100644 index 2d340940..00000000 --- a/docbook/HostActionResponse.c.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - HostActionResponse.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int HostActionResponse (struct plc * plc);
- *
- *   plc.h
- *
- *   respond to a VS_HOST_ACTION.IND message sent from a device to
- *   the local host using a VS_HOST_ACTION.RSP message; this tells
- *   the bootloader to stop sending VS_HOST_ACTION.IND messages;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HOSTACTIONRESPONSE_SOURCE
-#define HOSTACTIONRESPONSE_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-signed HostActionResponse (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_host_action_rsp
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* response = (struct vs_host_action_rsp *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&response->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&response->qualcomm, 0, (VS_HOST_ACTION | MMTYPE_RSP));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Identity.c.html b/docbook/Identity.c.html deleted file mode 100644 index 7a5ea861..00000000 --- a/docbook/Identity.c.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Identity.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Identity (struct plc * plc);
- *
- *   plc.h
- *
- *   select the appropriate function based on the device type;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IDENTITY_SOURCE
-#define IDENTITY_SOURCE
-
-#include "../plc/plc.h"
-
-signed Identity (struct plc * plc)
-
-{
-	return (PLCSelect (plc, Identity1, Identity2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Identity1.c.html b/docbook/Identity1.c.html deleted file mode 100644 index d9fa9ad8..00000000 --- a/docbook/Identity1.c.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - Identity1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Identity1 (struct plc * plc);
- *
- *   plc.h
- *
- *   Read the first block of the PIB image from a powerline device
- *   using VA_RD_MOD; print identity information on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IDENTITY1_SOURCE
-#define IDENTITY1_SOURCE
-
-#include <string.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../pib/pib.h"
-
-signed Identity1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t MSECRET [16];
-	}
-	* request = (struct vs_rd_mod_request *) (message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RES [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t MCHKSUM;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* confirm = (struct vs_rd_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Device Identity");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->MODULEID = VS_MODULE_PIB;
-	request->MLENGTH = HTOLE16 (sizeof (confirm->BUFFER));
-	request->MOFFSET = HTOLE32 (0);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_RD_MOD | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		Confirm (plc, "-------");
-		pibpeek1 (confirm->BUFFER);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Identity2.c.html b/docbook/Identity2.c.html deleted file mode 100644 index 2ab642ba..00000000 --- a/docbook/Identity2.c.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - Identity2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IDENTITY2_SOURCE
-#define IDENTITY2_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/endian.h"
-#include "../tools/memory.h"
-#include "../tools/flags.h"
-#include "../nvm/nvm.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *
- *   signed pibchain2 (void const * memory);
- *
- *   search panther/lynx image chain for the next PIB image; print
- *   information on stdout and return;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibchain2 (void const * memory, char const * filename, flag_t flags)
-
-{
-	struct nvm_header2 * nvm_header;
-	uint32_t origin = ~0;
-	uint32_t offset = 0;
-	signed module = 0;
-	do
-	{
-		nvm_header = (struct nvm_header2 *)((char *)(memory) + offset);
-		if (LE16TOH (nvm_header->MajorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header->MinorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header->PrevHeader) != origin)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_LINK, filename, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
-		{
-			error (0, 0, NVM_HDR_CHECKSUM, filename, module);
-			return (-1);
-		}
-		origin = offset;
-		offset += sizeof (* nvm_header);
-		if (LE32TOH (nvm_header->ImageType) == NVM_IMAGE_PIB)
-		{
-			struct pib_header * pib_header = (struct pib_header *)((char *)(memory) + offset);
-			pib_header->PIBLENGTH = HTOLE16((uint16_t)(LE32TOH(nvm_header->ImageLength)));
-			pibpeek2 ((char *)(memory) + offset);
-			pib_header->PIBLENGTH = 0;
-			break;
-		}
-		if (checksum32 ((char *)(memory) + offset, LE32TOH (nvm_header->ImageLength), nvm_header->ImageChecksum))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_IMG_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		offset += LE32TOH (nvm_header->ImageLength);
-		module++;
-	}
-	while (~nvm_header->NextHeader);
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed Identity2 (struct plc * plc);
- *
- *   plc.h
- *
- *   read start of parameter chain from flash memory using single
- *   VS_MODULE_OPERATION message and print identity information on
- *   stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-signed Identity2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_module_operation_read_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-	}
-	* request = (struct vs_module_operation_read_request *)(message);
-	struct __packed vs_module_operation_read_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-		uint8_t MODULE_DATA [PLC_MODULE_SIZE];
-	}
-	* confirm = (struct vs_module_operation_read_confirm *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MODULE_OPERATION | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->NUM_OP_DATA = 1;
-	request->MODULE_SPEC.MOD_OP = HTOLE16 (0);
-	request->MODULE_SPEC.MOD_OP_DATA_LEN = HTOLE16 (sizeof (request->MODULE_SPEC));
-	request->MODULE_SPEC.MOD_OP_RSVD = HTOLE32 (0);
-	request->MODULE_SPEC.MODULE_ID = HTOLE16 (PLC_MODULEID_PARAMETERS);
-	request->MODULE_SPEC.MODULE_SUB_ID = HTOLE16 (0);
-	request->MODULE_SPEC.MODULE_LENGTH = HTOLE16 (PLC_MODULE_SIZE);
-	request->MODULE_SPEC.MODULE_OFFSET = HTOLE32 (0);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_MODULE_OPERATION | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	pibchain2 (confirm->MODULE_DATA, "device", plc->flags);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/InitDevice.c.html b/docbook/InitDevice.c.html deleted file mode 100644 index 53817222..00000000 --- a/docbook/InitDevice.c.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - InitDevice.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed InitDevice (struct plc * plc);
- *
- *   plc.h
- *
- *   call appropriate function based on image file format;
- *
- *   initialize powerline device memory before writing and starting
- *   runtime parameters and firmare; each generation of device has
- *   a different memory type; newer devices store memory parameters
- *   and configuration programs in an image file;
- *
- *   this implementation handles both old and new image file formats;
- *   call InitDevice1 or InitDevice2 directly if you know which file
- *   format will be used;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef INITMEMORY_SOURCE
-#define INITMEMORY_SOURCE
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed InitDevice (struct plc * plc)
-
-{
-	return (NVMSelect (plc, InitDevice1, InitDevice2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/InitDevice1.c.html b/docbook/InitDevice1.c.html deleted file mode 100644 index ad1f898c..00000000 --- a/docbook/InitDevice1.c.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - InitDevice1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int InitDevice1 (struct plc * plc);
- *
- *   plc.h
- *
- *   configure volatile memory by finding the memctl applet in an
- *   older .nvm file then downloading it and executing it;
- *
- *   this implementation detects chipsets prior to INT6400 and uses
- *   VS_WR_MEM/VS_ST_MAC messages instead of VS_WRITE_AND_EXECUTE
- *   messages;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef INITDEVICE1_SOURCE
-#define INITDEVICE1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../nvm/nvm.h"
-
-int InitDevice1 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header1 nvm_header;
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->NVM.name);
-	}
-	do
-	{
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			error (1, errno, NVM_HDR_CANTREAD, plc->NVM.name, module);
-		}
-		if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
-		{
-			error (1, 0, NVM_HDR_VERSION, plc->NVM.name, module);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			error (1, 0, NVM_HDR_CHECKSUM, plc->NVM.name, module);
-		}
-
-#if 0
-
-		if (_anyset (LE16TOH (nvm_header.IGNOREMASK), (1 << (plc->hardwareID - 1))))
-		{
-			if (lseek (plc->NVM.file, LE32TOH (nvm_header.NEXTHEADER), SEEK_SET) == -1)
-			{
-				error (1, errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-			}
-		}
-		else
-
-#endif
-
-		if (nvm_header.IMAGETYPE == NVM_IMAGE_MEMCTL)
-		{
-			if (plc->hardwareID < CHIPSET_AR7400)
-			{
-				if (WriteFirmware1 (plc, module, &nvm_header))
-				{
-					return (-1);
-				}
-				if (StartFirmware1 (plc, module, &nvm_header))
-				{
-					return (-1);
-				}
-				break;
-			}
-			WriteExecuteFirmware1 (plc, module, &nvm_header);
-			break;
-		}
-		if (lseek (plc->NVM.file, LE32TOH (nvm_header.NEXTHEADER), SEEK_SET) == -1)
-		{
-			error (1, errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-		}
-		module++;
-	}
-	while (nvm_header.NEXTHEADER);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/InitDevice2.c.html b/docbook/InitDevice2.c.html deleted file mode 100644 index 2ab75e51..00000000 --- a/docbook/InitDevice2.c.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - InitDevice2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int InitDevice2 (struct plc * plc);
- *
- *   plc.h
- *
- *   configure volatile memory by finding the memctl applet in a
- *   newer .nvm file then downloading it and executing it;
- *
- *   this implementation detects chipsets prior to INT6400 and uses
- *   VS_WR_MEM/VS_ST_MAC messages instead of VS_WRITE_AND_EXECUTE
- *   messages;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef INITMEMORY2_SOURCE
-#define INITMEMORY2_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../nvm/nvm.h"
-
-int InitDevice2 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header2 nvm_header;
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->NVM.name);
-	}
-	do
-	{
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			error (1, errno, NVM_HDR_CANTREAD, plc->NVM.name, module);
-		}
-		if (LE16TOH (nvm_header.MajorVersion) != 1)
-		{
-			error (1, 0, NVM_HDR_VERSION, plc->NVM.name, module);
-		}
-		if (LE16TOH (nvm_header.MinorVersion) != 1)
-		{
-			error (1, 0, NVM_HDR_VERSION, plc->NVM.name, module);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			error (1, 0, NVM_HDR_CHECKSUM, plc->NVM.name, module);
-		}
-
-#if 0
-
-		if (_allclr (LE16TOH (nvm_header.ExecuteMask), (1 << (plc->hardwareID - 1))))
-		{
-			if (lseek (plc->NVM.file, LE32TOH (nvm_header.NextHeader), SEEK_SET) == -1)
-			{
-				error (1, errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-			}
-		}
-		else
-
-#endif
-
-		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_MEMCTL)
-		{
-			if (WriteExecuteFirmware2 (plc, module, &nvm_header))
-			{
-				return (-1);
-			}
-			break;
-		}
-		if (lseek (plc->NVM.file, LE32TOH (nvm_header.NextHeader), SEEK_SET) == -1)
-		{
-			error (1, errno, "Can't skip module: %s (%d)", plc->NVM.name, module);
-		}
-		module++;
-	}
-	while (~nvm_header.NextHeader);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/LinkStatistics.c.html b/docbook/LinkStatistics.c.html deleted file mode 100644 index 0ef8d21d..00000000 --- a/docbook/LinkStatistics.c.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - LinkStatistics.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed LinkStatistics (struct plc * plc);
- *
- *   plc.h
- *
- *   this plugin for plcstat reads device link statistics using a
- *   VS_LNK_STATS message and displays information on stdout; since
- *   the output may not suite all requirements, users are encouraged
- *   to modify as needed; there is way too much data displayed here;
- *
- *   some code is duplicated for the sake of modularity;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef LINKSTATISTICS_SOURCE
-#define LINKSTATISTICS_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-#include <inttypes.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define PAD ' '
-#define DIGITS 16
-
-/*====================================================================*
- *   variables;
- *--------------------------------------------------------------------*/
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-typedef struct __packed transmit
-
-{
-	uint64_t NUMTXMPDU_ACKD;
-	uint64_t NUMTXMPDU_COLL;
-	uint64_t NUMTXMPDU_FAIL;
-	uint64_t NUMTXPBS_PASS;
-	uint64_t NUMTXPBS_FAIL;
-}
-
-transmit;
-typedef struct __packed receive
-
-{
-	uint64_t NUMRXMPDU_ACKD;
-	uint64_t NUMRXMPDU_FAIL;
-	uint64_t NUMRXPBS_PASS;
-	uint64_t NUMRXPBS_FAIL;
-	uint64_t SUMTURBOBER_PASS;
-	uint64_t SUMTURBOBER_FAIL;
-	uint8_t NUMRXINTERVALS;
-	uint8_t RXINTERVALSTATS [1];
-}
-
-receive;
-typedef struct __packed interval
-
-{
-	uint8_t RXPHYRATE_MBPS_0;
-	uint64_t NUMRXPBS_PASS;
-	uint64_t NUMRXPBS_FAIL;
-	uint64_t SUMTURBOBER_PASS;
-	uint64_t SUMTURBOBER_FAIL;
-}
-
-interval;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-/*====================================================================*
- *
- *   unsigned error_rate (uint64_t passed, uint64_t failed);
- *
- *   compute error rate for a given quantity; the error rate is the
- *   ratio of failures to attempts;
- *
- *--------------------------------------------------------------------*/
-
-static float error_rate (uint64_t passed, uint64_t failed)
-
-{
-	if ((passed) || (failed))
-	{
-		return ((float)(failed * 100) / (float)(passed + failed));
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   float fec_bit_error_rate (struct receive * receive);
- *
- *   compute the FEC-BER from the VS_LNK_STATS when DIRECTION=1 and
- *   LID=0xF8;
- *
- *--------------------------------------------------------------------*/
-
-static float fec_bit_error_rate (struct receive * receive)
-
-{
-	float FECBitErrorRate = 0;
-	if (receive->SUMTURBOBER_PASS || receive->SUMTURBOBER_FAIL)
-	{
-		float TotalSumOfBitError = 100 * (float)(receive->SUMTURBOBER_PASS + receive->SUMTURBOBER_FAIL);
-		float TotalSumOfBits = 8 * 520 * (float)(receive->NUMRXPBS_PASS + receive->NUMRXPBS_FAIL);
-		FECBitErrorRate = TotalSumOfBitError / TotalSumOfBits;
-	}
-	return (FECBitErrorRate);
-}
-
-/*====================================================================*
- *
- *   void transmit (struct transmit * transmit);
- *
- *   display transmit statistics in fixed field format;
- *
- *--------------------------------------------------------------------*/
-
-static void TransmitStatistics (struct transmit * transmit)
-
-{
-	printf ("    TX");
-	printf (" %20" PRId64, transmit->NUMTXPBS_PASS);
-	printf (" %20" PRId64, transmit->NUMTXPBS_FAIL);
-	printf (" %6.2f%%", error_rate (transmit->NUMTXPBS_PASS, transmit->NUMTXPBS_FAIL));
-	printf (" %20" PRId64, transmit->NUMTXMPDU_ACKD);
-	printf (" %20" PRId64, transmit->NUMTXMPDU_FAIL);
-	printf (" %20" PRId64, transmit->NUMTXMPDU_COLL);
-	printf (" %6.2f%%", error_rate (transmit->NUMTXMPDU_ACKD, transmit->NUMTXMPDU_FAIL));
-	printf ("\n");
-	return;
-}
-
-/*====================================================================*
- *
- *   void Receive (struct receive * receive);
- *
- *   display receive statistics in fixed field format;
- *
- *--------------------------------------------------------------------*/
-
-static void ReceiveStatistics (struct receive * receive)
-
-{
-	printf ("    RX");
-	printf (" %20" PRId64, receive->NUMRXPBS_PASS);
-	printf (" %20" PRId64, receive->NUMRXPBS_FAIL);
-	printf (" %6.2f%%", error_rate (receive->NUMRXPBS_PASS, receive->NUMRXPBS_FAIL));
-	printf (" %20" PRId64, receive->NUMRXMPDU_ACKD);
-	printf (" %20" PRId64, receive->NUMRXMPDU_FAIL);
-	printf (" %6.2f%%", error_rate (receive->NUMRXMPDU_ACKD, receive->NUMRXMPDU_FAIL));
-	printf ("\n");
-	return;
-}
-
-/*====================================================================*
- *
- *   void Receive (struct receive * receive);
- *
- *   display receive statistics in fixed field format for each slot;
- *   the last line sumarizes results for all slots;
- *
- *--------------------------------------------------------------------*/
-
-static void Receive2 (struct receive * receive)
-
-{
-	struct interval * interval = (struct interval *)(receive->RXINTERVALSTATS);
-	uint8_t slot = 0;
-	while (slot < receive->NUMRXINTERVALS)
-	{
-		printf (" %1d", slot);
-		printf (" %3d", interval->RXPHYRATE_MBPS_0);
-		printf (" %20" PRId64, interval->NUMRXPBS_PASS);
-		printf (" %20" PRId64, interval->NUMRXPBS_FAIL);
-		printf (" %6.2f%%", error_rate (interval->NUMRXPBS_PASS, interval->NUMRXPBS_FAIL));
-		printf (" %20" PRId64, interval->SUMTURBOBER_PASS);
-		printf (" %20" PRId64, interval->SUMTURBOBER_FAIL);
-		printf (" %6.2f%%", error_rate (interval->SUMTURBOBER_PASS, interval->SUMTURBOBER_FAIL));
-		printf ("\n");
-		interval++;
-		slot++;
-	}
-	printf ("   ALL");
-	printf (" %20" PRId64, receive->NUMRXPBS_PASS);
-	printf (" %20" PRId64, receive->NUMRXPBS_FAIL);
-	printf (" %6.2f%%", error_rate (receive->NUMRXPBS_PASS, receive->NUMRXPBS_FAIL));
-	printf (" %20" PRId64, receive->SUMTURBOBER_PASS);
-	printf (" %20" PRId64, receive->SUMTURBOBER_FAIL);
-	printf (" %6.2f%%", error_rate (receive->SUMTURBOBER_PASS, receive->SUMTURBOBER_FAIL));
-	printf (" %6.2f%%", fec_bit_error_rate (receive));
-	printf ("\n");
-	return;
-}
-
-/*====================================================================*
- *
- *   signed LinkStatistics (struct plc * plc);
- *
- *
- *--------------------------------------------------------------------*/
-
-signed LinkStatistics (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_lnk_stats_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MCONTROL;
-		uint8_t DIRECTION;
-		uint8_t LID;
-		uint8_t MACADDRESS [ETHER_ADDR_LEN];
-	}
-	* request = (struct vs_lnk_stats_request *) (message);
-	struct __packed vs_lnk_stats_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t DIRECTION;
-		uint8_t LID;
-		uint8_t TEI;
-		uint8_t LSTATS [1];
-	}
-	* confirm = (struct vs_lnk_stats_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_LNK_STATS | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->MCONTROL = plc->pushbutton;
-	request->DIRECTION = plc->module;
-	request->LID = plc->action;
-	memcpy (request->MACADDRESS, plc->RDA, sizeof (request->MACADDRESS));
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_LNK_STATS | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	if (confirm->DIRECTION == 0)
-	{
-		printf ("   DIR");
-		printf (" ----------- PBs PASS");
-		printf (" ----------- PBs FAIL");
-		printf (" PBs ERR");
-		printf (" ---------- MPDU ACKD");
-		printf (" ---------- MPDU FAIL");
-		printf ("\n");
-		TransmitStatistics ((struct transmit *)(confirm->LSTATS));
-		printf ("\n");
-	}
-	if (confirm->DIRECTION == 1)
-	{
-		printf ("   DIR");
-		printf (" ----------- PBs PASS");
-		printf (" ----------- PBs FAIL");
-		printf (" PBs ERR");
-		printf (" ---------- MPDU ACKD");
-		printf (" ---------- MPDU FAIL");
-		printf ("\n");
-		ReceiveStatistics ((struct receive *)(confirm->LSTATS));
-		printf ("\n");
-		printf ("   PHY");
-		printf (" ----------- PBs PASS");
-		printf (" ----------- PBs FAIL");
-		printf (" PBs ERR");
-		printf (" ----------- BER PASS");
-		printf (" ----------- BER FAIL");
-		printf (" BER ERR");
-		printf ("\n");
-		Receive2 ((struct receive *)(confirm->LSTATS));
-		printf ("\n");
-	}
-	if (confirm->DIRECTION == 2)
-	{
-		printf ("   DIR");
-		printf (" ----------- PBs PASS");
-		printf (" ----------- PBs FAIL");
-		printf (" PBs ERR");
-		printf (" ---------- MPDU ACKD");
-		printf (" ---------- MPDU FAIL");
-		printf ("\n");
-		TransmitStatistics ((struct transmit *)(confirm->LSTATS));
-		ReceiveStatistics ((struct receive *)(confirm->LSTATS + sizeof (struct transmit)));
-		printf ("\n");
-		printf ("   PHY");
-		printf (" ----------- PBs PASS");
-		printf (" ----------- PBs FAIL");
-		printf (" PBs ERR");
-		printf (" ----------- BER PASS");
-		printf (" ----------- BER FAIL");
-		printf (" BER ERR");
-		printf ("\n");
-		Receive2 ((struct receive *)(confirm->LSTATS + sizeof (struct transmit)));
-		printf ("\n");
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/LinkStatus.c.html b/docbook/LinkStatus.c.html deleted file mode 100644 index e7f93c38..00000000 --- a/docbook/LinkStatus.c.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - LinkStatus.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed VersionInfo (struct plc * plc);
- *
- *   plc.h
- *
- *   read hardware and software version information from an INT6x00
- *   using a VS_SW_VER Request Message;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef LINKSTATUS_SOURCE
-#define LINKSTATUS_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../plc/plc.h"
-
-signed LinkStatus (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_link_status_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_link_status_request *) (message);
-	struct __packed vs_link_status_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t LINKSTATUS;
-	}
-	* confirm = (struct vs_link_status_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Request Version Information");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_PL_LINK_STATUS | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_PL_LINK_STATUS | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		Display (plc, "%d", confirm->LINKSTATUS);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ListLocalDevices.c.html b/docbook/ListLocalDevices.c.html deleted file mode 100644 index 865a913d..00000000 --- a/docbook/ListLocalDevices.c.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - ListLocalDevices.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ListLocalDevices (struct plc * plc, char const * space, char const * comma);
- *
- *   plc.h
- *
- *   print local device hardware addresses on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef LISTLOCALDEVICES_SOURCE
-#define LISTLOCALDEVICES_SOURCE
-
-#include "../tools/number.h"
-#include "../plc/plc.h"
-
-signed ListLocalDevices (struct plc * plc, char const * space, char const * comma)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		return (-1);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 0, (VS_SW_VER | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		hexout (request->ethernet.OSA, sizeof (request->ethernet.OSA), HEX_EXTENDER, 0, stdout);
-		if ((space) && (*space))
-		{
-			printf ("%s", space);
-		}
-	}
-	if ((comma) && (* comma))
-	{
-		printf ("%s", comma);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ListRemoteDevices.c.html b/docbook/ListRemoteDevices.c.html deleted file mode 100644 index 1ad3323d..00000000 --- a/docbook/ListRemoteDevices.c.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - ListRemoteDevices.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ListRemoteDevices (struct channel * channel, char const * space);
- *
- *   print the neighbor device list on stdout;
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef LISTREMOTEDEVICES_SOURCE
-#define LISTREMOTEDEVICES_SOURCE
-
-#include "../plc/plc.h"
-
-signed ListRemoteDevices (struct plc * plc, char const * space, char const * comma)
-
-{
-	return ((plc->hardwareID < CHIPSET_AR7400)? ListRemoteDevices1 (plc, space, comma): ListRemoteDevices2 (plc, space, comma));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ListRemoteDevices1.c.html b/docbook/ListRemoteDevices1.c.html deleted file mode 100644 index 62577aac..00000000 --- a/docbook/ListRemoteDevices1.c.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - ListRemoteDevices1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ListRemoteDevices1 (struct plc * plc, char const * space, char const * comma);
- *
- *   print the neighbor device list on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef LISTREMOTEDEVICES1_SOURCE
-#define LISTREMOTEDEVICES1_SOURCE
-
-#include <stdio.h>
-
-#include "../tools/number.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed ListRemoteDevices1 (struct plc * plc, char const * space, char const * comma)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t content [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->content);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (&message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		return (-1);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 0, (VS_NW_INFO | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (_anyset (plc->flags, PLC_BRIDGE_LIST))
-		{
-			hexout (request->ethernet.OSA, sizeof (request->ethernet.OSA), HEX_EXTENDER, 0, stdout);
-			if ((space) && (*space))
-			{
-				printf ("%s", space);
-			}
-		}
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (_anyset (plc->flags, PLC_REMOTE_LIST))
-				{
-					hexout (station->MAC, sizeof (station->MAC), HEX_EXTENDER, 0, stdout);
-					if ((space) && (*space))
-					{
-						printf ("%s", space);
-					}
-				}
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		if ((comma) && (*comma))
-		{
-			printf ("%s", comma);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ListRemoteDevices2.c.html b/docbook/ListRemoteDevices2.c.html deleted file mode 100644 index 727d5cdb..00000000 --- a/docbook/ListRemoteDevices2.c.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - ListRemoteDevices2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ListRemoteDevices2 (struct plc * plc, char const * space, char const * comma);
- *
- *   print neighbor device list on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef LISTREMOTEDEVICES2_SOURCE
-#define LISTREMOTEDEVICES2_SOURCE
-
-#include <stdio.h>
-
-#include "../tools/number.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed ListRemoteDevices2 (struct plc * plc, char const * space, char const * comma)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		return (-1);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 1, (VS_NW_INFO | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (_anyset (plc->flags, PLC_BRIDGE_LIST))
-		{
-			hexout (request->ethernet.OSA, sizeof (request->ethernet.OSA), HEX_EXTENDER, 0, stdout);
-			if ((space) && (*space))
-			{
-				printf ("%s", space);
-			}
-		}
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS-- > 0)
-			{
-				if (_anyset (plc->flags, PLC_REMOTE_LIST))
-				{
-					hexout (station->MAC, sizeof (station->MAC), HEX_EXTENDER, 0, stdout);
-					if ((space) && (*space))
-					{
-						printf ("%s", space);
-					}
-				}
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		if ((comma) && (*comma))
-		{
-			printf ("%s", comma);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/LocalDeviceList.c.html b/docbook/LocalDeviceList.c.html deleted file mode 100644 index da9ec709..00000000 --- a/docbook/LocalDeviceList.c.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - LocalDeviceList.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed LocalDeviceList (struct plc * plc, char const * space, char const * comma);
- *
- *   plc.h
- *
- *   print local device hardware addresses on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef LOCALDEVICELIST_SOURCE
-#define LOCALDEVICELIST_SOURCE
-
-#include "../tools/number.h"
-#include "../plc/plc.h"
-
-signed LocalDeviceList (struct plc * plc, char const * space, char const * comma)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		return (-1);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 0, (VS_SW_VER | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		hexout (request->ethernet.OSA, sizeof (request->ethernet.OSA), HEX_EXTENDER, 0, stdout);
-		if ((space) && (*space))
-		{
-			printf ("%s", space);
-		}
-	}
-	if ((comma) && (* comma))
-	{
-		printf ("%s", comma);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/LocalDevices.c.html b/docbook/LocalDevices.c.html deleted file mode 100644 index f71d2502..00000000 --- a/docbook/LocalDevices.c.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - LocalDevices.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   unsigned LocalDevices (struct channel * channel,  struct message * message, void * memory, size_t extent);
- *
- *   plc.h
- *
- *   populate a memory region with consecutive Ethernet addresses;
- *   the addresses belong to Atheros powerline devices connected to
- *   the host interface specified in struct channel; each bridge may
- *   be connected to one or more HomePlug AV devices via powerline;
- *
- *   each powerline bridge normally belongs to a different powerline
- *   network but is is possible for multiple bridges to belong to the
- *   same powerline network thus leading to confusing configurations;
- *
- *   use function NetworkDevices() to discover all devices on each
- *   powerline network;
- *
- *   although this function accepts a channel structure, it ignores
- *   the channel peer address and sends a VS_SW_VER request message
- *   to the Local Management Address; this causes all local devices
- *   to respond; the list is a collection of source addresses taken
- *   from all responses;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKBRIDGES_SOURCE
-#define NETWORKBRIDGES_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../plc/plc.h"
-#include "../ether/channel.h"
-#include "../tools/types.h"
-#include "../tools/error.h"
-
-unsigned LocalDevices (struct channel const * channel, struct message * message, void * memory, size_t extent)
-
-{
-	extern const byte localcast [ETHER_ADDR_LEN];
-	struct vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *)(message);
-	uint8_t * origin = (uint8_t *)(memory);
-	uint8_t * offset = (uint8_t *)(memory);
-	ssize_t packetsize;
-	memset (memory, 0, extent);
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, localcast, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		return (0);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 0, (VS_SW_VER | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (extent >= sizeof (message->ethernet.OSA))
-		{
-			memcpy (offset, message->ethernet.OSA, sizeof (message->ethernet.OSA));
-			offset += sizeof (message->ethernet.OSA);
-			extent -= sizeof (message->ethernet.OSA);
-		}
-	}
-	return ((unsigned)(offset - origin) / ETHER_ADDR_LEN);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/MACPasswords.c.html b/docbook/MACPasswords.c.html deleted file mode 100644 index e6347c3f..00000000 --- a/docbook/MACPasswords.c.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - MACPasswords.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void  MACPasswords (unsigned vendor, unsigned device, unsigned number, unsigned count, unsigned group, char space, flag_t flags);
- *
- *   keys.h
- *
- *   print a range of device address/password pairs on stdout; print
- *   an optional usage flag in first column for PTS compatability;
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MACPASSWORDS_SOURCE
-#define MACPASSWORDS_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../key/keys.h"
-
-static uint64_t MACSeed = 0;
-static uint64_t MACSRand (uint64_t seed)
-
-{
-	uint64_t temp = MACSeed;
-	MACSeed = seed;
-	return (temp);
-}
-
-static unsigned MACRand ()
-
-{
-	MACSeed *= 0x41C64E6D;
-	MACSeed += 0x00003029;
-	return ((unsigned)((MACSeed >> 0x10) & 0x7FFFFFFF));
-}
-
-/*====================================================================*
- *
- *   void MACPassword (unsigned device, char const charset [], unsigned limit, unsigned count, unsigned group, char space);
- *
- *   keys.h
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-void MACPassword (unsigned device, char const charset [], unsigned limit, unsigned count, unsigned group, char space)
-
-{
-	MACSRand (device);
-	while (count--)
-	{
-		unsigned index = MACRand () % limit;
-		putc (charset [index & limit], stdout);
-		if ((count) && (group) && !(count % group))
-		{
-			putc (space, stdout);
-		}
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   void  MACPasswords (unsigned vendor, unsigned device, unsigned number, unsigned count, unsigned group, char space, flag_t flags);
- *
- *   keys.h
- *
- *   print a range of device address/password pairs on stdout; print
- *   an optional usage flag in first column for PTS compatability;
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-void MACPasswords (unsigned vendor, unsigned device, unsigned number, unsigned count, unsigned group, char space, flag_t flags)
-
-{
-	char charset [UCHAR_MAX];
-	unsigned offset = 0;
-	if (vendor >> 24)
-	{
-		return;
-	}
-	if (device >> 24)
-	{
-		return;
-	}
-	if (number >> 24)
-	{
-		return;
-	}
-	MACSRand (vendor);
-	while (offset < sizeof (charset))
-	{
-		unsigned c = MACRand () % (SCHAR_MAX + 1);
-		if (isupper (c))
-		{
-			charset [offset++] = c;
-		}
-	}
-	while (number--)
-	{
-		if (_anyset (flags, PASSWORD_VERBOSE))
-		{
-			putc ('0', stdout);
-			putc (' ', stdout);
-		}
-		if (_allclr (flags, PASSWORD_SILENCE))
-		{
-			printf ("%06X", vendor & 0x00FFFFFF);
-			printf ("%06X", device & 0x00FFFFFF);
-			putc (' ', stdout);
-		}
-		MACPassword (device, charset, sizeof (charset), count, group, space);
-		putc ('\n', stdout);
-		device++;
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/MDUTrafficStats.c.html b/docbook/MDUTrafficStats.c.html deleted file mode 100644 index ceeea5e0..00000000 --- a/docbook/MDUTrafficStats.c.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - MDUTrafficStats.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed MDUTrafficStats (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MDUTRAFFICSTATS_SOURCE
-#define MDUTRAFFICSTATS_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define CC1_RDRP (1 <<  0)
-#define CC1_RJBR (1 <<  1)
-#define CC1_RFRG (1 <<  2)
-#define CC1_ROVR (1 <<  3)
-#define CC1_RUND (1 <<  4)
-#define CC1_RCSE (1 <<  5)
-#define CC1_RCDE (1 <<  6)
-#define CC1_RFLR (1 <<  7)
-#define CC1_RALN (1 <<  8)
-#define CC1_RXUO (1 <<  9)
-#define CC1_RXPF (1 << 10)
-#define CC1_RXCF (1 << 11)
-#define CC1_RBCA (1 << 12)
-#define CC1_RMCA (1 << 13)
-#define CC1_RFCS (1 << 14)
-#define CC1_RPTK (1 << 15)
-#define CC1_TRMGV (1 << 25)
-#define CC1_TRMAX (1 << 26)
-#define CC1_TR1K (1 << 27)
-#define CC1_TR511 (1 << 28)
-#define CC1_TR255 (1 << 29)
-#define CC1_TR127 (1 << 30)
-#define CC1_TR64 (1 << 31)
-
-#define CC2_TDRP (1 <<  0)
-#define CC2_TPFH (1 <<  1)
-#define CC2_TNCL (1 <<  2)
-#define CC2_TXCL (1 <<  3)
-#define CC2_TLCL (1 <<  4)
-#define CC2_TMCL (1 <<  5)
-#define CC2_TSCL (1 <<  6)
-#define CC2_TEDF (1 <<  7)
-#define CC2_TDFR (1 <<  8)
-#define CC2_TXPF (1 <<  9)
-#define CC2_TBCA (1 << 10)
-#define CC2_TMCA (1 << 11)
-#define CC2_TPKT (1 << 12)
-#define CC2_TBYT (1 << 13)
-#define CC2_TFRG (1 << 14)
-#define CC2_TUND (1 << 15)
-#define CC2_TOVR (1 << 16)
-#define CC2_TXCF (1 << 17)
-#define CC2_TFCS (1 << 18)
-#define CC2_TJBR (1 << 19)
-
-#define MASTER_TX_RX 	(1 << 0)
-#define SLAVE_TX_RX 	(1 << 1)
-#define MASTER_FETCH 	(1 << 2)
-#define SLAVE_CLEAR 	(1 << 3)
-#define ETHERNET_STATS 	(1 << 4)
-
-/*====================================================================*
- *   variables;
- *--------------------------------------------------------------------*/
-
-/*
- *  Station Statistics;
- */
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-typedef struct __packed station_stats
-
-{
-	uint8_t TEI;
-	uint8_t RESULT_CODE;
-	uint32_t UPSTREAM_MME_FRAMES;
-	uint32_t UPSTREAM_ETH_FRAMES_UNI;
-	uint32_t UPSTREAM_ETH_FRAMES_MULTI;
-	uint32_t UPSTREAM_ETH_FRAMES_BROAD;
-	uint32_t UPSTREAM_DROP_MME_FROM_HOST;
-	uint32_t UPSTREAM_DROP_MME_FW_GEN;
-	uint32_t UPSTREAM_DROP_ETH_FROM_HOST;
-	uint32_t DOWNSTREAM_MME_FRAMES;
-	uint32_t DOWNSTREAM_ETH_FRAMES_UNI;
-	uint32_t DOWNSTREAM_ETH_FRAMES_MULTI;
-	uint32_t DOWNSTREAM_ETH_FRAMES_BROAD;
-	uint32_t DOWNSTREAM_DROP_MME_FROM_HOST;
-	uint32_t DOWNSTREAM_DROP_MME_FW_GEN;
-	uint32_t DOWNSTREAM_DROP_ETH_FROM_HOST;
-}
-
-statistics;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-/*
- *  Ethernet Statistics;
- */
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-typedef struct __packed ethernet_stats
-
-{
-	uint16_t HW_MODULE_TYPE;
-	uint16_t HW_MODULE_STATS_LEN;
-	uint32_t TR64;
-	uint32_t TR127;
-	uint32_t TR255;
-	uint32_t TR511;
-	uint32_t TR1K;
-	uint32_t TRMAX;
-	uint32_t TRMGV;
-	uint32_t RBYT;
-	uint32_t RBKT;
-	uint32_t RFCS;
-	uint32_t RFCA;
-	uint32_t RBCA;
-	uint32_t RXCF;
-	uint32_t RXPF;
-	uint32_t RXUO;
-	uint32_t RALN;
-	uint32_t RFLR;
-	uint32_t RCDE;
-	uint32_t RCSE;
-	uint32_t RUND;
-	uint32_t ROVR;
-	uint32_t RFRG;
-	uint32_t RJBR;
-	uint32_t RDRP;
-	uint32_t TBYT;
-	uint32_t TPKT;
-	uint32_t TMCA;
-	uint32_t TBCA;
-	uint32_t TXPF;
-	uint32_t TDFR;
-	uint32_t TEDF;
-	uint32_t TSCL;
-	uint32_t TMCL;
-	uint32_t TLCL;
-	uint32_t TXCL;
-	uint32_t TNCL;
-	uint32_t TPFH;
-	uint32_t TDRP;
-	uint32_t TJBR;
-	uint32_t TFCS;
-	uint32_t TXCF;
-	uint32_t TOVR;
-	uint32_t TUND;
-	uint32_t TFRG;
-	uint32_t CARRY1;
-	uint32_t CARRY2;
-}
-
-ethernet_stats;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-/*
- *   Classification Counters
- */
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-typedef struct __packed class_counters
-
-{
-	uint16_t HW_MODULE_TYPE;
-	uint16_t HW_MODULE_STATS_LEN;
-	uint32_t IcvFailure;
-	uint32_t InvalidMacFrame;
-	uint32_t CorruptedMacFrameHeader;
-	uint32_t MacDaCompareRule;
-	uint32_t PriorityOrTHresholdLessWatermark;
-	uint32_t OversizePacket;
-	uint32_t Other;
-	uint32_t SA_Learning;
-}
-
-class_counters;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-/*====================================================================*
- *
- *   void StationStats (struct plc * plc, struct station_stats * stats);
- *
- *   display station statistics in human readable format; there may
- *   be one or more such functions depending on the audience; this
- *   output was designed by the Product Verification Team in Ocala;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void StationStats (struct plc * plc, struct station_stats * stats)
-
-{
-	fprintf (stderr, "TEI %d\n", stats->TEI);
-	fprintf (stderr, "ERR 0x%02X\n", stats->RESULT_CODE);
-	fprintf (stderr, "UPSTREAM_MME 0x%08X\n", stats->UPSTREAM_MME_FRAMES);
-	fprintf (stderr, "UPSTREAM_UNICAST 0x%08X\n", stats->UPSTREAM_ETH_FRAMES_UNI);
-	fprintf (stderr, "UPSTREAM_MULTICAST 0x%08X\n", stats->UPSTREAM_ETH_FRAMES_MULTI);
-	fprintf (stderr, "UPSTREAM_BROADCAST 0x%08X\n", stats->UPSTREAM_ETH_FRAMES_BROAD);
-	fprintf (stderr, "UPSTREAM_DROP_HOST_MME 0x%08X\n", stats->UPSTREAM_DROP_MME_FROM_HOST);
-	fprintf (stderr, "UPSTREAM_DROP_FW_MME 0x%08X\n", stats->UPSTREAM_DROP_MME_FW_GEN);
-	fprintf (stderr, "UPSTREAM_DROP_HOST_ETH 0x%08X\n", stats->UPSTREAM_DROP_ETH_FROM_HOST);
-	fprintf (stderr, "DOWNSTREAM_MME 0x%08X\n", stats->DOWNSTREAM_MME_FRAMES);
-	fprintf (stderr, "DOWNSTREAM_UNICAST 0x%08X\n", stats->DOWNSTREAM_ETH_FRAMES_UNI);
-	fprintf (stderr, "DOWNSTREAM_MULTICAST 0x%08X\n", stats->DOWNSTREAM_ETH_FRAMES_MULTI);
-	fprintf (stderr, "DOWNSTREAM_BROADCAST 0x%08X\n", stats->DOWNSTREAM_ETH_FRAMES_BROAD);
-	fprintf (stderr, "DOWNSTREAM_DROP_HOST_MME 0x%08X\n", stats->DOWNSTREAM_DROP_MME_FROM_HOST);
-	fprintf (stderr, "DOWNSTREAM_DROP_FW_MME 0x%08X\n", stats->DOWNSTREAM_DROP_MME_FW_GEN);
-	fprintf (stderr, "DOWNSTREAM_DROP_HOST_ETH 0x%08X\n", stats->DOWNSTREAM_DROP_ETH_FROM_HOST);
-	fprintf (stderr, "\n");
-	return;
-}
-
-/*====================================================================*
- *
- *   void EthernetStats (struct plc * plc, struct ethernet_stats * stats);
- *
- *
- *--------------------------------------------------------------------*/
-
-static void EthernetStats (struct plc * plc, struct ethernet_stats * stats)
-
-{
-	return;
-}
-
-/*====================================================================*
- *
- *   void ClassificationCounters (struct plc * plc, struct class_counters * counters);
- *
- *
- *--------------------------------------------------------------------*/
-
-#if 0
-
-static void ClassificationCounters (struct plc * plc, struct class_counters * counters)
-
-{
-	return;
-}
-
-#endif
-
-/*====================================================================*
- *
- *   signed MDUTrafficStats (struct plc * plc, uint8_t command, uint8_t session, uint8_t slave);
- *
- *   request MDU traffic statistics using one VS_MDU_TRAFFIC_STATS
- *   request type; different types of confirmations are returned
- *   depending on the type of request;
- *
- *
- *--------------------------------------------------------------------*/
-
-signed MDUTrafficStats (struct plc * plc, uint8_t command, uint8_t session, uint8_t slave)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_mdu_station_stats_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t COMMAND;
-		uint8_t SESSION;
-		uint32_t SLAVE_BITMAP [8];
-	}
-	* request = (struct vs_mdu_station_stats_request *) (message);
-	struct __packed vs_mdu_traffic_master_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t COMMAND;
-		uint8_t SESSION;
-		uint16_t RESERVED;
-		uint8_t NUM_SLAVES;
-		uint8_t NUM_SLAVES_LEFT;
-		uint16_t STATS_LEN;
-		struct station_stats STATS [1];
-	}
-	* master_confirm = (struct vs_mdu_traffic_master_confirm *) (message);
-	struct __packed vs_mdu_traffic_slave_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t COMMAND;
-		uint8_t SESSION;
-		uint16_t STATS_LEN;
-		struct station_stats STATS [1];
-	}
-	* slave_confirm = (struct vs_mdu_traffic_slave_confirm *) (message);
-
-#if 1
-
-	struct __packed vs_eth_hardware_stats_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t COMMAND;
-		uint8_t SESSION;
-		uint8_t CHIPTYPE;
-		uint8_t STATUS;
-		uint16_t STATS_LEN;
-		struct ethernet_stats STATS [1];
-	}
-	* ether_confirm = (struct vs_eth_hardware_stats_confirm *) (message);
-
-#endif
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Request MDU Traffic Statistics (1)");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MDU_TRAFFIC_STATS | MMTYPE_REQ));
-	request->COMMAND = command;
-	request->SESSION = session;
-	set32bitmap (request->SLAVE_BITMAP, slave);
-	plc->packetsize = sizeof (* request);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_MDU_TRAFFIC_STATS | MMTYPE_CNF)) > 0)
-	{
-		if ((request->COMMAND > 0x00) && (request->COMMAND < 0x0020))
-		{
-			struct station_stats * stats;
-			unsigned count;
-			if (_anyset (request->COMMAND, MASTER_TX_RX | SLAVE_TX_RX))
-			{
-				stats = master_confirm->STATS;
-				count = LE16TOH (master_confirm->STATS_LEN);
-			}
-			else
-			{
-				stats = slave_confirm->STATS;
-				count = LE16TOH (slave_confirm->STATS_LEN);
-			}
-			while (count >= sizeof (struct station_stats))
-			{
-				StationStats (plc, stats++);
-				count -= sizeof (struct station_stats);
-			}
-			continue;
-		}
-		if ((request->COMMAND >= 0x20) && (request->COMMAND < 0x24))
-		{
-			EthernetStats (plc, ether_confirm->STATS);
-			continue;
-		}
-		if ((request->COMMAND >= 0x24) && (request->COMMAND < 0x28))
-		{
-			EthernetStats (plc, ether_confirm->STATS);
-			continue;
-		}
-		if ((request->COMMAND >= 0x28) && (request->COMMAND < 0x32))
-		{
-			EthernetStats (plc, ether_confirm->STATS);
-			continue;
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/MMECode.c.html b/docbook/MMECode.c.html deleted file mode 100644 index 1860dc51..00000000 --- a/docbook/MMECode.c.html +++ /dev/null @@ -1,1556 +0,0 @@ - - - - - - MMECode.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   char const * MMECode (uint16_t MMTYPE, uint8_t MSTATUS)
- *
- *   mme.h
- *
- *   return text for a given message type and status code; search is
- *   performed using two nested binary searches;
- *
-D
- *   a given vendor specific status code may mean something different
- *   for each message type; this table maps message types and codes to
- *   strings; it is bulky but takes less space than many small tables;
- *   define MMEPASSFAIL as 0 to suppress the table without disturbing
- *   other code;
- *
- *   the bootloader and firmware share some message types but return
- *   different status codes for the same message type and error; two
- *   MMEs in particular, VS_WR_MEM and VS_ST_MAC are normally used
- *   only with the Bootloader and so we define SOFTLOADER as 1
- *   causing Bootloader/Softloader codes to replace the firmware
- *   codes;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MMECODE_SOURCE
-#define MMECODE_SOURCE
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../mme/mme.h"
-#include "../tools/symbol.h"
-#include "../tools/endian.h"
-
-#ifndef MMEPASSFAIL
-
-static struct mme_code
-
-{
-	uint16_t type;
-	uint8_t code;
-	char const * text;
-}
-
-mme_codes [] =
-
-{
-	{
-		0x8005,
-		0x01,
-		"Read Stopped"
-	},
-	{
-		0x8005,
-		0x03,
-		"Stopped with Valid Read"
-	},
-	{
-		0x8005,
-		0x05,
-		"Reached End"
-	},
-	{
-		0x8005,
-		0x07,
-		"Stopped, Valid Read, Reached End - All Done! Go Away!"
-	},
-	{
-		0x8005,
-		0x80,
-		"Invalid Index"
-	},
-	{
-		0x8005,
-		0x81,
-		"Invalid Word Count"
-	},
-	{
-		0x8005,
-		0x82,
-		"No Stop Before Read"
-	},
-	{
-		0x8005,
-		0x83,
-		"Invalid MME"
-	},
-
-#ifdef SOFTLOADER
-
-	{
-		0xA005,
-		0x14,
-		"Bad Checksum"
-	},
-	{
-		0xA005,
-		0x1C,
-		"Bad Length"
-	},
-	{
-		0xA005,
-		0x38,
-		"Bad Address"
-	},
-	{
-		0xA005,
-		0x3C,
-		"Bad Data Alignment"
-	},
-
-#else
-
-	{
-		0xA005,
-		0x10,
-		"Bad Address"
-	},
-	{
-		0xA005,
-		0x14,
-		"Bad Length"
-	},
-
-#endif
-
-	{
-		0xA009,
-		0x10,
-		"Bad Offset"
-	},
-	{
-		0xA009,
-		0x14,
-		"Bad Length"
-	},
-	{
-		0xA00D,
-		0x10,
-		"Bad Module ID"
-	},
-
-#ifdef SOFTLOADER
-
-	{
-		0xA00D,
-		0x14,
-		"Bad Image Checksum"
-	},
-	{
-		0xA00D,
-		0x1C,
-		"Bad Image Length"
-	},
-	{
-		0xA00D,
-		0x38,
-		"Bad Image Load Address"
-	},
-	{
-		0xA00D,
-		0x3C,
-		"Bad Data Alignment"
-	},
-	{
-		0xA00D,
-		0x40,
-		"Bad Start Address"
-	},
-
-#else
-
-	{
-		0xA00D,
-		0x38,
-		"Bad Command"
-	},
-	{
-		0xA00D,
-		0x40,
-		"Failed to Lock NVM"
-	},
-
-#endif
-
-	{
-		0xA011,
-		0x10,
-		"No Flash Memory"
-	},
-	{
-		0xA01D,
-		0x01,
-		"Device Failed to Reset"
-	},
-	{
-		0xA01D,
-		0x02,
-		"Device is Busy"
-	},
-	{
-		0xA021,
-		0x10,
-		"Bad Module"
-	},
-	{
-		0xA021,
-		0x12,
-		"Bad Length"
-	},
-	{
-		0xA021,
-		0x14,
-		"Bad Checksum"
-	},
-	{
-		0xA021,
-		0x20,
-		"Bad Offset"
-	},
-	{
-		0xA021,
-		0x40,
-		"Operation Blocked"
-	},
-	{
-		0xA021,
-		0x50,
-		"Fail to lock NVM"
-	},
-	{
-		0xA025,
-		0x10,
-		"Bad Module"
-	},
-	{
-		0xA025,
-		0x12,
-		"Bad Length"
-	},
-	{
-		0xA025,
-		0x14,
-		"Bad Checksum"
-	},
-	{
-		0xA025,
-		0x20,
-		"Unexpected Offset"
-	},
-	{
-		0xA025,
-		0x50,
-		"Fail to lock NVM"
-	},
-	{
-		0xA025,
-		0x58,
-		"DAK Mismatch"
-	},
-	{
-		0xA029,
-		0x10,
-		"Bad Module"
-	},
-	{
-		0xA029,
-		0x14,
-		"No Flash Memory"
-	},
-	{
-		0xA029,
-		0x18,
-		"Not enough NVRAM"
-	},
-	{
-		0xA029,
-		0x1C,
-		"Bad Header Checksum"
-	},
-	{
-		0xA029,
-		0x20,
-		"Bad Image Checksum"
-	},
-	{
-		0xA029,
-		0x24,
-		"Bad PIB"
-	},
-	{
-		0xA029,
-		0x28,
-		"Softloader Too Large"
-	},
-	{
-		0xA029,
-		0x2C,
-		"Firmware Too Large"
-	},
-	{
-		0xA029,
-		0x42,
-		"Firmware without PIB"
-	},
-	{
-		0xA029,
-		0x44,
-		"Bad PIB Checksum"
-	},
-	{
-		0xA029,
-		0x46,
-		"DAK Not Zero"
-	},
-	{
-		0xA029,
-		0x48,
-		"MAC Mismatch"
-	},
-	{
-		0xA029,
-		0x50,
-		"MFG HFID Mismatch"
-	},
-	{
-		0xA029,
-		0x52,
-		"Bad Bind Factory Defaults"
-	},
-	{
-		0xA029,
-		0x54,
-		"Bad Bind Template PIB"
-	},
-	{
-		0xA029,
-		0x56,
-		"Bad Bind Working PIB"
-	},
-	{
-		0xA029,
-		0x58,
-		"Error Computing PIB Checksum"
-	},
-	{
-		0xA029,
-		0x5A,
-		"Bad Bind Scratch PIB"
-	},
-	{
-		0xA029,
-		0x5C,
-		"No Firmware Version"
-	},
-	{
-		0xA029,
-		0x5E,
-		"Version Mismatch"
-	},
-	{
-		0xA029,
-		0x60,
-		"Bad 01PIB Checksum"
-	},
-	{
-		0xA029,
-		0x62,
-		"Bad 02PIB Checksum"
-	},
-	{
-		0xA029,
-		0x64,
-		"Bad WPIB Checksum"
-	},
-	{
-		0xA029,
-		0x66,
-		"Illegal Firmware Revision"
-	},
-	{
-		0xA031,
-		0x01,
-		"Bad Control"
-	},
-	{
-		0xA031,
-		0x02,
-		"Bad Direction"
-	},
-	{
-		0xA031,
-		0x10,
-		"Bad Link ID"
-	},
-	{
-		0xA031,
-		0x20,
-		"Bad MAC Address"
-	},
-	{
-		0xA035,
-		0x10,
-		"Bad Control"
-	},
-	{
-		0xA049,
-		0x20,
-		"Invalid Duration"
-	},
-	{
-		0xA049,
-		0x12,
-		"Invalid Length"
-	},
-	{
-		0xA049,
-		0x24,
-		"Already Set"
-	},
-	{
-		0xA051,
-		0x10,
-		"Bad PEKS"
-	},
-	{
-		0xA051,
-		0x11,
-		"Bad PIB"
-	},
-	{
-		0xA051,
-		0x12,
-		"Bad PEKS Encrypted Payload"
-	},
-	{
-		0xA051,
-		0x13,
-		"Remote Failure"
-	},
-	{
-		0xA051,
-		0x14,
-		"Bad Remote Response"
-	},
-	{
-		0xA051,
-		0x15,
-		"Remote Decryption Failed"
-	},
-	{
-		0xA059,
-		0x10,
-		"No Flash Memory"
-	},
-	{
-		0xA05D,
-		0x30,
-		"Bad Checksum"
-	},
-	{
-		0xA05D,
-		0x34,
-		"BIST Failed"
-	},
-	{
-		0xA065,
-		0x10,
-		"No Flash Memory"
-	},
-	{
-		0xA069,
-		0x01,
-		"Failed"
-	},
-	{
-		0xA069,
-		0x02,
-		"Not Supported"
-	},
-	{
-		0xA06D,
-		0x01,
-		"Bad Control"
-	},
-	{
-		0xA06D,
-		0x02,
-		"Success Write"
-	},
-	{
-		0xA06D,
-		0x03,
-		"Bad Write Parameter"
-	},
-	{
-		0xA071,
-		0x01,
-		"Bad MAC Address"
-	},
-	{
-		0xA071,
-		0x02,
-		"Bad TMSLOT"
-	},
-	{
-		0xA081,
-		0x10,
-		"Bad Module ID"
-	},
-	{
-		0xA081,
-		0x14,
-		"No Flash Memory"
-	},
-	{
-		0xA081,
-		0x18,
-		"Not Enough Flash Memory"
-	},
-	{
-		0xA081,
-		0x1C,
-		"Bad Image Header Checksum"
-	},
-	{
-		0xA081,
-		0x20,
-		"Bad Image Checksum"
-	},
-	{
-		0xA081,
-		0x24,
-		"Invalid PIB"
-	},
-	{
-		0xA081,
-		0x28,
-		"Softloader Too Large"
-	},
-	{
-		0xA081,
-		0x2C,
-		"Firmware File Too Large"
-	},
-	{
-		0xA081,
-		0x42,
-		"Firmware without PIB"
-	},
-	{
-		0xA081,
-		0x44,
-		"Bad PIB Checksum"
-	},
-	{
-		0xA081,
-		0x46,
-		"DAK Not Zero"
-	},
-	{
-		0xA081,
-		0x48,
-		"DAC Mismatch"
-	},
-	{
-		0xA081,
-		0x50,
-		"MFG HFID Mismatch"
-	},
-	{
-		0xA081,
-		0x52,
-		"Bad Bind Factory Defaults"
-	},
-	{
-		0xA081,
-		0x54,
-		"Bad Bind Template PIB"
-	},
-	{
-		0xA081,
-		0x56,
-		"Bad Bind Working PIB"
-	},
-	{
-		0xA081,
-		0x58,
-		"DAK Mismatch"
-	},
-	{
-		0xA081,
-		0x5A,
-		"Failed to Lock NVM"
-	},
-	{
-		0xA089,
-		0x01,
-		"Bad Control"
-	},
-	{
-		0xA089,
-		0x02,
-		"Bad Volatility"
-	},
-	{
-		0xA089,
-		0x03,
-		"Bad Classifier"
-	},
-	{
-		0xA089,
-		0x04,
-		"Classifier table full"
-	},
-	{
-		0xA089,
-		0x05,
-		"Classifier exists with different action"
-	},
-	{
-		0xA089,
-		0x06,
-		"Classifier not found"
-	},
-	{
-		0xA08D,
-		0x10,
-		"Refused"
-	},
-	{
-		0xA08D,
-		0x11,
-		"Refused"
-	},
-	{
-		0xA08F,
-		0x10,
-		"Error"
-	},
-	{
-		0xA091,
-		0x01,
-		"Unknown Peer Address"
-	},
-	{
-		0xA091,
-		0x02,
-		"Unknown Slot Number"
-	},
-	{
-		0xA099,
-		0x01,
-		"Destination Address Misaligned"
-	},
-	{
-		0xA099,
-		0x02,
-		"Entry Point Misaligned"
-	},
-	{
-		0xA099,
-		0x04,
-		"Entry Point Out-of-Bounds"
-	},
-	{
-		0xA099,
-		0x08,
-		"Bad Checksum"
-	},
-	{
-		0xA099,
-		0x10,
-		"Out of Memory"
-	},
-	{
-		0xA099,
-		0x20,
-		"Offset or Length Mismatch"
-	},
-	{
-		0xA099,
-		0x40,
-		"Memory not Operational"
-	},
-	{
-		0xA099,
-		0x80,
-		"Bad Length"
-	},
-	{
-		0xA0B1,
-		0x10,
-		"Invalid Number of Module Operations"
-	},
-	{
-		0xA0B1,
-		0x11,
-		"Invalid Module Operation ID"
-	},
-	{
-		0xA0B1,
-		0x12,
-		"Invalid Session ID"
-	},
-	{
-		0xA0B1,
-		0x13,
-		"Invalid Num Module Operation Specific Data"
-	},
-	{
-		0xA0B1,
-		0x14,
-		"Module ID not found"
-	},
-	{
-		0xA0B1,
-		0x15,
-		"Invalid Module Length"
-	},
-	{
-		0xA0B1,
-		0x16,
-		"Invalid Module Index"
-	},
-	{
-		0xA0B1,
-		0x17,
-		"Invalid Data Length"
-	},
-	{
-		0xA0B1,
-		0x18,
-		"Unexpected Offset"
-	},
-	{
-		0xA0B1,
-		0x19,
-		"Invalid Commit Action Code"
-	},
-	{
-		0xA0B1,
-		0x1A,
-		"Operation Block by previous Commit"
-	},
-	{
-		0xA0B1,
-		0x1B,
-		"Duplicate ModuleID/SubID"
-	},
-	{
-		0xA0B1,
-		0x1C,
-		"Invalid ModuleID/SubID"
-	},
-	{
-		0xA0B1,
-		0x20,
-		"No Flash Memory"
-	},
-	{
-		0xA0B1,
-		0x21,
-		"Not Enough Flash Memory"
-	},
-	{
-		0xA0B1,
-		0x22,
-		"Unsupported Flash memory Type"
-	},
-	{
-		0xA0B1,
-		0x23,
-		"Can't Lock Flash Memory"
-	},
-	{
-		0xA0B1,
-		0x24,
-		"Can't Write Flash Memory"
-	},
-	{
-		0xA0B1,
-		0x30,
-		"Bad Module Checksum"
-	},
-	{
-		0xA0B1,
-		0x31,
-		"Individual Module Error"
-	},
-	{
-		0xA0B1,
-		0x32,
-		"Module not available in NVM or Memory"
-	},
-	{
-		0xA0B1,
-		0x40,
-		"Invalid Header Checksum"
-	},
-	{
-		0xA0B1,
-		0x41,
-		"Invalid Firmware Image Checksum"
-	},
-	{
-		0xA0B1,
-		0x42,
-		"Softloader Image is Too Large"
-	},
-	{
-		0xA0B1,
-		0x43,
-		"Firmware Image is Too Large"
-	},
-	{
-		0xA0B1,
-		0x44,
-		"Invalid PIB Checksum"
-	},
-	{
-		0xA0B1,
-		0x45,
-		"No Firmware Version"
-	},
-	{
-		0xA0B1,
-		0x46,
-		"FW Commit but no PIB"
-	},
-	{
-		0xA0B1,
-		0x47,
-		"Major Version Mismatch"
-	},
-	{
-		0xA0B1,
-		0x48,
-		"Minor Version Mismatch"
-	},
-	{
-		0xA0B1,
-		0x50,
-		"Invalid PIB"
-	},
-	{
-		0xA0B1,
-		0x51,
-		"DAK Not Zero"
-	},
-	{
-		0xA0B1,
-		0x52,
-		"MAC Mismatch"
-	},
-	{
-		0xA0B1,
-		0x53,
-		"DAK Mismatch"
-	},
-	{
-		0xA0B1,
-		0x54,
-		"Manufacturer HFID Mismatch"
-	},
-	{
-		0xA0B1,
-		0x55,
-		"Bad Bind to Factory Default PIB"
-	},
-	{
-		0xA0B1,
-		0x56,
-		"Bad Bind to Template PIB"
-	},
-	{
-		0xA0B1,
-		0x57,
-		"Bad Bind to Working PIB"
-	},
-	{
-		0xA0B1,
-		0x58,
-		"Bad Bind Scratch PIB"
-	},
-	{
-		0xA0B1,
-		0x59,
-		"Error Generating Checksum Scratch PIB"
-	},
-	{
-		0xA0B1,
-		0x5A,
-		"Checksum Error O1 PIB"
-	},
-	{
-		0xA0B1,
-		0x5B,
-		"Checksum Error O2 PIB"
-	},
-	{
-		0xA0B1,
-		0x5C,
-		"Checksum Error Working PIB"
-	},
-	{
-		0xA0B1,
-		0x61,
-		"Unexpected Module Operation"
-	},
-	{
-		0xA0B1,
-		0x62,
-		"Not Enough Resources"
-	},
-	{
-		0xA0B1,
-		0x63,
-		"Received Module Data Out of Order"
-	},
-	{
-		0xA0B1,
-		0x64,
-		"No PIB Version"
-	},
-	{
-		0xA0B1,
-		0x70,
-		"Module Length Mismatch with Module Info"
-	},
-	{
-		0xA0B1,
-		0x71,
-		"No NVM Softloader Present in Flash Memory"
-	},
-	{
-		0xA0C1,
-		0x03,
-		"Invalid Classifier"
-	},
-	{
-		0xA0C1,
-		0x04,
-		"Already too many Classifiers"
-	},
-	{
-		0xA0C1,
-		0x05,
-		"Classifier exists with different Classification Action"
-	},
-	{
-		0xA0C1,
-		0x07,
-		"Link Already in Progress"
-	},
-	{
-		0xA0C1,
-		0x08,
-		"Invalid Configuration"
-	},
-	{
-		0xA0C1,
-		0x10,
-		"Invalid CSPEC Version"
-	},
-	{
-		0xA0C1,
-		0x11,
-		"Invalid CSPEC"
-	},
-	{
-		0xA0C1,
-		0x20,
-		"Out of Local Resources"
-	},
-	{
-		0xA0C1,
-		0x30,
-		"Invalid Peer"
-	},
-	{
-		0xA0C1,
-		0x31,
-		"Peer Confirm Timed out"
-	},
-	{
-		0xA0C1,
-		0x40,
-		"Peer rejection"
-	},
-	{
-		0xA0C5,
-		0x01,
-		"Invalid Modification Control"
-	},
-	{
-		0xA0C5,
-		0x06,
-		"CID Not Found"
-	},
-	{
-		0xA0C5,
-		0x07,
-		"Link Update in Progress, try again later"
-	},
-	{
-		0xA0C9,
-		0x06,
-		"CID Not Found"
-	},
-	{
-		0xA0C9,
-		0x07,
-		"Link Update in Progress. Try again later"
-	},
-	{
-		0xA0C9,
-		0x31,
-		"Peer Confirm Timed out"
-	},
-	{
-		0xA0CD,
-		0x01,
-		"Invalid Request Type"
-	},
-	{
-		0xA0CD,
-		0x04,
-		"Too Many Requests",
-	},
-	{
-		0xA0CD,
-		0x06,
-		"CID Not Found"
-	},
-	{
-		0xA0CD,
-		0x10,
-		"Invalid CSPEC Version"
-	},
-	{
-		0xA0CD,
-		0x31,
-		"Peer Confirm Timed out"
-	},
-	{
-		0xA0D1,
-		0x01,
-		"Unsupported"
-	},
-	{
-		0xA0D1,
-		0x02,
-		"Process Failed"
-	},
-	{
-		0xA0D1,
-		0x02,
-		"Process Failed"
-	},
-	{
-		0xA0D9,
-		0x01,
-		"Bad VersionID or InfoID"
-	},
-	{
-		0xA0DD,
-		0x01,
-		"No Enumeration Table"
-	},
-	{
-		0xA0F5,
-		0x01,
-		"Bad Request Type"
-	},
-	{
-		0xA0F5,
-		0x02,
-		"FMI Not Zero"
-	},
-	{
-		0xA0F5,
-		0x03,
-		"Invalid Command"
-	},
-	{
-		0xA0F5,
-		0x04,
-		"Bad Index"
-	},
-	{
-		0xA0F5,
-		0x05,
-		"Bad Value Count"
-	},
-	{
-		0xA0F5,
-		0x06,
-		"Capture Already Started"
-	},
-	{
-		0xA0F5,
-		0x07,
-		"Data Invalid"
-	},
-	{
-		0xA0F5,
-		0x08,
-		"Bad Gain Value"
-	},
-	{
-		0xA0F5,
-		0x10,
-		"Bad MAC Address"
-	},
-	{
-		0xA0F5,
-		0x11,
-		"Bad Tone Map Index"
-	},
-	{
-		0xA0F5,
-		0x12,
-		"Capture Failed"
-	},
-	{
-		0xA0F5,
-		0x13,
-		"No Data Available"
-	},
-	{
-		0xA0F9,
-		0x01,
-		"Get Property Failure"
-	},
-	{
-		0xA0F9,
-		0x02,
-		"Unsupported Property"
-	},
-	{
-		0xA0F9,
-		0x03,
-		"Unsupported Property Version"
-	},
-	{
-		0xA101,
-		0x01,
-		"Set Property Failure"
-	},
-	{
-		0xA101,
-		0x02,
-		"Unsupported Property"
-	},
-	{
-		0xA101,
-		0x03,
-		"Unsupported Property Version"
-	},
-	{
-		0xA101,
-		0x04,
-		"Property Not Persistent"
-	},
-	{
-		0xA101,
-		0x05,
-		"Flash Memory Failure"
-	},
-	{
-		0xA101,
-		0x06,
-		"Bad Option for Supported Property"
-	},
-	{
-		0xA101,
-		0x07,
-		"Invalid Property Data"
-	},
-	{
-		0xA101,
-		0x08,
-		"Bad Property Data Length"
-	},
-	{
-		0xA105,
-		0x01,
-		"Buffer Not Available"
-	},
-	{
-		0xA109,
-		0x01,
-		"No Flash Memory"
-	},
-	{
-		0xA109,
-		0x02,
-		"Invalid Flash Sector"
-	},
-	{
-		0xA109,
-		0x03,
-		"Current DAK Mismatch"
-	},
-	{
-		0xA109,
-		0x04,
-		"Flash is Busy"
-	},
-	{
-		0xA109,
-		0x05,
-		"No Access to Flash"
-	},
-	{
-		0xA109,
-		0x06,
-		"Unsupported Chip"
-	},
-	{
-		0xA109,
-		0x07,
-		"Unspecified Error"
-	},
-	{
-		0xA10D,
-		0x01,
-		"Option Not Supported"
-	},
-	{
-		0xA10D,
-		0x02,
-		"No Flash Memory"
-	},
-	{
-		0xA10D,
-		0x03,
-		"Pending Self Test"
-	},
-	{
-		0xA10D,
-		0x04,
-		"Flash Activity Conflict"
-	},
-	{
-		0xA10D,
-		0x05,
-		"Bad Parameter"
-	},
-	{
-		0xA111,
-		0x01,
-		"Option Not Supported"
-	},
-	{
-		0xA111,
-		0x02,
-		"Self Test Finished"
-	},
-	{
-		0xA111,
-		0x03,
-		"Self Test Pending"
-	},
-	{
-		0xA111,
-		0x04,
-		"Self Test In Progress"
-	},
-	{
-		0xA111,
-		0x05,
-		"Self Test No Result"
-	},
-	{
-		0xA111,
-		0x06,
-		"Self Test Aborted"
-	},
-	{
-		0xA111,
-		0x07,
-		"No Flash Memory"
-	},
-	{
-		0xA115,
-		0x01,
-		"Interface Not Supported"
-	},
-	{
-		0xA115,
-		0x02,
-		"Slave Not Found"
-	},
-	{
-		0xA115,
-		0x03,
-		"Wrong Parameter"
-	},
-	{
-		0xA119,
-		0x01,
-		"Bad Version"
-	},
-	{
-		0xA119,
-		0x02,
-		"Bad Argument"
-	},
-	{
-		0xA119,
-		0x03,
-		"Too Many Slaves"
-	},
-	{
-		0xA119,
-		0x04,
-		"Too Many VLAN IDs"
-	},
-	{
-		0xA119,
-		0x05,
-		"No Such Slave"
-	},
-	{
-		0xA119,
-		0x06,
-		"Flash Operation Blocked"
-	},
-	{
-		0xA119,
-		0x07,
-		"Unsupported Operation"
-	},
-	{
-		0xA119,
-		0x08,
-		"Flash Activity Conflict"
-	},
-	{
-		0xA119,
-		0x09,
-		"Table Busy"
-	},
-	{
-		0xA119,
-		0x0A,
-		"One Slave Has Duplicate VLAN ID"
-	},
-	{
-		0xA119,
-		0x0B,
-		"Multiple Slaves Have Same VLAN ID"
-	},
-	{
-		0xA119,
-		0x0C,
-		"Multiple Configurations for One Slave"
-	},
-	{
-		0xA119,
-		0x0D,
-		"Can't set VLAN ID for Local Station"
-	},
-	{
-		0xA119,
-		0x0E,
-		"Bad Data Offset"
-	},
-	{
-		0xA119,
-		0x0F,
-		"Bad Data Length"
-	},
-	{
-		0xA119,
-		0x10,
-		"VLAN ID Has Been Configured"
-	},
-	{
-		0xA119,
-		0x11,
-		"Bad MME Source"
-	},
-	{
-		0xA119,
-		0x12,
-		"VLAN ID out of range"
-	},
-	{
-		0xA119,
-		0x13,
-		"Cannot remove nonexistent VLAN ID"
-	},
-	{
-		0xA149,
-		0x1,
-		"Invalid Key Length"
-	},
-	{
-		0xA149,
-		0x2,
-		"Invalid Key"
-	},
-	{
-		0xA149,
-		0x3,
-		"Invalid Access Type"
-	},
-	{
-		0xA149,
-		0x4,
-		"Invalid Level Control"
-	}
-};
-
-#endif
-
-char const * MMECode (uint16_t MMTYPE, uint8_t MSTATUS)
-
-{
-
-#ifndef MMEPASSFAIL
-
-	size_t lower = 0;
-	size_t upper = SIZEOF (mme_codes);
-	MMTYPE = LE16TOH (MMTYPE);
-	while (lower < upper)
-	{
-		size_t index = (lower + upper) >> 1;
-		signed order = MMTYPE - mme_codes [index].type;
-		if (order < 0)
-		{
-			upper = index - 0;
-			continue;
-		}
-		if (order > 0)
-		{
-			lower = index + 1;
-			continue;
-		}
-		for (lower = index; lower > 0; lower--)
-		{
-			if (mme_codes [lower - 1].type != mme_codes [index].type)
-			{
-				break;
-			}
-		}
-		for (upper = index; upper < SIZEOF (mme_codes); upper++)
-		{
-			if (mme_codes [upper + 0].type != mme_codes [index].type)
-			{
-				break;
-			}
-		}
-		while (lower < upper)
-		{
-			index = (lower + upper) >> 1;
-			order = MSTATUS - mme_codes [index].code;
-			if (order < 0)
-			{
-				upper = index - 0;
-				continue;
-			}
-			if (order > 0)
-			{
-				lower = index + 1;
-				continue;
-			}
-			return (mme_codes [index].text);
-		}
-	}
-
-#endif
-
-	return ((MSTATUS)? ("Failure"):("Success"));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/MMEMode.c.html b/docbook/MMEMode.c.html deleted file mode 100644 index dec62679..00000000 --- a/docbook/MMEMode.c.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - MMEMode.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   char const * MMEMode (uint16_t MMTYPE);
- *
- *   mme.h
- *
- *   Return the mneumoic associates with a HomePlug AV MME mode; All
- *   HomePlug AV message types permit four variants, as follows, but
- *   not all messages implement all four.
- *
- *      REQ unsolicited request from host to device;
- *      CNF solicited response from device to host;
- *      IND unsolicited request from device to host;
- *      RSP solicited responds from host to device;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MMEMODE_SOURCE
-#define MMEMODE_SOURCE
-
-#include <stdint.h>
-
-#include "../mme/mme.h"
-
-static char const * mme_modes [] =
-
-{
-	"REQ",
-	"CNF",
-	"IND",
-	"RSP"
-};
-
-char const *MMEMode (uint16_t MMTYPE)
-
-{
-	return (mme_modes [MMTYPE & MMTYPE_MODE]);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/MMEName.c.html b/docbook/MMEName.c.html deleted file mode 100644 index b5c31b8c..00000000 --- a/docbook/MMEName.c.html +++ /dev/null @@ -1,682 +0,0 @@ - - - - - - MMEName.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   char const * MMEName (uint16_t MMTYPE);
- *
- *   mme.h
- *
- *   Return HomePlug or Atheros Management Message name for a given
- *   MMTYPE; this function is not needed but it could be useful when
- *   developing and debugging applications;
- *
- *   If you add or remove items in this list then update constant
- *   MMTYPES to reflect the number of list members;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MMENAME_SOURCE
-#define MMENAME_SOURCE
-
-#include "../mme/mme.h"
-
-static const struct mme_name
-
-{
-	uint16_t type;
-	char const * name;
-}
-
-mme_names [] =
-
-{
-
-	{
-		CC_CCO_APPOINT,
-		"CC_CCO_APPOINT"
-	},
-	{
-		CC_BACKUP_APPOINT,
-		"CC_BACKUP_APPOINT"
-	},
-	{
-		CC_LINK_INFO,
-		"CC_LINK_INFO"
-	},
-	{
-		CC_HANDOVER,
-		"CC_HANDOVER"
-	},
-	{
-		CC_HANDOVER_INFO,
-		"CC_HANDOVER_INFO"
-	},
-	{
-		CC_DISCOVER_LIST,
-		"CC_DISCOVER_LIST"
-	},
-	{
-		CC_LINK_NEW,
-		"CC_LINK_NEW"
-	},
-	{
-		CC_LINK_MOD,
-		"CC_LINK_MOD"
-	},
-	{
-		CC_LINK_SQZ,
-		"CC_LINK_SQZ"
-	},
-	{
-		CC_LINK_REL,
-		"CC_LINK_REL"
-	},
-	{
-		CC_DETECT_REPORT,
-		"CC_DETECT_REPORT"
-	},
-	{
-		CC_WHO_RU,
-		"CC_WHO_RU"
-	},
-	{
-		CC_ASSOC,
-		"CC_ASSOC"
-	},
-	{
-		CC_LEAVE,
-		"CC_LEAVE"
-	},
-	{
-		CC_SET_TEI_MAP,
-		"CC_SET_TEI_MAP"
-	},
-	{
-		CC_RELAY,
-		"CC_RELAY"
-	},
-	{
-		CC_BEACON_RELIABILITY,
-		"CC_BEACON_RELIABILITY"
-	},
-	{
-		CC_ALLOC_MOVE,
-		"CC_ALLOC_MOVE"
-	},
-	{
-		CC_ACCESS_NEW,
-		"CC_ACCESS_NEW"
-	},
-	{
-		CC_ACCESS_REL,
-		"CC_ACCESS_REL"
-	},
-	{
-		CC_DCPPC,
-		"CC_DCPPC"
-	},
-	{
-		CC_HP1_DET,
-		"CC_HP1_DET"
-	},
-	{
-		CC_BLE_UPDATE,
-		"CC_BLE_UPDATE"
-	},
-	{
-		CP_PROXY_APPOINT,
-		"CP_PROXY_APPOINT"
-	},
-	{
-		PH_PROXY_APPOINT,
-		"PH_PROXY_APPOINT"
-	},
-	{
-		CP_PROXY_WAKE,
-		"CP_PROXY_WAKE"
-	},
-	{
-		NN_INL,
-		"NN_INL"
-	},
-	{
-		NN_NEW_NET,
-		"NN_NEW_NET"
-	},
-	{
-		NN_ADD_ALLOC,
-		"NN_ADD_ALLOC"
-	},
-	{
-		NN_REL_ALLOC,
-		"NN_REL_ALLOC"
-	},
-	{
-		NN_REL_NET,
-		"NN_REL_NET"
-	},
-	{
-		CM_ASSOCIATED_STA,
-		"CM_ASSOCIATED_STA"
-	},
-	{
-		CM_ENCRYPTED_PAYLOAD,
-		"CM_ENCRYPTED_PAYLOAD"
-	},
-	{
-		CM_SET_KEY,
-		"CM_SET_KEY"
-	},
-	{
-		CM_GET_KEY,
-		"CM_GET_KEY"
-	},
-	{
-		CM_SC_JOIN,
-		"CM_SC_JOIN"
-	},
-	{
-		CM_CHAN_EST,
-		"CM_CHAN_EST"
-	},
-	{
-		CM_TM_UPDATE,
-		"CM_TM_UPDATE"
-	},
-	{
-		CM_AMP_MAP,
-		"CM_AMP_MAP"
-	},
-	{
-		CM_BRG_INFO,
-		"CM_BRG_INFO"
-	},
-	{
-		CM_CONN_NEW,
-		"CM_CONN_NEW"
-	},
-	{
-		CM_CONN_REL,
-		"CM_CONN_REL"
-	},
-	{
-		CM_CONN_MOD,
-		"CM_CONN_MOD"
-	},
-	{
-		CM_CONN_INFO,
-		"CM_CONN_INFO"
-	},
-	{
-		CM_STA_CAP,
-		"CM_STA_CAP"
-	},
-	{
-		CM_NW_INFO,
-		"CM_NW_INFO"
-	},
-	{
-		CM_GET_BEACON,
-		"CM_GET_BEACON"
-	},
-	{
-		CM_HFID,
-		"CM_HFID"
-	},
-	{
-		CM_MME_ERROR,
-		"CM_MME_ERROR"
-	},
-	{
-		CM_NW_STATS,
-		"CM_NW_STATS"
-	},
-	{
-		CM_SLAC_PARAM,
-		"CM_SLAC_PARAM"
-	},
-	{
-		CM_START_ATTEN_CHAR,
-		"CM_START_ATTEN_CHAR"
-	},
-	{
-		CM_ATTEN_CHAR,
-		"CM_ATTEN_CHAR"
-	},
-	{
-		CM_PKCS_CERT,
-		"CM_PKCS_CERT"
-	},
-	{
-		CM_MNBC_SOUND,
-		"CM_MNBC_SOUND"
-	},
-	{
-		CM_VALIDATE,
-		"CM_VALIDATE"
-	},
-	{
-		CM_SLAC_MATCH,
-		"CM_SLAC_MATCH"
-	},
-	{
-		CM_SLAC_USER_DATA,
-		"CM_SLAC_USER_DATA"
-	},
-	{
-		CM_ATTEN_PROFILE,
-		"CM_ATTEN_PROFILE"
-	},
-	{
-		MS_PB_ENC,
-		"MS_PB_ENC"
-	},
-	{
-		VS_SW_VER,
-		"VS_SW_VER"
-	},
-	{
-		VS_WR_MEM,
-		"VS_WR_MEM"
-	},
-	{
-		VS_RD_MEM,
-		"VS_RD_MEM"
-	},
-	{
-		VS_ST_MAC,
-		"VS_ST_MAC"
-	},
-	{
-		VS_GET_NVM,
-		"VS_GET_NVM"
-	},
-	{
-		0xA028,
-		"RESERVED"
-	},
-	{
-		0xA02C,
-		"RESERVED"
-	},
-	{
-		VS_RS_DEV,
-		"VS_RS_DEV"
-	},
-	{
-		VS_WR_MOD,
-		"VS_WR_MOD"
-	},
-	{
-		VS_RD_MOD,
-		"VS_RD_MOD"
-	},
-	{
-		VS_MOD_NVM,
-		"VS_MOD_NVM"
-	},
-	{
-		VS_WD_RPT,
-		"VS_WD_RPT"
-	},
-	{
-		VS_LNK_STATS,
-		"VS_LNK_STATS"
-	},
-	{
-		VS_SNIFFER,
-		"VS_SNIFFER"
-	},
-	{
-		VS_NW_INFO,
-		"VS_NW_INFO"
-	},
-	{
-		0xA03C,
-		"RESERVED"
-	},
-	{
-		VS_CP_RPT,
-		"VS_CP_RPT"
-	},
-	{
-		VS_ARPC,
-		"VS_ARPC"
-	},
-	{
-		VS_SET_KEY,
-		"VS_SET_KEY"
-	},
-	{
-		VS_MFG_STRING,
-		"VS_MFG_STRING"
-	},
-	{
-		VS_RD_CBLOCK,
-		"VS_RD_CBLOCK"
-	},
-	{
-		VS_SET_SDRAM,
-		"VS_SET_SDRAM"
-	},
-	{
-		VS_HOST_ACTION,
-		"VS_HOST_ACTION"
-	},
-	{
-		VS_OP_ATTRIBUTES,
-		"VS_OP_ATTRIBUTES"
-	},
-	{
-		VS_ENET_SETTINGS,
-		"VS_ENET_SETTINGS"
-	},
-	{
-		VS_TONE_MAP_CHAR,
-		"VS_TONE_MAP_CHAR"
-	},
-	{
-		VS_NW_INFO_STATS,
-		"VS_NW_INFO_STATS"
-	},
-	{
-		VS_SLAVE_MEM,
-		"VS_SLAVE_MEM"
-	},
-	{
-		VS_FAC_DEFAULTS,
-		"VS_FAC_DEFAULTS"
-	},
-	{
-		VS_CLASSIFICATION,
-		"VS_CLASSIFICATION"
-	},
-	{
-		VS_RX_TONE_MAP_CHAR,
-		"VS_RX_TONE_MAP_CHAR"
-	},
-	{
-		VS_SET_LED_BEHAVIOR,
-		"VS_SET_LED_BEHAVIOR"
-	},
-	{
-		VS_WRITE_AND_EXECUTE_APPLET,
-		"VS_WRITE_AND_EXECUTE_APPLET"
-	},
-	{
-		VS_MDIO_COMMAND,
-		"VS_MDIO_COMMAND"
-	},
-	{
-		VS_SLAVE_REG,
-		"VS_SLAVE_REG"
-	},
-	{
-		VS_BANDWIDTH_LIMITING,
-		"VS_BANDWIDTH_LIMITING"
-	},
-	{
-		VS_SNID_OPERATION,
-		"VS_SNID_OPERATION"
-	},
-	{
-		VS_NN_MITIGATE,
-		"VS_NN_MITIGATE"
-	},
-	{
-		VS_MODULE_OPERATION,
-		"VS_MODULE_OPERATION"
-	},
-	{
-		VS_DIAG_NETWORK_PROBE,
-		"VS_DIAG_NETWORK_PROBE"
-	},
-	{
-		VS_PL_LINK_STATUS,
-		"VS_PL_LINK_STATUS"
-	},
-	{
-		VS_GPIO_STATE_CHANGE,
-		"VS_GPIO_STATE_CHANGE"
-	},
-	{
-		VS_CONN_ADD,
-		"VS_CONN_ADD"
-	},
-	{
-		VS_CONN_MOD,
-		"VS_CONN_MOD"
-	},
-	{
-		VS_CONN_REL,
-		"VS_CONN_REL"
-	},
-	{
-		VS_CONN_INFO,
-		"VS_CONN_INFO"
-	},
-	{
-		VS_MULTIPORT_LNK_STA,
-		"VS_MULTIPORT_LNK_STA"
-	},
-	{
-		VS_EM_ID_TABLE,
-		"VS_EM_ID_TABLE"
-	},
-	{
-		VS_STANDBY,
-		"VS_STANDBY"
-	},
-	{
-		VS_SLEEPSCHEDULE,
-		"VS_SLEEPSCHEDULE"
-	},
-	{
-		VS_SLEEPSCHEDULE_NOTIFICATION,
-		"VS_SLEEPSCHEDULE_NOTIFICATION"
-	},
-	{
-		0xA0EC,
-		"RESERVED"
-	},
-	{
-		VS_MICROCONTROLLER_DIAG,
-		"VS_MICROCONTROLLER_DIAG"
-	},
-	{
-		VS_GET_PROPERTY,
-		"VS_GET_PROPERTY"
-	},
-	{
-		0xA0FC,
-		"RESERVED"
-	},
-	{
-		VS_SET_PROPERTY,
-		"VS_SET_PROPERTY"
-	},
-	{
-		VS_PHYSWITCH_MDIO,
-		"VS_PHYSWITCH_MDIO"
-	},
-	{
-		VS_SELFTEST_ONETIME_CONFIG,
-		"VS_SELFTEST_ONETIME_CONFIG"
-	},
-	{
-		VS_SELFTEST_RESULTS,
-		"VS_SELFTEST_RESULTS"
-	},
-	{
-		VS_MDU_TRAFFIC_STATS,
-		"VS_MDU_TRAFFIC_STATS"
-	},
-	{
-		VS_FORWARD_CONFIG,
-		"VS_FORWARD_CONFIG"
-	},
-	{
-		0xA11C,
-		"RESERVED"
-	},
-	{
-		VS_HYBRID_INFO,
-		"VS_HYBRID_INFO"
-	}
-
-};
-
-char const * MMEName (uint16_t MMTYPE)
-
-{
-	size_t lower = 0;
-	size_t upper = SIZEOF (mme_names);
-	MMTYPE &= MMTYPE_MASK;
-	while (lower < upper)
-	{
-		size_t index = (lower + upper) >> 1;
-		signed order = MMTYPE - mme_names [index].type;
-		if (order < 0)
-		{
-			upper = index - 0;
-			continue;
-		}
-		if (order > 0)
-		{
-			lower = index + 1;
-			continue;
-		}
-		return (mme_names [index].name);
-	}
-	return ("UNKNOWN_MESSAGE_TYPE");
-}
-
-/*====================================================================*
- *   print a multi-column list of MME codes and names on stdout;
- *--------------------------------------------------------------------*/
-
-#if 0
-#include <stdio.h>
-
-#define COLS 4
-#define WIDTH 20
-
-int main (int argc, char const * argv [])
-
-{
-	unsigned cols = COLS;
-	unsigned rows = ((SIZEOF (mme_names) + (COLS - 1)) / cols);
-	unsigned row = 0;
-	unsigned mme = 0;
-	for (row = 0; row < rows; row++)
-	{
-		for (mme = row; mme < SIZEOF (mme_names); mme += rows)
-		{
-			printf ("%04X %-*.*s ", mme_names [mme].type, WIDTH, WIDTH, mme_names [mme].name);
-		}
-		printf ("\n");
-	}
-	return (0);
-}
-
-#endif
-
-/*====================================================================*
- *   print a multi-column list of MME codes and names on stdout;
- *--------------------------------------------------------------------*/
-
-#if 0
-#include <stdio.h>
-
-int main (int argc, char const * argv [])
-
-{
-	unsigned mme = 0;
-	for (mme = 0; mme < SIZEOF (mme_names); mme++)
-	{
-		printf ("{ %s, \"%s\" },",  mme_names [mme].name, mme_names [mme].name);
-//		printf ("0x%04X;%s;yes;yes;yes\n", mme_names [mme].type, mme_names [mme].name);
-	}
-	return (0);
-}
-
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/MMEPeek.c.html b/docbook/MMEPeek.c.html deleted file mode 100644 index d2088ee1..00000000 --- a/docbook/MMEPeek.c.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - MMEPeek.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void MMEPeek (void const * memory, size_t length, FILE *fp);
- *
- *   mme.h
- *
- *   print a HomePlug AV frame header on stdout in human readable
- *   format;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MMPEEK_SOURCE
-#define MMPEEK_SOURCE
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../tools/memory.h"
-#include "../mme/mme.h"
-
-#ifndef ETHER_ADDR_LEN
-#define ETHER_ADDR_LEN 6 /* normally defined in ethernet.h or if_ether.h */
-#endif
-
-void MMEPeek (void const * memory, size_t extent, FILE *fp)
-
-{
-	char address [ETHER_ADDR_LEN * 3];
-	struct message * message = (struct message *)(memory);
-	fprintf (fp, "ODA=%s ", hexstring (address, sizeof (address), message->ethernet.ODA, sizeof (message->ethernet.ODA)));
-	fprintf (fp, "OSA=%s ", hexstring (address, sizeof (address), message->ethernet.OSA, sizeof (message->ethernet.OSA)));
-	fprintf (fp, "MTYPE=%04X ", ntohs (message->ethernet.MTYPE));
-	if (ntohs (message->ethernet.MTYPE) == ETH_P_HPAV)
-	{
-		struct homeplug_hdr * homeplug = (struct homeplug_hdr *)(&message->content);
-		uint16_t mmtype = LE16TOH (homeplug->MMTYPE);
-		if (mmtype < MMTYPE_VS)
-		{
-			if (homeplug->MMV == 0x00)
-			{
-				struct homeplug_hdr * homeplug = (struct homeplug_hdr *)(&message->content);
-				mmtype = LE16TOH (homeplug->MMTYPE);
-				fprintf (fp, "MMV=%02X ", homeplug->MMV);
-				fprintf (fp, "MMTYPE=%04X ", mmtype);
-				fprintf (fp, "%s.%s\n", MMEName (mmtype), MMEMode (mmtype));
-				return;
-			}
-			if (homeplug->MMV == 0x01)
-			{
-				struct homeplug_fmi * homeplug = (struct homeplug_fmi *)(&message->content);
-				mmtype = LE16TOH (homeplug->MMTYPE);
-				fprintf (fp, "MMV=%02X ", homeplug->MMV);
-				fprintf (fp, "MMTYPE=%04X ", mmtype);
-				fprintf (fp, "FMID=%02X ", homeplug->FMID);
-				fprintf (fp, "FMSN=%02X ", homeplug->FMSN);
-				fprintf (fp, "%s.%s\n", MMEName (mmtype), MMEMode (mmtype));
-				return;
-			}
-		}
-		if (mmtype < MMTYPE_XX)
-		{
-			if (homeplug->MMV == 0x00)
-			{
-				struct qualcomm_hdr * qualcomm = (struct qualcomm_hdr *)(&message->content);
-				mmtype = LE16TOH (qualcomm->MMTYPE);
-				fprintf (fp, "MMV=%02X ", qualcomm->MMV);
-				fprintf (fp, "MMTYPE=%04X ", mmtype);
-				fprintf (fp, "OUI=%s ", hexstring (address, sizeof (address), qualcomm->OUI, sizeof (qualcomm->OUI)));
-				fprintf (fp, "%s.%s\n", MMEName (mmtype), MMEMode (mmtype));
-				return;
-			}
-			if (homeplug->MMV == 0x01)
-			{
-				struct qualcomm_fmi * qualcomm = (struct qualcomm_fmi *)(&message->content);
-				mmtype = LE16TOH (qualcomm->MMTYPE);
-				fprintf (fp, "MMV=%02X ", qualcomm->MMV);
-				fprintf (fp, "MMTYPE=%04X ", mmtype);
-				fprintf (fp, "FMID=%02X ", qualcomm->FMID);
-				fprintf (fp, "FMSN=%02X ", qualcomm->FMSN);
-				fprintf (fp, "OUI=%s ", hexstring (address, sizeof (address), qualcomm->OUI, sizeof (qualcomm->OUI)));
-				fprintf (fp, "%s.%s\n", MMEName (mmtype), MMEMode (mmtype));
-				return;
-			}
-		}
-	}
-	fprintf (fp, "UNKNOWN_MESSAGE_TYPE\n");
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/MakeRule.c.html b/docbook/MakeRule.c.html deleted file mode 100644 index cf63179f..00000000 --- a/docbook/MakeRule.c.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - MakeRule.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed MakeRule (struct plc * plc, struct rule * rule);
- *
- *   plc.h
- *
- *   This plugin for program plcrule adds or removes a temporary
- *   or permanent network classification rule to a device using a
- *   VS_CLASSIFICATION message;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MAKERULE_SOURCE
-#define MAKERULE_SOURCE
-
-#include "../tools/error.h"
-
-#include "../plc/rules.h"
-#include "../plc/plc.h"
-
-signed MakeRule (struct plc * plc, struct MMERule * rule)
-
-{
-	struct channel * channel = (struct channel *) (plc->channel);
-	struct message * message = (struct message *) (plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_classification_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		struct MMERule rule;
-	}
-	* request = (struct vs_classification_request *) (message);
-	struct __packed vs_classification_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_classification_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Set MakeRules Rules");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (& request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (& request->qualcomm, 0, (VS_CLASSIFICATION | MMTYPE_REQ));
-	plc->packetsize = sizeof (struct vs_classification_request);
-	memcpy (& request->rule, rule, sizeof (request->rule));
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_CLASSIFICATION | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	Confirm (plc, "Setting ...");
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Makefile b/docbook/Makefile deleted file mode 100755 index d6308227..00000000 --- a/docbook/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/make -f -# file: docbook/Makefile - -# ==================================================================== -# environment definitions; -# -------------------------------------------------------------------- - -include ../make.def - -PROJECT=open-plc-utils -DOCBOOK=/usr/share/xml/docbook/stylesheet/docbook-xsl/fo -DOCBOOK=/usr/share/xml/docbook/stylesheet/docbook-xsl/html -LIBRARY=${DOC}/${PROJECT} -XFLAGS=--skip-validation - -# ==================================================================== -# symbols; -# -------------------------------------------------------------------- - -TRASH=*~ *.[0-9][0-9][0-9] t t.* *.1 *.1a *.1.html *.c.html *.cpp.html *.h.html *.hpp.html *.1.html *.1a.html *.sh.html *.xml.html *.xsd.html ch[0-9][0-9]*.html -STYLES=param.xsl lists.xsl synop.xsl -BOOKS=index.html - -# ==================================================================== -# pseudo targets; -# -------------------------------------------------------------------- - -all: compile install -compile: manuals ${TOOLS} ${BOOKS} - rm -f *.[0-9][0-9][0-9] -manuals: - ${SHELL} ../docbook/manuals -scripts: -library: - install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${LIBRARY} -install: library - if [ -d ${LIBRARY} ]; then install -m ${WWW_PERM} -o ${OWNER} -g ${GROUP} *.html *.css *.png ${LIBRARY}; fi -uninstall: - rm -f ${LIBRARY}/*.c.html ${LIBRARY}/*.h.html ${LIBRARY}/*.1.html -setup: - install ${STYLES} ${DOCBOOK} -clean: - rm -f ${PAGES} ${TRASH} -fresh: clean compile - -# ==================================================================== -# pseudo targets; -# -------------------------------------------------------------------- - -index.html: open-plc-utils.xml *.xml *.png - xmlto ${XFLAGS} -o . html ${<} -open-plc-utils.pdf: *.xml *.png - docbook2pdf ${<} -open-plc-utils.txt: *.xml - xmlto ${XFLAGS} txt ${<} - diff --git a/docbook/ModuleCommit.c.html b/docbook/ModuleCommit.c.html deleted file mode 100644 index 45098caa..00000000 --- a/docbook/ModuleCommit.c.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - ModuleCommit.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ModuleCommit (struct plc * plc, uint32_t options);
- *
- *   commit previously downloaded modules to NVM; this action closes
- *   the current module download session; the timer is temporarily
- *   set to 10 seconds so that the operation can complete;
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MODULECOMMIT_SOURCE
-#define MODULECOMMIT_SOURCE
-
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed ModuleCommit (struct plc * plc, uint32_t options)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_module_operation_commit_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint32_t MOD_OP_SESSION_ID;
-			uint32_t COMMIT_CODE;
-		}
-		request;
-		uint8_t RSVD [20];
-	}
-	* request = (struct vs_module_operation_commit_request *)(message);
-	struct __packed vs_module_operation_commit_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RESERVED1;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint32_t MOD_OP_SESSION_ID;
-			uint32_t COMMIT_CODE;
-			uint8_t NUM_MODULES;
-		}
-		request;
-		struct __packed
-		{
-			uint16_t MOD_STATUS;
-			uint16_t ERR_REC_CODE;
-		}
-		MOD_OP_DATA [1];
-	}
-	* confirm = (struct vs_module_operation_commit_confirm *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned timer = channel->timeout;
-	Request (plc, "Close Session");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MODULE_OPERATION | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->NUM_OP_DATA = 1;
-	request->request.MOD_OP = HTOLE16 (PLC_MOD_OP_CLOSE_SESSION);
-	request->request.MOD_OP_DATA_LEN = HTOLE16 (sizeof (request->request) + sizeof (request->RSVD));
-	request->request.MOD_OP_SESSION_ID = HTOLE32 (plc->cookie);
-	request->request.COMMIT_CODE = HTOLE32 (options);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	channel->timeout = PLC_MODULE_WRITE_TIMEOUT;
-	if (ReadMME (plc, 0, (VS_MODULE_OPERATION | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		channel->timeout = timer;
-		return (-1);
-	}
-	channel->timeout = timer;
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ModuleDump.c.html b/docbook/ModuleDump.c.html deleted file mode 100644 index d680aca3..00000000 --- a/docbook/ModuleDump.c.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - ModuleDump.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ModuleDump (struct plc * plc, uint16_t source, uint16_t module, uint16_t submodule);
- *
- *   read a module from volatile or non-volatile memory and write to
- *   stdout in hex dump format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MODULEDUMP_SOURCE
-#define MODULEDUMP_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed ModuleDump (struct plc * plc, uint16_t source, uint16_t module, uint16_t submodule)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_module_operation_read_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-	}
-	* request = (struct vs_module_operation_read_request *)(message);
-	struct __packed vs_module_operation_read_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-		uint8_t MODULE_DATA [PLC_MODULE_SIZE];
-	}
-	* confirm = (struct vs_module_operation_read_confirm *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned offset = 0;
-	unsigned length = PLC_MODULE_SIZE;
-	unsigned timer = channel->timeout;
-	Request (plc, "Read Module from Flash");
-	while (length == PLC_MODULE_SIZE)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_MODULE_OPERATION | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		request->NUM_OP_DATA = 1;
-		request->MODULE_SPEC.MOD_OP = HTOLE16 (source);
-		request->MODULE_SPEC.MOD_OP_DATA_LEN = HTOLE16 (sizeof (request->MODULE_SPEC));
-		request->MODULE_SPEC.MOD_OP_RSVD = HTOLE32 (0);
-		request->MODULE_SPEC.MODULE_ID = HTOLE16 (module);
-		request->MODULE_SPEC.MODULE_SUB_ID = HTOLE16 (submodule);
-		request->MODULE_SPEC.MODULE_LENGTH = HTOLE16 (length);
-		request->MODULE_SPEC.MODULE_OFFSET = HTOLE32 (offset);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		channel->timeout = PLC_MODULE_READ_TIMEOUT;
-		if (ReadMME (plc, 0, (VS_MODULE_OPERATION | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			channel->timeout = timer;
-			return (-1);
-		}
-		channel->timeout = timer;
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		length = LE16TOH (confirm->MODULE_SPEC.MODULE_LENGTH);
-		offset = LE32TOH (confirm->MODULE_SPEC.MODULE_OFFSET);
-		hexview (confirm->MODULE_DATA, LE32TOH (confirm->MODULE_SPEC.MODULE_OFFSET), LE16TOH (confirm->MODULE_SPEC.MODULE_LENGTH), stdout);
-		offset += length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ModuleRead.c.html b/docbook/ModuleRead.c.html deleted file mode 100644 index 4c16e1b9..00000000 --- a/docbook/ModuleRead.c.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - ModuleRead.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ModuleRead (struct plc * plc, struct _file_ * file, uint16_t source, uint16_t module, uint16_t submodule);
- *
- *   plc.h
- *
- *   Read a module from volatile or non-volatile memory and write it
- *   to file;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MODULEREAD_SOURCE
-#define MODULEREAD_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/endian.h"
-#include "../tools/memory.h"
-#include "../plc/plc.h"
-
-signed ModuleRead (struct plc * plc, struct _file_ * file, uint16_t source, uint16_t module, uint16_t submodule)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_module_operation_read_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-	}
-	* request = (struct vs_module_operation_read_request *)(message);
-	struct __packed vs_module_operation_read_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-		uint8_t MODULE_DATA [PLC_MODULE_SIZE];
-	}
-	* confirm = (struct vs_module_operation_read_confirm *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned timer = channel->timeout;
-	uint16_t length = PLC_MODULE_SIZE;
-	uint32_t offset = 0;
-	Request (plc, "Read Module from %s", source? "Flash": "Memory");
-	if (lseek (file->file, 0, SEEK_SET) == -1)
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, file->name);
-		return (-1);
-	}
-	while (length == PLC_MODULE_SIZE)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_MODULE_OPERATION | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		request->NUM_OP_DATA = 1;
-		request->MODULE_SPEC.MOD_OP = HTOLE16 (source);
-		request->MODULE_SPEC.MOD_OP_DATA_LEN = HTOLE16 (sizeof (request->MODULE_SPEC));
-		request->MODULE_SPEC.MOD_OP_RSVD = HTOLE32 (0);
-		request->MODULE_SPEC.MODULE_ID = HTOLE16 (module);
-		request->MODULE_SPEC.MODULE_SUB_ID = HTOLE16 (submodule);
-		request->MODULE_SPEC.MODULE_LENGTH = HTOLE16 (length);
-		request->MODULE_SPEC.MODULE_OFFSET = HTOLE32 (offset);
-
-#if 0
-#if defined (__GNUC__)
-#warning "Debug code active in module ModuleRead"
-#endif
-
-		fprintf (stderr, "----- \n");
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (request->RESERVED));
-		fprintf (stderr, "NUM_OP_DATA %d\n", request->NUM_OP_DATA);
-		fprintf (stderr, "MOD_OP 0x%02X\n", LE16TOH (request->MODULE_SPEC.MOD_OP));
-		fprintf (stderr, "MOD_OP_DATA_LEN %d\n", LE16TOH (request->MODULE_SPEC.MOD_OP_DATA_LEN));
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (request->MODULE_SPEC.MOD_OP_RSVD));
-		fprintf (stderr, "MODULE_ID 0x%04X\n", LE16TOH (request->MODULE_SPEC.MODULE_ID));
-		fprintf (stderr, "MODULE_SUB_ID 0x%04X\n", LE16TOH (request->MODULE_SPEC.MODULE_SUB_ID));
-		fprintf (stderr, "MODULE_LENGTH %d\n", LE16TOH (request->MODULE_SPEC.MODULE_LENGTH));
-		fprintf (stderr, "MODULE_OFFSET 0x%08X\n", LE32TOH (request->MODULE_SPEC.MODULE_OFFSET));
-		fprintf (stderr, "\n");
-
-#endif
-
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		channel->timeout = PLC_MODULE_READ_TIMEOUT;
-		if (ReadMME (plc, 0, (VS_MODULE_OPERATION | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		channel->timeout = timer;
-
-#if 0
-#if defined (__GNUC__)
-#warning "Debug code active in module ModuleRead"
-#endif
-
-		fprintf (stderr, "MSTATUS 0x%04X\n", LE16TOH (confirm->MSTATUS));
-		fprintf (stderr, "ERROR_REC_CODE %d\n", LE16TOH (confirm->ERR_REC_CODE));
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (confirm->RESERVED));
-		fprintf (stderr, "NUM_OP_DATA %d\n", confirm->NUM_OP_DATA);
-		fprintf (stderr, "MOD_OP 0x%02X\n", LE16TOH (confirm->MODULE_SPEC.MOD_OP));
-		fprintf (stderr, "MOD_OP_DATA_LEN %d\n", LE16TOH (confirm->MODULE_SPEC.MOD_OP_DATA_LEN));
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (confirm->MODULE_SPEC.MOD_OP_RSVD));
-		fprintf (stderr, "MODULE_ID 0x%04X\n", LE16TOH (confirm->MODULE_SPEC.MODULE_ID));
-		fprintf (stderr, "MODULE_SUB_ID 0x%04X\n", LE16TOH (confirm->MODULE_SPEC.MODULE_SUB_ID));
-		fprintf (stderr, "MODULE_LENGTH %d\n", LE16TOH (confirm->MODULE_SPEC.MODULE_LENGTH));
-		fprintf (stderr, "MODULE_OFFSET 0x%08X\n", LE32TOH (confirm->MODULE_SPEC.MODULE_OFFSET));
-		fprintf (stderr, "\n");
-
-#endif
-
-		if (LE16TOH (confirm->MSTATUS))
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		length = LE16TOH (confirm->MODULE_SPEC.MODULE_LENGTH);
-		offset = LE32TOH (confirm->MODULE_SPEC.MODULE_OFFSET);
-		if (write (file->file, confirm->MODULE_DATA, length) != (signed)(length))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTSAVE, file->name);
-			return (-1);
-		}
-		offset += length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ModuleSession.c.html b/docbook/ModuleSession.c.html deleted file mode 100644 index a3413011..00000000 --- a/docbook/ModuleSession.c.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - ModuleSession.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ModuleSession (struct plc * plc, unsigned modules, struct vs_module_spec * vs_module_spec);
- *
- *   Establish a module download session; the session expires after
- *   30 minutes; the session is lost if no modules are committed in
- *   that time; the timeout is set to 10 seconds so that the device
- *   has enouth time to reply;
- *
- *   array vs_module_spec contains information about each module in
- *   this session;
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MODULESESSION_SOURCE
-#define MODULESESSION_SOURCE
-
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed ModuleSession (struct plc * plc, unsigned modules, struct vs_module_spec * vs_module_spec)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_module_operation_start_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t RESERVED1;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint32_t MOD_OP_SESSION_ID;
-			uint8_t NUM_MODULES;
-		}
-		MODULE_SPEC;
-		struct vs_module_spec MOD_OP_SPEC [10];
-	}
-	* request = (struct vs_module_operation_start_request *)(message);
-	struct __packed vs_module_operation_start_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint32_t MOD_OP_SESSION_ID;
-			uint8_t NUM_MODULES;
-		}
-		MODULE_SPEC;
-		struct __packed
-		{
-			uint16_t MOD_STATUS;
-			uint16_t ERR_REC_CODE;
-		}
-		MOD_OP_DATA [1];
-	}
-	* confirm = (struct vs_module_operation_start_confirm *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned timer = channel->timeout;
-	struct vs_module_spec * request_spec = (struct vs_module_spec *)(&request->MOD_OP_SPEC);
-	Request (plc, "Start Module Write Session");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MODULE_OPERATION | MMTYPE_REQ));
-	plc->packetsize = sizeof (* request);
-	request->NUM_OP_DATA = 1;
-	request->MODULE_SPEC.MOD_OP = HTOLE16 (PLC_MOD_OP_START_SESSION);
-	request->MODULE_SPEC.MOD_OP_DATA_LEN = HTOLE16 ((uint16_t)(sizeof (request->MODULE_SPEC)) + modules * sizeof (struct vs_module_spec));
-	request->MODULE_SPEC.MOD_OP_SESSION_ID = HTOLE32 (plc->cookie);
-	request->MODULE_SPEC.NUM_MODULES = modules;
-	while (modules--)
-	{
-		request_spec->MODULE_ID = HTOLE16 (vs_module_spec->MODULE_ID);
-		request_spec->MODULE_SUB_ID = HTOLE16 (vs_module_spec->MODULE_SUB_ID);
-		request_spec->MODULE_LENGTH = HTOLE32 (vs_module_spec->MODULE_LENGTH);
-		request_spec->MODULE_CHKSUM = vs_module_spec->MODULE_CHKSUM;
-		vs_module_spec++;
-		request_spec++;
-	}
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	channel->timeout = PLC_MODULE_REQUEST_TIMEOUT;
-	if (ReadMME (plc, 0, (VS_MODULE_OPERATION | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		channel->timeout = timer;
-		return (-1);
-	}
-	channel->timeout = timer;
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ModuleSpec.c.html b/docbook/ModuleSpec.c.html deleted file mode 100644 index d69a5bd8..00000000 --- a/docbook/ModuleSpec.c.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - ModuleSpec.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ModuleSpec (struct _file_ * module, struct vs_module_spec * vs_module_spec);
- *
- *   plc.h
- *
- *   compute file length and checksum for module operation functions;
- *   struct vs_module_spec is defined in plc.h;
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MODULESPEC_SOURCE
-#define MODULESPEC_SOURCE
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../plc/plc.h"
-
-signed ModuleSpec (struct _file_ * file, struct vs_module_spec * spec)
-
-{
-	off_t length;
-	if ((length = lseek (file->file, 0, SEEK_END)) == -1)
-	{
-		error (1, errno, FILE_CANTSIZE, file->name);
-	}
-
-#if 1
-
-	if (length % sizeof (uint32_t))
-	{
-		error (1, ENOTSUP, "%s not multiple of " SIZE_T_SPEC " bytes", file->name, sizeof (uint32_t));
-	}
-
-#endif
-
-	if (lseek (file->file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, file->name);
-	}
-	spec->MODULE_LENGTH = length;
-	spec->MODULE_CHKSUM = fdchecksum32 (file->file, length, 0);
-	if (lseek (file->file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, file->name);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ModuleWrite.c.html b/docbook/ModuleWrite.c.html deleted file mode 100644 index d19d4a5e..00000000 --- a/docbook/ModuleWrite.c.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - ModuleWrite.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ModuleWrite (struct plc * plc, struct _file_ * file, unsigned index, struct vs_module_spec * vs_module_spec);
- *
- *   plc.h
- *
- *   write an entire file to flash memory as a single module; write
- *   the file in 1400 byte records; allow up to 80 seconds for each
- *   write to complete; extra time is needed because memory must be
- *   erased;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef MODULEWRITE_SOURCE
-#define MODULEWRITE_SOURCE
-
-#include <stdint.h>
-#include <limits.h>
-#include <unistd.h>
-#include <string.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../plc/plc.h"
-
-signed ModuleWrite (struct plc * plc, struct _file_ * file, unsigned index, struct vs_module_spec * vs_module_spec)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_module_operation_write_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint32_t MOD_OP_SESSION_ID;
-			uint8_t MODULE_IDX;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-		uint8_t MODULE_DATA [PLC_MODULE_SIZE];
-	}
-	* request = (struct vs_module_operation_write_request *)(message);
-	struct __packed vs_module_operation_write_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RESERVED;
-		uint8_t NUM_OP_DATA;
-		struct __packed
-		{
-			uint16_t MOD_OP;
-			uint16_t MOD_OP_DATA_LEN;
-			uint32_t MOD_OP_RSVD;
-			uint32_t MOD_OP_SESSION_ID;
-			uint8_t MODULE_IDX;
-			uint16_t MODULE_ID;
-			uint16_t MODULE_SUB_ID;
-			uint16_t MODULE_LENGTH;
-			uint32_t MODULE_OFFSET;
-		}
-		MODULE_SPEC;
-	}
-	* confirm = (struct vs_module_operation_write_confirm *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned timer = channel->timeout;
-	uint16_t length = PLC_MODULE_SIZE;
-	uint32_t extent = vs_module_spec->MODULE_LENGTH;
-	uint32_t offset = 0;
-	Request (plc, "Flash %s", file->name);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_MODULE_OPERATION | MMTYPE_REQ));
-		plc->packetsize = sizeof (struct vs_module_operation_write_request);
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (file->file, request->MODULE_DATA, length) != length)
-		{
-			error (1, errno, FILE_CANTREAD, file->name);
-		}
-		request->NUM_OP_DATA = 1;
-		request->MODULE_SPEC.MOD_OP = HTOLE16 (PLC_MOD_OP_WRITE_MODULE);
-		request->MODULE_SPEC.MOD_OP_DATA_LEN = HTOLE16 (sizeof (request->MODULE_SPEC) + sizeof (request->MODULE_DATA));
-		request->MODULE_SPEC.MOD_OP_SESSION_ID = HTOLE32 (plc->cookie);
-		request->MODULE_SPEC.MODULE_IDX = index;
-		request->MODULE_SPEC.MODULE_ID = HTOLE16 (vs_module_spec->MODULE_ID);
-		request->MODULE_SPEC.MODULE_SUB_ID = HTOLE16 (vs_module_spec->MODULE_SUB_ID);
-		request->MODULE_SPEC.MODULE_LENGTH = HTOLE16 (length);
-		request->MODULE_SPEC.MODULE_OFFSET = HTOLE32 (offset);
-
-#if 1
-
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (request->RESERVED));
-		fprintf (stderr, "NUM_OP_DATA %d\n", request->NUM_OP_DATA);
-		fprintf (stderr, "MOD_OP 0x%02X\n", LE16TOH (request->MODULE_SPEC.MOD_OP));
-		fprintf (stderr, "MOD_OP_DATA_LEN %d\n", LE16TOH (request->MODULE_SPEC.MOD_OP_DATA_LEN));
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (request->MODULE_SPEC.MOD_OP_RSVD));
-		fprintf (stderr, "MODULE_ID 0x%04X\n", LE16TOH (request->MODULE_SPEC.MODULE_ID));
-		fprintf (stderr, "MODULE_SUB_ID 0x%04X\n", LE16TOH (request->MODULE_SPEC.MODULE_SUB_ID));
-		fprintf (stderr, "MODULE_LENGTH %d\n", LE16TOH (request->MODULE_SPEC.MODULE_LENGTH));
-		fprintf (stderr, "MODULE_OFFSET 0x%08X\n", LE32TOH (request->MODULE_SPEC.MODULE_OFFSET));
-
-#endif
-
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		channel->timeout = PLC_MODULE_WRITE_TIMEOUT;
-		if (ReadMME (plc, 0, (VS_MODULE_OPERATION | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			channel->timeout = timer;
-			return (-1);
-		}
-		channel->timeout = timer;
-
-#if 1
-
-		fprintf (stderr, "MSTATUS 0x%04X\n", LE16TOH (confirm->MSTATUS));
-		fprintf (stderr, "ERROR_REC_CODE %d\n", LE16TOH (confirm->ERR_REC_CODE));
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (confirm->RESERVED));
-		fprintf (stderr, "NUM_OP_DATA %d\n", confirm->NUM_OP_DATA);
-		fprintf (stderr, "MOD_OP 0x%02X\n", LE16TOH (request->MODULE_SPEC.MOD_OP));
-		fprintf (stderr, "MOD_OP_DATA_LEN %d\n", LE16TOH (confirm->MODULE_SPEC.MOD_OP_DATA_LEN));
-		fprintf (stderr, "RESERVED 0x%08X\n", LE32TOH (confirm->MODULE_SPEC.MOD_OP_RSVD));
-		fprintf (stderr, "MODULE_ID 0x%04X\n", LE16TOH (confirm->MODULE_SPEC.MODULE_ID));
-		fprintf (stderr, "MODULE_SUB_ID 0x%04X\n", LE16TOH (confirm->MODULE_SPEC.MODULE_SUB_ID));
-		fprintf (stderr, "MODULE_LENGTH %d\n", LE16TOH (confirm->MODULE_SPEC.MODULE_LENGTH));
-		fprintf (stderr, "MODULE_OFFSET 0x%08X\n", LE32TOH (request->MODULE_SPEC.MODULE_OFFSET));
-
-#endif
-
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MODULE_SPEC.MODULE_LENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MODULE_SPEC.MODULE_OFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		extent -= length;
-		offset += length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NVMSelect.c.html b/docbook/NVMSelect.c.html deleted file mode 100644 index 3e1c9e20..00000000 --- a/docbook/NVMSelect.c.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - NVMSelect.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NVMSelect (struct plc * plc, signed old (struct plc *), signed new (struct plc *));
- *
- *   plc.h
- *
- *   read the .nvm header to determine file format; rewind the file
- *   then call the right function to execute the applets;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NVMSELECT_SOURCE
-#define NVMSELECT_SOURCE
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../plc/plc.h"
-
-signed NVMSelect (struct plc * plc, signed old (struct plc *), signed new (struct plc *))
-
-{
-	uint32_t version;
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->NVM.name);
-	}
-	if (read (plc->NVM.file, &version, sizeof (version)) != sizeof (version))
-	{
-		error (1, errno, FILE_CANTREAD, plc->NVM.name);
-	}
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->NVM.name);
-	}
-	return (LE32TOH (version) == 0x60000000? old (plc): new (plc));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NVRAMInfo.c.html b/docbook/NVRAMInfo.c.html deleted file mode 100644 index 4453962b..00000000 --- a/docbook/NVRAMInfo.c.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - NVRAMInfo.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NVRAMInfo (struct plc * plc);
- *
- *   plc.h
- *
- *   This plugin for program plc requests a device NVRAM parameter
- *   block using a VS_GET_NVM message; the information is displayed
- *   and can be used to determine the flash memory characteristics
- *   before downloading firmware;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NVRAMINFO_SOURCE
-#define NVRAMINFO_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../ram/nvram.h"
-
-signed NVRAMInfo (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_get_nvm_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_get_nvm_request *) (message);
-	struct __packed vs_get_nvm_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		struct config_nvram config_nvram;
-	}
-	* confirm = (struct vs_get_nvm_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	struct config_nvram * config_nvram = (struct config_nvram *)(&confirm->config_nvram);
-	Request (plc, "Fetch NVRAM Configuration");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_GET_NVM | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_GET_NVM | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		Display (plc, "TYPE=0x%02X (%s) PAGE=0x%04X (%d) BLOCK=0x%04X (%d) SIZE=0x%04X (%d)", LE32TOH (config_nvram->NVRAMTYPE), NVRAMName (LE32TOH (config_nvram->NVRAMTYPE)), LE32TOH (config_nvram->NVRAMPAGE), LE32TOH (config_nvram->NVRAMPAGE), LE32TOH (config_nvram->NVRAMBLOCK), LE32TOH (config_nvram->NVRAMBLOCK), LE32TOH (config_nvram->NVRAMSIZE), LE32TOH (config_nvram->NVRAMSIZE));
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetInfo.c.html b/docbook/NetInfo.c.html deleted file mode 100644 index 43d5bd74..00000000 --- a/docbook/NetInfo.c.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - NetInfo.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetInfo (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETINFO_SOURCE
-#define NETINFO_SOURCE
-
-#include "../plc/plc.h"
-
-signed NetInfo (struct plc * plc)
-
-{
-	return (PLCSelect (plc, NetInfo1, NetInfo2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetInfo1.c.html b/docbook/NetInfo1.c.html deleted file mode 100644 index 2896c29f..00000000 --- a/docbook/NetInfo1.c.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - NetInfo1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetInfo1 (struct plc * plc);
- *
- *   plc.h
- *
- *   Request network membership information from the peer device using
- *   the VS_NW_INFO message;
- *
- *   This function is similar to function NetInfo1rmation() but the
- *   output format is different;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKINFO1_SOURCE
-#define NETWORKINFO1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed NetInfo1 (struct plc * plc)
-
-{
-	extern char const * StationRole [];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t data [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->data);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Fetch Network Information");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_NW_INFO | MMTYPE_CNF)) > 0)
-	{
-		char string [24];
-		Confirm (plc, "Found %d Network(s)\n", networks->NUMAVLNS);
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			printf ("\tnetwork->NID = %s\n", hexstring (string, sizeof (string), network->NID, sizeof (network->NID)));
-			printf ("\tnetwork->SNID = %d\n", network->SNID);
-			printf ("\tnetwork->TEI = %d\n", network->TEI);
-			printf ("\tnetwork->ROLE = 0x%02X (%s)\n", network->ROLE, StationRole [network->ROLE]);
-			printf ("\tnetwork->CCO_DA = %s\n", hexstring (string, sizeof (string), network->CCO_MAC, sizeof (network->CCO_MAC)));
-			printf ("\tnetwork->CCO_TEI = %d\n", network->CCO_TEI);
-			printf ("\tnetwork->STATIONS = %d\n", network->NUMSTAS);
-			printf ("\n");
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				printf ("\t\tstation->MAC = %s\n", hexstring (string, sizeof (string), station->MAC, sizeof (station->MAC)));
-				printf ("\t\tstation->TEI = %d\n", station->TEI);
-				printf ("\t\tstation->BDA = %s\n", hexstring (string, sizeof (string), station->BDA, sizeof (station->BDA)));
-				printf ("\t\tstation->AvgPHYDR_TX = %03d mbps\n", station->AVGTX);
-				printf ("\t\tstation->AvgPHYDR_RX = %03d mbps\n", station->AVGRX);
-				printf ("\n");
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetInfo2.c.html b/docbook/NetInfo2.c.html deleted file mode 100644 index 3d2e90d5..00000000 --- a/docbook/NetInfo2.c.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - NetInfo2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetInfo2 (struct plc * plc);
- *
- *   plc.h
- *
- *   Request network membership information from the peer device using
- *   the VS_NW_INFO message;
- *
- *   This function is similar to function NetworkInformation() but the
- *   output format is different;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKINFO2_SOURCE
-#define NETWORKINFO2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed NetInfo2 (struct plc * plc)
-
-{
-	extern char const * StationRole [];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Fetch Network Information");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) > 0)
-	{
-		char string [24];
-		Confirm (plc, "Found %d Network(s)\n", networks->NUMAVLNS);
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			printf ("\tnetwork->NID = %s\n", hexstring (string, sizeof (string), network->NID, sizeof (network->NID)));
-			printf ("\tnetwork->SNID = %d\n", network->SNID);
-			printf ("\tnetwork->TEI = %d\n", network->TEI);
-			printf ("\tnetwork->ROLE = 0x%02X (%s)\n", network->ROLE, StationRole [network->ROLE]);
-			printf ("\tnetwork->CCO_DA = %s\n", hexstring (string, sizeof (string), network->CCO_MAC, sizeof (network->CCO_MAC)));
-			printf ("\tnetwork->CCO_TEI = %d\n", network->CCO_TEI);
-			printf ("\tnetwork->STATIONS = %d\n", network->NUMSTAS);
-			printf ("\n");
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				printf ("\t\tstation->MAC = %s\n", hexstring (string, sizeof (string), station->MAC, sizeof (station->MAC)));
-				printf ("\t\tstation->TEI = %d\n", station->TEI);
-				printf ("\t\tstation->BDA = %s\n", hexstring (string, sizeof (string), station->BDA, sizeof (station->BDA)));
-				station->AVGTX = LE16TOH (station->AVGTX);
-				station->AVGRX = LE16TOH (station->AVGRX);
-				printf ("\t\tstation->AvgPHYDR_TX = %03d mbps %s\n", station->AVGTX, ((station->COUPLING >> 0) & 0x0F)? "Alternate": "Primary");
-				printf ("\t\tstation->AvgPHYDR_RX = %03d mbps %s\n", station->AVGRX, ((station->COUPLING >> 4) & 0x0F)? "Alternate": "Primary");
-				printf ("\n");
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkDevices.c.html b/docbook/NetworkDevices.c.html deleted file mode 100644 index 0c5e92c4..00000000 --- a/docbook/NetworkDevices.c.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - NetworkDevices.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkDevices (struct plc * plc, void * memory, size_t extent);
- *
- *   plc.h
- *
- *   return a list powerline network device addresses on a powerline
- *   network; the list consists of a known device plus all others on
- *   the same powerline network; the device is defined by the channel
- *   peer address and appears first in the list;
- *
- *   the device address must be explicit; it cannot be the broadcast
- *   or localcast address;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKDEVICES_SOURCE
-#define NETWORKDEVICES_SOURCE
-
-#include "../plc/plc.h"
-
-signed NetworkDevices (struct plc * plc, void * memory, size_t extent)
-
-{
-	return ((plc->hardwareID < CHIPSET_AR7400)? NetworkDevices1 (plc, memory, extent): NetworkDevices2 (plc, memory, extent));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkDevices1.c.html b/docbook/NetworkDevices1.c.html deleted file mode 100644 index 41ebcfe2..00000000 --- a/docbook/NetworkDevices1.c.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - NetworkDevices1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkDevices1 (struct plc * plc, void * memory, size_t extent);
- *
- *   plc.h
- *
- *   return a list powerline network device addresses on a powerline
- *   network; the list consists of a known device plus all others on
- *   the same powerline network; the device is defined by the channel
- *   peer address and appears first in the list;
- *
- *   the device address must be explicit; it cannot be the broadcast
- *   or localcast address;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKDEVICES1_SOURCE
-#define NETWORKDEVICES1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed NetworkDevices1 (struct plc * plc, void * memory, size_t extent)
-
-{
-	extern const byte broadcast [ETHER_ADDR_LEN];
-	extern const byte localcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	uint8_t * origin = (byte *)(memory);
-	uint8_t * offset = (byte *)(memory);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t data [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->data);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	ssize_t packetsize;
-	if (!memcmp (channel->peer, broadcast, sizeof (channel->peer)))
-	{
-		error (1, EINVAL, "Can't use broadcast address");
-	}
-	if (!memcmp (channel->peer, localcast, sizeof (channel->peer)))
-	{
-		error (1, EINVAL, "Can't use localcast address");
-	}
-	memset (memory, 0, extent);
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 0, (VS_NW_INFO | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			if (extent < sizeof (request->ethernet.OSA))
-			{
-				break;
-			}
-			memcpy (offset, request->ethernet.OSA, sizeof (request->ethernet.OSA));
-			offset += sizeof (request->ethernet.OSA);
-			extent -= sizeof (request->ethernet.OSA);
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (extent < sizeof (station->MAC))
-				{
-					break;
-				}
-				memcpy (offset, station->MAC, sizeof (station->MAC));
-				offset += sizeof (station->MAC);
-				extent -= sizeof (station->MAC);
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return ((offset - origin) / ETHER_ADDR_LEN);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkDevices2.c.html b/docbook/NetworkDevices2.c.html deleted file mode 100644 index 780d8ad2..00000000 --- a/docbook/NetworkDevices2.c.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - NetworkDevices2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkDevices2 (struct plc * plc, void * memory, size_t extent);
- *
- *   plc.h
- *
- *   return a list powerline network device addresses on a powerline
- *   network; the list consists of a known device plus all others on
- *   the same powerline network; the device is defined by the channel
- *   peer address and appears first in the list;
- *
- *   the device address must be explicit; it cannot be the broadcast
- *   or localcast address;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKDEVICES2_SOURCE
-#define NETWORKDEVICES2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed NetworkDevices2 (struct plc * plc, void * memory, size_t extent)
-
-{
-	extern const byte broadcast [ETHER_ADDR_LEN];
-	extern const byte localcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	uint8_t * origin = (byte *)(memory);
-	uint8_t * offset = (byte *)(memory);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	ssize_t packetsize;
-	if (!memcmp (channel->peer, broadcast, sizeof (channel->peer)))
-	{
-		error (1, EINVAL, "Can't use broadcast address");
-	}
-	if (!memcmp (channel->peer, localcast, sizeof (channel->peer)))
-	{
-		error (1, EINVAL, "Can't use localcast address");
-	}
-	memset (memory, 0, extent);
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 0, (VS_NW_INFO | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			if (extent < sizeof (request->ethernet.OSA))
-			{
-				break;
-			}
-			memcpy (offset, request->ethernet.OSA, sizeof (request->ethernet.OSA));
-			offset += sizeof (request->ethernet.OSA);
-			extent -= sizeof (request->ethernet.OSA);
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (extent < sizeof (station->MAC))
-				{
-					break;
-				}
-				memcpy (offset, station->MAC, sizeof (station->MAC));
-				offset += sizeof (station->MAC);
-				extent -= sizeof (station->MAC);
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return ((offset - origin) / ETHER_ADDR_LEN);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkInfoStats.c.html b/docbook/NetworkInfoStats.c.html deleted file mode 100644 index e89e476e..00000000 --- a/docbook/NetworkInfoStats.c.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - NetworkInfoStats.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkInfoStats (struct plc * plc);
- *
- *   plc.h
- *
- *   Request network membership information from the peer device using
- *   the VS_NW_INFO_STATS message;
- *
- *   This function is similar to function NetworkInformation() but the
- *   output format is different;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKINFOSTATS_SOURCE
-#define NETWORKINFOSTATS_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-signed NetworkInfoStats (struct plc * plc)
-
-{
-	extern char const * StationRole [STATIONROLES];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-#if defined(INT6x00)
-
-	struct __packed vs_ns_info_stats_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t FIRST_TEI;
-	}
-	* request = (struct vs_ns_info_stats_request *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t ACCESS uint8_t NEIGHBOR_NETWORKS;
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed vs_ns_info_stats_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t FIRST_TEI;
-		uint8_t IN_AVLN;
-		struct network network;
-	}
-	* confirm = (struct vs_ns_info_stats_confirm *)(message);
-
-#elif defined (AR7x00)
-
-	struct __packed vs_ns_info_stats_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t MME_SUBVER;
-		uint8_t RESERVED [3];
-		uint8_t FIRST_TEI;
-		UINT8_6 NUM_STAS;
-	}
-	* request = (struct vs_ns_info_stats_request *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1;
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [2];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t ACCESS;
-		uint8_t NEIGHBOR_NETWORKS;
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [7];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed vs_ns_info_stats_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t FIRST_TEI;
-		uint8_t NUM_STAS;
-		uin16_t Reserved;
-		uint8_t IN_AVLN;
-		struct network network;
-	}
-	* confirm = (struct vs_ns_info_stats_confirm *)(message);
-
-#else
-#error "Unspecified Atheros chipset"
-#endif
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Fetch Network Information");
-	memset (message, 0, sizeof (* message));
-
-#if defined (INT6x00)
-
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO_STATS | MMTYPE_REQ));
-
-#elif defined (AR7x00)
-
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO_STATS | MMTYPE_REQ));
-
-#else
-#error "Unspecified Atheros chipset"
-#endif
-
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-
-#if defined (INT6x00)
-
-	while (ReadMME (plc, 0, (VS_NW_INFO_STATS | MMTYPE_CNF)) > 0)
-
-#elif defined (AR7x00)
-
-	while (ReadMME (plc, 1, (VS_NW_INFO_STATS | MMTYPE_CNF)) > 0)
-
-#else
-#error "Unspecified Atheros chipset"
-#endif
-
-	{
-		char string [24];
-		Confirm (plc, "Found %d Network(s)\n", networks->NUMAVLNS);
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			printf ("\tnetwork->NID = %s\n", hexstring (string, sizeof (string), network->NID, sizeof (network->NID)));
-			printf ("\tnetwork->SNID = %d\n", network->SNID);
-			printf ("\tnetwork->TEI = %d\n", network->TEI);
-			printf ("\tnetwork->ROLE = 0x%02X (%s)\n", network->ROLE, StationRole [network->ROLE]);
-			printf ("\tnetwork->CCO_DA = %s\n", hexstring (string, sizeof (string), network->CCO_MAC, sizeof (network->CCO_MAC)));
-			printf ("\tnetwork->CCO_TEI = %d\n", network->CCO_TEI);
-			printf ("\tnetwork->STATIONS = %d\n", network->NUMSTAS);
-			printf ("\n");
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				char * TX = "";
-				char * RX = "";
-				printf ("\t\tstation->MAC = %s\n", hexstring (string, sizeof (string), station->MAC, sizeof (station->MAC)));
-				printf ("\t\tstation->TEI = %d\n", station->TEI);
-				printf ("\t\tstation->BDA = %s\n", hexstring (string, sizeof (string), station->BDA, sizeof (station->BDA)));
-
-#if defined (AR7x00)
-
-				station->AVGTX = LE16TOH (station->AVGTX);
-				station->AVGRX = LE16TOH (station->AVGRX);
-				TX = ((station->COUPLING >> 4) & 0x0F)? "Alternate": "Primary";
-				RX = ((station->COUPLING >> 0) & 0x0F)? "Alternate": "Primary";
-
-#endif
-
-				printf ("\t\tstation->AvgPHYDR_TX = %03d mbps %s\n", station->AVGTX, TX);
-				printf ("\t\tstation->AvgPHYDR_RX = %03d mbps %s\n", station->AVGRX, RX);
-				printf ("\n");
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkInformation.c.html b/docbook/NetworkInformation.c.html deleted file mode 100644 index 597dd001..00000000 --- a/docbook/NetworkInformation.c.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - NetworkInformation.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkInformation (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKINFORMATION_SOURCE
-#define NETWORKINFORMATION_SOURCE
-
-#include "../plc/plc.h"
-
-signed NetworkInformation (struct plc * plc)
-
-{
-	return (PLCSelect (plc, NetworkInformation1, NetworkInformation2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkInformation1.c.html b/docbook/NetworkInformation1.c.html deleted file mode 100644 index 7ac35ce6..00000000 --- a/docbook/NetworkInformation1.c.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - NetworkInformation1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkInformation1 (struct channel * channel);
- *
- *   plc.h
- *
- *   Request network membership information for the peer device using
- *   a VS_NW_INFO message;
- *
- *   This function is similar to function NetworkInfo() but the output
- *   format is different;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKINFORMATION1_SOURCE
-#define NETWORKINFORMATION1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-signed NetworkInformation1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t data [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->data);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	if (readpacket (channel, message, sizeof (* message)) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTREAD);
-	}
-	network = (struct network *)(&networks->networks);
-	while (networks->NUMAVLNS--)
-	{
-		char string [24];
-		printf (" NID %20s", hexstring (string, sizeof (string), network->NID, sizeof (network->NID)));
-		printf (" SNID %03d", network->SNID);
-		printf ("\n");
-		printf (" %s", (network->TEI == network->CCO_TEI)? "CCO": "STA");
-		printf (" TEI %03d", network->TEI);
-		printf (" MAC %17s", hexstring (string, sizeof (string), request->ethernet.OSA, sizeof (request->ethernet.OSA)));
-		printf (" BDA %17s", hexstring (string, sizeof (string), request->ethernet.ODA, sizeof (request->ethernet.ODA)));
-		printf ("\n");
-		station = (struct station *)(&network->stations);
-		while (network->NUMSTAS--)
-		{
-			printf (" %s", (station->TEI == network->CCO_TEI)? "CCO": "STA");
-			printf (" TEI %03d", station->TEI);
-			printf (" MAC %17s", hexstring (string, sizeof (string), station->MAC, sizeof (station->MAC)));
-			printf (" BDA %17s", hexstring (string, sizeof (string), station->BDA, sizeof (station->BDA)));
-			printf (" TX %03d", station->AVGTX);
-			printf (" RX %03d", station->AVGRX);
-			printf ("\n");
-			station++;
-		}
-		network = (struct network *)(station);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkInformation2.c.html b/docbook/NetworkInformation2.c.html deleted file mode 100644 index 5e8f874c..00000000 --- a/docbook/NetworkInformation2.c.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - NetworkInformation2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkInformation2 (struct plc * plc);
- *
- *   plc.h
- *
- *   Request network membership information for the peer device using
- *   a VS_NW_INFO message;
- *
- *   This function is similar to function NetworkInfo() but the output
- *   format is different;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKINFORMATION2_SOURCE
-#define NETWORKINFORMATION2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed NetworkInformation2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (*message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	if (readpacket (channel, message, sizeof (* message)) <= 0)
-	{
-		error (1, errno, CHANNEL_CANTREAD);
-	}
-	network = (struct network *)(&networks->networks);
-	while (networks->NUMAVLNS--)
-	{
-		char string [24];
-		printf (" NID %20s", hexstring (string, sizeof (string), network->NID, sizeof (network->NID)));
-		printf (" SNID %03d", network->SNID);
-		printf ("\n");
-		printf (" %s", (network->TEI == network->CCO_TEI)? "CCO": "STA");
-		printf (" TEI %03d", network->TEI);
-		printf (" MAC %17s", hexstring (string, sizeof (string), request->ethernet.OSA, sizeof (request->ethernet.OSA)));
-		printf (" BDA %17s", hexstring (string, sizeof (string), request->ethernet.ODA, sizeof (request->ethernet.ODA)));
-		printf ("\n");
-		station = (struct station *)(&network->stations);
-		while (network->NUMSTAS--)
-		{
-			printf (" %s", (station->TEI == network->CCO_TEI)? "CCO": "STA");
-			printf (" TEI %03d", station->TEI);
-			printf (" MAC %17s", hexstring (string, sizeof (string), station->MAC, sizeof (station->MAC)));
-			printf (" BDA %17s", hexstring (string, sizeof (string), station->BDA, sizeof (station->BDA)));
-			printf (" TX %03d", station->AVGTX);
-			printf (" RX %03d", station->AVGRX);
-			printf ("\n");
-			station++;
-		}
-		network = (struct network *)(station);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkTraffic.c.html b/docbook/NetworkTraffic.c.html deleted file mode 100644 index 3a9c2fcb..00000000 --- a/docbook/NetworkTraffic.c.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - NetworkTraffic.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkTraffic (struct plc * plc);
- *
- *   plc.h
- *
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKTRAFFIC_SOURCE
-#define NETWORKTRAFFIC_SOURCE
-
-#include "../plc/plc.h"
-
-signed NetworkTraffic (struct plc * plc)
-
-{
-	return ((plc->hardwareID < CHIPSET_AR7400)? NetworkTraffic1 (plc): NetworkTraffic2 (plc));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkTraffic1.c.html b/docbook/NetworkTraffic1.c.html deleted file mode 100644 index a067a446..00000000 --- a/docbook/NetworkTraffic1.c.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - NetworkTraffic1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkTraffic1 (struct plc * plc);
- *
- *   plc.h
- *
- *   generate full mesh network traffic between powerline devices on
- *   all accessible powerline networks;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKTRAFFIC1_SOURCE
-#define NETWORKTRAFFIC1_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed NetworkTraffic1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	byte bridgelist [255] [ETHER_ADDR_LEN];
-	unsigned bridges = LocalDevices (channel, message, bridgelist, sizeof (bridgelist));
-	while (bridges--)
-	{
-		byte devicelist [255] [ETHER_ADDR_LEN];
-		unsigned devices = 0;
-		unsigned device;
-		unsigned remote;
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, bridgelist [bridges], channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTSEND);
-			continue;
-		}
-		if (ReadMME (plc, 0, (VS_NW_INFO | MMTYPE_CNF)) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTREAD);
-			continue;
-		}
-		memcpy (devicelist [devices++], request->ethernet.OSA, sizeof (devicelist [0]));
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				memcpy (devicelist [devices++], station->MAC, sizeof (devicelist [0]));
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		for (device = 1; device < devices; device++)
-		{
-			Transmit (plc, devicelist [0], devicelist [device]);
-			Antiphon (plc, devicelist [device], devicelist [0]);
-		}
-		for (device = 1; device < devices; device++)
-		{
-			for (remote = 1; remote < devices; remote++)
-			{
-				if (remote != device)
-				{
-					Antiphon (plc, devicelist [device], devicelist [remote]);
-				}
-			}
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/NetworkTraffic2.c.html b/docbook/NetworkTraffic2.c.html deleted file mode 100644 index 25f1c02c..00000000 --- a/docbook/NetworkTraffic2.c.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - NetworkTraffic2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed NetworkTraffic2 (struct plc * plc);
- *
- *   plc.h
- *
- *   generate full mesh network traffic between powerline devices on
- *   all accessible powerline networks;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef NETWORKTRAFFIC2_SOURCE
-#define NETWORKTRAFFIC2_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed NetworkTraffic2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t RESERVED;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved1;
-		uint16_t Reserved2;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	byte bridgelist [255] [ETHER_ADDR_LEN];
-	unsigned bridges = LocalDevices (channel, message, bridgelist, sizeof (bridgelist));
-	while (bridges--)
-	{
-		byte devicelist [255] [ETHER_ADDR_LEN];
-		unsigned devices = 0;
-		unsigned device;
-		unsigned remote;
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, bridgelist [bridges], channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTSEND);
-			continue;
-		}
-		if (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTREAD);
-			continue;
-		}
-		memcpy (devicelist [devices++], request->ethernet.OSA, sizeof (devicelist [0]));
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				memcpy (devicelist [devices++], station->MAC, sizeof (devicelist [0]));
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		for (device = 1; device < devices; device++)
-		{
-			Transmit (plc, devicelist [0], devicelist [device]);
-			Antiphon (plc, devicelist [device], devicelist [0]);
-		}
-		for (device = 1; device < devices; device++)
-		{
-			for (remote = 1; remote < devices; remote++)
-			{
-				if (remote != device)
-				{
-					Antiphon (plc, devicelist [device], devicelist [remote]);
-				}
-			}
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCHostBoot.c.html b/docbook/PLCHostBoot.c.html deleted file mode 100644 index 29efaec4..00000000 --- a/docbook/PLCHostBoot.c.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - PLCHostBoot.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   PLCHostBoot.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PLCHOSTBOOT_SOURCE
-#define PLCHOSTBOOT_SOURCE
-
-#include <unistd.h>
-#include <errno.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-#define MESSAGE "Starting PLC Host Server\n"
-#define SOCKETNAME "/tmp/socket"
-
-static bool done = false;
-void terminate (signo_t signal)
-
-{
-	done = true;
-	return;
-}
-
-static signed opensocket (char const * socketname)
-
-{
-	signed fd;
-	struct sockaddr_un sockaddr_un =
-	{
-
-#ifdef __OpenBSD__
-
-		0,
-
-#endif
-
-		AF_UNIX,
-		"/tmp/socket"
-	};
-	strncpy (sockaddr_un.sun_path, socketname, sizeof (sockaddr_un.sun_path));
-
-#ifdef __OpenBSD__
-
-	sockaddr_un.sun_len = SUN_LEN (&sockaddr_un);
-
-#endif
-
-	if (unlink (sockaddr_un.sun_path))
-	{
-		if (errno != ENOENT)
-		{
-			error (1, errno, "%s", sockaddr_un.sun_path);
-		}
-	}
-	if ((fd = socket (AF_UNIX, SOCK_DGRAM, 0)) == -1)
-	{
-		error (1, errno, "%s", sockaddr_un.sun_path);
-	}
-	if (bind (fd, (struct sockaddr *)(&sockaddr_un), sizeof (sockaddr_un)) == -1)
-	{
-		error (1, errno, "%s", sockaddr_un.sun_path);
-	}
-	if (chmod (sockaddr_un.sun_path, 0666) == -1)
-	{
-		error (1, errno, "%s", sockaddr_un.sun_path);
-	}
-	return (fd);
-}
-
-/*====================================================================*
- *
- *   signed PLCHostBoot (struct plc * plc, char const * socket, signed timer);
- *
- *   int6k.h
- *
- *   wait indefinitely for VS_HOST_ACTION messages; service the device
- *   only; it will stop dead - like a bug! - on error;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-signed PLCHostBoot (struct plc * plc, char const * socket, unsigned timer)
-
-{
-	byte buffer [3000];
-	struct plctopology * plctopology = (struct plctopology *)(buffer);
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_host_action_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr intellon;
-		uint8_t MACTION;
-		uint8_t MAJOR_VERSION;
-		uint8_t MINOR_VERSION;
-	}
-	* indicate = (struct vs_host_action_ind *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	signed fd = opensocket (socket);
-	char const * NVM = plc->NVM.name;
-	char const * PIB = plc->PIB.name;
-	unsigned action;
-	signed status;
-	memset (buffer, 0, sizeof (buffer));
-	write (fd, MESSAGE, strlen (MESSAGE));
-	while (!done)
-	{
-		status = ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND));
-		if (status < 0)
-		{
-			break;
-		}
-		if (status < 1)
-		{
-			PLCTopology (channel, message, plctopology);
-			PLCTopologyPrint (plctopology);
-			continue;
-		}
-		action = indicate->MACTION;
-		memcpy (channel->peer, indicate->ethernet.OSA, sizeof (channel->peer));
-		if (HostActionResponse (plc))
-		{
-			return (-1);
-		}
-		if (action == 0x00)
-		{
-			if (BootDevice1 (plc))
-			{
-				return (-1);
-			}
-			if (_anyset (plc->flags, PLC_FLASH_DEVICE))
-			{
-				FlashDevice1 (plc);
-			}
-			continue;
-		}
-		if (action == 0x01)
-		{
-			close (plc->NVM.file);
-			if (ReadFirmware1 (plc))
-			{
-				return (-1);
-			}
-			if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc->NVM.name);
-			}
-			if (ResetDevice (plc))
-			{
-				return (-1);
-			}
-			continue;
-		}
-		if (action == 0x02)
-		{
-			close (plc->PIB.file);
-			if (ReadParameters (plc))
-			{
-				return (-1);
-			}
-			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc->PIB.name);
-			}
-			if (ResetDevice (plc))
-			{
-				return (-1);
-			}
-			continue;
-		}
-		if (action == 0x03)
-		{
-			close (plc->PIB.file);
-			if (ReadParameters (plc))
-			{
-				return (-1);
-			}
-			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc->PIB.name);
-			}
-			close (plc->NVM.file);
-			if (ReadFirmware1 (plc))
-			{
-				return (-1);
-			}
-			if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc->NVM.name);
-			}
-			if (ResetDevice (plc))
-			{
-				return (-1);
-			}
-			continue;
-		}
-		if (action == 0x04)
-		{
-			if (InitDevice (plc))
-			{
-				return (-1);
-			}
-			continue;
-		}
-		if (action == 0x05)
-		{
-			close (plc->NVM.file);
-			if ((plc->NVM.file = open (plc->NVM.name = NVM, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc->NVM.name);
-			}
-			close (plc->PIB.file);
-			if ((plc->PIB.file = open (plc->PIB.name = PIB, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc->PIB.name);
-			}
-			if (ResetDevice (plc))
-			{
-				return (-1);
-			}
-			continue;
-		}
-		if (action == 0x06)
-		{
-			close (plc->PIB.file);
-			if (ReadParameters (plc))
-			{
-				return (-1);
-			}
-			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc->PIB.name);
-			}
-			continue;
-		}
-		error (0, ENOSYS, "Host Action 0x%02X", action);
-	}
-	close (fd);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCNetworkInfo.c.html b/docbook/PLCNetworkInfo.c.html deleted file mode 100644 index bfc6fc33..00000000 --- a/docbook/PLCNetworkInfo.c.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - PLCNetworkInfo.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PLCNetworkInfo (struct plc * plc)
- *
- *   Request network membership information from the peer device using
- *   the VS_NW_INFO message;
- *
- *   This function is similar to function NetworkInformation() but the
- *   output format is different;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PLCNETWORKINFO_SOURCE
-#define PLCNETWORKINFO_SOURCE
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed PLCNetworkInfo (struct plc * plc)
-
-{
-	signed status;
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, "Device will not start");
-		return (-1);
-	}
-	chipset (confirm);
-	if ((plc->hardwareID = confirm->MDEVICEID) < CHIPSET_AR7400)
-	{
-		status = NetInfo1 (plc);
-	}
-	else
-	{
-		status = NetInfo2 (plc);
-	}
-	return (status);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCPhyRates.c.html b/docbook/PLCPhyRates.c.html deleted file mode 100644 index ece41d11..00000000 --- a/docbook/PLCPhyRates.c.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - PLCPhyRates.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PhyRates (struct plc * plc)
- *
- *   detect the chipset type and call appropriate function to
- *   display the PHY rates; older devices use 16-bit rates but newer
- *   devices use 32-bit;
- *
- *   if you already know the chipset being interrogated, then you can
- *   call INTPhyRate or AMPPhyRate directly and save some overhead;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PHYRATES_SOURCE
-#define PHYRATES_SOURCE
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed PLCPhyRates (struct plc * plc)
-
-{
-	signed status;
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, "Device will not start");
-		return (-1);
-	}
-	chipset (confirm);
-	if ((plc->hardwareID = confirm->MDEVICEID) < CHIPSET_AR7400)
-	{
-		status = PhyRates1 (plc);
-	}
-	else
-	{
-		status = PhyRates2 (plc);
-	}
-	return (status);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCReadParameterBlock.c.html b/docbook/PLCReadParameterBlock.c.html deleted file mode 100644 index e9335d8e..00000000 --- a/docbook/PLCReadParameterBlock.c.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - PLCReadParameterBlock.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PLCReadParameterBlock (struct channel * channel, struct message * message, void * memory, size_t extent);
- *
- *   plc.h
- *
- *   Read the PIB Image from an INT6000 using as many VS_RD_MOD
- *   messages as needed; Write image blocks to file as they are
- *   read;
- *
- *   the objective here is to read the PIB module in 1024 byte blocks
- *   until the module offset equals or exceeds the PIB actual; we do
- *   not know the PIB actual until we have read the header contained
- *   in the first block read from OFFSET 0;
- *
- *   MOFFSET and MLENGTH fields occupy different offsets in REQ and CNF
- *   messages; we exploit that by initializing them using CNF message
- *   offsets then copying values into REQ message offsets before each
- *   read; this works because confirmation messages always return all
- *   the data we request or nothing at all;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READPARAMETERBLOCK_SOURCE
-#define READPARAMETERBLOCK_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../pib/pib.h"
-#include "../plc/plc.h"
-
-signed PLCReadParameterBlock (struct channel * channel, struct message * message, void * memory, size_t extent)
-
-{
-	uint8_t * buffer = (uint8_t *)(memory);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t MSECRET [16];
-	}
-	* request = (struct vs_rd_mod_request *) (message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RESERVED1 [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t CHKSUM;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* confirm = (struct vs_rd_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint16_t length = 0;
-	uint32_t offset = 0;
-	signed actual = PLC_RECORD_SIZE;
-	do
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-		request->MODULEID = VS_MODULE_PIB;
-		request->MLENGTH = HTOLE16 (actual);
-		request->MOFFSET = HTOLE32 (offset);
-		if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-		{
-			error (1, errno, CHANNEL_CANTSEND);
-		}
-		if (readpacket (channel, message, sizeof (* message)) <= 0)
-		{
-			error (1, errno, CHANNEL_CANTREAD);
-		}
-		if (UnwantedMessage (message, sizeof (* confirm), 0, (VS_RD_MOD | MMTYPE_CNF)))
-		{
-			actual = PLC_RECORD_SIZE;
-			offset = 0;
-			continue;
-		}
-		if (confirm->MSTATUS)
-		{
-			error (1, ECANCELED, PLC_WONTDOIT);
-		}
-		if (LE16TOH (confirm->MLENGTH) != actual)
-		{
-			error (1, ECANCELED, PLC_ERR_LENGTH);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (1, ECANCELED, PLC_ERR_OFFSET);
-		}
-		actual = LE16TOH (confirm->MLENGTH);
-		offset = LE32TOH (confirm->MOFFSET);
-		if (checksum32 (confirm->BUFFER, actual, confirm->CHKSUM))
-		{
-			error (1, ECANCELED, "Bad Packet Checksum");
-		}
-		if (offset == length)
-		{
-			struct pib_header * pib_header = (struct pib_header *) (confirm->BUFFER);
-			length = LE16TOH (pib_header->PIBLENGTH);
-		}
-		if ((offset + actual) > length)
-		{
-			actual = length - offset;
-		}
-		memcpy (buffer + offset, confirm->BUFFER, actual);
-		offset += actual;
-		extent -= actual;
-	}
-	while (offset < length);
-	return (offset);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCSelect.c.html b/docbook/PLCSelect.c.html deleted file mode 100644 index 66264d5c..00000000 --- a/docbook/PLCSelect.c.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - PLCSelect.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PLCSelect (struct plc * plc, signed old (struct plc *), signed new (struct plc *));
- *
- *   plc.h
- *
- *   wait for device to start in order to determine chipset then call
- *   the approproate function based on chipset; unfortunately, chipset
- *   detection and selection may not be this simple in the future;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PLCSELECT_SOURCE
-#define PLCSELECT_SOURCE
-
-#include <stdlib.h>
-
-#include "../plc/plc.h"
-
-signed PLCSelect (struct plc * plc, signed old (struct plc *), signed new (struct plc *))
-
-{
-	char firmware [PLC_VERSION_STRING];
-	if (WaitForStart (plc, firmware, sizeof (firmware)))
-	{
-		Failure (plc, PLC_NODETECT);
-		exit (1);
-	}
-	return ((plc->hardwareID < CHIPSET_AR7400)? old (plc): new (plc));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCSession.c.html b/docbook/PLCSession.c.html deleted file mode 100644 index e9a3b80c..00000000 --- a/docbook/PLCSession.c.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - PLCSession.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   PLCSession.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef QCARAND_SOURCE
-#define QCARAND_SOURCE
-
-#include <stdint.h>
-
-#include "../tools/number.h"
-
-uint64_t QCASeed = 0;
-uint64_t QCASRand (uint32_t seed)
-
-{
-	uint64_t temp = QCASeed;
-	QCASeed = (uint64_t)(seed);
-	return (temp);
-}
-
-uint32_t QCARand ()
-
-{
-	QCASeed *= 0x41C64E6D;
-	QCASeed += 0x00003029;
-	return ((uint32_t)((QCASeed >> 0x10) & 0x7FFFFFFF));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCTopology.c.html b/docbook/PLCTopology.c.html deleted file mode 100644 index 21ec0c11..00000000 --- a/docbook/PLCTopology.c.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - PLCTopology.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   PLCTopology.c
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PLCTOPOLOGY_SOURCE
-#define PLCTOPOLOGY_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *
- *   signed PLCPlatform (struct channel * channel, struct plcstation * station);
- *
- *   populate plcstation structure with hardware and firmware version
- *   string using a VS_SW_VER message;
- *
- *   extern char const * chipset [] contains chipset name strings in
- *   order of chipset code but function chipset() must be called to
- *   insert the true code into the confirmation message because some
- *   chipsets return the wrong code; alien technology and voodoo are
- *   needed;
- *
- *--------------------------------------------------------------------*/
-
-static signed PLCPlatform (struct channel * channel, struct plcstation * plcstation)
-
-{
-	struct message message;
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (&message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICE;
-		uint8_t MLENGTH;
-		char MSTRING [0x80];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, plcstation->MAC, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) > 0)
-	{
-		while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-		{
-			if (!UnwantedMessage (&message, packetsize, 0, (VS_SW_VER | MMTYPE_CNF)))
-			{
-				chipset (confirm);
-				strncpy (plcstation->hardware, chipsetname (confirm->MDEVICE), sizeof (plcstation->hardware));
-				strncpy (plcstation->firmware, confirm->MSTRING, sizeof (plcstation->firmware));
-				return (0);
-			}
-		}
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed PLCIdentity (struct channel * channel, struct plcstation * station);
- *
- *   populate plcstation structure with the device identity using a
- *   VS_MFG_STRING message;
- *
- *--------------------------------------------------------------------*/
-
-static signed PLCIdentity (struct channel * channel, struct plcstation * plcstation)
-
-{
-	struct message message;
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_mfg_string_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_mfg_string_request *) (&message);
-	struct __packed vs_mfg_string_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MLENGTH;
-		char MSTRING [0x40];
-	}
-	* confirm = (struct vs_mfg_string_confirm *) (&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, plcstation->MAC, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MFG_STRING | MMTYPE_REQ));
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) > 0)
-	{
-		while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-		{
-			if (!UnwantedMessage (&message, packetsize, 0, (VS_MFG_STRING | MMTYPE_CNF)))
-			{
-				strncpy (plcstation->identity, confirm->MSTRING, sizeof (plcstation->identity));
-				return (0);
-			}
-		}
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed PLCTopology (struct channel * channel, struct message * message, struct plctopology * plctopology)
- *
- *   populate a plctopology structure with network information; the
- *   logic this is elusive due to the way the VS_NW_INFO message is
- *   structured;
- *
- *   the host can have many interfaces and each interface can have
- *   many powerline devices connected to it; each powerline device
- *   can bridge to an independent powerline network having a unique
- *   set of member devices; alternately, some powerline devices can
- *   be members of the same powerline network;
- *
- *   INT6x00 chipsets have an 8-bit PHY rate while AR7x00 chipsets
- *   have a 16-bit PHY rate; this means that AR7x00 PHY rates need
- *
- *--------------------------------------------------------------------*/
-
-signed PLCTopology (struct channel * channel, struct message * message, struct plctopology * plctopology)
-
-{
-	ssize_t packetsize;
-
-#if defined(INT6x00)
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t data [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->data);
-
-#elif defined (AR7x00)
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#else
-#error "Unspecified Atheros chipset"
-#endif
-
-	struct plcnetwork * plcnetwork = (struct plcnetwork *)(&plctopology->plcnetwork);
-	struct plcstation * plcstation;
-	byte bridges [255] [ETHER_ADDR_LEN];
-	unsigned bridge = LocalDevices (channel, message, bridges, (size_t)(sizeof (bridges)));
-	while (bridge--)
-	{
-		memset (message, 0, sizeof (* message));
-		memcpy (channel->peer, bridges [bridge], sizeof (channel->peer));
-
-#if defined (INT6x00)
-
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-
-#elif defined (AR7x00)
-
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-
-#else
-#error "Unspecified Atheros chipset"
-#endif
-
-		if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-		{
-			error (1, errno, CHANNEL_CANTSEND);
-		}
-		while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-		{
-
-#if defined (INT6x00)
-
-			if (UnwantedMessage (confirm, packetsize, 0, (VS_NW_INFO | MMTYPE_CNF)))
-
-#elif defined (AR7x00)
-
-			if (UnwantedMessage (confirm, packetsize, 1, (VS_NW_INFO | MMTYPE_CNF)))
-
-#else
-#error "Unspecified Atheros chipset"
-#endif
-
-			{
-				continue;
-			}
-			network = (struct network *)(&networks->networks);
-			plcstation = (struct plcstation *)(&plcnetwork->plcstation);
-			memset (plcnetwork, 0, sizeof (* plcnetwork));
-			memset (plcstation, 0, sizeof (* plcstation));
-			plcstation->LOC = !memcmp (confirm->ethernet.OSA, bridges [bridge], sizeof (confirm->ethernet.OSA));
-			plcstation->CCO = !memcmp (confirm->ethernet.OSA, network->CCO_MAC, sizeof (confirm->ethernet.OSA));
-			plcstation->TEI = network->TEI;
-			memcpy (plcstation->MAC, confirm->ethernet.OSA, sizeof (plcstation->MAC));
-			memcpy (plcstation->BDA, confirm->ethernet.ODA, sizeof (plcstation->BDA));
-			PLCPlatform (channel, plcstation);
-			plcnetwork->plcstations++;
-			plcstation++;
-			while (networks->NUMAVLNS--)
-			{
-				station = (struct station *)(&network->stations);
-				while (network->NUMSTAS--)
-				{
-					memset (plcstation, 0, sizeof (* plcstation));
-					plcstation->LOC = !memcmp (station->BDA, channel->host, sizeof (station->BDA));
-					plcstation->CCO = !memcmp (station->MAC, network->CCO_MAC, sizeof (station->MAC));
-					plcstation->TEI = station->TEI;
-					memcpy (plcstation->MAC, station->MAC, sizeof (plcstation->MAC));
-					memcpy (plcstation->BDA, station->BDA, sizeof (plcstation->BDA));
-
-#if defined (INT6x00)
-
-					plcstation->TX = station->AVGTX;
-					plcstation->RX = station->AVGRX;
-
-#elif defined (AR7x00)
-
-					plcstation->TX = LE16TOH (station->AVGTX);
-					plcstation->RX = LE16TOH (station->AVGRX);
-
-#else
-#error "Unspecified Atheros chipset"
-#endif
-
-					PLCPlatform (channel, plcstation);
-					PLCIdentity (channel, plcstation);
-					plcnetwork->plcstations++;
-					plcstation++;
-					station++;
-				}
-				plctopology->plcnetworks++;
-				plcnetwork = (struct plcnetwork *)(plcstation);
-				network = (struct network *)(station);
-			}
-		}
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/PLCTopologyPrint.c.html b/docbook/PLCTopologyPrint.c.html deleted file mode 100644 index e659bf11..00000000 --- a/docbook/PLCTopologyPrint.c.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - PLCTopologyPrint.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed TopologyPrint (struct plcnetworks * plctopology);
- *
- *   plc.h
- *
- *   print plctopology structure in human readable format on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TOPOLOGYPRINT_SOURCE
-#define TOPOLOGYPRINT_SOURCE
-
-#include <stdio.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-
-signed PLCTopologyPrint (struct plctopology * plctopology)
-
-{
-	signed plcnetworks = plctopology->plcnetworks;
-	struct plcnetwork * plcnetwork = (struct plcnetwork *)(&plctopology->plcnetwork);
-	while (plcnetworks--)
-	{
-		signed plcstations = plcnetwork->plcstations;
-		struct plcstation * plcstation = (struct plcstation *)(&plcnetwork->plcstation);
-		while (plcstations--)
-		{
-			char address [ETHER_ADDR_LEN * 3];
-			printf ("%s ", plcstation->LOC? "LOC": "REM");
-			printf ("%s ", plcstation->CCO? "CCO": "STA");
-			printf ("%03d ", plcstation->TEI);
-			printf ("%s ", hexstring (address, sizeof (address), plcstation->MAC, sizeof (plcstation->MAC)));
-			printf ("%s ", hexstring (address, sizeof (address), plcstation->BDA, sizeof (plcstation->BDA)));
-			printf ("%03d ", plcstation->RX);
-			printf ("%03d ", plcstation->TX);
-			printf ("%s ", plcstation->hardware);
-			printf ("%s ", plcstation->firmware);
-			printf ("\n");
-			plcstation++;
-		}
-		plcnetwork = (struct plcnetwork *)(plcstation);
-	}
-
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Packet32.h.html b/docbook/Packet32.h.html deleted file mode 100644 index 76c7294f..00000000 --- a/docbook/Packet32.h.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - Packet32.h - - - - - - - - - -
-/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/** @ingroup packetapi
- *  @{ 
- */
-
-/** @defgroup packet32h Packet.dll definitions and data structures
- *  Packet32.h contains the data structures and the definitions used by packet.dll.
- *  The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included
- *  by the applications that use the functions of this library
- *  @{
- */
-
-#ifndef __PACKET32
-#define __PACKET32
-
-#include <winsock2.h>
-
-#ifdef HAVE_AIRPCAP_API
-#include <airpcap.h>
-#else
-#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
-#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
-typedef struct _AirpcapHandle *PAirpcapHandle;
-#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */
-#endif /* HAVE_AIRPCAP_API */
-
-#ifdef HAVE_DAG_API
-#include <dagc.h>
-#endif /* HAVE_DAG_API */
-
-// Working modes
-#define PACKET_MODE_CAPT 0x0 ///< Capture mode
-#define PACKET_MODE_STAT 0x1 ///< Statistical mode
-#define PACKET_MODE_MON 0x2 ///< Monitoring mode
-#define PACKET_MODE_DUMP 0x10 ///< Dump mode
-#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode
-
-/// Alignment macro. Defines the alignment size.
-#define Packet_ALIGNMENT sizeof(int)
-/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. 
-#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
-
-#define NdisMediumNull	-1		///< Custom linktype: NDIS doesn't provide an equivalent
-#define NdisMediumCHDLC	-2		///< Custom linktype: NDIS doesn't provide an equivalent
-#define NdisMediumPPPSerial	-3	///< Custom linktype: NDIS doesn't provide an equivalent
-#define NdisMediumBare80211	-4	///< Custom linktype: NDIS doesn't provide an equivalent
-#define NdisMediumRadio80211	-5	///< Custom linktype: NDIS doesn't provide an equivalent
-#define NdisMediumPpi		-6	///< Custom linktype: NDIS doesn't provide an equivalent
-
-// Loopback behaviour definitions
-#define NPF_DISABLE_LOOPBACK	1	///< Drop the packets sent by the NPF driver
-#define NPF_ENABLE_LOOPBACK		2	///< Capture the packets sent by the NPF driver
-
-/*!
-  \brief Network type structure.
-
-  This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed.
-*/
-typedef struct NetType
-{
-	UINT LinkType;	///< The MAC of the current network adapter (see function PacketGetNetType() for more information)
-	ULONGLONG LinkSpeed;	///< The speed of the network in bits per second
-}NetType;
-
-//some definitions stolen from libpcap
-
-#ifndef BPF_MAJOR_VERSION
-
-/*!
-  \brief A BPF pseudo-assembly program.
-
-  The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. 
-*/
-struct bpf_program 
-{
-	UINT bf_len;				///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow.
-	struct bpf_insn *bf_insns;	///< A pointer to the first instruction of the program.
-};
-
-/*!
-  \brief A single BPF pseudo-instruction.
-
-  bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver.
-*/
-struct bpf_insn 
-{
-	USHORT	code;		///< Instruction type and addressing mode.
-	UCHAR 	jt;			///< Jump if true
-	UCHAR 	jf;			///< Jump if false
-	int k;				///< Generic field used for various purposes.
-};
-
-/*!
-  \brief Structure that contains a couple of statistics values on the current capture.
-
-  It is used by packet.dll to return statistics about a capture session.
-*/
-struct bpf_stat 
-{
-	UINT bs_recv;		///< Number of packets that the driver received from the network adapter 
-						///< from the beginning of the current capture. This value includes the packets 
-						///< lost by the driver.
-	UINT bs_drop;		///< number of packets that the driver lost from the beginning of a capture. 
-						///< Basically, a packet is lost when the the buffer of the driver is full. 
-						///< In this situation the packet cannot be stored and the driver rejects it.
-	UINT ps_ifdrop;		///< drops by interface. XXX not yet supported
-	UINT bs_capt;		///< number of packets that pass the filter, find place in the kernel buffer and
-						///< thus reach the application.
-};
-
-/*!
-  \brief Packet header.
-
-  This structure defines the header associated with every packet delivered to the application.
-*/
-struct bpf_hdr 
-{
-	struct timeval	bh_tstamp;	///< The timestamp associated with the captured packet. 
-								///< It is stored in a TimeVal structure.
-	UINT	bh_caplen;			///< Length of captured portion. The captured portion <b>can be different</b>
-								///< from the original packet, because it is possible (with a proper filter)
-								///< to instruct the driver to capture only a portion of the packets.
-	UINT	bh_datalen;			///< Original length of packet
-	USHORT		bh_hdrlen;		///< Length of bpf header (this struct plus alignment padding). In some cases,
-								///< a padding could be added between the end of this structure and the packet
-								///< data for performance reasons. This filed can be used to retrieve the actual data 
-								///< of the packet.
-};
-
-/*!
-  \brief Dump packet header.
-
-  This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets().
-  It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a
-  packet in a dump file. This makes straightforward sending WinPcap dump files to the network.
-*/
-struct dump_bpf_hdr{
-    struct timeval	ts;			///< Time stamp of the packet
-    UINT			caplen;		///< Length of captured portion. The captured portion can smaller than the 
-								///< the original packet, because it is possible (with a proper filter) to 
-								///< instruct the driver to capture only a portion of the packets. 
-    UINT			len;		///< Length of the original packet (off wire).
-};
-
-#endif
-
-struct bpf_stat;
-
-#define        DOSNAMEPREFIX   TEXT("Packet_")	///< Prefix added to the adapters device names to create the WinPcap devices
-#define        MAX_LINK_NAME_LENGTH	64			//< Maximum length of the devices symbolic links
-#define        NMAX_PACKET 65535
-
-/*!
-  \brief Addresses of a network adapter.
-
-  This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with 
-  an adapter.
-*/
-typedef struct npf_if_addr {
-	struct sockaddr_storage IPAddress;	///< IP address.
-	struct sockaddr_storage SubnetMask;	///< Netmask for that address.
-	struct sockaddr_storage Broadcast;	///< Broadcast address.
-}npf_if_addr;
-
-#define ADAPTER_NAME_LENGTH 256 + 12	///<  Maximum length for the name of an adapter. The value is the same used by the IP Helper API.
-#define ADAPTER_DESC_LENGTH 128			///<  Maximum length for the description of an adapter. The value is the same used by the IP Helper API.
-#define MAX_MAC_ADDR_LENGTH 8			///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
-#define MAX_NETWORK_ADDRESSES 16		///<  Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
-
-typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
-typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
-
-#define INFO_FLAG_NDIS_ADAPTER		0	///< Flag for ADAPTER_INFO: this is a traditional ndis adapter
-#define INFO_FLAG_NDISWAN_ADAPTER	1	///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET
-#define INFO_FLAG_DAG_CARD			2	///< Flag for ADAPTER_INFO: this is a DAG card
-#define INFO_FLAG_DAG_FILE			6	///< Flag for ADAPTER_INFO: this is a DAG file
-#define INFO_FLAG_DONT_EXPORT		8	///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones.
-#define INFO_FLAG_AIRPCAP_CARD		16	///< Flag for ADAPTER_INFO: this is an airpcap card
-#define INFO_FLAG_NPFIM_DEVICE		32
-
-/*!
-  \brief Describes an opened network adapter.
-
-  This structure is the most important for the functioning of packet.dll, but the great part of its fields
-  should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters
-*/
-typedef struct _ADAPTER  { 
-	HANDLE hFile;				///< \internal Handle to an open instance of the NPF driver.
-	CHAR  SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened.
-	int NumWrites;				///< \internal Number of times a packets written on this adapter will be repeated 
-								///< on the wire.
-	HANDLE ReadEvent;			///< A notification event associated with the read calls on the adapter.
-								///< It can be passed to standard Win32 functions (like WaitForSingleObject
-								///< or WaitForMultipleObjects) to wait until the driver's buffer contains some 
-								///< data. It is particularly useful in GUI applications that need to wait 
-								///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy()
-								///< function can be used to define the minimum amount of data in the kernel buffer
-								///< that will cause the event to be signalled. 
-	
-	UINT ReadTimeOut;			///< \internal The amount of time after which a read on the driver will be released and 
-								///< ReadEvent will be signaled, also if no packets were captured
-	CHAR Name[ADAPTER_NAME_LENGTH];
-	PWAN_ADAPTER pWanAdapter;
-	UINT Flags;					///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
-
-#ifdef HAVE_AIRPCAP_API
-	PAirpcapHandle	AirpcapAd;
-#endif // HAVE_AIRPCAP_API
-
-#ifdef HAVE_NPFIM_API
-	void* NpfImHandle;
-#endif // HAVE_NPFIM_API
-
-#ifdef HAVE_DAG_API
-	dagc_t *pDagCard;			///< Pointer to the dagc API adapter descriptor for this adapter
-	PCHAR DagBuffer;			///< Pointer to the buffer with the packets that is received from the DAG card
-	struct timeval DagReadTimeout;	///< Read timeout. The dagc API requires a timeval structure
-	unsigned DagFcsLen;			///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry
-	DWORD DagFastProcess;		///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps).
-#endif // HAVE_DAG_API
-}  ADAPTER, *LPADAPTER;
-
-/*!
-  \brief Structure that contains a group of packets coming from the driver.
-
-  This structure defines the header associated with every packet delivered to the application.
-*/
-typedef struct _PACKET {  
-	HANDLE       hEvent;		///< \deprecated Still present for compatibility with old applications.
-	OVERLAPPED   OverLapped;	///< \deprecated Still present for compatibility with old applications.
-	PVOID        Buffer;		///< Buffer with containing the packets. See the PacketReceivePacket() for
-								///< details about the organization of the data in this buffer
-	UINT         Length;		///< Length of the buffer
-	DWORD        ulBytesReceived;	///< Number of valid bytes present in the buffer, i.e. amount of data
-									///< received by the last call to PacketReceivePacket()
-	BOOLEAN      bIoComplete;	///< \deprecated Still present for compatibility with old applications.
-}  PACKET, *LPPACKET;
-
-/*!
-  \brief Structure containing an OID request.
-
-  It is used by the PacketRequest() function to send an OID to the interface card driver. 
-  It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, 
-  the list of the multicast groups defined on it, and so on.
-*/
-struct _PACKET_OID_DATA {
-    ULONG Oid;					///< OID code. See the Microsoft DDK documentation or the file ntddndis.h
-								///< for a complete list of valid codes.
-    ULONG Length;				///< Length of the data field
-    UCHAR Data[1];				///< variable-lenght field that contains the information passed to or received 
-								///< from the adapter.
-}; 
-typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  @}
- */
-
-/*
-BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName,
-								 CHAR *Value,
-								 UINT *pValueLen,
-								 CHAR *DefaultVal);
-
-BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName,
-								 WCHAR *Value,
-								 UINT *pValueLen,
-								 WCHAR *DefaultVal);
-*/
-								 
-//---------------------------------------------------------------------------
-// EXPORTED FUNCTIONS
-//---------------------------------------------------------------------------
-
-PCHAR PacketGetVersion();
-PCHAR PacketGetDriverVersion();
-BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes);
-BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites);
-BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode);
-BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout);
-BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp);
-BOOLEAN PacketSetLoopbackBehavior(LPADAPTER  AdapterObject, UINT LoopbackBehavior);
-INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen);
-BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s);
-BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s);
-BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim);
-BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type);
-LPADAPTER PacketOpenAdapter(PCHAR AdapterName);
-BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync);
-INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync);
-LPPACKET PacketAllocatePacket(void);
-VOID PacketInitPacket(LPPACKET lpPacket,PVOID  Buffer,UINT  Length);
-VOID PacketFreePacket(LPPACKET lpPacket);
-BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync);
-BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter);
-BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG  BufferSize);
-BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries);
-BOOLEAN PacketRequest(LPADAPTER  AdapterObject,BOOLEAN Set,PPACKET_OID_DATA  OidData);
-HANDLE PacketGetReadEvent(LPADAPTER AdapterObject);
-BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len);
-BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks);
-BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync);
-BOOL PacketStopDriver();
-VOID PacketCloseAdapter(LPADAPTER lpAdapter);
-BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength);
-BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags);
-PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject);
-
-//
-// Used by PacketStartOemEx
-//
-#define PACKET_START_OEM_NO_NETMON	0x00000001
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif //__PACKET32
-
- - - diff --git a/docbook/ParseRule.c.html b/docbook/ParseRule.c.html deleted file mode 100644 index f6a08771..00000000 --- a/docbook/ParseRule.c.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - ParseRule.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ParseRule (int * argcp, char const * argvp [], struct rule * rule, struct cspec * cspec);
- *
- *   rules.h
- *
- *   This module takes an argument vector and an argument count
- *   and fills in a classification rule structure that is suitable for
- *   sending in a VS_CLASSIFICATION MME;
- *
- *   This module is currently used by plcrule and pibruin;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../ether/ether.h"
-#include "../plc/rules.h"
-
-signed ParseRule (int * argcp, char const ** argvp [], struct MMERule * rule, struct cspec * cspec)
-
-{
-	int argc = * argcp;
-	char const ** argv = * argvp;
-	union 
-	{
-		uint32_t wide;
-		uint16_t word;
-		uint8_t byte [4];
-	}
-	temp;
-	signed code;
-	struct MMEClassifier * classifier = (struct MMEClassifier *) (& rule->CLASSIFIER);
-	if ((code = lookup (* argv++, actions, SIZEOF (actions))) == -1)
-	{
-		assist (* -- argv, CLASSIFIER_ACTION_NAME, actions, SIZEOF (actions));
-	}
-	rule->MACTION = (uint8_t) (code);
-	argc--;
-	if ((code = lookup (* argv++, operands, SIZEOF (operands))) == -1)
-	{
-		assist (* -- argv, CLASSIFIER_OPERAND_NAME, operands, SIZEOF (operands));
-	}
-	rule->MOPERAND = (uint8_t) (code);
-	argc--;
-	while ((* argv) && (lookup (* argv, controls, SIZEOF (controls)) == -1))
-	{
-		if ((code = lookup (* argv++, fields, SIZEOF (fields))) == -1)
-		{
-			assist (* -- argv, CLASSIFIER_FIELD_NAME, fields, SIZEOF (fields));
-		}
-		classifier->CR_PID = (uint8_t) (code);
-		argc--;
-		if ((code = lookup (* argv++, operators, SIZEOF (operators))) == -1)
-		{
-			assist (* -- argv, CLASSIFIER_OPERATOR_NAME, operators, SIZEOF (operators));
-		}
-		classifier->CR_OPERAND = (uint8_t) (code);
-		argc--;
-		if (! argc || ! * argv)
-		{
-			error (1, ENOTSUP, "I have %s '%s' but no value", CLASSIFIER_OPERATOR_NAME, * -- argv);
-		}
-		switch (classifier->CR_PID)
-		{
-		case FIELD_ETH_SA:
-		case FIELD_ETH_DA:
-			bytespec (* argv++, classifier->CR_VALUE, ETHER_ADDR_LEN);
-			break;
-		case FIELD_IPV4_SA:
-		case FIELD_IPV4_DA:
-			ipv4spec (* argv++, classifier->CR_VALUE);
-			break;
-		case FIELD_IPV6_SA:
-		case FIELD_IPV6_DA:
-			ipv6spec (* argv++, classifier->CR_VALUE);
-			break;
-		case FIELD_VLAN_UP:
-		case FIELD_IPV6_TC:
-		case FIELD_IPV4_TOS:
-		case FIELD_IPV4_PROT:
-			classifier->CR_VALUE [0] = (uint8_t) (basespec (* argv++, 0, sizeof (classifier->CR_VALUE [0])));
-			break;
-		case FIELD_VLAN_ID:
-		case FIELD_TCP_SP:
-		case FIELD_TCP_DP:
-		case FIELD_UDP_SP:
-		case FIELD_UDP_DP:
-		case FIELD_IP_SP:
-		case FIELD_IP_DP:
-			temp.word = (uint16_t) (basespec (* argv++, 0, sizeof (temp.word)));
-			temp.word = htons (temp.word);
-			memcpy (classifier->CR_VALUE, & temp, sizeof (temp.word));
-			break;
-		case FIELD_ETH_TYPE:
-			temp.word = (uint16_t) (basespec (* argv++, 0, sizeof (temp.word)));
-			temp.word = htons (temp.word);
-			memcpy (classifier->CR_VALUE, & temp, sizeof (temp.word));
-			break;
-		case FIELD_IPV6_FL:
-			temp.wide = (uint32_t) (basespec (* argv++, 0, sizeof (temp.wide))) & 0x000FFFFF;
-			temp.wide = htonl (temp.wide);
-			memcpy (classifier->CR_VALUE, & temp.byte [1], 3);
-			break;
-		case FIELD_HPAV_MME:
-			bytespec (* argv++, classifier->CR_VALUE, sizeof (uint16_t) +  sizeof (uint8_t));
-			temp.byte [0] = classifier->CR_VALUE [1];
-			classifier->CR_VALUE [1] = classifier->CR_VALUE [2];
-			classifier->CR_VALUE [2] = temp.byte [0];
-			break;
-		case FIELD_TCP_ACK:
-			if ((code = lookup (* argv++, states, SIZEOF (states))) == -1)
-			{
-				assist (* -- argv, CLASSIFIER_STATE_NAME, states, SIZEOF (states));
-			}
-			memset (classifier->CR_VALUE, 0, sizeof (classifier->CR_VALUE));
-			break;
-		case FIELD_VLAN_TAG:
-			if ((code = lookup (* argv++, states, SIZEOF (states))) == -1)
-			{
-				assist (* -- argv, CLASSIFIER_STATE_NAME, states, SIZEOF (states));
-			}
-			memset (classifier->CR_VALUE, 0, sizeof (classifier->CR_VALUE));
-			classifier->CR_OPERAND ^= code;
-			break;
-		default: 
-			error (1, ENOTSUP, "%s", argv [- 2]);
-			break;
-		}
-		rule->NUM_CLASSIFIERS++;
-		classifier++;
-		argc--;
-	}
-	memcpy (classifier, cspec, sizeof (* cspec));
-	if ((code = lookup (* argv++, controls, SIZEOF (controls))) == -1)
-	{
-		assist (* -- argv, CLASSIFIER_CONTROL_NAME, controls, SIZEOF (controls));
-	}
-	rule->MCONTROL = (uint8_t) (code);
-	argc--;
-	if ((code = lookup (* argv++, volatilities, SIZEOF (volatilities))) == -1)
-	{
-		assist (* -- argv, CLASSIFIER_VOLATILITY_NAME, volatilities, SIZEOF (volatilities));
-	}
-	rule->MVOLATILITY = (uint8_t) (code);
-	argc--;
-	* argcp = argc;
-	* argvp = argv;
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/PhyRates.c.html b/docbook/PhyRates.c.html deleted file mode 100644 index 5e13e189..00000000 --- a/docbook/PhyRates.c.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - PhyRates.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PhyRates (struct plc * plc)
- *
- *   plc.h
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PHYRATES_SOURCE
-#define PHYRATES_SOURCE
-
-#include "../plc/plc.h"
-
-signed PhyRates (struct plc * plc)
-
-{
-	return (PLCSelect (plc, PhyRates1, PhyRates2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PhyRates1.c.html b/docbook/PhyRates1.c.html deleted file mode 100644 index 0fd3fde5..00000000 --- a/docbook/PhyRates1.c.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - PhyRates1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PhyRates1 (struct plc * plc);
- *
- *   An INT6x00 only version;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PHYRATES1_SOURCE
-#define PHYRATES1_SOURCE
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed PhyRates1 (struct plc * plc)
-
-{
-	extern const byte broadcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t data [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->data);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_NW_INFO | MMTYPE_CNF)) > 0)
-	{
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (memcmp (station->MAC, broadcast, sizeof (broadcast)))
-				{
-					char address [ETHER_ADDR_LEN * 3];
-					hexdecode (station->MAC, sizeof (station->MAC), address, sizeof (address));
-					if (_anyset (plc->flags, PLC_UNCODED_RATES))
-					{
-						station->AVGTX = ((station->AVGTX * 21) >> 4);
-						station->AVGRX = ((station->AVGRX * 21) >> 4);
-					}
-					Display (plc, "%s TX %03d mbps", address, station->AVGTX);
-					Display (plc, "%s RX %03d mbps", address, station->AVGRX);
-					if (_anyset (plc->flags, PLC_BAILOUT))
-					{
-						if (!station->AVGTX || !station->AVGRX)
-						{
-							error (PLC_EXIT (plc), ECANCELED, PLC_BADVALUE);
-							return (-1);
-						}
-					}
-				}
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PhyRates2.c.html b/docbook/PhyRates2.c.html deleted file mode 100644 index 2b8d9ec3..00000000 --- a/docbook/PhyRates2.c.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - PhyRates2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PhyRates2 (struct plc * plc);
- *
- *   plc.h
- *
- *   An AR7x00 only version;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PHYRATES2_SOURCE
-#define PHYRATES2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed PhyRates2 (struct plc * plc)
-
-{
-	extern const byte broadcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) > 0)
-	{
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (memcmp (station->MAC, broadcast, sizeof (broadcast)))
-				{
-					char address [ETHER_ADDR_LEN * 3];
-					char * TX = "";
-					char * RX = "";
-					hexdecode (station->MAC, sizeof (station->MAC), address, sizeof (address));
-					station->AVGTX = LE16TOH (station->AVGTX);
-					station->AVGRX = LE16TOH (station->AVGRX);
-					TX = ((station->COUPLING >> 0) & 0x0F)? "Alternate": "Primary";
-					RX = ((station->COUPLING >> 4) & 0x0F)? "Alternate": "Primary";
-					if (_anyset (plc->flags, PLC_UNCODED_RATES))
-					{
-						station->AVGTX = ((station->AVGTX * 21) >> 4);
-						station->AVGRX = ((station->AVGRX * 21) >> 4);
-					}
-					Display (plc, "%s TX %03d mbps %s", address, station->AVGTX, TX);
-					Display (plc, "%s RX %03d mbps %s", address, station->AVGRX, RX);
-					if (_anyset (plc->flags, PLC_BAILOUT))
-					{
-						if (!station->AVGTX || !station->AVGRX)
-						{
-							error (PLC_EXIT (plc), ECANCELED, PLC_BADVALUE);
-							return (-1);
-						}
-					}
-				}
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Platform.c.html b/docbook/Platform.c.html deleted file mode 100644 index ebc6a3cf..00000000 --- a/docbook/Platform.c.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - Platform.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Platform (struct channel * channel, const uint8_t device []);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PLATFORM_SOURCE
-#define PLATFORM_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed Platform (struct channel * channel, const uint8_t device [])
-
-{
-	struct message message;
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (&message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, device, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) > 0)
-	{
-		while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-		{
-			if (!UnwantedMessage (&message, packetsize, 0, (VS_SW_VER | MMTYPE_CNF)))
-			{
-				chipset (confirm);
-				printf (" %s", chipsetname (confirm->MDEVICEID));
-				printf (" %s", confirm->MVERSION);
-				return (0);
-			}
-		}
-	}
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PrintRule.c.html b/docbook/PrintRule.c.html deleted file mode 100644 index 44883b9f..00000000 --- a/docbook/PrintRule.c.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - PrintRule.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PrintRule (uint32_t CR_PID, uint32_t CR_OPERAND, uint8_t CR_VALUE []);
- *
- *   rules.h
- *
- *   print one classifier rule on stdout;
- *
- *   some classifier rule structures have an 8-bit PID and OPERAND
- *   while others have a 32-bit PID and OPERAND; this function is
- *   the common demominator;
- *
- *   Contributor(s):
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PRINTRULE_SOURCE
-#define PRINTRULE_SOURCE
-
-#include <string.h>
-
-#include "../plc/rules.h"
-#include "../tools/error.h"
-
-signed PrintRule (uint32_t CR_PID, uint32_t CR_OPERAND, uint8_t CR_VALUE [])
-
-{
-	char buffer [CLASSIFIER_STRING];
-	uint32_t val32;
-	uint16_t val16;
-	uint8_t val8;
-	const char * p1;
-	const char * p2;
-	p1 = reword (CR_PID, fields, SIZEOF (fields));
-	if (p1 == NULL)
-	{
-		error (1, 0, "invalid classifier PID");
-	}
-	p2 = reword (CR_OPERAND, operators, SIZEOF (operators));
-	if (p2 == NULL)
-	{
-		error (1, 0, "invalid classifier operand");
-	}
-	printf ("%s %s", p1, p2);
-	switch (CR_PID)
-	{
-	case FIELD_ETH_SA:
-	case FIELD_ETH_DA:
-		printf (" %s", hexstring (buffer, sizeof (buffer), CR_VALUE, ETHER_ADDR_LEN));
-		break;
-	case FIELD_IPV4_SA:
-	case FIELD_IPV4_DA:
-		putchar (' ');
-		memout (CR_VALUE, IPv4_LEN, "%d", 1, '.', 0, stdout);
-		break;
-	case FIELD_IPV6_SA:
-	case FIELD_IPV6_DA:
-		putchar (' ');
-		memout (CR_VALUE, IPv6_LEN, "%02x", 2, ':', 0, stdout);
-		break;
-	case FIELD_VLAN_UP:
-	case FIELD_IPV6_TC:
-	case FIELD_IPV4_TOS:
-	case FIELD_IPV4_PROT:
-		memcpy (& val8, CR_VALUE, sizeof (val8));
-		printf (" 0x%02X", val8);
-		break;
-	case FIELD_VLAN_ID:
-	case FIELD_TCP_SP:
-	case FIELD_TCP_DP:
-	case FIELD_UDP_SP:
-	case FIELD_UDP_DP:
-	case FIELD_IP_SP:
-	case FIELD_IP_DP:
-		memcpy (& val16, CR_VALUE, sizeof (val16));
-		val16 = ntohs (val16);
-		printf (" %d", val16);
-		break;
-	case FIELD_ETH_TYPE:
-		memcpy (& val16, CR_VALUE, sizeof (val16));
-		val16 = ntohs (val16);
-		printf (" 0x%04X", val16);
-		break;
-	case FIELD_IPV6_FL:
-		memcpy (& val32, & CR_VALUE [0], sizeof (val32));
-		val32 = ntohl (val32);
-		printf (" 0x%08X", val32);
-		break;
-	case FIELD_HPAV_MME:
-		memcpy (& val8, & CR_VALUE [0], sizeof (val8));
-		memcpy (& val16, & CR_VALUE [1], sizeof (val16));
-		printf (" %02x:%04x", val8, val16);
-		break;
-	case FIELD_TCP_ACK:
-		{
-			code_t val;
-			const char * p;
-			memcpy (& val, CR_VALUE, sizeof (val));
-			p = reword (val, states, SIZEOF (states));
-			if (p == NULL)
-			{
-				error (1, 0, "invalid TCP ACK flag");
-			}
-			printf (" %s", p);
-		}
-		break;
-	case FIELD_VLAN_TAG:
-		{
-			code_t val;
-			const char * p;
-			memcpy (& val, CR_VALUE, sizeof (val));
-			p = reword (val, states, SIZEOF (states));
-			if (p == NULL)
-			{
-				error (1, 0, "invalid VLAN tag flag");
-			}
-			printf (" %s", p);
-		}
-		break;
-	default:
-		printf (" *****UNSUPPORTED CODE*****");
-		break;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/PushButton.c.html b/docbook/PushButton.c.html deleted file mode 100644 index a0a7e547..00000000 --- a/docbook/PushButton.c.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - PushButton.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PushButton (struct plc * plc);
- *
- *   plc.h
- *
- *   THis plugin for program plc emulates pushbutton functionality
- *   using a MS_PB_ENC message;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef PUSHBUTTON_SOURCE
-#define PUSHBUTTON_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../plc/plc.h"
-
-signed PushButton (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed ms_pb_enc_request
-	{
-		struct ethernet_hdr ethernet;
-		struct homeplug_hdr homeplug;
-		uint8_t PBACTION;
-	}
-	* request = (struct ms_pb_enc_request *) (message);
-	struct __packed ms_pb_enc_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct homeplug_hdr homeplug;
-		uint8_t MSTATUS;
-		uint8_t AVLNSTAT;
-	}
-	* confirm = (struct ms_pb_enc_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	if (plc->pushbutton == 1)
-	{
-		Request (plc, "Join Network");
-	}
-	if (plc->pushbutton == 2)
-	{
-		Request (plc, "Leave Network");
-	}
-	if (plc->pushbutton == 3)
-	{
-		Request (plc, "Fetch Network Status");
-	}
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	request->homeplug.MMV = 0;
-	request->homeplug.MMTYPE = HTOLE16 (MS_PB_ENC | MMTYPE_REQ);
-	request->PBACTION = plc->pushbutton;
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMFG (plc, 0, (MS_PB_ENC | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	if (plc->pushbutton == 1)
-	{
-		Confirm (plc, "Joining ...");
-		return (0);
-	}
-	if (plc->pushbutton == 2)
-	{
-		Confirm (plc, "Leaving ...");
-		return (0);
-	}
-	if (plc->pushbutton == 3)
-	{
-		Confirm (plc, "Membership Status %d", confirm->AVLNSTAT);
-		return (0);
-	}
-	Failure (plc, "Unexpected pushbutton action code");
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/QCARand.c.html b/docbook/QCARand.c.html deleted file mode 100644 index 867f0103..00000000 --- a/docbook/QCARand.c.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - QCARand.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   QCARand.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef QCARAND_SOURCE
-#define QCARAND_SOURCE
-
-#include <stdint.h>
-
-#include "../tools/number.h"
-
-uint64_t QCASeed = 0;
-uint64_t QCASRand (uint64_t seed)
-
-{
-	uint64_t temp = QCASeed;
-	QCASeed = seed;
-	return (temp);
-}
-
-uint32_t QCARand ()
-
-{
-	QCASeed *= 0x41C64E6D;
-	QCASeed += 0x00003029;
-	return ((uint32_t)((QCASeed >> 0x10) & 0x7FFFFFFF));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/QualcommHeader.c.html b/docbook/QualcommHeader.c.html deleted file mode 100644 index fd633785..00000000 --- a/docbook/QualcommHeader.c.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - QualcommHeader.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed QualcommHeader (struct qualcomm_hdr * header, uint8_t MMV, uint16_t MMTYPE);
- *
- *   mme.h
- *
- *   Encode memory with an Atheros vendor specific message header
- *   having HomePlug message protocol version (INTELLON_MMV) and
- *   Atheros message type (MMTYPE);
- *
- *   return the number of bytes actually encoded or 0 on encode error;
- *   the error code is stored in errno;
- *
- *   MMTYPE indicates the desired Atheros device operation taken
- *   from the TRM; some operations are undocumented and should not
- *   be used;
- *
- *   OUI is the Organizationally Unique Identifier resgistered with
- *   the IEEE by the vendor and is a constant for Atheros Devices;
- *
- *   There is no need to flush the header since this function writes
- *   to all locations unless there is an error; the caller may elect
- *   to flush the buffer before calling this function;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef QUALCOMMHEADER_SOURCE
-#define QUALCOMMHEADER_SOURCE
-
-#include <stdint.h>
-
-#include "../mme/mme.h"
-#include "../tools/endian.h"
-
-signed QualcommHeader (struct qualcomm_hdr * header, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	header->MMV = MMV;
-	header->MMTYPE = HTOLE16 (MMTYPE);
-	header->OUI [0] = 0x00;
-	header->OUI [1] = 0xB0;
-	header->OUI [2] = 0x52;
-	return (sizeof (* header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/QualcommHeader1.c.html b/docbook/QualcommHeader1.c.html deleted file mode 100644 index b5e11dc1..00000000 --- a/docbook/QualcommHeader1.c.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - QualcommHeader1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed QualcommHeader1 (struct qualcomm_fmi * header, uint8_t MMV, uint16_t MMTYPE, uint16_tFMI);
- *
- *   mme.h
- *
- *   Encode memory with an Atheros vendor specific message header
- *   having HomePlug message protocol version (INTELLON_MMV) and
- *   Atheros message type (MMTYPE);
- *
- *   return the number of bytes actually encoded or 0 on encode error;
- *   the error code is stored in errno;
- *
- *   see the INT6000 Firmware Technical Reference Manual for more
- *   about MME headers and message types; the Atheros OUI is
- *   implicit in this function;
- *
- *   MMV is the version number of the MME command set; currently,
- *   there is only one command set for Atheros MMEs;
- *
- *   MMTYPE indicates the desired Atheros device operation taken
- *   from the TRM; some operations are undocumented and should not
- *   be used;
- *
- *   OUI is the Organizationally Unique Identifier resgistered with
- *   the IEEE by the vendor and is a constant for Atheros Devices;
- *
- *   There is no need to flush the header since this function writes
- *   to all locations unless there is an error; the caller may elect
- *   to flush the buffer before calling this function;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef QUALCOMMHEADER1_SOURCE
-#define QUALCOMMHEADER1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/endian.h"
-#include "../mme/mme.h"
-
-signed QualcommHeader1 (struct qualcomm_fmi * header, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	header->MMV = MMV;
-	header->MMTYPE = HTOLE16 (MMTYPE);
-	header->FMSN = 0;
-	header->FMID = 0;
-	header->OUI [0] = 0x00;
-	header->OUI [1] = 0xB0;
-	header->OUI [2] = 0x52;
-	return (sizeof (* header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/RNDPasswords.c.html b/docbook/RNDPasswords.c.html deleted file mode 100644 index a560aeb2..00000000 --- a/docbook/RNDPasswords.c.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - RNDPasswords.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void  RNDPasswords (unsigned vendor, unsigned device, unsigned number, unsigned count, unsigned group, unsigned space, flag_t flags);
- *
- *   keys.h
- *
- *   print a number of device address/password pairs on stdout; print
- *   an optional usage flag in the first column for PTS compatability;
- *
- *   vendor is the 24-bit OUI expressed as an integer; device is the
- *   24-bit starting unit address expressed as an integer; number is
- *   the number of address/password pairs to generate; count is the
- *   number of letters/numbers in the password excluding delimiters;
- *   group is the number of letters or numbers appear between space
- *   characters; space characters are suppressed when group is zero
- *   or greater than count;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef RNDPASSWORDS_SOURCE
-#define RNDPASSWORDS_SOURCE
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "../tools/types.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../key/keys.h"
-
-void RNDPasswords (unsigned vendor, unsigned device, unsigned number, unsigned count, unsigned group, char space, flag_t flags)
-
-{
-	if (vendor >> 24)
-	{
-		return;
-	}
-	if (device >> 24)
-	{
-		return;
-	}
-	if (number >> 24)
-	{
-		return;
-	}
-	while (number--)
-	{
-		if (_anyset (flags, PASSWORD_VERBOSE))
-		{
-			putc ('0', stdout);
-			putc (' ', stdout);
-		}
-		if (_allclr (flags, PASSWORD_SILENCE))
-		{
-			printf ("%06X", vendor);
-			printf ("%06X", device);
-			putc (' ', stdout);
-		}
-		putpwd (count, group, space);
-		putc ('\n', stdout);
-		device++;
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadFMI.c.html b/docbook/ReadFMI.c.html deleted file mode 100644 index d631fdfd..00000000 --- a/docbook/ReadFMI.c.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - ReadFMI.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadFMI (struct plc * plc, uint8_t MMV, uint16_t MMTYPE);
- *
- *   plc.h
- *
- *   read a fragmented message and return a pointer to a buffer that
- *   contains the concatenated message fragments; the buffer address
- *   is returned in plc->content; the calling function must free the
- *   buffer when done; buffer length is computed from the number of
- *   fragments returned in the FMI field of the first fragment;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READFMI_SOURCE
-#define READFMI_SOURCE
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed ReadFMI (struct plc * plc, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	if (ReadMME (plc, MMV, MMTYPE) > 0)
-	{
-		struct homeplug * homeplug = (struct homeplug *)(plc->message);
-		unsigned count = ((homeplug->homeplug.FMID >> 0) & 0x0F);
-		unsigned extra = ((homeplug->homeplug.FMID >> 4) & 0x0F);
-		unsigned length = sizeof (* homeplug) + extra * sizeof (homeplug->content);
-		if ((plc->content = malloc (length)))
-		{
-			signed offset = plc->packetsize;
-			memcpy (plc->content, homeplug, offset);
-			while (count < extra)
-			{
-				if (ReadMME (plc, MMV, MMTYPE) <= 0)
-				{
-					free (plc->content);
-					plc->content = NULL;
-					return (- 1);
-				}
-				count = ((homeplug->homeplug.FMID >> 0) & 0x0F);
-				extra = ((homeplug->homeplug.FMID >> 4) & 0x0F);
-				plc->packetsize -= sizeof (struct ethernet_hdr);
-				plc->packetsize -= sizeof (struct homeplug_fmi);
-				memcpy ((uint8_t *)(plc->content) +  offset, homeplug->content, plc->packetsize);
-				offset += plc->packetsize;
-			} 
-			plc->packetsize = offset;
-		}
-		else
-		{
-			error (1, errno, "%s", __func__);
-		}
-	}
-	return (plc->packetsize);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadFirmware.c.html b/docbook/ReadFirmware.c.html deleted file mode 100644 index c2fdd91b..00000000 --- a/docbook/ReadFirmware.c.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - ReadFirmware.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadFirmware (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READFIRMWARE_SOURCE
-#define READFIRMWARE_SOURCE
-
-#include "../plc/plc.h"
-
-signed ReadFirmware (struct plc * plc)
-
-{
-	return (PLCSelect (plc, ReadFirmware1, ReadFirmware2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadFirmware1.c.html b/docbook/ReadFirmware1.c.html deleted file mode 100644 index 581c8466..00000000 --- a/docbook/ReadFirmware1.c.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - ReadFirmware1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadFirmware1 (struct plc * plc);
- *
- *   plc.h
- *
- *   Read the firmware image from the device using as many VS_RD_MOD
- *   messages as needed; Write image blocks to file as as they are
- *   read;
- *
- *   the object here here is to read NVM from RAM in 1024 byte blocks
- *   until MOFFSET exceeds the image length;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READFIRMWARE1_SOURCE
-#define READFIRMWARE1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/endian.h"
-#include "../tools/memory.h"
-#include "../nvm/nvm.h"
-
-signed ReadFirmware1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t MSECRET [16];
-	}
-	* request = (struct vs_rd_mod_request *) (message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RES [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t CHKSUM;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* confirm = (struct vs_rd_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t header = 0;
-	uint32_t extent = 0;
-	uint32_t offset = 0;
-	uint16_t length = PLC_RECORD_SIZE;
-	Request (plc, "Read Firmware from Device");
-	if (lseek (plc->nvm.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->nvm.name);
-		return (1);
-	}
-	do
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		request->MODULEID = VS_MODULE_MAC;
-		request->MLENGTH = HTOLE16 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RD_MOD | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		length = LE16TOH (confirm->MLENGTH);
-		offset = LE32TOH (confirm->MOFFSET);
-		if (checksum32 (confirm->BUFFER, length, confirm->CHKSUM))
-		{
-			error (PLC_EXIT (plc), ECANCELED, "Bad Packet Checksum");
-			return (-1);
-		}
-		if (offset == extent)
-		{
-			struct nvm_header1 * nvm_header = (struct nvm_header1 *)(confirm->BUFFER);
-			if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
-			{
-				error (PLC_EXIT (plc), ECANCELED, "Bad Header Checksum");
-				return (-1);
-			}
-			if (LE32TOH (nvm_header->HEADERVERSION) != 0x60000000)
-			{
-				error (PLC_EXIT (plc), ECANCELED, "Bad Header Version");
-				return (-1);
-			}
-			extent += sizeof (* nvm_header);
-			extent += LE32TOH (nvm_header->IMAGELENGTH);
-			header = LE32TOH (nvm_header->NEXTHEADER);
-		}
-		if ((offset + length) > extent)
-		{
-			length = extent - offset;
-		}
-		if (lseek (plc->nvm.file, offset, SEEK_SET) != (off_t)(offset))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTSEEK, plc->nvm.name);
-			return (-1);
-		}
-		if (write (plc->nvm.file, confirm->BUFFER, length) != (signed)(length))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTSEEK, plc->nvm.name);
-			return (-1);
-		}
-		offset += length;
-		length = 1024;
-	}
-	while ((header) || (offset < extent));
-	Confirm (plc, "Read %s", plc->nvm.name);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadFirmware2.c.html b/docbook/ReadFirmware2.c.html deleted file mode 100644 index 0fdfacc5..00000000 --- a/docbook/ReadFirmware2.c.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - ReadFirmware2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadFirmware2 (struct plc * plc);
- *
- *   plc.h
- *
- *   Read the firmware from flash memory using VS_MODULE_OPERATION
- *   messages and write to file;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READFIRMWARE2_SOURCE
-#define READFIRMWARE2_SOURCE
-
-#include "../plc/plc.h"
-
-signed ReadFirmware2 (struct plc * plc)
-
-{
-	return (ModuleRead (plc, &plc->nvm, PLC_MOD_OP_READ_MEMORY, PLC_MODULEID_FIRMWARE, 0));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadMFG.c.html b/docbook/ReadMFG.c.html deleted file mode 100644 index ea81758f..00000000 --- a/docbook/ReadMFG.c.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - ReadMFG.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadMFG (struct plc * plc, uint16_t MMTYPE);
- *
- *   plc.h
- *
- *   read a manufacturer specific management message of the given
- *   type in platform independent manner; return the number of bytes
- *   read, 0 on timeout or -1 on error;
- *
- *   see SendMME for the send counterpart to this function;
- *
- *   see ReadMME for the vendor specific version of this function;
- *
- *   readpacket behaves like the read function but there are several
- *   readpacket functions in the toolkit and each performs raw packet
- *   i/o differently depending on environment; they all use a channel
- *   structure;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READMFG_SOURCE
-#define READMFG_SOURCE
-
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/flags.h"
-
-signed ReadMFG (struct plc * plc, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct homeplug * homeplug = (struct homeplug *)(message);
-	while ((plc->packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (homeplug->homeplug.MMV != MMV)
-		{
-			continue;
-		}
-		if (homeplug->homeplug.MMTYPE != HTOLE16 (MMTYPE))
-		{
-			continue;
-		}
-		break;
-	}
-	return (plc->packetsize);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadMME.c.html b/docbook/ReadMME.c.html deleted file mode 100644 index 0b53e6eb..00000000 --- a/docbook/ReadMME.c.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - ReadMME.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE);
- *
- *   plc.h
- *
- *   wait for a QCA vendor specific message of given MMV and MMTYPE;
- *   discard unwanted messages until the desired message arrives or
- *   the channel timeout expires; return packetsize on success, 0 on
- *   timeout or -1 on error;
- *
- *   see SendMME for the send counterpart to this function;
- *
- *   a well designed UnwantedMessage function is critical here;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READMME_SOURCE
-#define READMME_SOURCE
-
-#include <sys/time.h>
-
-#include <stdint.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/error.h"
-#include "../tools/timer.h"
-#include "../plc/plc.h"
-#include "../mme/mme.h"
-
-signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	while ((plc->packetsize = readpacket (channel, message, sizeof (* message))) >= 0)
-	{
-		if (UnwantedMessage (message, plc->packetsize, MMV, MMTYPE))
-		{
-			if (gettimeofday (&tc, NULL) == -1)
-			{
-				error (1, errno, CANT_RESET_TIMER);
-			}
-			if (channel->timeout < 0)
-			{
-				continue;
-			}
-			if (channel->timeout > MILLISECONDS (ts, tc))
-			{
-				continue;
-			}
-			plc->packetsize = 0;
-		}
-		break;
-	}
-	return (plc->packetsize);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadNVM.c.html b/docbook/ReadNVM.c.html deleted file mode 100644 index 5530f8e1..00000000 --- a/docbook/ReadNVM.c.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - ReadNVM.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadNVM (struct plc * plc);
- *
- *   plc.h
- *
- *   Read MAC Software Image from the device using as many VS_RD_MOD
- *   messages as needed; Write image blocks to file as as they are
- *   read;
- *
- *   the object here here is to read NVM from RAM in 1024 byte blocks
- *   until MOFFSET exceeds the image length;
- *
- *   MOFFSET and MLENGTH fields occupy different offsets in REQ and
- *   CNF messages; we exploit that by initializing CNF message and
- *   copying them into the REQ message before each read;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READNVM_SOURCE
-#define READNVM_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/endian.h"
-#include "../tools/memory.h"
-#include "../nvm/nvm.h"
-
-signed ReadNVM (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t MSECRET [16];
-	}
-	* request = (struct vs_rd_mod_request *) (message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RES [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t CHKSUM;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* confirm = (struct vs_rd_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t header = 0;
-	uint32_t extent = 0;
-	uint32_t offset = 0;
-	uint16_t length = PLC_RECORD_SIZE;
-	Request (plc, "Read Firmware from Device");
-	if (lseek (plc->nvm.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->nvm.name);
-		return (1);
-	}
-	do
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		request->MODULEID = VS_MODULE_MAC;
-		request->MLENGTH = HTOLE16 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RD_MOD | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		length = LE16TOH (confirm->MLENGTH);
-		offset = LE32TOH (confirm->MOFFSET);
-		if (checksum32 (confirm->BUFFER, length, confirm->CHKSUM))
-		{
-			error (PLC_EXIT (plc), ECANCELED, "Bad Packet Checksum");
-			return (-1);
-		}
-		if (offset == extent)
-		{
-			struct nvm_header1 * nvm_header = (struct nvm_header1 *)(confirm->BUFFER);
-			if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
-			{
-				error (PLC_EXIT (plc), ECANCELED, "Bad Header Checksum");
-				return (-1);
-			}
-			if (LE32TOH (nvm_header->HEADERVERSION) != 0x60000000)
-			{
-				error (PLC_EXIT (plc), ECANCELED, "Bad Header Version");
-				return (-1);
-			}
-			extent += sizeof (* nvm_header);
-			extent += LE32TOH (nvm_header->IMAGELENGTH);
-			header = LE32TOH (nvm_header->NEXTHEADER);
-		}
-		if ((offset + length) > extent)
-		{
-			length = extent - offset;
-		}
-		if (lseek (plc->nvm.file, offset, SEEK_SET) != (off_t)(offset))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTSEEK, plc->nvm.name);
-			return (-1);
-		}
-		if (write (plc->nvm.file, confirm->BUFFER, length) != (signed)(length))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTSAVE, plc->nvm.name);
-			return (-1);
-		}
-		offset += length;
-		length = 1024;
-	}
-	while ((header) || (offset < extent));
-	Confirm (plc, "Read %s", plc->nvm.name);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadParameterBlock.c.html b/docbook/ReadParameterBlock.c.html deleted file mode 100644 index d89c10d5..00000000 --- a/docbook/ReadParameterBlock.c.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - ReadParameterBlock.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed PLCReadParameterBlock (struct plc * plc, void * memory, size_t extent);
- *
- *   plc.h
- *
- *   Read the PIB Image from an INT6x00 using as many VS_RD_MOD
- *   messages as needed; Write image blocks to file as they are
- *   read;
- *
- *   the objective here is to read the PIB module in 1024 byte blocks
- *   until the module offset equals or exceeds the PIB actual; we do
- *   not know the PIB actual until we have read the header contained
- *   in the first block read from OFFSET 0;
- *
- *   MOFFSET and MLENGTH fields occupy different offsets in REQ and CNF
- *   messages; we exploit that by initializing them using CNF message
- *   offsets then copying values into REQ message offsets before each
- *   read; this works because confirmation messages always return all
- *   the data we request or nothing at all;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READPARAMETERBLOCK_SOURCE
-#define READPARAMETERBLOCK_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../plc/plc.h"
-#include "../pib/pib.h"
-
-signed ReadParameterBlock (struct plc * plc, void * memory, size_t extent)
-
-{
-	uint8_t * buffer = (uint8_t *)(memory);
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t MSECRET [16];
-	}
-	* request = (struct vs_rd_mod_request *) (message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RESERVED1 [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t CHKSUM;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* confirm = (struct vs_rd_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint16_t length = 0;
-	uint32_t offset = 0;
-	signed actual = PLC_RECORD_SIZE;
-	do
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-		request->MODULEID = VS_MODULE_PIB;
-		request->MLENGTH = HTOLE16 (actual);
-		request->MOFFSET = HTOLE32 (offset);
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RD_MOD | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			error (PLC_EXIT (plc), ECANCELED, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MLENGTH) != actual)
-		{
-			Failure (plc, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			Failure (plc, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		actual = LE16TOH (confirm->MLENGTH);
-		offset = LE32TOH (confirm->MOFFSET);
-		if (checksum32 (confirm->BUFFER, actual, confirm->CHKSUM))
-		{
-			error (PLC_EXIT (plc), ECANCELED, "Bad Packet Checksum");
-			return (-1);
-		}
-		if (offset == length)
-		{
-			struct pib_header * pib_header = (struct pib_header *) (confirm->BUFFER);
-			length = LE16TOH (pib_header->PIBLENGTH);
-		}
-		if ((offset + actual) > length)
-		{
-			actual = length - offset;
-		}
-		memcpy (buffer + offset, confirm->BUFFER, actual);
-		offset += actual;
-		extent -= actual;
-	}
-	while (offset < length);
-	return (offset);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadParameters.c.html b/docbook/ReadParameters.c.html deleted file mode 100644 index f59f2094..00000000 --- a/docbook/ReadParameters.c.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - ReadParameters.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadParameters (struct plc * plc);
- *
- *   plc.h
- *
- *   Read the PIB Image from an INT6000 using as many VS_RD_MOD
- *   messages as needed; Write image blocks to file as they are
- *   read;
- *
- *   the objective here is to read the PIB module in 1024 byte blocks
- *   until the module offset equals or exceeds the PIB length; we do
- *   not know the PIB length until we have read the header contained
- *   in the first block at OFFSET 0;
- *
- *   MOFFSET and MLENGTH fields occupy different offsets in REQ and CNF
- *   messages; we exploit that by initializing them using CNF message
- *   offsets then copying values into REQ message offsets before each
- *   read; this works because confirmation messages always return all
- *   the data we request or nothing at all;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READPARAMETERS_SOURCE
-#define READPARAMETERS_SOURCE
-
-#include "../plc/plc.h"
-
-signed ReadParameters (struct plc * plc)
-
-{
-	return (PLCSelect (plc, ReadParameters1, ReadParameters2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadParameters1.c.html b/docbook/ReadParameters1.c.html deleted file mode 100644 index 5f243cde..00000000 --- a/docbook/ReadParameters1.c.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - ReadParameters1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadParameters1 (struct plc * plc);
- *
- *   plc.h
- *
- *   Read the PIB Image from an INT6x00 or AR7x00 using as many
- *   VS_RD_MOD messages as needed; Write image blocks to file as
- *   they are read;
- *
- *   the objective here is to read the PIB module in 1024 byte blocks
- *   until the module offset equals or exceeds the PIB length; we do
- *   not know the PIB length until we have read the header contained
- *   in the first block at OFFSET 0;
- *
- *   MOFFSET and MLENGTH fields occupy different offsets in REQ and CNF
- *   messages; we exploit that by initializing them using CNF message
- *   offsets then copying values into REQ message offsets before each
- *   read; this works because confirmation messages always return all
- *   the data we request or nothing at all;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Lluis Paulet Gimbert <dimat.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READPARAMETERS1_SOURCE
-#define READPARAMETERS1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../plc/plc.h"
-#include "../pib/pib.h"
-
-signed ReadParameters1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t MSECRET [16];
-	}
-	* request = (struct vs_rd_mod_request *) (message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RESERVED1 [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t CHKSUM;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* confirm = (struct vs_rd_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t extent = 0;
-	uint32_t offset = 0;
-	uint16_t length = PLC_RECORD_SIZE;
-	Request (plc, "Read Parameters from Device");
-	if (lseek (plc->pib.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->pib.name);
-		return (1);
-	}
-	do
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		request->MODULEID = VS_MODULE_PIB;
-		request->MLENGTH = HTOLE16 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RD_MOD | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		length = LE16TOH (confirm->MLENGTH);
-		offset = LE32TOH (confirm->MOFFSET);
-		if (checksum32 (confirm->BUFFER, length, confirm->CHKSUM))
-		{
-			error (PLC_EXIT (plc), ECANCELED, "Bad Packet Checksum");
-			return (-1);
-		}
-		if (offset == extent)
-		{
-			struct pib_header * pib_header = (struct pib_header *) (confirm->BUFFER);
-			extent = LE16TOH (pib_header->PIBLENGTH);
-		}
-		if ((offset + length) > extent)
-		{
-			length = extent - offset;
-		}
-		if (lseek (plc->pib.file, offset, SEEK_SET) != (signed)(offset))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTSEEK, plc->pib.name);
-			return (-1);
-		}
-		if (write (plc->pib.file, confirm->BUFFER, length) != (signed)(length))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTSAVE, plc->pib.name);
-			return (-1);
-		}
-		offset += length;
-	}
-	while (offset < extent);
-	Confirm (plc, "Read %s", plc->pib.name);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadParameters2.c.html b/docbook/ReadParameters2.c.html deleted file mode 100644 index b8ea2955..00000000 --- a/docbook/ReadParameters2.c.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - ReadParameters2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadParameters2 (struct plc * plc);
- *
- *   plc.h
- *
- *   Read the PIB Image from a QCA6410, QCA7000 or QCA7420 using as
- *   many VS_MODULE_OPERATION messages as needed; Write image blocks
- *   to file as they are read;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READPARAMETERS2_SOURCE
-#define READPARAMETERS2_SOURCE
-
-#include "../plc/plc.h"
-
-signed ReadParameters2 (struct plc * plc)
-
-{
-	return (ModuleRead (plc, &plc->pib, PLC_MOD_OP_READ_MEMORY, PLC_MODULEID_PARAMETERS, 0));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ReadRules.c.html b/docbook/ReadRules.c.html deleted file mode 100644 index 6e487354..00000000 --- a/docbook/ReadRules.c.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - ReadRules.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ReadRules (struct plc * plc);
- *
- *   plc.h
- *
- *   Read and Display the classifier rules read from a PLC device.
- *
- *   Contributor(s):
- *      Nathan Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef READRULES_SOURCE
-#define READRULES_SOURCE
-
-#include <limits.h>
-#include <stdio.h>
-
-#include "../plc/plc.h"
-#include "../plc/rules.h"
-#include "../tools/error.h"
-
-signed ReadRules (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *) (plc->channel);
-	struct message * message = (struct message *) (plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_classification_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MCONTROL;
-		uint8_t RSVD;
-		uint8_t OFFSET;
-		uint8_t COUNT;
-	}
-	* request = (struct vs_classification_request *) (message);
-	struct __packed vs_classification_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t TOTAL_CLASSIFIERS;
-		uint8_t OFFSET;
-		uint8_t COUNT;
-		struct __packed MMEReadRule
-		{
-			uint8_t MACTION;
-			uint8_t MOPERAND;
-			uint8_t NUM_CLASSIFIERS;
-			struct MMEClassifier CLASSIFIER [3];
-			struct cspec cspec;
-		}
-		RULESET [60];
-	}
-	* confirm = (struct vs_classification_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned index = 0;
-	unsigned total = UINT_MAX;
-	Request (plc, "Read Classifier Rules");
-	while (index < total)
-	{
-		struct MMEReadRule * rule;
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (& request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (& request->qualcomm, 0, (VS_CLASSIFICATION | MMTYPE_REQ));
-		plc->packetsize = ETHER_MIN_LEN - ETHER_CRC_LEN;
-		request->MCONTROL = CONTROL_READ;
-		request->OFFSET = index;
-		request->COUNT = SIZEOF (confirm->RULESET);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_CLASSIFICATION | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		total = confirm->TOTAL_CLASSIFIERS;
-		index += confirm->COUNT;
-		rule = confirm->RULESET;
-		while (confirm->COUNT--)
-		{
-			int count;
-			int rule_len;
-			const char * p1;
-			const char * p2;
-			struct cspec * cspec;
-			if (rule->NUM_CLASSIFIERS > RULE_MAX_CLASSIFIERS)
-			{
-				error (1, 0, "too many classifiers in rule (%d, expecting <= %d)", rule->NUM_CLASSIFIERS, RULE_MAX_CLASSIFIERS);
-			}
-			rule_len = sizeof (* rule) - (RULE_MAX_CLASSIFIERS - rule->NUM_CLASSIFIERS) * sizeof (struct MMEClassifier) - sizeof (struct cspec);
-			if (rule->MACTION == ACTION_AUTOCONNECT || rule->MACTION == ACTION_TAGTX || rule->MACTION == ACTION_TAGRX)
-			{
-				cspec = (struct cspec *) ((uint8_t *) rule +  rule_len);
-				rule_len += sizeof (struct cspec);
-			}
-			if (rule->MACTION == ACTION_TAGTX)
-			{
-				printf ("-T 0x%08X -V %d ", ntohl (cspec->VLAN_TAG), cspec->CSPEC_VERSION);
-			}
-			p1 = reword (rule->MACTION, actions, CLASSIFIER_ACTIONS);
-			if (p1 == NULL)
-			{
-				error (1, 0, "invalid classifier action");
-			}
-			p2 = reword (rule->MOPERAND, operands, CLASSIFIER_OPERANDS);
-			if (p2 == NULL)
-			{
-				error (1, 0, "invalid classifier operand");
-			}
-			printf ("%s", p1);
-			printf (" %s ", p2);
-
-/* need to dump out the actual conditions here */
-
-			for (count = 0; count < rule->NUM_CLASSIFIERS; ++ count)
-			{
-				struct MMEClassifier * classifier = & rule->CLASSIFIER [count];
-				PrintRule (classifier->CR_PID, classifier->CR_OPERAND, classifier->CR_VALUE);
-				putchar (' ');
-			}
-			printf ("add temp\n");
-			rule = (struct MMEReadRule *) ((uint8_t *) (rule) +  rule_len);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/RemoteDeviceList.c.html b/docbook/RemoteDeviceList.c.html deleted file mode 100644 index 259b94d0..00000000 --- a/docbook/RemoteDeviceList.c.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - RemoteDeviceList.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed RemoteDeviceList (struct channel * channel, char const * space);
- *
- *   print the neighbor device list on stdout;
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef REMOTEDEVICELIST_SOURCE
-#define REMOTEDEVICELIST_SOURCE
-
-#include "../plc/plc.h"
-
-signed RemoteDeviceList (struct plc * plc, char const * space, char const * comma)
-
-{
-	return ((plc->hardwareID < CHIPSET_AR7400)? RemoteDeviceList1 (plc, space, comma): RemoteDeviceList2 (plc, space, comma));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/RemoteDeviceList1.c.html b/docbook/RemoteDeviceList1.c.html deleted file mode 100644 index c8437150..00000000 --- a/docbook/RemoteDeviceList1.c.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - RemoteDeviceList1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed RemoteDeviceList1 (struct plc * plc, char const * space, char const * comma);
- *
- *   print the neighbor device list on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef REMOTEDEVICELIST1_SOURCE
-#define REMOTEDEVICELIST1_SOURCE
-
-#include <stdio.h>
-
-#include "../tools/number.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed RemoteDeviceList1 (struct plc * plc, char const * space, char const * comma)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->content);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (&message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		return (-1);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 0, (VS_NW_INFO | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (_anyset (plc->flags, PLC_BRIDGE_LIST))
-		{
-			hexout (request->ethernet.OSA, sizeof (request->ethernet.OSA), HEX_EXTENDER, 0, stdout);
-			if ((space) && (*space))
-			{
-				printf ("%s", space);
-			}
-		}
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (_anyset (plc->flags, PLC_REMOTE_LIST))
-				{
-					hexout (station->MAC, sizeof (station->MAC), HEX_EXTENDER, 0, stdout);
-					if ((space) && (*space))
-					{
-						printf ("%s", space);
-					}
-				}
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		if ((comma) && (*comma))
-		{
-			printf ("%s", comma);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/RemoteDeviceList2.c.html b/docbook/RemoteDeviceList2.c.html deleted file mode 100644 index 5e225333..00000000 --- a/docbook/RemoteDeviceList2.c.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - RemoteDeviceList2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed RemoteDeviceList2 (struct plc * plc, char const * space, char const * comma);
- *
- *   print neighbor device list on stdout;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef REMOTEDEVICELIST2_SOURCE
-#define REMOTEDEVICELIST2_SOURCE
-
-#include <stdio.h>
-
-#include "../tools/number.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed RemoteDeviceList2 (struct plc * plc, char const * space, char const * comma)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	ssize_t packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-	if (sendpacket (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0)
-	{
-		return (-1);
-	}
-	while ((packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (UnwantedMessage (message, packetsize, 1, (VS_NW_INFO | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (_anyset (plc->flags, PLC_BRIDGE_LIST))
-		{
-			hexout (request->ethernet.OSA, sizeof (request->ethernet.OSA), HEX_EXTENDER, 0, stdout);
-			if ((space) && (*space))
-			{
-				printf ("%s", space);
-			}
-		}
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS-- > 0)
-			{
-				if (_anyset (plc->flags, PLC_REMOTE_LIST))
-				{
-					hexout (station->MAC, sizeof (station->MAC), HEX_EXTENDER, 0, stdout);
-					if ((space) && (*space))
-					{
-						printf ("%s", space);
-					}
-				}
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		if ((comma) && (*comma))
-		{
-			printf ("%s", comma);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/RemoteHosts.c.html b/docbook/RemoteHosts.c.html deleted file mode 100644 index 351f806d..00000000 --- a/docbook/RemoteHosts.c.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - RemoteHosts.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed RemoteHosts (struct plc * plc);
- *
- *   plc.h
- *
- *   read hardware and software version information from an INT6000
- *   using a VS_SW_VER Request Message;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef REMOTEHOSTS_SOURCE
-#define REMOTEHOSTS_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../plc/plc.h"
-
-signed RemoteHosts (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint32_t NUMDEVICES;
-		struct __packed
-		{
-			uint8_t MACADDRESS [ETHER_ADDR_LEN];
-			uint8_t ENUMID;
-		}
-		DEVICE [1];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Request Enumeration ID Table");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_EM_ID_TABLE | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_EM_ID_TABLE | MMTYPE_CNF)) > 0)
-	{
-		unsigned count = LE32TOH (confirm->NUMDEVICES);
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		while (count--)
-		{
-			hexout (confirm->DEVICE [count].MACADDRESS, ETHER_ADDR_LEN, ':', count? ' ': '\n', stdout);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Request.c.html b/docbook/Request.c.html deleted file mode 100644 index b5a689b3..00000000 --- a/docbook/Request.c.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - Request.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void Request (struct plc * plc, char const * format, ...);
- *
- *   plc.h
- *
- *   Inform the user that an operation has started; print the channel
- *   name, template destination address and user message on stdout
- *   unless the PLC_SILENCE flag is set;
- *
- *   This function is identical to Confirm () except that it prints
- *   the template destination address instead of the packet source
- *   address because it is called before outgoing frames are encoded;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef REQUEST_SOURCE
-#define REQUEST_SOURCE
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/flags.h"
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 2, 3)))
-
-#endif
-
-void Request (struct plc * plc, char const *format, ...)
-
-{
-	if (_allclr (plc->flags, PLC_SILENCE))
-	{
-		char address [ETHER_ADDR_LEN * 3];
-		struct channel * channel = (struct channel *)(plc->channel);
-		hexdecode (channel->peer, sizeof (channel->peer), address, sizeof (address));
-		fprintf (stderr, "%s %s ", channel->ifname, address);
-		if ((format) && (*format))
-		{
-			va_list arglist;
-			va_start (arglist, format);
-			vfprintf (stderr, format, arglist);
-			va_end (arglist);
-		}
-		fprintf (stderr, "\n");
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ResetAndWait.c.html b/docbook/ResetAndWait.c.html deleted file mode 100644 index 59359fe5..00000000 --- a/docbook/ResetAndWait.c.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - ResetAndWait.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ResetAndWait (struct plc * plc);
- *
- *   plc.h
- *
- *   Reset the device using a VS_RS_DEV Request message then wait for
- *   the device to reset and reboot before returning;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef RESETANDWAIT_SOURCE
-#define RESETANDWAIT_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-signed ResetAndWait (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rs_dev_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* request = (struct vs_rs_dev_request *) (message);
-	struct __packed vs_rs_dev_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_rs_dev_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	char firmware [PLC_VERSION_STRING];
-	Request (plc, "Reset Device");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RS_DEV | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	memset (firmware, 0, sizeof (firmware));
-
-#if 0
-
-	if (ReadMME (plc, (VS_RS_DEV | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	Confirm (plc, "Resetting ...");
-	if (WaitForReset (plc))
-	{
-		Failure (plc, "Device did not Reset");
-		return (-1);
-	}
-	if (WaitForStart (plc, firmware, sizeof (firmware)))
-	{
-		Failure (plc, "Device did not Start");
-		return (-1);
-	}
-
-#else
-
-	while (ReadMME (plc, 0, (VS_RS_DEV | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			continue;
-		}
-		return (0);
-	}
-
-#endif
-
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ResetDevice.c.html b/docbook/ResetDevice.c.html deleted file mode 100644 index cea36943..00000000 --- a/docbook/ResetDevice.c.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - ResetDevice.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ResetDevice (struct plc * plc);
- *
- *   plc.h
- *
- *   This plugin for program plc and plcrate resets the device
- *   using a VS_RS_DEV message; resetting can take several seconds
- *   after this function returns to the caller;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef RESETDEVICE1_SOURCE
-#define RESETDEVICE1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-signed ResetDevice (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rs_dev_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_rs_dev_request *) (message);
-	struct __packed vs_rs_dev_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_rs_dev_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Reset Device");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RS_DEV | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_RS_DEV | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		Confirm (plc, "Resetting ...");
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/RxRates1.c.html b/docbook/RxRates1.c.html deleted file mode 100644 index ba2d5308..00000000 --- a/docbook/RxRates1.c.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - RxRates1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed RxRates1 (struct plc * plc);
- *
- *   An INT6x00 only version;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef RXRATES1_SOURCE
-#define RXRATES1_SOURCE
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed RxRates1 (struct plc * plc)
-
-{
-	extern const byte broadcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t data [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->data);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_NW_INFO | MMTYPE_CNF)) > 0)
-	{
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (memcmp (station->MAC, broadcast, sizeof (broadcast)))
-				{
-					if (_anyset (plc->flags, PLC_UNCODED_RATES))
-					{
-						station->AVGTX = ((station->AVGTX * 21) >> 4);
-						station->AVGRX = ((station->AVGRX * 21) >> 4);
-					}
-					printf ("%d", _anyset (plc->flags, PLC_TXONLY)? station->AVGTX: station->AVGRX);
-					if (network->NUMSTAS)
-					{
-						printf (", ");
-					}
-				}
-				station++;
-			}
-			printf ("\n");
-			network = (struct network *)(station);
-		}
-		fflush (stdout);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/RxRates2.c.html b/docbook/RxRates2.c.html deleted file mode 100644 index f64a5c10..00000000 --- a/docbook/RxRates2.c.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - RxRates2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed RxRates2 (struct plc * plc);
- *
- *   plc.h
- *
- *   An AR7x00 only version;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef RXRATES2_SOURCE
-#define RXRATES2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed RxRates2 (struct plc * plc)
-
-{
-	extern const byte broadcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) > 0)
-	{
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				if (memcmp (station->MAC, broadcast, sizeof (broadcast)))
-				{
-					station->AVGTX = LE16TOH (station->AVGTX);
-					station->AVGRX = LE16TOH (station->AVGRX);
-					if (_anyset (plc->flags, PLC_UNCODED_RATES))
-					{
-						station->AVGTX = ((station->AVGTX * 21) >> 4);
-						station->AVGRX = ((station->AVGRX * 21) >> 4);
-					}
-					printf ("%d", _anyset (plc->flags, PLC_TXONLY)? station->AVGTX: station->AVGRX);
-					if (network->NUMSTAS)
-					{
-						printf (", ");
-					}
-				}
-				station++;
-			}
-			printf ("\n");
-			network = (struct network *)(station);
-		}
-	}
-	fflush (stdout);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SDRAMInfo.c.html b/docbook/SDRAMInfo.c.html deleted file mode 100644 index 65e680a5..00000000 --- a/docbook/SDRAMInfo.c.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - SDRAMInfo.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SDRAMInfo (struct plc * plc);
- *
- *   plc.h
- *
- *   read the flash resident NVM header and SDRAM configuration block
- *   with VS_RD_CBLOCK;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SDRAMINFO_SOURCE
-#define SDRAMINFO_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-
-signed SDRAMInfo (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_cblock_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_rd_cblock_request *) (message);
-	struct __packed vs_rd_cblock_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t CONFIGLENGTH;
-		struct nvm_header1 nvm_header;
-		struct config_ram config_ram;
-	}
-	* confirm = (struct vs_rd_cblock_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	struct config_ram * config_ram = (struct config_ram *)(&confirm->config_ram);
-	Request (plc, "Fetch SDRAM Parameters");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RD_CBLOCK | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_RD_CBLOCK | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		Confirm (plc, "-------");
-		sdrampeek (config_ram);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256.c.html b/docbook/SHA256.c.html deleted file mode 100644 index da08b112..00000000 --- a/docbook/SHA256.c.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - SHA256.c - - - - - - - - - -
-/*====================================================================*
- *
- *   SHA256.c -
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256_SOURCE
-#define SHA256_SOURCE
-#include "../key/SHA256Reset.c"
-#include "../key/SHA256Write.c"
-#include "../key/SHA256Block.c"
-#include "../key/SHA256Fetch.c"
-#endif
-
-
-
- - - diff --git a/docbook/SHA256.h.html b/docbook/SHA256.h.html deleted file mode 100644 index 0387d7c9..00000000 --- a/docbook/SHA256.h.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - SHA256.h - - - - - - - - - -
-/*====================================================================*
- *
- *   SHA256.h - SHA256 encryption declarations and definitions;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256_HEADER
-#define SHA256_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-#include <string.h>
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define SHA256_DIGEST_LENGTH 256/8
-
-/*====================================================================*
- *   variables;
- *--------------------------------------------------------------------*/
-
-typedef struct sha256
-
-{
-	uint32_t count [2];
-	uint32_t state [8];
-	uint8_t block [64];
-	uint8_t extra [64];
-}
-
-SHA256;
-
-/*====================================================================*
- *   functions;
- *--------------------------------------------------------------------*/
-
-void SHA256Reset (struct sha256 * sha256);
-void SHA256Write (struct sha256 * sha256, void const * memory, size_t extent);
-void SHA256Block (struct sha256 * sha256, void const * memory);
-void SHA256Fetch (struct sha256 * sha256, uint8_t digest []);
-void SHA256Print (const uint8_t digest [], char const * string);
-void SHA256Ident (signed fd, uint8_t digest []);
-signed SHA256Match (signed fd, const uint8_t digest []);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256Block.c.html b/docbook/SHA256Block.c.html deleted file mode 100644 index 5e3ce4a0..00000000 --- a/docbook/SHA256Block.c.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - SHA256Block.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void SHA256Block (struct sha256 * sha256, void const * memory);
- *
- *   SHA256.h
- *
- *   encode a fixed-length block of memory into the hash buffer and
- *   update the hash state; the length is implicit in the algorithm
- *   and need not be specified as an argument;
- *
- *   Read standard FIPS180-2 sec 5.3.2 for an explanation;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256MERGE_SOURCE
-#define SHA256MERGE_SOURCE
-
-#include <stdio.h>
-
-#include "../key/SHA256.h"
-
-#define  SHR(word,bits) ((word & 0xFFFFFFFF) >> bits)
-#define ROTR(word,bits) (SHR(word,bits) | (word << (32 - bits)))
-
-void SHA256Block (struct sha256 * sha256, void const * memory)
-
-{
-	static const uint32_t K [sizeof (sha256->block)] =
-	{
-		0x428A2F98,
-		0x71374491,
-		0xB5C0FBCF,
-		0xE9B5DBA5,
-		0x3956C25B,
-		0x59F111F1,
-		0x923F82A4,
-		0xAB1C5ED5,
-		0xD807AA98,
-		0x12835B01,
-		0x243185BE,
-		0x550C7DC3,
-		0x72BE5D74,
-		0x80DEB1FE,
-		0x9BDC06A7,
-		0xC19BF174,
-		0xE49B69C1,
-		0xEFBE4786,
-		0x0FC19DC6,
-		0x240CA1CC,
-		0x2DE92C6F,
-		0x4A7484AA,
-		0x5CB0A9DC,
-		0x76F988DA,
-		0x983E5152,
-		0xA831C66D,
-		0xB00327C8,
-		0xBF597FC7,
-		0xC6E00BF3,
-		0xD5A79147,
-		0x06CA6351,
-		0x14292967,
-		0x27B70A85,
-		0x2E1B2138,
-		0x4D2C6DFC,
-		0x53380D13,
-		0x650A7354,
-		0x766A0ABB,
-		0x81C2C92E,
-		0x92722C85,
-		0xA2BFE8A1,
-		0xA81A664B,
-		0xC24B8B70,
-		0xC76C51A3,
-		0xD192E819,
-		0xD6990624,
-		0xF40E3585,
-		0x106AA070,
-		0x19A4C116,
-		0x1E376C08,
-		0x2748774C,
-		0x34B0BCB5,
-		0x391C0CB3,
-		0x4ED8AA4A,
-		0x5B9CCA4F,
-		0x682E6FF3,
-		0x748F82EE,
-		0x78A5636F,
-		0x84C87814,
-		0x8CC70208,
-		0x90BEFFFA,
-		0xA4506CEB,
-		0xBEF9A3F7,
-		0xC67178F2
-	};
-	unsigned pass;
-	unsigned word;
-	uint32_t H [sizeof (sha256->state)/sizeof (uint32_t)];
-	uint32_t W [sizeof (sha256->block)];
-	uint8_t * buffer = (uint8_t *)(memory);
-	for (word = 0; word < 16; word++)
-	{
-		W [word] = 0;
-		W [word] |= (uint32_t)(*buffer++) << 24;
-		W [word] |= (uint32_t)(*buffer++) << 16;
-		W [word] |= (uint32_t)(*buffer++) << 8;
-		W [word] |= (uint32_t)(*buffer++) << 0;;
-	}
-	for ( ; word < sizeof (sha256->block); word++)
-	{
-		uint32_t s0 = ROTR (W [word-15], 7) ^ ROTR (W [word-15], 18) ^ SHR (W [word-15], 3);
-		uint32_t s1 = ROTR (W [word- 2], 17) ^ ROTR (W [word- 2], 19) ^ SHR (W [word- 2], 10);
-		W [word] = W [word - 16] + s0 + W [word - 7] + s1;
-	}
-	for (word = 0; word < (sizeof (sha256->state) / sizeof (uint32_t)); word++)
-	{
-		H [word] = sha256->state [word];
-	}
-	for (pass = 0; pass < sizeof (sha256->block); pass++)
-	{
-		uint32_t s2 = ROTR (H [0], 2) ^ ROTR (H [0], 13) ^ ROTR (H [0], 22);
-		uint32_t maj = (H [0] & H [1]) ^ (H [0] & H [2]) ^ (H [1] & H [2]);
-		uint32_t t2 = s2 + maj;
-		uint32_t s3 = ROTR (H [4], 6) ^ ROTR (H [4], 11) ^ ROTR (H [4], 25);
-		uint32_t ch = (H [4] & H [5]) ^ ((~ H [4]) & H [6]);
-		uint32_t t1 = H [7] + s3 + ch + K [pass] + W [pass];
-		for (word = (sizeof (sha256->state) / sizeof (uint32_t)) - 1; word > 0; word--)
-		{
-			H [word] = H [word-1];
-		}
-		H [0] = t1 + t2;
-		H [4] += t1;
-	}
-	for (word = 0; word < (sizeof (sha256->state) / sizeof (uint32_t)); word++)
-	{
-		sha256->state [word] += H [word];
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256Fetch.c.html b/docbook/SHA256Fetch.c.html deleted file mode 100644 index ccacef24..00000000 --- a/docbook/SHA256Fetch.c.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - SHA256Fetch.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void SHA256Fetch (struct sha256 * sha256,  uint8_t digest []);
- *
- *   SHA256.h
- *
- *   read the SHA256 digest; this function works like function read()
- *   but the function returns no value and the digest buffer is fixed
- *   length;
- *
- *   to start a digest, use function SHA256Reset(); to write data to
- *   the digest use function SHA256Write();
- *
- *   Read standard FIPS180-2 sec 5.3.2 for an explanation;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256FETCH_SOURCE
-#define SHA256FETCH_SOURCE
-
-#include "../key/SHA256.h"
-
-static void encode (uint8_t memory [], uint32_t number)
-
-{
-	*memory++ = (uint8_t)(number >> 24);
-	*memory++ = (uint8_t)(number >> 16);
-	*memory++ = (uint8_t)(number >> 8);
-	*memory++ = (uint8_t)(number >> 0);
-	return;
-}
-
-void SHA256Fetch (struct sha256 * sha256, uint8_t digest [])
-
-{
-	unsigned word;
-	uint8_t bits [8];
-	uint32_t upper = (sha256->count [0] >> 29) | (sha256->count [1] << 3);
-	uint32_t lower = (sha256->count [0] << 3);
-	uint32_t final = (sha256->count [0] & 0x3F);
-	uint32_t extra = (final < 56)? (56 - final): (120 - final);
-	encode (&bits [0], upper);
-	encode (&bits [4], lower);
-	SHA256Write (sha256, sha256->extra, extra);
-	SHA256Write (sha256, bits, sizeof (bits));
-	for (word = 0; word < sizeof (sha256->state) / sizeof (uint32_t); word++)
-	{
-		encode (digest, sha256->state [word]);
-		digest += sizeof (uint32_t);
-	}
-	memset (sha256, 0, sizeof (struct sha256));
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256Ident.c.html b/docbook/SHA256Ident.c.html deleted file mode 100644 index 5e9d7161..00000000 --- a/docbook/SHA256Ident.c.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - SHA256Ident.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void SHA256Ident (signed fd,  uint8_t digest []);
- *
- *   SHA256.h
- *
- *   compute the SHA256 digest of file content; the digest becomes
- *   the fingerprint that can be used to identify the file despite
- *   filename changes;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256IDENT_SOURCE
-#define SHA256IDENT_SOURCE
-
-#include <unistd.h>
-
-#include "../key/SHA256.h"
-
-void SHA256Ident (signed fd, uint8_t digest [])
-
-{
-	struct sha256 sha256;
-	uint8_t buffer [1024];
-	signed length;
-	SHA256Reset (&sha256);
-	while ((length = read (fd, buffer, sizeof (buffer))) > 0)
-	{
-		SHA256Write (&sha256, buffer, length);
-	}
-	SHA256Fetch (&sha256, digest);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256Match.c.html b/docbook/SHA256Match.c.html deleted file mode 100644 index d6e0a580..00000000 --- a/docbook/SHA256Match.c.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - SHA256Match.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SHA256Match (signed fd, const uint8_t digest[]);
- *
- *   SHA256.h
- *
- *   search a fingerprint file for the given digest; return true
- *   on success and false on failure; digests in the fingerprint
- *   file must be upper case because comparison is binary;
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256MATCH_SOURCE
-#define SHA256MATCH_SOURCE
-
-#include <unistd.h>
-#include <errno.h>
-
-#include "../tools/number.h"
-#include "../key/SHA256.h"
-
-signed SHA256Match (signed fd, const uint8_t digest [])
-
-{
-	char string [SHA256_DIGEST_LENGTH << 1];
-	char buffer [SHA256_DIGEST_LENGTH << 1];
-	signed length = 0;
-	while (length < (signed)(sizeof (string)))
-	{
-		string [length++] = DIGITS_HEX [(*digest >> 4) & 0x0F];
-		string [length++] = DIGITS_HEX [(*digest >> 0) & 0x0F];
-		digest++;
-	}
-	while (read (fd, buffer, sizeof (buffer)) == sizeof (buffer))
-	{
-		char c;
-		if (!memcmp (string, buffer, sizeof (string)))
-		{
-			return (1);
-		}
-		while (read (fd, &c, sizeof (c)) == sizeof (c))
-		{
-			if (c == '\n')
-			{
-				break;
-			}
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256Print.c.html b/docbook/SHA256Print.c.html deleted file mode 100644 index 09072357..00000000 --- a/docbook/SHA256Print.c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - SHA256Print.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void SHA256Print (const uint8_t digest [], const char * string);
- *
- *   HPAVKey.h
- *
- *   print a digest in hexadecimal on stdout followed by string if
- *   string is non-empty;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256PRINT_SOURCE
-#define SHA256PRINT_SOURCE
-
-#include <stdio.h>
-
-#include "../key/SHA256.h"
-#include "../tools/number.h"
-
-void SHA256Print (const uint8_t digest [], const char * string)
-
-{
-	unsigned length = SHA256_DIGEST_LENGTH;
-	while (length--)
-	{
-		putc (DIGITS_HEX [(* digest >> 4) & 0x0F], stdout);
-		putc (DIGITS_HEX [(* digest >> 0) & 0x0F], stdout);
-		digest++;
-	}
-	if (string) for (putc (' ', stdout); *string; string++)
-	{
-		putc (*string, stdout);
-	}
-	printf ("\n");
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256Reset.c.html b/docbook/SHA256Reset.c.html deleted file mode 100644 index bf948a87..00000000 --- a/docbook/SHA256Reset.c.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - SHA256Reset.c - - - - - - - - - -
-/*====================================================================*
- *
- *   SHA256Reset (struct sha256 * sha256)
- *
- *   SHA256.h
- *
- *   initialize the SHA256 hash state; this effectively erases the
- *   previous hash state;
- *
- *   Read standard FIPS180-2 sec 5.3.2 for an explanation;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256RESET_SOURCE
-#define SHA256RESET_SOURCE
-
-#include "../key/SHA256.h"
-
-void SHA256Reset (struct sha256 * sha256)
-
-{
-	memset (sha256, 0, sizeof (struct sha256));
-	sha256->state [0] = 0x6A09E667;
-	sha256->state [1] = 0xBB67AE85;
-	sha256->state [2] = 0x3C6EF372;
-	sha256->state [3] = 0xA54FF53A;
-	sha256->state [4] = 0x510E527F;
-	sha256->state [5] = 0x9B05688C;
-	sha256->state [6] = 0x1F83D9AB;
-	sha256->state [7] = 0x5BE0CD19;
-	sha256->extra [0] = 0x80;
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SHA256Write.c.html b/docbook/SHA256Write.c.html deleted file mode 100644 index 3fe5af49..00000000 --- a/docbook/SHA256Write.c.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - SHA256Write.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void SHA256Write (struct sha256 * sha256, void const * memory, size_t extent);
- *
- *   SHA256.h
- *
- *   write a block of data to an SHA256 digest; this function behaves
- *   like function write() but returns no value and does not fail; an
- *   unlimited amount of data may be written using successive writes;
- *
- *   to start a new digest, use function SHA266Reset(); to read the
- *   digest, use function SHA256Fetch();
- *
- *   Read standard FIPS180-2 sec 5.3.2 for an explanation;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SHA256WRITE_SOURCE
-#define SHA256WRITE_SOURCE
-
-#include "../key/SHA256.h"
-
-void SHA256Write (struct sha256 * sha256, void const * memory, size_t extent)
-
-{
-	if (extent)
-	{
-		uint8_t * buffer = (uint8_t *)(memory);
-		unsigned left = sha256->count [0] & 0x3F;
-		unsigned fill = sizeof (sha256->block) - left;
-		sha256->count [0] += (uint32_t)(extent);
-		sha256->count [0] &= 0xFFFFFFFF;
-		if (sha256->count [0] < extent)
-		{
-			sha256->count [1]++;
-		}
-		if ((left) && (extent >= fill))
-		{
-			memcpy (sha256->block + left, buffer, fill);
-			SHA256Block (sha256, sha256->block);
-			extent -= fill;
-			buffer += fill;
-			left = 0;
-		}
-		while (extent >= sizeof (sha256->block))
-		{
-			SHA256Block (sha256, buffer);
-			extent -= sizeof (sha256->block);
-			buffer += sizeof (sha256->block);
-		}
-		if (extent)
-		{
-			memcpy (sha256->block + left, buffer, extent);
-		}
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SendMME.c.html b/docbook/SendMME.c.html deleted file mode 100644 index d2e308bf..00000000 --- a/docbook/SendMME.c.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - SendMME.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SendMME (struct plc * plc);
- *
- *   plc.h
- *
- *   send management message over Ethernet in a platform independent
- *   fashion; return the number of bytes sent on succes, 0 on timeout
- *   or -1 on error;
- *
- *   see ReadMME for the vendor specific read counterpart to this
- *   function;
- *
- *   see ReadMFG for the manufacturer specific read counterpart to
- *   this function;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SENDMME_SOURCE
-#define SENDMME_SOURCE
-
-#include <stdint.h>
-
-#include "../plc/plc.h"
-
-signed SendMME (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	signed length = sendpacket (channel, message, plc->packetsize);
-	return (length);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SetNMK.c.html b/docbook/SetNMK.c.html deleted file mode 100644 index 6f7c681a..00000000 --- a/docbook/SetNMK.c.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - SetNMK.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SetNMK (struct plc * plc);
- *
- *   plc.h
- *
- *   set NMK on a local or remote device using a VS_SET_KEY message;
- *
- *   using this message to set the NMK on a remote device requires
- *   both the remote device address (RDA) and the remote device
- *   access key (DAK);
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SETNMK_SOURCE
-#define SETNMK_SOURCE
-
-#include <string.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/memory.h"
-#include "../key/HPAVKey.h"
-
-signed SetNMK (struct plc * plc)
-
-{
-	extern const byte localcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_set_key_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t EKS;
-		uint8_t NMK [HPAVKEY_NMK_LEN];
-		uint8_t PEKS;
-		uint8_t RDA [ETHER_ADDR_LEN];
-		uint8_t DAK [HPAVKEY_DAK_LEN];
-	}
-	* request = (struct vs_set_key_request *) (message);
-	struct __packed vs_set_key_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_set_key_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, localcast, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SET_KEY | MMTYPE_REQ));
-	plc->packetsize = sizeof (struct vs_set_key_request);
-	request->EKS = 0x01;
-	memcpy (request->NMK, plc->NMK, sizeof (request->NMK));
-	if (_anyset (plc->flags, PLC_SETREMOTEKEY))
-	{
-		Request (plc, "Set Remote Network Membership Key");
-		memcpy (request->RDA, plc->RDA, sizeof (request->RDA));
-		memcpy (request->DAK, plc->DAK, sizeof (request->DAK));
-		request->PEKS = 0x00;
-	}
-	else
-	{
-		Request (plc, "Set Local Network Membership Key");
-		memset (request->RDA, 0, sizeof (request->RDA));
-		memset (request->DAK, 0, sizeof (request->DAK));
-		request->PEKS = 0x0F;
-	}
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_SET_KEY | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	Confirm (plc, "Setting ...");
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SetProperty.c.html b/docbook/SetProperty.c.html deleted file mode 100644 index 7495b713..00000000 --- a/docbook/SetProperty.c.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - SetProperty.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SetProperty (struct plc * plc);
- *
- *   plc.h
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SETPROPERTY_SOURCE
-#define SETPROPERTY_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-
-signed SetProperty (struct plc * plc, struct plcproperty * plcproperty)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_set_property_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t COOKIE;
-		uint8_t OPTION;
-		uint8_t RESERVED [3];
-		uint32_t PROP_VERSION;
-		uint32_t PROP_NUMBER;
-		uint32_t DATA_LENGTH;
-		uint8_t DATA_BUFFER [256];
-	}
-	* request = (struct vs_set_property_request *) (message);
-	struct __packed vs_set_property_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t COOKIE;
-	}
-	* confirm = (struct vs_set_property_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Set Property");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SET_PROPERTY | MMTYPE_REQ));
-	request->COOKIE = HTOLE32 (plc->cookie);
-	request->OPTION = plcproperty->PROP_OPTION;
-	request->PROP_VERSION = HTOLE32 (plcproperty->PROP_VERSION);
-	request->PROP_NUMBER = HTOLE32 (plcproperty->PROP_NUMBER);
-	request->DATA_LENGTH = HTOLE32 (plcproperty->DATA_LENGTH);
-	memcpy (&request->DATA_BUFFER, &plcproperty->DATA_BUFFER, plcproperty->DATA_LENGTH);
-	plc->packetsize = sizeof (* request);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_SET_PROPERTY | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SignalToNoise1.c.html b/docbook/SignalToNoise1.c.html deleted file mode 100644 index a2918102..00000000 --- a/docbook/SignalToNoise1.c.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - SignalToNoise1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SignalToNoise1 (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SIGNALTONOISE1_SOURCE
-#define SIGNALTONOISE1_SOURCE
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/endian.h"
-#include "../plc/plc.h"
-
-#ifndef TONEMAPS1_SOURCE
-
-static uint8_t const mod2bits [AMP_BITS] =
-
-{
-	0,
-	1,
-	2,
-	3,
-	4,
-	6,
-	8,
-	10,
-	12
-};
-
-static uint8_t const mod2db [AMP_BITS] =
-
-{
-	0,
-	2,
-	4,
-	7,
-	10,
-	16,
-	22,
-	28,
-	36
-};
-
-#endif
-
-signed SignalToNoise1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	byte tonemap [PLC_SLOTS + 1][AMP_CARRIERS >> 1];
-	byte GIL [PLC_SLOTS];
-	byte AGC [PLC_SLOTS];
-	double SNR [PLC_SLOTS] =
-	{
-		0.0
-	};
-	double BPC [PLC_SLOTS] =
-	{
-		0.0
-	};
-	double AvgSNR = 0;
-	double AvgBPC = 0;
-	unsigned carriers = 0;
-	unsigned carrier = 0;
-	unsigned slots = 0;
-	unsigned slot = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_tone_slot_char_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MACADDRESS [ETHER_ADDR_LEN];
-		uint8_t TMSLOT;
-	}
-	* request = (struct vs_tone_slot_char_request *) (message);
-	struct __packed vs_tone_slot_char_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t TMSLOT;
-		uint8_t NUMTMS;
-		uint16_t TMNUMACTCARRIERS;
-		uint8_t MOD_CARRIER [(INT_CARRIERS + 1) >> 1];
-		uint8_t GIL;
-		uint8_t AGC;
-	}
-	* confirm = (struct vs_tone_slot_char_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	memcpy (request->MACADDRESS, plc->RDA, sizeof (request->MACADDRESS));
-	request->TMSLOT = 0;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	carriers = LE16TOH (confirm->TMNUMACTCARRIERS);
-	slots = confirm->NUMTMS;
-	if (!slots)
-	{
-		error (PLC_EXIT (plc), ECANCELED, "No Tone Maps Available");
-		return (-1);
-	}
-	memset (tonemap, 0, sizeof (tonemap));
-	for (slot = 0; slot < slots; slot++)
-	{
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_REQ));
-		memcpy (request->MACADDRESS, plc->RDA, sizeof (request->MACADDRESS));
-		request->TMSLOT = slot;
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		memcpy (&tonemap [slot][0], confirm->MOD_CARRIER, sizeof (confirm->MOD_CARRIER));
-		GIL [slot] = confirm->GIL;
-		AGC [slot] = confirm->AGC;
-	}
-	while (carrier < carriers)
-	{
-		unsigned value = 0;
-		unsigned index = carrier >> 1;
-		for (slot = 0; slot < PLC_SLOTS; slot++)
-		{
-			value = tonemap [slot][index];
-			if ((carrier & 1))
-			{
-				value >>= 4;
-			}
-			value &= 0x0F;
-			BPC [slot] += mod2bits [value];
-			SNR [slot] += mod2db [value];
-			AvgBPC += mod2bits [value];
-			AvgSNR += mod2db [value];
-		}
-		carrier++;
-	}
-	AvgBPC /= carriers;
-	AvgBPC /= slots;
-	AvgSNR /= carriers;
-	AvgSNR /= slots;
-	printf (" SNR");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (" %8.3f", SNR [slot] / carriers);
-	}
-	printf (" %8.3f", AvgSNR);
-	printf (" \n");
-	printf (" ATN");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (" %8.3f", SNR [slot] / carriers - 60);
-	}
-	printf (" %8.3f", AvgSNR - 60);
-	printf (" \n");
-	printf (" BPC");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (" %8.3f", BPC [slot] / carriers);
-	}
-	printf (" %8.3f", AvgBPC);
-	printf (" \n");
-	printf (" AGC");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (" %02d", AGC [slot]);
-	}
-	printf (" \n");
-	printf (" GIL");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (" %02d", GIL [slot]);
-	}
-	printf (" \n");
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SignalToNoise2.c.html b/docbook/SignalToNoise2.c.html deleted file mode 100644 index 7d2b7f3f..00000000 --- a/docbook/SignalToNoise2.c.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - SignalToNoise2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SignalToNoise2 (struct plc * plc);
- *
- *   amp.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SIGNALTONOISE2_SOURCE
-#define SIGNALTONOISE2_SOURCE
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/endian.h"
-#include "../plc/plc.h"
-#include "../mme/mme.h"
-
-#ifndef TONEMAPS2_SOURCE
-
-static uint8_t const mod2bits [AMP_BITS] =
-
-{
-	0,
-	1,
-	2,
-	3,
-	4,
-	6,
-	8,
-	10,
-	12
-};
-
-#endif
-
-#ifndef TONEMAPS2_SOURCE
-
-static uint8_t const mod2db [AMP_BITS] =
-
-{
-	0,
-	2,
-	4,
-	7,
-	10,
-	16,
-	22,
-	28,
-	36
-};
-
-#endif
-
-signed SignalToNoise2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	byte tonemap [PLC_SLOTS + 1][AMP_CARRIERS >> 1];
-	uint16_t GIL [PLC_SLOTS];
-	uint16_t AGC [PLC_SLOTS];
-	double SNR [PLC_SLOTS];
-	double BPC [PLC_SLOTS];
-	double AvgSNR;
-	double AvgBPC;
-	uint16_t extent = 0;
-	uint16_t active = 0;
-	uint16_t carriers = AMP_CARRIERS;
-	uint16_t carrier = 0;
-	uint8_t slots = PLC_SLOTS;
-	uint8_t slot = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rx_tone_map_char_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t MME_SUBVER;
-		uint8_t Reserved1 [3];
-		uint8_t MACADDRESS [ETHER_ADDR_LEN];
-		uint8_t TMSLOT;
-		uint8_t COUPLING;
-	}
-	* request = (struct vs_rx_tone_map_char_request *) (message);
-	struct __packed vs_rx_tonemap_char_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t MSTATUS;
-		uint8_t Reserved1;
-		uint16_t MME_LEN;
-		uint8_t MME_SUBVER;
-		uint8_t Reserved2;
-		uint8_t MACADDR [6];
-		uint8_t TMSLOT;
-		uint8_t COUPLING;
-		uint8_t NUMTMS;
-		uint8_t Reserved4;
-		uint16_t TMNUMACTCARRIERS;
-		uint32_t Reserved6;
-		uint8_t GIL;
-		uint8_t Reserved7;
-		uint8_t AGC;
-		uint8_t Reserved8;
-		uint8_t MOD_CARRIER [1];
-	}
-	* confirm = (struct vs_rx_tonemap_char_confirm *) (message);
-	struct __packed vs_rx_tonemap_char_fragment
-	{
-		struct ethernet_hdr ethernet;
-		struct homeplug_fmi qualcomm;
-		uint8_t MOD_CARRIER [1];
-	}
-	* fragment = (struct vs_rx_tonemap_char_fragment *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (tonemap, 0, sizeof (tonemap));
-	for (carrier = slot = 0; slot < slots; carrier = 0, slot++)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_RX_TONE_MAP_CHAR | MMTYPE_REQ));
-		memcpy (request->MACADDRESS, plc->RDA, sizeof (request->MACADDRESS));
-		request->TMSLOT = slot;
-		request->COUPLING = plc->coupling;
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 1, (VS_RX_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			error (1, 0, "Device refused request for slot %d: %s", slot, MMECode (VS_RX_TONE_MAP_CHAR | MMTYPE_CNF, confirm->MSTATUS));
-		}
-		GIL [slot] = confirm->GIL;
-		AGC [slot] = confirm->AGC;
-		carriers = LE16TOH (confirm->TMNUMACTCARRIERS);
-		slots = confirm->NUMTMS;
-		extent = LE16TOH (confirm->MME_LEN) - 22;
-		if (extent > (AMP_CARRIERS >> 1))
-		{
-			error (1, EOVERFLOW, "Too many carriers");
-		}
-		plc->packetsize -= sizeof (struct vs_rx_tonemap_char_confirm);
-		plc->packetsize += sizeof (confirm->MOD_CARRIER);
-		if (plc->packetsize > extent)
-		{
-			plc->packetsize = extent;
-		}
-		memcpy (&tonemap [slot] [carrier], &confirm->MOD_CARRIER, plc->packetsize);
-		carrier += plc->packetsize;
-		extent -= plc->packetsize;
-		while (extent)
-		{
-			if (ReadMME (plc, 1, (VS_RX_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-			{
-				error (1, errno, CHANNEL_CANTREAD);
-			}
-			plc->packetsize -= sizeof (struct vs_rx_tonemap_char_fragment);
-			plc->packetsize += sizeof (fragment->MOD_CARRIER);
-			if (plc->packetsize > extent)
-			{
-				plc->packetsize = extent;
-			}
-			memcpy (&tonemap [slot] [carrier], fragment->MOD_CARRIER, plc->packetsize);
-			carrier += plc->packetsize;
-			extent -= plc->packetsize;
-		}
-	}
-	carrier = 0;
-
-/*
- *   LOW BANDS;
- */
-
-	memset (BPC, 0, sizeof (BPC));
-	memset (SNR, 0, sizeof (SNR));
-	AvgBPC = 0;
-	AvgSNR = 0;
-	while (carrier < INT_CARRIERS)
-	{
-		unsigned value = 0;
-		unsigned scale = 0;
-		unsigned index = carrier >> 1;
-		printf ("%04d", carrier);
-		for (slot = 0; slot < slots; slot++)
-		{
-			value = tonemap [slot][index];
-			if ((carrier & 1))
-			{
-				value >>= 4;
-			}
-			value &= 0x0F;
-			if (value > (AMP_BITS-1))
-			{
-				error (0, EINVAL, "Index %d Slot %d Value %d", carrier, slot, value);
-			}
-			printf (",%02d", mod2bits [value]);
-			BPC [slot] += mod2bits [value];
-			SNR [slot] += mod2db [value];
-			AvgBPC += mod2bits [value];
-			AvgSNR += mod2db [value];
-			value *= value;
-			scale += value;
-		}
-		if (_anyset (plc->flags, PLC_GRAPH))
-		{
-			printf (" %03d ", scale);
-			if (scale)
-			{
-				scale /= slots;
-				while (scale--)
-				{
-					printf ("#");
-				}
-				active++;
-			}
-		}
-		printf ("\n");
-		carrier++;
-	}
-	AvgBPC /= active;
-	AvgBPC /= slots;
-	AvgSNR /= active;
-	AvgSNR /= slots;
-	printf (" SNR");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%8.3f", (float)(SNR [slot]) / active);
-	}
-	printf (",%8.3f", AvgSNR);
-	printf (" \n");
-	printf (" ATN");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%8.3f", (float)(SNR [slot]) / active - 60);
-	}
-	printf (",%8.3f", AvgSNR - 60);
-	printf (" \n");
-	printf (" BPC");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%8.3f", (float)(BPC [slot]) / active);
-	}
-	printf (",%8.3f", AvgBPC);
-	printf (" \n");
-
-/*
- *   HIGH BANDS;
- */
-
-	memset (BPC, 0, sizeof (BPC));
-	memset (SNR, 0, sizeof (SNR));
-	AvgBPC = 0;
-	AvgSNR = 0;
-	while (carrier < carriers)
-	{
-		unsigned value = 0;
-		unsigned scale = 0;
-		unsigned index = carrier >> 1;
-		printf ("%04d", carrier);
-		for (slot = 0; slot < slots; slot++)
-		{
-			value = tonemap [slot][index];
-			if ((carrier & 1))
-			{
-				value >>= 4;
-			}
-			value &= 0x0F;
-			if (value > (AMP_BITS-1))
-			{
-				error (0, EINVAL, "Index %d Slot %d Value %d", carrier, slot, value);
-			}
-			printf (",%02d", mod2bits [value]);
-			BPC [slot] += mod2bits [value];
-			SNR [slot] += mod2db [value];
-			AvgBPC += mod2bits [value];
-			AvgSNR += mod2db [value];
-			value *= value;
-			scale += value;
-		}
-		if (_anyset (plc->flags, PLC_GRAPH))
-		{
-			printf (" %03d ", scale);
-			if (scale)
-			{
-				scale /= slots;
-				while (scale--)
-				{
-					printf ("#");
-				}
-			}
-		}
-		printf ("\n");
-		carrier++;
-		active++;
-	}
-	AvgBPC /= active;
-	AvgBPC /= slots;
-	AvgSNR /= active;
-	AvgSNR /= slots;
-	printf (" SNR");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%8.3f", (float)(SNR [slot]) / active);
-	}
-	printf (",%8.3f", AvgSNR);
-	printf (" \n");
-	printf (" ATN");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%8.3f", (float)(SNR [slot]) / active - 60);
-	}
-	printf (",%8.3f", AvgSNR - 60);
-	printf (" \n");
-	printf (" BPC");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%8.3f", (float)(BPC [slot]) / active);
-	}
-	printf (",%8.3f", AvgBPC);
-	printf (" \n");
-	printf (" AGC");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%02d", AGC [slot]);
-	}
-	printf (" \n");
-	printf (" GIL");
-	for (slot = 0; slot < slots; slot++)
-	{
-		printf (",%02d", GIL [slot]);
-	}
-	printf (" \n");
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/SimpleNetwork.png b/docbook/SimpleNetwork.png deleted file mode 100644 index 25668ae6..00000000 Binary files a/docbook/SimpleNetwork.png and /dev/null differ diff --git a/docbook/SlaveMembership.c.html b/docbook/SlaveMembership.c.html deleted file mode 100644 index 38c85673..00000000 --- a/docbook/SlaveMembership.c.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - SlaveMembership.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed SlaveMembership (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef SLAVEMEMBERSHIP_SOURCE
-#define SLAVEMEMBERSHIP_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../key/HPAVKey.h"
-
-#define VS_SLAVE_MEM 0xA078
-
-signed SlaveMembership (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_slave_mem_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t SLAVE_ADDR [ETHER_ADDR_LEN];
-		uint8_t AUTHORIZATION_MODE;
-		uint8_t ASSOC_RETRY_TIME;
-	}
-	* request = (struct vs_slave_mem_request *) (message);
-	struct __packed vs_slave_mem_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_slave_mem_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Request Slave Membership Change");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SLAVE_MEM | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	memcpy (request->SLAVE_ADDR, plc->RDA, sizeof (request->SLAVE_ADDR));
-	request->AUTHORIZATION_MODE = plc->pushbutton;
-	request->ASSOC_RETRY_TIME = plc->module;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_SLAVE_MEM | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	Confirm (plc, "Requested ...");
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/StartDevice1.c.html b/docbook/StartDevice1.c.html deleted file mode 100644 index 190de1ce..00000000 --- a/docbook/StartDevice1.c.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - StartDevice1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int StartDevice1 (struct plc * plc);
- *
- *   plc.h
- *
- *   This int6kboot plugin initialize a device having no NVRAM or blank
- *   or corrupted NVRAM; ensure Bootloader is running before starting;
- *   write SDRAM configuration then NVM and PIB files to SDRAM and
- *   start firmware execution;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef STARTDEVICE1_SOURCE
-#define STARTDEVICE1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../plc/plc.h"
-
-int StartDevice1 (struct plc * plc)
-
-{
-	unsigned module = 0;
-	struct nvm_header1 nvm_header;
-	struct pib_header pib_header;
-	uint32_t offset;
-	if (WriteCFG (plc))
-	{
-		return (-1);
-	}
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->NVM.name);
-		return (-1);
-	}
-	if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTREAD, plc->NVM.name);
-		return (-1);
-	}
-	while (nvm_header.NEXTHEADER)
-	{
-		if (lseek (plc->NVM.file, LE32TOH (nvm_header.NEXTHEADER), SEEK_SET) == -1)
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->NVM.name);
-			return (-1);
-		}
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			error (PLC_EXIT (plc), errno, FILE_CANTREAD, plc->NVM.name);
-			return (-1);
-		}
-		module++;
-	}
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (read (plc->PIB.file, &pib_header, sizeof (pib_header)) != sizeof (pib_header))
-	{
-		error (1, errno, FILE_CANTREAD, plc->PIB.name);
-	}
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0305)
-	{
-		offset = LEGACY_PIBOFFSET;
-	}
-	else if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0500)
-	{
-		offset = INT6x00_PIBOFFSET;
-	}
-	else
-	{
-		offset = AR7x00_PIBOFFSET;
-	}
-	if (WriteMEM (plc, &plc->PIB, 0, offset, LE16TOH (pib_header.PIBLENGTH)))
-	{
-		return (-1);
-	}
-	if (WriteFirmware1 (plc, module, &nvm_header))
-	{
-		return (-1);
-	}
-	if (StartFirmware1 (plc, module, &nvm_header))
-	{
-		return (-1);
-	}
-	if (lseek (plc->NVM.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->NVM.name);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/StartFirmware.c.html b/docbook/StartFirmware.c.html deleted file mode 100644 index 4822af48..00000000 --- a/docbook/StartFirmware.c.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - StartFirmware.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   struct StartFirmware (struct plc * plc, unsigned module, void const * header)
- *
- *   plc.h
- *
- *   This plugin starts software execution using VS_ST_MAC; despite
- *   an affirmative respond from the device, there is no guarantee
- *   that the firmware will actually start or continue to run so we
- *   wait for a response and report the result;
- *
- *   struct nvm_header1 must be little-endian order and ready to send
- *   to the device;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef STARTSOFTWARE_SOURCE
-#define STARTSOFTWARE_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed StartFirmware (struct plc * plc, unsigned module, void const * header)
-
-{
-	return ((LE32TOH (*(uint32_t *)(header)) == 0x60000000)? StartFirmware1 (plc, module, header): StartFirmware2 (plc, module, header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/StartFirmware1.c.html b/docbook/StartFirmware1.c.html deleted file mode 100644 index 18b71167..00000000 --- a/docbook/StartFirmware1.c.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - StartFirmware1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   struct StartFirmware1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header)
- *
- *   plc.h
- *
- *   This plugin starts software execution using VS_ST_MAC; despite
- *   an affirmative respond from the device, there is no guarantee
- *   that the firmware will actually start or continue to run so we
- *   wait for a response and report the result;
- *
- *   struct nvm_header1 must be little-endian order and ready to send
- *   to the device;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef STARTSOFTWARE1_SOURCE
-#define STARTSOFTWARE1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed StartFirmware1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_st_mac_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t RESERVED [3];
-		uint32_t IMAGEBOOT;
-		uint32_t IMAGELENGTH;
-		uint32_t IMAGECHECKSUM;
-		uint32_t IMAGESTART;
-	}
-	* request = (struct vs_st_mac_request *) (message);
-	struct __packed vs_st_mac_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MODULEID;
-	}
-	* confirm = (struct vs_st_mac_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	Request (plc, "Start %s (%d) (%08X)", plc->NVM.name, module, LE32TOH (nvm_header->ENTRYPOINT));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_ST_MAC | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->IMAGEBOOT = nvm_header->IMAGEADDRESS;
-	request->IMAGELENGTH = nvm_header->IMAGELENGTH;
-	request->IMAGECHECKSUM = nvm_header->IMAGECHECKSUM;
-	request->IMAGESTART = nvm_header->ENTRYPOINT;
-	request->MODULEID = VS_MODULE_MAC;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_ST_MAC | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/StartFirmware2.c.html b/docbook/StartFirmware2.c.html deleted file mode 100644 index f02a55f3..00000000 --- a/docbook/StartFirmware2.c.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - StartFirmware2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   struct StartFirmware2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header)
- *
- *   plc.h
- *
- *   This plugin starts software execution using VS_ST_MAC; despite
- *   an affirmative respond from the device, there is no guarantee
- *   that the firmware will actually start or continue to run so we
- *   wait for a response and report the result;
- *
- *   struct nvm_header1 must be little-endian order and ready to send
- *   to the device;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef STARTSOFTWARE2_SOURCE
-#define STARTSOFTWARE2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed StartFirmware2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_st_mac_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t RESERVED [3];
-		uint32_t IMAGEBOOT;
-		uint32_t IMAGELENGTH;
-		uint32_t IMAGECHECKSUM;
-		uint32_t IMAGESTART;
-	}
-	* request = (struct vs_st_mac_request *) (message);
-	struct __packed vs_st_mac_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MODULEID;
-	}
-	* confirm = (struct vs_st_mac_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	Request (plc, "Start %s (%d) (%08X)", plc->NVM.name, module, LE32TOH (nvm_header->EntryPoint));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_ST_MAC | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->IMAGEBOOT = nvm_header->ImageAddress;
-	request->IMAGELENGTH = nvm_header->ImageLength;
-	request->IMAGECHECKSUM = nvm_header->ImageChecksum;
-	request->IMAGESTART = nvm_header->EntryPoint;
-	request->MODULEID = VS_MODULE_MAC;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_ST_MAC | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/StationRole.c.html b/docbook/StationRole.c.html deleted file mode 100644 index 3d412f45..00000000 --- a/docbook/StationRole.c.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - StationRole.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   StationRole.c - Station Role Strings;
- *
- *   plc.h
- *
- *--------------------------------------------------------------------*/
-
-#ifndef STATIONROLE_SOURCE
-#define STATIONROLE_SOURCE
-
-#include "../plc/plc.h"
-
-char const * StationRole [] =
-
-{
-	"STA",
-	"PCO",
-	"CCO"
-};
-
-#endif
-
-
-
- - - diff --git a/docbook/ToneMaps1.c.html b/docbook/ToneMaps1.c.html deleted file mode 100644 index 26c4e1f0..00000000 --- a/docbook/ToneMaps1.c.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - ToneMaps1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ToneMaps1 (struct plc * plc);
- *
- *   plc.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TONEMAPS1_SOURCE
-#define TONEMAPS1_SOURCE
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/endian.h"
-
-#ifndef SIGNALTONOISE1_SOURCE
-
-static uint8_t const mod2bits [AMP_BITS] =
-
-{
-	0,
-	1,
-	2,
-	3,
-	4,
-	6,
-	8,
-	10,
-	12
-};
-
-static uint8_t const mod2db [AMP_BITS] =
-
-{
-	0,
-	2,
-	4,
-	7,
-	10,
-	16,
-	22,
-	28,
-	36
-};
-
-#endif
-
-signed ToneMaps1 (struct plc * plc)
-
-{
-	extern uint8_t const mod2bits [AMP_BITS];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	byte tonemap [PLC_SLOTS] [INT_CARRIERS >> 1];
-	uint16_t carriers = 0;
-	uint16_t carrier = 0;
-	uint8_t slots = 0;
-	uint8_t slot = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_tone_slot_char_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MACADDRESS [ETHER_ADDR_LEN];
-		uint8_t TMSLOT;
-	}
-	* request = (struct vs_tone_slot_char_request *) (message);
-	struct __packed vs_tone_slot_char_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t TMSLOT;
-		uint8_t NUMTMS;
-		uint16_t TMNUMACTCARRIERS;
-		uint8_t MOD_CARRIER [INT_CARRIERS/2];
-		uint8_t GIL;
-		uint8_t AGC;
-	}
-	* confirm = (struct vs_tone_slot_char_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_REQ));
-	memcpy (request->MACADDRESS, plc->RDA, sizeof (request->MACADDRESS));
-	request->TMSLOT = 0;
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	carriers = LE16TOH (confirm->TMNUMACTCARRIERS);
-	slots = confirm->NUMTMS;
-	if (!slots)
-	{
-		error (PLC_EXIT (plc), ECANCELED, "No Tone Maps Available");
-		return (-1);
-	}
-	memset (tonemap, 0, sizeof (tonemap));
-	for (slot = 0; slot < slots; slot++)
-	{
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_REQ));
-		memcpy (request->MACADDRESS, plc->RDA, sizeof (request->MACADDRESS));
-		request->TMSLOT = slot;
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RX_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		memcpy (&tonemap [slot][0], confirm->MOD_CARRIER, sizeof (confirm->MOD_CARRIER));
-	}
-	while (carrier < carriers)
-	{
-		unsigned value = 0;
-		unsigned scale = 0;
-		unsigned index = carrier >> 1;
-		printf ("% 04d", carrier);
-		for (slot = 0; slot < PLC_SLOTS; slot++)
-		{
-			value = tonemap [slot][index];
-			if ((carrier & 1))
-			{
-				value >>= 4;
-			}
-			value &= 0x0F;
-			printf (" %02d", mod2bits [value]);
-			value *= value;
-			scale += value;
-		}
-		if (slots)
-		{
-			scale /= slots;
-		}
-		if (_anyset (plc->flags, PLC_GRAPH))
-		{
-			printf (" %03d ", scale);
-			while (scale--)
-			{
-				printf ("#");
-			}
-		}
-		printf ("\n");
-		carrier++;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ToneMaps2.c.html b/docbook/ToneMaps2.c.html deleted file mode 100644 index 59bb7444..00000000 --- a/docbook/ToneMaps2.c.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - ToneMaps2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed ToneMaps2 (struct plc * plc);
- *
- *   amp.h
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TONEMAPS2_SOURCE
-#define TONEMAPS2_SOURCE
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/endian.h"
-#include "../plc/plc.h"
-#include "../mme/mme.h"
-
-#ifndef SIGNALTONOISE2_SOURCE
-
-static uint8_t const mod2bits [AMP_BITS] =
-
-{
-	0,
-	1,
-	2,
-	3,
-	4,
-	6,
-	8,
-	10,
-	12
-};
-
-#endif
-
-#ifndef SIGNALTONOISE2_SOURCE
-
-static uint8_t const mod2db [AMP_BITS] =
-
-{
-	0,
-	2,
-	4,
-	7,
-	10,
-	16,
-	22,
-	28,
-	36
-};
-
-#endif
-
-signed ToneMaps2 (struct plc * plc)
-
-{
-	uint8_t tonemap [PLC_SLOTS + 1][AMP_CARRIERS >> 1];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	uint16_t extent = 0;
-	uint16_t carriers = AMP_CARRIERS;
-	uint16_t carrier = 0;
-	uint8_t slots = PLC_SLOTS;
-	uint8_t slot = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_tonemap_char_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t MME_SUBVER;
-		uint8_t Reserved1 [3];
-		uint8_t MACADDRESS [ETHER_ADDR_LEN];
-		uint8_t TMSLOT;
-		uint8_t COUPLING;
-	}
-	* request = (struct vs_tonemap_char_request *) (message);
-	struct __packed vs_tonemap_char_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t MSTATUS;
-		uint8_t Reserved1;
-		uint16_t MME_LEN;
-		struct __packed vs_tonemap_char_header
-		{
-			uint8_t MME_SUBVER;
-			uint8_t Reserved2;
-			uint8_t MACADDRESS [6];
-			uint8_t TMSLOT;
-			uint8_t COUPLING;
-			uint8_t NUMTMS;
-			uint8_t Reserved4;
-			uint16_t TMNUMACTCARRIERS;
-			uint16_t Reserved5;
-			uint16_t NUMCARRIERS;
-			uint16_t Reserved6;
-			uint32_t Reserved7;
-		}
-		header;
-		uint8_t MOD_CARRIER [1];
-	}
-	* confirm = (struct vs_tonemap_char_confirm *) (message);
-	struct __packed vs_tonemap_char_fragment
-	{
-		struct ethernet_hdr ethernet;
-		struct homeplug_fmi qualcomm;
-		uint8_t MOD_CARRIER [1];
-	}
-	* fragment = (struct vs_tonemap_char_fragment *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (tonemap, 0, sizeof (tonemap));
-	for (carrier = slot = 0; slot < slots; carrier = 0, slot++)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_TONE_MAP_CHAR | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		memcpy (request->MACADDRESS, plc->RDA, sizeof (request->MACADDRESS));
-		request->TMSLOT = slot;
-		request->COUPLING = plc->coupling;
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 1, (VS_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			error (1, 0, "Device refused request for slot %d: %s", slot, MMECode (VS_TONE_MAP_CHAR | MMTYPE_CNF, confirm->MSTATUS));
-		}
-		carriers = LE16TOH (confirm->header.TMNUMACTCARRIERS);
-		slots = confirm->header.NUMTMS;
-		extent = LE16TOH (confirm->MME_LEN) - sizeof (struct vs_tonemap_char_header);
-		if (extent > (AMP_CARRIERS >> 1))
-		{
-			error (1, EOVERFLOW, "Too many carriers");
-		}
-		plc->packetsize -= sizeof (struct vs_tonemap_char_confirm);
-		plc->packetsize += sizeof (confirm->MOD_CARRIER);
-		if (plc->packetsize > extent)
-		{
-			plc->packetsize = extent;
-		}
-		memcpy (&tonemap [slot] [carrier], &confirm->MOD_CARRIER, plc->packetsize);
-		carrier += plc->packetsize;
-		extent -= plc->packetsize;
-		while (extent)
-		{
-			if (ReadMME (plc, 1, (VS_TONE_MAP_CHAR | MMTYPE_CNF)) <= 0)
-			{
-				error (1, errno, CHANNEL_CANTREAD);
-			}
-			plc->packetsize -= sizeof (struct vs_tonemap_char_fragment);
-			plc->packetsize += sizeof (fragment->MOD_CARRIER);
-			if (plc->packetsize > extent)
-			{
-				plc->packetsize = extent;
-			}
-			memcpy (&tonemap [slot] [carrier], fragment->MOD_CARRIER, plc->packetsize);
-			carrier += plc->packetsize;
-			extent -= plc->packetsize;
-		}
-	}
-	for (carrier = 0; carrier < carriers; carrier++)
-	{
-		uint16_t scale = 0;
-		uint16_t value = 0;
-		uint16_t index = carrier >> 1;
-		printf ("%04d", carrier);
-		for (slot = 0; slot < slots; slot++)
-		{
-			value = tonemap [slot][index];
-			if ((carrier & 1))
-			{
-				value >>= 4;
-			}
-			value &= 0x0F;
-			printf (",%02d", mod2bits [value]);
-			value *= value;
-			scale += value;
-		}
-		if (slots)
-		{
-			scale /= slots;
-		}
-		printf (" %03d ", scale);
-		if (_anyset (plc->flags, PLC_GRAPH))
-		{
-			while (scale--)
-			{
-				printf ("#");
-			}
-		}
-		printf ("\n");
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Topology.c.html b/docbook/Topology.c.html deleted file mode 100644 index 0714acf1..00000000 --- a/docbook/Topology.c.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - Topology.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Topology (struct plc * plc);
- *
- *   plc.h
- *
- *   call appropriate topology module based on the PLC device
- *   type;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TOPOLOGY_SOURCE
-#define TOPOLOGY_SOURCE
-
-#include "../plc/plc.h"
-
-signed Topology (struct plc * plc)
-
-{
-	return (PLCSelect (plc, Topology1, Topology2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Topology1.c.html b/docbook/Topology1.c.html deleted file mode 100644 index 4d53110c..00000000 --- a/docbook/Topology1.c.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - Topology1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Topology1 (struct plc * plc);
- *
- *   plc.h
- *
- *   display network topology on stdout; the topology shows bridges
- *   associated with a target bridge along with the tx/rx phy rates
- *   between the target and associated bridge plus the hardware and
- *   firmware revison of each bridge; the target bridge is shown on
- *   the first line and associated bridge are shown after;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TOPOLOGY1_SOURCE
-#define TOPOLOGY1_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed Topology1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t data [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->data);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	byte list [255] [ETHER_ADDR_LEN];
-	signed bridges = LocalDevices (channel, message, list, sizeof (list));
-	while (bridges--)
-	{
-		char address [ETHER_ADDR_LEN * 3];
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, list [bridges], channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (1, errno, CHANNEL_CANTSEND);
-		}
-		if (ReadMME (plc, 0, (VS_NW_INFO | MMTYPE_CNF)) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTREAD);
-			continue;
-		}
-		network = (struct network *)(&networks->networks);
-		if (_allclr (channel->flags, PLC_SILENCE))
-		{
-			printf (" P/L NET TEI ------ MAC ------ ------ BDA ------  TX  RX CHIPSET FIRMWARE\n");
-		}
-		printf (" LOC");
-		printf (" %s", memcmp (confirm->ethernet.OSA, network->CCO_MAC, sizeof (confirm->ethernet.OSA))? "STA": "CCO");
-		printf (" %03d", network->TEI);
-		printf (" %s", hexstring (address, sizeof (address), confirm->ethernet.OSA, sizeof (confirm->ethernet.OSA)));
-		printf (" %s", hexstring (address, sizeof (address), confirm->ethernet.ODA, sizeof (confirm->ethernet.ODA)));
-		printf (" n/a");
-		printf (" n/a");
-		Platform (channel, confirm->ethernet.OSA);
-		printf ("\n");
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				printf (" REM");
-				printf (" %s", memcmp (station->MAC, network->CCO_MAC, sizeof (station->MAC))? "STA": "CCO");
-				printf (" %03d", station->TEI);
-				printf (" %s", hexstring (address, sizeof (address), station->MAC, sizeof (station->MAC)));
-				printf (" %s", hexstring (address, sizeof (address), station->BDA, sizeof (station->BDA)));
-				printf (" %03d", station->AVGTX);
-				printf (" %03d", station->AVGRX);
-				Platform (channel, station->MAC);
-				printf ("\n");
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Topology2.c.html b/docbook/Topology2.c.html deleted file mode 100644 index d2ed2561..00000000 --- a/docbook/Topology2.c.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - Topology2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Topology2 (struct plc * plc);
- *
- *   plc.h
- *
- *   display network topology on stdout; the topology shows bridges
- *   associated with a target bridge along with the tx/rx phy rates
- *   between the target and associated bridge plus the hardware and
- *   firmware revison of each bridge; the target bridge is shown on
- *   the first line and associated bridge are shown after;
- *
- *   this function is a variation on function NetworkInfo but shows
- *   more information in more compact form;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TOPOLOGY2_SOURCE
-#define TOPOLOGY2_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../plc/plc.h"
-
-signed Topology2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint8_t list [255] [ETHER_ADDR_LEN];
-	signed bridges = LocalDevices (channel, message, list, sizeof (list));
-	while (bridges--)
-	{
-		char address [ETHER_ADDR_LEN * 3];
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, list [bridges], channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (1, errno, CHANNEL_CANTSEND);
-		}
-		if (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTREAD);
-			continue;
-		}
-		network = (struct network *)(&networks->networks);
-		if (_allclr (channel->flags, PLC_SILENCE))
-		{
-			printf (" P/L NET TEI ------ MAC ------ ------ BDA ------  TX  RX CHIPSET FIRMWARE\n");
-		}
-		printf (" LOC");
-		printf (" %s", memcmp (confirm->ethernet.OSA, network->CCO_MAC, sizeof (confirm->ethernet.OSA))? "STA": "CCO");
-		printf (" %03d", network->TEI);
-		printf (" %s", hexstring (address, sizeof (address), confirm->ethernet.OSA, sizeof (confirm->ethernet.OSA)));
-		printf (" %s", hexstring (address, sizeof (address), confirm->ethernet.ODA, sizeof (confirm->ethernet.ODA)));
-		printf (" n/a");
-		printf (" n/a");
-		Platform (channel, confirm->ethernet.OSA);
-		printf ("\n");
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				printf (" REM");
-				printf (" %s", memcmp (station->MAC, network->CCO_MAC, sizeof (station->MAC))? "STA": "CCO");
-				printf (" %03d", station->TEI);
-				printf (" %s", hexstring (address, sizeof (address), station->MAC, sizeof (station->MAC)));
-				printf (" %s", hexstring (address, sizeof (address), station->BDA, sizeof (station->BDA)));
-				station->AVGTX = LE16TOH (station->AVGTX);
-				station->AVGRX = LE16TOH (station->AVGRX);
-				printf (" %03d", station->AVGTX);
-				printf (" %03d", station->AVGRX);
-				Platform (channel, station->MAC);
-				printf ("\n");
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Traffic.c.html b/docbook/Traffic.c.html deleted file mode 100644 index 5fa92d61..00000000 --- a/docbook/Traffic.c.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - Traffic.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed  Traffic (struct plc * plc);
- *
- *   plc.h
- *
- *   generate bi-directional traffic between a local device and all
- *   remote devices on a powerline network; remote devices need not
- *   be connected; no traffic is generated between remote devices;
- *
- *   this function is similar to NetworkTraffic but takes less time
- *   since not all powerline paths are exercised and those that are
- *   can be exercised in parallel;
- *
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TRAFFIC_SOURCE
-#define TRAFFIC_SOURCE
-
-#include "../plc/plc.h"
-
-signed Traffic (struct plc * plc)
-
-{
-	return (PLCSelect (plc, Traffic1, Traffic2));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Traffic1.c.html b/docbook/Traffic1.c.html deleted file mode 100644 index d85cb08f..00000000 --- a/docbook/Traffic1.c.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Traffic1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Traffic1 (struct plc * plc);
- *
- *   generate bi-directional traffic between a local device and all
- *   remote devices on a powerline network; remote devices need not
- *   be connected; no traffic is generated between remote devices;
- *
- *   this function is similar to NetworkTraffic but takes less time
- *   since not all powerline paths are exercised and those that are
- *   can be exercised in parallel;
- *
- *   this function is for INT6x00 chipsets only due to changes in chip
- *   design; use Traffic2 for AR7x00 chipsets;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TRAFFIC1_SOURCE
-#define TRAFFIC1_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../mme/mme.h"
-#include "../plc/plc.h"
-
-signed Traffic1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint8_t AVGTX;
-		uint8_t AVGRX;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t NUMSTAS;
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	byte bridgelist [255] [ETHER_ADDR_LEN];
-	unsigned bridges = LocalDevices (channel, message, bridgelist, sizeof (bridgelist));
-	while (bridges--)
-	{
-		byte devicelist [255] [ETHER_ADDR_LEN];
-		unsigned devices = 0;
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, bridgelist [bridges], channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = ETHER_MIN_LEN - ETHER_CRC_LEN;
-		if (SendMME (plc) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTSEND);
-			continue;
-		}
-		if (ReadMME (plc, 0, (VS_NW_INFO | MMTYPE_CNF)) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTREAD);
-			continue;
-		}
-		memcpy (devicelist [devices++], request->ethernet.OSA, sizeof (devicelist [0]));
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				memcpy (devicelist [devices++], station->MAC, sizeof (devicelist [0]));
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		while (devices-- > 1)
-		{
-			Transmit (plc, devicelist [0], devicelist [devices]);
-			Antiphon (plc, devicelist [devices], devicelist [0]);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Traffic2.c.html b/docbook/Traffic2.c.html deleted file mode 100644 index 44223882..00000000 --- a/docbook/Traffic2.c.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - Traffic2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Traffic2 (struct plc * plc);
- *
- *   generate bi-directional traffic between a local device and all
- *   remote devices on a powerline network; remote devices need not
- *   be connected; no traffic is generated between remote devices;
- *
- *   this function is similar to NetworkTraffic but takes less time
- *   since not all powerline paths are exercised and those that are
- *   can be exercised in parallel;
- *
- *   this function is for AR7x00 chipsets due to chipset design
- *   changes; use Traffic1 for INT6x00 chipsets;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TRAFFIC2_SOURCE
-#define TRAFFIC2_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../mme/mme.h"
-#include "../plc/plc.h"
-
-signed Traffic2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	byte bridgelist [255] [ETHER_ADDR_LEN];
-	unsigned bridges = LocalDevices (channel, message, bridgelist, sizeof (bridgelist));
-	while (bridges--)
-	{
-		byte devicelist [255] [ETHER_ADDR_LEN];
-		unsigned devices = 0;
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, bridgelist [bridges], channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = ETHER_MIN_LEN - ETHER_CRC_LEN;
-		if (SendMME (plc) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTSEND);
-			continue;
-		}
-		if (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) <= 0)
-		{
-			error (0, errno, CHANNEL_CANTREAD);
-			continue;
-		}
-		memcpy (devicelist [devices++], request->ethernet.OSA, sizeof (devicelist [0]));
-		network = (struct network *)(&networks->networks);
-		while (networks->NUMAVLNS--)
-		{
-			station = (struct station *)(&network->stations);
-			while (network->NUMSTAS--)
-			{
-				memcpy (devicelist [devices++], station->MAC, sizeof (devicelist [0]));
-				station++;
-			}
-			network = (struct network *)(station);
-		}
-		while (devices-- > 1)
-		{
-			Transmit (plc, devicelist [0], devicelist [devices]);
-			Antiphon (plc, devicelist [devices], devicelist [0]);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Transmit.c.html b/docbook/Transmit.c.html deleted file mode 100644 index abb5b4d9..00000000 --- a/docbook/Transmit.c.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - Transmit.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed Transmit (struct plc * plc, byte source [], byte target []) ;
- *
- *   send TCP/IP frames to a remote powerline device to establish
- *   the source device TX PHY rate and remote device RX PHY rate;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef TRANSMIT_SOURCE
-#define TRANSMIT_SOURCE
-
-#include <memory.h>
-#include <errno.h>
-#include <sys/time.h>
-
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/types.h"
-#include "../tools/timer.h"
-#include "../plc/plc.h"
-
-signed Transmit (struct plc * plc, byte source [], byte target [])
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-	if (_allclr (plc->flags, PLC_SILENCE))
-	{
-		char sourcename [ETHER_ADDR_LEN * 3];
-		char targetname [ETHER_ADDR_LEN * 3];
-		hexdecode (source, ETHER_ADDR_LEN, sourcename, sizeof (sourcename));
-		hexdecode (target, ETHER_ADDR_LEN, targetname, sizeof (targetname));
-		fprintf (stderr, "%s %s %s\n", channel->ifname, sourcename, targetname);
-	}
-	memset (message, 0xA5, sizeof (* message));
-	EthernetHeader (message, target, source, ETHERTYPE_IP);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		if (sendpacket (channel, message, sizeof (* message)) <= 0)
-		{
-			error (1, ECANCELED, CHANNEL_CANTSEND);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		SLEEP (100);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/UnwantedMessage.c.html b/docbook/UnwantedMessage.c.html deleted file mode 100644 index dc895598..00000000 --- a/docbook/UnwantedMessage.c.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - UnwantedMessage.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed UnwantedMessage (void const * memory, size_t extent, uint8_t MMV, uint16_t MMTYPE);
- *
- *   mme.h
- *
- *   return true if memory does not contains a Qualcomm Atheros message
- *   of the specified version and type; the message version determines
- *   the location of the OUI field; messages with MMV = 1 have an FMI
- *   used to track multi-part confirmation counts; out of order counts
- *   are treated as an error;
- *
- *   constant __WHYNOT__ displays reason for message rejection;
- *
- *   batch is the fragment group identifier taken from the fragment
- *   frame;
- *
- *   total is the number of fragements in the group taken from the
- *   fragment frame;
- *
- *   index is the fragment identifier from the fragment frame;
- *
- *   count is the number of fragments received so far;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef UNWANTEDMESSAGE_SOURCE
-#define UNWANTEDMESSAGE_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/endian.h"
-#include "../tools/error.h"
-#include "../mme/mme.h"
-
-signed UnwantedMessage (void const * memory, size_t extent, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	extern const byte localcast [ETHER_ADDR_LEN];
-//	struct message * message = (struct message *)(memory);
-	struct homeplug * homeplug = (struct homeplug *)(memory);
-	if (!extent)
-	{
-		return (-1);
-	}
-	if (extent < (ETHER_MIN_LEN - ETHER_CRC_LEN))
-	{
-
-#if defined (__WHYNOT__)
-
-		error (0, 0, "Wrong Ethernet Frame Size: Received " SIZE_T_SPEC " bytes but need at least %d", extent, ETHER_MIN_LEN - ETHER_CRC_LEN);
-
-#endif
-
-		return (-1);
-	}
-	if (extent > (ETHER_MAX_LEN))
-	{
-
-#if defined (__WHYNOT__)
-
-		error (0, 0, "Wrong Ethernet Frame Size: Received " SIZE_T_SPEC " bytes but need at most %d", extent, ETHER_MAX_LEN);
-
-#endif
-
-		return (-1);
-	}
-	if (ntohs (homeplug->ethernet.MTYPE) != ETH_P_HPAV)
-	{
-
-#if defined (__WHYNOT__)
-
-		error (0, 0, "Wrong Ethernet Frame Type: Received %04X while waiting for %04X", ntohs (homeplug->ethernet.MTYPE), ETH_P_HPAV);
-
-#endif
-
-		return (-1);
-	}
-	if (homeplug->homeplug.MMV != MMV)
-	{
-
-#if defined (__WHYNOT__)
-
-		error (0, 0, "Wrong Message Version: Received %02X but expected %02X", homeplug->homeplug.MMV, MMV);
-
-#endif
-
-		return (-1);
-	}
-	if (homeplug->homeplug.MMV == 0)
-	{
-		struct qualcomm_hdr * qualcomm = (struct qualcomm_hdr *)(&homeplug->homeplug);
-		if (LE16TOH (qualcomm->MMTYPE) != MMTYPE)
-		{
-
-#if defined (__WHYNOT__)
-
-			error (0, 0, "Wrong Message Type: Received %04X while waiting for %04X", LE16TOH (qualcomm->MMTYPE), MMTYPE);
-
-#endif
-
-			return (-1);
-		}
-		if ((MMTYPE < VS_MMTYPE_MIN) || (MMTYPE > VS_MMTYPE_MAX))
-		{
-		}
-		else if (memcmp (localcast, qualcomm->OUI, sizeof (qualcomm->OUI)))
-		{
-
-#if defined (__WHYNOT__)
-
-			error (0, 0, "Wrong Message Vendor");
-
-#endif
-
-			return (-1);
-		}
-	}
-	if (homeplug->homeplug.MMV == 1)
-	{
-		struct qualcomm_fmi * qualcomm = (struct qualcomm_fmi *)(&homeplug->homeplug);
-
-#if FMI
-
-		static unsigned total = 0;
-		static unsigned index = 0;
-		static unsigned count = 0;
-
-#endif
-
-		if (LE16TOH (qualcomm->MMTYPE) != MMTYPE)
-		{
-
-#if defined (__WHYNOT__)
-
-			error (0, 0, "Wrong Message Type: Received %04X while waiting for %04X", LE16TOH (qualcomm->MMTYPE), MMTYPE);
-
-#endif
-
-			return (-1);
-		}
-
-#if FMI
-
-		index = qualcomm->FMID >> 0 & 0x0F;
-		if (!index)
-		{
-			total = qualcomm->FMID >> 4 & 0x0F;
-			count = qualcomm->FMID >> 0 & 0x0F;
-			if (memcmp (localcast, qualcomm->OUI, sizeof (qualcomm->OUI)))
-			{
-
-#if defined (__WHYNOT__)
-
-				error (0, 0, "Wrong Message Vendor");
-
-#endif
-
-				return (-1);
-			}
-		}
-		if (index != count)
-		{
-
-#if defined (__WHYNOT__)
-
-			error (0, 0, "Message Fragment Out-of-order");
-
-#endif
-
-			return (-1);
-		}
-		if (count > total)
-		{
-
-#if defined (__WHYNOT__)
-
-			error (0, 0, "Fragment Count Exceeds Total");
-
-#endif
-
-			return (-1);
-		}
-		count++;
-
-#endif
-
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/UpdateLocalHost.png b/docbook/UpdateLocalHost.png deleted file mode 100644 index dee3b303..00000000 Binary files a/docbook/UpdateLocalHost.png and /dev/null differ diff --git a/docbook/UpgradeDevice.png b/docbook/UpgradeDevice.png deleted file mode 100644 index 2a7f7a82..00000000 Binary files a/docbook/UpgradeDevice.png and /dev/null differ diff --git a/docbook/UpgradeDevice1.c.html b/docbook/UpgradeDevice1.c.html deleted file mode 100644 index f22fbba7..00000000 --- a/docbook/UpgradeDevice1.c.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - UpgradeDevice1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int UpgradeDevice1 (struct int6k * int6k);
- *
- *   int6k.h
- *
- *   This plugin upgrades a device having NVRAM; runtime firmware must
- *   be running for this to work; NVM and PIB files in struct int6k
- *   must be opened before calling this plugin; this plugin is used by
- *   several program like int6k, int6kf and int6khost;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef UPGRADEDEVICE1_SOURCE
-#define UPGRADEDEVICE1_SOURCE
-
-#include "../plc/plc.h"
-
-int UpgradeDevice1 (struct plc * plc)
-
-{
-	if (WriteNVM (plc))
-	{
-		return (-1);
-	}
-	if (WritePIB (plc))
-	{
-		return (-1);
-	}
-	if (FlashDevice1 (plc))
-	{
-		return (-1);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/VersionInfo1.c.html b/docbook/VersionInfo1.c.html deleted file mode 100644 index 5cc9e3a8..00000000 --- a/docbook/VersionInfo1.c.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - VersionInfo1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed VersionInfo (struct plc * plc);
- *
- *   plc.h
- *
- *   read hardware and software version information from an INT6x00
- *   using a VS_SW_VER Request Message;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef VERSIONINFO1_SOURCE
-#define VERSIONINFO1_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../plc/plc.h"
-
-signed VersionInfo1 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Request Version Information");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		chipset (confirm);
-		Display (plc, "%s %s", chipsetname (confirm->MDEVICEID), confirm->MVERSION);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/VersionInfo2.c.html b/docbook/VersionInfo2.c.html deleted file mode 100644 index 3a426e20..00000000 --- a/docbook/VersionInfo2.c.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - VersionInfo2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed VersionInfo2 (struct plc * plc);
- *
- *   plc.h
- *
- *   read hardware and software version information from an INT6000
- *   using a VS_SW_VER Request Message;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef VERSIONINFO2_SOURCE
-#define VERSIONINFO2_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../plc/plc.h"
-
-signed VersionInfo2 (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t COOKIE;
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICE_CLASS;
-		uint8_t MVERLENGTH;
-		char MVERSION [254];
-		uint32_t IDENT;
-		uint32_t STEPPING_NUM;
-		uint32_t COOKIE;
-		uint32_t RSVD [6];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Request Version Information");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	request->COOKIE = HTOLE32 (plc->cookie);
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) > 0)
-	{
-
-#if 0
-
-		fprintf (stderr, "DEVICE CLASS (%d)\n", LE32TOH (confirm->MDEVICE_CLASS));
-		fprintf (stderr, "VERSION LENGTH (%d)\n", LE32TOH (confirm->MVERLENGTH));
-		fprintf (stderr, "VERSION STRING [%s]\n", LE32TOH (confirm->MVERSION));
-		fprintf (stderr, "IDENT [0x%08X]\n", LE32TOH (confirm->IDENT));
-		fprintf (stderr, "STEPPING NUMBER [0x%08X]\n", LE32TOH (confirm->STEPPING_NUM));
-		fprintf (stderr, "COOKIE [0x%08X]\n", LE32TOH (confirm->COOKIE));
-
-#endif
-
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			continue;
-		}
-		chipset (confirm);
-		Display (plc, "%s %s", chipsetname (confirm->MDEVICE_CLASS), confirm->MVERSION);
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/VisualStudioNET.png b/docbook/VisualStudioNET.png deleted file mode 100644 index cb1d9f6c..00000000 Binary files a/docbook/VisualStudioNET.png and /dev/null differ diff --git a/docbook/WaitForReset.c.html b/docbook/WaitForReset.c.html deleted file mode 100644 index 33dad983..00000000 --- a/docbook/WaitForReset.c.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - WaitForReset.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WaitForReset (struct plc * plc, char string [], size_t length);
- *
- *   plc.h
- *
- *   poll the device using VS_SW_VER messages until no confirmation
- *   messages are received indicating that the firmware has stopped
- *   running; return 0 if the firmware stops within the allotted time
- *   or -1 if it does not or if transmission errors occur;
- *
- *   this function cannot distinguish between a software reset and
- *   a power failure;
- *
- *   retry is number of times to poll the device before returniung
- *   an error to indicate that the device failed to reset; timer is
- *   is the time between poll attempts;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WAITFORRESET_SOURCE
-#define WAITFORRESET_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <sys/time.h>
-
-#include "../plc/plc.h"
-#include "../tools/timer.h"
-#include "../tools/error.h"
-
-signed WaitForReset (struct plc * plc, char string [], size_t length)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (string, 0, length);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (!plc->packetsize)
-		{
-			memcpy (string, confirm->MVERSION, confirm->MVERLENGTH);
-			return (0);
-		}
-	}
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WaitForRestart.c.html b/docbook/WaitForRestart.c.html deleted file mode 100644 index 12891564..00000000 --- a/docbook/WaitForRestart.c.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - WaitForRestart.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WaitForRestart (struct plc * plc, char string [], size_t length);
- *
- *   plc.h
- *
- *   wait for the local powerline device to reset then start again;
- *   this function may be called to stop the program from returning
- *   to the command line until a flash or reset action is completed;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WAITFORRESTART_SOURCE
-#define WAITFORRESTART_SOURCE
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-
-signed WaitForRestart (struct plc * plc)
-
-{
-	if (_allclr (plc->flags, PLC_QUICK_FLASH))
-	{
-		char firmware [PLC_VERSION_STRING];
-		if (WaitForReset (plc, firmware, sizeof (firmware)))
-		{
-			error (PLC_EXIT (plc), 0, "Device did not Reset");
-			return (-1);
-		}
-		if (WaitForStart (plc, firmware, sizeof (firmware)))
-		{
-			error (PLC_EXIT (plc), 0, "Device did not Start");
-			return (-1);
-		}
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WaitForStart.c.html b/docbook/WaitForStart.c.html deleted file mode 100644 index 2544626f..00000000 --- a/docbook/WaitForStart.c.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - WaitForStart.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WaitForStart (struct plc * plc, char string [], size_t length);
- *
- *   plc.h
- *
- *   poll the local device with VS_SW_VER messages until it responds
- *   or the retry count expires; return 0 if the device responds in
- *   time or -1 if it does not;
- *
- *   if the device responds then set the struct plc hardwareID field
- *   to indicate the true hardware platform; function chipset corrects
- *   some unfortunate bootloader errors;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WAITFORSTART_SOURCE
-#define WAITFORSTART_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-#include <string.h>
-#include <sys/time.h>
-
-#include "../plc/plc.h"
-#include "../tools/timer.h"
-#include "../tools/error.h"
-
-signed WaitForStart (struct plc * plc, char string [], size_t length)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-		uint16_t MPLATFORM;
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (string, 0, length);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (plc->packetsize)
-		{
-			chipset (confirm);
-			plc->hardwareID = confirm->MDEVICEID;
-			memcpy (channel->peer, request->ethernet.OSA, sizeof (channel->peer));
-			memcpy (string, confirm->MVERSION, confirm->MVERLENGTH);
-			return (0);
-		}
-	}
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WatchdogReport.c.html b/docbook/WatchdogReport.c.html deleted file mode 100644 index b49772ce..00000000 --- a/docbook/WatchdogReport.c.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - WatchdogReport.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WatchdogReport (struct plc * plc);
- *
- *   plc.h
- *
- *   Read the watchdog report using VS_WD_RPT and write it to a file
- *   in binary format; this file can be sent to Atheros Support for
- *   analysis;
- *
- *   The VS_WD_RPT message returns an indication, not a confirmation
- *    message;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WATCHDOGREPORT_SOURCE
-#define WATCHDOGREPORT_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/memory.h"
-#include "../tools/format.h"
-
-signed WatchdogReport (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wd_rpt_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t SESSIONID;
-		uint8_t CLR;
-	}
-	* request = (struct vs_wd_rpt_request *) (message);
-	struct __packed vs_wd_rpt_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint16_t SESSIONID;
-		uint8_t NUMPARTS;
-		uint8_t CURPART;
-		uint16_t RDATALENGTH;
-		uint8_t RDATAOFFSET;
-		uint8_t RDATA [1];
-	}
-	* indicate = (struct vs_wd_rpt_ind *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Read Watchdog Report");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_WD_RPT | MMTYPE_REQ));
-	request->SESSIONID = HTOLE32 (plc->cookie);
-	request->CLR = plc->readaction;
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	do
-	{
-		if (ReadMME (plc, 0, (VS_WD_RPT | MMTYPE_IND)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (indicate->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (write (plc->rpt.file, indicate->RDATA + indicate->RDATAOFFSET, LE16TOH (indicate->RDATALENGTH)) != LE16TOH (indicate->RDATALENGTH))
-		{
-			Failure (plc, FILE_CANTSAVE, plc->rpt.name);
-			return (-1);
-		}
-	}
-	while (indicate->CURPART < indicate->NUMPARTS);
-	Confirm (plc, "Read %s", plc->rpt.name);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/Win7-ftp-installer.png b/docbook/Win7-ftp-installer.png deleted file mode 100644 index c4009956..00000000 Binary files a/docbook/Win7-ftp-installer.png and /dev/null differ diff --git a/docbook/Win7-ftp-market.png b/docbook/Win7-ftp-market.png deleted file mode 100644 index c5cf9b5f..00000000 Binary files a/docbook/Win7-ftp-market.png and /dev/null differ diff --git a/docbook/Win7-ftp-toolkit.png b/docbook/Win7-ftp-toolkit.png deleted file mode 100644 index c82af14c..00000000 Binary files a/docbook/Win7-ftp-toolkit.png and /dev/null differ diff --git a/docbook/Win7-installer-dialogue.png b/docbook/Win7-installer-dialogue.png deleted file mode 100644 index 31fc01fa..00000000 Binary files a/docbook/Win7-installer-dialogue.png and /dev/null differ diff --git a/docbook/Win7-remove-program.png b/docbook/Win7-remove-program.png deleted file mode 100644 index 18f0f0ec..00000000 Binary files a/docbook/Win7-remove-program.png and /dev/null differ diff --git a/docbook/Win7-run-installer.png b/docbook/Win7-run-installer.png deleted file mode 100644 index 24c9728e..00000000 Binary files a/docbook/Win7-run-installer.png and /dev/null differ diff --git a/docbook/Win7-system-settings.png b/docbook/Win7-system-settings.png deleted file mode 100644 index b6779dc2..00000000 Binary files a/docbook/Win7-system-settings.png and /dev/null differ diff --git a/docbook/WinXP-AddRemoveProgram.png b/docbook/WinXP-AddRemoveProgram.png deleted file mode 100644 index f915c28a..00000000 Binary files a/docbook/WinXP-AddRemoveProgram.png and /dev/null differ diff --git a/docbook/WinXP-PathVariable.png b/docbook/WinXP-PathVariable.png deleted file mode 100644 index 25ab7572..00000000 Binary files a/docbook/WinXP-PathVariable.png and /dev/null differ diff --git a/docbook/WinXP-VisualStudioNET.png b/docbook/WinXP-VisualStudioNET.png deleted file mode 100644 index cb1d9f6c..00000000 Binary files a/docbook/WinXP-VisualStudioNET.png and /dev/null differ diff --git a/docbook/WinXP-WindowsInstaller.png b/docbook/WinXP-WindowsInstaller.png deleted file mode 100644 index 310b1838..00000000 Binary files a/docbook/WinXP-WindowsInstaller.png and /dev/null differ diff --git a/docbook/WriteCFG.c.html b/docbook/WriteCFG.c.html deleted file mode 100644 index 1779850a..00000000 --- a/docbook/WriteCFG.c.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - WriteCFG.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteCFG (struct plc * plc);
- *
- *   plc.h
- *
- *   This plugin for program plc writes the contents of an SDRAM
- *   confirmation file to a device using a VS_SET_SDRAM message; the
- *   CFG file in struct plc must be opened before this function is
- *   called; the bootloader must be running for this to work;
- *
- *   the VS_SET_SDRAM message is recognized by the INT600 BootLoader
- *   only; the INT6400 BootLoader recognizes it but does nothing with
- *   it;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITECFG_SOURCE
-#define WRITECFG_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../ram/sdram.h"
-
-int WriteCFG (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_set_sdram_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		struct config_ram config_ram;
-		uint32_t CHECKSUM;
-	}
-	* request = (struct vs_set_sdram_request *) (message);
-	struct __packed vs_set_sdram_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_set_sdram_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Write Configuration Applet from %s", plc->CFG.name);
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SET_SDRAM | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (lseek (plc->CFG.file, 0, SEEK_SET))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTHOME, plc->CFG.name);
-		return (-1);
-	}
-	if (read (plc->CFG.file, &request->config_ram, sizeof (struct config_ram)) != sizeof (struct config_ram))
-	{
-		error (PLC_EXIT (plc), errno, FILE_CANTREAD, plc->CFG.name);
-		return (-1);
-	}
-	if (read (plc->CFG.file, &request->CHECKSUM, sizeof (request->CHECKSUM)) != sizeof (request->CHECKSUM))
-	{
-		error (PLC_EXIT (plc), errno, "can't read %s checksum", plc->CFG.name);
-		return (-1);
-	}
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_SET_SDRAM | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	Confirm (plc, "Written");
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecuteApplet2.c.html b/docbook/WriteExecuteApplet2.c.html deleted file mode 100644 index 1ffb23d6..00000000 --- a/docbook/WriteExecuteApplet2.c.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - WriteExecuteApplet2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecuteApplet2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header);
- *
- *   plc.h
- *
- *   use VS_WRITE_AND_EXECUTE_APPLET write a firmware image into SDRAM and
- *   start execution when the image is stored in the new image file
- *   format;
- *
- *   the boot loader must be running for this to work since runtime
- *   firmware ignores VS_WRITE_AND_EXECUTE_APPLET messages;
- *
- *   beware that this function is identical to WriteExecuteFirmware2
- *   except that the ALLOWDED_MEM_TYPE is set to 1;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEAPPLET2_SOURCE
-#define WRITEEXECUTEAPPLET2_SOURCE
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed WriteExecuteApplet2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_write_execute_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint8_t IMAGE [PLC_MODULE_SIZE];
-	}
-	* request = (struct vs_write_execute_request *) (message);
-	struct __packed vs_write_execute_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint32_t CURR_PART_ABSOLUTE_ADDR;
-		uint32_t ABSOLUTE_START_ADDR;
-	}
-	* confirm = (struct vs_write_execute_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned action = PLC_MODULE_ABSOLUTE;
-	uint32_t length = PLC_MODULE_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->ImageAddress);
-	uint32_t extent = LE32TOH (nvm_header->ImageLength);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->NVM.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_REQ));
-		if (length > extent)
-		{
-			if (!(LE32TOH(nvm_header->EntryPoint) % sizeof(nvm_header->EntryPoint)))
-			{
-				Request (plc, "Start %s (%d) (%08X)", plc->NVM.name, module, LE32TOH (nvm_header->EntryPoint));
-				action |= PLC_MODULE_EXECUTE;
-			}
-			length = extent;
-		}
-		if (read (plc->NVM.file, request->IMAGE, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->NVM.name);
-		}
-		request->CLIENT_SESSION_ID = HTOLE32 (plc->cookie);
-		request->SERVER_SESSION_ID = HTOLE32 (0);
-		request->FLAGS = HTOLE32 (action);
-		request->ALLOWED_MEM_TYPES [0] = 1;
-		request->TOTAL_LENGTH = nvm_header->ImageLength;
-		request->CURR_PART_LENGTH = HTOLE32 (length);
-		request->CURR_PART_OFFSET = HTOLE32 (offset);
-		request->START_ADDR = nvm_header->EntryPoint;
-		request->CHECKSUM = nvm_header->ImageChecksum;
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_LENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_OFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecuteFirmware.c.html b/docbook/WriteExecuteFirmware.c.html deleted file mode 100644 index 6dfcf1e2..00000000 --- a/docbook/WriteExecuteFirmware.c.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - WriteExecuteFirmware.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecuteFirmware (struct plc * plc, unsigned module, void const * nvm_header);
- *
- *   plc.h
- *
- *   call appropriate firmware download function based on the
- *   image file format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEFIRMWARE_SOURCE
-#define WRITEEXECUTEFIRMWARE_SOURCE
-
-#include "../plc/plc.h"
-
-signed WriteExecuteFirmware (struct plc * plc, unsigned module, void const * nvm_header)
-
-{
-	return ((LE32TOH (*(uint32_t *)(nvm_header)) == 0x60000000)? WriteExecuteFirmware1 (plc, module, nvm_header): WriteExecuteFirmware2 (plc, module, nvm_header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecuteFirmware1.c.html b/docbook/WriteExecuteFirmware1.c.html deleted file mode 100644 index 0346b027..00000000 --- a/docbook/WriteExecuteFirmware1.c.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - WriteExecuteFirmware1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecuteFirmware1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header);
- *
- *   plc.h
- *
- *   write firmware image into SDRAM and start execution using the
- *   VS_WRITE_AND_EXECUTE_APPLET message when the image is in legacy
- *   file format;
- *
- *   the boot loader must be running for this to work since runtime
- *   firmware ignores VS_WRITE_AND_EXECUTE_APPLET messages;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEFIRMWARE1_SOURCE
-#define WRITEEXECUTEFIRMWARE1_SOURCE
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed WriteExecuteFirmware1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_write_execute_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint8_t IMAGE [PLC_MODULE_SIZE];
-	}
-	* request = (struct vs_write_execute_request *) (message);
-	struct __packed vs_write_execute_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint32_t CURR_PART_ABSOLUTE_ADDR;
-		uint32_t ABSOLUTE_START_ADDR;
-	}
-	* confirm = (struct vs_write_execute_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned action = PLC_MODULE_ABSOLUTE;
-	uint32_t length = PLC_MODULE_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->IMAGEADDRESS);
-	uint32_t extent = LE32TOH (nvm_header->IMAGELENGTH);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->NVM.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_REQ));
-		if (length > extent)
-		{
-			if (!(LE32TOH(nvm_header->ENTRYPOINT) % sizeof(nvm_header->ENTRYPOINT)))
-			{
-				Request (plc, "Start %s (%d) (%08X)", plc->NVM.name, module, LE32TOH (nvm_header->ENTRYPOINT));
-				action |= PLC_MODULE_EXECUTE;
-			}
-			length = extent;
-		}
-		if (read (plc->NVM.file, request->IMAGE, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->NVM.name);
-		}
-		request->CLIENT_SESSION_ID = HTOLE32 (plc->cookie);
-		request->SERVER_SESSION_ID = HTOLE32 (0);
-		request->FLAGS = HTOLE32 (action);
-		request->ALLOWED_MEM_TYPES [0] = 1;
-		request->TOTAL_LENGTH = nvm_header->IMAGELENGTH;
-		request->CURR_PART_LENGTH = HTOLE32 (length);
-		request->CURR_PART_OFFSET = HTOLE32 (offset);
-		request->START_ADDR = nvm_header->ENTRYPOINT;
-		request->CHECKSUM = nvm_header->IMAGECHECKSUM;
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_LENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_OFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecuteFirmware2.c.html b/docbook/WriteExecuteFirmware2.c.html deleted file mode 100644 index d3c92031..00000000 --- a/docbook/WriteExecuteFirmware2.c.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - WriteExecuteFirmware2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecuteFirmware2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header);
- *
- *   plc.h
- *
- *   use VS_WRITE_AND_EXECUTE_APPLET write a firmware image into SDRAM and
- *   start execution when the image is stored in the new image file
- *   format;
- *
- *   the boot loader must be running for this to work since runtime
- *   firmware ignores VS_WRITE_AND_EXECUTE_APPLET messages;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEFIRMWARE2_SOURCE
-#define WRITEEXECUTEFIRMWARE2_SOURCE
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed WriteExecuteFirmware2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_write_execute_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint8_t IMAGE [PLC_MODULE_SIZE];
-	}
-	* request = (struct vs_write_execute_request *) (message);
-	struct __packed vs_write_execute_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint32_t CURR_PART_ABSOLUTE_ADDR;
-		uint32_t ABSOLUTE_START_ADDR;
-	}
-	* confirm = (struct vs_write_execute_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	unsigned action = PLC_MODULE_ABSOLUTE;
-	uint32_t length = PLC_MODULE_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->ImageAddress);
-	uint32_t extent = LE32TOH (nvm_header->ImageLength);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->NVM.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_REQ));
-		if (length > extent)
-		{
-			if (!(LE32TOH(nvm_header->EntryPoint) % sizeof(nvm_header->EntryPoint)))
-			{
-				Request (plc, "Start %s (%d) (%08X)", plc->NVM.name, module, LE32TOH (nvm_header->EntryPoint));
-				action |= PLC_MODULE_EXECUTE;
-			}
-			length = extent;
-		}
-		if (read (plc->NVM.file, request->IMAGE, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->NVM.name);
-		}
-		request->CLIENT_SESSION_ID = HTOLE32 (plc->cookie);
-		request->SERVER_SESSION_ID = HTOLE32 (0);
-		request->FLAGS = HTOLE32 (action);
-		request->ALLOWED_MEM_TYPES [0] = 1;
-		request->TOTAL_LENGTH = nvm_header->ImageLength;
-		request->CURR_PART_LENGTH = HTOLE32 (length);
-		request->CURR_PART_OFFSET = HTOLE32 (offset);
-		request->START_ADDR = nvm_header->EntryPoint;
-		request->CHECKSUM = nvm_header->ImageChecksum;
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_LENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_OFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecutePIB.c.html b/docbook/WriteExecutePIB.c.html deleted file mode 100644 index 3716ff41..00000000 --- a/docbook/WriteExecutePIB.c.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - WriteExecutePIB.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecutePIB (struct plc * plc, uint32_t offset, struct pib_header * header);
- *
- *   plc.h
- *
- *   write parameters to SDRAM using VS_WRITE_AND_EXECUTE_APPLET; the memory
- *   offset depends on the firmware release;
- *
- *   plc->PIB must be positioned to the start of the PIB file or this
- *   function will not work;
- *
- *   pass in the PIB header since it contains the PIB file length and
- *   checksum needed by the VS_WRITE_AND_EXECUTE_APPLET request;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEPIB_SOURCE
-#define WRITEEXECUTEPIB_SOURCE
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed WriteExecutePIB (struct plc * plc, uint32_t offset, struct pib_header * header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_write_execute_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint8_t IMAGE [PLC_MODULE_SIZE];
-	}
-	* request = (struct vs_write_execute_request *) (message);
-	struct __packed vs_write_execute_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint32_t CURR_PART_ABSOLUTE_ADDR;
-		uint32_t ABSOLUTE_START_ADDR;
-	}
-	* confirm = (struct vs_write_execute_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_MODULE_SIZE;
-	uint32_t extent = LE32TOH (header->PIBLENGTH);
-	Request (plc, "Write %s (0) (%08X:%d)", plc->PIB.name, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->PIB.file, request->IMAGE, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->PIB.name);
-		}
-		request->CLIENT_SESSION_ID = HTOLE32 (plc->cookie);
-		request->SERVER_SESSION_ID = HTOLE32 (0);
-		request->FLAGS = HTOLE32 (PLC_MODULE_ABSOLUTE);
-		request->ALLOWED_MEM_TYPES [0] = 1;
-		request->TOTAL_LENGTH = header->PIBLENGTH;
-		request->CURR_PART_LENGTH = HTOLE32 (length);
-		request->CURR_PART_OFFSET = HTOLE32 (offset);
-		request->START_ADDR = HTOLE32 (0);
-		request->CHECKSUM = header->CHECKSUM;
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_LENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_OFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecuteParameters.c.html b/docbook/WriteExecuteParameters.c.html deleted file mode 100644 index c03eaead..00000000 --- a/docbook/WriteExecuteParameters.c.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - WriteExecuteParameters.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecuteParameters (struct plc * plc, unsigned module, void const * nvm_header);
- *
- *   plc.h
- *
- *   call appropriate parameter block downlaod function based on
- *   the image file format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEPARAMETERS_SOURCE
-#define WRITEEXECUTEPARAMETERS_SOURCE
-
-#include "../plc/plc.h"
-
-signed WriteExecuteParameters (struct plc * plc, unsigned module, void const * nvm_header)
-
-{
-	return ((LE32TOH (*(uint32_t *)(nvm_header)) == 0x60000000)? WriteExecuteParameters1 (plc, module, nvm_header): WriteExecuteParameters2 (plc, module, nvm_header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecuteParameters1.c.html b/docbook/WriteExecuteParameters1.c.html deleted file mode 100644 index 585119d3..00000000 --- a/docbook/WriteExecuteParameters1.c.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - WriteExecuteParameters1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecuteParameters1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header);
- *
- *   plc.h
- *
- *   write parameters to SDRAM using VS_WRITE_AND_EXECUTE_APPLET;
- *
- *   we pass in the PIB image header because that is how the caller
- *   located the PIB image in the file but we must write the entire
- *   file into SDRAM at the address found in the PIB image header;
- *   consequenctly, we have to rewind the file position and compute
- *   the actual file size;
- *
- *   this implementeation will probably never be used because we do
- *   not distribute parameter files in old image file format; but if
- *   we then this is it;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEPARAMETERS1_SOURCE
-#define WRITEEXECUTEPARAMETERS1_SOURCE
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed WriteExecuteParameters1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct nvm_header1 nvm_manifest;
-	struct __packed vs_write_execute_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint8_t IMAGE [PLC_MODULE_SIZE];
-	}
-	* request = (struct vs_write_execute_request *) (message);
-	struct __packed vs_write_execute_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint32_t CURR_PART_ABSOLUTE_ADDR;
-		uint32_t ABSOLUTE_START_ADDR;
-	}
-	* confirm = (struct vs_write_execute_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_MODULE_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->IMAGEADDRESS);
-	uint32_t extent = LE32TOH (nvm_header->IMAGELENGTH);
-
-#if 0
-
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->PIB.name, module, offset, extent);
-
-#else
-
-/*
- *	adjust the file extent to include the the manifest image header, the manifest image, the PIB
- *	image header and the PIB image; this should in principle, equal the PIB filesize for Panther
- *	and Lynx .pib files;
- */
-
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (read (plc->PIB.file, &nvm_manifest, sizeof (nvm_manifest)) != sizeof (nvm_manifest))
-	{
-		error (1, errno, FILE_CANTREAD, plc->PIB.name);
-	}
-	extent += sizeof (* nvm_header);
-	extent += LE32TOH (nvm_manifest.IMAGELENGTH);
-	extent += sizeof (* nvm_header);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->PIB.name, module, offset, extent);
-
-#endif
-
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->PIB.file, request->IMAGE, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->PIB.name);
-		}
-		request->CLIENT_SESSION_ID = HTOLE32 (plc->cookie);
-		request->SERVER_SESSION_ID = HTOLE32 (0);
-		request->FLAGS = HTOLE32 (PLC_MODULE_ABSOLUTE);
-		request->ALLOWED_MEM_TYPES [0] = 1;
-		request->TOTAL_LENGTH = nvm_header->IMAGELENGTH;
-		request->CURR_PART_LENGTH = HTOLE32 (length);
-		request->CURR_PART_OFFSET = HTOLE32 (offset);
-		request->START_ADDR = nvm_header->ENTRYPOINT;
-		request->CHECKSUM = nvm_header->IMAGECHECKSUM;
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_LENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_OFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteExecuteParameters2.c.html b/docbook/WriteExecuteParameters2.c.html deleted file mode 100644 index f167b535..00000000 --- a/docbook/WriteExecuteParameters2.c.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - WriteExecuteParameters2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteExecuteParameters2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header);
- *
- *   plc.h
- *
- *   write parameters to SDRAM using VS_WRITE_AND_EXECUTE_APPLET;
- *
- *   we pass in the PIB image header because that is how the caller
- *   located the PIB image in the file but we must write the entire
- *   file into SDRAM at the address found in the PIB image header;
- *   consequenctly, we have to rewind the file position and compute
- *   the actual file size;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEEXECUTEPARAMETERS2_SOURCE
-#define WRITEEXECUTEPARAMETERS2_SOURCE
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed WriteExecuteParameters2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct nvm_header2 tmp_header;
-	struct __packed vs_write_execute_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint8_t IMAGE [PLC_MODULE_SIZE];
-	}
-	* request = (struct vs_write_execute_request *) (message);
-	struct __packed vs_write_execute_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MSTATUS;
-		uint32_t CLIENT_SESSION_ID;
-		uint32_t SERVER_SESSION_ID;
-		uint32_t FLAGS;
-		uint8_t ALLOWED_MEM_TYPES [8];
-		uint32_t TOTAL_LENGTH;
-		uint32_t CURR_PART_LENGTH;
-		uint32_t CURR_PART_OFFSET;
-		uint32_t START_ADDR;
-		uint32_t CHECKSUM;
-		uint8_t RESERVED2 [8];
-		uint32_t CURR_PART_ABSOLUTE_ADDR;
-		uint32_t ABSOLUTE_START_ADDR;
-	}
-	* confirm = (struct vs_write_execute_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_MODULE_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->ImageAddress);
-	uint32_t extent = LE32TOH (nvm_header->ImageLength);
-
-#if 1
-
-/*
- *	adjust the file extent to include the the manifest image header, the manifest image, the PIB
- *	image header and the PIB image; this should in principle, equal the PIB filesize for Panther
- *	and Lynx .pib files;
- */
-
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-	if (read (plc->PIB.file, &tmp_header, sizeof (tmp_header)) != sizeof (tmp_header))
-	{
-		error (1, errno, FILE_CANTREAD, plc->PIB.name);
-	}
-	extent += sizeof (tmp_header);
-	extent += LE32TOH (tmp_header.ImageLength);
-	extent += sizeof (* nvm_header);
-	if (lseek (plc->PIB.file, 0, SEEK_SET))
-	{
-		error (1, errno, FILE_CANTHOME, plc->PIB.name);
-	}
-
-#endif
-
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->PIB.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->PIB.file, request->IMAGE, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->PIB.name);
-		}
-		request->CLIENT_SESSION_ID = HTOLE32 (plc->cookie);
-		request->SERVER_SESSION_ID = HTOLE32 (0);
-		request->FLAGS = HTOLE32 (PLC_MODULE_ABSOLUTE);
-		request->ALLOWED_MEM_TYPES [0] = 0;
-		request->TOTAL_LENGTH = nvm_header->ImageLength;
-		request->CURR_PART_LENGTH = HTOLE32 (length);
-		request->CURR_PART_OFFSET = HTOLE32 (offset);
-		request->START_ADDR = nvm_header->EntryPoint;
-		request->CHECKSUM = nvm_header->ImageChecksum;
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WRITE_AND_EXECUTE_APPLET | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_LENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->CURR_PART_OFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteFirmware.c.html b/docbook/WriteFirmware.c.html deleted file mode 100644 index 6db7745c..00000000 --- a/docbook/WriteFirmware.c.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - WriteFirmware.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteFirmware (struct plc * plc, unsigned module, void const * nvm_header);
- *
- *   plc.h
- *
- *   call appropriate function based on the image file format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEFIRMWARE_SOURCE
-#define WRITEFIRMWARE_SOURCE
-
-#include "../plc/plc.h"
-
-signed WriteFirmware (struct plc * plc, unsigned module, void const * nvm_header)
-
-{
-	return ((LE32TOH (*(uint32_t *)(nvm_header)) == 0x60000000)? WriteFirmware1 (plc, module, nvm_header): WriteFirmware2 (plc, module, nvm_header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteFirmware1.c.html b/docbook/WriteFirmware1.c.html deleted file mode 100644 index 1d888d95..00000000 --- a/docbook/WriteFirmware1.c.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - WriteFirmware1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteFirmware1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header);
- *
- *   plc.h
- *
- *   read a firmware image from an image file and write it to SDRAM;
- *   this function assumes that the calling program has positioned the
- *   file to the start of the image;
- *
- *   the boot loader must be running for this to work since runtime
- *   firmware ignores VS_WR_MEM messages;
- *
- *   future devices will ignore VS_WR_MEM messages to use function
- *   WriteExecuteFirmware1, instead;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEFIRMWARE1_SOURCE
-#define WRITEFIRMWARE1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../plc/plc.h"
-
-signed WriteFirmware1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mem_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mem_request *) (message);
-	struct __packed vs_wr_mem_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-	}
-	* confirm = (struct vs_wr_mem_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_RECORD_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->IMAGEADDRESS);
-	uint32_t extent = LE32TOH (nvm_header->IMAGELENGTH);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->NVM.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MEM | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->NVM.file, request->BUFFER, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->NVM.name);
-		}
-		request->MLENGTH = HTOLE32 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MEM | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteFirmware2.c.html b/docbook/WriteFirmware2.c.html deleted file mode 100644 index c5ce309e..00000000 --- a/docbook/WriteFirmware2.c.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - WriteFirmware2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteFirmware2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header);
- *
- *   plc.h
- *
- *   use VS_WR_MEM message to write a firmware image into SDRAM and
- *   start execution when the image is stored in the new image file
- *   format;
- *
- *   the boot loader must be running for this to work since runtime
- *   firmware ignores VS_WR_MEM messages;
- *
- *   future devices will ignore VS_WR_MEM messages, so use function
- *   WriteExecuteFirmware2, instead;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEFIRMWARE2_SOURCE
-#define WRITEFIRMWARE2_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../plc/plc.h"
-
-signed WriteFirmware2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mem_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mem_request *) (message);
-	struct __packed vs_wr_mem_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-	}
-	* confirm = (struct vs_wr_mem_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_RECORD_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->ImageAddress);
-	uint32_t extent = LE32TOH (nvm_header->ImageLength);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->NVM.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MEM | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->NVM.file, request->BUFFER, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->NVM.name);
-		}
-		request->MLENGTH = HTOLE32 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MEM | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteMEM.c.html b/docbook/WriteMEM.c.html deleted file mode 100644 index 59940d24..00000000 --- a/docbook/WriteMEM.c.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - WriteMEM.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteMEM (struct plc * plc, struct _file_ * file, unsigned module, uint32_t offset, uint32_t length);
- *
- *   plc.h
- *
- *   Write the contents of a file directly into device SDRAM using
- *   VS_WR_MEM messages; the bootloader must be running for this to
- *   work; the function is used to dowload firmware or test applets;
- *
- *   this function makes no attempt to validate the information sent
- *   to the device;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEMEM_SOURCE
-#define WRITEMEM_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/files.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-signed WriteMEM (struct plc * plc, struct _file_ * file, unsigned module, uint32_t offset, uint32_t extent)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mem_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mem_request *) (message);
-	struct __packed vs_wr_mem_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-	}
-	* confirm = (struct vs_wr_mem_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_RECORD_SIZE;
-	Request (plc, "Write %s (%d) (%08X:%d)", file->name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MEM | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (file->file, request->BUFFER, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, file->name);
-		}
-		request->MLENGTH = HTOLE32 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MEM | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteMOD.c.html b/docbook/WriteMOD.c.html deleted file mode 100644 index 1061f961..00000000 --- a/docbook/WriteMOD.c.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - WriteMOD.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteMOD (struct channel * channel, uint8_t module, void const * memory, size_t extent);
- *
- *   plc.h
- *
- *   This plugin writes a memory resident NVM image to device SDRAM
- *   using as many VS_WR_MOD messages as needed to complete transfer;
- *   runtime firmware must be running for this to work; the NVM file
- *   in struct plc must be opened before calling this function;
- *
- *   This function is functionally similar to WriteNVM but downloads
- *   the image from memory instead of reading the image from a file;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEMOD_SOURCE
-#define WRITEMOD_SOURCE
-
-#include <unistd.h>
-#include <stdint.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-
-signed WriteMOD (struct plc * plc, uint8_t module, void const * memory, size_t extent)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t MCHKSUM;
-		uint8_t MBUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mod_request *) (message);
-	struct __packed vs_wr_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MODULEID;
-		uint8_t MACCESS;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-	}
-	* confirm = (struct vs_wr_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_RECORD_SIZE;
-	uint32_t offset = 0;
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MOD | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = (signed)(extent);
-		}
-		memcpy (request->MBUFFER, (byte *)(memory) + offset, length);
-		request->MODULEID = module;
-		request->MACCESS = 0;
-		request->MLENGTH = HTOLE16 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		request->MCHKSUM = checksum32 (request->MBUFFER, length, 0);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MOD | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteNVM.c.html b/docbook/WriteNVM.c.html deleted file mode 100644 index 322da41a..00000000 --- a/docbook/WriteNVM.c.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - WriteNVM.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteNVM (struct plc * plc);
- *
- *   plc.h
- *
- *   write an entire .nvm file into PLC SDRAM using as many VS_WR_MEM
- *   messages as needed to complete the transfer;
- *
- *   runtime firmware must be running for this to work; the NVM file
- *   in struct plc must be opened before calling this function;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITENVM_SOURCE
-#define WRITENVM_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../plc/plc.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-
-signed WriteNVM (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t MCHKSUM;
-		uint8_t MBUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mod_request *) (message);
-	struct __packed vs_wr_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-	}
-	* confirm = (struct vs_wr_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint16_t length = PLC_RECORD_SIZE;
-	uint32_t extent = lseek (plc->NVM.file, 0, SEEK_END);
-	uint32_t offset = lseek (plc->NVM.file, 0, SEEK_SET);
-	Request (plc, "Write %s to scratch", plc->NVM.name);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MOD | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->NVM.file, request->MBUFFER, length) != length)
-		{
-			error (1, errno, FILE_CANTREAD, plc->NVM.name);
-		}
-		request->MODULEID = VS_MODULE_MAC;
-		request->RESERVED = 0;
-		request->MLENGTH = HTOLE16 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		request->MCHKSUM = checksum32 (request->MBUFFER, length, 0);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MOD | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		extent -= length;
-		offset += length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WritePIB.c.html b/docbook/WritePIB.c.html deleted file mode 100644 index 9c5dbe0f..00000000 --- a/docbook/WritePIB.c.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - WritePIB.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WritePIB (struct plc * plc);
- *
- *   plc.h
- *
- *   write an entire .nvm file into PLC SDRAM using as many VS_WR_MEM
- *   messages as needed to complete the transfer;
- *
- *   runtime firmware must be running for this to work; the NVM file
- *   in struct plc must be opened before calling this function;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEPIB_SOURCE
-#define WRITEPIB_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <string.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../plc/plc.h"
-
-signed WritePIB (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t MCHKSUM;
-		uint8_t MBUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mod_request *) (message);
-	struct __packed vs_wr_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-	}
-	* confirm = (struct vs_wr_mod_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint16_t length = PLC_RECORD_SIZE;
-	uint32_t extent = lseek (plc->PIB.file, 0, SEEK_END);
-	uint32_t offset = lseek (plc->PIB.file, 0, SEEK_SET);
-	Request (plc, "Write %s to scratch", plc->PIB.name);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MOD | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->PIB.file, request->MBUFFER, length) != length)
-		{
-			error (1, errno, FILE_CANTREAD, plc->PIB.name);
-		}
-		request->MODULEID = VS_MODULE_PIB;
-		request->RESERVED = 0;
-		request->MLENGTH = HTOLE16 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		request->MCHKSUM = checksum32 (request->MBUFFER, length, 0);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MOD | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE16TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			length = PLC_RECORD_SIZE;
-			offset = 0;
-			continue;
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			length = PLC_RECORD_SIZE;
-			offset = 0;
-			continue;
-		}
-		extent -= length;
-		offset += length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteParameters.c.html b/docbook/WriteParameters.c.html deleted file mode 100644 index 57280621..00000000 --- a/docbook/WriteParameters.c.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - WriteParameters.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteParameters (struct plc * plc, unsigned module, void const * nvm_header);
- *
- *   plc.h
- *
- *   call appropriate function based on the image file format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEFIRMWARE_SOURCE
-#define WRITEFIRMWARE_SOURCE
-
-#include "../plc/plc.h"
-
-signed WriteParameters (struct plc * plc, unsigned module, void const * nvm_header)
-
-{
-	return ((LE32TOH (*(uint32_t *)(nvm_header)) == 0x60000000)? WriteParameters1 (plc, module, nvm_header): WriteParameters2 (plc, module, nvm_header));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteParameters1.c.html b/docbook/WriteParameters1.c.html deleted file mode 100644 index 709743ee..00000000 --- a/docbook/WriteParameters1.c.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - WriteParameters1.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteParameters1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header);
- *
- *   plc.h
- *
- *   read a powerline parameter block image from plc->PIB and write
- *   the image to SDRAM; this function assumes that plc->PIB is an
- *   image chain and is positioned to the start of the PIB image in
- *   that chain;
- *
- *   in reality, this function should never be called because there
- *   are no cases that require it but it has been implemented for
- *   completeness;
- *
- *   the boot loader must be running for this to work since runtime
- *   firmware ignores VS_WR_MEM messages;
- *
- *   future devices will ignore VS_WR_MEM messages so use function
- *   WriteExecuteParameters1, instead;
- *
- *   this function makes no attempt to validate the information sent
- *   to the device;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEPARAMETERS1_SOURCE
-#define WRITEPARAMETERS1_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../plc/plc.h"
-
-signed WriteParameters1 (struct plc * plc, unsigned module, const struct nvm_header1 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mem_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mem_request *) (message);
-	struct __packed vs_wr_mem_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-	}
-	* confirm = (struct vs_wr_mem_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_RECORD_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->IMAGEADDRESS);
-	uint32_t extent = LE32TOH (nvm_header->IMAGELENGTH);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->PIB.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MEM | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->PIB.file, request->BUFFER, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->PIB.name);
-		}
-		request->MLENGTH = HTOLE32 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MEM | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/WriteParameters2.c.html b/docbook/WriteParameters2.c.html deleted file mode 100644 index 67521faa..00000000 --- a/docbook/WriteParameters2.c.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - WriteParameters2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed WriteParameters2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header);
- *
- *   plc.h
- *
- *   use VS_WR_MEM message to write a parameter block into SDRAM
- *   when the image is stored in the old image file format;
- *
- *   the boot loader must be running for this to work since runtime
- *   firmware ignores VS_WR_MEM messages;
- *
- *   future devices will ignore VS_WR_MEM messages so use function
- *   WriteExecuteParameters2, instead;
- *
- *   this function makes no attempt to validate the information sent
- *   to the device;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef WRITEPARAMETERS2_SOURCE
-#define WRITEPARAMETERS2_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../plc/plc.h"
-
-signed WriteParameters2 (struct plc * plc, unsigned module, const struct nvm_header2 * nvm_header)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wr_mem_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-		uint8_t BUFFER [PLC_RECORD_SIZE];
-	}
-	* request = (struct vs_wr_mem_request *) (message);
-	struct __packed vs_wr_mem_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint32_t MOFFSET;
-		uint32_t MLENGTH;
-	}
-	* confirm = (struct vs_wr_mem_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	uint32_t length = PLC_RECORD_SIZE;
-	uint32_t offset = LE32TOH (nvm_header->ImageAddress);
-	uint32_t extent = LE32TOH (nvm_header->ImageLength);
-	Request (plc, "Write %s (%d) (%08X:%d)", plc->PIB.name, module, offset, extent);
-	while (extent)
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_WR_MEM | MMTYPE_REQ));
-		if (length > extent)
-		{
-			length = extent;
-		}
-		if (read (plc->PIB.file, request->BUFFER, length) != (signed)(length))
-		{
-			error (1, errno, FILE_CANTREAD, plc->PIB.name);
-		}
-		request->MLENGTH = HTOLE32 (length);
-		request->MOFFSET = HTOLE32 (offset);
-		plc->packetsize = sizeof (* request);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_WR_MEM | MMTYPE_CNF)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		if (LE32TOH (confirm->MLENGTH) != length)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_LENGTH);
-			length = PLC_RECORD_SIZE;
-			offset = 0;
-			continue;
-		}
-		if (LE32TOH (confirm->MOFFSET) != offset)
-		{
-			error (PLC_EXIT (plc), 0, PLC_ERR_OFFSET);
-			length = PLC_RECORD_SIZE;
-			offset = 0;
-			continue;
-		}
-		offset += length;
-		extent -= length;
-	}
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/__bswap.c.html b/docbook/__bswap.c.html deleted file mode 100644 index fa942051..00000000 --- a/docbook/__bswap.c.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - __bswap.c - - - - - - - - - -
-/*====================================================================*
- *
- *   __bswap.c - byte swap functions;
- *
- *   endian.h
- *
- *   alternative byte-swap functions for systems without them (such
- *   as Microsoft Windows);
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef __BSWAP_SOURCE
-#define __BSWAP_SOURCE
-
-#include <stdint.h>
-
-#include "../tools/endian.h"
-#include "../tools/memory.h"
-
-uint16_t __bswap_16 (uint16_t x)
-
-{
-	reverse (&x, sizeof (x));
-	return (x);
-}
-
-uint32_t __bswap_32 (uint32_t x)
-
-{
-	reverse (&x, sizeof (x));
-	return (x);
-}
-
-uint64_t __bswap_64 (uint64_t x)
-
-{
-	reverse (&x, sizeof (x));
-	return (x);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/_main.c.html b/docbook/_main.c.html deleted file mode 100644 index eb122c25..00000000 --- a/docbook/_main.c.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - _main.c - - - - - - - - - -
-/*====================================================================*
- *
- *   main.c - template program;
- *
- *.
- *:
- *;
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/version.h"
-#include "../tools/error.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/error.c"
-#endif
-
-/*====================================================================*
- *
- *   void function (void);
- *
- *
- *--------------------------------------------------------------------*/
-
-void function (void)
-
-{
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"",
-		"",
-		"Template Program",
-		(char const *) (0)
-	};
-	signed c;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (!argc)
-	{
-		function ();
-	}
-	while ((argc) && (* argv))
-	{
-		function ();
-		argc--;
-		argv++;
-	}
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/ampID.1.html b/docbook/ampID.1.html deleted file mode 100644 index c419dcdf..00000000 --- a/docbook/ampID.1.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - ampID.1 - - - - - - - - - -
-ampID(1)                                     Qualcomm Atheros Open Powerline Toolkit                                    ampID(1)
-
-NAME
-       ampID - Echo Device Key
-
-SYNOPSIS
-       ampID [options] [device] [device] [ ... ]
-
-DESCRIPTION
-       This  program  prints  a single powerline device key or HFID on stdout.  It can be used to dynamically define environment
-       variables or insert command line arguments in scripts at runtime.  It is intended to echo a specific key read from a sin‐
-       gle  device  but  it  can be used to echo a specific key type read from several devices by specifying either the Qualcomm
-       Atheros Local Management Address or a broadcast address.
-
-       This program is, in some sense, the inverse of modpib but it reads the key and HFID directly from  the  powerline  device
-       instead of reading from a PIB file.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -A     Prints the Ethernet address (MAC) for each specified device.  This option and options -D, -M, -N, -S  and  -U  are
-              mutually exclusive.
-
-       -D     Prints  the  Device Access Key (DAK) for each specified device.  This option and options -A, -M, -N, -S and -U are
-              mutually exclusive.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -n     Append a newline to the end of each key.  Newlines are omitted by default so that program output can  be  used  as
-              the raw input to another program.  If you want the newline then you must request it with this option.
-
-       -M     Prints  the Network Membership Key (NMK) for each specified device.  This option and options -A, -D, -N, -S and -U
-              are mutually exclusive.
-
-       -N     Prints the network HFID string for each specified device.  This option and options -A, -D, -M, -S and -U are mutu‐
-              ally exclusive.
-
-       -q     Suppresses status messages on stderr.
-
-       -S     Prints  the manufacturer HFID string for each specified device.  This option and options -A, -D, -M, -N and -U are
-              mutually exclusive.
-
-       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
-              be saved as text files for reference.
-
-       -x     Cause  the  program  to  exit  on  the  first error instead of continuing with remaining iterations, operations or
-              devices.  Normally, the program reports errors and moves on to the next operation, iteration or  device  depending
-              on the command line.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
-              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
-              information about symbolic device addresses.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
-              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-EXAMPLES
-       The following example prints the DAK of the local device on stdout.  The local device  is  interrogated  because  no  MAC
-       address was specified.  The default interface, eth1 on Linux and 2 on Windows, is used unless environment variable PLC is
-       defined.  The DAK is always printed by default.  Depending on your system, you may want to use option -n when using  this
-       program interactively.
-
-          # ampID
-          00:11:22:33:44:55:66:77:88:99:AA:DD:CC:DD:EE:FF
-
-       The  following example prints the NMK of device 00:B0:52:DA:DA:57 connected to interface eth2 on a Linux system.  Several
-       devices could be specified but that is not a common request.
-
-          # DAK -Mi eth2 00:B0:52:DA:DA:57
-          F4:23:71:4A:51:39:C2:2D:E5:EA:87:43:99:A1:37:81
-
-       The following example dynamically inserts the DAK and NMK of the previous device on the command line of another  program.
-       In  this  example, we want to insert the DAK and NMK into PIB file abc.pib using program modpib.  See the modpib man page
-       for an explanation of command line syntax.  See the GNU bash manuals for an explanation of why this works.
-
-          # modpib abc.pib -D $(ampID -Di eth2 00:B0:52:DA:DA:57) -N $(ampID -Mi eth2 00:B0:52:DA:DA:57)
-
-       The following example is an alternate way of accomplishing the same thing using shell script variables.  This method  may
-       be easier to read and maintain.  Notice that we 'squished' all the options together for brevity.
-
-          # PLC=00:B0:52:DA:DA:57
-          # DAK=$(ampID -Dieth2 ${PLC})
-          # NMK=$(ampID -Mieth2 ${PLC})
-          # modpib abc.pib -D ${DAK} -N ${NMK}
-
-SEE ALSO
-       plc(1), amptool(1), ampboot(1), ampinit(1), modpib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                    ampID(1)
-
- - - diff --git a/docbook/ampID.c.html b/docbook/ampID.c.html deleted file mode 100644 index 5342f094..00000000 --- a/docbook/ampID.c.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - ampID.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   ampID.c - Atheros Powerline Device Identity
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexout.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../plc/Display.c"
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define INT6KID_DAK 0
-#define INT6KID_NMK 1
-#define INT6KID_MAC 2
-#define INT6KID_MFG 3
-#define INT6KID_USR 4
-#define INT6KID_NET 5
-
-/*====================================================================*
- *
- *   void ReadKey1 (struct channel * channel, unsigned c, int key);
- *
- *   read the first block of the PIB from a device then echo one of
- *   several parameters on stdout as a string; program output can be
- *   used in scripts to define variables or compare strings;
- *
- *   this function is an abridged version of ReadParameters(); it reads only
- *   the first 1024 bytes of the PIB then stops; most parameters of
- *   general interest occur in that block;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void ReadKey1 (struct channel * channel, unsigned c, int key)
-
-{
-	struct message message;
-	static signed count = 0;
-	signed packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t DAK [16];
-	}
-	* request = (struct vs_rd_mod_request *)(&message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RESERVED1 [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED2;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t MCHKSUM;
-		struct simple_pib pib;
-	}
-	* confirm = (struct vs_rd_mod_confirm *)(&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-	request->MODULEID = VS_MODULE_PIB;
-	request->MLENGTH = HTOLE16 (PLC_RECORD_SIZE);
-	request->MOFFSET = HTOLE32 (0);
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) < 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-	{
-		if (UnwantedMessage (&message, packetsize, 0, (VS_RD_MOD | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (confirm->MSTATUS)
-		{
-			error (0, 0, "%s (%0X): ", MMECode (confirm->qualcomm.MMTYPE, confirm->MSTATUS), confirm->MSTATUS);
-			continue;
-		}
-		if (count++ > 0)
-		{
-			putc (c, stdout);
-		}
-		if (key == INT6KID_MAC)
-		{
-			hexout (confirm->pib.MAC, sizeof (confirm->pib.MAC), HEX_EXTENDER, 0, stdout);
-			continue;
-		}
-		if (key == INT6KID_DAK)
-		{
-			hexout (confirm->pib.DAK, sizeof (confirm->pib.DAK), HEX_EXTENDER, 0, stdout);
-			continue;
-		}
-		if (key == INT6KID_NMK)
-		{
-			hexout (confirm->pib.NMK, sizeof (confirm->pib.NMK), HEX_EXTENDER, 0, stdout);
-			continue;
-		}
-		if (key == INT6KID_MFG)
-		{
-			confirm->pib.MFG [PIB_HFID_LEN - 1] = (char)(0);
-			printf ("%s", confirm->pib.MFG);
-			continue;
-		}
-		if (key == INT6KID_USR)
-		{
-			confirm->pib.USR [PIB_HFID_LEN - 1] = (char)(0);
-			printf ("%s", confirm->pib.USR);
-			continue;
-		}
-		if (key == INT6KID_NET)
-		{
-			confirm->pib.NET [PIB_HFID_LEN - 1] = (char)(0);
-			printf ("%s", confirm->pib.NET);
-			continue;
-		}
-	}
-	if (packetsize < 0)
-	{
-		error (1, errno, CHANNEL_CANTREAD);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"Ac:Dei:MnNqSUv",
-		"device",
-		"Qualcomm Atheros Powerline Device Identity",
-		"A\tEthernet address (MAC)",
-		"c c\tcharacter delimiter is (c)",
-		"D\tDevice Access Key (DAK)",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"M\tNetwork Membership Key (NMK)",
-		"n\tappend newline on output",
-		"N\tnetwork HFID",
-		"q\tquiet mode",
-		"S\tmanufacturer HFID",
-		"U\tuser HFID",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-	signed newline = '\n';
-	signed key = INT6KID_DAK;
-	flag_t flags = (flag_t)(0);
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'A':
-			key = INT6KID_MAC;
-			break;
-		case 'c':
-			newline = * optarg;
-			break;
-		case 'D':
-			key = INT6KID_DAK;
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'M':
-			key = INT6KID_NMK;
-			break;
-		case 'n':
-			_setbits (flags, PLC_NEWLINE);
-			break;
-		case 'N':
-			key = INT6KID_NET;
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (flags, PLC_SILENCE);
-			break;
-		case 'S':
-			key = INT6KID_MFG;
-			break;
-		case 'U':
-			key = INT6KID_USR;
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!argc)
-	{
-		ReadKey1 (&channel, newline, key);
-		if (_anyset (flags, PLC_NEWLINE))
-		{
-			putc (newline, stdout);
-		}
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		ReadKey1 (&channel, newline, key);
-		if (_anyset (flags, PLC_NEWLINE))
-		{
-			putc (newline, stdout);
-		}
-		argv++;
-		argc--;
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/ampboot.1.html b/docbook/ampboot.1.html deleted file mode 100644 index b2d95c90..00000000 --- a/docbook/ampboot.1.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - ampboot.1 - - - - - - - - - -
-ampboot(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  ampboot(1)
-
-NAME
-       ampboot - Qualcomm Atheros AR7x00 Powerline Device Bootstrapper
-
-SYNOPSIS
-       ampboot [options] -N file -P file [device] [device] [...]
-
-DESCRIPTION
-       Download and start runtime firmware on a local powerline device when it is in bootloader mode.  A device remains in boot‐
-       loader mode when it cannot load firmware from flash memory for some reason.  This can happen if the device has  no  flash
-       memory  or  the flash memory is either blank or corrupted.  You can use this progrm to start a device or start the device
-       and then, once runtime firmware starts, program flash memory.
-
-       The bootloader only recognizes a subset of Atheros message types.   This  program  uses  that  subset  to  write  runtime
-       firmware  and  parameters  into  SDRAM  then  start  firmware execution.  Optionally, it can proceed to download the same
-       firmware and parameters again and commit them to flash memory.
-
-       Starting a device is a three phase operation.  The first phase writes an SDRAM configuration program into  TCM  and  exe‐
-       cutes it.  The second phase writes runtime firmware and parameters as images into SDRAM.  The third phase starts firmware
-       execution.  Once the runtime firmware starts, the device is operational.
-
-       Flashing a device is a two phase operation.  The first phase downloads runtime firmare and parameters under firmware con‐
-       trol  into  scratch  buffers.   The  second phase instructs the firmware to write the scratch buffers to flash memory and
-       reboot the device.  After flashing the device is self-sustaining.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -F[F]  Write previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.  Adding a second F here or another -F  anywhere
-              on  the  command  line  will force-flash a blank or corrupted NVRAM.  Firmware loaded from NVRAM will treat force-
-              flash as an error.  This option can be used to create factory settings but cannot be used to change them once cre‐
-              ated.  Subsequent use creates and updates operational settings that can be erased using a factory reset.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -N filename
-              Read the named NVM file and write it to the device.  This option and argument are required.  Any  file  having  an
-              invalid  NVM  file format will be rejected.  No assumptions are made based on filename and no filename conventions
-              are enforced.
-
-       -P filename
-              Read the named PIB file and write it to the device.  This option and argument are required.  Any  file  having  an
-              invalid  PIB  file format will be rejected.  No assumptions are made based on filename and no filename conventions
-              are enforced.
-
-       -q     Suppresses status messages on stderr.
-
-       -t milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is shown in brackets on the program menu.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  Ethernet  hardware  address  of some powerline device.  More than one address may be specified on the command
-              line.  If more than one address is specified then operations are performed on each device in  turn.   The  default
-              address is local.  as explained in the DEVICES section.
-
-DEVICES
-       Powerline  device  addresses are 12 hexadecimal digits in upper, lower or mixed case.  Individual octets may be separated
-       by  colons,  for  clarity,  but  colons  are  not  required.   For  example,  "00b052000001",   "00:b0:52:00:00:01"   and
-       "00b052:000001" are valid and equivalent.
-
-       A  local  device is any Atheros Powerline Device connected directly to a host Ethernet interface.  A remote device is any
-       Atheros Powerline Device at the far end of a powerline connection.  A foreign device is any powerline device not manufac‐
-       tured by Atheros.
-
-       Common  device  addresses  have symbolic names that can be used in place of the actual address value.  The following sym‐
-       bolic addresses are recognized by this program and most other toolkit programs.
-
-       all    Equivalent to "broadcast", described next.
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              will respond to this address.
-
-       local  A  synonym  for the Qualcomm Atheros Local Management Address (LMA), 00:B0:52:00:00:01.  All local Atheros devices
-              will respond to this address but remote and foreign devices will not.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical  information.   See  the  Qualcomm
-       Atheros Powerline Toolkit Online Documetation for practical information and examples.
-
-EXAMPLES
-       The  -N and -P options are always required.  Their order is not important.  Tne MAC address is not needed because devices
-       default to address 00:B0:52:00:00:01 (the program default address) in bootloader mode.  Once  this  operation  completes,
-       firmware is running in SDRAM but the NVRAM, if present, has not been programmed.  This operation is common for flash-less
-       devices.  If we reset the device at this point then the device will return to bootloader mode.
-
-          ampboot -N test.nvm -P test.pib
-          # eth0 00:B0:52:00:00:01 Write SDRAM Configuration
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Start Firmware
-          # eth0 00:B0:52:00:00:01 Started.
-
-       The next example does the same thing but performs the extra steps needed  to  program  NVRAM.   It  first  downloads  the
-       firmware  image  from file test.nvm and the parameter block image from file test.pib using VS_WR_MEM then starts firmware
-       execution using VS_ST_MAC.  Once runtime firmware has started, it downloads the same firmware image and  parameter  block
-       image (again) using VS_WR_MOD and commits them to NVRAM using VS_MOD_NVM.
-
-          ampboot -N test.nvm -P test.pib -F
-          # eth0 00:B0:52:00:00:01 Write SDRAM Configuration
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Start Firmware
-          # eth0 00:B0:52:00:00:01 Started.
-          # eth0 00:B0:52:00:00:01 Write MAC as module
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write PIB as module
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Flash Device
-          # eth0 00:B0:52:00:00:01 Flashed.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information may not be available.  Qualcomm Atheros  reserves  the  right  to  modify  message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-SEE ALSO
-       plc(1), amptool(1), chknvm(1), chkpib(1), modpib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  ampboot(1)
-
- - - diff --git a/docbook/ampboot.c.html b/docbook/ampboot.c.html deleted file mode 100644 index dc532740..00000000 --- a/docbook/ampboot.c.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - ampboot.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <sys/stat.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../plc/plc.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/WriteMEM.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForRestart.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/InitDevice1.c"
-#include "../plc/BootDevice1.c"
-#include "../plc/BootFirmware1.c"
-#include "../plc/BootParameters1.c"
-#include "../plc/WriteExecuteFirmware1.c"
-#include "../plc/WriteExecutePIB.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/FlashDevice1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/error.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ram/sdramfile.c"
-#include "../ram/sdrampeek.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibpeek1.c"
-#include "../pib/pibfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:FN:p:P:qt:vx",
-		"-N file -P file [device] [device] [...]",
-		"Qualcomm Atheros AR7x00 Powerline Device Bootstrapper",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"F[F]\tflash [force] non-volatile memory after boot",
-		"N f\tfirmware file is (f)",
-		"P f\tparameter file is (f)",
-		"q\tquiet mode",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	char firmware [PLC_VERSION_STRING];
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'F':
-			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.PIB.name);
-			}
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ENOTSUP, ERROR_TOOMANY);
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (WaitForStart (&plc, firmware, sizeof (firmware)))
-	{
-		Failure (&plc, PLC_NODETECT);
-		exit (1);
-	}
-	if (strcmp (firmware, "BootLoader"))
-	{
-		Failure (&plc, "Bootloader must be running");
-		exit (1);
-	}
-	if (plc.hardwareID < CHIPSET_AR7400)
-	{
-		Failure (&plc, "Device must be %s or later; Use program int6kboot instead.", chipsetname (CHIPSET_AR7400));
-		exit (1);
-	}
-	if (plc.hardwareID >= CHIPSET_QCA7420)
-	{
-		Failure (&plc, "Program does not support %s or later; Use program plcboot instead.", chipsetname (CHIPSET_QCA7420));
-		exit (1);
-	}
-	if (plc.PIB.file == -1)
-	{
-		error (1, ECANCELED, "No PIB file specified");
-	}
-	if (plc.NVM.file == -1)
-	{
-		error (1, ECANCELED, "No NVM file specified");
-	}
-	if (!InitDevice1 (&plc))
-	{
-		if (!BootDevice1 (&plc))
-		{
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				FlashDevice1 (&plc);
-			}
-		}
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/amphost.1.html b/docbook/amphost.1.html deleted file mode 100644 index ac396d66..00000000 --- a/docbook/amphost.1.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - amphost.1 - - - - - - - - - -
-amphost(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  amphost(1)
-
-NAME
-       amphost - Qualcomm Atheros Powerline Device Host Emulator
-
-SYNOPSIS
-       amphost [options] -N file -P file -n file -p file
-
-DESCRIPTION
-       Wait  for VS_HST_ACTION.IND messages from a local device and service them as described in the QCA Firmware Technical Ref‐
-       erence Manual.  This program can be used to demonstrate or verify proper powerline device/host interaction for flash-less
-       devices.   This implementation is not production grade and will stop dead - like a bug! - when things go wrong.  Consider
-       using the Qualcomm Atheros Embedded API for real-time, production-grade applications.
-
-       Host emulation applies to flash-less device designs where a local host processor provides the  persistent  storage.   The
-       local  host  can provide a wide range of intelligent storage functions for a device but this program offers one.  Options
-       -N and -P name existing files that store the factory default runtime firmware and parameters, respectively.   Options  -n
-       and  -p  name scratch files that will store user firmware and parameters, respectively.  This is similiar to the standard
-       Atheros NVRAM scheme but is not the same.
-
-       To use the program, connect a flash-less device to the host via ethernet then start this program with the  correct  file‐
-       names.   The  program  will  automatically  respond  to device requests to download memory configuration, firmware and/or
-       parameters and upload firmware or and/or parameters under device control.  See the Qualcomm  Atheros  Firmware  Technical
-       Reference Manual for more information.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -F[F]  Flash NVRAM once downloaded firmware has started.   The  same  firmware  and  PIB  are  downloaded,  again,  using
-              VS_WR_MOD  and  written  to  NVRAM using VS_MOD_NVM.  Adding a second F here or another -F anywhere on the command
-              line will perform a forced flash.  When no NVRAM is present, normal and force flash cause the device to upload  to
-              the  host.  When blank or corrupted NVRAM is present, forced flash writes to NVRAM.  This operation will fail when
-              no NVRAM is present.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -N filename
-              Use  this  file to download firmware when requested by the local device.  The file must exist and have a valid NVM
-              file format or it will be rejected.  No assumptions are made based on filename and  no  filename  conventions  are
-              enforced.  The program will not over-write this file.  This option and argument are required.
-
-       -n filename
-              Use  this  file to store firmware uploaded from the local device.  The file need not exist but an error will occur
-              if it cannot be created or written.  If firmware is uploaded to this file, it  is  used  for  subsequent  firmware
-              downloads  unless  the  device  requests  a factory reset.  In that case, the file specified by option -N is used.
-              This option and argument are optional.  If omitted then the default filename user.pib will be used.
-
-       -P filename
-              Use this file to download parameters when requested by the local device.  The file must exist and have a valid PIB
-              file  format  or  it  will be rejected.  No assumptions are made based on filename and no filename conventions are
-              enforced.  The program will not over-write this file.  This option and argument are required.
-
-       -p filename
-              Use this file to store parameters uploaded from the local device.  The file need not exist but an error will occur
-              if  it cannot be created or written.  Once parameters are uploaded to this file, it is used for subsequent parame‐
-              ter downloads unless the device requests a factory reset.  In that case, the file specified by option -P is  used.
-              This option and argument are optional.  If omitted then the default filename user.nvm will be used.
-
-       -q     Suppress status messages on stderr.
-
-       -t milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is shown in brackets on the program menu.
-
-       -v     Print additional information on stdout.  In particular, this option will  print  incoming  and  outgoing  Ethernet
-              frames on stdout.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       None.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The  following  command  starts the host emulator.  The -N and -P options are always required.  Their order is not impor‐
-       tant.
-
-          # amphost -N test.nvm -P test.pib -n temp.nvm -p temp.pib
-          eth1 00:B0:52:00:00:01 Waiting for Host Action Requests
-
-          eth1 00:B0:52:00:00:01 Host Action Request is (4) configure memory.
-          eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
-          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
-          eth1 00:B0:52:00:00:01 Started BootLoader
-
-          eth1 00:B0:52:00:00:01 Host Action Request is (0) initialize device.
-          eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
-          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
-          eth1 00:B0:52:00:00:01 Started BootLoader
-          eth1 00:B0:52:00:00:01 Write Memory (00204000:1013952)
-          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
-          eth1 00:B0:52:00:00:01 Write Memory (01F00000:11400)
-          eth1 00:B0:52:00:00:01 Wrote AR7400-WallAdapter-HomePlugAV_NorthAmerica.pib
-          eth1 00:B0:52:00:00:03 Started INT7400-MAC-0-0-1008-00-63-20100227-AUTO-D
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-SEE ALSO
-       plc(1), ampboot(1), amptool(1),
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  amphost(1)
-
- - - diff --git a/docbook/amphost.c.html b/docbook/amphost.c.html deleted file mode 100644 index c21c9047..00000000 --- a/docbook/amphost.c.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - - - amphost.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   amphost.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../plc/plc.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Failure.c"
-#include "../plc/FactoryDefaults.c"
-#include "../plc/FlashDevice1.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/HostActionResponse.c"
-#include "../plc/Request.c"
-#include "../plc/ResetDevice.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WaitForRestart.c"
-#include "../plc/WriteExecuteFirmware1.c"
-#include "../plc/WriteExecutePIB.c"
-#include "../plc/WriteMEM.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/ReadFirmware1.c"
-#include "../plc/ReadParameters1.c"
-#include "../plc/InitDevice1.c"
-#include "../plc/BootDevice1.c"
-#include "../plc/BootFirmware1.c"
-#include "../plc/BootParameters1.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/ModuleRead.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/error.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ram/sdramfile.c"
-#include "../ram/sdrampeek.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibpeek1.c"
-#include "../pib/pibfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define NEWPIB "user.pib"
-#define NEWNVM "user.nvm"
-
-/*====================================================================*
- *
- *   signed function (struct plc * plc);
- *
- *   plc.h
- *
- *   wait indefinitely for VS_HOST_ACTION messages; service the device
- *   only; it will stop dead - like a bug! - on error;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-signed function (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	static char const * actions [] =
-	{
-		"start device",
-		"store firmware",
-		"store parameters",
-		"update host",
-		"config memory",
-		"restore defaults",
-		"unknown"
-	};
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_host_action_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MACTION;
-		uint8_t MAJOR_VERSION;
-		uint8_t MINOR_VERSION;
-	}
-	* indicate = (struct vs_host_action_ind *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	char const * FactoryNVM = plc->NVM.name;
-	char const * FactoryPIB = plc->PIB.name;
-	signed status;
-	signed action;
-	Request (plc, "Waiting for Host Action");
-	while (1)
-	{
-		status = ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND));
-		if (status < 0)
-		{
-			break;
-		}
-		if (status > 0)
-		{
-			printf ("\n");
-			if (indicate->MACTION < SIZEOF (actions))
-			{
-				Confirm (plc, "Host Action Request is (%d) %s.", indicate->MACTION, actions [indicate->MACTION]);
-			}
-			else
-			{
-				error (0, ENOTSUP, "Host Action 0x%0X", indicate->MACTION);
-				continue;
-			}
-			action = indicate->MACTION;
-			memcpy (channel->peer, indicate->ethernet.OSA, sizeof (channel->peer));
-			if (HostActionResponse (plc))
-			{
-				return (-1);
-			}
-			if (action == 0x00)
-			{
-				if (BootDevice1 (plc))
-				{
-					return (-1);
-				}
-				if (_anyset (plc->flags, PLC_FLASH_DEVICE))
-				{
-					FlashDevice1 (plc);
-				}
-				continue;
-			}
-			if (action == 0x01)
-			{
-				close (plc->NVM.file);
-				if (ReadFirmware1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x02)
-			{
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x03)
-			{
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				close (plc->NVM.file);
-				if (ReadFirmware1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x04)
-			{
-				if (InitDevice1 (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x05)
-			{
-				close (plc->PIB.file);
-				if ((plc->PIB.file = open (plc->PIB.name = FactoryPIB, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				close (plc->NVM.file);
-				if ((plc->NVM.file = open (plc->NVM.name = FactoryNVM, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->NVM.name);
-				}
-				if (ResetDevice (plc))
-				{
-					return (-1);
-				}
-				continue;
-			}
-			if (action == 0x06)
-			{
-				close (plc->PIB.file);
-				if (ReadParameters1 (plc))
-				{
-					return (-1);
-				}
-				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
-				{
-					error (1, errno, "%s", plc->PIB.name);
-				}
-				continue;
-			}
-			error (0, ENOSYS, "Host Action 0x%02X", action);
-		}
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary when asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"Fi:n:N:p:P:qt:vx",
-		"-N file -P file [-n file] [-p file]",
-		"Qualcomm Atheros INT6400 Host Emulator",
-		"F[F]\tflash (force) NVRAM using VS_MOD_NVM",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"n f\tread NVM from device into file using VS_RD_MOD",
-		"N f\twrite NVM file to device using VS_WR_MEM",
-		"p f\tread PIB from device into file using VS_RD_MOD",
-		"P f\twrite PIB file to device using VS_WR_MEM",
-		"q\tquiet mode",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'F':
-			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'n':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.nvm.name);
-			}
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.PIB.name);
-			}
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'p':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.pib.name);
-			}
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ENOTSUP, ERROR_TOOMANY);
-	}
-	if (plc.NVM.file == -1)
-	{
-		error (1, ECANCELED, "No host NVM file named");
-	}
-	if (plc.PIB.file == -1)
-	{
-		error (1, ECANCELED, "No host PIB file named");
-	}
-	if (plc.nvm.file == -1)
-	{
-		if ((plc.nvm.file = open (plc.nvm.name = NEWNVM, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-		{
-			error (1, errno, "%s", plc.nvm.name);
-		}
-	}
-	if (plc.pib.file == -1)
-	{
-		if ((plc.pib.file = open (plc.pib.name = NEWPIB, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-		{
-			error (1, errno, "%s", plc.pib.name);
-		}
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	function (&plc);
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/amplist.1.html b/docbook/amplist.1.html deleted file mode 100644 index 423178e9..00000000 --- a/docbook/amplist.1.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - amplist.1 - - - - - - - - - -
-amplist(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  amplist(1)
-
-NAME
-       amplist - List Atheros Device Addresses
-
-SYNOPSIS
-       amplist [options] [device] [device] [...]
-
-DESCRIPTION
-       print  the  local  device  address or all network device addresses for a specific device.  This program is ideal for that
-       special script jokey in your life.  It only prints device addresses.  Nothing else.
-
-       Devices are detected using one of two methods.  The two methods can be used in combination to determine network topology.
-
-       The first method sends one VS_SW_VER message to the Qualcomm Atheros Local Management Address  and  prints  the  Ethernet
-       source  address  found  in each received confirmation message.  The method is used when no device addresses appear on the
-       command line.  The result is a list of all local devices, being this connected directly to the local  host.   Each  local
-       device device may bridge to an independent powerline network having remote devices as members.
-
-       The  second  method sends one VS_NW_INFO message to each specified device and prints the Ethernet source address found in
-       each received message plus the Ethernet addresses of each network station identified in that message body.   This  method
-       is  used  whenever  one,  or more, device addresses appear on the command line.  It is possible to query remote powerline
-       devices directly and so duplicate devices addresses are printed when devices share powerline neighbors.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-COMMENTS
-       This  program  is identical to legacy program int6klist but uses version 1 of the Qualcomm Atheros VS_NW_INFO vendor-spe‐
-       cific message.  Older firmware versions may not recognize this message version.
-
-OPTIONS
-       -b     Print bridge device addresses.  Each specified device reports it's own address. This option has no  effect  if  no
-              devices are specified.
-
-       -i     Select  the  host Ethernet interface. All requests are sent via this host interface and only reponses received via
-              this host interface are recognized. The default interface is eth1 because most people use eth0 as their  principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface. This option then takes precedence over either default.
-
-       -n     Append a newline to output.
-
-       -q     Enter quiet mode. This option has no effect at this time.
-
-       -r     Print remote device addresses. Each specified device reports neighbor device addresses. This option has no  effect
-              when no devices are specified.
-
-       -s     Insert a newline, instead of a space, between each device address.
-
-       -v     Enter verbose mode. All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -?, --help
-              Print program help summary on stdout. This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print  program version information on stdout. This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  MAC address of some powerline device. More than one address may be specified. If omitted the the program out‐
-              put consists of local device addresses only. Otherwise, output conisists of the specified device followed  by  all
-              devices  associated  with  it.  The  default  address  is local. See DEVICES for information about symbolic device
-              addresses.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses. A MAC address is a 48-bit value entered as 12  hexa‐
-       decimal  digits  in  upper,  lower or mixed character case. Octets may be separated with colons for clarity. For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF. All devices, whether  local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA),  00:B0:52:00:00:01.  All  local
-              Atheros devices recognize this address but remote and foreign devices do not. A remote device is any device at the
-              far end of a powerline connection. A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala  FL  USA. Consequently, public information may not be available. Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-EXAMPLES
-       The  following command lists all local devices. Since no devices are specified on the command line, one VS_SW_VER message
-       is addressed to 00:B0:52:00:00:01 and the responses are collected. As we can see, there is only one local  device  avail‐
-       able at this time. Observe that the prompt appears immediately after the address because newlines are omitted by default.
-
-          # amplist
-          00:B0:52:BE:EF:04 #
-
-       The  next  example  does  the  same  thing  but there are now three local devices available. Observe that all devices are
-       printed without intervening newlines so that the output of this program can be used as input to other toolkit programs.
-
-          # amplist
-          00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01 # int6k
-
-       The next example queries the first local device from  the  previous  example,  00:B0:52:BE:EF:04,  for  a  list  neighbor
-       devices.  This  time a VS_NW_INFO message is sent because we named a device on the command line. The named device happens
-       to be a local device but it need not be. We can see that the device has no neighbors.
-
-          # amplist 00:B0:52:BE:EF:04
-          00:B0:52:BE:EF:04 # int6k
-
-       The next example we query the next local device, 00:B0:52:BA:BE:02, and find that it has two neighbor  devices  that  did
-       not show up earlier because they are remote devices. Observe that the three devices comprise a complete logical powerline
-       network. Device 00:B0:52:BA:BE:02 is connected to the local host but 00:0F:33:F2:01:21  and  00:0f:00:F2:01:13  are  con‐
-       nected to other hosts, somewhere.
-
-          # amplist 00:B0:52:BA:BE:02
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-
-       The  next  example  shows  that we can query multiple devices at a time for neighbors. We have copied the output from the
-       second example and pasted it onto the command line. We now have a list of all devices, local and remote.
-
-          # amplist 00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01
-          00:B0:52:BE:EF:04 00:B0:52:BA:BE:01 00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-
-       This next example does the same thing but uses option -n to append a newline after each query. This output is  eaiser  to
-       understand because each device queried starts on a new line and is followed by any neighbors.
-
-          # amplist 00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01 -n
-          00:B0:52:BE:EF:04
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-          00:B0:52:BA:BE:01
-
-       This  example  invokes  amplist which returns a list of local devices. That list is inserted into another amplist command
-       line. This demontrates how program output can be used in scripts.
-
-          # amplist $(amplist) -n
-          00:B0:52:BE:EF:04
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-          00:B0:52:BA:BE:01
-
-       This next example accomplishes the same thing since all local device respond with a list of powerline neighbors.
-
-          # amplist local
-          00:B0:52:BE:EF:04
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-          00:B0:52:BA:BE:01
-
-SEE ALSO
-       plc(1), amprate(1), ampstat(1), amptone(1), amptool(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  amplist(1)
-
- - - diff --git a/docbook/amplist.c.html b/docbook/amplist.c.html deleted file mode 100644 index 0bc2f9d7..00000000 --- a/docbook/amplist.c.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - amplist.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   amplist.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../plc/ListRemoteDevices2.c"
-#include "../plc/ListLocalDevices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/error.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexout.c"
-#include "../tools/todigit.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	extern const struct _term_ devices [];
-	static char const * optv [] =
-	{
-		"i:bnqrsv",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros Poserline Device Enumerator",
-		"b\tprint bridge devices; exclude remote devices",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"n\tappend newline to output",
-		"q\tquiet mode",
-		"r\tprint remote devices; exclude bridge devices",
-		"s\tprint newlines instead of spaces",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	char const * space = " ";
-	char const * comma = "\0";
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'b':
-			_setbits (plc.flags, PLC_BRIDGE_LIST);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'n':
-			comma = "\n";
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_REMOTE_LIST);
-			break;
-		case 's':
-			space = "\n";
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (_allclr (plc.flags, (PLC_BRIDGE_LIST|PLC_REMOTE_LIST)))
-	{
-		_setbits (plc.flags, (PLC_BRIDGE_LIST|PLC_REMOTE_LIST));
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		ListLocalDevices (&plc, space, comma);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		ListRemoteDevices2 (&plc, space, comma);
-		argc--;
-		argv++;
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/amprate.1.html b/docbook/amprate.1.html deleted file mode 100644 index ff1b76fb..00000000 --- a/docbook/amprate.1.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - amprate.1 - - - - - - - - - -
-amprate(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  amprate(1)
-
-NAME
-       amprate - Qualcomm Atheros AR7x00 PHY Rate Monitor
-
-SYNOPSIS
-       amprate [options] [device] [device] [...]
-
-DESCRIPTION
-       The  Atheros  PHY  Rate Utility polls one or more devices and prints the average transmit and receive PHY rates between a
-       device and each neighboring network device.  Output is column-oriented and suitable for loading  into  a  spreadsheet  or
-       being read by a simple program.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-COMMENTS
-       This program version is identical to legacy program int6k, except for options -t and -T which use version 1 of the  Qual‐
-       comm Atheros VS_NW_INFO vendor-specific message.  Older firmware versions may not recognize this message version.
-
-OPTIONS
-       -c     Display  coded  PHY  rates.   Coded PHY rates are displayed by default so this option is redundant but it has been
-              kept for backword compatibility.  This option and option -u are mutually exclusive.
-
-       -d seconds
-              Traffic duration in seconds per connection.  Directional traffic is systematically sent between each pair of  pow‐
-              erline  network  devices for this period of time.  Consequently, the total time needed to generate traffic between
-              all network devices will be approximately n! times this value, so don''t get carried away.  The minimum value is 1
-              second and the maximum value is 60 seconds.
-
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -n     Reads  the  average  transmit and receive PHY rate for wach device using VS_NW_INFO and prints it on stdout.  Each
-              output line displays the ethernet interface, source address,  destination  address  and  either  the  transmit  or
-              receive PHY rate.
-
-       -o milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is shown in brackets on the program menu.
-
-       -r     Reads device hardware and software revision information using VS_SW_VER and prints it on stdout.
-
-       -R     Resets the device using VS_RS_DEV.
-
-       -t     Generate powerline traffic between the local device and each remote device on each powerline network connected  to
-              the host.  It does not generate any traffic between remote powerline device pairs.  This option is especially use‐
-              ful when remote powerline devices are not connected to Ethernet devices capable of sending  traffic  back  to  the
-              host.
-
-       -T     Generate  powerline  traffic  between all devices on each powerline network connected to the host.  This option is
-              similar to option -t but it takes much longer because traffic is systematically generated  between  each  pair  of
-              powerline  devices.  Consequently, the time to complete will increase factorially as the number of network devices
-              increases.  Such complete traffic path coverage is not always needed.
-
-       -u     Display un-coded PHY rates.  Coded PHY rates are displayed by default.  This option and  option  -c  are  mutually
-              exclusive.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -x     Exit  program  on  first  error  with  a non-zero exit code.  This option allows shell scripts to detect failed or
-              incomplete operations and take the appropriate action.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The MAC address of some powerline device.  More than one address may be specified.  If more than  one  address  is
-              specified  then  operations  are performed on each device in turn.  The default address is local.  See DEVICES for
-              information about symbolic device addresses.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The following example displays the average transmit and receive PHY rates from each of  two  devices.   One  is  a  local
-       device  connected to interface eth2 and the other is a remote device at the far end of the powerline.  In this case, they
-       are the only two devices on the powerline network.  Observe the recipricol rates shown.
-
-          # amprate -ni eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB TX 163 mbps
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB RX 176 mbps
-          eth2 00:B0:52:00:00:BB 00:B0:52:00:00:AA TX 176 mbps
-          eth2 00:B0:52:00:00:BB 00:B0:52:00:00:AA RX 163 mbps
-
-       The following example generates powerline traffic between the local device and each remote device because  option  -t  is
-       present.  It then displays the PHY rate read from the local device.
-
-          # amprate -tni eth2
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB TX 163 mbps
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB RX 176 mbps
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-SEE ALSO
-       plc(1), amprule(1), ampstat(1), amptone(1)
-
-CREDITS
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  amprate(1)
-
- - - diff --git a/docbook/amprate.c.html b/docbook/amprate.c.html deleted file mode 100644 index 3c50e11d..00000000 --- a/docbook/amprate.c.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - amprate.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   amprate.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Devices.c"
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/ResetDevice.c"
-#include "../plc/LocalDevices.c"
-#include "../plc/Antiphon.c"
-#include "../plc/NetworkTraffic2.c"
-#include "../plc/PhyRates2.c"
-#include "../plc/RxRates2.c"
-#include "../plc/StationRole.c"
-#include "../plc/PLCSelect.c"
-#include "../plc/Traffic2.c"
-#include "../plc/Transmit.c"
-#include "../plc/VersionInfo1.c"
-#include "../plc/WaitForStart.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexencode.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/synonym.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define AMPRATE_LOOP 1
-#define AMPRATE_WAIT 0
-
-/*====================================================================*
- *
- *   void manager (struct plc * plc, signed count, signed pause);
- *
- *   perform operations in logical order despite any order specfied
- *   on the command line; for example, read PIB before writing PIB;
- *
- *   operation order is controlled by the order of "if" statements
- *   shown here; the entire operation sequence can be repeated with
- *   an optional pause between each iteration;
- *
- *
- *--------------------------------------------------------------------*/
-
-void manager (struct plc * plc, signed count, signed pause)
-
-{
-	while (count--)
-	{
-		if (_anyset (plc->flags, PLC_VERSION))
-		{
-			VersionInfo1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_LOCAL_TRAFFIC))
-		{
-			Traffic2 (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK_TRAFFIC))
-		{
-			NetworkTraffic2 (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK))
-		{
-			PhyRates2 (plc);
-		}
-		if (_anyset (plc->flags, (PLC_TXONLY|PLC_RXONLY)))
-		{
-			RxRates2 (plc);
-		}
-		if (_anyset (plc->flags, PLC_RESET_DEVICE))
-		{
-			ResetDevice (plc);
-		}
-		sleep (pause);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"cd:ei:l:nNo:qrRtTuvw:x",
-		"device [device] [...]",
-		"Qualcomm Atheros AR7x00 PHY Rate Monitor",
-		"c\tdisplay coded PHY rates",
-		"d n\ttraffic duration is (n) seconds per leg [" LITERAL (PLC_ECHOTIME) "]",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"l n\tloop (n) times [" LITERAL (AMPRATE_LOOP) "]",
-		"n\tnetwork TX/RX information",
-		"N\tnetwork RX only information",
-		"o n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"q\tquiet mode",
-		"r\trequest device information",
-		"R\treset device with VS_RS_DEV",
-		"t\tgenerate network traffic (one-to-many)",
-		"T\tgenerate network traffic (many-to-many)",
-		"u\tdisplay uncoded PHY rates",
-		"v\tverbose mode",
-		"w n\twait (n) seconds [" LITERAL (AMPRATE_WAIT) "]",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed loop = AMPRATE_LOOP;
-	signed wait = AMPRATE_WAIT;
-	signed c;
-	optind = 1;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	plc.timer = PLC_ECHOTIME;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'c':
-			_clrbits (plc.flags, PLC_UNCODED_RATES);
-			break;
-		case 'd':
-			plc.timer = (unsigned)(uintspec (optarg, 1, 60));
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'l':
-			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'n':
-			_setbits (plc.flags, PLC_NETWORK);
-			break;
-		case 'N':
-			_setbits (plc.flags, PLC_RXONLY);
-			break;
-		case 'o':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'q':
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_VERSION);
-			break;
-		case 'R':
-			_setbits (plc.flags, PLC_RESET_DEVICE);
-			break;
-		case 't':
-			_setbits (plc.flags, PLC_LOCAL_TRAFFIC);
-			break;
-		case 'T':
-			_setbits (plc.flags, PLC_NETWORK_TRAFFIC);
-			break;
-		case 'u':
-			_setbits (plc.flags, PLC_UNCODED_RATES);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'w':
-			wait = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (_allclr (plc.flags, (PLC_VERSION | PLC_LOCAL_TRAFFIC | PLC_NETWORK_TRAFFIC | PLC_RESET_DEVICE | PLC_TXONLY | PLC_RXONLY)))
-	{
-		_setbits (plc.flags, PLC_NETWORK);
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		manager (&plc, loop, wait);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		manager (&plc, loop, wait);
-		argv++;
-		argc--;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/amprule.1.html b/docbook/amprule.1.html deleted file mode 100644 index 5ad4c5f4..00000000 --- a/docbook/amprule.1.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - amprule.1 - - - - - - - - - -
-amprule(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  amprule(1)
-
-NAME
-       amprule - Stream Classification Utility
-
-SYNOPSIS
-       amprule [options] action operand condition [condition] [condition] control volatility [device] [device] [...]
-
-       where condition is a field operator value sequence.
-
-DESCRIPTION
-       Format  and  send  stream  classification rules to one or more devices.  Rules specify an action to be taken when a frame
-       satisfies selection criteria.  Selection criteria consists of one, two or three conditions where any  or  all  conditions
-       must  be satisfied.  Each condition consists of a field type, a relational operator and a value.  Rules may be added to a
-       device, or removed from a device, so that they have permanent or temporary effect.
-
-       Classification rules are cumulative.  If a new rule set is identical to an old rule set then an error will  occur  unless
-       it  contains a different Transmission Action.  In that case the old rule will be replaced.  Identical classification rule
-       sets are permitted if one of the sets is associated with a VLAN tag action.  Classification  is  based  on  the  original
-       frame before is is altered by VLAN Tag insertion or removal.
-
-       Classification  is  multi-dimensional  and  the  terminology  used here may seem strange at first.  Refer to the Qualcomm
-       Atheros Firmware Techncial Reference Manual description of the VS_CLASSIFICATION management message for a  full  explana‐
-       tion.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.  -r Read rules from a device and display them on stdout.
-
-       -s     Print a list of program keywords on stdout.  This option over-rides all others, except -? and -!, and the  program
-              will terminate without further action.
-
-       -t milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is shown in brackets on the program menu.  -T tag The VLAN tag to be inserted  into  frames
-              before  they  are transmitted.  The tag is a 32-bit hexadecimal integer with optional "0x" prefix.  This option is
-              required for action TagTX and must be omitted for all other actions.
-
-       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
-              be saved as text files for reference.
-
-       -V version
-              The  CSPEC  version  number  expressed  as a small decimal integer.  This option is required (and should be 2) for
-              action TagTX and must be omitted for all other actions.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       action The action to be taken for frames that meet any (or  all)  selection  criteria.   Valid  actions  are  listed  and
-              described under ACTIONS.
-
-       operand
-              The  operand  specifies the logical relationship between conditions before the action to be taken.  Valid operands
-              are listed and described under OPERANDS.
-
-       condition
-              A conditional expression consisting of a field, operator and value.  See CONDITIONS for more information.
-
-       control
-              The control specifies the action to be taken by the device upon receipt of the rule.  The basic actions are to add
-              it to, or remove it from, the list of existing rules.  Valid controls are listed and described under CONTROLS.
-
-       volatility
-              The  volatility  specifies  the  effective lifetime of the rule.  Temoprary rules are stored in SDRAM and are lost
-              then the device is reset.  Permanent rules are stored in NVRAM and are restored after the device is reset.   Valid
-              volatilities are listed and described under VOLATILITY.
-
-       device The  MAC  address  of some powerline device.  More than one address may be specified on the command line.  If more
-              than one address is specified then operations are performed on each  device  in  turn.   The  default  address  is
-              "local".  See DEVICES for more information.
-
-ACTIONS
-       Actions  indcate  the  disposition  of frames that match selection criteria.  They are expressed as discrete alphanumeric
-       strings entered in upper, lower or mixed character case.  They are position sensitive.  Failure to enter a  known  action
-       will results in an error message that lists permitted actions.
-
-       CAP0,CAP1,CAP2,CAP3
-              Assign a specific Channel Access Priority to frames.
-
-       Drop,DropTX
-              Do not forward frames over powerline.
-
-       DropRX Do not forward frames to host.
-
-       Boost  Boost frame priority to CAP3 for MMEs only.  At least one condition must be "MME".
-
-       StripTX
-              Remove  the  VLAN Tag from frames before transmission over powerline.  This option checks for a VLAN Tag even when
-              there are no VLAN related conditions.
-
-       StripRX
-              Remove the VLAN Tag from frames before forwarding to host.  This option checks for a VLAN Tag even when there  are
-              no VLAN related conditions.
-
-       TagTX  Insert a given VLAN Tag into frames before transmission over powerline.  This action requires option -T to specify
-              the tag and option -V to specify the CSPEC version.
-
-OPERANDS
-       The operand indicates the logical relationship that must exist between conditions in the rule set before  the  action  is
-       applied  to  a frame.  Operands are expressed as discrete alphanumeric strings entered in upper, lower or mixed character
-       case.  Failure to enter a known operand will result in an error message that lists permitted operands.  They are  positon
-       sensitive.  One operand is allowed and it must appear after the action and before any condition.
-
-       Any    Apply the action to frames that satisfy any of the conditions.  This is equivalent to the logical or operation.
-
-       All    Apply the action to frames that satisfy all of the conditions.  This is equivalent to the logical and operation.
-
-       Always Apply the action to all frames.  All conditions are ignored.
-
-CONDITIONS
-       A  condition consists of a field, an operator and a value.  One condition is required but three are permitted.  Condition
-       order is not important but all conditions must appear after the operand and before the control.
-
-       field  The field is the part of the Ethernet frame to be examined.  Some fields are not valid for some actions  but  this
-              program  does not enforce such rules since validation is performed by runtime firmware on each device.  Recognized
-              fields are listed and described under FIELDS.
-
-       operator
-              The operator specifies the relationsip that must exist between the field and value in order for the  condition  to
-              evaluate  True.  Currently, only equality operators are supported.  Valid operators are listed and described under
-              OPERATORS.
-
-       value  The value must be appropriate to the field type.  Some fields are MAC or IP addresses, some are integers, some are
-              bitmaps  and  others  are states.  Integers and bitmaps may be expressed in binary, decimal or hexadecimal format.
-              Binary values staRt with 0b.  Hexadecimal values start with 0x.  States are expressed using keywords.   Users  are
-              responsible  for  knowing  how many bits are significant for each type of value.  Valid values are described along
-              with fields under FIELDS.
-
-FIELDS
-       Fields indicate the portion of the frame that is inspected during selection and the size and format of the value permited
-       in the condition statement.  They are expressed as discrete alphanumeric strings entered in upper, lower or mixed charac‐
-       ter case.  Failure to enter a known field will result in an error message that lists permitted fields.
-
-       ET     A 16-bit Ethertype expressed in hexadecimal with optional "0x" prefix.  The format is described in  IEEE  Standard
-              802-2001 [4].
-
-       EthDA  A  48-bit Ethernet destination address expressed in hexadecimal.  Octets may be separated with optional colons for
-              clarity.  The format is described in IEEE Standard 802-2001 [4].
-
-       EthSA  A 48-bit Ethernet source address expressed in hexadecimal.  Octets may be separated with optional colons for clar‐
-              ity.  The format is described in IEEE Standard 802-2001 [4].
-
-       IPSP   A  16-bit  IP  source  port  expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
-              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
-
-       IPDP   A 16-bit IP destination port expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
-              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
-
-       IPV4TOS
-              An 8-bit Type-of-Service code where the format is defined in the RFC 791 (Internet Protocol) [14].
-
-       IPV4PROT
-              An 8-bit Ethernet protocol code.  The format is defined in the RFC 791 (Internet Protocol) [14].
-
-       IPV4SA A 32-bit Internet Protocol source address expressed in dotted-decimal notation.  The official format is defined in
-              RFC 791 (Internet Protocol) [14].  Our implementation permits empty octets and leading zeros within  fields.   For
-              example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
-
-       IPV4DA A  32-bit  Internet  Protocol  destination  address  expressed  in dotted-decimal notation. The official format is
-              defined in RFC 791 (internet Protocol) [14]. Our implementation permits empty  octets  and  leading  zeros  within
-              fields. For example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
-
-       IPV6TC An 8-bit Internet Protocol V6 traffic class expressed as defined in RFC 2460 (Internet Protocol Version 6) [17].
-
-       IPV6FL A  24-bit  IPV6  flow label where the lower 20 bits are the IPv6 Flow Label defined in RFC 2460 (Internat Protocol
-              Version 6) [17].  The upper 4 bits should be zero.  The value can be entered either as a decimal,  binary  or  hex
-              integer.
-
-       IPV6SA A  128-bit IPV6 source address expressed as colon-separated hexadecmial quartets (octet pairs).  The official for‐
-              mat is defined in RFC 2460 (Internet Protocol Version 6) [17].  Our implementation permits multiple empty  fields,
-              abreviated  fields  and  leading zeros within fields.  When multiple empty fields appear, the right-most occurance
-              expands     to     multiple     zeros.      For     example,     "AAAA::BBBB::CCCC"     is      equivalent      to
-              "AAAA:0000:BBBB:0000:0000:0000:0000:CCCC".
-
-       IPV6DA A  128-bit IPV6 destination address expressed as colon-separated hexadecimal quartets (octet pairs).  The official
-              format is defined in RFC 2460 (Internet Protocol Version 6)  [17].   Our  implementation  permits  multiple  empty
-              fields,  abbreviated  fields  and  leading zeros within fields.  When multiple empty fields appear, the right-most
-              occurance expands to zeros.  For example, ":1::2" is equivalent to "0000:0001:0000:0000:0000:0000:0000:0002".
-
-       MME    A 24-bit Atheros HomePlugAV Management Message type expressed as a hex byte stream.  For clarity,  the  recommeded
-              format  it  "xx:xxxx".   The  first  byte is the MMV.  The next two bytes are the MMTYPE.  Both are defined in the
-              HomePlug AV Specification.  The MMTYPE will match all  MME  variants,  such  as  Request,  Confirm,  Indicate  and
-              Response because the lower two bits are ignored.  This field is only valid for action "Boost".
-
-       TCPAck The  string  "True"  or "False" to indicate that the frame is (or is not) a TCP Acknowledgement.  Double negatives
-              are allowed so "Is True" is equvalent to "Not False" and "Is False" is equivalent to "Not True".
-
-       TCPSP  A 16-bit TCP source port as a decimal integer.  The format is defined in RFC 793  (Transmission  Control  Protocol
-              [15]).
-
-       TCPDP  A 16-bit TCP destination port expressed as a decimal integer.  The format is defined in RFC 793 (Transmission Con‐
-              trol Protocol [15]).
-
-       UDPSP  A 16-bit UDP source port expressed as a decimal integer.  The format is defined in RFC 768 (User Datagram Protocol
-              [13]).
-
-       UDPDP  A  16-bit  UDP  destination  port expressed as a decimal integer.  The format is defined in RFC 768 (User Datagram
-              Protocol [13]).
-
-       VLANID A 16-bit VLAN identifier where the lower 12 bits are the VLAN Identifier (VID) defined  in  IEEE  Std  802.1Q-1998
-              (Virtual Bridged Local Area Networks) [11].  The upper 4 bits should be zero.
-
-       VLANUP An  8-bit  Ethernet  VLAN tag where the lower 3 bits are the User Priority sub-field of a VLAN Tag defined in IEEE
-              Std 802.1Q-1998 (Virtual Bridged Local Area Networks) [11].  The upper 5 bits should be zero.
-
-       VLANTag
-              The string "Present" or "Missing" to indicate the presence (or absence) of one or more VLAN Tags within  a  frame.
-              This  classifier  is  essentially  equivalent  to "ET Is 0x8100".  Double negatives are allowed so "Is Present" is
-              equivalent to "Not Missing" and "Is Missing" is equivalent to "Not Present".
-
-OPERATORS
-       An operator indicates an equality between a field and a value.  An operator is an alphanumeric string entered  in  upper,
-       lower  or  mixed  character case.  Failure to enter a known operator will result in an error message that lists permitted
-       operators.  Operators are position sensitive and must appear between each field and value.
-
-       Is     Indicates that the frame field must equal the associated value for the condition to evaluate true.
-
-       Not    Indicates that the frame field must not equal the associated value for the condition to evaluate true.
-
-STATES
-       A state is a special case of value.
-
-       True,On,Yes,Present
-              Indicates a positive state or presence of some entity.  All are equivalent and can be used interchangeably.   Dou‐
-              ble negatives are permitted so "Is True" is equvalent to "Not False".
-
-       False,Off,No,Missing
-              Indicates a negative state or absence of some entity.  All are equivalent and can be used interchangeably.  Double
-              negatives are permitted so "Is False" is equvalent to "Not True".
-
-CONTROLS
-       The control determines how the devices will handle the rule after it  is  validated.   It  is  expressed  as  a  discrete
-       alphanumeric  string entered in upper, lower or mixed character case.  Failure to enter a known control will result in an
-       error message that lists permitted controls.  The control is position sensitive and must occur after condition and before
-       volatility.
-
-       Add    Adds the rule to the current list of rules unless a violation occurs.  In some cases, a rule may replace an exist‐
-              ing rule instead of being added.
-
-       Rem,Remove
-              Remove the rule from the current list of rules unless a violation occurs.
-
-VOLATILITY
-       The volatility determines which device rule set will be affected by the action.  It is expressed as a  discrete  alphanu‐
-       meric  string  entered  in  upper,  lower or mixed character case.  Failure to enter a known volatility will result in an
-       error message that lists permitted volatilities.  The volatility is position sensitive and must occur after control.
-
-       Temp   The temporary rule set will be modified.  The temporary rule set resides in the working PIB stored in SDRAM.
-
-       Perm   The permanent rule set will be modified.  The permanent rule set resides in the user PIB stored in NVRAM.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information is not available.  Qualcomm Atheros reserves the right to modify message structure
-       or content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       This command adds a temporary classification rule to the classification table on  device  B00:B0:52:BA:BE:01.   The  rule
-       instructs  the device to drop frames that match either (any) of two conditions.  The first condition states that the IPv4
-       source address is 192.168.99.2.  The second conditon states that the IPv4 destination address is 192.168.99.100.
-
-          # amprule drop any IPv4SA is 192.168.99.2 IPv4DA is 192.168.99.100 add temp 00:B0:52:BA:BE:01
-
-       Observe that the action, operand and conditions come first then the control and volatility then the affected devices.  Up
-       to three conditions may be specified.  Keyword order is important.  Character case is not important.
-
-       The  following  example  prints  a  list of programmed keywords on stdout for reference.  The example shown here has been
-       abbreviate due to formatting limitations.
-
-          # amprule -t
-
-            Controls are 'Add'|'Rem'|'Remove'
-            Volatilities are 'Temp'|'Perm'
-            Actions are 'CAP0'|'CAP1'|'CAP2'|'CAP3'|'Boost'|...|'StripTX'|'StripRX'|'TagRX'
-            Operands are 'All'|'Any'|'Always'
-            Fields are 'EthDA'|'EthSA'|'VLANUP'|'VLANID'|'IPv4TOS'|...|'TCPAck'|'VLANTag'
-            Operators are 'Is'|'Not'
-
-       More example follow:
-
-       Ethernet Address Rules
-
-       Ethernet address rules have the following general format:
-
-          | CAP0 | ANY | EthSA | IS  | xx:xx:xx:xx:xx:xx | ADD    | TEMP | xx:xx:xx:xx:xx:xx
-          | CAP1 | ALL | EthDA | NOT |                   | REMOVE | PERM |
-          | CAP2 |
-          | CAP3 |
-          | DROP |
-
-       For example, instruct device 00:B0:52:BA:BE:FF to temporarily add a rule to  forward  frames  from  00:2B:FE:CA:FE:BA  at
-       CAP3.  Observe Ethernet hardware addresses are used both in the condition and for the affected powerline devices.
-
-          # amprule cap3 any ethsa is 00:2b:fe:ca:fe:ba add temp 00:b0;52:ba:be:ff
-
-       IP Address Rules
-
-       IP address rules have the following general format:
-
-          | CAP0 | ANY | IPv4SA | IS  | ddd.ddd.ddd.ddd | ADD    | TEMP | xx:xx:xx:xx:xx:xx
-          | CAP1 | ALL | IPv4DA | NOT |                 | REMOVE | PERM |
-          | CAP2 |
-          | CAP3 |
-          | DROP |
-
-       For  example,  instruct  device  00:B0:52:BA:BE:FF  to  permanently remove the rule that drops packets from 192.168.99.1.
-       Notice that the IP address is specified in dotted decimal format but the device address is specified in hexadecimal octet
-       format.   Dotted decimal format permits empty and variable length octets but octet delimiters are mandatory.  Hexadecimal
-       octet format requires fixed length octets but octet delimiters are optional.
-
-          # amprule drop any ipv4sa is 192.168.99.1 remove perm 00:b0:52:ba:be:ff
-
-       IP Protocol Rules
-
-       IP protocol rules have the following general format:
-
-          | CAP0 | ANY | IPv4PROT | IS  | xxxx | ADD    | TEMP | xx:xx:xx:xx:xx:xx
-          | CAP1 | ALL |          | NOT |      | REMOVE | PERM |
-          | CAP2 |
-          | CAP3 |
-          | DROP |
-
-       For example, to instruct device 00:B0:52:BA:BE:FF to permanently add a rule to forward non-IP packets at CAP2.   In  this
-       example, delmiters have been omitted from the device Ethernet address.
-
-          # amprule CAP2 all ipv4prot not 0x0800 add perm 00b052babeff
-
-SEE ALSO
-       plc(1), amprate(1), ampstat(1), amptone(7)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  amprule(1)
-
- - - diff --git a/docbook/amprule.c.html b/docbook/amprule.c.html deleted file mode 100644 index 9f7e0659..00000000 --- a/docbook/amprule.c.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - amprule.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   amprule.c - Qualcomm Atheros Message MakeRule Utility;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../plc/rules.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/basespec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/bytespec.c"
-#include "../tools/ipv4spec.c"
-#include "../tools/ipv6spec.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#include "../tools/assist.c"
-#include "../tools/lookup.c"
-#include "../tools/codelist.c"
-#include "../tools/memout.c"
-#include "../tools/reword.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../plc/rules.c"
-#include "../plc/ParseRule.c"
-#include "../plc/PrintRule.c"
-#include "../plc/MakeRule.c"
-#include "../plc/ReadRules.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define AMPRULE_CSPEC_VERSION 0
-#define AMPRULE_VLAN_TAG 0x00000000
-#define COMMA ","
-#define QUOTE "''"
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:qrst:T:vV:",
-		"action operand condition [...] control volatility [device] [...]\n\n          where a condition is: field operator value",
-		"Qualcomm Atheros Stream MakeRule Utility",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"r\tread rules from device",
-		"s\tdisplay symbol tables",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"T x\tinserted vlan tag is x [" LITERAL (AMPRULE_VLAN_TAG) "]",
-		"v\tverbose mode",
-		"V n\tcspec version is n [" LITERAL (AMPRULE_CSPEC_VERSION) "]",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	struct cspec cspec;
-	struct MMERule rule;
-	signed c;
-	memset (& rule, 0, sizeof (rule));
-	memset (& cspec, 0, sizeof (cspec));
-	cspec.VLAN_TAG = AMPRULE_VLAN_TAG;
-	cspec.CSPEC_VERSION = AMPRULE_CSPEC_VERSION;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != - 1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_ANALYSE);
-			break;
-		case 's':
-			printf ("\n");
-			printf (" Controls are ");
-			codelist (controls, SIZEOF (controls), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Volatilities are ");
-			codelist (volatilities, SIZEOF (volatilities), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Actions are ");
-			codelist (actions, SIZEOF (actions), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Operands are ");
-			codelist (operands, SIZEOF (operands), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Fields are ");
-			codelist (fields, SIZEOF (fields), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Operators are ");
-			codelist (operators, SIZEOF (operators), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" States are ");
-			codelist (states, SIZEOF (states), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf ("\n");
-			return (0);
-		case 't':
-			channel.timeout = (signed) (uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'T':
-			cspec.VLAN_TAG = (uint32_t) (basespec (optarg, 16, sizeof (cspec.VLAN_TAG)));
-			cspec.VLAN_TAG = htonl (cspec.VLAN_TAG);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'V':
-			cspec.CSPEC_VERSION = (uint16_t) (basespec (optarg, 10, sizeof (cspec.CSPEC_VERSION)));
-			cspec.CSPEC_VERSION = HTOLE16 (cspec.CSPEC_VERSION);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (_allclr (plc.flags, PLC_ANALYSE))
-	{
-		if (ParseRule (& argc, & argv, & rule, & cspec) == - 1)
-		{
-			error (1, 0, "invalid rule");
-		}
-	}
-	openchannel (& channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		if (_anyset (plc.flags, PLC_ANALYSE))
-		{
-			ReadRules (& plc);
-		}
-		else
-		{
-			MakeRule (& plc, & rule);
-		}
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		if (_anyset (plc.flags, PLC_ANALYSE))
-		{
-			ReadRules (& plc);
-		}
-		else
-		{
-			MakeRule (& plc, & rule);
-		}
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (& channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/ampstat.1.html b/docbook/ampstat.1.html deleted file mode 100644 index cd254d8b..00000000 --- a/docbook/ampstat.1.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - ampstat.1 - - - - - - - - - -
-ampstat(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  ampstat(1)
-
-NAME
-       ampstat - Qualcomm Atheros AR7x00 Link Statistics
-
-SYNOPSIS
-       ampstat [options] [device] [device] [...]
-
-DESCRIPTION
-       The  Atheros  Device Statistics Utility polls a device and prints network and link statistics in various formats suitable
-       for use by other programs.  This is a work in progress so user feedback is encouraged.  Link statistics  are  only  valid
-       between one powerline device and another.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-COMMENTS
-       This program is identical to legacy program int6kstat but uses version 1 of the Qualcomm Atheros VS_NW_INFO Atheros  ven‐
-       dor-specific message.  Older firmware versions may not recognize this message version.
-
-OPTIONS
-       -C     Clear  device link statistics using VS_LNK_STATS.  Statistics are read and cleared then displayed.  The statistics
-              that are read and displayed depend on options -d, -p and -s but all link statistics are cleared.
-
-       -d direction
-              Return statistics for the specified direction using VS_LNK_STATS.  Direction can be 0=tx, 1=rx,  2=both  or  "rx",
-              "tx" or "both".
-
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i     Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -l count
-              Define the number of times that the command will be repeated for each device specified.  Normally, you will repeat
-              operations on one device only.
-
-       -m     Displays network membership information, as seen by one device, using VS_NW_INFO.  Use option -t for complete net‐
-              work topology seen by the local host.
-
-       -p peernode
-              Ethernet  hardware  address  of  the  peer  node for VS_LNK_STATS.  This option is required for all Link ID values
-              except 0xFC.  The default is 00:00:00:00:00:00.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -s linkid
-              The Link ID for VS_LNK_STATS.  Link ID values range from 0 through 255 but not all  values  are  accepted  by  the
-              device  firmware.   Values may be expressed in decimal, binary prefixed with "0b" or hexadecimal prefixed by "0x".
-              Many valid values can be expressed by name.  Valid values are listed and explained under LINKID.  The default Link
-              ID is 0xFC.
-
-       -t     Display  network  topology  using VS_SW_VER and VS_NW_INFO messages.  This option is similar to option -m but pro‐
-              vides complete network topology plus device hardware and firmware version.  Topology is  always  relative  to  the
-              local  host,  or  local hosts if present.  Powerline devices that appear on the command line are not used for this
-              operation.  Older QCA powerline devices may fail to respond to this this  option.   In  that  event,  use  program
-              int6kstat or plcstat.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -w seconds
-              Defines  the  number  of  seconds to wait before repeating command line options.  This option has no effect unless
-              option -l is also specified with a non-zero value.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The MAC address of some powerline device.  More than one address may be specified.  If more than  one  address  is
-              specified  then  operations  are performed on each device in turn.  The default address is local.  See DEVICES for
-              information about symbolic device addresses.
-
-LINKID
-       0x00,CSMA-CAP0
-              Display CSMA statistics for CAP0 traffic using a single peer node.  The peer node MAC address  must  be  specified
-              using option -p.
-
-       0x01,CSMA-CAP1
-              Display  CSMA  statistics  for CAP1 traffic using a single peer node.  The peer node MAC address must be specified
-              using option -p.
-
-       0x02,CSMA-CAP2
-              Display CSMA statistics for CAP2 traffic using a single peer node.  The peer node MAC address  must  be  specified
-              using option -p.
-
-       0x03,CSMA-CAP3
-              Display  CSMA  statistics  for CAP3 traffic using a single peer node.  The peer node MAC address must be specified
-              using option -p.
-
-       0xF8,CSMA-PEER
-              Display CSMA statistics for all traffic using a single  peer node.  The peer node MAC address  must  be  specified
-              using option -p.
-
-       0xFC,CSMA-ALL
-              Display  CSMA  statistics  for all traffic with all peer nodes.  A peer node MAC address is not needed and will be
-              ignored if provided.  This value is the default for option -s.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-EXAMPLES
-       None.
-
-SEE ALSO
-       plc(1), amplist(1), amprate(1), ampstat(1), amptone(1), amptool(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  ampstat(1)
-
- - - diff --git a/docbook/ampstat.c.html b/docbook/ampstat.c.html deleted file mode 100644 index bda0ac73..00000000 --- a/docbook/ampstat.c.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - ampstat.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   ampstat.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../plc/LinkStatistics.c"
-#include "../plc/LocalDevices.c"
-#include "../plc/NetworkInformation.c"
-#include "../plc/NetworkInformation1.c"
-#include "../plc/NetworkInformation2.c"
-#include "../plc/PLCSelect.c"
-#include "../plc/Topology.c"
-#include "../plc/Topology1.c"
-#include "../plc/Topology2.c"
-#include "../plc/Platform.c"
-#include "../plc/WaitForStart.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/error.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/synonym.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define AMPSTAT_LOOP 1
-#define AMPSTAT_WAIT 0
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-static const struct _term_ linkids [] =
-
-{
-	{
-		"CSMA-ALL",
-		"0xFC"
-	},
-	{
-		"CSMA-CAP0",
-		"0x00"
-	},
-	{
-		"CSMA-CAP1",
-		"0x01"
-	},
-	{
-		"CSMA-CAP2",
-		"0x02"
-	},
-	{
-		"CSMA-CAP3",
-		"0x03"
-	},
-	{
-		"CSMA-PEER",
-		"0xF8"
-	},
-};
-
-static const struct _term_ directions [] =
-
-{
-	{
-		"both",
-		"2"
-	},
-	{
-		"rx",
-		"1"
-	},
-	{
-		"tx",
-		"0"
-	}
-};
-
-/*====================================================================*
- *
- *   void manager (struct plc * plc);
- *
- *   perform operations in logical order despite any order specfied
- *   on the command line; for example read PIB before writing PIB;
- *
- *   operation order is controlled by the order of "if" statements
- *   shown here; the entire operation sequence can be repeated with
- *   an optional pause between each iteration;
- *
- *
- *--------------------------------------------------------------------*/
-
-void manager (struct plc * plc, signed count, signed pause)
-
-{
-	while (count--)
-	{
-		if (_anyset (plc->flags, PLC_ANALYSE))
-		{
-			Topology2 (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK))
-		{
-			NetworkInformation2 (plc);
-		}
-		if (_anyset (plc->flags, PLC_LINK_STATS))
-		{
-			LinkStatistics (plc);
-		}
-		sleep (pause);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"Cd:ei:l:mp:qs:tvw:",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros AR7x00 Link Statistics",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"C\tclear statistics without reading using VS_LNK_STATS",
-		"d n\tdirection (0=tx, 1=rx, 2=both) for VS_LNK_STATS",
-		"e\tredirect stderr to stdout",
-		"l n\tloop n times [" LITERAL (AMPSTAT_LOOP) "]",
-		"s n\tLink ID for VS_LNK_STATS (see Programmer's Guide)",
-		"m\tprint network membership information using VS_NW_INFO",
-		"p x\tpeer node address for options -s",
-		"q\tquiet mode",
-		"t\tprint network topology using VS_NW_INFO with VS_SW_VER",
-		"v\tverbose mode",
-		"w n\twait n seconds [" LITERAL (AMPSTAT_WAIT) "]",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed loop = AMPSTAT_LOOP;
-	signed wait = AMPSTAT_WAIT;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	plc.pushbutton = 0;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'C':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			plc.pushbutton = 1;
-			break;
-		case 'd':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			plc.module = (uint8_t)(uintspec (synonym (optarg, directions, SIZEOF (directions)), 0, UCHAR_MAX));
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'm':
-			_setbits (plc.flags, PLC_NETWORK);
-			break;
-		case 'p':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			if (!hexencode (plc.RDA, sizeof (plc.RDA), (char const *)(optarg)))
-			{
-				error (1, errno, PLC_BAD_MAC, optarg);
-			}
-			break;
-		case 'l':
-			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			plc.action = (uint8_t)(uintspec (synonym (optarg, linkids, SIZEOF (linkids)), 0, UCHAR_MAX));
-			break;
-		case 't':
-			_setbits (plc.flags, PLC_ANALYSE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'w':
-			wait = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		manager (&plc, loop, wait);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		manager (&plc, loop, wait);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/amptest.1.html b/docbook/amptest.1.html deleted file mode 100644 index 18f7a55d..00000000 --- a/docbook/amptest.1.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - amptest.1 - - - - - - - - - -
-amptest(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  amptest(1)
-
-NAME
-       amptest - Qualcomm Atheros PLC Test Applet Loader
-
-SYNOPSIS
-       amptest [options] [file] [file] [...]
-
-DESCRIPTION
-       Download  and  execute  one or more test applets on the local Qualcomm Atheros PLC device.  An applet is a small firmware
-       image that can be started by the bootloader and that returns to the bootloader when done.  This program is an alternative
-       to program int6ktest but has been replaced by program plctest.
-
-       A  Qualcomm Atheros firmware image file may contain one or more applets.  Each applet is preceded by a header that speci‐
-       fies the image size, load address and start address.  Program amptest sequentially downloads  and  executes  each  applet
-       found in each image file specified on the command line.  It waits for each applet to complete before downloading and exe‐
-       cuting the next one.  The program terminates once all applets in all files have been executed or  some  applet  fails  to
-       complete within 60 seconds.
-
-       Most  applets  return  to  the Bootloader on successful completion so that another applet can be downloaded and executed.
-       This allows applet chains to be executed using one command.  A chain may consist of one file containing multiple  applets
-       or  multiple  files  each  containing  one applet or any combination of single and multiple applet files.  The chain will
-       break, after a timeout, if any applet in the chain fails to return to the Bootloader in time.  Failure to return in  time
-       may be either a good thing or a bad thing depending on applet design.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the APT man page for an overview and installation
-       instructions.
-
-COMMENTS
-       The Qualcomm Atheros Powerline Toolkit contains a set of legacy applets in folder applets.  These were designed  for  use
-       with  program int6ktest and most will not display console messages properly using this program.  A new series of compati‐
-       ble applets are under development and should be available through Atheros Field Application Engineering.
-
-       Assuming a good set of applets are available, this program is ideal for testing reference  designs  for  performance  and
-       production  units  for defects.  Applets may become available for testing onboard connections, memory integrity and noise
-       immunity.  Consult with Atheros Field Application Engineering for applet availability.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -l     Sequentially execute and re-execute all applets in all files on the command line until the program  is  terminated
-              with ^C.
-
-       -q     Suppresses normal progress and status messages.
-
-       -t milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is shown in brackets on the program menu.
-
-       -v     Print additional information on stdout.  Specifically, this option prints incoming and outgoing frames in hexadec‐
-              imal format on stdout.  Output can be directed to a text file for analysis.
-
-       -w seconds
-              Application timeout in seconds.  This application will wait this long for an applet to terminate and return to the
-              bootloader before reporting an error and proceeding to the next applet.
-
-       -x     Cause the program to exit on the first error instead of moving on to the next applet.  Error exits return  a  non-
-              zero value to the shell.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   The  name of an Atheros image file.  The image file may contain one or more images.  Each image will be downloaded
-              and executed in turn until all images are executed or an image fails to return to the Bootloader within  1  minute
-              for some reason.
-
-EXAMPLES
-       The  following example sequentially downloads then executes each image in file abc.nvm in turn.  Each image must complete
-       and return to the bootloader before the next one downloads.  Observe that no device address  is  needed  because  Atheros
-       powerline devices use address 00:b0:52:00:00:01 when in bootloader mode.
-
-          # amptest abc.nvm
-
-       The  following  example  will  sequentially  download and execute the images in each file abc.nvm, def.nvm and ghi.nvm in
-       turn.
-
-          # amptest abc.nvm def.nvm ghi.nvm
-
-DISCLAIMER
-       Atheros image file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public informa‐
-       tion  is  not  available.   Qualcomm  Atheros  reserves  the right to change file structure or content in future firmware
-       releases without any obligation to notify or compensate users of this program.  This  program  is  reserved  for  use  by
-       Atheros Field Engineers.  Use of this program may void some contractual obligations made by Atheros.
-
-SEE ALSO
-       APT(1), chknvm(1), chknvm2(1), int6ktest(1), nvmsplit(1), nvmmerge(1), plctest(1), setnvm(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  amptest(1)
-
- - - diff --git a/docbook/amptest.c.html b/docbook/amptest.c.html deleted file mode 100644 index cabee99b..00000000 --- a/docbook/amptest.c.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - amptest.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   amptest.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../plc/ExecuteApplets1.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WriteExecuteFirmware1.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/NVMSelect.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/error.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/FirmwareMessage.c"
-#include "../mme/ARPCPrint.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *
- *   signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE);
- *
- *   plc.h
- *
- *   this version of ReadMME() calls FirmwareMessage() to intercept
- *   VS_ARPC messages and print them on stdout in readable format;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	while ((plc->packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-		if (FirmwareMessage (message))
-		{
-			continue;
-		}
-		if (UnwantedMessage (message, plc->packetsize, MMV, MMTYPE))
-		{
-			continue;
-		}
-		break;
-	}
-	return (plc->packetsize);
-}
-
-/*====================================================================*
- *
- *   void sequence (struct plc * plc, int argc, char const * argv);
- *
- *   open each file on the command line and execute all applets in
- *   each file; exit program if I/O or execution errors occur;
- *
- *   this implementation calls functions nvmfile1 and ExecuteApplets1
- *   to read legacy NVM file formats only; see program plctest for
- *   the newer file formats;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static void sequence (struct plc * plc, int argc, char const * argv [])
-
-{
-	while ((argc) && (* argv))
-	{
-		if ((plc->NVM.file = open (plc->NVM.name = * argv, O_BINARY|O_RDONLY)) == -1)
-		{
-			error (0, errno, FILE_CANTOPEN, plc->NVM.name);
-		}
-		else if (nvmfile1 (&plc->NVM))
-		{
-			error (0, errno, FILE_CANTLOAD, plc->NVM.name);
-		}
-		else
-		{
-			ExecuteApplets1 (plc);
-		}
-		close (plc->NVM.file);
-		argc--;
-		argv++;
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary when asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	char firmware [PLC_VERSION_STRING];
-	static char const * optv [] =
-	{
-		"ei:lqt:vw:xX",
-		"file [file] [...]",
-		"Qualcomm Atheros PLC Test Applet Loader",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"l\tloop until program is terminated",
-		"q\tquiet mode",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"w n\twait time is (n) seconds [" LITERAL (PLC_TIMER) "]",
-		"x\texit on error",
-		"X\texit on start",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed loop = 0;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'l':
-			loop = 1;
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'w':
-			plc.timer = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		case 'X':
-			_setbits (plc.flags, PLC_QUICK_FLASH);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (WaitForStart (&plc, firmware, sizeof (firmware)))
-	{
-		error (1, ECANCELED, PLC_NODETECT);
-	}
-	if (strcmp (firmware, "BootLoader"))
-	{
-		error (1, ECANCELED, "BootLoader must be running");
-	}
-	do
-	{
-		sequence (&plc, argc, argv);
-	}
-	while (loop);
-	free (plc.message);
-	closechannel (&channel);
-	return (plc.state);
-}
-
-
-
- - - diff --git a/docbook/amptone.1.html b/docbook/amptone.1.html deleted file mode 100644 index 24a4e6c8..00000000 --- a/docbook/amptone.1.html +++ /dev/null @@ -1,1059 +0,0 @@ - - - - - - amptone.1 - - - - - - - - - -
-amptone(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  amptone(1)
-
-NAME
-       amptone - Qualcomm Atheros Thunderbolt/Lightning Tone Map Dump Utility
-
-SYNOPSIS
-       amptone [options] device peer [>stdout]
-
-DESCRIPTION
-       Collect  and print device TX tone map information between a device to a peer device on stdout.  The transmit direction is
-       from device to peer.
-
-       Powerline devices cannot compute tone map values unless until some data has passed through them, either to  or  from  the
-       powerline.   In  most cases, the ping utility will generate enough traffic to create a usable tone map.  To get a respon‐
-       sive tonemap, one must send more traffic at higher data rates, possibly using ttcp or iperf or similar utility.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-COMMENTS
-       This program is identical to legacy program int6ktone but uses version 1 of the Qualcomm Atheros VS_RX_TONE_MAP_CHAR ven‐
-       dor-specific message.  Older firmware versions may not recognize this message version.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -h     Display  a  histogram  of  the Root Mean Square (RMS) of the time slot values for each carrier.  This value has no
-              meaning by itself.  It merely accentuates minor differences from one carrier to the next.
-
-       -i     Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -p coupling
-              Tonemap  coupling.   Valid values are the number 0, or the string "pri", for primary coupling and the number 1, or
-              the string "alt", for alternate coupling.  This program will accept any numeric value from 0 through 255 but  run‐
-              time firmware will reject invalid values.  The default value is 0.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -s     Compute  and  display  signal-to-noise ratios based on the bits-per-carrier reported.  Average SNR is computed for
-              each slot then an overall average SNR is computed.  ACG and GIL values for each slot  are  also  displayed.   This
-              option suppresses tone map output and causes option -h to be ignored.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The MAC address of the primary device.
-
-       peer   The MAC address of the peer device.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The following example prints transmit tone map information from device 00B05200CA0D to device 00B05200CA0C.  The informa‐
-       tion relates to channel adaptation.  We requested a histogram with option -h and suppressed the  progress  messages  with
-       option -q.  Output consists of 917 lines of tone map modulation data.
-
-       Each line of tone map data consists of 8 columns.  The first column is the offset.  The next 6 columns are time slot mod‐
-       ulation data.  The last column is the computed mean-square of the time slot modulation data.  Devices operating on a 50hz
-       powerline have modulation data in all 6 time slot columns.  Devices operating on a 60hz powerline have modulation data in
-       only 5 of the 6 columns.
-
-          # amptone -qh 00B05200CA0D 00B05200CA0C
-          0000,05,04,04,05,04,00,19 ###################
-          0001,05,04,04,05,04,00,19 ###################
-          0002,05,04,04,05,04,00,19 ###################
-          0003,05,04,04,05,05,00,21 #####################
-          0004,05,04,04,05,05,00,21 #####################
-          0005,05,04,04,05,05,00,21 #####################
-          0006,05,04,04,05,05,00,21 #####################
-          0007,05,04,05,05,05,00,23 #######################
-          0008,05,04,05,05,05,00,23 #######################
-          0009,05,04,04,05,05,00,21 #####################
-          0010,05,05,05,05,05,00,25 #########################
-          0011,05,05,05,05,05,00,25 #########################
-          0012,05,05,04,05,05,00,23 #######################
-          0013,05,05,05,05,05,00,25 #########################
-          0014,05,05,05,05,05,00,25 #########################
-          0015,05,05,05,05,05,00,25 #########################
-          0016,05,05,04,05,05,00,23 #######################
-          0017,05,05,04,05,05,00,23 #######################
-          0018,05,05,05,05,05,00,25 #########################
-          0019,05,05,05,05,05,00,25 #########################
-          0020,05,05,05,05,05,00,25 #########################
-          0021,05,05,05,05,05,00,25 #########################
-          0022,05,05,05,05,05,00,25 #########################
-          0023,05,05,05,05,05,00,25 #########################
-          0024,05,05,05,05,05,00,25 #########################
-          0025,05,05,05,05,05,00,25 #########################
-          0026,05,05,05,05,05,00,25 #########################
-          0027,05,05,05,05,05,00,25 #########################
-          0028,05,05,05,05,05,00,25 #########################
-          0029,05,05,05,05,05,00,25 #########################
-          0030,05,05,05,05,05,00,25 #########################
-          0031,05,05,05,05,05,00,25 #########################
-          0032,05,05,05,05,05,00,25 #########################
-          0033,05,05,05,05,05,00,25 #########################
-          0034,05,05,05,05,05,00,25 #########################
-          0035,05,04,04,04,05,00,19 ###################
-          0036,05,04,04,04,05,00,19 ###################
-          0037,04,03,03,04,04,00,13 #############
-          0038,03,02,03,02,04,00,08 ########
-          0039,02,01,02,02,03,00,04 ####
-          0040,02,01,02,01,02,00,02 ##
-          0041,02,00,02,01,02,00,02 ##
-          0042,02,01,02,01,02,00,02 ##
-          0043,02,01,02,02,03,00,04 ####
-          0044,03,02,03,03,03,00,08 ########
-          0045,03,03,03,04,03,00,10 ##########
-          0046,05,04,04,04,05,00,19 ###################
-          0047,05,05,04,05,05,00,23 #######################
-          0048,05,05,05,05,05,00,25 #########################
-          0049,06,05,05,06,06,00,31 ###############################
-          0050,06,05,05,06,06,00,31 ###############################
-          0051,06,05,05,06,06,00,31 ###############################
-          0052,06,05,05,06,06,00,31 ###############################
-          0053,06,05,05,06,06,00,31 ###############################
-          0054,07,06,06,06,06,00,38 ######################################
-          0055,06,06,06,06,06,00,36 ####################################
-          0056,07,06,06,06,06,00,38 ######################################
-          0057,06,06,06,06,06,00,36 ####################################
-          0058,06,06,06,06,06,00,36 ####################################
-          0059,06,06,06,06,06,00,36 ####################################
-          0060,07,06,06,06,07,00,41 #########################################
-          0061,07,06,06,06,07,00,41 #########################################
-          0062,07,06,06,06,07,00,41 #########################################
-          0063,07,06,06,06,07,00,41 #########################################
-          0064,07,06,06,06,07,00,41 #########################################
-          0065,07,06,06,06,07,00,41 #########################################
-          0066,07,06,06,07,07,00,43 ###########################################
-          0067,07,06,06,07,07,00,43 ###########################################
-          0068,07,06,06,07,07,00,43 ###########################################
-          0069,07,06,07,07,07,00,46 ##############################################
-          0070,07,07,07,07,07,00,49 #################################################
-          0071,07,07,07,07,07,00,49 #################################################
-          0072,07,07,07,07,07,00,49 #################################################
-          0073,07,07,07,07,07,00,49 #################################################
-          0074,07,07,07,07,07,00,49 #################################################
-          0075,07,07,07,07,07,00,49 #################################################
-          0076,07,06,07,07,07,00,46 ##############################################
-          0077,07,06,07,07,07,00,46 ##############################################
-          0078,07,06,07,07,07,00,46 ##############################################
-          0079,07,06,07,07,07,00,46 ##############################################
-          0080,07,06,07,07,07,00,46 ##############################################
-          0081,07,06,07,07,07,00,46 ##############################################
-          0082,07,06,06,07,07,00,43 ###########################################
-          0083,07,06,06,07,07,00,43 ###########################################
-          0084,07,06,07,07,07,00,46 ##############################################
-          0085,07,07,06,07,07,00,46 ##############################################
-          0086,07,07,07,07,07,00,49 #################################################
-          0087,07,07,07,07,07,00,49 #################################################
-          0088,07,07,07,07,07,00,49 #################################################
-          0089,07,07,07,07,07,00,49 #################################################
-          0090,07,07,07,07,07,00,49 #################################################
-          0091,07,07,07,07,07,00,49 #################################################
-          0092,07,07,07,07,07,00,49 #################################################
-          0093,07,07,07,07,07,00,49 #################################################
-          0094,07,07,07,07,07,00,49 #################################################
-          0095,07,06,07,07,07,00,46 ##############################################
-          0096,07,06,07,07,07,00,46 ##############################################
-          0097,07,06,07,07,07,00,46 ##############################################
-          0098,07,06,07,07,07,00,46 ##############################################
-          0099,07,06,07,07,07,00,46 ##############################################
-          0100,07,06,07,07,07,00,46 ##############################################
-          0101,07,07,07,07,07,00,49 #################################################
-          0102,07,07,07,07,07,00,49 #################################################
-          0103,07,07,07,07,07,00,49 #################################################
-          0104,07,07,07,07,07,00,49 #################################################
-          0105,07,07,07,07,07,00,49 #################################################
-          0106,07,06,07,07,07,00,46 ##############################################
-          0107,07,06,07,07,07,00,46 ##############################################
-          0108,07,06,07,07,07,00,46 ##############################################
-          0109,07,06,07,07,07,00,46 ##############################################
-          0110,07,07,07,07,07,00,49 #################################################
-          0111,07,07,07,07,07,00,49 #################################################
-          0112,07,07,07,07,07,00,49 #################################################
-          0113,07,07,07,07,07,00,49 #################################################
-          0114,07,07,07,07,07,00,49 #################################################
-          0115,07,07,07,07,07,00,49 #################################################
-          0116,07,07,07,07,07,00,49 #################################################
-          0117,07,07,07,07,07,00,49 #################################################
-          0118,07,07,07,07,07,00,49 #################################################
-          0119,07,06,07,07,07,00,46 ##############################################
-          0120,07,06,06,07,07,00,43 ###########################################
-          0121,07,06,06,07,07,00,43 ###########################################
-          0122,06,06,06,07,06,00,38 ######################################
-          0123,06,06,06,07,06,00,38 ######################################
-          0124,06,06,06,07,07,00,41 #########################################
-          0125,07,06,06,07,07,00,43 ###########################################
-          0126,07,06,06,07,07,00,43 ###########################################
-          0127,07,06,06,07,07,00,43 ###########################################
-          0128,07,07,07,07,07,00,49 #################################################
-          0129,07,07,07,07,07,00,49 #################################################
-          0130,07,07,07,07,07,00,49 #################################################
-          0131,07,07,07,07,07,00,49 #################################################
-          0132,07,07,07,07,07,00,49 #################################################
-          0133,07,07,07,07,07,00,49 #################################################
-          0134,07,07,07,07,07,00,49 #################################################
-          0135,07,07,07,07,07,00,49 #################################################
-          0136,07,07,07,07,07,00,49 #################################################
-          0137,07,07,07,07,07,00,49 #################################################
-          0138,07,07,07,07,07,00,49 #################################################
-          0139,07,07,07,07,07,00,49 #################################################
-          0140,07,07,07,07,07,00,49 #################################################
-          0141,07,07,07,07,07,00,49 #################################################
-          0142,07,07,07,07,07,00,49 #################################################
-          0143,07,07,07,07,07,00,49 #################################################
-          0144,07,07,07,07,07,00,49 #################################################
-          0145,07,07,07,07,07,00,49 #################################################
-          0146,07,07,07,07,07,00,49 #################################################
-          0147,07,07,07,07,07,00,49 #################################################
-          0148,07,07,07,07,07,00,49 #################################################
-          0149,07,07,07,07,07,00,49 #################################################
-          0150,07,07,07,07,07,00,49 #################################################
-          0151,07,07,07,07,07,00,49 #################################################
-          0152,07,07,07,07,07,00,49 #################################################
-          0153,07,07,07,07,07,00,49 #################################################
-          0154,07,07,07,07,07,00,49 #################################################
-          0155,07,07,07,07,07,00,49 #################################################
-          0156,07,07,07,07,07,00,49 #################################################
-          0157,07,07,07,07,07,00,49 #################################################
-          0158,06,06,06,06,06,00,36 ####################################
-          0159,06,06,06,06,06,00,36 ####################################
-          0160,06,06,06,06,06,00,36 ####################################
-          0161,07,06,06,06,07,00,41 #########################################
-          0162,07,07,07,07,07,00,49 #################################################
-          0163,07,07,07,07,07,00,49 #################################################
-          0164,07,07,07,07,07,00,49 #################################################
-          0165,07,07,07,07,07,00,49 #################################################
-          0166,07,07,07,07,07,00,49 #################################################
-          0167,07,07,07,07,07,00,49 #################################################
-          0168,07,07,07,07,07,00,49 #################################################
-          0169,07,07,07,07,07,00,49 #################################################
-          0170,07,07,07,07,07,00,49 #################################################
-          0171,07,07,07,07,07,00,49 #################################################
-          0172,07,07,07,07,07,00,49 #################################################
-          0173,07,07,07,07,07,00,49 #################################################
-          0174,07,07,07,07,07,00,49 #################################################
-          0175,07,07,07,07,07,00,49 #################################################
-          0176,07,07,07,07,07,00,49 #################################################
-          0177,07,07,07,07,07,00,49 #################################################
-          0178,07,07,07,07,07,00,49 #################################################
-          0179,07,07,07,07,07,00,49 #################################################
-          0180,07,07,07,07,07,00,49 #################################################
-          0181,07,07,07,07,07,00,49 #################################################
-          0182,07,07,07,07,07,00,49 #################################################
-          0183,07,07,07,07,07,00,49 #################################################
-          0184,07,07,07,07,07,00,49 #################################################
-          0185,07,07,07,07,07,00,49 #################################################
-          0186,07,07,07,07,07,00,49 #################################################
-          0187,07,07,07,07,07,00,49 #################################################
-          0188,07,07,07,07,07,00,49 #################################################
-          0189,07,07,07,07,07,00,49 #################################################
-          0190,07,07,07,07,07,00,49 #################################################
-          0191,07,07,07,07,07,00,49 #################################################
-          0192,07,07,07,07,07,00,49 #################################################
-          0193,07,07,07,07,07,00,49 #################################################
-          0194,07,07,07,07,07,00,49 #################################################
-          0195,07,07,07,07,07,00,49 #################################################
-          0196,07,07,07,07,07,00,49 #################################################
-          0197,07,07,07,07,07,00,49 #################################################
-          0198,07,07,07,07,07,00,49 #################################################
-          0199,07,07,07,07,07,00,49 #################################################
-          0200,07,07,07,07,07,00,49 #################################################
-          0201,07,07,07,07,07,00,49 #################################################
-          0202,07,07,07,07,07,00,49 #################################################
-          0203,07,07,07,07,07,00,49 #################################################
-          0204,07,07,07,07,07,00,49 #################################################
-          0205,07,07,07,07,07,00,49 #################################################
-          0206,07,07,07,07,07,00,49 #################################################
-          0207,07,07,07,07,07,00,49 #################################################
-          0208,07,07,07,07,07,00,49 #################################################
-          0209,07,07,07,07,07,00,49 #################################################
-          0210,07,07,07,07,07,00,49 #################################################
-          0211,07,07,07,07,07,00,49 #################################################
-          0212,07,07,07,07,07,00,49 #################################################
-          0213,07,07,07,07,07,00,49 #################################################
-          0214,07,07,07,07,07,00,49 #################################################
-          0215,07,07,07,07,07,00,49 #################################################
-          0216,07,07,07,07,07,00,49 #################################################
-          0217,07,07,07,07,07,00,49 #################################################
-          0218,07,07,07,07,07,00,49 #################################################
-          0219,07,07,07,07,07,00,49 #################################################
-          0220,07,07,07,07,07,00,49 #################################################
-          0221,07,07,07,07,07,00,49 #################################################
-          0222,07,07,07,07,07,00,49 #################################################
-          0223,07,07,07,07,07,00,49 #################################################
-          0224,07,07,07,07,07,00,49 #################################################
-          0225,07,07,07,07,07,00,49 #################################################
-          0226,07,07,07,07,07,00,49 #################################################
-          0227,07,07,07,07,07,00,49 #################################################
-          0228,07,07,07,07,07,00,49 #################################################
-          0229,07,07,07,07,07,00,49 #################################################
-          0230,07,07,07,07,07,00,49 #################################################
-          0231,07,07,07,07,07,00,49 #################################################
-          0232,07,07,07,07,07,00,49 #################################################
-          0233,07,07,07,07,07,00,49 #################################################
-          0234,07,07,06,07,07,00,46 ##############################################
-          0235,07,07,07,07,07,00,49 #################################################
-          0236,07,07,06,07,07,00,46 ##############################################
-          0237,07,07,06,07,07,00,46 ##############################################
-          0238,07,07,07,07,07,00,49 #################################################
-          0239,07,07,07,07,07,00,49 #################################################
-          0240,07,06,07,07,07,00,46 ##############################################
-          0241,07,06,07,07,07,00,46 ##############################################
-          0242,07,07,07,07,07,00,49 #################################################
-          0243,07,07,07,07,07,00,49 #################################################
-          0244,07,07,07,07,07,00,49 #################################################
-          0245,07,07,07,06,07,00,46 ##############################################
-          0246,07,07,07,07,07,00,49 #################################################
-          0247,07,07,06,07,07,00,46 ##############################################
-          0248,07,07,06,06,07,00,43 ###########################################
-          0249,07,07,07,06,07,00,46 ##############################################
-          0250,07,07,07,07,07,00,49 #################################################
-          0251,07,07,07,06,07,00,46 ##############################################
-          0252,07,07,07,06,07,00,46 ##############################################
-          0253,07,07,07,07,07,00,49 #################################################
-          0254,07,07,07,06,07,00,46 ##############################################
-          0255,07,07,07,06,07,00,46 ##############################################
-          0256,07,07,07,07,07,00,49 #################################################
-          0257,07,07,07,07,07,00,49 #################################################
-          0258,07,06,06,07,07,00,43 ###########################################
-          0259,07,06,06,07,07,00,43 ###########################################
-          0260,07,06,06,07,07,00,43 ###########################################
-          0261,07,06,06,07,07,00,43 ###########################################
-          0262,07,06,06,06,07,00,41 #########################################
-          0263,07,06,06,06,07,00,41 #########################################
-          0264,07,06,06,06,07,00,41 #########################################
-          0265,07,06,06,07,07,00,43 ###########################################
-          0266,07,06,06,07,07,00,43 ###########################################
-          0267,07,06,06,06,07,00,41 #########################################
-          0268,07,06,06,06,07,00,41 #########################################
-          0269,07,06,07,06,07,00,43 ###########################################
-          0270,07,06,07,06,07,00,43 ###########################################
-          0271,07,06,07,06,07,00,43 ###########################################
-          0272,07,06,07,06,07,00,43 ###########################################
-          0273,07,06,06,06,07,00,41 #########################################
-          0274,07,06,06,06,07,00,41 #########################################
-          0275,07,06,06,06,07,00,41 #########################################
-          0276,07,06,06,07,07,00,43 ###########################################
-          0277,07,06,06,07,07,00,43 ###########################################
-          0278,07,06,06,06,07,00,41 #########################################
-          0279,07,06,06,06,07,00,41 #########################################
-          0280,07,06,06,07,07,00,43 ###########################################
-          0281,07,06,06,06,07,00,41 #########################################
-          0282,07,06,06,07,07,00,43 ###########################################
-          0283,07,06,06,07,07,00,43 ###########################################
-          0284,07,06,06,07,07,00,43 ###########################################
-          0285,07,06,06,06,07,00,41 #########################################
-          0286,06,06,06,06,07,00,38 ######################################
-          0287,06,06,06,06,07,00,38 ######################################
-          0288,07,06,06,06,07,00,41 #########################################
-          0289,07,06,06,06,07,00,41 #########################################
-          0290,07,06,06,07,07,00,43 ###########################################
-          0291,07,06,06,07,07,00,43 ###########################################
-          0292,07,06,07,07,07,00,46 ##############################################
-          0293,07,06,07,07,07,00,46 ##############################################
-          0294,07,06,06,07,07,00,43 ###########################################
-          0295,07,06,06,07,07,00,43 ###########################################
-          0296,07,06,06,07,07,00,43 ###########################################
-          0297,07,06,06,07,07,00,43 ###########################################
-          0298,07,06,06,07,06,00,41 #########################################
-          0299,07,06,06,07,06,00,41 #########################################
-          0300,07,06,06,06,07,00,41 #########################################
-          0301,07,06,06,07,07,00,43 ###########################################
-          0302,07,06,06,06,07,00,41 #########################################
-          0303,07,06,06,07,07,00,43 ###########################################
-          0304,07,06,06,07,07,00,43 ###########################################
-          0305,07,06,06,07,07,00,43 ###########################################
-          0306,07,06,06,07,06,00,41 #########################################
-          0307,07,06,06,06,06,00,38 ######################################
-          0308,06,06,06,06,06,00,36 ####################################
-          0309,06,06,06,06,06,00,36 ####################################
-          0310,06,06,06,06,06,00,36 ####################################
-          0311,06,06,06,06,06,00,36 ####################################
-          0312,06,06,06,06,06,00,36 ####################################
-          0313,06,06,06,06,06,00,36 ####################################
-          0314,07,06,06,06,06,00,38 ######################################
-          0315,07,06,06,06,06,00,38 ######################################
-          0316,07,06,06,06,06,00,38 ######################################
-          0317,06,06,06,06,06,00,36 ####################################
-          0318,06,06,06,06,06,00,36 ####################################
-          0319,06,06,06,06,06,00,36 ####################################
-          0320,06,06,06,06,06,00,36 ####################################
-          0321,06,06,06,06,06,00,36 ####################################
-          0322,06,06,06,06,06,00,36 ####################################
-          0323,06,06,06,06,06,00,36 ####################################
-          0324,06,06,06,06,06,00,36 ####################################
-          0325,06,06,06,06,06,00,36 ####################################
-          0326,06,06,06,06,06,00,36 ####################################
-          0327,06,06,06,06,06,00,36 ####################################
-          0328,06,06,06,06,06,00,36 ####################################
-          0329,06,06,06,06,06,00,36 ####################################
-          0330,06,06,06,06,06,00,36 ####################################
-          0331,06,06,06,06,06,00,36 ####################################
-          0332,06,06,06,06,06,00,36 ####################################
-          0333,06,06,06,06,06,00,36 ####################################
-          0334,06,06,06,06,06,00,36 ####################################
-          0335,06,06,06,06,06,00,36 ####################################
-          0336,06,06,06,06,06,00,36 ####################################
-          0337,06,06,06,06,06,00,36 ####################################
-          0338,06,06,06,06,06,00,36 ####################################
-          0339,06,06,06,06,06,00,36 ####################################
-          0340,06,06,06,06,06,00,36 ####################################
-          0341,06,06,06,06,06,00,36 ####################################
-          0342,06,06,06,06,06,00,36 ####################################
-          0343,06,06,06,06,06,00,36 ####################################
-          0344,06,06,06,06,06,00,36 ####################################
-          0345,06,06,06,06,06,00,36 ####################################
-          0346,06,06,06,06,06,00,36 ####################################
-          0347,06,06,06,06,06,00,36 ####################################
-          0348,06,06,06,06,06,00,36 ####################################
-          0349,06,06,06,06,06,00,36 ####################################
-          0350,06,06,06,06,06,00,36 ####################################
-          0351,06,06,06,06,06,00,36 ####################################
-          0352,06,06,06,06,06,00,36 ####################################
-          0353,06,06,06,06,06,00,36 ####################################
-          0354,06,06,06,06,06,00,36 ####################################
-          0355,06,06,06,06,06,00,36 ####################################
-          0356,06,06,06,06,06,00,36 ####################################
-          0357,06,06,06,06,06,00,36 ####################################
-          0358,06,06,06,06,06,00,36 ####################################
-          0359,06,06,06,06,06,00,36 ####################################
-          0360,06,06,06,06,06,00,36 ####################################
-          0361,06,06,06,06,06,00,36 ####################################
-          0362,06,06,06,06,06,00,36 ####################################
-          0363,06,06,06,06,06,00,36 ####################################
-          0364,06,06,06,06,06,00,36 ####################################
-          0365,06,06,06,06,06,00,36 ####################################
-          0366,06,06,06,06,06,00,36 ####################################
-          0367,06,06,06,06,06,00,36 ####################################
-          0368,06,06,06,06,06,00,36 ####################################
-          0369,06,06,06,06,06,00,36 ####################################
-          0370,06,06,06,06,06,00,36 ####################################
-          0371,06,06,06,06,06,00,36 ####################################
-          0372,06,06,06,06,06,00,36 ####################################
-          0373,06,06,06,06,06,00,36 ####################################
-          0374,06,06,06,06,06,00,36 ####################################
-          0375,06,06,06,06,06,00,36 ####################################
-          0376,07,06,06,06,06,00,38 ######################################
-          0377,07,06,06,06,06,00,38 ######################################
-          0378,07,06,06,06,06,00,38 ######################################
-          0379,07,06,06,06,06,00,38 ######################################
-          0380,07,06,06,06,06,00,38 ######################################
-          0381,07,06,06,06,06,00,38 ######################################
-          0382,07,06,06,06,06,00,38 ######################################
-          0383,06,06,06,06,07,00,38 ######################################
-          0384,06,06,06,06,07,00,38 ######################################
-          0385,06,06,06,06,07,00,38 ######################################
-          0386,06,06,06,06,07,00,38 ######################################
-          0387,06,06,06,06,07,00,38 ######################################
-          0388,06,06,06,06,07,00,38 ######################################
-          0389,06,06,06,06,07,00,38 ######################################
-          0390,06,06,06,06,06,00,36 ####################################
-          0391,06,06,06,06,06,00,36 ####################################
-          0392,06,06,06,06,06,00,36 ####################################
-          0393,06,06,06,06,06,00,36 ####################################
-          0394,06,06,06,06,06,00,36 ####################################
-          0395,06,06,06,06,06,00,36 ####################################
-          0396,06,06,06,06,06,00,36 ####################################
-          0397,06,06,06,06,06,00,36 ####################################
-          0398,06,06,06,06,06,00,36 ####################################
-          0399,06,06,06,06,06,00,36 ####################################
-          0400,06,06,06,06,06,00,36 ####################################
-          0401,06,06,06,06,06,00,36 ####################################
-          0402,06,06,06,06,06,00,36 ####################################
-          0403,06,06,06,06,06,00,36 ####################################
-          0404,06,06,06,06,06,00,36 ####################################
-          0405,06,06,06,06,06,00,36 ####################################
-          0406,06,06,06,06,06,00,36 ####################################
-          0407,06,06,06,06,06,00,36 ####################################
-          0408,06,06,06,06,06,00,36 ####################################
-          0409,06,06,06,06,06,00,36 ####################################
-          0410,06,06,06,06,06,00,36 ####################################
-          0411,06,06,06,06,06,00,36 ####################################
-          0412,06,06,06,06,06,00,36 ####################################
-          0413,06,06,06,06,06,00,36 ####################################
-          0414,06,06,06,06,06,00,36 ####################################
-          0415,06,06,06,06,06,00,36 ####################################
-          0416,06,06,06,06,06,00,36 ####################################
-          0417,06,06,06,06,06,00,36 ####################################
-          0418,06,06,06,06,06,00,36 ####################################
-          0419,06,06,06,06,06,00,36 ####################################
-          0420,06,06,06,06,06,00,36 ####################################
-          0421,06,06,06,06,06,00,36 ####################################
-          0422,06,06,06,06,06,00,36 ####################################
-          0423,06,06,06,06,06,00,36 ####################################
-          0424,06,06,06,06,06,00,36 ####################################
-          0425,06,06,06,06,06,00,36 ####################################
-          0426,06,06,06,06,06,00,36 ####################################
-          0427,06,06,06,06,06,00,36 ####################################
-          0428,06,06,06,06,06,00,36 ####################################
-          0429,06,06,06,06,06,00,36 ####################################
-          0430,06,06,05,06,06,00,33 #################################
-          0431,06,05,05,06,06,00,31 ###############################
-          0432,06,05,05,06,06,00,31 ###############################
-          0433,06,05,05,06,06,00,31 ###############################
-          0434,06,05,05,06,06,00,31 ###############################
-          0435,06,05,05,06,06,00,31 ###############################
-          0436,06,05,05,06,06,00,31 ###############################
-          0437,06,05,05,06,06,00,31 ###############################
-          0438,06,05,05,06,06,00,31 ###############################
-          0439,06,05,05,06,06,00,31 ###############################
-          0440,06,05,05,06,06,00,31 ###############################
-          0441,06,05,05,06,06,00,31 ###############################
-          0442,06,05,05,06,06,00,31 ###############################
-          0443,06,05,05,06,06,00,31 ###############################
-          0444,06,05,05,05,06,00,29 #############################
-          0445,06,05,05,05,06,00,29 #############################
-          0446,05,05,05,05,06,00,27 ###########################
-          0447,05,05,05,05,06,00,27 ###########################
-          0448,05,05,05,06,06,00,29 #############################
-          0449,05,05,05,05,05,00,25 #########################
-          0450,05,05,05,05,05,00,25 #########################
-          0451,05,05,05,05,05,00,25 #########################
-          0452,05,05,05,05,05,00,25 #########################
-          0453,05,05,05,05,05,00,25 #########################
-          0454,05,05,05,05,05,00,25 #########################
-          0455,05,05,05,05,05,00,25 #########################
-          0456,05,05,05,05,05,00,25 #########################
-          0457,05,05,05,05,05,00,25 #########################
-          0458,05,05,05,06,05,00,27 ###########################
-          0459,05,05,05,06,05,00,27 ###########################
-          0460,05,05,05,05,05,00,25 #########################
-          0461,05,05,05,05,05,00,25 #########################
-          0462,05,05,05,05,05,00,25 #########################
-          0463,05,05,05,05,05,00,25 #########################
-          0464,05,05,05,05,05,00,25 #########################
-          0465,05,05,05,05,05,00,25 #########################
-          0466,06,05,05,05,05,00,27 ###########################
-          0467,05,05,05,05,05,00,25 #########################
-          0468,06,05,05,05,05,00,27 ###########################
-          0469,06,05,05,05,05,00,27 ###########################
-          0470,06,05,05,06,05,00,29 #############################
-          0471,06,05,05,06,05,00,29 #############################
-          0472,05,05,05,06,05,00,27 ###########################
-          0473,05,05,05,06,05,00,27 ###########################
-          0474,05,05,05,05,05,00,25 #########################
-          0475,05,05,05,05,05,00,25 #########################
-          0476,05,05,05,05,05,00,25 #########################
-          0477,05,05,05,05,05,00,25 #########################
-          0478,05,05,05,05,05,00,25 #########################
-          0479,05,05,05,05,05,00,25 #########################
-          0480,05,05,05,05,05,00,25 #########################
-          0481,05,05,05,05,05,00,25 #########################
-          0482,05,05,05,05,05,00,25 #########################
-          0483,05,05,05,05,05,00,25 #########################
-          0484,05,05,05,05,05,00,25 #########################
-          0485,05,05,05,05,05,00,25 #########################
-          0486,05,05,05,05,05,00,25 #########################
-          0487,05,05,05,05,05,00,25 #########################
-          0488,05,05,05,05,05,00,25 #########################
-          0489,05,05,05,05,05,00,25 #########################
-          0490,05,05,05,05,05,00,25 #########################
-          0491,05,05,05,05,05,00,25 #########################
-          0492,05,05,05,05,05,00,25 #########################
-          0493,05,05,05,05,05,00,25 #########################
-          0494,05,05,05,05,05,00,25 #########################
-          0495,05,05,05,05,05,00,25 #########################
-          0496,05,04,05,05,05,00,23 #######################
-          0497,05,04,05,05,05,00,23 #######################
-          0498,05,04,05,05,05,00,23 #######################
-          0499,05,04,05,05,05,00,23 #######################
-          0500,05,04,05,05,05,00,23 #######################
-          0501,05,05,05,05,05,00,25 #########################
-          0502,05,05,05,05,05,00,25 #########################
-          0503,05,05,05,05,05,00,25 #########################
-          0504,05,05,05,05,05,00,25 #########################
-          0505,05,05,05,05,05,00,25 #########################
-          0506,05,05,05,05,05,00,25 #########################
-          0507,05,05,05,05,05,00,25 #########################
-          0508,05,05,05,05,05,00,25 #########################
-          0509,05,05,05,05,05,00,25 #########################
-          0510,05,05,05,05,05,00,25 #########################
-          0511,05,05,05,05,05,00,25 #########################
-          0512,05,05,05,05,05,00,25 #########################
-          0513,05,05,05,05,05,00,25 #########################
-          0514,05,05,05,05,05,00,25 #########################
-          0515,05,05,05,05,05,00,25 #########################
-          0516,05,05,05,05,05,00,25 #########################
-          0517,05,05,05,05,05,00,25 #########################
-          0518,05,05,05,05,05,00,25 #########################
-          0519,05,05,05,05,05,00,25 #########################
-          0520,05,05,05,05,05,00,25 #########################
-          0521,05,04,04,05,05,00,21 #####################
-          0522,05,04,04,05,05,00,21 #####################
-          0523,05,04,04,05,05,00,21 #####################
-          0524,05,04,04,05,05,00,21 #####################
-          0525,05,05,04,05,05,00,23 #######################
-          0526,05,05,04,05,05,00,23 #######################
-          0527,05,05,04,05,05,00,23 #######################
-          0528,05,05,04,05,05,00,23 #######################
-          0529,05,05,04,05,05,00,23 #######################
-          0530,05,05,04,05,05,00,23 #######################
-          0531,05,05,04,05,05,00,23 #######################
-          0532,05,04,04,05,05,00,21 #####################
-          0533,05,04,04,05,05,00,21 #####################
-          0534,05,04,04,05,05,00,21 #####################
-          0535,05,04,04,05,05,00,21 #####################
-          0536,05,04,04,05,05,00,21 #####################
-          0537,05,04,04,05,05,00,21 #####################
-          0538,05,04,04,05,05,00,21 #####################
-          0539,05,04,04,05,05,00,21 #####################
-          0540,05,04,04,05,05,00,21 #####################
-          0541,05,04,04,05,05,00,21 #####################
-          0542,05,04,04,05,05,00,21 #####################
-          0543,05,04,04,05,05,00,21 #####################
-          0544,05,04,04,05,05,00,21 #####################
-          0545,05,04,04,05,05,00,21 #####################
-          0546,05,04,04,05,04,00,19 ###################
-          0547,04,04,04,05,04,00,17 #################
-          0548,04,04,04,05,04,00,17 #################
-          0549,04,04,04,04,04,00,16 ################
-          0550,04,04,04,05,04,00,17 #################
-          0551,04,04,04,05,05,00,19 ###################
-          0552,05,04,04,05,04,00,19 ###################
-          0553,05,04,04,04,04,00,17 #################
-          0554,05,04,04,04,04,00,17 #################
-          0555,04,04,04,04,04,00,16 ################
-          0556,04,04,04,04,04,00,16 ################
-          0557,04,04,04,04,04,00,16 ################
-          0558,04,04,04,04,04,00,16 ################
-          0559,04,04,04,04,04,00,16 ################
-          0560,04,04,04,04,04,00,16 ################
-          0561,04,04,04,04,04,00,16 ################
-          0562,04,04,04,04,04,00,16 ################
-          0563,04,04,04,04,04,00,16 ################
-          0564,04,04,04,04,04,00,16 ################
-          0565,04,04,04,04,04,00,16 ################
-          0566,04,04,04,04,04,00,16 ################
-          0567,04,04,04,04,04,00,16 ################
-          0568,04,04,04,04,04,00,16 ################
-          0569,04,04,04,04,04,00,16 ################
-          0570,04,04,04,04,04,00,16 ################
-          0571,04,04,04,04,05,00,17 #################
-          0572,04,04,04,04,05,00,17 #################
-          0573,04,04,04,04,04,00,16 ################
-          0574,04,04,04,04,04,00,16 ################
-          0575,04,04,04,04,04,00,16 ################
-          0576,04,04,04,04,04,00,16 ################
-          0577,04,04,04,04,04,00,16 ################
-          0578,04,04,04,04,04,00,16 ################
-          0579,04,04,04,04,04,00,16 ################
-          0580,04,04,04,04,04,00,16 ################
-          0581,04,04,04,04,04,00,16 ################
-          0582,04,04,04,04,04,00,16 ################
-          0583,04,04,04,04,04,00,16 ################
-          0584,04,04,04,04,04,00,16 ################
-          0585,04,04,04,04,04,00,16 ################
-          0586,04,04,04,04,04,00,16 ################
-          0587,04,04,04,04,04,00,16 ################
-          0588,04,04,04,04,04,00,16 ################
-          0589,04,04,04,04,04,00,16 ################
-          0590,04,04,04,04,04,00,16 ################
-          0591,04,04,04,04,04,00,16 ################
-          0592,04,04,04,04,04,00,16 ################
-          0593,04,04,04,04,04,00,16 ################
-          0594,04,04,04,04,04,00,16 ################
-          0595,04,04,04,04,04,00,16 ################
-          0596,04,04,04,04,04,00,16 ################
-          0597,04,04,04,04,04,00,16 ################
-          0598,04,04,04,04,04,00,16 ################
-          0599,04,04,04,04,04,00,16 ################
-          0600,04,04,04,04,04,00,16 ################
-          0601,04,04,04,04,04,00,16 ################
-          0602,04,04,04,04,04,00,16 ################
-          0603,04,04,04,04,04,00,16 ################
-          0604,04,04,04,04,04,00,16 ################
-          0605,04,04,04,04,04,00,16 ################
-          0606,04,04,04,04,04,00,16 ################
-          0607,04,04,04,04,04,00,16 ################
-          0608,04,04,04,04,04,00,16 ################
-          0609,04,04,04,04,04,00,16 ################
-          0610,04,04,04,04,04,00,16 ################
-          0611,04,04,04,04,04,00,16 ################
-          0612,04,04,04,04,04,00,16 ################
-          0613,04,04,04,04,04,00,16 ################
-          0614,04,04,04,04,04,00,16 ################
-          0615,04,04,04,04,04,00,16 ################
-          0616,04,04,04,04,04,00,16 ################
-          0617,04,04,04,04,04,00,16 ################
-          0618,04,04,04,04,04,00,16 ################
-          0619,04,04,04,04,04,00,16 ################
-          0620,04,04,04,04,04,00,16 ################
-          0621,04,04,04,04,04,00,16 ################
-          0622,04,04,04,04,04,00,16 ################
-          0623,04,04,04,04,04,00,16 ################
-          0624,04,04,04,04,04,00,16 ################
-          0625,04,04,04,04,04,00,16 ################
-          0626,04,04,04,04,04,00,16 ################
-          0627,04,04,04,04,04,00,16 ################
-          0628,04,04,04,04,04,00,16 ################
-          0629,04,04,04,04,04,00,16 ################
-          0630,04,04,04,04,04,00,16 ################
-          0631,04,04,04,04,04,00,16 ################
-          0632,04,04,04,04,04,00,16 ################
-          0633,04,04,04,04,04,00,16 ################
-          0634,04,04,04,04,04,00,16 ################
-          0635,04,04,03,04,04,00,14 ##############
-          0636,04,04,03,04,04,00,14 ##############
-          0637,04,04,03,03,04,00,13 #############
-          0638,03,03,03,03,04,00,10 ##########
-          0639,03,03,03,03,04,00,10 ##########
-          0640,03,03,02,03,04,00,09 #########
-          0641,03,03,02,02,03,00,07 #######
-          0642,03,03,02,02,03,00,07 #######
-          0643,03,03,02,02,03,00,07 #######
-          0644,03,03,02,03,03,00,08 ########
-          0645,03,03,02,03,03,00,08 ########
-          0646,03,03,03,03,03,00,09 #########
-          0647,03,03,03,04,03,00,10 ##########
-          0648,03,03,03,04,03,00,10 ##########
-          0649,04,03,03,04,04,00,13 #############
-          0650,04,03,03,04,04,00,13 #############
-          0651,04,03,03,04,04,00,13 #############
-          0652,04,03,03,04,04,00,13 #############
-          0653,04,03,03,04,04,00,13 #############
-          0654,04,03,03,04,04,00,13 #############
-          0655,04,03,03,04,04,00,13 #############
-          0656,03,03,03,03,03,00,09 #########
-          0657,03,03,03,03,03,00,09 #########
-          0658,03,03,02,03,03,00,08 ########
-          0659,03,03,02,03,03,00,08 ########
-          0660,03,03,02,03,03,00,08 ########
-          0661,03,02,02,02,03,00,06 ######
-          0662,03,02,02,02,02,00,05 #####
-          0663,03,02,02,02,02,00,05 #####
-          0664,02,02,02,02,02,00,04 ####
-          0665,02,01,02,02,02,00,03 ###
-          0666,02,02,02,02,03,00,05 #####
-          0667,02,01,02,02,03,00,04 ####
-          0668,03,01,02,03,03,00,06 ######
-          0669,03,01,02,02,03,00,05 #####
-          0670,02,01,02,02,02,00,03 ###
-          0671,02,01,02,02,02,00,03 ###
-          0672,02,01,02,02,02,00,03 ###
-          0673,02,01,02,01,02,00,02 ##
-          0674,02,01,02,02,02,00,03 ###
-          0675,02,01,02,02,03,00,04 ####
-          0676,03,02,02,02,03,00,06 ######
-          0677,03,02,02,03,03,00,07 #######
-          0678,03,02,02,03,03,00,07 #######
-          0679,02,02,02,03,03,00,06 ######
-          0680,02,02,02,03,03,00,06 ######
-          0681,02,02,02,03,03,00,06 ######
-          0682,02,01,02,04,03,00,06 ######
-          0683,02,01,02,04,03,00,06 ######
-          0684,02,01,02,04,03,00,06 ######
-          0685,02,01,02,04,03,00,06 ######
-          0686,03,01,02,04,03,00,07 #######
-          0687,03,02,03,04,03,00,09 #########
-          0688,03,02,03,04,03,00,09 #########
-          0689,03,02,03,04,03,00,09 #########
-          0690,03,02,03,04,03,00,09 #########
-          0691,04,02,03,04,04,00,12 ############
-          0692,04,02,03,04,04,00,12 ############
-          0693,03,02,03,04,04,00,10 ##########
-          0694,04,02,03,04,04,00,12 ############
-          0695,04,02,03,04,04,00,12 ############
-          0696,04,02,03,04,04,00,12 ############
-          0697,04,02,03,04,04,00,12 ############
-          0698,04,02,03,04,04,00,12 ############
-          0699,04,02,03,04,04,00,12 ############
-          0700,04,02,03,04,04,00,12 ############
-          0701,04,03,03,04,04,00,13 #############
-          0702,04,02,03,04,04,00,12 ############
-          0703,04,02,04,04,04,00,13 #############
-          0704,04,02,04,04,04,00,13 #############
-          0705,04,02,04,04,04,00,13 #############
-          0706,04,02,04,04,04,00,13 #############
-          0707,04,03,04,04,04,00,14 ##############
-          0708,04,03,04,04,04,00,14 ##############
-          0709,04,03,04,04,04,00,14 ##############
-          0710,04,03,04,04,04,00,14 ##############
-          0711,04,03,04,04,04,00,14 ##############
-          0712,04,03,04,04,04,00,14 ##############
-          0713,04,03,04,04,04,00,14 ##############
-          0714,04,03,04,04,04,00,14 ##############
-          0715,04,03,04,04,04,00,14 ##############
-          0716,04,03,04,04,04,00,14 ##############
-          0717,04,02,04,04,04,00,13 #############
-          0718,04,02,04,04,04,00,13 #############
-          0719,04,02,04,04,04,00,13 #############
-          0720,04,02,04,04,04,00,13 #############
-          0721,03,01,04,04,04,00,11 ###########
-          0722,03,01,03,04,04,00,10 ##########
-          0723,03,01,04,04,04,00,11 ###########
-          0724,02,01,04,04,04,00,10 ##########
-          0725,02,01,04,04,04,00,10 ##########
-          0726,02,01,04,04,04,00,10 ##########
-          0727,02,02,04,04,04,00,11 ###########
-          0728,02,02,04,04,04,00,11 ###########
-          0729,02,02,03,04,03,00,08 ########
-          0730,02,01,03,04,03,00,07 #######
-          0731,02,02,03,04,03,00,08 ########
-          0732,02,02,03,04,03,00,08 ########
-          0733,02,02,03,04,03,00,08 ########
-          0734,02,02,03,04,03,00,08 ########
-          0735,02,02,03,04,03,00,08 ########
-          0736,02,03,03,04,03,00,09 #########
-          0737,02,03,03,04,03,00,09 #########
-          0738,02,03,03,04,03,00,09 #########
-          0739,02,03,03,04,03,00,09 #########
-          0740,02,03,03,04,03,00,09 #########
-          0741,02,03,03,04,03,00,09 #########
-          0742,02,04,03,03,03,00,09 #########
-          0743,02,03,03,03,03,00,08 ########
-          0744,02,04,03,03,03,00,09 #########
-          0745,02,04,03,03,03,00,09 #########
-          0746,02,04,02,03,03,00,08 ########
-          0747,02,04,02,03,03,00,08 ########
-          0748,02,04,02,02,04,00,08 ########
-          0749,02,04,02,02,04,00,08 ########
-          0750,03,04,02,02,04,00,09 #########
-          0751,03,04,02,02,04,00,09 #########
-          0752,03,04,02,02,04,00,09 #########
-          0753,03,04,02,02,04,00,09 #########
-          0754,04,04,02,02,04,00,11 ###########
-          0755,04,04,02,02,04,00,11 ###########
-          0756,04,04,02,02,04,00,11 ###########
-          0757,04,04,02,02,04,00,11 ###########
-          0758,04,04,02,02,04,00,11 ###########
-          0759,04,04,03,02,04,00,12 ############
-          0760,04,05,03,02,04,00,14 ##############
-          0761,04,04,03,03,04,00,13 #############
-          0762,04,04,03,03,05,00,15 ###############
-          0763,04,04,03,03,05,00,15 ###############
-          0764,04,05,04,04,05,00,19 ###################
-          0765,04,05,04,04,05,00,19 ###################
-          0766,04,05,04,04,05,00,19 ###################
-          0767,04,05,04,04,05,00,19 ###################
-          0768,04,05,04,04,05,00,19 ###################
-          0769,04,05,04,04,05,00,19 ###################
-          0770,04,05,04,04,05,00,19 ###################
-          0771,04,05,04,04,05,00,19 ###################
-          0772,05,05,04,04,05,00,21 #####################
-          0773,05,05,04,04,05,00,21 #####################
-          0774,05,05,04,04,05,00,21 #####################
-          0775,05,05,05,04,05,00,23 #######################
-          0776,05,05,05,04,05,00,23 #######################
-          0777,05,05,05,05,05,00,25 #########################
-          0778,05,05,05,05,05,00,25 #########################
-          0779,05,05,05,05,05,00,25 #########################
-          0780,05,05,05,05,05,00,25 #########################
-          0781,05,05,05,05,05,00,25 #########################
-          0782,05,05,05,05,05,00,25 #########################
-          0783,05,05,05,05,05,00,25 #########################
-          0784,05,05,05,05,05,00,25 #########################
-          0785,05,05,05,05,05,00,25 #########################
-          0786,05,05,05,05,05,00,25 #########################
-          0787,05,05,05,05,05,00,25 #########################
-          0788,05,05,05,05,05,00,25 #########################
-          0789,05,05,05,05,05,00,25 #########################
-          0790,05,05,05,05,05,00,25 #########################
-          0791,05,05,05,05,05,00,25 #########################
-          0792,05,05,05,05,05,00,25 #########################
-          0793,05,05,05,05,05,00,25 #########################
-          0794,05,05,05,05,05,00,25 #########################
-          0795,05,05,05,05,05,00,25 #########################
-          0796,05,05,05,05,06,00,27 ###########################
-          0797,05,05,05,05,06,00,27 ###########################
-          0798,05,05,05,05,06,00,27 ###########################
-          0799,05,05,05,05,06,00,27 ###########################
-          0800,05,05,05,05,06,00,27 ###########################
-          0801,06,05,05,06,06,00,31 ###############################
-          0802,06,05,06,06,06,00,33 #################################
-          0803,06,05,05,06,06,00,31 ###############################
-          0804,06,05,06,06,06,00,33 #################################
-          0805,06,05,06,06,06,00,33 #################################
-          0806,06,05,06,06,06,00,33 #################################
-          0807,06,05,06,06,06,00,33 #################################
-          0808,06,06,06,06,06,00,36 ####################################
-          0809,06,06,06,06,06,00,36 ####################################
-          0810,06,06,06,06,06,00,36 ####################################
-          0811,06,06,06,06,06,00,36 ####################################
-          0812,06,06,06,06,06,00,36 ####################################
-          0813,06,05,06,06,06,00,33 #################################
-          0814,06,06,06,06,06,00,36 ####################################
-          0815,06,06,06,06,06,00,36 ####################################
-          0816,06,06,06,06,06,00,36 ####################################
-          0817,06,06,06,06,06,00,36 ####################################
-          0818,06,06,06,06,06,00,36 ####################################
-          0819,06,06,06,06,06,00,36 ####################################
-          0820,06,06,06,06,06,00,36 ####################################
-          0821,06,05,06,06,06,00,33 #################################
-          0822,06,06,06,06,06,00,36 ####################################
-          0823,06,05,06,06,06,00,33 #################################
-          0824,06,05,05,06,06,00,31 ###############################
-          0825,06,05,05,06,06,00,31 ###############################
-          0826,06,06,05,06,06,00,33 #################################
-          0827,06,06,06,06,06,00,36 ####################################
-          0828,06,06,06,06,06,00,36 ####################################
-          0829,06,06,06,06,06,00,36 ####################################
-          0830,06,06,06,06,06,00,36 ####################################
-          0831,06,06,06,06,06,00,36 ####################################
-          0832,06,06,06,06,06,00,36 ####################################
-          0833,06,06,06,06,06,00,36 ####################################
-          0834,06,06,06,06,06,00,36 ####################################
-          0835,06,06,06,06,06,00,36 ####################################
-          0836,06,06,06,06,06,00,36 ####################################
-          0837,06,06,06,06,06,00,36 ####################################
-          0838,06,06,06,06,06,00,36 ####################################
-          0839,06,06,06,06,06,00,36 ####################################
-          0840,06,06,06,06,06,00,36 ####################################
-          0841,06,06,06,06,06,00,36 ####################################
-          0842,06,06,06,06,06,00,36 ####################################
-          0843,06,06,06,06,06,00,36 ####################################
-          0844,06,06,06,06,06,00,36 ####################################
-          0845,06,06,06,06,06,00,36 ####################################
-          0846,06,06,06,06,06,00,36 ####################################
-          0847,06,06,06,06,06,00,36 ####################################
-          0848,06,06,06,06,06,00,36 ####################################
-          0849,06,06,06,06,06,00,36 ####################################
-          0850,06,06,06,06,06,00,36 ####################################
-          0851,06,06,06,06,06,00,36 ####################################
-          0852,06,06,06,06,06,00,36 ####################################
-          0853,06,06,06,06,06,00,36 ####################################
-          0854,06,06,06,06,06,00,36 ####################################
-          0855,06,06,06,06,06,00,36 ####################################
-          0856,06,05,06,06,06,00,33 #################################
-          0857,06,05,06,06,06,00,33 #################################
-          0858,06,05,05,06,06,00,31 ###############################
-          0859,06,05,05,06,06,00,31 ###############################
-          0860,06,05,05,06,06,00,31 ###############################
-          0861,06,05,05,06,06,00,31 ###############################
-          0862,06,05,05,06,06,00,31 ###############################
-          0863,06,05,06,06,06,00,33 #################################
-          0864,06,06,06,06,06,00,36 ####################################
-          0865,06,06,06,06,06,00,36 ####################################
-          0866,06,06,06,06,06,00,36 ####################################
-          0867,06,06,06,06,06,00,36 ####################################
-          0868,06,06,06,06,06,00,36 ####################################
-          0869,06,06,06,06,06,00,36 ####################################
-          0870,06,06,06,06,06,00,36 ####################################
-          0871,06,06,06,06,06,00,36 ####################################
-          0872,06,06,06,06,06,00,36 ####################################
-          0873,06,06,06,06,06,00,36 ####################################
-          0874,06,06,06,06,06,00,36 ####################################
-          0875,06,06,06,06,06,00,36 ####################################
-          0876,06,06,06,06,06,00,36 ####################################
-          0877,06,06,06,06,06,00,36 ####################################
-          0878,06,06,06,06,06,00,36 ####################################
-          0879,06,06,06,06,06,00,36 ####################################
-          0880,06,06,06,06,06,00,36 ####################################
-          0881,06,06,06,06,06,00,36 ####################################
-          0882,06,06,06,06,06,00,36 ####################################
-          0883,06,06,06,06,06,00,36 ####################################
-          0884,06,06,06,06,06,00,36 ####################################
-          0885,06,06,06,06,06,00,36 ####################################
-          0886,06,06,06,06,06,00,36 ####################################
-          0887,06,06,06,06,06,00,36 ####################################
-          0888,06,06,06,06,06,00,36 ####################################
-          0889,06,06,06,06,06,00,36 ####################################
-          0890,06,06,06,06,07,00,38 ######################################
-          0891,06,06,06,06,06,00,36 ####################################
-          0892,06,06,06,06,06,00,36 ####################################
-          0893,06,06,06,06,06,00,36 ####################################
-          0894,06,06,06,06,06,00,36 ####################################
-          0895,06,06,06,06,06,00,36 ####################################
-          0896,06,06,06,06,07,00,38 ######################################
-          0897,06,06,06,06,07,00,38 ######################################
-          0898,06,06,06,06,07,00,38 ######################################
-          0899,06,06,06,06,06,00,36 ####################################
-          0900,06,06,06,06,07,00,38 ######################################
-          0901,07,06,06,06,07,00,41 #########################################
-          0902,06,06,06,06,06,00,36 ####################################
-          0903,07,06,06,06,06,00,38 ######################################
-          0904,07,06,06,06,07,00,41 #########################################
-          0905,07,06,06,06,06,00,38 ######################################
-          0906,07,06,06,06,06,00,38 ######################################
-          0907,07,06,06,06,07,00,41 #########################################
-          0908,07,06,06,06,07,00,41 #########################################
-          0909,06,06,06,06,07,00,38 ######################################
-          0910,06,06,06,06,06,00,36 ####################################
-          0911,06,06,06,06,06,00,36 ####################################
-          0912,06,06,06,06,06,00,36 ####################################
-          0913,06,06,06,06,06,00,36 ####################################
-          0914,06,06,06,06,06,00,36 ####################################
-          0915,06,06,06,06,06,00,36 ####################################
-          0916,06,06,06,06,06,00,36 ####################################
-
-       The mean-square value in column 8 determines the length of the hash line that follows when option -h is selected.   Lower
-       mean-square  values  indicate lower data handling capacity for that carrier frequency while higher values indicate higher
-       data handling capacity.  Mean-square values can range from 0 through 49.  For example, the distinct  parabolic  dip  near
-       offset  41 indicates reduced data capacity at that frequency.  There is another near offset 673.  The actual carrier fre‐
-       quencies cannot be determined without the corresponding amplitude map.  See the man page for  program  psnotch  for  more
-       information.
-
-       This  program  can  be used to detect the presence of powerline interference when electronic test equipment is not avail‐
-       able.  Although the frequency cannot be determined, the presence or absence of severe interferrence can be detected.
-
-       The following example computes average signal-to-noise ratios (SNR) for each time slot and the entire  tone  map  because
-       option -s is selected.  The AGC and GIL values for each slot are also displayed.  Option -s also suppresses tone map out‐
-       put.
-
-          # amptone -qs 000B3B00AAFA 00B05200CA0C
-           SNR   24.398   24.398   24.398   24.398   24.398   24.398
-           ATN  -35.602  -35.602  -35.602  -35.602  -35.602  -35.602
-           BPC    8.799      nan    8.799    8.799    8.799    8.799
-           AGC 04 04 04 04 04
-           GIL 00 00 00 00 00
-
-       The SNR values shown above are for a very clean and stable connection.  Once a tone map is  computed  it  remains  stable
-       unless  the  attenuation  changes  or noise is introduced while data is being transfered.  With no data transfer, the map
-       will automatically update after some (long) period, perhaps a minute, based on a number of interrelated factors.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-SEE ALSO
-       plc(1), amplist(1), amprate(1), ampstat(1), amprule(1), amptool(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  amptone(1)
-
- - - diff --git a/docbook/amptone.c.html b/docbook/amptone.c.html deleted file mode 100644 index 3cafdf6b..00000000 --- a/docbook/amptone.c.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - amptone.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   amptone.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Devices.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/ToneMaps2.c"
-#include "../plc/SignalToNoise2.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/error.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-static const struct _term_ couple [] =
-
-{
-	{
-		"alt",
-		"1"
-	},
-	{
-		"pri",
-		"0"
-	}
-};
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ehi:p:qst:vx",
-		"node peer [> stdout]",
-		"Qualcomm Atheros Thunderbolt/Lightning Tone Map Dump",
-		"e\tredirect stderr to stdout",
-		"h\tprint mean-square histogram",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"p n\tcoupling [" LITERAL (PLCOUPLING) "]",
-		"q\tquiet mode",
-		"s\tcompute signal-to-noise and bits-per-carrier ratios",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed (* function) (struct plc *) = ToneMaps2;
-	signed c;
-	plc.action = PLCOUPLING;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'p':
-			plc.coupling = (unsigned)(uintspec (synonym (optarg, couple, SIZEOF (couple)), 0, UCHAR_MAX));
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'h':
-			_setbits (plc.flags, PLC_GRAPH);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_ANALYSE);
-			function = SignalToNoise2;
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (!argc || !argv)
-	{
-		error (1, ECANCELED, "No node address given");
-	}
-	if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-	{
-		error (1, errno, PLC_BAD_MAC, * argv);
-	}
-	argc--;
-	argv++;
-	if (!argc || !argv)
-	{
-		error (1, ECANCELED, "No peer address given");
-	}
-	if (!hexencode (plc.RDA, sizeof (plc.RDA), synonym (* argv, devices, SIZEOF (devices))))
-	{
-		error (1, errno, PLC_BAD_MAC, * argv);
-	}
-	argc--;
-	argv++;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	function (&plc);
-	free (plc.message);
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/amptool.1.html b/docbook/amptool.1.html deleted file mode 100644 index 33044e31..00000000 --- a/docbook/amptool.1.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - amptool.1 - - - - - - - - - -
-amptool(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  amptool(1)
-
-NAME
-       amptool - Qualcomm Atheros AR7x00 Powerline Device Manager
-
-SYNOPSIS
-       amptool [options] [device] [device] [...]
-
-DESCRIPTION
-       This  version  of the Qualcomm Atheros Device Manager for Linux performs basic operations on Atheros AR7400 devices using
-       the raw Ethernet protocol described in the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual.  It  can  be
-       used to interrogate and control devices or upgrade firmware if on-board NVRAM is present.
-
-       This  program is part of the Qualcomm Atheros Powerline Toolkit.  It supports chipset AR7400 and QCA7450.  See plctool to
-       support QCA6410, QCA7000 and QCA7420 devices.  See the plc man page for an overview and installation instructions.
-
-COMMENTS
-       This program version is identical to legacy program int6k except for option -m which  uses  version  1  of  the  Qualcomm
-       Atheros VS_NW_INFO vendor-specific message.  Older firmware versions may not recognize this message version.
-
-OPTIONS
-       -a     Read  device  attributes  using  VS_OP_ATTRIBUTES.  Attributes are short strings and integers that describe device
-              hardware and firmware.  They are concatenated to form the output that is similar to option -r but derived  differ‐
-              ently.
-
-       -B action
-              Press  the  simple  connect  pushbutton using VS_PB_ENC.  The action can be specified by number 1, 2, 3 or 4 or by
-              symbol "join", "leave", "status" or "reset", respectively.  Use 1 on both devices that are expected to join.   Use
-              2 only on the device that is expected to leave the network.
-
-       -C module
-              Commit  (flash)  downloaded modules to NVRAM using VS_MOD_NVM.  The module can be spedified by number 1, 2 or 3 or
-              by symbol "nvm", "pib" or "all", repectively.  Module 3 is equivalent to option -F which writes the  NVM  and  PIB
-              together.  You cannot force flash NVRAM using this option.  Use option -FF to force flash.
-
-       -d filename
-              Read  Watchdog Report from the device and write it to the named file in binary format using VS_WD_RPT.  The report
-              file can be sent to Qualcomm Atheros for technical analysis.  No assumptions are made based  on  filename  and  no
-              filename convetions are enforced; however, you should use a .log file extension to indicate binary format.
-
-       -D xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
-              Define  the  16 octet Device Access Key (DAK) in hex format.  The DAK is used by option -J.  It may also be set to
-              "key1" or "key2" as explained in the KEYS section.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -f     Read flash memory parameters using VS_GET_NVM.  An error will be reported if no flash memory is present.
-
-       -F[F]  Write  previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.  Adding a second F here or another -F anywhere
-              on the command line will force-flash a blank or corrupted NVRAM.  Firmware loaded from  NVRAM  will  treat  force-
-              flash as an error.  This option can be used to create factory settings but cannot be used to change them once cre‐
-              ated.  Subsequent use creates and updates operational settings that can be erased using  a  factory  reset.   This
-              option is executed after all others on the command line, except for the -R option.
-
-       -g     Read multicast group information discovered while IGMP snooping using VS_MULTICAST_INFO.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -I     Read the device PIB header using VS_RD_MOD and print the firmware major revision number, PIB minor  revision  num‐
-              ber, Device Access Key (DAK), Network Membership Key (NMK), MAC address and other information on stdout.  The val‐
-              ues displayed can be changed using program modpib.
-
-       -J xx:xx:xx:xx:xx:xx
-              Set the Network Membership Key (NMK) on a remote device using VS_SET_KEY.  This option is similar to option -K but
-              requires  the  remote  device  MAC  and DAK in addition to the NMK and local device MAC address.  The NMK value is
-              defined using option -K unless you want to use the default value.  The remote  DAK  is  defined  using  option  -D
-              unless  you  want to use the default value.  Programming remote device keys is complicated.  It is often easier to
-              connect the device directly to the host and use the -K option.
-
-       -K xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
-              Define the Network Membership Key (NMK) value used by options -M or -J.  The symbolic names "key1" and "key2"  are
-              recognized as described in the KEY section.
-
-       -l count
-              Define the number of times that the command will be repeated for each device specified.  Normally, you will repeat
-              operations on one device only.
-
-       -m     Read network membership information using VS_NW_INFO.  This can be used to determine network configuration.
-
-       -M     Set the Network Membership Key (NMK) on the local device using VS_SET_KEY.  The NMK value is specified  using  the
-              -K option unless you want to use the default value.
-
-       -n filename
-              Read  firmware  from  the  device SDRAM and write it to the named .nvm file using multiple VS_RD_MOD messages.  No
-              assumptions are made based on filename and no filename conventions are enforced.  This option is performed  before
-              option -N when both are specified.
-
-       -N filename
-              Read  the  named  .nvm file and write it to the device using multiple VS_WR_MOD messages.  No assumptions are made
-              based on filename and no filename conventions are enforced; however, files having  invalid  .nvm  format  will  be
-              rejected.  This option is executed after -n when both are specified.
-
-       -p filename
-              Read parameters from the device SDRAM and write them to the named .pib file using multiple VS_RD_MOD messages.  No
-              assumptions are made based on filename and no filename convetions are enforced.  This option  is  executed  before
-              option BP when both are specified.
-
-       -P filename
-              Read  the  named  .pib file and write it to the device using multiple VS_WR_MOD messages.  No assumptions are made
-              based on filename and no filename conventions are enforced; however, files having  invalid  .pib  format  will  be
-              rejected.  This option is executed after -p when both are specified.
-
-       -q     Suppresses status messages on stderr.
-
-       -Q     Quick  flash.  The program will not wait for a device to reset or the firmware to restart after writing flash mem‐
-              ory.  This option is desirable with newer firmware that writes flash memory in the background.  It has  no  effect
-              unless used with option -F or -C.
-
-       -r     Read device firmware and hardware revision using VS_SW_VER.  Output is similar to option -a but is derived differ‐
-              ently.
-
-       -R     Reset the device using VS_RS_DEV.  This option is executed after all others on the same command line.
-
-       -s     Read device SDRAM configuration using VS_RD_CBLOCK.
-
-       -t milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is shown in brackets on the program menu.
-
-       -T     Restore  factory defaults.  This permanently erases all PIB changes made since the device was last programmed with
-              factory default settings.  The device will automatically reset and reboot.
-
-       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
-              be saved as text files for reference.
-
-       -w seconds
-              Defines  the  number  of  seconds to wait before repeating command line options.  This option has no effect unless
-              option -l is also specified with a non-zero value.
-
-       -x     Cause the program to exit on the first error instead  of  continuing  with  remaining  iterations,  operations  or
-              devices.   Normally,  the program reports errors and moves on to the next operation, iteration or device depending
-              on the command line.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The Ethernet hardware address of some powerline device.  More than one address may be  specified  on  the  command
-              line.   If  more  than one address is specified then operations are performed on each device in turn.  The default
-              address is local.  as explained in the DEVICES section.
-
-KEYS
-       Passwords are variable length character strings that end-users can remember.  Keys are fixed length binary values created
-       by encrypting passwords.  There are two encryption algorithms for HomePlugAV.  One for DAKs and the other for NMKs.  This
-       means that a given password will produce different keys depending on use.  This program only deals with keys because that
-       is what powerline devices recognize.  The passwords that generated the keys are irrelevant here.
-
-       Encryption  keys  are  tedious  to type and prone to error.  For convenience, symbolic names have been assigned to common
-       encryption keys and are recognized by options -D and -K.
-
-       key1   Key  for  encrypted  password  "HomePlugAV".   This  is  "689F074B8B0275A2710B0B5779AD1630"  for  option  -D   and
-              "50D3E4933F855B7040784DF815AA8DB7" for option -K.
-
-       key2   Key  for  encrypted  password  "HomePlugAV0123".   This  is  "F084B4E8F6069FF1300C9BDB812367FF"  for option -D and
-              "B59319D7E8157BA001B018669CCEE30D" for option -K.
-
-       none   Always "00000000000000000000000000000000".
-
-DEVICES
-       Powerline devices use Ethernet hardware, or Media Access Control (MAC), addresses.  Device addresses are  12  hexadecimal
-       digits  (0123456789ABCDEFabcdef)  in upper, lower or mixed case.  Individual octets may be separated by colons, for clar‐
-       ity, but not all octets need to be seperated.  For example, "00b052000001", "00:b0:52:00:00:01" and  "00b052:000001"  are
-       valid and equivalent.
-
-       These symbolic addresses are recognized by this program and may be used instead of the actual address value.
-
-       all    Equivalent to "broadcast", described next.
-
-       broadcast
-              A  synonym  for the standard Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or
-              foreign will respond to this address.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  will  recognize  this  address  but remote and foreign devices will not.  A remote device is any
-              device at the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
-       structure or content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-          # amptool -n old.nvm -p old.pib -N new.nvm -P new.pib -F 01:23:45:67:89:AB
-
-       Performs 5 operations on one device.  Uploads the firmware and PIB from the device and writes them to files  old.nvm  and
-       old.pib,  respectively.   Reads files new.nvm and new.pib and downloads them as new firmware and PIB, respectively.  Com‐
-       mits the downloaded firmware and PIB to NVRAM.  Operations are executed in the order just  described  regardless  of  the
-       order specified on the command line.  If you want reading and writing to occur in a different order then you must use two
-       or more commands to accomplish tasks in the order you want.
-
-          # amptool -N new.nvm 01:23:45:67:89:28
-          # amptool -P new.pib 01:23:45:67:89:28
-          # amptool -C 3 01:23:45:67:89:28
-
-       It is not neccessary to specify all operations on one command line.  The three command lines  above  do  essentially  the
-       same  thing  as  the command line shown in the previou example.  Notice that this example uses -C 3, instead of -F, as an
-       alternate way to write MAC and PIB to NVRAM.  Specifying -C 1, instead, would write the .nvm file only.   Specifying,  -C
-       2, instead, would write the .pib file only.  The value 3 is the logical OR of 1 and 2.
-
-          # amptool -N new.nvm -P new.pib -FF local
-
-       Downloads  file  new.nvm  and  file  new.pib  and  force  flashes the local device.  Force flashing only works on running
-       firmware that has been downloaded and stated by the Qualcomm Atheros  Boot  Loader.   See  amptoolf  to  download,  start
-       firmware and perform a force flash in one operation.
-
-          # amptool -MK key1
-          # amptool -M
-
-       These  two commands are equivalent.  They set the NMK on the local device to key1 as descripted in the KEYS section.  The
-       first command resets the NMK on the local device with -M then specifies the NMK as key1.  The second  command  omits  the
-       key specification since key1 is the program default NMK.  One could, of course, type the encryption key.
-
-SEE ALSO
-       plc(1), ampboot(1), ampboot(1), amphost(1), int6kid(1), amprate(1), amprule(1), ampstat(1), ampwait(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  amptool(1)
-
- - - diff --git a/docbook/amptool.c.html b/docbook/amptool.c.html deleted file mode 100644 index a0053215..00000000 --- a/docbook/amptool.c.html +++ /dev/null @@ -1,696 +0,0 @@ - - - - - - amptool.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   amptool.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../key/HPAVKey.h"
-#include "../key/keys.h"
-#include "../ram/sdram.h"
-#include "../pib/pib.h"
-#include "../nvm/nvm.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Attributes1.c"
-#include "../plc/chipset.c"
-#include "../plc/NVRAMInfo.c"
-#include "../plc/SDRAMInfo.c"
-#include "../plc/Devices.c"
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/FactoryDefaults.c"
-#include "../plc/HostActionResponse.c"
-#include "../plc/Identity1.c"
-#include "../plc/NetInfo2.c"
-#include "../plc/PushButton.c"
-#include "../plc/SetNMK.c"
-#include "../plc/Request.c"
-#include "../plc/Failure.c"
-#include "../plc/PLCSelect.c"
-#include "../plc/ReadFirmware1.c"
-#include "../plc/ReadMME.c"
-#include "../plc/ReadMFG.c"
-#include "../plc/ReadParameters1.c"
-#include "../plc/RemoteHosts.c"
-#include "../plc/ResetDevice.c"
-#include "../plc/SendMME.c"
-#include "../plc/StationRole.c"
-#include "../plc/VersionInfo1.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WatchdogReport.c"
-#include "../plc/StartFirmware1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/error.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/synonym.c"
-#include "../tools/uintspec.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/hexout.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ram/nvram.c"
-#include "../ram/sdramfile.c"
-#include "../ram/sdrampeek.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibfile1.c"
-#include "../pib/pibpeek1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define AMPTOOL_WAIT 0
-#define AMPTOOL_LOOP 1
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-static const struct _term_ modules [] =
-
-{
-	{
-		"nvm",
-		"1"
-	},
-	{
-		"pib",
-		"2"
-	},
-	{
-		"both",
-		"3"
-	}
-};
-
-static const struct _term_ buttons [] =
-
-{
-	{
-		"join",
-		"1"
-	},
-	{
-		"leave",
-		"2"
-	},
-	{
-		"status",
-		"3"
-	}
-};
-
-/*====================================================================*
- *
- *   void manager (struct plc * plc, signed count, signed pause);
- *
- *   perform operations in logical order despite any order specfied
- *   on the command line; for example read PIB before writing PIB;
- *
- *   operation order is controlled by the order of "if" statements
- *   shown here; the entire operation sequence can be repeated with
- *   an optional pause between each iteration;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void manager (struct plc * plc, signed count, signed pause)
-
-{
-	while (count--)
-	{
-		if (_anyset (plc->flags, PLC_VERSION))
-		{
-			VersionInfo1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_ATTRIBUTES))
-		{
-			Attributes1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_WATCHDOG_REPORT))
-		{
-			WatchdogReport (plc);
-		}
-		if (_anyset (plc->flags, PLC_NVRAM_INFO))
-		{
-			NVRAMInfo (plc);
-		}
-		if (_anyset (plc->flags, PLC_SDRAM_INFO))
-		{
-			SDRAMInfo (plc);
-		}
-		if (_anyset (plc->flags, PLC_READ_IDENTITY))
-		{
-			Identity1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_REMOTEHOSTS))
-		{
-			RemoteHosts (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK))
-		{
-			NetInfo2 (plc);
-		}
-		if (_anyset (plc->flags, PLC_WRITE_MAC))
-		{
-			WriteNVM (plc);
-		}
-		if (_anyset (plc->flags, PLC_READ_MAC))
-		{
-			ReadFirmware1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_WRITE_PIB))
-		{
-			WritePIB (plc);
-		}
-		if (_anyset (plc->flags, PLC_READ_PIB))
-		{
-			ReadParameters1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_HOST_ACTION))
-		{
-			HostActionResponse (plc);
-		}
-		if (_anyset (plc->flags, PLC_PUSH_BUTTON))
-		{
-			PushButton (plc);
-		}
-		if (_anyset (plc->flags, (PLC_SETLOCALKEY | PLC_SETREMOTEKEY)))
-		{
-			SetNMK (plc);
-		}
-		if (_anyset (plc->flags, PLC_FACTORY_DEFAULTS))
-		{
-			FactoryDefaults (plc);
-		}
-		if (_anyset (plc->flags, PLC_FLASH_DEVICE))
-		{
-			FlashNVM (plc);
-		}
-		if (_anyset (plc->flags, PLC_RESET_DEVICE))
-		{
-			ResetDevice (plc);
-		}
-		sleep (pause);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	extern struct _term_ const daks [];
-	extern struct _term_ const nmks [];
-	static char const * optv [] =
-	{
-		"abB:C:d:D:efFgHi:IJ:K:l:mMn:N:p:P:QqrsRt:Tvw:x",
-		"device [device] [...]",
-		"Qualcomm Atheros AR7x00 Powerline Device Manager",
-		"a\tread Device Attributes using VS_OP_ATTRIBUTES",
-		"b\tread device enumeration ID table using VS_EM_ID_TABLE",
-		"B n\tperform pushbutton action (n) using MS_PB_ENC [1|2|3|'join'|'leave'|'status']",
-		"C n\tflash NVRAM with module (n) using VS_MOD_NVM [1|2|3|'nvm'|'pib'|'both']",
-		"C n\tflash NVRAM with module (n) using VS_MOD_NVM",
-		"d f\tdump and clear watchdog report to file (f) using VS_WD_RPT",
-		"D x\tDevice Access Key (DAK) is (x) [" DAK1 "]",
-		"e\tredirect stderr to stdout",
-		"f\tread NVRAM Configuration using VS_GET_NVM",
-		"F[F]\tflash [force] NVRAM with PIB and firmware using VS_MOD_NVM",
-		"g\tdisplay multicast group information using VS_MULTICAST_INFO",
-		"H\tstop host action requests messages with VS_HOST_ACTION.IND",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"I\tread device identity using VS_RD_MOD",
-		"J x\tset NMK on remote device (x) via local device using VS_SET_KEY (see -K)",
-		"K x\tNetwork Membership Key (NMK) is (x) [" NMK1 "]",
-		"l n\tloop (n) times [" LITERAL (AMPTOOL_LOOP) "]",
-		"m\tread network membership information using VS_NW_INFO",
-		"M\tset NMK on local device using VS_SET_KEY (see -K)",
-		"n f\tread NVM from SDRAM to file (f) using VS_RD_MOD",
-		"N f\twrite NVM file (f) to SDRAM using VS_WR_MOD",
-		"p f\tread PIB from SDRAM to file (f) using VS_RD_MOD",
-		"P f\twrite PIB file (f) to SDRAM using VS_WR_MOD",
-		"q\tquiet mode",
-		"Q\tquick flash (return immediately)",
-		"r\tread hardware and firmware revision using VS_SW_VER",
-		"R\treset device using VS_RS_DEV",
-		"s\tread SDRAM Configuration using VS_RD_CBLOCK",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"T\trestore factory defaults using VS_FAC_DEFAULTS",
-		"v\tverbose mode",
-		"w n\tpause (n) seconds [" LITERAL (AMPTOOL_WAIT) "]",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed loop = AMPTOOL_LOOP;
-	signed wait = AMPTOOL_WAIT;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'a':
-			_setbits (plc.flags, PLC_ATTRIBUTES);
-			break;
-		case 'B':
-			_setbits (plc.flags, PLC_PUSH_BUTTON);
-			plc.pushbutton = (unsigned)(uintspec (synonym (optarg, buttons, SIZEOF (buttons)), 0, UCHAR_MAX));
-			break;
-		case 'b':
-			_setbits (plc.flags, PLC_REMOTEHOSTS);
-			break;
-		case 'C':
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			plc.module = (unsigned)(uintspec (synonym (optarg, modules, SIZEOF (modules)), 0, UCHAR_MAX));
-			break;
-		case 'd':
-			_setbits (plc.flags, PLC_WATCHDOG_REPORT);
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.rpt.file = open (plc.rpt.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.rpt.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			plc.readaction = 3;
-			break;
-		case 'D':
-			if (!hexencode (plc.DAK, sizeof (plc.DAK), synonym (optarg, daks, SIZEOF (daks))))
-			{
-				error (1, errno, PLC_BAD_DAK, optarg);
-			}
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'f':
-			_setbits (plc.flags, PLC_NVRAM_INFO);
-			break;
-		case 'F':
-			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'H':
-			_setbits (plc.flags, PLC_HOST_ACTION);
-			break;
-		case 'I':
-			_setbits (plc.flags, PLC_READ_IDENTITY);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'J':
-			if (!hexencode (plc.RDA, sizeof (plc.RDA), (char const *)(optarg)))
-			{
-				error (1, errno, PLC_BAD_MAC, optarg);
-			}
-			_setbits (plc.flags, PLC_SETREMOTEKEY);
-			break;
-		case 'K':
-			if (!hexencode (plc.NMK, sizeof (plc.NMK), synonym (optarg, nmks, SIZEOF (nmks))))
-			{
-				error (1, errno, PLC_BAD_NMK, optarg);
-			}
-			break;
-		case 'M':
-			_setbits (plc.flags, PLC_SETLOCALKEY);
-			break;
-		case 'l':
-			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'm':
-			_setbits (plc.flags, PLC_NETWORK);
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'n':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.nvm.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			_setbits (plc.flags, PLC_READ_MAC);
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.PIB.name);
-			}
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'p':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.pib.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			_setbits (plc.flags, PLC_READ_PIB);
-			break;
-		case 'Q':
-			_setbits (plc.flags, PLC_QUICK_FLASH);
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'R':
-			_setbits (plc.flags, PLC_RESET_DEVICE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_VERSION);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_SDRAM_INFO);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'T':
-			_setbits (plc.flags, PLC_FACTORY_DEFAULTS);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'V':
-			_setbits (plc.flags, PLC_SNIFFER);
-			plc.action = (uint8_t)(uintspec (optarg, 0, UCHAR_MAX));
-			break;
-		case 'w':
-			wait = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc != 1)
-	{
-		if (plc.nvm.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-		if (plc.pib.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-		if (plc.rpt.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		manager (&plc, loop, wait);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		manager (&plc, loop, wait);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/ampwait.1.html b/docbook/ampwait.1.html deleted file mode 100644 index 8c844c4f..00000000 --- a/docbook/ampwait.1.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - ampwait.1 - - - - - - - - - -
-ampwait(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  ampwait(1)
-
-NAME
-       ampwait - Qualcomm Atheros Powerline Procrastinator
-
-SYNOPSIS
-       ampwait [options] [device] [device] [...]
-
-DESCRIPTION
-       Poll  a  Qualcomm  Atheros powerline device, waiting for one or more events to occur before continuing or returning.  The
-       events include reset or power off, restart or power on and network association.  It is used to  pause  shell  scripts  at
-       critical points where a device must be in a known state before continuing.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -a     Poll the device every few seconds using VS_NW_INFO messages until the device indicates that a networks exists  and
-              has  at  least  one  station.   This option can give false readings if other devices have dropped off-line and the
-              device bridging table still holds information about them.  The program always checks for this event last if  other
-              event options are specified.
-
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -f firmware
-              The identification string for firmware that should be running after the device starts.  This option can be used to
-              detect a failed firmware load.  If the actual identification string does not match this one once the device starts
-              then an error is reported.  If option -x is present then the program terminates with a non-zero exit  code.   This
-              option    has    no   effect   unless   option   -s   is   present.    An   identification   string   looks   like
-              "INT6000-MAC-3-1-3143-1690-20071107-FINAL-B" and can be obtained using int6k -r.
-
-       -i     Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -p seconds
-              Fixed  pause  time  in  seconds.   This adds an fixed delay after the other events have occured.  A pause does not
-              occur if any of the specified events timeout.  When no other events  are  specified  this  option  is  effectively
-              equivalent  to sleep.  This option can be used to allow the device or the network to settle.  For example, a nomi‐
-              nal 5 second wait is recommended after a device successfully associates before attempting to transfer data.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -R     Reset the device then check return status.  Exit program on error if option -x is present; otherwise,  repeat  the
-              reset request until the device either accepts the request or the wait time is exceeded.
-
-       -s     Poll  the  device  every few seconds using VS_SW_VER messages until the bootloader or runtime firmware responds or
-              the poll count exhausts.  The presence of a response indicates that the device has either connected to  the  host,
-              received power or finished reboot.
-
-       -t milliseconds
-              Channel  read/write  timeout  in  milliseconds.  This is the maximum time allowed for a confirmation or a response
-              from a powerline device before abandoning a read/write operation.  Permitted values range from 0 through  UINT_MAX
-              as defined in limits.h.  The default is 50 milliseconds.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -w seconds
-              Wait  timeout in seconds.  This is the maximum time that this application will wait for an event to occur where an
-              event is reset, start or assoc.  If an event does no occur within this time, the program proceeds to wait for  the
-              next  specified event.  This timeout applies to each event in turn when more than one event is specified.  Permit‐
-              ted values are 0 through 86400 seconds which is 24 hours.
-
-       -x     Exit program on first error with a non-zero exit code.  This option allows  shell  scripts  to  detect  failed  or
-              incomplete operations and take the appropriate action.
-
-       -y     Display actual wait times on stdout.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The Media Access Control (MAC) address of some device.  Addresses are 6 hexadecimal octets optionally separated by
-              colon.  For example, the addresses "00b052000001", "00:b0:52:00:00:01"  and  "00b052:000001"  are  all  valid  and
-              equivalent.   For  convenience,  the  symbolic  address  "local"  resolves to "00:b0:52:00:00:01" and the symbolic
-              addresses "all" and "broadcast" both resolve to "ff:ff:ff:ff:ff:ff".
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-EXAMPLES
-       The  following  command  polls  the local device until firmware stops running then polls the device until firmware starts
-       running again.  This command can be inserted into a shell script at a point where the device must reset and reboot before
-       proceeding.   Observe  that the program waits up to 60 seconds for each event, in turn, because 60 seconds is the default
-       wait period.  If an event occurs before the specified timeout the program will move on to the next event.
-
-          # ampwait -rs
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
-
-       The following example waits up to 30 seconds for the local device to reset (-r) then up  to  50  seconds  for  the  local
-       device to start (-s).  This is the same as above but we have specified 30 seconds using option -w.
-
-          # ampwait -r -s -w 30
-          eth0 00:B0:52:BA:BA:01 Allow 30 seconds for Reset
-          eth0 00:B0:52:BA:BA:01 Allow 30 seconds for Start
-
-       The  next  example  reports the actual amount of time taken for each event to occur.  Observe that the last event, device
-       association, did not occur within the allotted time.
-
-          # ampwait -rsay
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
-          etho 00:B0:52:BA:BA:01 Waited 22 seconds to Reset
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
-          etho 00:B0:52:BA:BA:01 Waited 4 seconds to Start
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Assoc
-          etho 00:B0:52:BA:BA:01 Waited 60 seconds for Assoc
-          etho 00:B0:52:BA:BA:01 Device did not Assoc
-
-       The following example illustrates use of the revision string to detect mismatched firmware.  In this  example,  we  reset
-       the  device  first,  using program amptool, then wait for it to reset then start up again.  There are also operation that
-       can cause the device to reset.
-
-          # amptool -R
-          # ampwait -xrsf INT6000-MAC-3-1-3143-1690-20071107-FINAL-B
-          eth0 00:B0:52:BA:BA:01 Device started wrong firmware
-
-       Immediately after a reset we wait for the firmware to stop responding, with option -r, and then  start  responding,  with
-       option  -s,  and  then  perform  a string comparison against the actual firmware revision string, with option -f.  If the
-       strings do not match then an error is reported.  In this case, the program will exit with a non-zero  return  code  since
-       option -x is present.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-SEE ALSO
-       amp(1), amptool(1), amphost(1), amprate(1), ampid(1), ampstat(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  ampwait(1)
-
- - - diff --git a/docbook/ampwait.c.html b/docbook/ampwait.c.html deleted file mode 100644 index 4fc4cddc..00000000 --- a/docbook/ampwait.c.html +++ /dev/null @@ -1,788 +0,0 @@ - - - - - - ampwait.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   ampwait.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-#include <sys/time.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/timer.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/synonym.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *
- *   signed ResetAndWait (struct plc * plc);
- *
- *   plc.h
- *
- *   send VS_RS_DEV.REQ messages every channel->timeout milliseconds
- *   until the device responds to indicate that it is ready to reset;
- *   return 0 if the device eventually responds within plc->timer
- *   seconds or -1 if not;
- *
- *--------------------------------------------------------------------*/
-
-signed ResetAndWait (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rs_dev_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_rs_dev_request *) (message);
-	struct __packed vs_rs_dev_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_rs_dev_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Reset when Ready");
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RS_DEV | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RS_DEV | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (plc->packetsize)
-		{
-			if (!confirm->MSTATUS)
-			{
-				Confirm (plc, "Resetting ...");
-				return (0);
-			}
-		}
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed WaitForReset (struct plc * plc, char string [], size_t length);
- *
- *   plc.h
- *
- *   send VS_SW_VER.REQ  messages every channel->timeout milliseconds
- *   until the device stops responding to indicate that it is inactive;
- *   return 0 if the device eventually stops responding within
- *   plc->timer seconds or -1 if not;
- *
- *   this function cannot distinguish between a software reset and
- *   hardware reset;
- *
- *--------------------------------------------------------------------*/
-
-signed WaitForReset (struct plc * plc, char string [], size_t length)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (string, 0, length);
-	Request (plc, "Allow %d seconds for Reset", plc->timer);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (!plc->packetsize)
-		{
-			if (_allset (plc->flags, (PLC_WAITFORRESET | PLC_ANALYSE)))
-			{
-				Confirm (plc, "Waited %d seconds for Reset", timer);
-			}
-			memcpy (string, confirm->MVERSION, confirm->MVERLENGTH);
-			return (0);
-		}
-	}
-	if (_allset (plc->flags, (PLC_WAITFORRESET | PLC_ANALYSE)))
-	{
-		Confirm (plc, "Waited %d seconds for Reset", timer);
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed WaitForStart (struct plc * plc, char string [], size_t length);
- *
- *   plc.h
- *
- *   send VS_SW_VER.REQ messages every channel->timeout milliseconds
- *   until the device responds to indicate that it is active; return
- *   0 if the device eventually responds within plc->timer seconds
- *   or -1 if not;
- *
- *--------------------------------------------------------------------*/
-
-signed WaitForStart (struct plc * plc, char string [], size_t length)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Allow %d seconds for Start", plc->timer);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (plc->packetsize)
-		{
-			if (confirm->MSTATUS)
-			{
-				Failure (plc, PLC_WONTDOIT);
-				return (-1);
-			}
-			if (_allset (plc->flags, (PLC_WAITFORSTART | PLC_ANALYSE)))
-			{
-				Confirm (plc, "Waited %d seconds for Start", timer);
-			}
-			strncpy (string, confirm->MVERSION, length);
-			return (0);
-		}
-	}
-	if (_allset (plc->flags, (PLC_WAITFORSTART | PLC_ANALYSE)))
-	{
-		Confirm (plc, "Waited %d seconds for Start", timer);
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed WaitForAssoc (struct plc * plc);
- *
- *   plc.h
- *
- *   send VS_NW_INFO.REQ messages every channel->timeout milliseconds
- *   until the device reports that a network has formed; return 0 if a
- *   network forms within plc->timer seconds or -1 if not;
- *
- *--------------------------------------------------------------------*/
-
-signed WaitForAssoc (struct plc * plc)
-
-{
-	extern const uint8_t broadcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Allow %d seconds for Assoc", plc->timer);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (plc->packetsize)
-		{
-			network = (struct network *)(&networks->networks);
-			while (networks->NUMAVLNS--)
-			{
-				station = (struct station *)(&network->stations);
-				while (network->NUMSTAS--)
-				{
-					if (memcmp (station->MAC, broadcast, sizeof (broadcast)))
-					{
-						if (_allset (plc->flags, (PLC_WAITFORASSOC | PLC_ANALYSE)))
-						{
-							Confirm (plc, "Waited %d seconds for Assoc", timer);
-						}
-						return (0);
-					}
-					station++;
-				}
-				network = (struct network *)(station);
-			}
-		}
-	}
-	if (_allset (plc->flags, (PLC_WAITFORASSOC | PLC_ANALYSE)))
-	{
-		Confirm (plc, "Waited %d seconds for Assoc", timer);
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   void function (struct plc * plc, char const * firmware);
- *
- *   perform operations in a logical order;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void function (struct plc * plc, char const * firmware)
-
-{
-	char string [PLC_VERSION_STRING];
-	if (_anyset (plc->flags, PLC_RESET_DEVICE))
-	{
-		if (ResetAndWait (plc))
-		{
-			Failure (plc, "Device did not Reset.");
-		}
-	}
-	if (_anyset (plc->flags, PLC_WAITFORRESET))
-	{
-		if (WaitForReset (plc, string, sizeof (string)))
-		{
-			Failure (plc, "Device did not Reset.");
-		}
-	}
-	if (_anyset (plc->flags, PLC_WAITFORSTART))
-	{
-		if (WaitForStart (plc, string, sizeof (string)))
-		{
-			Failure (plc, "Device did not Start.");
-		}
-		if ((firmware) && (*firmware) && strcmp (firmware, string))
-		{
-			Failure (plc, "Started wrong firmware");
-		}
-	}
-	if (_anyset (plc->flags, PLC_WAITFORASSOC))
-	{
-		if (WaitForAssoc (plc))
-		{
-			Failure (plc, "Device did not Assoc.");
-		}
-	}
-	if (plc->sleep)
-	{
-		Request (plc, "Pause %d seconds", plc->sleep);
-		sleep (plc->sleep);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"aef:i:p:qrRstvw:xy",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros Powerline Procrastinator",
-		"a\twait for device assoc",
-		"e\tredirect stderr to stdout",
-		"f s\tconfirm firmware is revision s",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"p n\tpause (n) seconds",
-		"q\tquiet mode",
-		"r\twait for device reset",
-		"R\treset device and wait",
-		"s\twait for device start",
-		"t n\tchannel timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"w n\twait up to (n) seconds for action [" LITERAL (PLC_TIMER) "]",
-		"x\texit on error",
-		"y\treport failure times",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	char const * firmware = "";
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'a':
-			_setbits (plc.flags, PLC_WAITFORASSOC);
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'f':
-			firmware = optarg;
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'p':
-			plc.sleep = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_WAITFORRESET);
-			break;
-		case 'R':
-			_setbits (plc.flags, PLC_RESET_DEVICE);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_WAITFORSTART);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'w':
-			plc.timer = (unsigned)(uintspec (optarg, 0, 86400));
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		case 'y':
-			_setbits (plc.flags, PLC_ANALYSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		function (&plc, firmware);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		function (&plc, firmware);
-		argv++;
-		argc--;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/assist.c.html b/docbook/assist.c.html deleted file mode 100644 index 86838d07..00000000 --- a/docbook/assist.c.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - assist.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void assist (char const * name, char const * type, struct _code_ const list [], size_t size);
- *
- *   symbol.h
- *
- *   print program name followed by an error message containing the
- *   type of name expected, the incorrect name and a list of correct
- *   name;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ASSIST_SOURCE
-#define ASSIST_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "../tools/symbol.h"
-#include "../tools/error.h"
-
-void assist (char const * name, char const * type, struct _code_ const list [], size_t size)
-
-{
-	extern char const * program_name;
-	fprintf (stderr, "%s: ", program_name);
-	fprintf (stderr, "%s: ", strerror (ENOTSUP));
-	if (name)
-	{
-
-#if 0
-
-		fprintf (stderr, "Have %s '%s' but expected %s ", type, name, type);
-
-#else
-
-		fprintf (stderr, "Have '%s' but want ", name);
-
-#endif
-
-	}
-	else
-	{
-		fprintf (stderr, "Want %s ", type);
-	}
-	codelist (list, size, ",", "''", stderr);
-	fprintf (stderr, ".\n");
-	exit (1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/b64dump.c.html b/docbook/b64dump.c.html deleted file mode 100644 index d7033922..00000000 --- a/docbook/b64dump.c.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - b64dump.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t b64dump (void const * memory, size_t extent, size_t column, FILE *fp);
- *
- *   base64.h
- *
- *   base64 encode a memory region and write to a text file; wrap
- *   the output at a given column; do not wrap when column is 0;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef B64DUMP_SOURCE
-#define B64DUMP_SOURCE
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../tools/base64.h"
-#include "../tools/types.h"
-
-void b64dump (void const * memory, size_t extent, size_t column, FILE *fp)
-
-{
-	byte * offset = (byte *)(memory);
-	unsigned encode = 0;
-	while (extent)
-	{
-		uint32_t word = 0;
-		unsigned byte = 0;
-		unsigned bits = BASE64_WORDSIZE - BASE64_BYTESIZE;
-		while ((bits) && (extent))
-		{
-			bits -= BASE64_BYTESIZE;
-			word |= *offset << bits;
-			offset++;
-			extent--;
-			byte++;
-		}
-		if (byte++)
-		{
-			bits = BASE64_WORDSIZE - BASE64_BYTESIZE;
-			while ((bits) && (byte))
-			{
-				bits -= BASE64_CHARSIZE;
-				putc (BASE64_CHARSET [(word >> bits) & BASE64_CHARMASK], fp);
-				byte--;
-				encode++;
-			}
-			while (bits)
-			{
-				bits -= BASE64_CHARSIZE;
-				putc ('=', fp);
-				encode++;
-			}
-			if ((column) && !(encode%column))
-			{
-				putc ('\n', fp);
-			}
-		}
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/base64.h.html b/docbook/base64.h.html deleted file mode 100644 index 95169674..00000000 --- a/docbook/base64.h.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - base64.h - - - - - - - - - -
-/*====================================================================*
- *
- *   base64.h - base64 encode/decode definitions and declarations;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BASE64_HEADER
-#define BASE64_HEADER
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdio.h>
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define BASE64_CHARSET "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
-#define BASE64_BYTEMASK 0xFF
-#define BASE64_CHARMASK 0x3F
-#define BASE64_WORDSIZE 32
-#define BASE64_BYTESIZE 8
-#define BASE64_CHARSIZE 6
-
-/*====================================================================*
- *   encode/decode functions;
- *--------------------------------------------------------------------*/
-
-void b64dump (void const * memory, size_t extent, size_t column, FILE *fp);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/basespec.c.html b/docbook/basespec.c.html deleted file mode 100644 index b404752d..00000000 --- a/docbook/basespec.c.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - basespec.c - - - - - - - - - -
-/*====================================================================*
- *
- *   uint64_t basespec (char const * string, unsigned base, unsigned size);
- *
- *   number.h
- *
- *   convert a character string to an equivalent unsigned integer and
- *   return the result; terminate the program on failure;
- *
- *   the base argument is the number base to be used for conversion;
- *   base 0 permits the number base to be determined by the string
- *   string prefix; 0b, 0d or 0x for binary, decimal or hex;
- *
- *   this implementation accepts a minus sign in order to negate any
- *   number in any base;
- *
- *   the size argument is the maximum number of bytes permitted in the
- *   result;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BASESPEC_SOURCE
-#define BASESPEC_SOURCE
-
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-uint64_t basespec (char const * string, unsigned base, unsigned size)
-
-{
-	char const * number = string;
-	unsigned radix = RADIX_DEC;
-	signed scale = 1;
-	uint64_t limit = 0;
-	uint64_t value = 0;
-	unsigned digit = 0;
-	limit = ~limit;
-	if (size < sizeof (limit))
-	{
-		limit <<= size << 3;
-		limit = ~limit;
-	}
-	if (base)
-	{
-		radix = base;
-	}
-	if (* number == '=')
-	{
-		number++;
-	}
-	else if (* number == '+')
-	{
-		number++;
-	}
-	else if (* number == '-')
-	{
-		number++;
-		scale = -1;
-	}
-	if (*number == '0')
-	{
-		number++;
-		if ((*number == 'b') || (*number == 'B'))
-		{
-			radix = RADIX_BIN;
-			number++;
-		}
-		else if ((*number == 'd') || (*number == 'D'))
-		{
-			radix = RADIX_DEC;
-			number++;
-		}
-		else if ((*number == 'x') || (*number == 'X'))
-		{
-			radix = RADIX_HEX;
-			number++;
-		}
-	}
-	if ((base) && (base != radix))
-	{
-		error (1, EINVAL, "%s is not base %d notation", string, base);
-	}
-	while ((digit = todigit (*number)) < radix)
-	{
-		value *= radix;
-		value += digit;
-		if (value > limit)
-		{
-			error (1, ERANGE, "%s exceeds %d bits", string, (size << 3));
-		}
-		number++;
-	}
-
-#ifdef WIN32
-
-	while (isspace (*number))
-	{
-		number++;
-	}
-
-#endif
-
-	if (*number)
-	{
-		error (1, EINVAL, "%s is not base %d notation", string, radix);
-	}
-	return (scale * value);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/baud.sh.html b/docbook/baud.sh.html deleted file mode 100644 index 6bc6024f..00000000 --- a/docbook/baud.sh.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - baud.sh - - - - - - - - - -
-#!/bin/sh
-
-# ====================================================================
-# set serial port parameters on a Linux system;
-# --------------------------------------------------------------------
-
-stty -F /dev/ttyUSB1 1115200 cs8 -cstopb -ixon
-
-
-
- - - diff --git a/docbook/baudrate.c.html b/docbook/baudrate.c.html deleted file mode 100644 index 4e43400c..00000000 --- a/docbook/baudrate.c.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - baudrate.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   baud_t baudrate (unsigned rate)
- *
- *   convert integer baud rate to system constant or bitmap;
- *
- *
- *   Contributor(s):
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BAUDRATE_SOURCE
-#define BAUDRATE_SOURCE
-
-#include <termios.h>
-#include <errno.h>
-
-#include "../tools/error.h"
-
-signed baudrate (unsigned baud, speed_t * speed)
-
-{
-	static struct baud
-	{
-		unsigned baud;
-		speed_t code;
-	}
-	bauds [] =
-	{
-		{
-			0,
-			B0
-		},
-		{
-			50,
-			B50
-		},
-		{
-			75,
-			B75
-		},
-		{
-			110,
-			B110
-		},
-		{
-			134,
-			B134
-		},
-		{
-			150,
-			B150
-		},
-		{
-			200,
-			B200
-		},
-		{
-			300,
-			B300
-		},
-		{
-			600,
-			B600
-		},
-		{
-			1200,
-			B1200
-		},
-		{
-			1800,
-			B1800
-		},
-		{
-			2400,
-			B2400
-		},
-		{
-			4800,
-			B4800
-		},
-		{
-			9600,
-			B9600
-		},
-		{
-			19200,
-			B19200
-		},
-		{
-			38400,
-			B38400
-		},
-		{
-			57600,
-			B57600
-		},
-		{
-			115200,
-			B115200
-		},
-
-#ifdef B230400
-
-		{
-			230400,
-			B230400
-		},
-
-#endif
-#ifdef B460800
-
-		{
-			460800,
-			B460800
-		},
-
-#endif
-#ifdef B500000
-
-		{
-			500000,
-			B500000
-		},
-
-#endif
-#ifdef B921600
-
-		{
-			921600,
-			B921600
-		},
-
-#endif
-
-	};
-	signed lower = 0;
-	signed upper = sizeof (bauds) / sizeof (struct baud);
-	while (lower < upper)
-	{
-		signed index = (lower + upper) >> 1;
-		signed order = baud - bauds [index].baud;
-		if (order < 0)
-		{
-			upper = index - 0;
-			continue;
-		}
-		if (order > 0)
-		{
-			lower = index + 1;
-			continue;
-		}
-		*speed = bauds [index].code;
-		return (0);
-	}
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/binout.c.html b/docbook/binout.c.html deleted file mode 100644 index 6fa1f290..00000000 --- a/docbook/binout.c.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - binout.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void binout (void const * memory, size_t extent, char c, char e, FILE * fp)
- *
- *   memory.h
- *
- *   print memory as a series of binary bytes separated by character
- *   c; normally, character c will be BIN_EXTENDER as defined
- *   in number.h;
- *
- *   for example, binout (memory, 6, '-', stdout) would print
- *
- *      00000000-11010000-01010010-00000000-00000000-00000001
- *
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BINOUT_SOURCE
-#define BINOUT_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-void binout (void const * memory, size_t extent, char c, char e, FILE * fp)
-
-{
-	byte * offset = (byte *)(memory);
-	while (extent--)
-	{
-		unsigned bits = 8;
-		while (bits--)
-		{
-			putc (DIGITS_BIN [(* offset >> bits) & 1], fp);
-		}
-		if ((extent) && (c))
-		{
-			putc (c, fp);
-		}
-		offset++;
-	}
-	if (e)
-	{
-		putc (e, fp);
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/bittypes.h.html b/docbook/bittypes.h.html deleted file mode 100644 index 4c8cc594..00000000 --- a/docbook/bittypes.h.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - bittypes.h - - - - - - - - - -
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef _BITTYPES_H
-#define _BITTYPES_H
-
-#define HAVE_U_INT8_T
-#ifndef HAVE_U_INT8_T
-
-#if SIZEOF_CHAR == 1
-typedef unsigned char u_int8_t;
-typedef signed char int8_t;
-#elif SIZEOF_INT == 1
-typedef unsigned int u_int8_t;
-typedef signed int int8_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int8_t"
-#endif
-#define HAVE_U_INT8_T 1
-#define HAVE_INT8_T 1
-
-#endif /* HAVE_U_INT8_T */
-
-#ifndef HAVE_U_INT16_T 
-
-#if SIZEOF_SHORT == 2
-typedef unsigned short u_int16_t;
-typedef signed short int16_t;
-#elif SIZEOF_INT == 2
-typedef unsigned int u_int16_t;
-typedef signed int int16_t;
-#elif SIZEOF_CHAR == 2
-typedef unsigned char u_int16_t;
-typedef signed char int16_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int16_t"
-#endif
-#define HAVE_U_INT16_T 1
-#define HAVE_INT16_T 1
-
-#endif /* HAVE_U_INT16_T */
-
-#ifndef HAVE_U_INT32_T
-
-#if SIZEOF_INT == 4
-typedef unsigned int u_int32_t;
-typedef signed int int32_t;
-#elif SIZEOF_LONG == 4
-typedef unsigned long u_int32_t;
-typedef signed long int32_t;
-#elif SIZEOF_SHORT == 4
-typedef unsigned short u_int32_t;
-typedef signed short int32_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int32_t"
-#endif
-#define HAVE_U_INT32_T 1
-#define HAVE_INT32_T 1
-
-#endif /* HAVE_U_INT32_T */
-
-#ifndef HAVE_U_INT64_T
-#if SIZEOF_LONG_LONG == 8
-typedef unsigned long long u_int64_t;
-typedef long long int64_t;
-#elif defined(_MSC_EXTENSIONS)
-typedef unsigned _int64 u_int64_t;
-typedef _int64 int64_t;
-#elif SIZEOF_INT == 8
-typedef unsigned int u_int64_t;
-#elif SIZEOF_LONG == 8
-typedef unsigned long u_int64_t;
-#elif SIZEOF_SHORT == 8
-typedef unsigned short u_int64_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int64_t"
-#endif
-
-#endif /* HAVE_U_INT64_T */
-
-#ifndef PRId64
-#ifdef _MSC_EXTENSIONS
-#define PRId64	"I64d"
-#else /* _MSC_EXTENSIONS */
-#define PRId64	"lld"
-#endif /* _MSC_EXTENSIONS */
-#endif /* PRId64 */
-
-#ifndef PRIo64
-#ifdef _MSC_EXTENSIONS
-#define PRIo64	"I64o"
-#else /* _MSC_EXTENSIONS */
-#define PRIo64	"llo"
-#endif /* _MSC_EXTENSIONS */
-#endif /* PRIo64 */
-
-#ifndef PRIx64
-#ifdef _MSC_EXTENSIONS
-#define PRIx64	"I64x"
-#else /* _MSC_EXTENSIONS */
-#define PRIx64	"llx"
-#endif /* _MSC_EXTENSIONS */
-#endif /* PRIx64 */
-
-#ifndef PRIu64
-#ifdef _MSC_EXTENSIONS
-#define PRIu64	"I64u"
-#else /* _MSC_EXTENSIONS */
-#define PRIu64	"llu"
-#endif /* _MSC_EXTENSIONS */
-#endif /* PRIu64 */
-
-#endif /* _BITTYPES_H */
-
- - - diff --git a/docbook/bluetooth.h.html b/docbook/bluetooth.h.html deleted file mode 100644 index f429117d..00000000 --- a/docbook/bluetooth.h.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - bluetooth.h - - - - - - - - - -
-/*
- * Copyright (c) 2006 Paolo Abeni (Italy)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * bluetooth data struct
- * By Paolo Abeni <paolo.abeni@email.it>
- *
- * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $
- */
- 
-#ifndef _PCAP_BLUETOOTH_STRUCTS_H__
-#define _PCAP_BLUETOOTH_STRUCTS_H__
-
-/*
- * Header prepended libpcap to each bluetooth h:4 frame.
- * fields are in network byte order
- */
-typedef struct _pcap_bluetooth_h4_header {
-	u_int32_t direction; /* if first bit is set direction is incoming */
-} pcap_bluetooth_h4_header;
-
-#endif
-
- - - diff --git a/docbook/boot.sh.html b/docbook/boot.sh.html deleted file mode 100644 index a370f064..00000000 --- a/docbook/boot.sh.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - boot.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/boot.sh
-
-# use program int6kboot to initialize an INT6400 device having blank 
-# or corrupt NVRAM; the Bootloader must be running for this script to
-# work properly;
-
-# ====================================================================
-# host symbols;
-# --------------------------------------------------------------------
-
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# confirm connection;
-# --------------------------------------------------------------------
-
-echo -n "Interface [${ETH}]: "; read  
-if [ ! -z ${REPLY} ]; then
-	ETH=${REPLY}
-fi
-
-# ====================================================================
-# check connection;
-# --------------------------------------------------------------------
-
-int6kwait -xqsi ${ETH} 
-if [ ${?} != 0 ]; then
-	echo "Device is not connected"
-	exit 1
-fi
-
-# ====================================================================
-# randomize identity;
-# --------------------------------------------------------------------
-
-MAC=auto
-DAK=$(rkey secret.key -D)
-NMK=$(rkey secret.key -M)
-
-# ====================================================================
-# confirm address;
-# --------------------------------------------------------------------
-
-echo -n "MAC [${MAC}]: "; read
-if [ ! -z ${REPLY} ]; then
-	MAC="${REPLY}"                  
-fi
-
-echo -n "DAK [${DAK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	DAK="${REPLY}"                  
-fi
-
-echo -n "NMK [${NMK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	NMK="${REPLY}"                  
-fi
-
-# ====================================================================
-# modify PIB;
-# --------------------------------------------------------------------
-
-modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB} 
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# flash NVRAM with firmware and factory PIB;
-# --------------------------------------------------------------------
-
-int6kboot -i ${ETH} -P ${PIB} -N ${NVM} -FF
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# confirm identity;
-# --------------------------------------------------------------------
-
-int6k -i ${ETH} -I
-
-# ====================================================================
-# return success;
-# --------------------------------------------------------------------
-
-exit 0   
-
-
-
- - - diff --git a/docbook/bootp.sh.html b/docbook/bootp.sh.html deleted file mode 100644 index 177b804a..00000000 --- a/docbook/bootp.sh.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - bootp.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/bootp.sh
-
-# use program int6kbootp to initialize an INT6400 device having a 
-# blank or corrupt NVRAM; the Bootloader must be running for this 
-# script to work properly;
-
-# ====================================================================
-# host symbols;
-# --------------------------------------------------------------------
-
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# confirm connection;
-# --------------------------------------------------------------------
-
-echo -n "Interface [${ETH}]: "; read  
-if [ ! -z ${REPLY} ]; then
-	ETH=${REPLY}
-fi
-
-# ====================================================================
-# check connection;
-# --------------------------------------------------------------------
-
-int6kwait -xqsi ${ETH} 
-if [ ${?} != 0 ]; then
-	echo "Device is not connected"
-	exit 1
-fi
-
-# ====================================================================
-# randomize identity;
-# --------------------------------------------------------------------
-
-MAC=next
-DAK=key1
-NMK=key1
-
-# ====================================================================
-# confirm address;
-# --------------------------------------------------------------------
-
-echo -n "MAC [${MAC}]: "; read
-if [ ! -z ${REPLY} ]; then
-	MAC="${REPLY}"                  
-fi
-
-echo -n "DAK [${DAK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	DAK="${REPLY}"                  
-fi
-
-echo -n "NMK [${NMK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	NMK="${REPLY}"                  
-fi
-
-# ====================================================================
-# modify PIB;
-# --------------------------------------------------------------------
-
-modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB}
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# flash NVRAM with firmware and factory PIB;
-# --------------------------------------------------------------------
-
-int6kbootp -i ${ETH} -P ${PIB} -N ${NVM} -F       
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# confirm identity;
-# --------------------------------------------------------------------
-
-int6k -i ${ETH} -I
-
-# ====================================================================
-# return success;
-# --------------------------------------------------------------------
-
-exit 0   
-
-
-
- - - diff --git a/docbook/bpf.h.html b/docbook/bpf.h.html deleted file mode 100644 index 7aa59286..00000000 --- a/docbook/bpf.h.html +++ /dev/null @@ -1,960 +0,0 @@ - - - - - - bpf.h - - - - - - - - - -
-/*-
- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from the Stanford/CMU enet packet filter,
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 
- * Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by the University of
- *      California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *      @(#)bpf.h       7.1 (Berkeley) 5/7/91
- *
- * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.8 2008-09-22 20:16:01 guy Exp $ (LBL)
- */
-
-/*
- * This is libpcap's cut-down version of bpf.h; it includes only
- * the stuff needed for the code generator and the userland BPF
- * interpreter, and the libpcap APIs for setting filters, etc..
- *
- * "pcap-bpf.c" will include the native OS version, as it deals with
- * the OS's BPF implementation.
- *
- * XXX - should this all just be moved to "pcap.h"?
- */
-
-#ifndef BPF_MAJOR_VERSION
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* BSD style release date */
-#define BPF_RELEASE 199606
-
-#ifdef MSDOS /* must be 32-bit */
-typedef long          bpf_int32;
-typedef unsigned long bpf_u_int32;
-#else
-typedef	int bpf_int32;
-typedef	u_int bpf_u_int32;
-#endif
-
-/*
- * Alignment macros.  BPF_WORDALIGN rounds up to the next 
- * even multiple of BPF_ALIGNMENT. 
- */
-#ifndef __NetBSD__
-#define BPF_ALIGNMENT sizeof(bpf_int32)
-#else
-#define BPF_ALIGNMENT sizeof(long)
-#endif
-#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
-
-#define BPF_MAXBUFSIZE 0x8000
-#define BPF_MINBUFSIZE 32
-
-/*
- * Structure for "pcap_compile()", "pcap_setfilter()", etc..
- */
-struct bpf_program {
-	u_int bf_len;
-	struct bpf_insn *bf_insns;
-};
- 
-/*
- * Struct return by BIOCVERSION.  This represents the version number of 
- * the filter language described by the instruction encodings below.
- * bpf understands a program iff kernel_major == filter_major &&
- * kernel_minor >= filter_minor, that is, if the value returned by the
- * running kernel has the same major number and a minor number equal
- * equal to or less than the filter being downloaded.  Otherwise, the
- * results are undefined, meaning an error may be returned or packets
- * may be accepted haphazardly.
- * It has nothing to do with the source code version.
- */
-struct bpf_version {
-	u_short bv_major;
-	u_short bv_minor;
-};
-/* Current version number of filter architecture. */
-#define BPF_MAJOR_VERSION 1
-#define BPF_MINOR_VERSION 1
-
-/*
- * Data-link level type codes.
- *
- * Do *NOT* add new values to this list without asking
- * "tcpdump-workers@lists.tcpdump.org" for a value.  Otherwise, you run
- * the risk of using a value that's already being used for some other
- * purpose, and of having tools that read libpcap-format captures not
- * being able to handle captures with your new DLT_ value, with no hope
- * that they will ever be changed to do so (as that would destroy their
- * ability to read captures using that value for that other purpose).
- */
-
-/*
- * These are the types that are the same on all platforms, and that
- * have been defined by <net/bpf.h> for ages.
- */
-#define DLT_NULL	0	/* BSD loopback encapsulation */
-#define DLT_EN10MB	1	/* Ethernet (10Mb) */
-#define DLT_EN3MB	2	/* Experimental Ethernet (3Mb) */
-#define DLT_AX25	3	/* Amateur Radio AX.25 */
-#define DLT_PRONET	4	/* Proteon ProNET Token Ring */
-#define DLT_CHAOS	5	/* Chaos */
-#define DLT_IEEE802	6	/* 802.5 Token Ring */
-#define DLT_ARCNET	7	/* ARCNET, with BSD-style header */
-#define DLT_SLIP	8	/* Serial Line IP */
-#define DLT_PPP		9	/* Point-to-point Protocol */
-#define DLT_FDDI	10	/* FDDI */
-
-/*
- * These are types that are different on some platforms, and that
- * have been defined by <net/bpf.h> for ages.  We use #ifdefs to
- * detect the BSDs that define them differently from the traditional
- * libpcap <net/bpf.h>
- *
- * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
- * but I don't know what the right #define is for BSD/OS.
- */
-#define DLT_ATM_RFC1483	11	/* LLC-encapsulated ATM */
-
-#ifdef __OpenBSD__
-#define DLT_RAW		14	/* raw IP */
-#else
-#define DLT_RAW		12	/* raw IP */
-#endif
-
-/*
- * Given that the only OS that currently generates BSD/OS SLIP or PPP
- * is, well, BSD/OS, arguably everybody should have chosen its values
- * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
- * didn't.  So it goes.
- */
-#if defined(__NetBSD__) || defined(__FreeBSD__)
-#ifndef DLT_SLIP_BSDOS
-#define DLT_SLIP_BSDOS	13	/* BSD/OS Serial Line IP */
-#define DLT_PPP_BSDOS	14	/* BSD/OS Point-to-point Protocol */
-#endif
-#else
-#define DLT_SLIP_BSDOS	15	/* BSD/OS Serial Line IP */
-#define DLT_PPP_BSDOS	16	/* BSD/OS Point-to-point Protocol */
-#endif
-
-/*
- * 17 is used for DLT_OLD_PFLOG in OpenBSD;
- *     OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below.
- * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else.
- */
-
-#define DLT_ATM_CLIP	19	/* Linux Classical-IP over ATM */
-
-/*
- * Apparently Redback uses this for its SmartEdge 400/800.  I hope
- * nobody else decided to use it, too.
- */
-#define DLT_REDBACK_SMARTEDGE	32
-
-/*
- * These values are defined by NetBSD; other platforms should refrain from
- * using them for other purposes, so that NetBSD savefiles with link
- * types of 50 or 51 can be read as this type on all platforms.
- */
-#define DLT_PPP_SERIAL	50	/* PPP over serial with HDLC encapsulation */
-#define DLT_PPP_ETHER	51	/* PPP over Ethernet */
-
-/*
- * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
- * a link-layer type of 99 for the tcpdump it supplies.  The link-layer
- * header has 6 bytes of unknown data, something that appears to be an
- * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
- * I've seen.
- */
-#define DLT_SYMANTEC_FIREWALL	99
-
-/*
- * Values between 100 and 103 are used in capture file headers as
- * link-layer types corresponding to DLT_ types that differ
- * between platforms; don't use those values for new DLT_ new types.
- */
-
-/*
- * This value was defined by libpcap 0.5; platforms that have defined
- * it with a different value should define it here with that value -
- * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
- * whatever value that happens to be, so programs will correctly
- * handle files with that link type regardless of the value of
- * DLT_C_HDLC.
- *
- * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
- * compatibility with programs written for BSD/OS.
- *
- * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
- * for source compatibility with programs written for libpcap 0.5.
- */
-#define DLT_C_HDLC	104	/* Cisco HDLC */
-#define DLT_CHDLC	DLT_C_HDLC
-
-#define DLT_IEEE802_11	105	/* IEEE 802.11 wireless */
-
-/*
- * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
- * except when it isn't.  (I.e., sometimes it's just raw IP, and
- * sometimes it isn't.)  We currently handle it as DLT_LINUX_SLL,
- * so that we don't have to worry about the link-layer header.)
- */
-
-/*
- * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
- * with other values.
- * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
- * (DLCI, etc.).
- */
-#define DLT_FRELAY	107
-
-/*
- * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
- * that the AF_ type in the link-layer header is in network byte order.
- *
- * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
- * we don't use 12 for it in OSes other than OpenBSD.
- */
-#ifdef __OpenBSD__
-#define DLT_LOOP	12
-#else
-#define DLT_LOOP	108
-#endif
-
-/*
- * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
- * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
- * than OpenBSD.
- */
-#ifdef __OpenBSD__
-#define DLT_ENC		13
-#else
-#define DLT_ENC		109
-#endif
-
-/*
- * Values between 110 and 112 are reserved for use in capture file headers
- * as link-layer types corresponding to DLT_ types that might differ
- * between platforms; don't use those values for new DLT_ types
- * other than the corresponding DLT_ types.
- */
-
-/*
- * This is for Linux cooked sockets.
- */
-#define DLT_LINUX_SLL	113
-
-/*
- * Apple LocalTalk hardware.
- */
-#define DLT_LTALK	114
-
-/*
- * Acorn Econet.
- */
-#define DLT_ECONET	115
-
-/*
- * Reserved for use with OpenBSD ipfilter.
- */
-#define DLT_IPFILTER	116
-
-/*
- * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023
- * in SuSE 6.3, so we can't use 17 for it in capture-file headers.
- *
- * XXX: is there a conflict with DLT_PFSYNC 18 as well?
- */
-#ifdef __OpenBSD__
-#define DLT_OLD_PFLOG	17
-#define DLT_PFSYNC	18
-#endif
-#define DLT_PFLOG	117
-
-/*
- * Registered for Cisco-internal use.
- */
-#define DLT_CISCO_IOS	118
-
-/*
- * For 802.11 cards using the Prism II chips, with a link-layer
- * header including Prism monitor mode information plus an 802.11
- * header.
- */
-#define DLT_PRISM_HEADER	119
-
-/*
- * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
- * (see Doug Ambrisko's FreeBSD patches).
- */
-#define DLT_AIRONET_HEADER	120
-
-/*
- * Reserved for Siemens HiPath HDLC.
- */
-#define DLT_HHDLC		121
-
-/*
- * This is for RFC 2625 IP-over-Fibre Channel.
- *
- * This is not for use with raw Fibre Channel, where the link-layer
- * header starts with a Fibre Channel frame header; it's for IP-over-FC,
- * where the link-layer header starts with an RFC 2625 Network_Header
- * field.
- */
-#define DLT_IP_OVER_FC		122
-
-/*
- * This is for Full Frontal ATM on Solaris with SunATM, with a
- * pseudo-header followed by an AALn PDU.
- *
- * There may be other forms of Full Frontal ATM on other OSes,
- * with different pseudo-headers.
- *
- * If ATM software returns a pseudo-header with VPI/VCI information
- * (and, ideally, packet type information, e.g. signalling, ILMI,
- * LANE, LLC-multiplexed traffic, etc.), it should not use
- * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
- * and the like don't have to infer the presence or absence of a
- * pseudo-header and the form of the pseudo-header.
- */
-#define DLT_SUNATM		123	/* Solaris+SunATM */
-
-/* 
- * Reserved as per request from Kent Dahlgren <kent@praesum.com>
- * for private use.
- */
-#define DLT_RIO                 124     /* RapidIO */
-#define DLT_PCI_EXP             125     /* PCI Express */
-#define DLT_AURORA              126     /* Xilinx Aurora link layer */
-
-/*
- * Header for 802.11 plus a number of bits of link-layer information
- * including radio information, used by some recent BSD drivers as
- * well as the madwifi Atheros driver for Linux.
- */
-#define DLT_IEEE802_11_RADIO	127	/* 802.11 plus radiotap radio header */
-
-/*
- * Reserved for the TZSP encapsulation, as per request from
- * Chris Waters <chris.waters@networkchemistry.com>
- * TZSP is a generic encapsulation for any other link type,
- * which includes a means to include meta-information
- * with the packet, e.g. signal strength and channel
- * for 802.11 packets.
- */
-#define DLT_TZSP                128     /* Tazmen Sniffer Protocol */
-
-/*
- * BSD's ARCNET headers have the source host, destination host,
- * and type at the beginning of the packet; that's what's handed
- * up to userland via BPF.
- *
- * Linux's ARCNET headers, however, have a 2-byte offset field
- * between the host IDs and the type; that's what's handed up
- * to userland via PF_PACKET sockets.
- *
- * We therefore have to have separate DLT_ values for them.
- */
-#define DLT_ARCNET_LINUX	129	/* ARCNET */
-
-/*
- * Juniper-private data link types, as per request from
- * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
- * for passing on chassis-internal metainformation such as
- * QOS profiles, etc..
- */
-#define DLT_JUNIPER_MLPPP       130
-#define DLT_JUNIPER_MLFR        131
-#define DLT_JUNIPER_ES          132
-#define DLT_JUNIPER_GGSN        133
-#define DLT_JUNIPER_MFR         134
-#define DLT_JUNIPER_ATM2        135
-#define DLT_JUNIPER_SERVICES    136
-#define DLT_JUNIPER_ATM1        137
-
-/*
- * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
- * <dieter@apple.com>.  The header that's presented is an Ethernet-like
- * header:
- *
- *	#define FIREWIRE_EUI64_LEN	8
- *	struct firewire_header {
- *		u_char  firewire_dhost[FIREWIRE_EUI64_LEN];
- *		u_char  firewire_shost[FIREWIRE_EUI64_LEN];
- *		u_short firewire_type;
- *	};
- *
- * with "firewire_type" being an Ethernet type value, rather than,
- * for example, raw GASP frames being handed up.
- */
-#define DLT_APPLE_IP_OVER_IEEE1394	138
-
-/*
- * Various SS7 encapsulations, as per a request from Jeff Morriss
- * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
- */
-#define DLT_MTP2_WITH_PHDR	139	/* pseudo-header with various info, followed by MTP2 */
-#define DLT_MTP2		140	/* MTP2, without pseudo-header */
-#define DLT_MTP3		141	/* MTP3, without pseudo-header or MTP2 */
-#define DLT_SCCP		142	/* SCCP, without pseudo-header or MTP2 or MTP3 */
-
-/*
- * DOCSIS MAC frames.
- */
-#define DLT_DOCSIS		143
-
-/*
- * Linux-IrDA packets. Protocol defined at http://www.irda.org.
- * Those packets include IrLAP headers and above (IrLMP...), but
- * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
- * framing can be handled by the hardware and depend on the bitrate.
- * This is exactly the format you would get capturing on a Linux-IrDA
- * interface (irdaX), but not on a raw serial port.
- * Note the capture is done in "Linux-cooked" mode, so each packet include
- * a fake packet header (struct sll_header). This is because IrDA packet
- * decoding is dependant on the direction of the packet (incomming or
- * outgoing).
- * When/if other platform implement IrDA capture, we may revisit the
- * issue and define a real DLT_IRDA...
- * Jean II
- */
-#define DLT_LINUX_IRDA		144
-
-/*
- * Reserved for IBM SP switch and IBM Next Federation switch.
- */
-#define DLT_IBM_SP		145
-#define DLT_IBM_SN		146
-
-/*
- * Reserved for private use.  If you have some link-layer header type
- * that you want to use within your organization, with the capture files
- * using that link-layer header type not ever be sent outside your
- * organization, you can use these values.
- *
- * No libpcap release will use these for any purpose, nor will any
- * tcpdump release use them, either.
- *
- * Do *NOT* use these in capture files that you expect anybody not using
- * your private versions of capture-file-reading tools to read; in
- * particular, do *NOT* use them in products, otherwise you may find that
- * people won't be able to use tcpdump, or snort, or Ethereal, or... to
- * read capture files from your firewall/intrusion detection/traffic
- * monitoring/etc. appliance, or whatever product uses that DLT_ value,
- * and you may also find that the developers of those applications will
- * not accept patches to let them read those files.
- *
- * Also, do not use them if somebody might send you a capture using them
- * for *their* private type and tools using them for *your* private type
- * would have to read them.
- *
- * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value,
- * as per the comment above, and use the type you're given.
- */
-#define DLT_USER0		147
-#define DLT_USER1		148
-#define DLT_USER2		149
-#define DLT_USER3		150
-#define DLT_USER4		151
-#define DLT_USER5		152
-#define DLT_USER6		153
-#define DLT_USER7		154
-#define DLT_USER8		155
-#define DLT_USER9		156
-#define DLT_USER10		157
-#define DLT_USER11		158
-#define DLT_USER12		159
-#define DLT_USER13		160
-#define DLT_USER14		161
-#define DLT_USER15		162
-
-/*
- * For future use with 802.11 captures - defined by AbsoluteValue
- * Systems to store a number of bits of link-layer information
- * including radio information:
- *
- *	http://www.shaftnet.org/~pizza/software/capturefrm.txt
- *
- * but it might be used by some non-AVS drivers now or in the
- * future.
- */
-#define DLT_IEEE802_11_RADIO_AVS 163	/* 802.11 plus AVS radio header */
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
- * for passing on chassis-internal metainformation such as
- * QOS profiles, etc..
- */
-#define DLT_JUNIPER_MONITOR     164
-
-/*
- * Reserved for BACnet MS/TP.
- */
-#define DLT_BACNET_MS_TP	165
-
-/*
- * Another PPP variant as per request from Karsten Keil <kkeil@suse.de>.
- *
- * This is used in some OSes to allow a kernel socket filter to distinguish
- * between incoming and outgoing packets, on a socket intended to
- * supply pppd with outgoing packets so it can do dial-on-demand and
- * hangup-on-lack-of-demand; incoming packets are filtered out so they
- * don't cause pppd to hold the connection up (you don't want random
- * input packets such as port scans, packets from old lost connections,
- * etc. to force the connection to stay up).
- *
- * The first byte of the PPP header (0xff03) is modified to accomodate
- * the direction - 0x00 = IN, 0x01 = OUT.
- */
-#define DLT_PPP_PPPD		166
-
-/*
- * Names for backwards compatibility with older versions of some PPP
- * software; new software should use DLT_PPP_PPPD.
- */
-#define DLT_PPP_WITH_DIRECTION	DLT_PPP_PPPD
-#define DLT_LINUX_PPP_WITHDIRECTION	DLT_PPP_PPPD
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>.  The DLT_s are used
- * for passing on chassis-internal metainformation such as
- * QOS profiles, cookies, etc..
- */
-#define DLT_JUNIPER_PPPOE       167
-#define DLT_JUNIPER_PPPOE_ATM   168
-
-#define DLT_GPRS_LLC		169	/* GPRS LLC */
-#define DLT_GPF_T		170	/* GPF-T (ITU-T G.7041/Y.1303) */
-#define DLT_GPF_F		171	/* GPF-F (ITU-T G.7041/Y.1303) */
-
-/*
- * Requested by Oolan Zimmer <oz@gcom.com> for use in Gcom's T1/E1 line
- * monitoring equipment.
- */
-#define DLT_GCOM_T1E1		172
-#define DLT_GCOM_SERIAL		173
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>.  The DLT_ is used
- * for internal communication to Physical Interface Cards (PIC)
- */
-#define DLT_JUNIPER_PIC_PEER    174
-
-/*
- * Link types requested by Gregor Maier <gregor@endace.com> of Endace
- * Measurement Systems.  They add an ERF header (see
- * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
- * the link-layer header.
- */
-#define DLT_ERF_ETH		175	/* Ethernet */
-#define DLT_ERF_POS		176	/* Packet-over-SONET */
-
-/*
- * Requested by Daniele Orlandi <daniele@orlandi.com> for raw LAPD
- * for vISDN (http://www.orlandi.com/visdn/).  Its link-layer header
- * includes additional information before the LAPD header, so it's
- * not necessarily a generic LAPD header.
- */
-#define DLT_LINUX_LAPD		177
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>. 
- * The DLT_ are used for prepending meta-information
- * like interface index, interface name
- * before standard Ethernet, PPP, Frelay & C-HDLC Frames
- */
-#define DLT_JUNIPER_ETHER       178
-#define DLT_JUNIPER_PPP         179
-#define DLT_JUNIPER_FRELAY      180
-#define DLT_JUNIPER_CHDLC       181
-
-/*
- * Multi Link Frame Relay (FRF.16)
- */
-#define DLT_MFR                 182
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>. 
- * The DLT_ is used for internal communication with a
- * voice Adapter Card (PIC)
- */
-#define DLT_JUNIPER_VP          183
-
-/*
- * Arinc 429 frames.
- * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
- * Every frame contains a 32bit A429 label.
- * More documentation on Arinc 429 can be found at
- * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
- */
-#define DLT_A429                184
-
-/*
- * Arinc 653 Interpartition Communication messages.
- * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
- * Please refer to the A653-1 standard for more information.
- */
-#define DLT_A653_ICM            185
-
-/*
- * USB packets, beginning with a USB setup header; requested by
- * Paolo Abeni <paolo.abeni@email.it>.
- */
-#define DLT_USB			186
-
-/*
- * Bluetooth HCI UART transport layer (part H:4); requested by
- * Paolo Abeni.
- */
-#define DLT_BLUETOOTH_HCI_H4	187
-
-/*
- * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
- * <cruz_petagay@bah.com>.
- */
-#define DLT_IEEE802_16_MAC_CPS	188
-
-/*
- * USB packets, beginning with a Linux USB header; requested by
- * Paolo Abeni <paolo.abeni@email.it>.
- */
-#define DLT_USB_LINUX		189
-
-/*
- * Controller Area Network (CAN) v. 2.0B packets.
- * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
- * Used to dump CAN packets coming from a CAN Vector board.
- * More documentation on the CAN v2.0B frames can be found at
- * http://www.can-cia.org/downloads/?269
- */
-#define DLT_CAN20B              190
-
-/*
- * IEEE 802.15.4, with address fields padded, as is done by Linux
- * drivers; requested by Juergen Schimmer.
- */
-#define DLT_IEEE802_15_4_LINUX	191
-
-/*
- * Per Packet Information encapsulated packets.
- * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
- */
-#define DLT_PPI			192
-
-/*
- * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
- * requested by Charles Clancy.
- */
-#define DLT_IEEE802_16_MAC_CPS_RADIO	193
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>. 
- * The DLT_ is used for internal communication with a
- * integrated service module (ISM).
- */
-#define DLT_JUNIPER_ISM         194
-
-/*
- * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
- * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
- */
-#define DLT_IEEE802_15_4	195
-
-/*
- * Various link-layer types, with a pseudo-header, for SITA
- * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
- */
-#define DLT_SITA		196
-
-/*
- * Various link-layer types, with a pseudo-header, for Endace DAG cards;
- * encapsulates Endace ERF records.  Requested by Stephen Donnelly
- * <stephen@endace.com>.
- */
-#define DLT_ERF			197
-
-/*
- * Special header prepended to Ethernet packets when capturing from a
- * u10 Networks board.  Requested by Phil Mulholland
- * <phil@u10networks.com>.
- */
-#define DLT_RAIF1		198
-
-/*
- * IPMB packet for IPMI, beginning with the I2C slave address, followed
- * by the netFn and LUN, etc..  Requested by Chanthy Toeung
- * <chanthy.toeung@ca.kontron.com>.
- */
-#define DLT_IPMB		199
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>. 
- * The DLT_ is used for capturing data on a secure tunnel interface.
- */
-#define DLT_JUNIPER_ST          200
-
-/*
- * Bluetooth HCI UART transport layer (part H:4), with pseudo-header
- * that includes direction information; requested by Paolo Abeni.
- */
-#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR	201
-
-/*
- * AX.25 packet with a 1-byte KISS header; see
- *
- *	http://www.ax25.net/kiss.htm
- *
- * as per Richard Stearn <richard@rns-stearn.demon.co.uk>.
- */
-#define DLT_AX25_KISS		202
-
-/*
- * LAPD packets from an ISDN channel, starting with the address field,
- * with no pseudo-header.
- * Requested by Varuna De Silva <varunax@gmail.com>.
- */
-#define DLT_LAPD		203
-
-/*
- * Variants of various link-layer headers, with a one-byte direction
- * pseudo-header prepended - zero means "received by this host",
- * non-zero (any non-zero value) means "sent by this host" - as per
- * Will Barker <w.barker@zen.co.uk>.
- */
-#define DLT_PPP_WITH_DIR	204	/* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */
-#define DLT_C_HDLC_WITH_DIR	205	/* Cisco HDLC */
-#define DLT_FRELAY_WITH_DIR	206	/* Frame Relay */
-#define DLT_LAPB_WITH_DIR	207	/* LAPB */
-
-/*
- * 208 is reserved for an as-yet-unspecified proprietary link-layer
- * type, as requested by Will Barker.
- */
-
-/*
- * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman
- * <avn@pigeonpoint.com>.
- */
-#define DLT_IPMB_LINUX		209
-
-/*
- * FlexRay automotive bus - http://www.flexray.com/ - as requested
- * by Hannes Kaelber <hannes.kaelber@x2e.de>.
- */
-#define DLT_FLEXRAY		210
-
-/*
- * Media Oriented Systems Transport (MOST) bus for multimedia
- * transport - http://www.mostcooperation.com/ - as requested
- * by Hannes Kaelber <hannes.kaelber@x2e.de>.
- */
-#define DLT_MOST		211
-
-/*
- * Local Interconnect Network (LIN) bus for vehicle networks -
- * http://www.lin-subbus.org/ - as requested by Hannes Kaelber
- * <hannes.kaelber@x2e.de>.
- */
-#define DLT_LIN			212
-
-/*
- * X2E-private data link type used for serial line capture,
- * as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
- */
-#define DLT_X2E_SERIAL		213
-
-/*
- * X2E-private data link type used for the Xoraya data logger
- * family, as requested by Hannes Kaelber <hannes.kaelber@x2e.de>.
- */
-#define DLT_X2E_XORAYA		214
-
-/*
- * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
- * nothing), but with the PHY-level data for non-ASK PHYs (4 octets
- * of 0 as preamble, one octet of SFD, one octet of frame length+
- * reserved bit, and then the MAC-layer data, starting with the
- * frame control field).
- *
- * Requested by Max Filippov <jcmvbkbc@gmail.com>.
- */
-#define DLT_IEEE802_15_4_NONASK_PHY	215
-
-/*
- * DLT and savefile link type values are split into a class and
- * a member of that class.  A class value of 0 indicates a regular
- * DLT_/LINKTYPE_ value.
- */
-#define DLT_CLASS(x)		((x) & 0x03ff0000)
-
-/*
- * NetBSD-specific generic "raw" link type.  The class value indicates
- * that this is the generic raw type, and the lower 16 bits are the
- * address family we're dealing with.  Those values are NetBSD-specific;
- * do not assume that they correspond to AF_ values for your operating
- * system.
- */
-#define	DLT_CLASS_NETBSD_RAWAF	0x02240000
-#define	DLT_NETBSD_RAWAF(af)	(DLT_CLASS_NETBSD_RAWAF | (af))
-#define	DLT_NETBSD_RAWAF_AF(x)	((x) & 0x0000ffff)
-#define	DLT_IS_NETBSD_RAWAF(x)	(DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF)
-
-/*
- * The instruction encodings.
- */
-/* instruction classes */
-#define BPF_CLASS(code) ((code) & 0x07)
-#define		BPF_LD		0x00
-#define		BPF_LDX		0x01
-#define		BPF_ST		0x02
-#define		BPF_STX		0x03
-#define		BPF_ALU		0x04
-#define		BPF_JMP		0x05
-#define		BPF_RET		0x06
-#define		BPF_MISC	0x07
-
-/* ld/ldx fields */
-#define BPF_SIZE(code)	((code) & 0x18)
-#define		BPF_W		0x00
-#define		BPF_H		0x08
-#define		BPF_B		0x10
-#define BPF_MODE(code)	((code) & 0xe0)
-#define		BPF_IMM 	0x00
-#define		BPF_ABS		0x20
-#define		BPF_IND		0x40
-#define		BPF_MEM		0x60
-#define		BPF_LEN		0x80
-#define		BPF_MSH		0xa0
-
-/* alu/jmp fields */
-#define BPF_OP(code)	((code) & 0xf0)
-#define		BPF_ADD		0x00
-#define		BPF_SUB		0x10
-#define		BPF_MUL		0x20
-#define		BPF_DIV		0x30
-#define		BPF_OR		0x40
-#define		BPF_AND		0x50
-#define		BPF_LSH		0x60
-#define		BPF_RSH		0x70
-#define		BPF_NEG		0x80
-#define		BPF_JA		0x00
-#define		BPF_JEQ		0x10
-#define		BPF_JGT		0x20
-#define		BPF_JGE		0x30
-#define		BPF_JSET	0x40
-#define BPF_SRC(code)	((code) & 0x08)
-#define		BPF_K		0x00
-#define		BPF_X		0x08
-
-/* ret - BPF_K and BPF_X also apply */
-#define BPF_RVAL(code)	((code) & 0x18)
-#define		BPF_A		0x10
-
-/* misc */
-#define BPF_MISCOP(code) ((code) & 0xf8)
-#define		BPF_TAX		0x00
-#define		BPF_TXA		0x80
-
-/*
- * The instruction data structure.
- */
-struct bpf_insn {
-	u_short	code;
-	u_char 	jt;
-	u_char 	jf;
-	bpf_u_int32 k;
-};
-
-/*
- * Macros for insn array initializers.
- */
-#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
-#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
-
-#if __STDC__ || defined(__cplusplus)
-extern int bpf_validate(const struct bpf_insn *, int);
-extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
-#else
-extern int bpf_validate();
-extern u_int bpf_filter();
-#endif
-
-/*
- * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
- */
-#define BPF_MEMWORDS 16
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
- - - diff --git a/docbook/bytespec.c.html b/docbook/bytespec.c.html deleted file mode 100644 index 5c522751..00000000 --- a/docbook/bytespec.c.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - bytespec.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t bytespec (char const *string,  void * memory, size_t extent);
- *
- *   memory.h
- *
- *   encode a memory region with a fixed-length hexadecimal string;
- *   return the number of bytes encoded or terminate the program on
- *   error;
- *
- *   the number of octets in string must equal the memory extent or
- *   an error will occur; octets may be seperated by colons; empty
- *   octets are illegal;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef BYTESPEC_SOURCE
-#define BYTESPEC_SOURCE
-
-#include <ctype.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-size_t bytespec (char const * string, void * memory, size_t extent)
-
-{
-	char const * number = string;
-	byte * origin = (byte *)(memory);
-	byte * offset = (byte *)(memory);
-	if (!number)
-	{
-		error (1, EINVAL, "bytespec");
-	}
-	while (isspace (*number))
-	{
-		number++;
-	}
-	while ((*number) && (extent))
-	{
-		unsigned digit;
-		if ((offset > origin) && (*number == HEX_EXTENDER))
-		{
-			number++;
-		}
-		if ((digit = todigit (*number++)) >= RADIX_HEX)
-		{
-			error (1, EINVAL, "You said '%s' but I want a hex digit", string);
-		}
-		*offset = digit << 4;
-		if ((digit = todigit (*number++)) >= RADIX_HEX)
-		{
-			error (1, EINVAL, "You said '%s' but I want a hex digit", string);
-		}
-		*offset |= digit;
-		offset++;
-		extent--;
-	}
-	while (isspace (*number))
-	{
-		number++;
-	}
-	if ((*number) || (extent))
-	{
-		error (1, EINVAL, "%s is not %d bytes", string, (unsigned)(offset - origin + extent));
-	}
-	return (offset - origin);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/ch01.html b/docbook/ch01.html deleted file mode 100644 index 78ed9abe..00000000 --- a/docbook/ch01.html +++ /dev/null @@ -1,90 +0,0 @@ -Chapter 1.  Overview

Chapter 1.  - Overview -

Table of Contents

- Introduction -
- Background -
- Toolkit Distribution -
- Toolkit Installation on Linux -
- Toolkit Installation on GNU/Linux™ -
- Toolkit Documentation on GNU/Linux -
- Toolkit Removal on GNU/Linux™ -
- Toolkit Installation on Mac OS X -
- Toolkit Installation on Windows XP™ -
- Obtaining the Toolkit -
- Installing the Toolkit -
- Setting the PATH variable -
- Removing the Toolkit -
- Toolkit Installation on Windows 7™ -
- Obtaining the Toolkit -
- Installing the Toolkit -
- Setting the PATH variable -
- Removing the Toolkit -
- Toolkit Programs -
- INT6400 Device Management -
- INT6400 Device Monitoring -
- AR7400 Device Management -
- AR7400 Device Monitoring -
- AR7420 Device Configuration -
- Parameter File Management -
- Firmware File Management -
- Ethernet Traffic -
- Passwords and Keys -
- MDIO Programming -
- Serial Programming -
- Toolkit Folders -
- Packages -
- Toolkit Support -

- Introduction -

- The Open Powerline Toolkit (vanilla version) may be downloaded from https://github.com/qca/open-plc-utils.git by any interested party. An advanced version (chocolate version) may be downloaded from the Qualcomm Atheros Customer FTP site by parties having permission to do so. The chocolate version includes special programs that perform advanced engineering, production and maintenance tasks. Within this document, we refer to both versions, collectively, as the toolkit. -

- The toolkit contains C Language source code and GNU™ makefiles to compile many useful programs. It also includes Linux shell scripts that use these programs, in various ways, to interrogate, control and manage Qualcomm Atheros INT6000™, INT6300™, INT6400™, AR7400™ and later powerline devices. Qualcomm Atheros also provides a similar, but less extensive, toolkit for INT5500™ powerline devices. -

- The toolkit is intended for hardware engineers, verification engineers, field engineers and embedded software developers, consequently, programs are simple and compact. It is not intended for computer novices or retail users. Many customers embed a subset of toolkit programs in products for troubleshooting purposes. -

- The toolkit includes extensive HTML documentation and online man pages for users who cannot access installed man pages. HTML documentation starts with file docbook/index.html. Online man pages start with file docbook/toolkit.html. Qualcomm Atheros recommends that you add these two pages to your browser favorites for later reference. -

- All toolkit programs are written in C and have command line intefaces. The source code essentially conforms to ISO/IEC9899:1999. The source tree cleanly compiles using gcc or pcc on Ubuntu, OpenBSD and MacOSX. It also compiles under Microsoft C with the inclusion of special header files. The command line interface conforms to Section 12.2 Utility Syntax Guidelines of The Open Group Base Specification Issue 6 ( -IEEE Std 1003.1, 2004 Edition). -

- The toolkit includes Microsoft Visual Studio .NET project files and solutions files to compile toolkit programs, plus the executable version (.exe) of each program and a set of Microsoft installation file (.msi) so that the toolkit package comes ready to install and run on any Windows host; however, Qualcomm Atheros does not provide support for Microsoft windows version of this toolkit. Toolkit documentation does provide Windows developers with special guidance on setting up their own Visual Studio projects and solutions, should they want to do that. -

diff --git a/docbook/ch01s02.html b/docbook/ch01s02.html deleted file mode 100644 index 58a162ff..00000000 --- a/docbook/ch01s02.html +++ /dev/null @@ -1,17 +0,0 @@ -Background

- Background -

- HomePlug® AV is an industry standard protocol for powerline communications developed by the HomePlug Powerline Alliance. Qualcomm Atheros manufactures a family of chipsets that conform to that standard and have MII, UART and SPI host interfaces. The INT6x00™ and AR7x00™ series are flagship members of that chipset family. The principle difference between the chipsets is their boot method, cost and speed. The INT6000™ requires onboard NVRAM but the INT6300™, INT6400™ and AR7400™ do not. -

- The HomePlug® AV protocol is based on IEEE-802.3, has ethertype 0x88E1 and uses special message formats. A subset of those message formats is reserved for each chipset vendor to define their own message formats. Qualcomm Atheros uses this vendor-specific subset to communicate between host processors and Qualcomm Atheros devices. This toolkit uses Qualcomm Atheros vendor-specific message formats to communicates with Qualcomm Atheros devices. It also understands Qualcomm Atheros firmware and configuration file formats. -

- This toolkit sends and receives Qualcomm Atheros vendor-specific messages but not generic HomePlug® AV messages. Qualcomm Atheros vendor-specific management message formats are described in the Qualcomm Atheros HomePlug® AV Firmware Technical Reference Manual. If you do not have a copy of this document then you may request one from Qualcomm Atheros. -

diff --git a/docbook/ch01s03.html b/docbook/ch01s03.html deleted file mode 100644 index 69ce8bea..00000000 --- a/docbook/ch01s03.html +++ /dev/null @@ -1,19 +0,0 @@ -Toolkit Distribution

- Toolkit Distribution -

- The Qualcomm Atheros Open Powerline Toolkit is distributed using compressed tape archive files named open-plc-utils-x.x.x.tar.gz and open-plc-utils-x.x.x.tar.bz2 and standard compressed archive file named open-plc-utils-x.x.x.zip, where x.x.x is the version number. Archive files ending in .gz can be decompressed with the Linux gzip utility. Archive files ending in .bz2 can be decompressed with the Linux bzip2 utility. Archive files ending in .zip can be decompressed using the Linux unzip utility or the Windows WinZip utility. The contents of decompressed archives can be extracted using the Linux tar utility. Recent versions of the Linux tar utility allow decompression and extraction in one operation. The WinZip or 7-zip program may be used to decompress archives and extract contents on Microsoft Windows platforms. -

- Some Windows network administrators enable security software that removes .exe and other executable files from .zip archives in transit or in-situ. In that case, Windows user may want to download the *.tar.gz archive and use a program like 7zip to unpack the archive file. -

- The toolkit includes source code, build scripts, documentation and pre-compiled programs for Microsoft Windows. Some third party libraries may also be included to support Microsoft platforms. Although the Microsoft Windows versions of toolkit programs are pre-compiled and ready-to-run, they are not supported because this package is designed for use on Linux platforms. -

- The Windows installer included in this version of the toolkit needs Microsoft .NET 1.1. Windows versions of toolkit programs that communicate with powerline devices need WinPcap 4.1.2 or later. A copy of Microsoft .NET 1.1 and WinPcap 4.1.2 is included in the support folder. -

diff --git a/docbook/ch01s04.html b/docbook/ch01s04.html deleted file mode 100644 index e050cc98..00000000 --- a/docbook/ch01s04.html +++ /dev/null @@ -1,49 +0,0 @@ -Toolkit Installation on Linux

- Toolkit Installation on Linux -

- The Linux version of the toolkit must be compiled from source code. The only requirement is the standard GNU/Linux toolchain consisting of make, gcc and ld. These are included with most Linux distributions but may require installation. On Debian™ based distributions, such as Ubuntu™, they may be installed using apt-get. On RedHat™ distributions, such as Fedora™, they may be installed using rpm. On SuSE™ based distributions, they may be installed using YaST2. -

- Toolkit Installation on GNU/Linux™ -

Example 1.1.  - Toolkit Installation on GNU/Linux™ -

-# cp plc-utils-1.2.1.tar.gz /home/mydir
-# cd /home/mydir
-# tar -vzxf plc-utils-1.2.1.tar.gz
-# cd plc-utils-1.2.1
-# make
-# make install
-# make manuals
-

- Decompress the archive and extract the contents with the tar utility. This will create a folder having the same basename as the archive such that one version will not over-write another. Consult the tar man page on your system for detailed instructions. Change directory to the appropriate folder. -

- The main package folder contains a recursive Makefile that will compile and install all toolkit programs. If you do not want to compile and install all programs then change directory to the appropriate folder and run make from there. To compile binary files, type make. To install binary files, type make install. To install man pages, type make manuals. The package does not automatically install examples, scripts, applets or man pages. -

- We recommend that you login as root user before installing the toolkit; otherwise, you will be prompted for the root password as each program or component is installed. -

- Programs are installed in folder /usr/local/bin and man pages are installed in folders /usr/share/man/man1. If these folders are not correct for your system, or if you want to install in other folders, then edit the folder names defined in the make.def file found in main toolkit folder or over-ride these definitions in subordinate makefiles. -

- Toolkit Documentation on GNU/Linux -

- Toolkit web pages are not automatically installed. To access toolkit documentation, point your browser to docbook/index.html and add the page to the browser bookmark or favorites list. If you are interested in how the toolkit has been implemented then do the same for page docbook/toolkit.html.

- The method described above is only recommended if you do not plan to move or remove toolkit folders. Otherwise, you can merely copy the entire contents of the toolkit docbook folder to another folder of your choice and point your browser to the new file locations. -

-cp -rv docbook/* /home/mydir/toolkit
-

- Toolkit Removal on GNU/Linux™ -

- To uninstall installed programs and man pages on Linux, change to the main toolkit folder and type make uninstall. -

Example 1.2.  - Toolkit Removal on GNU/Linux™ -

-# cd /home/mydir/plc-utils-1.2.1
-make uninstall
-

diff --git a/docbook/ch01s05.html b/docbook/ch01s05.html deleted file mode 100644 index 8a1780e1..00000000 --- a/docbook/ch01s05.html +++ /dev/null @@ -1,32 +0,0 @@ -Toolkit Installation on Mac OS X

- Toolkit Installation on Mac OS X -

- Toolkit installation on Mac OS X™ is essentially identical to installation on Linux but special steps are needed before starting. -

- First, you must install the toolkit as the root user or you will be denied permission. The root user account is disabled by default and so you must enable it in order to login. Follow instructions at Enabling the "root" user in Mac OS X to enable the account and login. After installation, toolkit programs should be run from a normal user account. -

- Second, Mac OS X™ does not include C Language development tools by default. You must download and install them in order to build the toolkit. You can download and install them from the Apple website or (if you are ambitious) download, compile and install them from various open source websites. Consider using Xcode on Mac OS X Leopard or Lion. -

- Login as the root user and download or copy the toolkit archive file to your preferred folder then follow the instructions for installing the toolkit on Linux. -

Example 1.3.  - Setting the PATH variable on OS X™ -

- While still logged in as the root user, edit /etc/profile and add folder/usr/local/bin to the PATH definition found there. This will ensure that all users can access toolkit programs. The change may not take effect until the next time you login or open a new command shell. -

-PATH="/bin:/sbin:/usr/local/bin"
-

Example 1.4.  - Removing the Toolkit from Mac OS X™ -

- While still logged in as the root user, remember to delete the toolkit source folder or, at least change ownership of all files in the toolkit folder, so that you can access and/or remove them later. This deletes the toolkit source code and intermmediate files without removing any installed toolkit programs. -

-cd ..
-rm -r plc-utils-x.x.x
-

diff --git a/docbook/ch01s06.html b/docbook/ch01s06.html deleted file mode 100644 index 37b45884..00000000 --- a/docbook/ch01s06.html +++ /dev/null @@ -1,65 +0,0 @@ -Toolkit Installation on Windows XP™

- Toolkit Installation on Windows XP™ -

- The Windows™ version of the toolkit comes pre-compiled and ready to install and run using the Windows Installer. You may copy and distribute installation file plc-utils-x.x.x.msi. Users may then click on the installation file to install the package then discard it afterwards. The installation file permits remote installation over the network. -

- The version of the Windows Installer used here needs Microsoft .NET Framework 1.1™ to work correctly. Newer versions of the .NET Framework™ will not work. The .NET Framework™ must be installed before the toolkit is installed or the Windows Installer™ will report dependency errors and refuse to complete installation. Multiple versions of the .NET Framework™ can coexist under Windows 7™. The .NET Framework™ needed is included in the toolkit support folder. -

- Windows versions of toolkit programs that communicate with powerline devices all need WinPcap™ from winpcap.org to read and write Ethernet frames. WinPcap™ may be installed before or after toolkit installation but tools that access powerline devices will not run without it. You may want to install WinPcap™ before starting toolkit installation. If you have Wireshark™ installed then you probably already have WinPcap™ installed. A recent copy of WinPcap™ is included in the toolkit support folder. -

- Failure to remove previous toolkit versions on some systems may result in the message "Another version of this product is already installed" when trying to install a new version. You may want to remove prior version before starting toolkit installation. -

- Obtaining the Toolkit -

- QCA customers can download the toolkit from the QCA Customer FTP Site. -

- QCA employees may be able to download the toolkit from the QCA Application Engineering World FTP site ftp://appslinux01.qca.qualcomm.com/toolkit/plc-utils/. There are several installers available for Windows. Each installs a subset of the toolkit. Download the desired installer files to your local machine then execute them by right-clicking on them and selecting option "Run as Administrator". -

- Installing the Toolkit -

- Use a compression program like WinZip to decompress the archive file and extract all files. Use Microsoft Windows Explorer to locate file .\VisualStudioNET\plc-utils-x.x.x.msi under the main toolkit folder. Click on the file to start the Windows Installer then follow the installation instructions. -

Figure 1.1.  - Windows Installer Dialogue -

Windows Installer Dialogue

- Older toolkit programs were installed in folder C:\Program Files\Atheros\Toolkit but they are now installed in folder C:\Program Files\Qualcomm Atheros\Open Powerline Toolkit instead. If you select a different folder, remember it for the next step. -

- Setting the PATH variable -

- Toolkit programs have command line interfaces and must be run from an open console window. To simplify program access and minimize the typing required, add the toolkit installation path mentioned above to the PATH environment variable by following steps listed below. If you have Administrator privileges then we recommend that you edit the system PATH variable; otherwise, you may need to create and/or edit a user PATH variable. -

Figure 1.2.  - Control Panel System Dialogue -

Control Panel System Dialogue

  1. - On the Start menu, select the Control Panel option. -

  2. - In the Control Panel window, select the System icon. -

  3. - On the System Properties dialog box, select the Advanced tab. -

  4. - On the Advanced tab, press the Environment Variables button. -

  5. - On the Environment Variables dialog box, scroll down the System variables list and select the Path variable then press the Edit button. -

  6. - On the Edit System Variable dialogue box, append the installation path to the Variable value field. -

  7. - Press the OK button. -

- Removing the Toolkit -

- To remove an existing version of the Qualcomm Atheros Open Powerline Toolkit from your system, follow the steps listed below. If the toolkit is not installed on your system then omit these steps. If you are unsure, you can follow them to determine if you have the toolkit installed or you can attempt to install, anyway, and return here if installation is prevented. -

Figure 1.3.  - Control Panel Add/Remove Dialogue -

Control Panel Add/Remove Dialogue

  1. - On the Start menu, select the Control Panel option. -

  2. - In the Control Panel window, select the Add or Remove Programs icon. -

  3. - On the Add or Remove Programs dialog box, scroll down and select the Qualcomm Atheros Open Powerline Toolkit entry then press the Remove pushbutton. -

diff --git a/docbook/ch01s07.html b/docbook/ch01s07.html deleted file mode 100644 index ae054beb..00000000 --- a/docbook/ch01s07.html +++ /dev/null @@ -1,67 +0,0 @@ -Toolkit Installation on Windows 7™

- Toolkit Installation on Windows 7™ -

- The Windows™ version of the toolkit comes pre-compiled and ready to install and run using the native Windows Installer. You may copy and distribute installation file plc-utils-x.x.x.msi. Users merely click on the file to install the package and may discard it afterwards. This method of installation permits remote installation over network. -

- The version of the Windows Installer used here needs Microsoft .NET Framework 1.1™ to work correctly. Newer versions of the .NET Framework™ will not work. The .NET Framework™ must be installed before the toolkit is installed or the Windows Installer™ will report dependency errors and refuse to complete installation. Multiple versions of the .NET Framework™ can coexist under Windows 7™. The .NET Framework™ needed is included in the toolkit support folder. -

- Failure to remove previous toolkit versions on some systems may result in the message "Another version of this product is already installed" when trying to install a new version. You may want to remove prior version before starting toolkit installation. -

- Windows versions of toolkit programs that communicate with powerline devices all need WinPcap™ from winpcap.org to read and write Ethernet frames. WinPcap™ may be installed before or after toolkit installation but tools that access powerline devices will not run without it. You may want to install WinPcap™ before starting toolkit installation. If you have Wireshark™ installed then you probably already have WinPcap™ installed. A recent copy of WinPcap™ is included in the toolkit support folder. -

- Obtaining the Toolkit -

- QCA customers can download the toolkit from the QCA Customer FTP Site. -

- QCA employees may be able to download the toolkit from the QCA Application Engineering World FTP site ftp://appslinux01.qca.qualcomm.com/toolkit/plc-utils/. There are several installers available for Windows. Each installs a subset of the toolkit. Download the desired installer files to your local machine then execute them by right-clicking on them and selecting option "Run as Administrator". -

- Installing the Toolkit -

- Older toolkit programs were installed in folder C:\Program Files\Atheros\Toolkit by default but now they are installed in C:\Program Files (x86)\Qualcomm Atheros\Open Powerline Toolkit instead. If you select a different folder during installation then remember it for the next step. -

Figure 1.4.  - Windows Installer Dialogue -

Windows Installer Dialogue

- Accept install defaults. -

- Setting the PATH variable -

- Toolkit programs have command line interfaces and must be run from an open console window. To simplify program access and minimize the typing required, add the toolkit installation path mentioned above to the PATH environment variable by following steps listed below. If you have Administrator privileges then we recommend that you edit the system PATH variable; otherwise, you may need to create and/or edit a user PATH variable. -

Figure 1.5.  - Control Panel System Dialogue -

Control Panel System Dialogue

  1. - On the Start menu, select the Control Panel option. -

  2. - On the Adjust system settings page, select the System icon. -

  3. - On the View basic information about your computer page, select the Advanced system settings option. -

  4. - On the System Properties dialog, press the Environment Variables button. -

  5. - On the Environment Variables dialog box, scroll down the System variables list and select the Path variable then press the Edit button. -

  6. - On the Edit System Variable dialogue box, append the installation path to the Variable value field. -

  7. - Press the OK button. -

- Environment variable changes made here do not take effect until a console window is opened. This means that you may need to close and then reopen console windows that depend on the changes. It is a good idea to immediately open a console window and execute a toolkit command in order to confirm that the PATH variable is properly defined. -

- Removing the Toolkit -

- To remove an existing version of the Qualcomm Atheros Open Powerline Toolkit from your system, follow the steps listed below. If the toolkit is not installed on your system then omit these steps. If you are unsure, you can follow them to determine if you have the toolkit installed or you can attempt to install, anyway, and return here if installation is prevented. -

Figure 1.6.  - Control Panel Add/Remove Dialogue -

Control Panel Add/Remove Dialogue

  1. - On the Start menu, select the Control Panel option. -

  2. - On the Adjust system settings page, select the Programs and Features icon. -

  3. - On the Uninstall or change a program page, scroll down and select the appropriate QCA Open Powerline Toolkit entry then press the Remove pushbutton. There may be several different QCA Open Powerline Toolkit entries so be sure to select the correct one. -

diff --git a/docbook/ch01s08.html b/docbook/ch01s08.html deleted file mode 100644 index 2fa12389..00000000 --- a/docbook/ch01s08.html +++ /dev/null @@ -1,461 +0,0 @@ -Toolkit Programs

- Toolkit Programs -

- The Qualcomm Atheros Open Powerline Toolkit is a collection of small, command line programs. Each program deals with some aspect of powerline device management. Programs can be combined, in various ways, using shell scripts, to perform sophisticated and complex tasks. With these program, one can identify chipset and firmware version, reset devices, flash devices, identify other powerline network devices, validate *.pib and *.nvm files, sniff HomePlug® AV Ethernet frames, send generic Ethernet frames and so on. -

- Program source code is designed to demonstrate device hardware and firmware features and to illustrate techniques for software developers and hardware engineers. The source code may be modified and distributed without obligation to Qualcomm Atheros; however Qualcomm Atheros would appreciate feedback concerning improvements to program useability, reliability or efficiency. Keep in mind that these tools, unlike some other tools, are intended to be simple and compact. -

- Most programs in this toolkit start their life on Linux and are eventually ported to other environments. Consequently, not all programs are available in the Windows version of the toolkit but most of them are. -

- Program descriptions appear below in alphabetical order. Alternately, you may browse the latest program descriptions and source code here. -

- INT6400 Device Management -

- Programs in this group are older versions that communicate with INT6x00 chipsets. Many still work on AR7x00 chipsets. The main difference is due to the higher PHY data rates on AR7x00 chipsets. The higher data rates must be expressed using 16-bits instead of 8-bits. Consequently, some MME formats have changed. -

- - int64host - -

- A command line utility that waits for and services VS_HST_ACTION messages from a flash-less device INT6300™ or INT6400™ device. It is similar to program int6khost but does not use an SDRAM configuration files. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int64host man page for more information. -

- - int6k - -

- A command line utility to inspect and control INT6000™ and INT6300™ devices connected to the local host. It performs several of the device maintenance functions available in the Atheros Windows Device Manager but is small enough to run on an embedded system. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder .int6k. See the int6k man page for more information. -

- - int6k2 - -

- A command line utility to inspect and control INT6000™ and int6300™ devices connected to the local host. It is similar to int6k but calls the Atheros Embedded API, described in the Atheros HomePlug® AV API User's Guide, to perform device management tasks. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6k2 man page for more information. -

- - int6kboot - -

- A command line utility to start and optionally flash INT6300™ and INT6400™' devices that have no NVRAM or have a blank or corrupted NVRAM. It communicates with the Atheros Bootloader to configure SDRAM, download runtime firmware and PIB and start firmware execution. Users can optionally request that the same PIB and firmware then be used to flash NVRAM. It is similar to program int6kf but does not accept an SDRAM configuration file. Instead, it uses on the memctl applet. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kboot man page for more information. -

- - int6kf - -

- A command line utility to start and optionally flash INT6000™ and INT6300™ devices having no NVRAM or having a blank or corrupted NVRAM. It communicates with the Atheros Bootloader to configure SDRAM, download runtime firmware and PIB and start firmwrae execution. It can also be used to force flash blank or corrupted NVRAM. It is similar to program int6kboot but requires an SDRAM parameter file. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kf man page for more information. -

- - int6khost - -

- A command line utility that waits for and services VS_HST_ACTION messages from a flash-less INT6000™ or INT6300™ device. It is similar to program in64host but needs an SDRAM configuration file. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6khost man page for more information. -

- - int6kid - -

- A command line utility that prints the DAK or NMK strings read from one or more devices. It can be used in shell scripts to dynamically obtain device keys and insert them on program command lines as arguments. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kid man page for more information. -

- - int6klist - -

- A command line utility that lists local devices, or remote devices associated with a specific device, on stdout in undecorated format. It can be used in shell scripts to dynamically determine, and then traverse, network topology. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6klist man page for more information. -

- - int6kprobe - -

- A command line utility that probes for neighboring networks. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kprobe man page for more information. -

- - int6krule - -

- A command line utility to format and send classification rules to a device. Classification rules are specified using symbolic names for actions, options, conditions and frame fields. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6krule man page for more information. -

- - int6ktest - -

- A command line utility that downloads and executes program images stored in an Atheros .nvm file. This program can be used to download and execute Atheros hardware diagnostic programs like those in the ./applets folder. It is not intended to download and start runtime firmware, although it may be used for that. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6ktest man page for more information. -

- - int6kuart - -

- A command line utility used to manage a local powerline device over a host serial line interface. Program command line options are translated to AT-style serial commands and sent to the device. THe primary benefits of using this program, in place of a terminal emulator, is the ability to download parameter blocks and upload paameter blocks and firmware images. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./serial. See the int6kuart man page for more information. -

- - int6kwait - -

- A command line utility that polls the local powerline device and waits for the bootloader or runtime firmware to either stop executing or start executing or wait for a device to associate with another device. It can be used to synchronize scripts with device or network events such as connection make or break, power on or off and firmware stop or start. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kwait man page for more information. -

- INT6400 Device Monitoring -

- - int6klog - -

- A command line utility that exports the runtime watchdog report in binary or XML format. Output is suitable for input to the Atheros Windows Device Manager. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6klog man page for more information. -

- - int6krate - -

- A command line utility that polls a device and prints the average transmit and receive PHY rates between it and each of it's network neighbors. Program output is suitable for loading into a spreadsheet or other program that can process column-oriented information. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6krate man page for more information. -

- This program is suitable for use with INT6x00 chipsets but not AR7x00 chipsets due to higher PHY rates. Use program amprate for AR7x00 chipsets and plcrate for mixed chipset environments. -

- - int6kstat - -

- A command line utility that polls a poserline device and prints various network and link statistics in a format suitable for processing by another program. It is a work in progress because we are investigating different ways to present the information. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kstat man page for more information. -

- AR7400 Device Management -

- The programs in this group are essentially identical to those in the INT6x00 group but they support higher PHY data rates offered by the AR7x00 chipsets. Specifically, they handle the new VS_NW_INFO and VS_LNK_STATS message formats. -

- - ampboot - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampboot man page for more information. -

- - amphost - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amphost man page for more information. -

- - ampinit - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampinit man page for more information. -

- - amplist - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amplist man page for more information. -

- - amptest - -

- A command line utility that downloads and executes program images stored in an Atheros .nvm file. It can be used to download and execute special Atheros hardware diagnostic programs. It is not intended to download and start runtime firmware. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amptest man page for more information. -

- - amptool - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amptool man page for more information. -

- - ampwait - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampwait man page for more information. -

- AR7400 Device Monitoring -

- The programs in this group are essentially identical to those in the INT6x00 group but they support higher PHY data rates offered by the AR7x00 chipsets. Specifically, they handle the new VS_NW_INFO and VS_LNK_STATS message formats. -

- - amprate - -

- A command line utility that polls a device and prints the average transmit and receive PHY rates between it and each of it's network neighbors. Program output is suitable for loading into a spreadsheet or other program that can process column-oriented information. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amprate man page for more information. -

- This program is suitable for use with AR7x00 chipsets and later that have higher PHY rates and newer firmware. Use program int6krate for AR6x00 running earlier runtime firmware that may not recognize newer message formats. Use program plcrate for mixed chipset environments -

- - ampsnif - -

- Enables or disables the powerline sniffer mode on the local powerline device using the VS_SNIFFER message. Use program ampsnot to display and/or record sniffer output. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampsnif man page for more information. -

- - ampsnot - -

- Listens for sniffer output from the local powerline device and display results on the console. Use program ampsnif to enable or disable sniffer output. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampsnot man page for more information. -

- - ampstat - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampstat man page for more information. -

- - amptone - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amptone man page for more information. -

- mdustats -

- A command line utility to collect and display various MDU traffic statistics. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./plc. See the mdustats man page for more information. -

- AR7420 Device Configuration -

- Programs in this group understand changes to .nvm file formats and to the device boot and memory flash messages and sequences. -

- - plchost - -

- This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the plchost man page for more information. -

- - plctest - -

- A command line utility that downloads and executes small program images stored in older and newer .nvm files. It can be used to download and execute small powerline diagnostic programs. It is not intended to download and start runtime firmware. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the plctest man page for more information. -

- This program automatically detects the type of .nvm file format and adapts. -

- Parameter File Management -

- Programs in this group are used to inspect and change .pib files in various ways. The do not communicate directly with the powerline device. Use program int6k, amptool or plctool to read the PIB from a powerline device or write a PIB to the powerline device. -

- - chkpib - -

- A command line utility to validate .pib files based on their internal checksum, file size and other characteristics. It can also be used to produce a text catalog of .pib files. This program is slower than program chkpib2 but requires less memory to execute. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the chkpib man page for more information. -

- - chkpib2 - -

- A command line utility to validate .pib files based on their internal checksum, file size and other characteristics. It can also be used to produce a text catalog of .pib files. This program is faster than program chkpib but requires more memory to execute. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the chkpib2 man page for more information. -

- - getpib - -

- A free-form means of extracting paremeters from a PIB file when the offset, length and format of the parameter is known. It is a companion to program setpib. The user specifies the filename, a starting offset and a sequence of type/data pairs. Values are echoed in order on the console in the specified format. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the getpib man page for more information. -

- - modpib - -

- A command line utility to change the MAC, DAK and/or NMK of an existing PIB file and recompute the checksum. It can also be used to change the manufacturer string, network name and username strings. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the modpib man page for more information. -

- - mrgpib - -

- A command line utility that transfers parameters from one PIB file to another. The two files needs not have the same PIB version. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the mrgpib man page for more information. -

- - pib2xml - -

- An offset-driven XML dump utility for the PIB. It requires an offset description file to be useful. The user specifies an offset description file and a PIB file. The program output an XML description of PIB fields. An example file, piboffset.txt, is included as a basic example. The example offset description file is intentionally incomplete. Complete files are reserved for use by Atheros Field Application Engineers. This program is an alternative to program pibdump. The main source code is located in folder ./tools. See the pib2xml man page for more information. -

- - pibcomp - -

- An offset-driven binary file compare utility for the PIB. It requires an offset description file to be useful. The user specifies an offset description file and two binary files. The files are compared, field by field, and differences are printed on stdout, field by field. An example file, piboffset.txt, is included as a basic example. The example offset description file is intentionally incomplete. Complete files are reserved for use by Atheros Field Application Engineers. This program is an alternative to program pib2xml and a companion to program pibdump. The main source code is located in folder ./tools. See the pibcomp man page for more information. -

- - pibdump - -

- An offset-driven dump utility for the PIB. It requires an offset description file to be useful. An example file, piboffset.txt, is included as a basic example. The example offset description file is intentionally incomplete. Complete files are reserved for use by Atheros Field Application Engineers. This program is a companion to program pibcomp. The main source code is located in folder ./tools. See the pibdump man page for more information. -

- - pibruin - -

- A command line utility that inserts classifier rules, read from a file, into a PIB file. It is an alternative to program int6krule and companion to program pibrump. The main source code is located in folder ./pib. See the pibruin man page for more information. -

- This program supports INT6300, INT6400 and AR7400 PIBs only and is deprecated. -

- - pibrump - -

- A command line utility that reads classifier rules from a PIB file and prints them on stdout in a format suitable for input to program pibruin. The main source code is located in folder ./pib. See the pibrump man page for more information. -

- - psin - -

- A command line utility to insert an amplitude map into an existing PIB file. The map is read from stdin in text format allowing the output of program psout to be piped directly into this program. The main source code is located in folder ./pib. See the psin man page for more information. -

- - psout - -

- A command line utility to that exports an amplitude map stored in an existing PIB file. The map is written directly to stdin in text format allowing the output of this program to be piped into the input of program psin. The main source code is located in folder ./pib. See the psout man page for more information. -

- - pxe - -

- A generic 'Remote PIB Management' tool. One or more XML files define decimal, hexadecimal and string edits to be applied to a PIB file. The PIB is read, edits are applied, a new checksum is computed and the PIB is saved. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the pxe man page for more information. -

- - setpib - -

- A simple means of setting PIB parameters when the parameter offset, length and format are known. It is an alternative to program pxe and a companion to program getpib. The user specifies the filename, a starting offset and a sequence of type/data pairs. Edits are applied in order and a new checksum is computed. A full or partial dump of the PIB displays the result. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the setpib man page for more information. -

- Firmware File Management -

- - chknvm - -

- A command line utility to validate .nvm files based on their internal checksum, file size and other characteristics. This program is slower than program chknvm2 but requires less memory to execute. Optionally, it can be used to display the image headers inside the file. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the chknvm man page for more information. -

- - chknvm2 - -

- A command line utility to validate .nvm files based on their internal checksum, file size and other characteristics. Optionally, it can be used to display the image headers inside the file. This program is faster than program chknvm but requires more memory to execute. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the chknvm2 man page for more information. -

- - config2cfg - -

- A command line utility to convert an SDRAM configruation file used by the Atheros Windows Device Manager to the configuration file format used by the Open Powerline Toolkit applications. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./sdram. See the config2cfg man page for more information. -

- - nvmmerge - -

- A command line utility to combine multiple Atheros image files into one. It is reserved for use by Atheros Field Application Engineers. Use of this probram could void some contractual obligations made by Atheros. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the nvmmerge man page for more information. -

- - nvmsplit - -

- A command line utility to extract all constituent images from an Atheros image file. It is reserved for use by Atheros Field Application Engineers. Use of this probram could void some contractual obligations made by Atheros. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the nvmsplit man page for more information. -

- Ethernet Traffic -

- - edru - -

- A command line program that reads one or more Ethernet II (IEEE 802.2) frames and write frame data to stdout as a continuous stream. This program can be used to capture serial data sent from a remote UART-enabled powerline device. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./ether. See the edru man page for more information. -

- - edsu - -

- A command line program sends one or more files over the network using Ethernet II (IEEE 802.2) Frames. This program can be used to test remote UART-enabled powerline devices. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./ether. See the edsu man page for more information. -

- - efsu - -

- A freeform Ethernet frame send utility used to define and send Ethernet packets. Packets are defined in text files containing hexadecimal byte codes plus optional comments and whitespace. Input files are stripped of comments and whitespace then transmitted as Ethernet frames. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./ether. See the efsu man page for more information. -

- - hpav - -

- A basic HomePlug® AV packet sniffer that displays only HomePlug® AV protocol frames on the console as they are sent or arrive on a given interface. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./mme. See the hpav man page for more information. -

- - pcapdevs - -

- A utility to enumerate LibPcap or WinPcap devices available on the host. It is compiled but only works if one of these two packages is installed on the host. At present, it is only needed with the Windows version of the Toolkit which is compiled against the WinPcap library. The main source code is located in folder ./ether. See the pcapdevs man page for more information. -

- Passwords and Keys -

- - hpavkey - -

- A HomePlug® AV key generator. Pass phrase arguments are hashed to form the corresponding Device Access Key (DAK), Network Membership Key (NMK) or Network Identifier (NID). This program is installed in folder /usr/local/bin with 4555 permissions. The main source code is located in folder ./crypt. See the hpavkey man page for more information. -

- - hpavkeys - -

- A HomePlug® AV key generator. Pass phrases are read from a file and hashed to form the corresponding Device Access Key (DAK), Network Membership Key (NMK) or Network Identifier (NID). This program is installed in folder /usr/local/bin with 4555 permissions. The main source code is located in folder ./crypt. See the hpavkeys man page for more information. -

- - mac2pw - -

- A device password generator that prints a range of MAC address and passwords on stdout. It is an alternative to the Atheros Production Test System (PTS) DBBuilder Utility and toolkit program mac2pwd. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./crypt. See the mac2pw man page for more information. -

- - mac2pwd - -

- A device password generator that reads files containing MAC addresses and prints address/password pairs. It is an alternative to the Atheros Production Test System (PTS) DBBuilder Utility and toolkit program mac2pw. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./crypt. See the mac2pwd man page for more information. -

- - rkey - -

- A command line utility to dynamically generate distinct HomePlug AV compliant keys from a user created keyfile. It can be used in shell scripts to dynamically insert random and distinct keys on program command lines as arguments. For example, a Linux bash script can reference "$(rkey -i eth0 -D secret.key)" inline. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./crypt. See the rkey man page for more information. -

- MDIO Programming -

- int6kmdio -

- A command line utility that uses VS_MDIO_COMMAND messages to read and write MDIO registers on a switch chip connected to the local powerline device. MDIO instructions are specified and send as Clause 22 instructions. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock man page for more information. -

- int6kmdio2 -

- A command line utility that uses VS_MDIO_COMMAND messages to read and write MDIO registers on a switch chip connected to the local powerline device. Instructions are read as Clause 45 instructions but send as Clause 22 instructions. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock man page for more information. -

- mdioblock -

- A command line utility to assemble an Atheros MDIO instruction block from hexadecimal register instructions. MDIO instruction blocks are written to Atheros powerline devices as modules using the VS_MOD_OP message type. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock man page for more information. -

- mdioblock2 -

- A command line utility to assemble an Atheros MDIO instruction block from hexadecimal register instructions. MDIO instruction blocks are written to Atheros powerline devices as modules using the VS_MOD_OP message type. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock2 man page for more information. -

- mdiodump -

- A command line utility to read and display Atheros MDIO custom modules in human readable format. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdiodump man page for more information. -

- mdiogen -

- A rudimentary command line utility that write a custom MDIO block to a fixed file. The user must edit a data statements, in the main program, to define MDIO command fields. A series of macros then mask, shift and merge the fields to create complete Clause 22 or Clause 45 MDIO commands on output. The program has no dependencies on other toolkit modules and so it will compile anywhere. This program must be manually compiled and it is not automatically installed. The main source code is located in folder ./mdio and file mdio.h is required for compilation. There are no help files available at this time. If you do not understand how to use it then you may not need it. -

- Serial Programming -

- - ptsctl - -

- A command line program used to control a bank of three Weeder programmable attenuators. It may be used to construct a Production Test System (PTS) for Qualcomm Atheros SmartLink™ devices. See program weeder to control a bank of two Weeder programmable attenuators. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./serial. See the ptsctl man page for more information. -

- - ttycat - -

- A command line program that copies one or more host files to a specific serial port. It can be used to stream serial data to the local UART-enabled powerline device for transmission over powerline. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./serial. See the ttycat man page for more information. -

- - weeder - -

- A command line program used to control a bank of two Weeder programmable attenuators. It may be used to construct a Production Test System (PTS) for Qualcomm Atheros powerline devices. See program ptsctl to control a bank of three Weeder programmable attenuators. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./serial. See the weeder man page for more information. -

- Atheros Communications reserves the right to add, remove or rename utility programs or modify their command line options or their functionality in future software releases without any obligation to notify or compensate users of this software. -

diff --git a/docbook/ch01s09.html b/docbook/ch01s09.html deleted file mode 100644 index 1b55aa52..00000000 --- a/docbook/ch01s09.html +++ /dev/null @@ -1,81 +0,0 @@ -Toolkit Folders

- Toolkit Folders -

- The Atheros Open Powerline Toolkit package folder has many subfolders. Some contain source code, some contain documentation and others contain shell scripts. Some source folders contain programs that require components in neighboring folders. Consequently, you will see references to relative pathnames like ../folder, throughout source code, makefiles and shell scripts. This notation simplifies development and maintenance and is helpful when locating specific files. -

- Folder descriptions appear below in alphabetical order: -

- ./applets -

- A library of programs that can run, stand-alone, on Atheros powerline devices and perform diagnostic tests for connection, functionality and performance. Some run to completion and return to the Bootloader. Others run continuously until the device is reset. Most can be run and executed in sequence using program int6ktest. -

- ./classes -

- A collection of C++ classes that implement many of the ANSI C functions found elsewhere in the toolkit. These classes will compile and run on most platforms but are still a work-in-progress. The programs folder contains actual and sample programs that use these classes. -

- ./docbook -

- HTML pages generated by several methods, but mostly Docbook 4.5. Some pages have been created using special tools that are not provided and will not be made available. The Makefile in this folder will compile the core XML source files on GNU/Linux systems that have Docbook 4.5 installed with extentions by Normal Walsh but it does not install the pages. See Installation on Linux for more information. -

- ./ether -

- Network specific source code that supports raw ethernet packets in a platform independent fashion using plugin modules. The principle feature is the channel data structure used to read and write raw ethernet packets using network features on GNU/Linux, with or without libpcap, and on Windows™ with winpcap. The source code in this folder is difficult to port cross-platform due to the way different operating systems implement their system header files and network stacks. -

- ./plc -

- The main source code for programs that communicate with Qualcomm Atheros powerline devices over Ethernet. The programs in this folder are essential programs for engineers and embedded software developers wanting to explore powerline device behavior. The Makefile in this folder will compile and install programs in /usr/local/bin on GNU/Linux systems. -

- ./mme -

- A collection of helper functions dealing with HomePlug® and Atheros management messages. They are not needed for proper toolkit operation but they can be useful during development and debugging because they print message content in readable format. Most of these functions require extra memory because they include symbol tables and extra data conversion functions. -

- ./nodes -

- A collection of functions that comrpise a generic, light-weight XML parser. Atheros is currently exprimenting with various XML-based applications to support device management on embedded systems. These functions are the core. Currently, they are only used by the pxe and int6k2 programs. See XML Editing Functions for more information. -

- ./nvm -

- Programs, functions and make files related to Atheros NonVolatile Memory (NVM) files. All programs in this folder either read from or write to NVM files. None communicate with powerline devices. Some of the popular programs are chknvm, nvmsplit and nvmmerge. -

- ./patches -

- A collection of useful Linux™ kernel patches and install scripts. Of particular interest is the send-to-self patch that enables external routing of ISO Layer 3 traffic between two Ethernet interfaces on the same host. Atheros provides them but does not support them. -

- ./pib -

- Programs, functions and make files related to Atheros Parameter Information Block (PIB) files. All programs in this folder either read from or write to PIB files. None communicate with powerline devices. Some of the popular programs are chkpib, modpib, getpib and setpib. -

- ./programs -

- A small collection of sample C++ programs that use the Atheros C++ powerline classes. These programs compile and run on most environments but are still a work-in-progress. Users may actually find netifs and plcnets useful. -

- ./serial -

- Programs, functions and make files related to the Atheros Serial Communication Interface for Powerline devices. All of the programs in this folder communicate using a host serial port. None communicate with powerline devices over Ethernet. The main program of interest is int6kuart. -

- ./scripts -

- Miscellaneous shell scripts that call various programs in this package to perform tasks such as flashing a FW2.0 device. Care must be taken here to ensure that environment variables at the start of each script are appropriate for your system. -

- ./ram -

- Support modules for reading, printing and checking NVRAM and SDRAM configuration files. The .cfg files in this folder have a different format than the .config files released with the Atheros Windows Device Manager. The files distributed with the Windows Device Manger are 64 ASCII character with no checksum. The files in this directory are 32 binary bites with trailing checksum. Users may create new sdram configuration files by compiling sdram.c, using gcc -o sdram sdram.c and running it without any command line arguments. -

- ./tools -

- Source code and header files used by virtually all programs in the toolkit. These files are generic and have application beyond this package. They provide GNU/Linux-style or POSIX-style functionality to programs running in environments that do not have either. They also implement operations like checksum computation and multi-byte hexadecimal encoding and decoding. See Support Function Reference for more information. -

- ./VisualStudioNET -

- Components unique to Microsoft Windows are kept in and under this folder. Specifically, it contains a Visual Studio .NET™ solution to compile most of the programs in this package using only Microsoft and winpcap libraries. Compiled .exe files can be run on Windows™ enabled systems having winpcap installed. Adjustments may be necessary depending on your environment. -

- Microsoft does not provide full POSIX support on Windows platforms. Consequently, alternative headers and libraries are included under this folder. For example, an abridged version of unistd.h and an alternative version of stdint.h are included under VisualStudioNET/include. Other significant header files included here are ethernet.h, if_ether.h and in.h. Subfolder VisualStudio\Library contains WinPcap™ libraries. These folders are referenced in appropriate compiler and linker options for Microsoft Development environments. -

diff --git a/docbook/ch01s10.html b/docbook/ch01s10.html deleted file mode 100644 index 30328497..00000000 --- a/docbook/ch01s10.html +++ /dev/null @@ -1,2083 +0,0 @@ -Packages

- Packages -

- The following table lists programs and the release packages that contains them. Packages contain programs of interest to various customer and engineering groups based on the activities that they normally perform. Some groups may need multiple packages. Some packages are restricted. -

Table 1.1.  - Program/Package Matrix -

- The toolkit is divided into 5 groups loosely based on chipset family, intended audience, network security, intellectual property, code maturity and other criteria. Some individual programs may be hard to classify and so their placement may be subject to some debate. -

- amp-utils -
- Tools developed for INT6000™, INT6300™, INT6400™ and AR7400™ chipsets. -Some are obsolete but most are still useful. -This package is a candidate for public distribution under a permissive open source license. -
- plc-utils -
- Tools developed for QCA6410™, QCA7000™ and AR7420™ chipsets. -These tools handle the newer files formats, hardware boot conventsions and flash memory layouts for chipsets having fixed internal SRAM. -This package is a candidate for public distribution under a permissive open source license. -
- nda-utils -
- Tools designed to manipulate parameter blocks or access reserved or restricted features on powerline devices. -Most are useful during powerline product development and production but are not needed for proper product operation or maintenance. -This package is reserved for Qualcomm Atheros customers who sign a non-disclosure agreement covering Qualcomm Atheros intellectual property. -Parts of this package are candidates for some sort of restrictive license. -
- key-utils -
- Tools that generate HomePlug AV compliant keys from device MAC address or user passwords. -This package is reserved for Qualcomm Atheros customers who sign a non-disclosure agreement related to Qualcomm Atheros powerline intellectual property. -Parts of this package are candidates for some sort of restrictive license. -
- qca-utils -
- Tools that perform restricted or experiemental operations on active powerline devices or parameter information blocks. -Some of these tools here are one-of-a-kind or could present security risks to active powerline networks. -This package not not released to customers. It is reserved for Qualcomm Atheros PLC Engineering use. -Most of this package is a candidate for restrictive license. -
- Program - - amp-utils - - plc-utils - - nda-utils - - key-utils - - qca-utils - - source-only - - deprecated -
- CMEncrypt - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- adccap - -   - -   - -   - -   - - qca-utils - -   - -   -
- ampagc - -   - -   - -   - -   - - qca-utils - -   - -   -
- ampboot - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- amphost - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- ampinit - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- ampID - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- amplist - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- amprate - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- ampsnr - -   - -   - -   - -   - - qca-utils - -   - -   -
- ampstat - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- amptest - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- amptone - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- amptool - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- ampwait - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- arpc - -   - -   - -   - -   - - qca-utils - -   - -   -
- arpc1 - -   - -   - -   - -   - - qca-utils - -   - -   -
- chknvm - - amp-utils - - plc-utils - - nda-utils - -   - - qca-utils - -   - -   -
- chknvm2 - - amp-utils - - plc-utils - - nda-utils - -   - - qca-utils - -   - -   -
- chkpib - - amp-utils - - plc-utils - - nda-utils - -   - - qca-utils - -   - -   -
- chkpib2 - - amp-utils - - plc-utils - - nda-utils - -   - - qca-utils - -   - -   -
- config2cfg - -   - -   - -   - -   - -   - - source-only - -   -
- coqos_add - -   - -   - -   - -   - - qca-utils - -   - -   -
- coqos_info - -   - -   - -   - -   - - qca-utils - -   - -   -
- coqos_man - -   - -   - -   - -   - - qca-utils - -   - -   -
- coqos_mod - -   - -   - -   - -   - - qca-utils - -   - -   -
- coqos_rel - -   - -   - -   - -   - - qca-utils - -   - -   -
- dlinkug - -   - -   - -   - -   - - qca-utils - -   - -   -
- edru - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- edsu - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- efbu - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- efeu - -   - -   - -   - -   - - qca-utils - -   - -   -
- efru - -   - -   - -   - -   - - qca-utils - -   - -   -
- efsu - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- fetchpib - -   - -   - -   - -   - -   - - source-only - -   -
- getpib - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- grab - -   - -   - -   - -   - - qca-utils - -   - -   -
- hpav - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- hpavkey - -   - -   - - nda-utils - - key-utils - - qca-utils - -   - -   -
- hpavkeys - -   - -   - - nda-utils - - key-utils - - qca-utils - -   - -   -
- int64host - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6k - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kbaud - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kboot - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kdetect - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kecho - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- int6keth - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- int6khost - -   - -   - -   - -   - - qca-utils - -   - - deprecated -
- int6kid - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6klist - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6klog - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kmdio - - amp-utils - -   - -   - -   - -   - -   - - deprecated -
- int6kmdio2 - - amp-utils - -   - -   - -   - -   - -   - - deprecated -
- int6kmod - - amp-utils - -   - - nda-utils - -   - - qca-utils - -   - -   -
- int6kp - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- int6kpair - -   - -   - -   - -   - - qca-utils - -   - -   -
- int6kprobe - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- int6krate - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6krule - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kstat - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6ktest - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6ktone - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kuart - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- int6kug - -   - -   - -   - -   - - qca-utils - -   - -   -
- int6kwait - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- mac2pw - -   - -   - - nda-utils - - key-utils - - qca-utils - -   - -   -
- mac2pwd - -   - -   - - nda-utils - - key-utils - - qca-utils - -   - -   -
- mdioblock - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- mdioblock2 - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- mdiodump - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- mdustats - - amp-utils - -   - -   - -   - - qca-utils - -   - -   -
- mme - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- modpib - - amp-utils - - plc-utils - - nda-utils - -   - - qca-utils - -   - -   -
- mrgpib - -   - -   - -   - -   - - qca-utils - -   - -   -
- netifs - - amp-utils - - plc-utils - - nda-utils - -   - - qca-utils - -   - -   -
- nvmmerge - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- nvmsplit - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- odc - -   - -   - -   - -   - -   - -   - - deprecated -
- odd - -   - -   - -   - -   - -   - -   - - deprecated -
- odx - -   - -   - -   - -   - -   - -   - - deprecated -
- pcapdevs - - amp-utils - - plc-utils - - nda-utils - -   - - qca-utils - -   - -   -
- pib2xml - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- pibcomp - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- pibdump - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- pibruin - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- pibrump - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- plcboot - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcecho - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- plcfwd - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcget - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plchost - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcId - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcinit - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- plclist - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcm - -   - -   - -   - -   - - qca-utils - -   - -   -
- plcmmcinfo - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- plcmdio16 - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcmdio32 - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcmod - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- plcnets - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcrate - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcrule - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcset - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcstat - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcsnif - -   - -   - -   - -   - - qca-utils - -   - -   -
- plctest - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plctone - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plctool - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- plcwait - -   - - plc-utils - -   - -   - - qca-utils - -   - -   -
- po1 - -   - -   - -   - -   - - qca-utils - -   - -   -
- po2 - -   - -   - -   - -   - - qca-utils - -   - -   -
- psgen - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- psin - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- pskey - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- psnotch - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- psout - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- ptsctl - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- pxe - -   - -   - -   - -   - -   - -   - - deprecated -
- rkey - -   - -   - - nda-utils - - key-utils - - qca-utils - -   - -   -
- sada - - amp-utils - - plc-utils - -   - -   - - qca-utils - -   - -   -
- sdram - - amp-utils - -   - -   - -   - - qca-utils - -   - - deprecated -
- setpib - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- slac - -   - -   - -   - -   - - qca-utils - -   - - deprecated -
- throwpib - -   - -   - -   - -   - -   - - source-only - -   -
- weeder - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -
- xml2pib - -   - -   - - nda-utils - -   - - qca-utils - -   - -   -

diff --git a/docbook/ch01s11.html b/docbook/ch01s11.html deleted file mode 100644 index 9d42390e..00000000 --- a/docbook/ch01s11.html +++ /dev/null @@ -1,13 +0,0 @@ -Toolkit Support

- Toolkit Support -

- Contact the Qualcomm Atheros System Application Engineering Team if you have questions concerning the content, operation, application or direction of this toolkit on GNU/Linux systems. If you are having trouble communicating with Qualcomm Atheros powerline devices using the toolkit, try following the troubleshooting procedure found later in this document. -

diff --git a/docbook/ch02.html b/docbook/ch02.html deleted file mode 100644 index 2743e0ae..00000000 --- a/docbook/ch02.html +++ /dev/null @@ -1,38 +0,0 @@ -Chapter 2.  Hardware

Chapter 2.  - Hardware -

Table of Contents

- Introduction -
- Device Form Factors -
- Device Communications -
- Device Configurations -
- Local Host to Local Device -
- Local Host to Remote Device -
- Local Host to Remote Host -
- Powerline Workstations -
- Host Hardware -
- Host Software -
- Network Configuration -
- Isolated Power-strip -
- Send-to-self Patch -

- Introduction -

-

diff --git a/docbook/ch02s02.html b/docbook/ch02s02.html deleted file mode 100644 index 7086fdc0..00000000 --- a/docbook/ch02s02.html +++ /dev/null @@ -1,43 +0,0 @@ -Device Form Factors

- Device Form Factors -

- Atheros Communications, Ocala FL USA designs and manufactures chipsets that permit network communications over powerline. They do no not manufacture powerline communication products for market. Instead, they provide chipsets, reference designs and expertise needed to build powerline communications products. Atheros does manufacture some sample products, in various form factors, for evaluation purposes only. -

- Wall Adapters -

- A small unit that plugs into any power outlet and has one RJ45 Ethernet jack. The RJ45 jack can be used to connect the unit to another Ethernet device, such as a hub, switch or computer network interface card using CAT5 Ethernet cable. Two or more such units can be used to connect Ethernet devices over the powerline. For example, a computer on one room can be connected to a network printer in another room. See Atheros Product Brief 27003417 - RD6300-ETH HomePlug® AV Wall Adapter Reference Design for more information. -

- Desktop Adapters -

- A compact unit having a 6ft power cord, one threaded coax cable F connector and one RJ45 Ethernet jack. Two such units can be used to connect Ethernet devices over either powerline (as above) or coax cable. Use of coax cable improves performance over longer distances and permits network segments to be isolated from each other. See Atheros Product Brief 27002824 - RD6000-ETH HomePlug® AV Ethernet Hybrid Adapter Reference Design for more information. -

- PCI Cards -

- A standard PCI compliant computer card having one DIN powerline connector and one threaded coax cable F connector. The card can be inserted into a PCI bus slot on a computer, or other device. Atheros provides device drivers that make the card behave like an ordinary Ethernet card. Like the desktop unit (above), computers and embedded systems can be connected either over powerline or coax cable. See Atheros Product Brief 27003239 - EK6000-PCI HomePlug® AV Card Evaluation Kit for more information. -

- PCI cards are no longer available from Atheros but reference designs may be obtained from selected Atheros customers that specialize in PCI designs. -

- Mini-PLC -

- A Mini-PCI form factor card that integrates most components needed to embed HomePlug® AV into your product design. Although the card will insert into a Mini-PCI slot, it is not electrically compatible with the Mini-PCI standard. Atheros uses this card in both the RD6000-ETH Desktop Adaptor and the EK6000-PCI Card described above. See Atheros Product Brief 27002835 - RD6000-PLC HomePlug® AV Mini-PLC Module Reference Design for more information. -

- Unlike Wall and Desktop Adapters, the Mini-PLC Cards require a device driver written for the particular operating system used. Atheros provides a device drivers for the Windows XP Operating System and for the Linux 2.4 and Linux 2.6 kernel. These drivers make the PCI card look like an ordinary Ethernet interface card. -

- Mini-PLC cards are no longer available from Atheros but cards may be obtained from selected Atheros customers that specialize in PCI designs. -

- Embedded Systems -

- Atheros offers an expanding family of reference designs for powerline-enabled switches and routers. Most include onboard CPU and enablement software based on Linux, OpenWRT and other suitable operating systems. Atheros will assist customers in adapting the basic hardware and software to suite particular markets. -

- Chipsets -

- Atheros offers an expanding family of Powerline enabled chipsets. Several SoC chipsets are also planned to support a variety of communications applications. -

diff --git a/docbook/ch02s03.html b/docbook/ch02s03.html deleted file mode 100644 index 96583ec5..00000000 --- a/docbook/ch02s03.html +++ /dev/null @@ -1,31 +0,0 @@ -Device Communications

- Device Communications -

- Atheros powerline communication chipsets serve as a transparent bridges between an Ethernet network and an active powerline or passive coax cable, effectively extending the Ethernet network. HomePlug® AV devices on the powerline, or at either end of a coax cable, will automatically detect each other and establish communications. Normal Ethernet frames that are detected by one HomePlug® AV device are passed over powerline or coax to other HomePlug® AV devices which then pass the frames on to any Etherenet devices that may be connected to them. -

- There are three levels of communication. -

- Powerline Communications -

- HomePlug® AV devices use a proprietary protocol defined by the HomePlug Powerline Alliance. In most cases, HomePlug® AV communications do not leave the powerline or coax media used to connect devices. Connected devices use this protocol to detect each other, establish connection, encapsulate Ethernet frames and route them between devices. This level of communications is proprietary and hidden. See the HomePlug Powerline Alliance HomePlug® AV Specification for more information. -

- Atheros Device Communications -

- Atheros devices use a subset of the HomePlug® AV protocol, mentioned above, to communicate with a local host processor. The subset is known as - - vendor-specific messages - - . Atheros vendor-specific messages are intercepted and processed by Atheros devices. In some cases, they are forwared over powerline or coax to other Atheros devices. Atheros vendor-specific messages are used to interrogate, synchronize, configure and control Atheros devices without affecting HomePlug® AV devices from other manufacturers. See the Atheros HomePlug® AV Firmware Technical Reference Manual for more information. -

- Network Traffic -

- This is the normal network traffic that passes transparently from local Ethernet, over powerline or coax, to remote Ethernet through HomePlug® AV devices. -

diff --git a/docbook/ch02s04.html b/docbook/ch02s04.html deleted file mode 100644 index 4982eb2a..00000000 --- a/docbook/ch02s04.html +++ /dev/null @@ -1,96 +0,0 @@ -Device Configurations

- Device Configurations -

- There are several test configurations that can be used to experiment with Atheros powerline communication devices. Configurations vary based on the powerline communications devices you have available to work with. All configurations described here require at least one computer with an Ethernet card and the Open Powerline Toolkit installed. Most configurations require two Atheros powerline devices. -

- Open Powerline Toolkit programs let the user specify which Ethernet interface card to use when sending and receiving Ethernet frames. This means that a computer with two interface cards installed can emulate two computers provided there are not internal routing conflicts. To avoid routing conflicts, Atheros recommends that you start with two computers until your are ready for more sophisticated experimentation. -

- Open Powerline Toolkit programs default to eth0 . This allows the computer to be connected to the normal network on eth0 and connected to the powerline network on eth1. To over-ride the default powerline interfaces, set environment variable PLC to the desired interface name. All configurations assume that the Ethernet card is installed, the Ethernet driver for that card is loaded and the correct interface is enabled. -

- Atheros powerline communication devices radiate across powerline or coax at radio frequencies. If two devices are connected, in any way, without intermmediate filters or isolation, they will attempt to commicate. Additionally, they will attempt to circumvent certain types of powerline noise or competing frequencies which can cause reduce data rates. Atheros recomends that devices under test (DUT) take their power from a shared but isolated power source like an isolation power strip or an uninterruptable power supply. -

- ( ... explain about powerline isolation ... ) The power strip should have no filtering, surge protectors or electronic cirtuits inside. -

-        ---> [ATTENUATOR] ---> [POWER_STRIP] ---> [POWERLINE_DEVICE] --->
-			

- Typical configurations are: -

- Local Host to Local Device -

- This is the simplest configuration. It establishes an Ethernet connection between the host and one powerline device. It can be used to test or program a single powerline device. -

- It requires -

  • - One host computer with an Ethernet interface card -

  • - One CAT-5 Ethernet cable with an RJ-45 connector at either end. -

  • - One Atheros powerline device with RJ-45 connector. -

  • - An isolated power source -

-	[LOCAL_HOST] ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /-----> 
-				

- Connect the local host to the powerline device with an ordinary CAT-5 Ethernet cable. Apply power to the powerline device. The local host cannot ping the powerline device because it functions at the data link layer. The local host can interrogate and control the powerline device using - - int6k - - or - - int6k2 - - programs. -

  • - Type "int6k -r" and note the hardware and firmware revision. -

  • - Type "int6k -I" and note the device MAC, DAK and NMK. - -

  • - Type "int6k -m" and confirm that the device detects no other devices indicating proper powerline isolation. -

- Local Host to Remote Device -

- This configuration is the simplest powerline network configuration. It expands the previous configuration by creating a simple powerline network having two powerline devices. One device, the "local device", is connected to the host via Ethernet. A second device, the "remote device", is connected to the first via powerline. -

- It requires -

  • - One host computer with an Ethernet interface card -

  • - One CAT-5 Ethernet cable with an RJ-45 connector at either end. -

  • - Two Atheros powerline devices, one with RJ-45 connector. -

  • - An isolated power source. -

-        [LOCAL_HOST] ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /----->
-                                           [POWERLINE_DEVICE] ---/ powerline /-----> 
-				

- Configure the previous network then plug a second powerline device into the same power source as the first powerline device. The local host still cannot ping any Ethernet network devices because there are no remote Ethernet devices to ping but it can interrogate and control both powerline devices. -

- Local Host to Remote Host -

- This configuration is the simplest Ethernet network configuration. It expands the previous network by connecting the second powerline device to an existing Ethernet network through an Ethernet switch. -

- It requires -

  • - Two host computers, each with an Ethernet interface card -

  • - Two CAT-5 Ethernet cables with RJ-45 connectors at either end. -

  • - Two Atheros powerline devices, each with RJ-45 connector. -

  • - An isolated power source. -

-        [LOCAL_HOST]  ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /----->
-        [REMOTE_HOST] ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /-----> 
-				

- Configure the previous network then plug the second powerline device into an Ethernet switch connected to an exiting Ethernet network. The local host can now ping other Ethernet network devices on the. -

diff --git a/docbook/ch02s05.html b/docbook/ch02s05.html deleted file mode 100644 index 5ed0ca13..00000000 --- a/docbook/ch02s05.html +++ /dev/null @@ -1,62 +0,0 @@ -Powerline Workstations

- Powerline Workstations -

- The Open Powerline Toolkit is a collection of independent programs. Individually, they perform basic but useful operations on powerline communication devices and associated support files such as PIB and NVM files. Collectively, they can perform many types of engineering experiments, functional tests and production tasks. Their simplicity and high degree of flexibility lets customers adapt an off-the-shelf linux host to meet a wide range of production requirements. We call this configuration a powerline workstation. -

- This section explains how to configure a powerline workstation and setup the Open Powerline Toolkit on that workstation. It covers some necessary aspects of Linux and the Toolkit but it is not a Linux tutorial or a Open Powerline Toolkit tutorial. Linux essentials are covered on the Internet and Open Powerline Toolkit essentials are covered in other sections of this documentation and on-line man pages. Although some typical configurations are illustrated, many variations are possible and are left to the customer to develop based on our examples. There is no single correct way to do anything. -

- Host Hardware -

- A powerline workstation host has no special hardware requirements. Any host capable of running Linux and supporting multiple Ethernet cards will do. For example, a 450mhz CPU having 128mb of memory, one 3gb disk and three 10/100 Ethernet cards is adequate. -

- Production tasks such as device initialization or firmware upgrade require one Ethernet card. Experimentation and functional testing typically require two Ethernet cards. Atheros recommends three Ethernet cards so that the host can communicate with other hosts over a local area network while talking to powerline devices. Atheros also recommends that all Ethernet cards installed support at least 100mbps and be of the same type to simplify network configuration. -

- Host Software -

- Atheros recommends installiing a Debian-based or Ubuntu-based Linux distribution due to the simplicity of network configuration. Redhat™-based or SuSE™-based distributions are also acceptable. A complete GNU toolchain is required to compile and install the Open Powerline Toolkit. Atheros uses GNU make 3.8.0, GNU gcc 3.3.5 and GNU ld 2.15. If these components are not installed then you must install them. Linux system installation and configuration is beyond the scope of this documentation but there is a wealth of information available on the Internet. -

- Of course, the Open Powerline Toolkit needs to be installed and successful installation proves that all required Linux components are installed correctly. See Installation on Linux for more information on how to install the Open Powerline Toolkit. -

- Network Configuration -

- Linux will assign interface names like eth0, eth1 and eth2 to each installed network card. Atheros recommends that eth0 be connected to your local network so that you can communicate with other hosts on that network. The other two interface cards can then be connected to Atheros devices that are plugged into an isolated power-strip. Of course, one CAT-5 Ethenet cable will be needed for each Ethernet card installed. -

- Interfaces eth1 and eth2 should be assigned IP addresses on a separate sub-net so that you can ping one card from the other over the powerline without sending traffic over the local network. Remember that powerline devices have MAC addresses but not IP addresses. Also, Linux ping uses the routing table to route messages and so you may need to use the -I option when pinging over the powerline. Otherwise, ping packets may go out over the local network by default. -

-# ifconfig
-eth0      Link encap:Ethernet  HWaddr 00:50:04:A5:D9:5A  
-          inet addr:192.168.99.12  Bcast:192.168.99.255  Mask:255.255.255.0
-          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
-
-eth1      Link encap:Ethernet  HWaddr 00:01:03:2B:03:67  
-          inet addr:192.168.101.10  Bcast:192.168.101.255  Mask:255.255.255.0
-          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
-
-eth2      Link encap:Ethernet  HWaddr 00:01:03:2B:03:73  
-          inet addr:192.168.101.11  Bcast:192.168.101.255  Mask:255.255.255.0
-          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
-
-lo        Link encap:Local Loopback  
-          inet addr:127.0.0.1  Mask:255.0.0.0
-          UP LOOPBACK RUNNING  MTU:16436  Metric:1
-

- The abbreviated ifconfig console display, shown above, illustrates a typical Ethernet configuration using three cards, as recommended by Atheros. Interface eth0 is on the 192.168.99.0 subnet which serves as the local network, in this case. Interfaces eth1 and eth2 are both on the 192.168.101.0 subnet which serves as the powerline network, in this case. -

- Although not required, installing both wireshark and tshark is a great idea because they can be used to monitor and log network traffic on any or all of the Ethernet interfaces during various operations. -

- Isolated Power-strip -

- Atheros devices have a way of finding each other over powerline and sometimes across nearby powerlines. Power-strip isolation prevents cross-talk with other powerline devices that may be plugged into nearby. Proper isolation is not critical when getting started but can be critical in technical evaluation and production environments. -

- There are many ways to isolate powerline devices. One way is to plug the powerline workstation and the power-strip into an Uninterruptable Power Supply (UPS). Atheros also provides several reference designs for both expensive and inexpensive hardware that can be used to isolate devices and workstations. -

- Atheros powerline devices tend to work best when there is some signal attenuation over powerline or coax connections. Engineering evaluation configurations should insert some type of variable attenuation between powerline devices to measure the performance of their own powerline device designs. Consult with your Atheros Field Application Engineer on this matter. -

diff --git a/docbook/ch02s06.html b/docbook/ch02s06.html deleted file mode 100644 index 1f97c8ad..00000000 --- a/docbook/ch02s06.html +++ /dev/null @@ -1,463 +0,0 @@ -Send-to-self Patch

- Send-to-self Patch -

- One advantage of Linux™ powerline workstations is the ability to control the low-level networking environment. ISO Layer 2 traffic can be easily directed from one Ethernet interface to another on the same host but Layer 3 traffic is a different matter because routing software merely routes this type of traffic internally. -

- A Linux™ kernel patch is available that will allow ISO Layer 3 traffic to be routed from one Ethernet interface to another on the same host. With this patch, multiple instances of a traffic generator, like ttcp or iperf, can be effectively deployed on the same host without modification. -

- This patch is useful for testing on a closed network but it could pose a security risk to the local host when connected to a public network. Kernels having this patch installed should have a special designation such as linux-2.6.28-send-to-self so that users are aware that the patch is installed. -

Example 2.1.  - send-to-self Patch Description -

- The following is the full, original patch description. -

-	Send-To-Self interface flag
-	Julian Anastasov <ja@ssi.bg>, July 2003
-
-	Patches for different kernels:
-
-	send-to-self-2.4.21-1.diff
-	send-to-self-2.5.73-1.diff
-
-	The  presented patch implements routing of traffic between local
-IP addresses externally via ethernet interfaces. This patch is basically
-the Ben Greear's send-to-self work but reimplemented entirely on routing
-level.   The idea is  to return output route  via external interfaces if
-path between two local IP addresses is requested and they are configured
-on different interfaces with /proc/sys/net/ipv4/conf/DEVNAME/loop set to
-1.    As  result,  arp_filter  (if  enabled  -  the  recommended  value)
-automatically  accepts  the ARP  requests  on the  right  interface. The
-rp_filter  check is modified to accept traffic from such interfaces with
-local  IP as sender, so using loop=1 for interfaces attached to insecure
-mediums is not recommended.
-
-Pros:
-- it can be used from all existing applications without change
-- it is not limited to 2 interfaces
-- you can use it with many IP addresses
-- does not depend on the rp_filter and arp_filter states, they
-can be set to 1
-- the packets are not altered in any way, useful for QoS testings
-- the routing result is cached, the routing checks are not per packet
-
-Cons:
-- not possible to use it for interfaces attached to insecure
-mediums (the rp_filter protection allows saddr to be local IP).
-By design. Use at your own risk.
-
-	The usage is simple:
-
-# Connect two or more interfaces to same hub or via crossover cable
-
-# Enable loopback mode for eth0 and eth1. This even can be
-# default mode without breaking any other talks. By this way
-# we allow external routing only between local IPs configured
-# on the specified interfaces.
-
-echo 1 > /proc/sys/net/ipv4/conf/eth0/loop
-echo 1 > /proc/sys/net/ipv4/conf/eth1/loop
-
-# Add some IP addresses for testing, eg. client and server IP
-
-ip address add 192.168.1.1 dev eth0
-ip address add 192.168.2.1 dev eth1
-
-# Testing with applications that are aware of this binding.
-# The main thing the apps need to know is what src and dst IP
-# addresses to use. The client app needs to bind to the src IP
-# and by this way to request output route to the dst IP. There
-# is no specific configuration for the server app listening on
-# 192.168.2.1
-
-ping -I 192.168.1.1 192.168.2.1
-
-# Note that specifying the output device (SO_BINDTODEVICE is
-# not recommended)
-
-
-# Testing with applications that are not aware of this feature:
-# for 192.168.1.1 client (the same for the server is not needed).
-# Note that by default, in local routes the kernel uses the local
-# IPs as preferred source. This is the safe default mode (if loop=1)
-# for applications that do not care what src IP will be used
-# for their talks with local IPs. We try to change that and to
-# use IPs from different interfaces.
-
-ip route replace local 192.168.2.1 dev eth1 scope host src 192.168.1.1 proto kernel
-
-# but for any case, here it is and for the "server":
-
-ip route replace local 192.168.1.1 dev eth0 scope host src 192.168.2.1 proto kernel
-
-# Testing it:
-
-ping 192.168.2.1
-ping -I 192.168.1.1 192.168.2.1
-telnet 192.168.2.1
-
-# Note that by replacing the local route's preferred source IP address
-# we help the IP address autoselection to select proper IP to the
-# target, in our case, route via eth
-

Example 2.2.  - send-to-self Patch Application -

- The following example illustrates how to use iperf to perform TCP and UDP traffic measurements once this patch is installed. We illustrate the use of iperf but do not necessarily endorse it for traffic measurement. We also illustrate the use of two interfaces but the send-to-self patch will support additional interfaces. We also illustrate the use of environment variables so that procedures can execute on different hosts without modification but these environment variables are not required. -

- First, we define environment variables, IF1 and IF2, for each Ethernet interface and, IP1 and IP2, for their IP addresses. Each interface must be on a separate IP subnet. We export definitions here so that they are accessible to this process and any subprocesses, such as shell scripts. Do whatever is appropriate for your environment. -

-export IF1=eth1
-export IF2=eth2
-export IP1=192.168.1.1
-export IP2=192.168.2.2
-

- Next, we assign the IP addresses to the interfaces using program ifconfig. There are other ways to do this. Observe that we reference our environment variables on the command line. -

-ifconfig ${IF1} ${IP1}
-ifconfig ${IF2} ${IP2}
-

- Next, we suppress internal routing between local interfaces. The loop propery only exists on kernels that have the send-to-self patch installed and have the /proc filesystem mounted. Some systems may not mount this file system. -

-echo 1 > /proc/sys/net/ipv4/conf/${IF1}/loop
-echo 1 > /proc/sys/net/ipv4/conf/${IF2}/loop
-

- Alternately, you could edit file /etc/sysctl.conf, as follows, to set the loop property for each interface during system startup. Again, the loop propery only exists on kernels that have the send-to-self patch installed and so errors will occur if you boot another kernel that does not have it installed. -

-net.ipv4.conf.eth1.loop = 1
-net.ipv4.conf.eth2.loop = 1
-

- Open a console window and start iperf as a server. Option -s identifies this instance of iperf as the server. Option -B binds this instance to one host interface by IP address, in this case IP1 defined earlier. -

-iperf -B ${IP1} -s
-------------------------------------------------------------
-Server listening on TCP port 5001
-Binding to local address 192.168.1.1
-TCP window size: 85.3 KByte (default)
-------------------------------------------------------------
-

- Open a second console window and start iperf as a client. Option -c identifies this instance of iperf as a client. Option -B binds this instance to the one interface by IP address, in this case IP2 defined earlier. The server address must also be specified, in this case IP1 bound to the server in the last step. -

-iperf -B ${IP2} -c ${IP1}
-------------------------------------------------------------
-Client connecting to 192.168.1.1, TCP port 5001
-Binding to local address 192.168.2.1
-TCP window size: 16.0 KByte (default)
-------------------------------------------------------------
-[  3] local 192.168.2.1 port 5001 connected with 192.168.1.1 port 5001
-[ ID] Interval       Transfer     Bandwidth
-[  3]  0.0-10.0 sec  31.1 MBytes  26.0 Mbits/sec
-

Example 2.3.  - send-to-self Patch Installation -

- The send-to-self patch exists for several recent Linux™ kernel versions but not all versions. Assuming you have obtained the correct kernel archive and the correct patch version, the following script illustrates the steps needed to apply the patch on Ubuntu 9.04™ and recompile the kernel. Observe that, in this case, the patch version does not match the kernel version because a patch has not been published for that kernel version. -

- The following script can be used on a Ubuntu Linux distribution to download kernel source, the send-to-self patch, apply the patch then compile and install the resulting kernal image. When the menuconfig screen appears: -

  1. - Select General Setup on the Linux Kernel Configuration screen. -

  2. - Select Local version - append to kernel release on the General Setup screen. -

  3. - Enter the version suffix -send-to-self. -

  4. - Select ok to return to the General Setup screen. -

  5. - Select Automatically append version information to the version string on the General Setup screen. -

  6. - Select exit to return to the Linux Kernel Configuration screen. -

  7. - Select exit to close the menuconfig program. -

  8. - Select yes if prompted to save your new kernel configuration. This message does not appear each time. -

-#!/bin/bash
-# file: patches/send-to-self-2.6.28.sh
-
-# ====================================================================
-# environment variables;
-# --------------------------------------------------------------------
-
-VERSION=2.6.28
-CURRENT=9
-VARIANT=send-to-self
-PACKAGE=linux-source-${VERSION}
-ARCHIVE=${PACKAGE}.tar.bz2
-PATCH=send-to-self-2.6.26-1.diff 
-
-# ====================================================================
-# extend version string;
-# --------------------------------------------------------------------
-
-if [ ! -z ${CURRENT} ]; then
-	VERSION+=.${CURRENT}
-fi
-if [ ! -z ${VARIANT} ]; then
-	VERSION+=-${VARIANT}
-fi
-
-# ====================================================================
-# install required software;
-# --------------------------------------------------------------------
-
-if [ ! -f ${ARCHIVE} ]; then
-	wget http://www.ssi.bg/~ja/${PATCH}
- 	apt-get install ${PACKAGE} 
-#	apt-get install ${PACKAGE} --reinstall
-	apt-get install binutils patch gcc g++
-	apt-get install ncurses-dev
-	mv /usr/src/${ARCHIVE} . 
-fi
-
-# ====================================================================
-# confirm archive file exists;
-# --------------------------------------------------------------------
-
-if [ ! -f ${ARCHIVE} ]; then
-	echo "File ${ARCHIVE} is missing or misplaced"
-	exit 1
-fi
-
-# ====================================================================
-# confirm patch file exists;
-# --------------------------------------------------------------------
-
-if [ ! -f ${PATCH} ]; then
-	echo "File ${PATCH} is missing or misplaced"
-	exit 1
-fi
-
-# ====================================================================
-# remove old kernel source if present;
-# --------------------------------------------------------------------
-
-if [ -d ${PACKAGE} ]; then
-	echo "Removing old source ..."
-	rm -fr ${PACKAGE}
-fi
-
-# ====================================================================
-# extract kernel source;
-# --------------------------------------------------------------------
-
-tar -vjxf ${ARCHIVE}
-if [ ! -d ${PACKAGE} ]; then
-	echo "Folder ${PACKAGE} does not exist"
-	exit 1
-fi
-cd ${PACKAGE}
-
-# ====================================================================
-# patch kernel source;
-# --------------------------------------------------------------------
-
-patch -p1 < ../${PATCH}
-
-# ====================================================================
-# compile kernel source; 
-# --------------------------------------------------------------------
-
-make mrproper
-make menuconfig
-make 
-
-# ====================================================================
-# install kernel source; 
-# --------------------------------------------------------------------
-
-make modules_install
-make install
-
-# ====================================================================
-# install kernel source; 
-# --------------------------------------------------------------------
-
-mkinitramfs -o /boot/initrd.img-${VERSION} ${VERSION}
-ln -fs config-${VERSION} /boot/config
-ln -fs initrd.img-${VERSION} /boot/initrd.img
-ln -fs System.map-${VERSION} /boot/System.map
-ln -fs vmlinuz-${VERSION} /boot/vmlinuz
-
-

- In case you don't know ... -

- apt-get --reinstall -

- The apt-get program is only available on Debian-based distributions. If you do not use a Debian-based system then you must find another way to obtain the necessary packages. Option --reinstall instructs apt-get to download the kernel even though it has been installed before. It is not needed on the first script execution but may be needed on subsequent script executions if you have deleted the kernel archive file. -

- mkinitramfs -

- This script uses mkinitramfs instead of the mkinitrd. This may differ on other distributions. The kernel source package used here has Ubuntu™ modifications that result in a minor version being appended to the kernel version. This may not happen with other distributions or with kernels obtained directly from kernel.org. -

- cut-and-paste -

- This script, or some like it, are included in the ./patches folder of the toolkit. You can also copy and paste this script but remember to edit the environment variables at the top, remove all carriage returns and set correct file permissions with chmod 0755 before executing it on your Linux™ host. Run the script as root user.

- grub/menu.lst -

- If your system uses grub then edit file /boot/grub/menu.lst and add a new reference to the new initrd.img, System.map and vmlinuz files installed in folder /boot by this script. We recommend adding these references as the last ones in the file so that the new kernel does not start by default. Once you are confident that everything works, you can then move the references to the first entry. We also recommend setting the timeout value to 10 for now. -

Example 2.4.  - send-to-self Patch Listing -

- The following send-to-self patch is specifically for Linux™ kernel 2.6.30 and is provided for information only. For practical purposes, the patch has not changed much from version to version but the line numbers have changed. Some recent send-to-self patches are included in the toolkit ./patches folder. -

-diff -urp v2.6.30/linux/Documentation/networking/ip-sysctl.txt linux/Documentation/networking/ip-sysctl.txt
---- v2.6.30/linux/Documentation/networking/ip-sysctl.txt	2009-06-13 10:53:29.000000000 +0300
-+++ linux/Documentation/networking/ip-sysctl.txt	2009-06-13 15:54:15.000000000 +0300
-@@ -637,6 +637,13 @@ accept_redirects - BOOLEAN
- forwarding - BOOLEAN
- 	Enable IP forwarding on this interface.
- 
-+loop - BOOLEAN
-+	By default (loop=0) the traffic between local IP addresses
-+	is routed via interface "lo". Setting this flag for two
-+	interfaces allows traffic between their IP addresses to
-+	be looped externally. This is useful for setups where the
-+	interfaces are attached to same broadcast medium.
-+
- mc_forwarding - BOOLEAN
- 	Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE
- 	and a multicast routing daemon is required.
-diff -urp v2.6.30/linux/include/linux/inetdevice.h linux/include/linux/inetdevice.h
---- v2.6.30/linux/include/linux/inetdevice.h	2009-06-13 10:53:56.000000000 +0300
-+++ linux/include/linux/inetdevice.h	2009-06-13 15:54:15.000000000 +0300
-@@ -106,6 +106,7 @@ static inline void ipv4_devconf_setall(s
- 	  IN_DEV_ORCONF((in_dev), ACCEPT_REDIRECTS)))
- 
- #define IN_DEV_ARPFILTER(in_dev)	IN_DEV_ORCONF((in_dev), ARPFILTER)
-+#define IN_DEV_LOOP(in_dev)		IN_DEV_CONF_GET(in_dev, LOOP)
- #define IN_DEV_ARP_ANNOUNCE(in_dev)	IN_DEV_MAXCONF((in_dev), ARP_ANNOUNCE)
- #define IN_DEV_ARP_IGNORE(in_dev)	IN_DEV_MAXCONF((in_dev), ARP_IGNORE)
- #define IN_DEV_ARP_NOTIFY(in_dev)	IN_DEV_MAXCONF((in_dev), ARP_NOTIFY)
-diff -urp v2.6.30/linux/include/linux/sysctl.h linux/include/linux/sysctl.h
---- v2.6.30/linux/include/linux/sysctl.h	2009-06-13 10:53:56.000000000 +0300
-+++ linux/include/linux/sysctl.h	2009-06-13 15:54:40.000000000 +0300
-@@ -491,6 +491,7 @@ enum
- 	NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
- 	NET_IPV4_CONF_ARP_ACCEPT=21,
- 	NET_IPV4_CONF_ARP_NOTIFY=22,
-+	NET_IPV4_CONF_LOOP=23,
- 	__NET_IPV4_CONF_MAX
- };
- 
-diff -urp v2.6.30/linux/kernel/sysctl_check.c linux/kernel/sysctl_check.c
---- v2.6.30/linux/kernel/sysctl_check.c	2009-06-13 10:53:57.000000000 +0300
-+++ linux/kernel/sysctl_check.c	2009-06-13 15:55:00.000000000 +0300
-@@ -220,6 +220,7 @@ static const struct trans_ctl_table tran
- 	{ NET_IPV4_CONF_PROMOTE_SECONDARIES,	"promote_secondaries" },
- 	{ NET_IPV4_CONF_ARP_ACCEPT,		"arp_accept" },
- 	{ NET_IPV4_CONF_ARP_NOTIFY,		"arp_notify" },
-+	{ NET_IPV4_CONF_LOOP,			"loop" },
- 	{}
- };
- 
-diff -urp v2.6.30/linux/net/ipv4/devinet.c linux/net/ipv4/devinet.c
---- v2.6.30/linux/net/ipv4/devinet.c	2009-06-13 10:53:58.000000000 +0300
-+++ linux/net/ipv4/devinet.c	2009-06-13 15:55:22.000000000 +0300
-@@ -1449,6 +1449,7 @@ static struct devinet_sysctl_table {
- 		DEVINET_SYSCTL_RW_ENTRY(ARP_IGNORE, "arp_ignore"),
- 		DEVINET_SYSCTL_RW_ENTRY(ARP_ACCEPT, "arp_accept"),
- 		DEVINET_SYSCTL_RW_ENTRY(ARP_NOTIFY, "arp_notify"),
-+		DEVINET_SYSCTL_RW_ENTRY(LOOP, "loop"),
- 
- 		DEVINET_SYSCTL_FLUSHING_ENTRY(NOXFRM, "disable_xfrm"),
- 		DEVINET_SYSCTL_FLUSHING_ENTRY(NOPOLICY, "disable_policy"),
-diff -urp v2.6.30/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
---- v2.6.30/linux/net/ipv4/fib_frontend.c	2009-06-13 10:53:58.000000000 +0300
-+++ linux/net/ipv4/fib_frontend.c	2009-06-13 15:54:15.000000000 +0300
-@@ -239,16 +239,17 @@ int fib_validate_source(__be32 src, __be
- 					.tos = tos } },
- 			    .iif = oif };
- 	struct fib_result res;
--	int no_addr, rpf;
-+	int no_addr, rpf, loop;
- 	int ret;
- 	struct net *net;
- 
--	no_addr = rpf = 0;
-+	no_addr = rpf = loop = 0;
- 	rcu_read_lock();
- 	in_dev = __in_dev_get_rcu(dev);
- 	if (in_dev) {
- 		no_addr = in_dev->ifa_list == NULL;
- 		rpf = IN_DEV_RPFILTER(in_dev);
-+		loop = IN_DEV_LOOP(in_dev);
- 	}
- 	rcu_read_unlock();
- 
-@@ -258,6 +259,11 @@ int fib_validate_source(__be32 src, __be
- 	net = dev_net(dev);
- 	if (fib_lookup(net, &fl, &res))
- 		goto last_resort;
-+	if (loop && res.type == RTN_LOCAL) {
-+		*spec_dst = FIB_RES_PREFSRC(res);
-+		fib_res_put(&res);
-+		return 0;
-+	}
- 	if (res.type != RTN_UNICAST)
- 		goto e_inval_res;
- 	*spec_dst = FIB_RES_PREFSRC(res);
-diff -urp v2.6.30/linux/net/ipv4/route.c linux/net/ipv4/route.c
---- v2.6.30/linux/net/ipv4/route.c	2009-06-13 10:53:58.000000000 +0300
-+++ linux/net/ipv4/route.c	2009-06-13 15:54:15.000000000 +0300
-@@ -2521,6 +2521,11 @@ static int ip_route_output_slow(struct n
- 			dev_put(dev_out);
- 			goto out;	/* Wrong error code */
- 		}
-+		err = -ENETDOWN;
-+		if (!(dev_out->flags&IFF_UP)) {
-+			dev_put(dev_out);
-+			goto out;
-+		}
- 
- 		if (ipv4_is_local_multicast(oldflp->fl4_dst) ||
- 		    oldflp->fl4_dst == htonl(0xFFFFFFFF)) {
-@@ -2588,10 +2593,41 @@ static int ip_route_output_slow(struct n
- 	free_res = 1;
- 
- 	if (res.type == RTN_LOCAL) {
--		if (!fl.fl4_src)
--			fl.fl4_src = fl.fl4_dst;
-+		struct in_device *in_dev;
-+		__be32 src;
-+
- 		if (dev_out)
- 			dev_put(dev_out);
-+		dev_out = FIB_RES_DEV(res);
-+		in_dev = in_dev_get(dev_out);
-+		src = fl.fl4_src? : FIB_RES_PREFSRC(res);
-+		if (in_dev && IN_DEV_LOOP(in_dev) && src) {
-+			struct net_device *dev_src;
-+
-+			in_dev_put(in_dev);
-+			in_dev = NULL;
-+			dev_src = ip_dev_find(net, src);
-+			if (dev_src && dev_src != dev_out &&
-+			    (in_dev = in_dev_get(dev_src)) &&
-+			    IN_DEV_LOOP(in_dev)) {
-+				in_dev_put(in_dev);
-+				dev_out = dev_src;
-+				fl.fl4_src = src;
-+				fl.oif = dev_out->ifindex;
-+				res.type = RTN_UNICAST;
-+				if (res.fi) {
-+					fib_info_put(res.fi);
-+					res.fi = NULL;
-+				}
-+				goto make_route;
-+			}
-+			if (dev_src)
-+				dev_put(dev_src);
-+		}
-+		if (in_dev)
-+			in_dev_put(in_dev);
-+		if (!fl.fl4_src)
-+			fl.fl4_src = fl.fl4_dst;
- 		dev_out = net->loopback_dev;
- 		dev_hold(dev_out);
- 		fl.oif = dev_out->ifindex;
-

diff --git a/docbook/ch03.html b/docbook/ch03.html deleted file mode 100644 index ede2a9e2..00000000 --- a/docbook/ch03.html +++ /dev/null @@ -1,57 +0,0 @@ -Chapter 3.  Software

Chapter 3.  - Software -

Table of Contents

- Introduction -
- Security Considerations -
- Platform Options -
- GNU/Linux -
- GNU/Linux with Libpcap -
- GNU/Linux with BPF -
- Mac OS X™ with BPF -
- Windows XP™ with Winpcap -
- GNU Makefiles on Linux -
- Stand-alone Compiling on GNU/Linux -
- Cross-Compiling on GNU/Linux -
- Compilation with Visual Studio .NET 2003 -
- Microsoft Solution Files -
- Header Files -
- Compiler Constants -
- Platform Constants -
- Ethernet Constants -
- LibPcap, WinPcap and BPF -
- Structure Packing -
- Endian-ness -
- Packet Basics -
- Frame Encoding -

- Introduction -

- The Open Powerline Toolkit is designed to support hardware engineers and embedded software developers working on GNU/Linux and Linux-like systems. Debian GNU/Linux is the platform of choice because it is open source and has extensive cross-platform support. The toolkit has been compiled and executed on several platforms but Qualcomm Atheros does not necessarily support the toolkit on those platforms. Qualcomm Atheros has made every effort to enable cross-platform compatibility by conforming to POSIX standards and following good programming practice but there are limitations on any such effort. -

diff --git a/docbook/ch03s02.html b/docbook/ch03s02.html deleted file mode 100644 index a6cf95be..00000000 --- a/docbook/ch03s02.html +++ /dev/null @@ -1,17 +0,0 @@ -Security Considerations

- Security Considerations -

- Toolkit programs are installed in /usr/local/bin with owner root and group root (chown root:root) and with read and execute permissions for owner, group and others (chmod 0555). This lets anyone execute these programs even though they are owned by user root. -

- Additionally, programs that send raw Ethernet frames are installed with seteuid owner (chmod 4555) so that they will execute with root user privileges, regardless of the user executing them. This lets any user send raw Ethernet frames but it also presents a security risk on the host computer. For example, program int6k is intended to read and write .nvm and .pib files but a malicious user could use it to overwrite other files normally protected by standard file permissions. -

- You can change the default file permissions by changing the -m 4555 option on the install command in various Makefiles. Be aware that doing so will restrict program access to the the root user. -

diff --git a/docbook/ch03s03.html b/docbook/ch03s03.html deleted file mode 100644 index 9510213b..00000000 --- a/docbook/ch03s03.html +++ /dev/null @@ -1,45 +0,0 @@ -Platform Options

- Platform Options -

- Qualcomm Atheros makes no claim that the Open Powerline Toolkit will compile and link in all environments without generating warnings or errors. Different compilers, and compiler versions, treat certain conditions differently and different distributions include different header files or define standard constants and macros differently. Developers should expect to make some source code and makefile modifications to match their environment. -

- The principle consideration is support for raw Ethernet frames. Other considerations include POSIX compliance, system header file locations, compiler version and library support. This section discusses some of these considerations. -

- GNU/Linux -

- The toolkit will compile and execute on GNU/Linux systems without modification by using standard Linux header files and native Linux libraries. Raw socket support is native to the Linux Kernel. This is the preferred environment due to cost, networking speed and ease of access to Layer 2 networking. -

- Qualcomm Atheros has cross-compiled and executed versions of the toolkit on MontaVista™ and AMiLDA™ Linux both for MIPSEL™ processors. Most toolkit makefiles have symbolic hooks for cross-compilers but Qualcomm Atheros does not support cross-compilation efforts on any platform. -

- GNU/Linux with Libpcap -

- The toolkit can compile and will execute on GNU/Linux systems having the libpcap development package and runtime libraries installed; however, this feature is disabled by default because it is not needed on Linux and offers no benefits over native Linux sockets. -

- GNU/Linux with BPF -

- The toolkit should compile and execute on GNU/Linux systems having BPF compiled into the kernel but modifications would be needed to toolkit source code. This configuration has not been tested but the source code is present to support it. Consult Qualcomm Atheros if this option is of interest to you. -

- Mac OS X™ with BPF -

- The toolkit will compile and execute on Mac OS X without modification by using native BPF support compiled into the Darwin kernel. Compilation is clean on Leopard and should be fairly clean on Tiger. -

- You may observe compiler warnings concerning the size_t data type and print statements. These warning occur because Mac OS X defined the size_t data type as a 64-bit integer while most other systems define it as a 32-bit integer. Ignore the warnings. We will eventually eliminate them all. -

- You may observe a compiler warning concerning the definition of intrinsic function snprinf. We are not sure what causes this warning but it will be corrected eventually. -

- Windows XP™ with Winpcap -

- The toolkit will compile and execute on Microsoft Windows XP™ having WinPcap 4.0.1 runtime libraries installed. To assist windows developers, the toolkit includes a Microsoft Visual Studio .NET 2003™ solution file plus required WinPcap 4.0.1 header files and libraries. The resulting programs should execute on any Microsoft Windows™ computer having WinPcap 4.0.1 runtime libraries installed. Qualcomm Atheros does not support the toolkit under any Microsoft Windows™ operating system at this time. -

- Recent versions of the toolkit include self-extracting file .\VisualStudioNET\WinPcap4_0_1.exe that installs WinPcap 4.0.1 libraries on your system in cases where you have another version installed. If this creates a conflict the you must resolve it to satisfy your system requirements. -

- This is not the preferred Toolkit environment due to cost, networking overhead, difficulty accessing Layer network support and lack of a powerful native scripting language. Qualcomm Atheros has not implemented all Toolkit programs on Windows for technical reasons. -

diff --git a/docbook/ch03s04.html b/docbook/ch03s04.html deleted file mode 100644 index 65ae9973..00000000 --- a/docbook/ch03s04.html +++ /dev/null @@ -1,51 +0,0 @@ -GNU Makefiles on Linux

- GNU Makefiles on Linux -

- The toolkit includes recursive GNU makefiles for Linux. The Makefile in the root folder calls Makefiles in subordinate folders. Makefiles in subordinate folders can be run independently to produce individual toolkit components. Developers can control which components are compiled and installed by editing the FOLDERS symbol in the main Makefile. -

- Component Makefiles have a standard format that includes the following targets: -

- compile -

- Compiles source code files prior to installation. Intermmediate files and target files are created in the same folder as the Makefile. This is the default target. That means that typing make or make compile have the same result. -

- library -

- Creates any special folders that are needed for installation. This target is built by the install target but it can be built independently. -

- scripts -

- Installs scripts required for proper toolkit operation. This target must be built explicitly to prevent accidental loss of changes made to existing scripts. This target may be built at any time, before or after the install target. -

- manuals -

- Creates manuals, documents or html pages. Documentation files are not automatically installed by any target. Installation is left to the user. -

- install -

- Installs executable files in folder /usr/local/bin. This target automatically builds the compile target before installation. This means that make install will compile and install in one step. -

- uninstall -

- Removes installed components. This target does nothing for Makefiles that have install targets defined. -

- clean -

- Removes intermmediate and temporary files. Temporary files are defined by variable TRASH at the start of each Makefile. -

- fresh -

- Removes intermmediate and temporary then re-compiles local targets. It is normally equivalent to make clean followed by make compile. -

- Developers wanting to compile the toolkit under Windows™ should use Visual Studio .NET™ solution files instead of makefiles. -

- Developers wanting to compile the toolkit under OpenBSD must make changes to accommodate variations in make program syntax. -

diff --git a/docbook/ch03s05.html b/docbook/ch03s05.html deleted file mode 100644 index 55e00bfc..00000000 --- a/docbook/ch03s05.html +++ /dev/null @@ -1,30 +0,0 @@ -Stand-alone Compiling on GNU/Linux

- Stand-alone Compiling on GNU/Linux -

- You do not need makefiles to build toolkit programs because source files explicitly include all required components using include statement blocks like that shown below. You will see similar blocks near the top of most programs. -

Example 3.1.  - The MAKEFILE constant -

-#ifndef MAKEFILE 
-#include "../tools/getoptv.c" 
-#include "../tools/putoptv.c" 
-#include "../tools/version.c" 
-... 
-#endif 
-

- This mechanism has several advantages. First, the preprocessor include statements form a complete inventory of required files. Secondly, the relative pathnames help developers locate needed source files. Third, the complete program can be compiled with one gcc command, like the one shown below. This allows program compilation in environments where the GNU make program or the Atheros Makefiles are not available. -

Example 3.2.  - Stand-alone Compiling on GNU/Linux -

-# gcc -o program program.c 
-

- Most toolkit makefiles define the preprocessor constant MAKEFILE as a compiler option using CFLAGS= ... -DMAKEFILE .... When this constant is defined, the compiler will not include components inside an include block like that shown above and so the Makefile is responsible for compiling and linking all components. If the constant is not defined, because no Makefile was used, the compiler will merely include everything needed. -

diff --git a/docbook/ch03s06.html b/docbook/ch03s06.html deleted file mode 100644 index cf4bf190..00000000 --- a/docbook/ch03s06.html +++ /dev/null @@ -1,64 +0,0 @@ -Cross-Compiling on GNU/Linux

- Cross-Compiling on GNU/Linux -

- Makefiles are setup for cross-compilation using custom toolchains. File make.def, in the main toolkit folder, defines cross-comilation symbols referenced in lower-level makefiles. Lower-level makefiles include make.def before building their targets. The following is an example make.def file used when cross-compiling for the ADM5120 MIPSEL-based gateway. -

Example 3.3.  - Cross-compiling with make.def -

-# file: make.def
-
-# ====================================================================
-# Edimax Hardware;
-# --------------------------------------------------------------------
-
-PLATFORM=-D_ADM5120_
-MODEL=-D_6104KP_
-ENDIAN=-D_LITTLE_ENDIAN_
-GATEWAY=y
-
-# ====================================================================
-# AMiLDA Software; uncomment these lines when cross-compiling;
-# --------------------------------------------------------------------
-
-# CROSS=/export/tools/mipsel-linux-uclibc/bin/mipsel-uclibc-
-# CROSS_LINUX=/export/tools/bin/mipsel-linux-
-
-# ====================================================================
-# toolchain;
-# --------------------------------------------------------------------
-
-CC=$(CROSS)gcc
-STRIP=$(CROSS)strip
-LD=$(CROSS)ld
-AR=$(CROSS)ar
-RANLIB=$(CROSS)ranlib
-CAS=$(CROSS)gcc -c
-CPP=$(CROSS)gcc -E
-
-# ====================================================================
-# folders;
-# --------------------------------------------------------------------
-
-BIN=/usr/local/bin
-MAN=/usr/share/man/man7
-WWW=/home/www
-DOC=/home/www/software/plc-utils/
-
-# ====================================================================
-# permissions;
-# --------------------------------------------------------------------
-
-OWNER=0
-GROUP=0
-
-

- Developers are encouraged to make changes in this file rather than adding additional variables to the lower-level makefiles. For example, you can edit variable BIN to install toolkit programs in some location other than /usr/local/bin or variable WWW to install HTML documentation on your local website. -

diff --git a/docbook/ch03s07.html b/docbook/ch03s07.html deleted file mode 100644 index fe8f8061..00000000 --- a/docbook/ch03s07.html +++ /dev/null @@ -1,27 +0,0 @@ -Compilation with Visual Studio .NET 2003

- Compilation with Visual Studio .NET 2003 -

- To build the Open Powerline Toolkit on Windows XP, you must have access to a Windows computer with Visual Studio .NET 2003 and WinPcap runtime libraries installed. WinPcap is an open source version of the packet capture library, libpcap, widely used on Linux and OpenBSD systems. It is readily available on the Internet. Installation of these components is beyond the scope of this document. -

- The Windows and Linux versions of the Open Powerline Toolkit use the same code base but the Windows version requires a Microsoft solution file that includes special compiler settings and specific POSIX header files. The solution file and header files are included in the same archive as Linux version. -

Example 3.4.  - Microsoft Visual Studio .NET 2003 -


- Use an application like WinZip to extract archived files into a build folder of your choice. Use Windows Explorer to locate solution file .\VisualStudioNET\plc-utils.sln under the toolkit root folder. Double-click the file to open it with Visual Studio .NET. In Visual Studio .NET, open the Solution Explorer window and observe a display similar to that shown above. -

- Figure 1 illustrates a Visual Studio .NET window with the Solution Explorer pane exposed. In the Solution Explorer window, right-click the plc-utils solution and select the Rebuild menu option. Compiliation should begin. Watch for comilation errors. -

- On successful compilation of all projects in this solution, you should find executable programs in the Release folder under each project folder. If not then look in the Debug folder, instead. You can now open a console window, change to each Release or Debug folder in turn and run the programs located there. Instead, we recommend that you create a Windows Installer package by right-clicking on the Install project in the Solution Explorer window and selecting the Build menu option. Compilation should resume. -

- On successful completion of the install project build, you should find the Windows Installer file plc-utils.msi in the VisualStudioNET folder above the install project folder. Double-clicking on this file will start the Windows Installer program. -

- To distribute the toolkit package to other Windows computers, copy the Windows Installer file to a public network share or some type of portable media. -

diff --git a/docbook/ch03s08.html b/docbook/ch03s08.html deleted file mode 100644 index 17d8face..00000000 --- a/docbook/ch03s08.html +++ /dev/null @@ -1,28 +0,0 @@ -Microsoft Solution Files

- Microsoft Solution Files -

- The Atheros Open Powerline Toolkit includes a Visual Studio .NET™ solution file, ./VisualStudioNET/plc-utils.sln, that will build the toolkit on Windows XP SP2 from the Linux code base. The following information may be helpful to developers wanting to modify or extend the solution or port it to another version of Microsoft Visual Studio: -

diff --git a/docbook/ch03s09.html b/docbook/ch03s09.html deleted file mode 100644 index 2b2eb1d3..00000000 --- a/docbook/ch03s09.html +++ /dev/null @@ -1,19 +0,0 @@ -Header Files

- Header Files -

- Atheros Open Powerline Toolkit programs reference POSIX functions and constants where possible. Specifically, they make wide use of the data types uint8_t, uint16_t and uint32_t which are defined in file stdint.h. Microsoft Visual C™ and .NET™ environments do not include this file. Consequently, Atheros provides an alternative in folder ../Windows/include. This file is open source and was designed to be compatible with the Microsoft development environments; however, you may occassionally experience warnings about the "benign redefinition" for some of these data types. -

- Where possible, this toolkit includes OpenBSD™ network constants because the OpenBSD project pioneered many of the common network protocols and applications used today. Some systems do not include all OpenBSD™ network header files or do not define all OpenBSD™ network constants. Specifically, Microsoft systems do not provide file netinet/if_ether.h and so an alternative is included in folder ../Windows/include/netinet and Windows™ applications should include it. -

- When the gcc -std=iso9899:1999 option is enabled, some OpenBSD™ header files found on GNU/Linux systems will exclude required constant definitions because they do not conform to that standard. Atheros is investigating the best way to address this problem. -

- On some systems, such as OpenBSD™, FreeBSD™ and Mac OS X™, header files must be included in specific order to avoid compilation errors. We have done our best to deal with this problem. Visit the GNU Autocnf Project for more information about this. -

diff --git a/docbook/ch03s10.html b/docbook/ch03s10.html deleted file mode 100644 index 2551920d..00000000 --- a/docbook/ch03s10.html +++ /dev/null @@ -1,77 +0,0 @@ -Compiler Constants

- Compiler Constants -

- Platform Constants -

- Platform constants conditionaly compile source code blocks based on the hardware architecture and host operating system. Hardware architecture constants are normally defined in system header files. Operating system constants are often compiler intrinsic or defined in system header files. -

- __APPLE__ -

- A intrinsic compiler constant indicating Mac OS X™ operating system support. -

- __BYTE_ORDER -

- A standard constant indicating big or little endian host architecture. Some systems may not define this constant and so an alternative should be used. -

- LIBPCAP -

- An Atheros constant, that must be manually defined in your makefile or solution file, to indicate that the target host will have LibPcap support. It is not used by the toolkit, at this time, and so the associated code has not been tested. -

- __linux__ -

- A standard constant indicating GNU/Linux™ kernel support. It is automatically defined on GNU/Linux™ systems. -

- __OpenBSD__ -

- A standard constant indicating OpenBSD™ kernel support. It is automatically define on OpenBSD™ systems. It is not used by the toolkit, at this time, and so the associated code has not been extensively tested. -

- WIN32 -

- A standard constant indicating Microsoft Windows™ support. It is automatically defined in Microsoft Windows™ environments. -

- WINPCAP -

- An Atheros constant, that must be manually defined in your makefile or solution file, to indicate that the target host will have WinPcap support. The toolkit only defines this constant in Windows Microsoft project files for programs that perform raw Ethernet I/O. -

- Ethernet Constants -

- The toolkit attempts to use existing definitions for Ethernet related constants where possible. This has been problematic due to inconsistencies in the way different systems structure their header files. Most of the following definitions already exist on Linux™, OpenBSD™ and OS X™ but there are still some differences between Linux™ distributions and many constants are undefined on Windows™. -

- The Windows™ version of the toolkit includes an abbreviated net/ethernet.h that provides constant definitions mentioned in this section. -

- ETHER_ADDR_LEN -

- The length of an Ethernet hardware address in bytes. The value is 6 bytes. On Linux™ and OS X™, this is defined in net/ethernet.h. -

- ETHER_CRC_LEN -

- The length of an Ethernet frame FCS trailer. The value is 4 bytes. On Linux™ and OS X™, this is defined in net/ethernet.h. Atheros also includes a conditional definition in int6k/int6k.h because some Linux™ system do not define it anywhere. -

- ETHER_HDR_LEN -

- The length of an Ethernet frame header including the source address, destination address and type/length field. The value is 14 bytes or ETHER_ADDR_LEN + ETHER_ADDR_LEN + ETHER_TYPE_LEN. On Linux™ and OS X™, this is defined in net/ethernet.h. -

- ETHER_MAX_LEN -

- The maximum length of an Ethernet frame in bytes. The value is 1518 bytes of ETHER_HDR_LEN + ETHERMTU + ETHER_CRC_LEN. On Linux™ and OS X™, this is defined in net/ethernet.h. -

- ETHER_MIN_LEN -

- The minimum length of an Ethernet frame in bytes. The value is 64 bytes. On Linux™ and OS X™ this is defined in net/ethernet.h -

- ETHER_TYPE_LEN -

- The length of Ethernet type/length, or ethertype, field in bytes. The value is 2. On Linux™ and OS X™, it is defined in net/ethernet.h. -

- ETHERMTU -

- The maximum transfer unit (ie; data handling capacity) for an Ethernet frame in bytes. The value is 1500 bytes. On Linux™ and OS X™, this is defined in net/ethernet.h -

diff --git a/docbook/ch03s11.html b/docbook/ch03s11.html deleted file mode 100644 index dd64ea5e..00000000 --- a/docbook/ch03s11.html +++ /dev/null @@ -1,20 +0,0 @@ -LibPcap, WinPcap and BPF

- LibPcap, WinPcap and BPF -

- LibPcap is an open source Ethernet packet capture library that is widely used. It provides core functionality for the Wireshark packet sniffer, formerly known as Ethereal. -LibPcap libraries are available for Linux and OpenBSD. On Linux and OpenBSD you must link applications to libpcap.a and libwpcap.a. The toolkit does not use either of these libraries on Linux because they are not needed there. -

- WinPcap is an open source version of LibPcap written for Microsoft Windows™. The WinPcap libraries let Windows applications send and receive raw packets. On Windows™ you must link applications to Packet.lib and wpcap.lib. -

- In principle, the LibPcap and WinPcap library implementations should function identically but they do not; however, they are similar enough to provide a useful degree of platform independence. Defining preprocessor constants LIBPCAP or WINPCAP when compiling the toolkit will enable the corresponding source code. This can be done by adding "-DLIBPCAP" or "-DWINPCAP" to variable LFLAGS in file Makefile in folders int6k, int6k2, efsu and hpav. Constant WINPCAP need only be defined this way when compiling the toolkit using cygwin™ or mingw™ environments. Do not define both constants LIBPCAP and WINPCAP at the same time or compiler errors will occur. -

- Berkeley Packet Filters (BPF) is an open source Ethernet packet capture mechanism available on many UNIX™-like systems. Native BPF is supported on some systems but must be explicitly compiled into the kernel on other systems. Linux™ systems normally do not support BPF by default but Mac OS X™ does and so we automatically use it whenever compiler constant __APPLE__ is defined. In principle, one could compile a custom Linux™ kernel with BPF enabled. -

diff --git a/docbook/ch03s12.html b/docbook/ch03s12.html deleted file mode 100644 index d7036a2f..00000000 --- a/docbook/ch03s12.html +++ /dev/null @@ -1,85 +0,0 @@ -Structure Packing

- Structure Packing -

Programs in this toolkit make extensive use of packed data structures to simplify source code and guarantee reliability; however, this creates portability issues because different compilers implement structure packing in different ways. Three common structure packing mechanisms are:

- _packed -

- The __packed keyword is not part of any C or C++ standard but it is recognized by some compilers, such as the ARM C/C++ and OpenBSD C compiler. This keyword only affects the data structure that it prefaces and it is an ideal way to selectively pack structures. It can be easily defined and undefined using a preprocessor macro. Atheros has elected to insert this keyword wherever it might be appropriate. The ARM C compilers accept this keyword. -

Example 3.5.  - Packing Structures with keyword __packed -

-typedef struct __packed header_eth 
-{ 
-	uint8_t source [ETHER_ADDR_LEN]; 
-	uint8_t target [ETHER_ADDR_LEN]; 
-	uint16_t protocol; 
-} 
-header_eth; 
-

- __attribute__ ((packed)) -

- Attributes are not part of any C or C++ standard but they are recognized by the gcc and Sun Microsystems C compiler. Attributes only affect structures and functions that reference them in their declaration. This is convenient because we can use a preprocessor macro to define the keyword __packed, mentioned above, to be __attribute__ ((packed)). Atheros includes this definition in tools/types.h and OpenBSD does this in their system header files. -

Example 3.6.  - Packing Structures with Attribute packed -

-typedef struct __attribute__ ((packed)) header_eth 
-{ 
-	uint8_t source [ETHER_ADDR_LEN]; 
-	uint8_t target [ETHER_ADDR_LEN]; 
-	uint16_t protocol; 
-} 
-header_eth; 
-

- #pragrma pack -

- Pragmas are part of most C and C++ language standards but some compilers do not recognize or implement the pack pragma. In addition, different compilers implement it in different ways. The pack pragma affects all data structures up the next pack pragma or end of compile unit. Most pragma implementations accept the push and pop option for pragma nesting. Some pragma pack implementations accept no arguments, most permit either one or two arguments while others allow three arguments. OpenBSD does not recognize this pragma and generates warnings in all cases. Aside from all that, the pack pragma is the most widely supported method for declaring packed structures. -

Example 3.7.  - Packing Structures with the Pragma pack -

-#pragma pack (push, 1) 
-struct header_eth 
-{ 
-	uint8_t source [ETHER_ADDR_LEN]; 
-	uint8_t target [ETHER_ADDR_LEN]; 
-	uint16_t protocol; 
-} 
-header_eth; 
-#pragma pack (pop)
-

- The Atheros Way -

- Toolkit programs declares packed structures using all three methods, as shown below. -

Example 3.8.  - Packing Structures the Atheros Way -

-#ifndef __packed 
-#ifdef __GNUC__ 
-#define __packed __attribute__ ((packed)) 
-#else 
-#define __packed 
-#endif 
-#endif 
-
-#ifndef __GNUC__
-#pragma pack (push, 1)
-#endif
- 
-struct __packed header_eth 
-{ 
-	uint8_t source [ETHER_ADDR_LEN]; 
-	uint8_t target [ETHER_ADDR_LEN]; 
-	uint16_t protocol; 
-} 
-header_eth; 
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif 
-

diff --git a/docbook/ch03s13.html b/docbook/ch03s13.html deleted file mode 100644 index 50a8807d..00000000 --- a/docbook/ch03s13.html +++ /dev/null @@ -1,35 +0,0 @@ -Endian-ness

- Endian-ness -

- Atheros vendor-specific messages contain information in mixed endian format. The Ethernet header portion is sent big endian but the Atheros header and payload are sent in little endian . The traditional endian converstion functions htons(), htonl(), ntohs() and ntohl() can be used to perform platform independent conversions on the Ethernet header but not the Atheros header payload. -

- The Open Powerline Toolkit includes similar macros HTOLE16, HTOLE32, LE16TOH and LE32TOH in endian.h which serve the same function but conform to recommendations for standarized byte order function on Linux, OpenBSD and FreeBSD. Observe that the names are independent of any network implications. -

-#if BYTE_ORDER == BIG_ENDIAN
-#	define LE16TOH(x) __bswap_16(x)
-#	define LE32TOH(x) __bswap_32(x)
-#	define LE64TOH(x) __bswap_64(x)
-#	define HTOLE16(x) __bswap_16(x)
-#	define HTOLE32(x) __bswap_32(x)
-#	define HTOLE64(x) __bswap_64(x)
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#	define LE16TOH(x) (x)
-#	define LE32TOH(x) (x)
-#	define LE64TOH(x) (x)
-#	define HTOLE16(x) (x)
-#	define HTOLE32(x) (x)
-#	define HTOLE64(x) (x)
-#else
-#error "Undefined host byte order."
-#endif
-

- In addition, the Open Powerline Toolkit includes function endian that reverses byte order over a variable-length memory region. -

diff --git a/docbook/ch03s14.html b/docbook/ch03s14.html deleted file mode 100644 index 505d20e9..00000000 --- a/docbook/ch03s14.html +++ /dev/null @@ -1,43 +0,0 @@ -Packet Basics

- Packet Basics -

- Local and remote HomePlug® AV powerline devices are managed by sending Ethernet frames that contain HomePlug AV® formatted management messages. These frames have an 802.3 Ethernet header and a payload that contains the Management Message (MM). -

- The Ethernet header must be transmitted in newtwork byte order which is big-endian. The Ethernet payload must be sent in ARM™ host byte order which is little endian. You should use standard network functions htons() and htonl() to write Ethernet headers and ntohs() and ntohl() to read them. You should use function HTOLE16() and HTOLE32() to write integer payload values and LE26TOH() and LE32TOH() to read them. -

-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+
-| Ethernet Header                                       | Ethernet Payload    | 
-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+
-

- Ethernet headers consist of a destination address (ODA), a source address (OSA) and an ethertype (MTYPE). The ethertype is always 0x88E1 for Homeplug frames of any type. Programmers may use either function EthernetHeader.c or EncodeEthernetHeader to encode a buffer with the ODA and OSA and the HomePlug ethertype. An example appears later on. Structure header_eth is defined in ihp.h for this purpose. -

-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+
-|          ODA          |          OSA          | MTYPE | Ethernet Payload    |
-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+
-

- Management messages consist of a message header (MMHEADER) and a message entry (MMENTRY). The message header identifies the nature of the message entry that follows it. The acronyms MME and MMENTRY both mean Management Message Entry but they are often used to mean the entire management message or Ethernet frame. This imprecise usage can be confusing at times. Structure header_mme is defined in ihp.h for this purpose. -

-+---+ ... +---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+---+---+---+
-|             | MMHEADER              | MMENTRY                                 |
-+---+ ... +---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+---+---+---+
-

- The message header contains message protocol version (MMV), message type (MMTYPE) and vendor identifier (OUI). The management message entry (MMENTRY) that follows the header contains information unique to a the request (REQ), confirmation (CNF), response (RSP) or indication (IND). Programmers may use the Atheros EncodeAtherosHeader function to encode a buffer with a specific MMTYPE and the Atheros MMV and OUI. AN example appears later on. -

-+---+ ... +---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+---+---+---+
-|             |MMV| MMTYPE|    OUI    |        MMENTRY                          |
-+---+ ... +---+---+---+---+---+---+---+---+---+---+---+ ... +---+---+---+---+---+
-

- The MMV value, within MMHEADER, indicates the Homeplug AV Management Message protocol version which determines how the message should be interpreted. The protocol version is defined in the HomePlug AV Specification and may change from time to time. One notable change is the recent insertion of an FMI (Fragment Management Information ) field between MMTYPE and OUI , as shown below. -

- In most cases, protocol changes are hidden from the application by the Atheros API functions; however, software developers should set the HOMEPLUG_MMV constant, defined in ihp.h, to the version appropriate for their firmware or application. The value of this constant enables or disables conditional compilation statements throughout the HomePlug API code base. -

- To send an MME, you must encode an Ethernet frame buffer with information and transmit it. To read an MME, you must read an Ethernet frame buffer and decode it. The information necessary to encode or decode Atheros vendor-specific Ethernet frames is covered in the INT6000™ Firmware Technical Reference Manual; however, the Atheros HomePlug API includes many buffer encode and decode functions that support basic operational requirements. -

diff --git a/docbook/ch03s15.html b/docbook/ch03s15.html deleted file mode 100644 index 9c2b63b9..00000000 --- a/docbook/ch03s15.html +++ /dev/null @@ -1,45 +0,0 @@ -Frame Encoding

- Frame Encoding -

- The following technique illustrates one way to encode a frame buffer with an Ethernet header followed by an Atheros message header. We first declare the frame buffer then a length variable to keep track of how many bytes have actually been encoded. At any time, the value 'buffer + length' is the address of the next buffer position to encode and the expression 'sizeof (buffer) - length' is the number of un-encoded bytes remaining in the buffer. Each call to an encoding function will increment the length for the next operation. This technique minimizes the number of intermmediate application variables and makes maximum use of compiler generated constants. -

Example 3.9.  - Frame Encoding by Offset -

-uint8_t buffer [ETHER_MAX_LEN];
-size_t length = 0; 
-
-uint8_t OSA [ETHER_ADDR_LEN] = { 0x00, 0xB0, 0x52, 0x00, 0xD4, 0x32 };
-uint8_t ODA [ETHER_ADDR_LEN] = { 0x00, 0xB0, 0x52, 0x00, 0x66, 0xF7 };
-uint16_t MMTYPE = 0xA050;
-
-length += EncodeEthernetHeader (buffer + length, sizeof (buffer) - length, uint8_t OSA, uint8_t ODA);
-length += EncodeAtherosHeader (buffer + length, sizeof (buffer) - length, unit16_t MMTYPE);
-
-if (length < sizeof (MME))
-{
-	error (...);
-}
-

- For those who prefer to use pointers, the following technique accomplishes the same thing because. At any given time, the value bp - buffer is the encoded length. -

Example 3.10.  - Frame Encoding by Address -

-uint8_t buffer [ETHER_MAX_LEN];
-uint8_t bp = buffer;
-
-bp += EncodeEthernetHeader (bp, buffer + sizeof (buffer) - bp, uint8_t OSA, uint8_t ODA);
-bp += EncodeAtherosHeader (bp, buffer + sizeof (buffer) - bp, unit16_t MMTYPE);
-
-if (bp < (buffer + sizeof (MME)))
-{
-	error (...);
-}
-

diff --git a/docbook/ch04.html b/docbook/ch04.html deleted file mode 100644 index fe26b031..00000000 --- a/docbook/ch04.html +++ /dev/null @@ -1,57 +0,0 @@ -Chapter 4.  Firmware

Chapter 4.  - Firmware -

Table of Contents

- Introduction -
Firmware Components
- Bootloader -
- Softloader -
- Memory Configuration Parameters -
- Runtime Firmware (MAC Software) -
- Parameter Information Block (PIB) -
- Architecture Overview -
- Firmware Boot Process -
- Boot from Host Configuration -
- Things to Remember -
- Every Little Bit Hurts -
- Liar! Liar! Pants on Fire! -
- But wait! There's more ... -
- Upgrade Device (INT6000/INT6300/INT6400) -
- Update Local Host (INT6000/INT6300/INT6400) -
- Boot from Host (INT6000) -
- Boot from Host (INT6300) -
- Boot from Host (INT6400) -
- Boot from Host (AR7400) -
- Boot from Host (AR7420) -
- Flash Memory (AR6410/AR7420) -

- Introduction -

- An Atheros chipset consists of an integral CPU, ROM and proprietary circuitry. The CPU requires a minimum amount of external SDRAM to execute runtime software and store runtime configuration parameters. The INT6000™ chipset also requires a minimum amount of external flash memory in order to start. The INT6300™ can use external flash memory in the same way as the INT6000™ or it can use a local host processor as surrogate flash memory. -

- On startup, the SDRAM memory controller must be configured before runtime firmware and parameters are loaded. On the INT6000™, runtime firmware and configuration parameters must be loaded from external flash memory. On the INT6300™, it may be loaded from external flash memory or from a external host processor. Runtime firmware determines device capability. Runtime configuration parameters determine device network identity and personality. -

- The following sections identify and describe firmware related components and discuss some of the routine actions required to manage them. Consult the Atheros HomePlug AV Hardware Technical Reference Manual and HomePlug AV Firmware Technical Reference Manual for more information. -

diff --git a/docbook/ch04s02.html b/docbook/ch04s02.html deleted file mode 100644 index e81dae89..00000000 --- a/docbook/ch04s02.html +++ /dev/null @@ -1,55 +0,0 @@ -Firmware Components

Firmware Components

- Device initialization involves the following components. They are described here and then referenced throughout the toolkit documentation. You may want to read and re-read this page. -

- Bootloader -

- The Bootloader is permanent software burned into the chipset. The INT6000™ and INT6300™ both have a Bootloader program but they behave differently because the INT6000™ needs flash memory and the INT6300™ does not. Neither the INT6000Bootloader nor the INT6300Bootloader can write to flash memory. -

- On startup, the INT6000Bootloader attempts to load runtime firmware from flash memory into SDRAM. If flash memory is not available, or the runtime firmware stored there cannot be loaded, then the INT6000Bootloader cannot continue so the device cannot function. -

- On startup, the INT6300Bootloader attempts to load runtime firmware from flash memory into SDRAM. If flash memory is not available, or the runtime firmware stored there cannot be loaded, then Bootloader will request runtime firmware from the local host processor. -

- Softloader -

- An optional program stored in flash memory in place of runtime firmware. This program is used on the INT6000™ to support the Boot From Host operation, if needed. It is not used on the INT6300™ because the INT6300Bootloader now performs similar functions. The Softloader cannot write to flash memory. -

- On startup, the INT6000Bootloader loads the Softloader from flash memory into SDRAM, as it would do with runtime firmware. The Softloader then requests the actual runtime firmware from local host. -

- Memory Configuration Parameters -

- A small block of information that describes the type, size and characteristics of the SDRAM available for the benefit of the Bootloader. On the INT6000, SDRAM configuration must be stored in flash memory. On the INT6300, it may be stored in flash memory or on the local host. The INT6300Bootloader attempts to read configuration information from flash memory when it is present; otherwise, it requests that information from the local host using a VS_HST_ACTION message and so the host must store this information until it is requested. -

- There are two SDRAM configuration file formats. The first format is used by the Windows Device Manager and the - int6k2 - program and typically has a .config file extension. The second format is used by the - int6k - program and - int6kf - program and typically has a .cfg file extension. The latter format is more robust and should eventually replace the format. -

- The Windows Device Manager form consists of 64 hexadecimal ASCII characters. Files are at least 64 bytes but only the first 64 bytes are used. Files can be modified using a text editor. ASCII hex to binary conversion and checksum computation is needed on input. The - config2cfg - program can be used to convert this format to Open Powerline Toolkit format. -

- The Open Powerline Toolkit format consists of 32 binary bytes plus a 4 byte checksum. The file size is exactly 36 bytes. No conversion or checksum computation is needed on input. The - chkcfg - program can be used the validate this file format because it contains a checksum. -

- The INT6400™ chipset does not need a memory configuration parameter file because it has a different memory controller than earlier chipsets. SDRAM is now configured dynamically by an applets stored in the .nvm file. -

- Runtime Firmware (MAC Software) -

- The executable image that determines INT6000™ or INT6300™ capability and functionality. Runtime firmware refers to any executable image except the Bootloader which is considered to be boot firmware. Firmware files have a .nvm extension and can contain multiple firmware images. One of these images could be the parameter information block but Atheros currently distributes that as a separate file. The chknvm program can be used to detect obsolete or corrupt .nvm files. Runtime firmware can write to flash memory and must be running in order to re-program the chipset. -

- Parameter Information Block (PIB) -

- The configuration image that determines device network identity, functional capability and operational mode. The PIB structure often changes from one major firmware release to the next and often is not portable across major releases. Parameter information files have a .pib extension by convention and contain one parameter set. The chkpib program can be used to detect obsolete or corrupt PIB files. -

- Recent firmware releases support two PIB images in flash memory: the Factory PIB and the User PIB. The Factory PIB is the first PIB image written to flash memory. Once written, the Factory PIB cannot be changed without special software. The User PIB is created and over-written whenever the device needs to save new PIB parameters. Factory default values are restored by erasing the User PIB and rebooting the device. When a device reboots, it attempts to load the User PIB from flash memory. Failing that, it attempts to load the Factory PIB from flash memory. Failing that, it loads a Default PIB having minimum functionality. The loaded PIB becomes the Working PIB and determines runtime device identity and behavior. -

diff --git a/docbook/ch04s03.html b/docbook/ch04s03.html deleted file mode 100644 index 4fd0aeb2..00000000 --- a/docbook/ch04s03.html +++ /dev/null @@ -1,21 +0,0 @@ -Architecture Overview

- Architecture Overview -

- The following figure illustrates a hypothetical powerline network consisting of two devices. Each device has an INT6300™ with optional dedicated flash memory and an onboard processor with associated storage. The processor in each device is the local host for that device and the remote host for the other device. The processor storage is unspecified but it must be persistent. The two devices are connected via coax or powerline. The flash memory is optional in this design because it uses the INT6300™ chipset. -

Figure 4.1.  - Simple Network -

Simple Network

- The Boot Loader is permanent program that executes on startup. It detects the presence of flash memory and attempts to read SDRAM configuration from flash memory then load and runtime the firmware image and PIB from flash memory. On success, the Boot runtime firmware starts and the device assumes HomePlug AV compliant behavior. On failure, the Boot Loader requests SDRAM configuration, runtime firmware image and PIB from the local host. The local host must be prepared to respond to these requests. -

- On a system having no flash memory, the Boot Loader will request SDRAM configuration information from the local host. Once that is received, the Boot Loader will request a firmware image and PIB from the local host. The local host determines which firmware image and PIB to download, manages the download sequence and starts firmware execution. -

- Atheros software, such as the Windows Device Manager, Linux Flash Utility and Embedded API all support the Boot from Host configuration. -

- Once the firmware is running on the INT6300™ , a remote host can forward runtime firmware and PIB to the local host via the INT6300™ firmware. The remote host might reside on anotherINT6300™ device, as shown in the previous figure, or be located anywhere on the HomePlug® AV network. In either case, the operations described are the same. -

diff --git a/docbook/ch04s04.html b/docbook/ch04s04.html deleted file mode 100644 index d9a5d3ad..00000000 --- a/docbook/ch04s04.html +++ /dev/null @@ -1,29 +0,0 @@ -Firmware Boot Process

- Firmware Boot Process -

- The INT6300™ can boot HomePlug AV firmware from either dedicated flash memory or a local host processor. This means that dedicated flash memory in not necessary when an onboard processor having persistent storage is available. The absence of dedicated flash memory and availability of an onboard host processor is called a Boot from Host configuration. -

- The Boot from Host configuration is of interest to customers who are committed to using a host processor in their INT6300™ based product and want to use it to eliminate the additional cost of dedicated flash memory to store HomePlug AV firmware for INT6300™ devices. -

- The Boot from Host configuration supports three operations: Upgrade Device, Update Local Host and Boot from Host. Product designers must write host software to support all three operations as described later in this document. Atheros provides an Embedded Application Program Interface to assist product designers with this effort. Obtain a copy of the HomePlug AV Application Programming Interface User's Guide from Atheros Communications, Ocala FL USA for more information. -

- Readers should not confuse a Boot from Host configuration with the Boot from Host operation. The former is a hardware configuration having an INT6300™ with no dedicated flash memory available. The latter is the process of downloading configuration information, firmware and PIB from the local host to the device and starting firmware execution on startup. -

- This discussion assumes that the reader is familiar with the following: -

  1. - The distinction between a local and remote host -

  2. - The relationship between the powerline device H1, M1 and PHY interfaces. -

  3. - The structure of the following Atheros Management Message types: VS_HST_ACTION, VS_SET_SDRAM, VS_WR_MEM, VS_WR_MOD, VS_RS_DEV, VS_ST_MAC and VS_WRITE_AND_EXECUTE. Be aware that message types VS_SET_SDRAM, VS_WR_MEM, VS_WR_MOD and VS_ST_MAC are deprecated and will no longer be supported by the newest firmware. -

  4. - Hardware architecture covered in the QCA Powerline Hardware Technical Reference Manual and the management message formats covered in the QCA Powerline Firmware Technical Reference Manual. -

diff --git a/docbook/ch04s05.html b/docbook/ch04s05.html deleted file mode 100644 index 64c7ab2a..00000000 --- a/docbook/ch04s05.html +++ /dev/null @@ -1,17 +0,0 @@ -Boot from Host Configuration

- Boot from Host Configuration -

- The Boot from Host configuration requires a permanent connection between the powerline device and a local host having some type of persistent storage. In most cases, the powerline device and local host are co-located, possibly on the same board or same chip, and act together as an integral unit. Essentially, the local host provides persistent memory for the device. -

- The Boot from Host configuration lets the local host decide which runtime parameters and firmware to download on startup. This offers a considerable degree of product adaptability, allowing different parameter and firmware combinations to be downloaded based on external factors. -

- In a Boot from Host configuration, the processor must act as local host while the device is booting but it can also act as remote host when upgrading other devices. The former is a design requirement and latter is a design option. -

diff --git a/docbook/ch04s06.html b/docbook/ch04s06.html deleted file mode 100644 index 3f585133..00000000 --- a/docbook/ch04s06.html +++ /dev/null @@ -1,181 +0,0 @@ -Things to Remember

- Things to Remember -

- The Boot from Host configuration offers design flexibility but also increases the possibilities. Remember that the processes described here are based on simple rules that ultimately dictate why each process step is needed. Readers may find it helpful to review these rules. -

  1. - - The softloader and bootloader programs have limited vocabulary. - -

    - The INT6000™ softloader recognizes only the VS_SW_VER, VS_ST_MAC, VS_RS_DEV, VS_WR_MOD requests. It does not recognize VS_WR_MEM. -

    - The INT6300™ bootloader recognizes only the VS_SW_VER, VS_WR_MEM, VS_ST_MAC, VS_RS_DEV and VS_SET_SDRAM requests. It does not recognize VS_WR_MOD. -

    - The INT6400™ bootloader recognizes only the VS_SW_VER, VS_WR_MEM, VS_ST_MAC, VS_RS_DEV requests. It recognizes VS_SET_SDRAM and responds to it but ignores it. It does not recognize VS_WR_MOD. -

    - The AR7400™ bootloader recognizes only VS_SW_VER, VS_WR_MEM, VS_ST_MAC, VS_RS_DEV requests. It recognizes VS_SET_SDRAM and responds to it but ignores it. It does not recognize VS_WR_MOD. -

    - The AR7420™ bootloader recognizes only VS_SW_VER, VS_RS_DEV, VS_WRITE_AND_EXECUTE and VS_RAND_MAC_ADDRESS requests. Early versions recognize VS_WRITE_MEM and VS_ST_MAC requests but they must not be used. -

    Table 4.1.  - Softloader/Bootloader MMEs -

    - MME - - NAME - - INT6000 Softloader - - INT6300 Bootloader - - INT6400 Bootloader - - AR7400 Bootloader - - AR7420 Bootloader -
    - 0xA000 - - VS_SW_VER - - Yes - - Yes - - Yes - - Yes - - Yes -
    - 0xA008 - - VS_WR_MEM - - No - - Yes - - Yes - - Yes - - Deprecated -
    - 0xA00C - - VS_ST_MAC - - Yes - - Yes - - Yes - - Yes - - Deprecated -
    - 0xA01C - - VS_RS_DEV - - Yes - - Yes - - Yes - - Yes - - Yes -
    - 0xA020 - - VS_WR_MOD - - Yes - - No - - No - - No - - No -
    - 0xA05C - - VS_SDRAM - - No - - Yes - - Ignored - - Ignored - - No -
    - 0xA060 - - VS_HOST_ACTION - - No - - Yes - - Yes - - Yes - - Yes -
    - 0xA098 - - VS_WRITE_AND_EXECUTE - - No - - No - - No - - Yes - - Yes -
    - 0xA0D4 - - VS_RAND_MAC_ADDRESS - - No - - No - - No - - Yes - - Yes -

  2. - The Softloader, Bootloader and runtime firmware may treat the same MME differently because each is a different program. A notorious obvious example is the VS_SW_VER message type. This means that one may need to be aware of the device state when anticipating device behaviour or interpreting device response. -

  3. - The local host is surrogate flash memory. When dedicated flash memory is not available to a device, the device will request firmware and parameter storage services from the local host using VS_HST_ACTION messages. The local host must be programmed to detect and respond to these messages or the firmware will appear to hang. See program int6khost, int64host, amphost or plchost to demonstrate and experiment with this interaction. -

  4. - Only runtime firmware can write flash memory. Runtime firmware must be executing in order to write flash memory or upload to the local host. The Softloader and Bootloader cannot perform either operation. -

  5. - All PIB changes must be written in flash memory. There are several things that can cause PIB changes. When a PIB change is needed, the Working PIB is copied to a scratch area and modified there. The Scratch PIB must then be written to flash memory or sent to the local host for storage. The device then resets causing the stored PIB to replace the Working PIB. If a freshly downloaded PIB changes for any reason then the cycle will repeat, automatically. -

  6. - Runtime firmware updates the PIB after joining and before leaving an AVLN. This will cause a device reset in each case. If the device is using the local host for persistent storage, runtime firmware will send the associated VS_HST_ACTION messages to the host and the host will send the associated VS_RD_MOD and VS_RS_DEV messages as per Update Local Host. -

diff --git a/docbook/ch04s07.html b/docbook/ch04s07.html deleted file mode 100644 index 2f3dd051..00000000 --- a/docbook/ch04s07.html +++ /dev/null @@ -1,15 +0,0 @@ -Every Little Bit Hurts

- Every Little Bit Hurts -

- With the addition of Push Button Encryption, and other planned features, runtime firmware can now modify the PIB. Consequently, host applications must not assume that the PIB has not changed since it was last downloaded. Atheros strongly recommends that applications always perform a read-modify-write when making PIB modifications. Failure to do so can result in infinite reset loops caused when a device modifies the PIB that has just been downloaded. -

- As one example, recent PIBs contain a network membership bit to indicate that the device has successfully joined the network associated with the current NMK. If the firmware detects the network and discovers that the membership bit is clear then it will join the network and set the bit. The firmware will then attempt to preserve the change by sending a VS_HOST_ACTION message to the local host. If the host application does not upload and store the changed PIB (as the device requested) before resetting the device then the original PIB will be downloaded again, after reset, and the process will repeat. Of course, a similar situation will occur when the device leaves the network and again when it joins another network. -

diff --git a/docbook/ch04s08.html b/docbook/ch04s08.html deleted file mode 100644 index a5cdcf3b..00000000 --- a/docbook/ch04s08.html +++ /dev/null @@ -1,167 +0,0 @@ -Liar! Liar! Pants on Fire!

- Liar! Liar! Pants on Fire! -

- It is important to use the right Boot from Host sequence for each type of Atheros device. This means that you should query the device using a VS_SW_VER message beforehand to determine or confirm the device type. Although this should be a simple operation, there have been several changes that complicate matters. -

  1. - The INT6300Bootloader incorrectly identifies the chipset as an INT6000™ chipset in the MDEVICEID field of the VS_SW_VER message. -

  2. - The AR7400Bootloader incorrectly identifies the chipset as an INT6400™ chipset in the MDEVICEID field of the VS_SW_VER message. -

  3. - The Bootloader, for INT6400™ chipsets and later, returns two additional field, IDENT and STEP_NUMBER in the VS_SW_VER confirmation message. These fields, the hardware identifier and step number, are correct but are not returned in earlier chipsets. -

- The table below illustrates what is reported by various firmware, in the DEVICEID field of the VS_SW_VER message, on each type of hardware platform. -

Table 4.2.  - Legacy Device Identification -

- Chipset - - DEVICEID/IDENT (Bootloader) - - MVERSION (Bootloader) - - DEVICEID/IDENT (Firmware) - - MVERSION (Firmware) -
- INT6000 - - 0x01 / 0x00000042 - - BootLoader - - 0x01 / na - - INT6000-MAC-0-0-3213-1206-20071224-FINAL -
- INT6300 - - 0x02 / 0x00006300 - - BootLoader - - 0x02 / na - - INT6300-MAC-0-0-4203-00-4089-20091105-FINAL -
- INT6400 - - 0x03 / 0x00006400 - - BootLoader - - 0x03 / na - - INT6400-MAC-4-3-4304-01-4397-20100924-FINAL -
- INT7400 - - 0x03 / 0x00007400 - - BootLoader - - 0x04 / na - - INT7400-MAC-5-2-5213-01-1027-20110428-FINAL -
- INT7450 - - 0x03 / 0x0F001D1A - - BootLoader - - 0x20 / 0x00001D1A - - QCA7450-MAC-5-2-5213-01-1027-20110428-FINAL -
- INT7451 - - 0x03 / 0x00007400 - - BootLoader - - 0x20 / 0x0E001D1A - - QCA7451-MAC-5-2-5213-01-1027-20110428-FINAL -
- AR6405 - - 0x03 / 0x00006400 - - BootLoader - - 0x05 / na - - INT6405-MAC-4-3-4304-01-4397-20100924-FINAL -
- AR7420 - - 0x05 / 0x001CFCFC - - BootLoader - - 0x20 / 0x001CFCFC - - MAC-QCA7420-2.5.14.2259-23-20110621-FINAL -
- QCA6410 - - 0x05 / 0x001B58EC - - BootLoader - - 0x21 / 0x001B58EC - - MAC-QCA6410-2.5.14.2259-23-20110621-FINAL -
- QCA6411 - - 0x05 / 0x001B58BC - - BootLoader - - 0x21 / 0x001B58BC - - MAC-QCA6411-2.5.14.2259-23-20110621-FINAL -
- QCA7000 - - 0x05 / 0x001B589C - - BootLoader - - 0x22 / 0x001B589C - - MAC-QCA7000-1.4.13.3259-43-20110621-FINAL -

- To properly detect the correct chipset perform the following steps. -

  1. - Send a VS_SW_VER request message from the local host to the local device using the Atheros Local Management Address. -

  2. - Read the VS_SW_VER confirm message returned to the host by the device. -

  3. - Extract and save the MDEVICEID field (a small integer) and the MVERSION field (a string). -

  4. - If the MVERSION string is SoftLoader then the MDEVICEID field is valid. -

  5. - If the MVERSION string is not BootLoader then the MDEVICEID field is valid unless it is 0x07. In that case, set the stored DEVICEID to 0x04 to indicate an AR7400™. Do not inspect the IDENT field because it does not exist in the firmware version of the VS_SW_VER message on any platform. -

  6. - If the MDEVICEID field is 1, indicating an INT6000™, then the chipset is actually an INT6300™. Set the stored MDEVICEID to 2, indicating an INT6300™. Do not inspect the IDENT field because it does not exist in the BootLoader version of the VS_SW_VER message for either of these two chipsets. -

  7. - If the MDEVICEID field is 3, indicating an INT6400™, then the chipset could be either an INT6300™ or an AR7400™. Inspect the IDENT field. -

  8. - If the IDENT field is 0x6400, indicating an INT6400™, then the stored MDEVICEID is valid. -

  9. - If the IDENT field is 0x7400, indicating an AR7400™, then set the stored MDEVICEID to 4, indicating an AR7400™. -

- Having performed the previous conversions, the expression (1 << (DEVICEID - 1)) now indicates the proper IGNORE bit found in each NVM file header. Unfortunately, this only works for DeviceID values from 0x01 through 0x06. After that, the device identification scheme changes. -

diff --git a/docbook/ch04s09.html b/docbook/ch04s09.html deleted file mode 100644 index ad691936..00000000 --- a/docbook/ch04s09.html +++ /dev/null @@ -1,107 +0,0 @@ -But wait! There's more ...

- But wait! There's more ... -

- Starting with the AR7420™, the DeviceID field in VS_SW_VER is now the DEVICE_CLASS field and identifies the Device Family, not the device type. Instead, the IDENT field in VS_SW_VER identifies the device type and the IDENT field is located at a variable offset within the message frame. Previously, the IDENT was located a fixed offset within the frame. -

Table 4.3.  - Device Identification -

- Chipset - - Softloader - - Bootloader - - Firmware - - Identity -
- INT6000 - - 0x01 - -   - - 0x01 - - 0x00000042 -
- INT6300 - -   - - 0x01 - - 0x02 - - 0x00006300 -
- INT6400 - -   - - 0x03 - - 0x03 - - 0x00006400 -
- AR7400 - -   - - 0x03 - - 0x04 - - 0x00007400 -
- AR6405 - -   - - 0x03 - - 0x05 - - 0x00006400 -
- AR7420 - -   - - 0x05 - - 0x20 - - 0x001CFCFC -
- QCA6410 - -   - - 0x05 - - 0x21 - - 0x001B58EC -
- QCA7000 - -   - - 0x05 - - 0x22 - - 0x001B589C -

diff --git a/docbook/ch04s10.html b/docbook/ch04s10.html deleted file mode 100644 index 6110f9b5..00000000 --- a/docbook/ch04s10.html +++ /dev/null @@ -1,46 +0,0 @@ -Upgrade Device (INT6000/INT6300/INT6400)

- Upgrade Device (INT6000/INT6300/INT6400) -

- The Upgrade Device operation downloads firmware and/or PIB from a remote host to an Atheros device for permanent storage and immediate execution. The device determines where and how it will store the information based on the availability of onboard flash memory. If the device has dedicated flash memory then it will store the firmware and PIB there and reset itself; otherwise, it will hand the firmware and PIB to the local host for storage and the local host will reset the device. The reset ensures that new firmware and PIB take immediate effect once they are saved. This operation requires custom software on the remote host and Atheros firmware on the device. -

Figure 4.2.  - Upgrade Device (INT6000/INT6300/INT6400) -

-
-        REMOTE-HOST                        INT6300/INT6400
-        [01] |-------- VS_WR_MOD.REQ ------------>| [01]
-        [01] |<------- VS_WR_MOD.CNF -------------| [01]
-        [01] |----------------------------------->| [01]
-        [01] |<-----------------------------------| [01]
-             |                                    |
-        [02] |-------- VS_WR_MOD.REQ ------------>| [02]
-        [02] |<------- VS_WR_MOD.CNF -------------| [02]
-        [02] |----------------------------------->| [02]
-        [02] |<-----------------------------------| [02]
-             |                                    |
-        [03] |-------- VS_MOD_NVM.REQ ----------->| [04]
-        [05] |<------- VS_MOD_NVM.CNF ------------| [04]
-             |                                    | [06]
-
-

  1. - Optionally, the remote host writes firmware to the device by sending a series of VS_WR_MOD.REQ messages and waiting for a VS_WR_MOD.CNF message after each one. The message MODULEID field is set to 0x01 for this operation. -

  2. - Optionally, the remote host writes the PIB to the device by sending VS_WR_MOD.REQ messages and waiting for a VS_WR_MOD.CNF message after each one. The MODULEID is set to 0x02 for this operation. -

  3. - The remote host commits the firmware and/or PIB to persistent storage by sending a VS_MOD_NVM.REQ message and waiting for a VS_MOD_NVM.CNF message. -

  4. - The device received the VS_MOD_NVM.REQ and sends a VS_MOD_NVM.CNF message to the remote host. -

  5. - The remote host receives the VS_MOD_NVM.CNF and proceeds with other activity. The remote host does not know or care that the device may not have dedicated flash memory available. -

  6. - The device determines where and how to store the information. If dedicated flash memory is available, the device writes the downloaded firmware and PIB to flash memory and performs a software reset that results in a normal Boot from Flash operation. If no dedicated flash memory is available, the device initiates an Update Local Host operation. -

- The device does not notify the remote host when the upgrade operation completes. It is therefore incumbent on the remote host to determine ultimate success or failure by polling the device, possiby using a VS_SW_VER.REQ message, until a response is received. The complete upgrade operation can take from 20 seconds to 45 seconds depending on device configuration. -

diff --git a/docbook/ch04s11.html b/docbook/ch04s11.html deleted file mode 100644 index 26eb04d6..00000000 --- a/docbook/ch04s11.html +++ /dev/null @@ -1,52 +0,0 @@ -Update Local Host (INT6000/INT6300/INT6400)

- Update Local Host (INT6000/INT6300/INT6400) -

- The Update Local Host operation transfers a firmware image and/or PIB image from the device to the local host for permanent storage. After the firmware and PIB are stored, the local host will reset the device and the device will retrieve parameters and firmware using the Boot from Host operation described in the next section. -

- The firmware may initiate this operation after a remote host has downloaded new firmware or PIB and issued a VS_MOD_NVM.REQ to the device, the device has been asked to restore factory default settings or the firmware has dynamically altered the runtime PIB in some way. Consequently, the device will be reset by the host in each case. -

- The device initiates this operation to complete an Upgrade Device operation when the device has no dedicated flash memory onboard. This operation requires running Atheros firmware on the device and custom software on the local host. -

Figure 4.3.  - Update Local Host (INT6000/INT6300/INT6400) -

-
-      INT6300/INT6400                           LOCAL-HOST
-        [01] |-------- VS_HOST_ACTION.IND ------->| [01]
-        [03] |<------- VS_HOST_ACTION.RSP --------| [02]
-             |                                    |
-        [04] |<------- VS_RD_MOD.REQ -------------| [04]
-        [04] |-------- VS_RD_MOD.CNF ------------>| [04]
-        [04] |<-----------------------------------| [04]
-        [04] |----------------------------------->| [04]
-             |                                    |
-        [05] |<------- VS_RD_MOD.REQ -------------| [05]
-        [05] |-------- VS_RD_MOD.CNF ------------>| [05]
-        [05] |<-----------------------------------| [05]
-        [05] |----------------------------------->| [05]
-             |                                    |
-        [06] |<------- VS_RS_DEV.REQ -------------| [06]
-        [07] |-------- VS_RS_DEV.CNF ------------>| [07]
-
-

  1. - The runtime firmware initiates this operation by broadcasting VS_HOST_ACTION.IND messages every 500 milliseconds. The HOST_ACTION_REQ field of the message can be either 0x01, 0x02 or 0x03 to indicate that a firmware image, a parameter block image or both are ready for upload by the local host. -

  2. - The local host sends a VS_HOST_ACTION.RSP message to the device to indicate the ability and willingness to upload the information. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. -

  3. - Assuming an affirmative response, the device stops broadcasting and will wait indefinitely for local host action. -

  4. - Optionally, the local host reads the firmware image from the device by sending a series of VS_RD_MOD.REQ messages to the device and waiting for a VS_RD_MOD.CNF message after each one. The message MODULEID field is set to 0x01 for this operation. -

  5. - Optionally, the local host reads the PIB from the device by sending a series of VS_RD_MOD.REQ messages to the device and waiting for a VS_RD_MOD.CNF message after each one. The message MODULEID field is set to 0x02 for this operation. -

  6. - The local host sends a VS_RS_DEV.REQ message to the device to initiate a firmware reboot. -

  7. - The device sends a VS_RS_DEV.CNF to the host and performs a software reset. This forces a Boot from Host. -

diff --git a/docbook/ch04s12.html b/docbook/ch04s12.html deleted file mode 100644 index a034e1ec..00000000 --- a/docbook/ch04s12.html +++ /dev/null @@ -1,60 +0,0 @@ -Boot from Host (INT6000)

- Boot from Host (INT6000) -

- The Boot from Host operation downloads a firmware image and PIB image from the local host and starts firmware execution. The process is initiated by the INT6000Bootloader following a device reset. The Bootloader passes control to the INT6000Softloader to negotiate with the local host. The process therefore requires Softloader aware software running on the local host in order to complete. -

- The device does not have a unique hardware address until the firmware starts and assigns one. Until that time, the Softloader accepts messages addressed to 00:B0:52:00:00:01. In addition, the Softloader does not know the hardware address of the local host and so it addresses VS_HST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not forwarded over powerline. -

Figure 4.4.  - Boot from Host (INT6000) -

-
-          INT6000                             LOCAL-HOST
-        [01] |                                    |
-        [02] |-------- VS_HST_ACTION.IND -------->| [03]
-        [05] |<------- VS_HST_ACTION.RSP ---------| [04]
-             |                                    |
-        [07] |<------- VS_WR_MOD.REQ -------------| [07]
-        [07] |-------- VS_WR_MOD.CNF ------------>| [07]
-        [07] |<-----------------------------------| [07]
-        [07] |----------------------------------->| [07]
-             |                                    |
-        [08] |<------- VS_WR_MOD.REQ -------------| [08]
-        [08] |-------- VS_WR_MOD.CNF ------------>| [08]
-        [08] |<-----------------------------------| [08]
-        [08] |----------------------------------->| [08]
-             |                                    |
-        [10] |<------- VS_ST_MAC.REQ -------------| [09]
-        [11] |-------- VS_ST_MAC.CNF ------------>| [12]
-
- 

  1. - The INT6000Bootloader automatically starts after device reset. It reads the Softloader from NVRAM, writes it into SDRAM and starts execution. The Softloader then manages the Boot from Host process. -

  2. - The Softloader broadcasts a VS_HST_ACTION.IND message every 500 milliseconds to request the download of runtime firmware and PIB. The HOST_ACTION_REQ field of the message is 0x00 in this case. The message source address if 00:B0:52:00:00:01 as explained above. -

  3. - The local host receives the VS_HST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine action requested. It may then elect to service the request or ignore it. On a single-host system, the host must service the request or the device will not start. On a multi-host system, one of the hosts must elect to service the request or the device will not start. -

  4. - The local host sends a VS_HST_ACTION.RSP message to the device to indicate the ability and willingness to service the request. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. -

  5. - The Softloader receives the VS_HST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative status, the Softloader stops sending VS_HST_ACTION messages and waits indefinitely for the firmware image and PIB. -

  6. - The local host determines which firmware image and PIB to download. In some cases there may be no choice. In other cases, there may be a choice between default and custom software or between current and upgraded software. This is a principle design issue to consider. -

  7. - The local host downloads a firmware image to the device by sending VS_WR_MOD.REQ messages to the device and waiting for a VS_WR_MEM.CNF messages from the device after each request. Each message contains an image segment, the memory offset, the segment length and the checksum used to monitor and manage download progress. If a single transaction fails, the local host should detect it and repeat it. -

  8. - The local host downloads a PIB to the device by sending VS_WR_MOD.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each request. Each message contains an image segement, the memory offset, the segment length and the checksum used to monitor and manage download progress. If a single transaction fails, the local host should detect it and repeat it. -

  9. - The local host starts execution of the downloaded firmware by sending a VS_ST_MAC.REQ message to the device. The message contains the start address for the firmware. -

  10. - The Softloader receives the VS_ST_MAC.REQ from the local host, validates the content. -

  11. The Softloader sends a VS_ST_MAC.CNF message to the local host to indicate an ability or willingness to start execution. Assuming an ability and willingness, the Softloader immediately starts firmware execution which relinquishes device control to the firmware. -

  12. - The local host receives the VS_ST_MAC.CNF message from the device, inspects the MSTATUS field and acts accordingly. Assuming an affirmative status, this process terminates. -

diff --git a/docbook/ch04s13.html b/docbook/ch04s13.html deleted file mode 100644 index 26e27552..00000000 --- a/docbook/ch04s13.html +++ /dev/null @@ -1,71 +0,0 @@ -Boot from Host (INT6300)

- Boot from Host (INT6300) -

- The boot-from-host operation downloads SDRAM configuration information, runtime parameters and runtime firmware from a local host and starts firmware execution. This method is initiated by the device bootloader after reset reset if the device has no flash memory, blank flash memory or corrupted flash memory. The method requires the bootloader aware software running on the local host to detect and service VS_HOST_ACTION messages from the device. -

- The INT6300™ boot-from-host method is similar to the INT6000™ method but it has an extra stage to download SDRAM configuration parameters and it uses VS_WR_MEM messages to download runtime parameters and firmware instead of VS_WR_MOD messages. The VS_WR_MEM messages write directly to SDRAM and an VS_ST_MAC message is needed to start firmware execution. Once the firmware is running, another method is used to write runtime parameters and firmware to flash memory. -

- The INT6300™ does not have a unique hardware address until runtime firmware starts and assigns one from the runtime parameter block. Until that time, the bootloader will accept messages addressed to 00:B0:52:00:00:01. In addition, the bootloader does not know the hardware address of the local host and so it addresses VS_HOST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline. -

Figure 4.5.  - boot-from-host (INT6300) -

-
-         INT6300                             LOCAL-HOST
-        [01] |                                    |
-        [02] |-------- VS_HOST_ACTION.IND ------->| [03]
-        [05] |<------- VS_HOST_ACTION.RSP --------| [04]
-             |                                    |
-        [07] |<------- VS_SET_SDRAM.REQ ----------| [06]
-        [07] |-------- VS_SET_SDRAM.CNF --------->| [08]
-             |                                    | [09]
-        [10] |<------- VS_WR_MEM.REQ -------------| [10]
-        [10] |-------- VS_WR_MEM.CNF ------------>| [10]
-        [10] |<-----------------------------------| [10]
-        [10] |----------------------------------->| [10]
-             |                                    |
-        [11] |<------- VS_WR_MEM.REQ -------------| [11]
-        [11] |-------- VS_WR_MEM.CNF ------------>| [11]
-        [11] |<-----------------------------------| [11]
-        [11] |----------------------------------->| [11]
-             |                                    |
-        [13] |<------- VS_ST_MAC.REQ -------------| [12]
-        [14] |-------- VS_ST_MAC.CNF ------------>| [15]
-
- 

  1. - The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into SDRAM and start execution. If it succeeds then normal operation begins and no further action is required. If it fails, for any reason, then the bootloader starts the boot-from-host process. -

  2. - The bootloader broadcasts VS_HOST_ACTION.IND with HOST_ACTION_REQ set to 0x04 to indicate that configuration is required. The destination address is FF:FF:FF:FF:FF:FF and the source address is 00:B0:52:00:00:01 as explained above. This message is sent every 10 seconds which differs from that of other chips. -

  3. - The host receives the VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the action requested. On a single-host system, the local host must elect to service the request or the device will not start. On a multi-host system, one of the hosts must elect to service the request of the device will not start. -

  4. - The host sends a VS_HOST_ACTION.RSP message to the device to indicate an ability and willingness to service the request. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. -

  5. - The bootloader receives the VS_HOST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative response, the bootloader stops broadcasting VS_HOST_ACTION.IND and waits indefinitely for SDRAM configuration information from the host. -

  6. - The host sends a VS_SET_SDRAM.REQ message to the device containing an SDRAM configuration block and the block checksum. -

  7. - The bootloader receives the VS_SET_SDRAM.REQ, validates the content, initializes SDRAM parameters and sends a VS_SET_SDRAM.CNF message to the servicing host to indicate either success or failure. -

  8. - The local host receives the VS_SET_SDRAM.CNF and inspects the MSTATUS field for success or failure. Assuming success, the local host waits indefinitely for further requests from the device. -

  9. - The local host determines which parameter block and firmware image to download. In some cases there may be no choice. In other cases, there may be a choice between default and custom software or between current and upgraded software. This is a principle design issue to consider. -

  10. - The local host downloads the firmware image to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF messages from the device after each request. Each message contains an image segment, the memory offset, the segment length and the checksum used to monitor and manage download progress. It a single transaction fails, the local host should detect it and repeat it. -

  11. - The local host downloads a parameter block to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each request. Each message contains an image segment, the memory offset, the segment length and the checksum used to monitor and manage download progress. If a single transaction fails, the local host should detect it and repeat it. -

  12. - The local host starts firmware execution by sending a VS_ST_MAC.REQ message to the device. The message contains the firmware start address. -

  13. - The bootloader receives the VS_ST_MAC.REQ from the local host, validates the content. -

  14. The device sends a VS_ST_MAC.CNF message to indicate an ability or willingness to start firmware execution. The device immediately starts firmware execution which relinquishes device control to the firmware. It can take 5 to 10 seconds for the firmware to start. -

  15. - The host receives the VS_ST_MAC.CNF message from the device, inspects the MSTATUS field and acts accordingly. An afffirmative indication means that the firmware will start executing on the device in 5 to 10 seconds. Once the firmware starts, future messages will contain the unique hardware address for the device. -

diff --git a/docbook/ch04s14.html b/docbook/ch04s14.html deleted file mode 100644 index 8cdbdc2d..00000000 --- a/docbook/ch04s14.html +++ /dev/null @@ -1,101 +0,0 @@ -Boot from Host (INT6400)

- Boot from Host (INT6400) -

- The INT6400™ boot-from-host operation downloads and executes a memory configuration applet then downloads runtime parameters and firmware from a local host and starts firmware execution. This method is initiated by the INT6400™ bootloader after reset on a device having no flash memory, blank flash memory or corrupted flash memory. The method requires bootloader aware software running on the local host in order to complete. -

- The INT6400™ boot-from-host method is similar to the INT6300™ boot-from-host method but it downloads and executes an SDRAM configuration applet instead of downloading SDRAM parameters. The applet is downloaded and executed using the same mechanism as runtime firmware. The applet executes and returns to the bootloader when done. The bootloader then continues to drive the boot process using VS_HOST_ACTION messages. -

- The INT6400™ boot-from-host method will work for AR7400™ and QCA7420™ chipsets but will not work on successive chipsets. Customers should adopt or implement the AR7400™ boot-from-host method, instead of this one, to avoid building obsolete products. -

- The INT6400™ does not have a unique hardware address until the firmware starts and assigns one from the parameter information block. Until that time, the bootloader will only acknowledge messages addressed to 00:B0:52:00:00:01. In addition, the bootloader does not know the hardware address of the local host and so it addresses VS_HOST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline. -

Figure 4.6.  - Boot from Host (INT6400) -

-
-          INT6400                            LOCAL-HOST
-        [01] |                                    |
-        [02] |-------- VS_HOST_ACTION.IND ------->| [03]
-        [05] |<------- VS_HOST_ACTION.RSP --------| [04]
-             |                                    |
-        [06] |<------- VS_WR_MEM.REQ -------------| [06]
-        [06] |-------- VS_WR_MEM.CNF ------------>| [06]
-        [06] |<-----------------------------------| [06]
-        [06] |----------------------------------->| [06]
-             |                                    |
-        [08] |<------- VS_ST_MAC.REQ -------------| [07]
-        [09] |-------- VS_ST_MAC.CNF ------------>| [10]
-        [11] |                                    |
-        [12] |-------- VS_HOST_ACTION.IND ------->| [13]
-        [15] |<------- VS_HOST_ACTION.RSP --------| [14]
-             |                                    |
-             |                                    | [16]
-             |                                    |
-        [17] |<------- VS_WR_MEM.REQ -------------| [17]
-        [17] |-------- VS_WR_MEM.CNF ------------>| [17]
-        [17] |<-----------------------------------| [17]
-        [17] |----------------------------------->| [17]
-             |                                    |
-        [18] |<------- VS_WR_MEM.REQ -------------| [18]
-        [18] |-------- VS_WR_MEM.CNF ------------>| [18]
-        [18] |<-----------------------------------| [18]
-        [18] |----------------------------------->| [18]
-             |                                    |
-        [20] |<------- VS_ST_MAC.REQ -------------| [19]
-        [21] |-------- VS_ST_MAC.CNF ------------>| [22]
-
- 

  1. - The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into SDRAM and start execution. If it succeeds then normal operation begins and no futher action is required. If it fails, for any reason, then the bootloader initiates the boot-from-host sequence. -

  2. - The bootloader broadcasts VS_HOST_ACTION.IND with HOST_ACTION_REQ set to 0x04 to request configuration. The destination address is FF:FF:FF:FF:FF:FF and source address is 00:B0:52:00:00:01 as explained above. This message is sent every 500 milliseconds which differs from that of other chips. -

  3. - The local host receives the VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the appropriate action. On a single-host system, the lone host must service the request or the device will not start. On a multi-host system, one host must elect to service the request of the device will not start. -

  4. - The local host sends VS_HOST_ACTION.RSP to silence the bootloader or indicate the ability and willingness to service the request. The destination address must be 00:B0:52:00:00:01 and the source address is that of the host interface. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. -

  5. - The bootloader receives the VS_HOST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative response, the bootloader stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to download a configuation applet and start execution. -

  6. - The host downloads the memory control applet to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each one. Each message contains an image segment and the segment memory offset, length and checksum. These values are used to monitor and manage download progress. If a transaction fails, the host can detect it and should repeat it. -

  7. - The host starts execution of the memory control applet by sending a VS_ST_MAC.REQ message to the device. The message contains the applet load address, length, checksum and start address. These values are often obtained from an NVM file image header. - -

  8. - The bootloader receives the VS_ST_MAC.REQ from the host and validates the contents. -

  9. - The bootloader sends a VS_ST_MAC.CNF message to the host indicating the ability and willingness to start applet execution. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. -

  10. - The host receives the VS_ST_MAC.CNF message from the device and evaluates the MSTATUS field. On affirmative, the host waits for further requests from the device. On negative, the host may attempt another start or another download followed by a start or attempt to alert a human. -

  11. - The bootloader starts applet execution. The applet configures memory, runs to completion and returns to the Bootloader. -

  12. - The bootloader broadcasts a VS_HOST_ACTION.IND message every 500 milliseconds to request runtime firmware and parameter download. The message destination address is FF:FF:FF:FF:FF:FF and source address is 00:B0:52:00:00:01 as explained above. The HOST_ACTION_REQ field is set to 0x00. -

  13. - The host receives the VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the requested action. On a single-host system, the lone host must service the request or the device will not start. On a multi-host system, one host must elect to service the request of the device will not start. -

  14. - The host sends a VS_HOST_ACTION.RSP message to the device to indicate the ability and willingness to service the request. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. -

  15. - The bootloader receives the VS_HOST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative response, the bootloader stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the host to download the runtime firmware and parameters and start execution. -

  16. - The host determines which firmware and parameter image to download. In some cases there may be no choice. In other cases, there may be a choice between default and custom images or between current and upgraded images. This is a principle design issue to consider. -

  17. - The host downloads the firmware image to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each one. Each message contains an image segment and the segment memory offset, length and checksum. These values are used to monitor and manage download progress. If a transaction fails, the local host can detect it and should repeat it. -

  18. - The host downloads the parameter block to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each one. Each message contains an image segment and the segment memory offset, length and checksum. These values are used to monitor and manage download progress. If a transaction fails, the local host can detect it and should repeat it. -

  19. - The host starts runtime firmware execution by sending a VS_ST_MAC.REQ message to the device. The message contains the firmware load address, length, checksum and start address. These values are often obtained from an NVM file image header. -

  20. - The bootloader receives the VS_ST_MAC.REQ from the host and validates the content. -

  21. - The bootloader sends a VS_ST_MAC.CNF message to indicate the ability or willingness to start firmware execution. -

  22. - The host receives the VS_ST_MAC.CNF message from the device, inspects the MSTATUS field and acts accordingly. -

  23. - The bootloader starts runtime firmware execution. The firmware reads and validates the parameter block then assumes full control of the device. It can take several seconds for firmware start to be evident. Once the firmware starts, any future VS_HOST_ACTION messages will contain the unique hardware address for the device. -

diff --git a/docbook/ch04s15.html b/docbook/ch04s15.html deleted file mode 100644 index 2b21e004..00000000 --- a/docbook/ch04s15.html +++ /dev/null @@ -1,96 +0,0 @@ -Boot from Host (AR7400)

- Boot from Host (AR7400) -

- The AR7400™ boot-from-host method downloads and executes a device configuration applet then downloads runtime parameters and firmware from a local host and starts firmware execution. This method is initiated by the Bootloader after reset on a device having no flash memory, blank flash memory or corrupted flash memory. The method requires Bootloader aware software running on the local host in order to complete. -

- The AR7400™ boot-from-host method is similar to the INT6400™ boot-from-host method but it uses the VS_WRITE_AND_EXECUTE message instead of the VS_WR_MEM message write into SDRAM and start firmware execution. This eliminates the need for the VS_ST_MAC message. The VS_WR_MEM and VS_ST_MAC message types will no longer be recognized by bootloaders after the QCA7420™ chipset. -

- The AR7400™ boot-from-host method works on AR6400™ and will continue to work on QCA7420™ and planned successors. Customers should implement this boot-from-host method now to avoid building obsolete products. -

- The AR7400™ does not have a unique hardware address until the firmware starts and assigns one read from the PIB. Until that time, the Bootloader will only acknowledge messages addressed to 00:B0:52:00:00:01. In addition, the Bootloader does not know the hardware address of the local host and so it addresses all VS_HOST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline. -

Figure 4.7.  - Boot from Host (AR7400) -

-
-          AR7400                             LOCAL-HOST
-        [01] |                                    |
-        [02] |-------- VS_HOST_ACTION.IND ------->| [03]
-        [05] |<------- VS_HOST_ACTION.RSP --------| [04]
-             |                                    | [06]
-             |<---- VS_WRITE_AND_EXECUTE.REQ -----| [07]
-        [08] |----- VS_WRITE_AND_EXECUTE.CNF ---->|      
-             |<-----------------------------------| [09]
-        [10] |----------------------------------->| [11]
-        [12] |                                    | 
-        [13] |-------- VS_HOST_ACTION.IND ------->| [14]
-        [16] |<------- VS_HOST_ACTION.RSP --------| [15]
-             |                                    | [16]
-             |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [17]
-        [18] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->|     
-             |<-----------------------------------| [19]
-        [20] |----------------------------------->| 
-             |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [21]
-        [22] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->|     
-             |<-----------------------------------| [23]
-        [24] |----------------------------------->| 
-        [25] |                                    |
-
- 

  1. - The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into SDRAM and start execution. If it succeeds then normal operation begins and no further action is required. If it fails, for any reason, then the bootloader initiates the boot-from-host sequence. -

  2. - The bootloader broadcasts VS_HOST_ACTION.IND with HOST_ACTION_REQ set to 0x04 to indicate that it is waiting to be configured. The bootloader continues to broadcast this message message every 750 milliseconds which differs from that of other chips. -

  3. - The local host receives the VS_HOST_ACTION.IND and inspects HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. -

  4. - The local host sends a VS_HOST_ACTION.RSP message with MSTATUS set to 0 to indicate the start of sequence. -

  5. - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. -

  6. - The local host retrieves the firmware chain and extracts the configuration applet image from the chain. The firmware chain may be stored on disk or in memory depending on how the local host is programmed. -

  7. - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2 and ALLOWED_MEM_TYPES to 1 to download the applet in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download the applet in relative address mode. The TOTAL_LENGTH will be the applet image header IMAGELENGTH but CURR_PART_LENGTH cannot exceed 1400 bytes. -

  8. - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  9. - The local host continues to increment CURR_PART_OFFSET and download the configuration applet in 1400 byte blocks until the last block is reached. The local host then sets START_ADDR to the applet image header ENTRYPOINT, the CHECKSUM to the applet image header IMAGECHECKSUM and the execute bit in FLAGS to 1 in the last message frame. -

  10. - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the configuration applet checksum then acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  11. - The local host exists the boot from host sequence and returns to listening mode. -

  12. - The bootloader executes the configuration applet. The device hardware address is 00:B0:52:00:00:01 in this state. -

  13. - The bootloader broadcasts a VS_HOST_ACTION.IND message with HOST_ACTION_REQ set to 0 to indicate that it is waiting for runtime parameters and firmware. -

  14. - The local host receives a VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. -

  15. - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. -

  16. - The local host locates the parameter chain and firmware chain. The chains may be stored on disk or in memory depending on how the local host is programmed. -

  17. - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2 and ALLOWED_MEM_TYPES set to 1 to download parameters in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download parameters in relative address mode. The TOTAL_LENGTH will be the entire parameter file length but the CURR_PART_LENGTH cannot exceed 1400 bytes. -

  18. - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  19. - The local host continues to CURR_PART_OFFSET and download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets the START_ADDR field to the parameter image header ENTRYPOINT, the CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1 in the last message frame. -

  20. - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the parameter chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  21. - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2 and ALLOWED_MEM_TYPES to 1 to download firmware in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download firmware in relative address mode. The TOTAL_LENGTH will be the firmware image header IMAGELENGTH but the CURR_PART_LENGTH cannot exceed 1400 bytes. -

  22. - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. -

  23. - The local host continues to increment CURR_PART_OFFSET and download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets START_ADDR to the parameter image header ENTRYPOINT, the CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1 in the last message frame. -

  24. - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the firmware chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. -

  25. - The bootloader executes the runtime firmware and the device begins operation. The device hardware address will become that programmed into the parameter inforamtion block. -

diff --git a/docbook/ch04s16.html b/docbook/ch04s16.html deleted file mode 100644 index 5fcd32ee..00000000 --- a/docbook/ch04s16.html +++ /dev/null @@ -1,92 +0,0 @@ -Boot from Host (AR7420)

- Boot from Host (AR7420) -

- The VS_WRITE_AND_EXECUTE message is now the only way to write runtime parameters and firmware into volatile memory. The legacy VS_RD_MEM, VS_WR_MEM and VS_ST_MAC are deprecated and will no longer be supported by the bootloader. This means that some customers must re-write their applications to boot newer powerline devices. -

Figure 4.8.  - Boot from Host (AR6410/AR7420) -

-
-          AR7420                             LOCAL-HOST
-        [01] |                                    |
-        [02] |-------- VS_HOST_ACTION.IND ------->| [03]
-        [05] |<------- VS_HOST_ACTION.RSP --------| [04]
-             |                                    | [06]
-             |<---- VS_WRITE_AND_EXECUTE.REQ -----| [07]
-        [08] |----- VS_WRITE_AND_EXECUTE.CNF ---->|      
-             |<-----------------------------------| [09]
-        [10] |----------------------------------->| [11]
-        [12] |                                    | 
-        [13] |-------- VS_HOST_ACTION.IND ------->| [14]
-        [16] |<------- VS_HOST_ACTION.RSP --------| [15]
-             |                                    | [16]
-             |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [17]
-        [18] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->|     
-             |<-----------------------------------| [19]
-        [20] |----------------------------------->| 
-             |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [21]
-        [22] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->|     
-             |<-----------------------------------| [23]
-        [24] |----------------------------------->| 
-        [25] |                                    |
-
- 

  1. - The bootloader enters boot-from-host mode based on the hardware strapping or failure to load runtime firmware from flash memory. The device hardware address is 00:B0:52:00:00:01 in this state. -

  2. - The bootloader broadcasts a VS_HOST_ACTION.IND message with HOST_ACTION_REQ set to 4 to indicate that it is waiting to be configured. The bootloader will continue to broadcast the VS_HOST_ACTION.IND message every 750ms until it receives a VS_HOST_ACTION.RSP message from the local host. The BootROM does not know the local host hardware address at this stage so indications are broadcast, not addressed. -

  3. - The local host receives a VS_HOST_ACTION.IND message and inspects HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. The first indcation requests device configuration. -

  4. - The local host sends a VS_HOST_ACTION.RSP message with MSTATUS set to 0 to indicate a willingness and ability to service the request. -

  5. - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. -

  6. - The local host retrieves the firmware chain and extracts the configuration applet image from the chain. The firmware chain may be stored on disk or in memory depending on how the local host is programmed. -

  7. - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2, ALLOWED_MEM_TYPES to 1, CURR_PART_OFFSET to the applet image header IMAGEADDRESS and CURR_PART_LENGTH to the applet image header IMAGELENGTH to download the applet in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download the applet in relative address mode. -

  8. - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  9. - The local host continues to download the configuration applet in 1400 byte blocks until the last block is reached. The local host sets START_ADDR to the applet image header ENTRYPOINT, CHECKSUM to the applet image header IMAGECHECKSUM and the execute bit in FLAGS to 1. -

  10. - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the configuration applet checksum then acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  11. - The local host exists the boot from host sequence and returns to listening mode. -

  12. - The bootloader executes the configuration applet. The device hardware address is 00:B0:52:00:00:01 in this state. -

  13. - The bootloader broadcasts a VS_HOST_ACTION.IND message with HOST_ACTION_REQ set to 0 to indicate that it is waiting for runtime parameters and firmware. -

  14. - The local host receives a VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. -

  15. - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. -

  16. - The local host locates the parameter chain and firmware chain. The chains may be stored on disk or in memory depending on how the local host is programmed. -

  17. - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2, ALLOWED_MEM_TYPES set to 1, CURR_PART_OFFSET to the parameter image header IMAGEADDRESS and CURR_PART_LENGTH to the entire parameter image chain length to download parameters in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download parameters in relative address mode. -

  18. - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  19. - The local host continues to download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets the START_ADDR field to the parameter image header ENTRYPOINT, CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1. -

  20. - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the parameter chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. -

  21. - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2, ALLOWED_MEM_TYPES to 1, CURR_PART_OFFSET to the firmware image header IMAGEADDRESS and CURR_PART_LENGTH to the firmware image header IMAGELENGTH to download firmware in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download firmware in relative address mode. -

  22. - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. -

  23. - The local host continues to download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets START_ADDR to the parameter image header ENTRYPOINT, CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1. -

  24. - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the firmware chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. -

  25. - The bootloader executes the runtime firmware and the device begins operation. The device hardware address will become that programmed into the parameter inforamtion block. -

- At this point, runtime firmware is executing in volatile memory with runtime parameters. If the power is reset at this point then all would be lost. If the device has dedicated flash memory attached then we may want to write runtime parameters and firmware to flash memory so that the device can boot from flash in case of a power failure or reset. -

diff --git a/docbook/ch04s17.html b/docbook/ch04s17.html deleted file mode 100644 index 1eb84357..00000000 --- a/docbook/ch04s17.html +++ /dev/null @@ -1,114 +0,0 @@ -Flash Memory (AR6410/AR7420)

- Flash Memory (AR6410/AR7420) -

- The VS_MODULE_OPERATION message is now the only way of write flash memory. The legacy message types VS_RD_MOD, VS_WR_MOD, VS_MOD_NVM and VS_PTS_NVM are deprecated and will no longer be supported by runtime firmware. This means that some customers must re-write their applications to flash newer powerline devices. -

Tip

- The VS_MODULE_OPERATION message type has many formats and the structure differs with each format. Readers should consult the QCA Firmware Technical Reference Manual for a complete description. -

- A blank flash memory must first be programmed with a softloader module. The module consists of a manifest, the executable softloader program image and a flash memory map. The map is used to manage flash memory during initializations and upgrades. The softloader module must be written into flash memory as a separate module before parameter and firmware modules are written. After that, parameter and firmware modules may be written and re-written without re-writing the softloader module. Of course, the softloader module must be re-written if flash memory is erased. -

Figure 4.9.  - Flashing the Softloader (AR7420) -

-
-   AR7420                                        LOCAL-HOST
- [02] |<- VS_MODULE_OPERATION.REQ (Start Session) ---| [01]
- [03] |-- VS_MODULE_OPERATION.CNF (Start Session) -->| [04]
-      |                                              |
- [06] |<-- VS_MODULE_OPERATION.REQ (Write Module) ---| [05]
- [07] |--- VS_MODULE_OPERATION.CNF (Write Module) -->| [08]
-      |<---------------------------------------------|     
-      |--------------------------------------------->|     
-      |                                              |
- [10] |<- VS_MODULE_OPERATION.REQ (Close Session) ---| [09]
- [11] |-- VS_MODULE_OPERATION.CNF (Close Session) -->| [12]
-
- 

  1. - The local host sends a VS_MODULE_OPERATION.REQ module write session request to register a session identifier and the module identifier, module length and module checksum of the softloader module. The softloader module identifier is 0x7003. The softloader module is the entire softloader chain including manifest, softloader image and flash memory layout. -

  2. - The device receives the request, validates the module identifier and preserves the module length and checksum until the module write session is closed. The local host has 30 minutes to complete registered module write operations and close the module write session. -

  3. - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0, if things went well. -

  4. - The local host receives the confirmation and prepares to download the softloader module. -

  5. - The local host sends a VS_MODULE_OPERATION.REQ module write request containing the offset, length and content of the first portion of the module being downloaded. -

  6. - The device receives the request and write to a scrath region of flash memory awaiting session close. -

  7. - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0 if things went well. -

  8. - The local host receives the confirmation and continues downloading the softloader in fragments using VS_MODULE_OPERATION write requests, advancing the offset and adjusting the length with each write. -

  9. - The local host send a VS_MODULE_OPERATION.REQ close module write session request having COMMIT_CODE bits 0 and 1 set. to indicate Force Commit and Commit without reset, respectively. -

  10. - The device recevies the request, verifies the module length and checksum then transfers the module from scratch memory to it's final location in flash memory. -

  11. - The device responds with VS_MODULE_OPERATION.CNF close module write session with MSTATUS set to 0 if things went well. If things did not go well then the local host must request a new write module session and start over. -

- Once the softloader module is written, the parameter and firmware modules may be written in much the same way except that they must be written as a pair. The parameter module must be downloaded first. The firmware module cannot be committed to without a compatible parameter module. -

- When parameters and firmware are written together the User PIB, Factory PIB and firmware are modified modified. The new User PIB is created by copying the old User PIB over the new one. Consequently the only change comes from extra fields found at the end of the new User PIB. The new Factory PIB becomes the new User PIB with certain fields from the old User PIB preserved, such as the MAC, DAK and so on. -

Figure 4.10.  - Flash Parameters and Firmware (AR7420) -

-
-       AR7420                                      LOCAL-HOST
-    [02] |<- VS_MODULE_OPERATION.REQ (start session) ---| [01]
-    [03] |-- VS_MODULE_OPERATION.CNF (start session) -->| [04]
-         |                                              |
-    [06] |<-- VS_MODULE_OPERATION.REQ (write module) ---| [05]
-    [07] |--- VS_MODULE_OPERATION.CNF (write module) -->| [08]
-         |<---------------------------------------------|
-         |--------------------------------------------->|
-         |                                              |
-    [10] |<-- VS_MODULE_OPERATION.REQ (write module) ---| [09]
-    [11] |--- VS_MODULE_OPERATION.CNF (write module) -->| [12]
-         |<---------------------------------------------|
-         |--------------------------------------------->|
-         |                                              |
-    [14] |<- VS_MODULE_OPERATION.REQ (commit modules) --| [13]
-    [15] |-- VS_MODULE_OPERATION.CNF (commit modules) ->| [16]
-
- 

  1. - The local host sends a VS_MODULE_OPERATION.REQ module write session request to register the session identifier, module identifiers, module lengths and module checksums. In this case, the two modules are the runtime parameters and runtime firmware. The module identifiers are 0x7002 and 0x7003, respectively. The application running on the local must must locate these modules and determine their size and checksum. -

  2. - The device receives the request, validates the module identifier and preserves the module lengths and checksums until the module write session is closed. The local host has 30 minutes to complete registered module write operations and close the module write session. -

  3. - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0, if things went well. -

  4. - The local host receives the confirmation and prepares to download the parameter module. -

  5. - The local host sends a VS_MODULE_OPERATION.REQ module write request containing the offset, length and content of the first portion of the module being downloaded. -

  6. - The device receives the request and write to a scratch region of flash memory awaiting write session close. -

  7. - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0 if things went well. -

  8. - The local host receives the confirmation and continues downloading the parameter module in fragments using VS_MODULE_OPERATION write requests, advancing the offset and adjusting the length with each write. -

  9. - The local host receives the confirmation and prepares to download the firmware module. -

  10. - The local host sends a VS_MODULE_OPERATION.REQ module write request containing the offset, length and content of the first portion of the module being downloaded. -

  11. - The device receives the request and write to a scratch region of flash memory awaiting write session close. -

  12. - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0 if things went well. -

  13. - The local host receives the confirmation and continues downloading the firmware module in fragments using VS_MODULE_OPERATION write requests, advancing the offset and adjusting the length with each write. -

  14. - The local host send a VS_MODULE_OPERATION.REQ close module write session request having COMMIT_CODE bits 0 and 1 set. to indicate force commit and commit without reset, respectively. -

  15. - The device receives the request, verifies the module length and checksum then transfers the module from scratch memory to it's final location in flash memory. -

  16. - The device responds with VS_MODULE_OPERATION.CNF close module write session with MSTATUS set to 0 if things went well. If things did not go well then the local host must request a new write module session and start over. -

- At this point, the device is ready to boot from flash memory if the power fails or the device resets. -

diff --git a/docbook/ch05.html b/docbook/ch05.html deleted file mode 100644 index 697e469f..00000000 --- a/docbook/ch05.html +++ /dev/null @@ -1,49 +0,0 @@ -Chapter 5.  Procedures

Chapter 5.  - Procedures -

Table of Contents

- Introduction -
- Select an Interface on Linux -
- Select an Interface on Windows -
- Identify a Device -
- Browse the Network -
- Forming a Network -
- Configuring a Device -
- Upgrading Firmware and PIB -
- Upgrading PIB Only -
- Starting a Device -
- Testing a Device -
- Programming NVRAM -
- Pairing UART Devices post PTS -
- Trouble-shooting Problems -
- SLAC Configuration -
- APCM_SET_CCO Primative -
- APCM_CONFIG_SLAC Primative -
- SLAC Demonstration -

- Introduction -

- The Open Powerline Toolkit can perform all sorts of operations on Atheros powerline devices. Many operations are simple and can be accomplished using one command. Others are more complex and may require several commands. This section demonstrates common console commands that you might want to use when experimenting or working with Atheros powerline devices. Multi-command procedures can be generalized and automated using any programming or scripting language that can execute console commands. -

diff --git a/docbook/ch05s02.html b/docbook/ch05s02.html deleted file mode 100644 index 27099193..00000000 --- a/docbook/ch05s02.html +++ /dev/null @@ -1,61 +0,0 @@ -Select an Interface on Linux

- Select an Interface on Linux -

- Linux network interfaces are referenced by name. Use Linux utility ifconfig to determine the names of interfaces on your host. By default, Toolkit programs communicate with powerline devices on interface eth1 but another interface can be specified on the command line with the -i option: -

Example 5.1.  - Selecting another Interface on Linux -

-# int6k -i eth3 ...
-

- In the previous example, int6k will send and receive frames on interface eth3 instead of the default interface. Having to specify the interface can become become tedious when entering commands manually. An alternative method involves setting environment variable PLC to your preferred Ethernet interfaces, as follows: -

Example 5.2.  - Changing the Default Interface on Linux -

-# export PLC="eth2"
-

- In the previous example, environment variable PLC is defined and exported, making it available to all programs running under the current console session. This command can be included in ~/.profile or /etc/profile or in /etc/environment on Debian ™ and Ubuntu™ systems. -

Example 5.3.  - Finding Interfaces on Linux -

-# ifconfig
-eth0      Link encap:Ethernet  HWaddr 00:60:97:05:97:0C  
-          inet addr:192.168.170.179  Bcast:192.168.170.255  Mask:255.255.255.0
-          inet6 addr: fe80::260:97ff:fe05:970c/64 Scope:Link
-          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
-          RX packets:52130758 errors:0 dropped:0 overruns:0 frame:0
-          TX packets:59629414 errors:0 dropped:0 overruns:0 carrier:0
-          collisions:0 txqueuelen:1000 
-          RX bytes:43781526 (41.7 MiB)  TX bytes:4226651392 (3.9 GiB)
-          Interrupt:209 Base address:0xe000 
-
-eth1      Link encap:Ethernet  HWaddr 00:0F:EA:10:D5:1C  
-          inet addr:192.168.99.1  Bcast:192.168.99.255  Mask:255.255.255.0
-          inet6 addr: fe80::20f:eaff:fe10:d51c/64 Scope:Link
-          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
-          RX packets:68711621 errors:0 dropped:0 overruns:0 frame:0
-          TX packets:70059644 errors:0 dropped:0 overruns:0 carrier:0
-          collisions:0 txqueuelen:1000 
-          RX bytes:3449044517 (3.2 GiB)  TX bytes:1328494982 (1.2 GiB)
-          Interrupt:217 
-
-lo        Link encap:Local Loopback  
-          inet addr:127.0.0.1  Mask:255.0.0.0
-          inet6 addr: ::1/128 Scope:Host
-          UP LOOPBACK RUNNING  MTU:16436  Metric:1
-          RX packets:177789 errors:0 dropped:0 overruns:0 frame:0
-          TX packets:177789 errors:0 dropped:0 overruns:0 carrier:0
-          collisions:0 txqueuelen:0 
-          RX bytes:599522176 (571.7 MiB)  TX bytes:599522176 (571.7 MiB)
-

- The previous example demonstrates the use of Linux ifconfig utility to identify available network interfaces by name and MAC address. -

- If your computer has multiple Ethernet interface cards installed, you can connect each card to a different Atheros powerline device and communicate with each device, independently, from one console session (window) by specifying the appropriate interface card with each command. It is also possible to open multiple console sessions (windows), each having a unique enviroment, and assign a different value for PLC in each enviroment. -

diff --git a/docbook/ch05s03.html b/docbook/ch05s03.html deleted file mode 100644 index 542dcd7c..00000000 --- a/docbook/ch05s03.html +++ /dev/null @@ -1,29 +0,0 @@ -Select an Interface on Windows

- Select an Interface on Windows -

- Winpcap references host network interfaces by number, not name. This means that you must determine the proper interface number for the network adapter that you plan to use. Use Toolkit pcapdevs utility will enumerate available host network adapters by number, MAC address and description. By default, Toolkit programs communicate with powerline devices on pcap interface 2 but another interface can be specified on the command line with the -i option: -

Example 5.4.  - Selecting another Interface on Windows -

-# int6k -i 3 ...
-

- In the previous example, int6k will send and receive frames using host interface 3 instead of the default interface. Having to specify the interface can become tedious when entering commands manually. Presently there is no way to specify a default interface on WIndows platforms. -

Example 5.5.  - Finding Interfaces on Windows -

-# pcapdevs
- 1 00:00:00:00:00:00 \Device\NPF_GenericDialupAdapter	(Adapter for generic dialup
- 2 00:0E:2E:03:5F:B8 \Device\NPF_{4CFAABD5-C929-4942-914B-BDFE72B13611} (Realtek R
- 3 00:C0:49:D5:CB:14 \Device\NPF_{73E0D2EF-6069-4831-B379-507025F2BDCD} (Realtek R
- 4 00:0C:76:87:3E:3D \Device\NPF_{86B96905-3AA7-46F1-969A-6C23E3BBBA8B} (Broadcom
-

- The previous example illustrates the use of Toolkit pcapdevs utility to identify available network interfaces by interface number, MAC address and description. The descriptions have been truncated in this example because they are too long. Devices having MAC address 00:00:00:00:00:00 are unavailable. -

diff --git a/docbook/ch05s04.html b/docbook/ch05s04.html deleted file mode 100644 index 84ecbb82..00000000 --- a/docbook/ch05s04.html +++ /dev/null @@ -1,53 +0,0 @@ -Identify a Device

- Identify a Device -

- Before you start working with Atheros powerline devices, you should determine the chipset and firmware revision because that will determine the types of operations that can be performed and the order in which some operations should be performed. The following example illustrates how to determine this information. -

Example 5.6.  - Device Identification -

-# int6k -r
-eth1 00:B0:52:00:00:01 Fetch Version Information
-eth1 00:B0:52:DA:DA:23 INT6300A0 INT6000-MAC-3-0-3001-1081-LA-A NOT_UPGRADEABLE
-eth1 00:B0:52:FE:87:2D INT6000A1 INT6000-SL-0-1-0110-200-2006-0415-BETA NOT_UPGRADEABLE
-

- This example demonstrates several things. -

- First, the int6k -r option requests hardware and software revision information from a device by sending an Atheros VS_SW_VER vendor-specific managerment message and waiting for a response. Atheros vendor-specific management messages are described in the Atheros HomePlug AV Firmware Technical Reference Manual. It you do not have access to this document then many toolkit features may be difficult to understand. -

- Since we did not specify an Ethernet interface on the command line, the default interface was used. In this case, the default interface was eth1 and so we observe that eth1 was used to both send requests and receive responses. -

- Since we did not specify a device address on the command line, the default address was used. Device addresses are also known as MAC, Ethernet or hardware addresses. They uniquely identify a device on a network. Unlike Ethernet cards, powlerlines device do not have IP addresses. -

- The default device address for toolkit programs is 00:B0:52:00:00:01. This address is the Local Management Address (LMA). All Atheros devices connected to the local host will respond to this address and include their actual address in the response. In the above example, two devices responded. This means that both were connected directly to eth1, perhaps via a network hub. Observer that device 00:B0:52:DA:DA:23 is an INT6300 and device 00:B0:52:FE:87:2D is an INT6000. The first device is running Atheros firmware and the second device is running the Atheros Softloader. -

Example 5.7.  - Inspecting Device Configuration -

- To find out more about device 00:B0:52:DA:DA:23 we might issue the following command where option -I requests identity information stored in the device PIB. In this case, we specified the device by MAC address to prevent other local devices from responding. There is no harm in having both devices respond so we could have specified both hardware addresses. -

-# int6k -I 00:B0:52:DA:DA:23
-eth1 00:B0:52:DA:DA:23 Device Identity
-eth1 00:B0:52:DA:DA:23 -------
-        PIB 3-2 7864 bytes
-        MAC 00:B0:52:DA:DA:23
-        DAK 24:03:D7:84:09:A0:9A:78:8D:F6:82:75:AF:0D:0F:D8
-        NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
-        NID B0:F2:E6:95:66:6B:03
-        NET Jupiter-23
-        MFG Intergalactic Death Rays Inc.
-        USR Rattin Tordo
-        CCo Auto
-

- Pay special attention to the MAC address after flashing NVRAM. Hardware address 00:B0:52:00:00:03 indicates the Default PIB used when no other PIB is available. The Default PIB disables communication over powerline. -

- Pay special attention to the NMK when devices cannot communicate. Devices having different NMK values will not form a network. Conversely, all devices having the same NMK will form a network. This becomes important when programming large numbers of devices. You must have an out-of-the-box networking strategy that balances user convenience and network security. -

- The string next to the NMK indicates that password HomePlugAV was used to generate that key. This is one of two default passwords and keys used by Atheros. In some cases, it may be another clue that the device is using the default PIB. -


diff --git a/docbook/ch05s05.html b/docbook/ch05s05.html deleted file mode 100644 index a20742aa..00000000 --- a/docbook/ch05s05.html +++ /dev/null @@ -1,35 +0,0 @@ -Browse the Network

- Browse the Network -

- A powerline network consists of one or more powerline devices that share a common NMK. One device on the network is in charge of the network and known as the Central Coordinator (CCo). All other devices on that network are known as stations (STA). Each device maintains internal information about the network to which it belongs. You can view that information at any time. -

Example 5.8.  - Display Network Information -

-# int6k  -mieth3
-eth3 00:B0:52:00:00:01 Fetch Network Information
-eth3 00:B0:52:00:00:BB Found 1 Network(s)
-
-	network->NID = 77:23:0D:91:06:6E
-	network->SNID = 6
-	network->TEI = 1
-	network->ROLE = 0x02 (CCO)
-	network->CCO_DA = 00:B0:52:00:00:BB
-	network->CCO_TEI = 1
-	network->STATIONS = 1
-
-		station->DA = 00:B0:52:00:00:AA
-		station->TEI = 2
-		station->BDA = FF:FF:FF:FF:FF:FF
-		station->AvgPHYDR_TX = 0 mbps
-		station->AvgPHYDR_RX = 0 mbps
-

- The example above prompts the local device on interface eth3 for network membership (-m) information. Device 00:B0:52:00:00:BB responded and reported that it belongs to one powerline network. The first block of information identifies the network CCo. The second block of information identifies a network STA. This second block will repeat when multiple stations are present. Each device on the network has a unique Terminal Equipment Identifier (TEI) within the network. The average PHY rates show the data rates between the reporting device and each STA. In this cases there has been no traffic. -

diff --git a/docbook/ch05s06.html b/docbook/ch05s06.html deleted file mode 100644 index 8d354157..00000000 --- a/docbook/ch05s06.html +++ /dev/null @@ -1,51 +0,0 @@ -Forming a Network

- Forming a Network -

- A powerline network is formed when two or more devices share a common Network Membership Key (NMK). An NMK is always 16 bytes (32 hexadecimal digits) in length and can have any value, including all zeros. Devices programmed with the same NMK value can communicate while those programmed with different NMK values cannot. Program int6k can be used to program a local or remote device with a specific NMK value. -

Example 5.9.  - Setting the Network Membership Key -

-# int6k -M 
-eth1 00:B0:52:00:00:01 Set Local Network Membership Key
-eth1 00:B0:52:BA:BA:56 Setting ...
-

- This example programs the local device with the default NMK. Option -M sets the network membership key with the default key value. The default key is used because we omitted option -K and the local device is programmed because we omitted the device MAC address. -

- One can quickly and easily create a default network by connecting each device, in turn, to the local host and executing this command shown above. The devices will then form a network when connected via the powerline. Although fast and simple, this method is not very secure because the default NMK is used by many Atheros tools and is well known. -

- There are cases where one wants to create separate, independent networks on the powerline. This is accomplished by programming some devices with one NMK and other devices with another NMK. In such cases we need to specify an NMK value. -

Example 5.10.  - Forming a Custom Network -

-# int6k -M -K 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF 
-eth1 00:B0:52:00:00:01 Set Local Network Membership Key
-eth1 00:B0:52:BA:BA:56 Setting ...
-

- This example programs the local device NMK with the value 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF. Option -K sets the default key value used by option -M. The default device is programmed because we omitted a target MAC address from the command line but we could have specified the local device using the actual device MAC address or the Local Management Address (LMA) of 00:B0:52:00:00:01 or the keyword local, like so ... -

-# int6k -M -K 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF 
-# int6k -M -K 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF 00:B0:52:BA:BE:56
-# int6k -M -K 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF local
-

Example 5.11.  - Remote Network Configuration -

- Once a network has been established, one can change the NMK of remote devices over the powerline but once the NMK on the remote device has changed, it is no longer part of original network and can no longer be returned to the network in the same way. Additionally, one cannot change the NMK on a remote device without specifying the DAK of the device to be changed. -

-# int6k -M -K 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF \
-        -J 00:B0:52:BA:BE:57 \
-        -D A7:8E:11:FB:6A:90:2C:CB:A7:8E:11:FB:6A:90:2C:CB
-eth1 00:B0:52:00:00:01 Set Remote Network Membership Key
-eth1 00:B0:52:BA:BA:56 Setting ...
-

- This example sets the NMK on remote device via the local device. Option -J specified the MAC address of the remote device. Option -D specified the DAK of the remote device. The request is sent to the local device, because we omitted the target MAC address, and the local device forwards our request to the remote device. The request will fail if the remote device is not accessible or the remote device DAK is incorrect. -

- This command is one of the more complicated int6k commands, requires lots of typing and is consequently prone to typing errors. The order of command line options is not important. -


diff --git a/docbook/ch05s07.html b/docbook/ch05s07.html deleted file mode 100644 index e1f3fb1a..00000000 --- a/docbook/ch05s07.html +++ /dev/null @@ -1,42 +0,0 @@ -Configuring a Device

- Configuring a Device -

- Device identity, capability and behavior are controlled by runtime parameters stored in the device PIB. To change device identity, capability or behavior you must alter a template PIB file, download it to the device and flash it into NVRAM. A template PIB can come from several sources but an excellent souce is the device, itself. Configuration changes then become a simple read, modify and write back operation. -

Example 5.12.  - Read a PIB File -

-# int6k  -i eth2 -p old.pib local
-eth2 00:B0:52:00:00:01 Read Parameters from Device
-eth2 00:B0:52:00:00:BE Read.
-

- This example reads the PIB from the local device and writes it to a file. The toolkit has a growing number of programs designed to inspect and change pibfiles in various ways. Program modpib is one program that can be used for this purpose. -


Example 5.13.  - Modify a PIB File -

-# modpib old.pib -M 00:B0:52:00:BA:BE \
-                 -N 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF \
-                 -D FF:EE:DD:CC:BB:AA:99:88:77:66:55:44:33:22:11:00 \
-                 -S "Intergalactic Death Rays, Inc." \
-                 -T "Global Spy Network" \
-                 -U "Bedroom"
-

- The example above edits identity parameters in PIB file, old.pib, recomputes the internal checksum and re-writes the file. The network identity parameters are MAC (-M), NMK (-N) and DAK (-D). The user identity parameters are MFG_HFID (-S), NET_HFID (-T) and USR_HFID (-U). The PIB file is ready for download and flash. -

- Program modpib is a safe way to edit a PIB file because it only change selected parameters. Use program setpib to edit other parameters if required. -

Example 5.14.  - Save a PIB File -

-# int6k  -i eth2 -P old.pib -C pib
-eth2 00:B0:52:00:00:01 Write Parameters to Device
-eth2 00:B0:52:00:00:BE Written.
-

- This example writes the modified PIB file, old.pib, to the local device and commits it to NVRAM. Option -P writes the PIB file to the device instead of reading it from the device. Option -C with argument pib commits only the PIB, and not firmware, to NVRAM. -

diff --git a/docbook/ch05s08.html b/docbook/ch05s08.html deleted file mode 100644 index 5db1a7d6..00000000 --- a/docbook/ch05s08.html +++ /dev/null @@ -1,30 +0,0 @@ -Upgrading Firmware and PIB

- Upgrading Firmware and PIB -

- Eventually, you may want to upgrade (or downgrade) the runtime firmware stored in NVRAM. To do this, you must locate a copy of the new .nvm file on the Atheros FTP site and download it to your host. You must then download the file to the device and ask the runtime firmware on the device to write the file to NVRAM. Writing firmware to NVRAM is also called flashing the device. Program int6k can be used for this purpose when runtime firmware is executing on the device. -

- Program int6k instructs runtime firmware to write to NVRAM but the firmware will behave differently depending on how it was loaded and started. The first time NVRAM is written by runtime firmware, the Factory PIB is created in NVRAM. The second time, the User PIB is created. Thereafter, the User PIB will be re-written each time. This preserves original factory settings and permits their restoration regardless of intervening parameter changes. This means that you should make an effort to get things right the first time. -

Example 5.15.  - Upgrade Firmware and PIB -

-# int6k  -i eth2 -P ../firmware/new.pib -N ../firmware/new.nvm -F
-eth2 00:B0:52:00:00:01 Write Firmware to Device
-eth2 00:B0:52:00:00:BE Wrote ../firmware/new.nvm
-eth2 00:B0:52:00:00:01 Write Parameters to Device
-eth2 00:B0:52:00:00:BE Wrote ../firmware/new.pib
-eth2 00:B0:52:00:00:01 Flash NVRAM
-eth2 00:B0:52:00:00:BE Flashing ...
-eth2 00:B0:52:00:00:BE Started INT6000-MAC-3-3-3325-00-2443-20080414-FINAL-B
-

- This example downloads a PIB file (-P) and an NVM file (-N) to the device then instructs the runtime firmware to write (or flash) (-F) both of them to NVRAM. Option -F always writes both to NVRAM but option -C can be used to write only one or the other or both. -

- Observe that options -P, -N and -F are all in uppercase. As a rule, uppercase options modify the device and lowercase options do not. One notable exception to this rule is -I which merely displays device identity. -

diff --git a/docbook/ch05s09.html b/docbook/ch05s09.html deleted file mode 100644 index c8df1686..00000000 --- a/docbook/ch05s09.html +++ /dev/null @@ -1,27 +0,0 @@ -Upgrading PIB Only

- Upgrading PIB Only -

- When flashing a PIB to the local device, the PIB DAK must match that of the local device or you will get a DAK Not Zero error message. This message is incorrect and should probably read DAK Mismatch. The following two toolkit commands should prevent this error from occuring on Linux. The first command reads the actual MAC (-A) and DAK (-D) from the device using program int6kid and inserts them on the command lise as modpib arguments using options -M and -D. We need not include the station MAC address on the int6k command line because the device is local, but we could include it. -

Example 5.16.  - Upgrade local device PIB -

- # modpib abc.pib -ieth1 -M $(int6kid -ieth1 -A) -D $(int6kid -ieth1 -D)
- # int6k -P abc.pib -C pib 
- 

- When flashing a PIB to a remote device, the PIB DAK must be all zeros or you will get a DAK Not Zero error message. This message occurs because the HomePlug™ AV Specification does not permit a DAK to be transmitted over powerline in any form. The following two toolkit commands should prevent this error on Linux. We must include the device MAC on the command line when invoking each program because the device is remote. Notice that symbol none can be used as shorthand 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 when specifying the DAK. -

Example 5.17.  - Upgrade remote PIB -

- # modpib abc.pib -ieth1 -M $(int6kid -ieth1 -A 00B052BEEF03) -D none 
- # int6k -P abc.pib -C2 00B052BEEF03
- 

- The MAC address stored in the PIB can have any value but it is good practice to preserve the original value. This avoids the common mistake of flashing multiple network stations with the same MAC address because the PIB was not updated. -

diff --git a/docbook/ch05s10.html b/docbook/ch05s10.html deleted file mode 100644 index 7b692876..00000000 --- a/docbook/ch05s10.html +++ /dev/null @@ -1,37 +0,0 @@ -Starting a Device

- Starting a Device -

- Some device configurations have no flash memory to store runtime parameters and firmware so the local host must store them until needed then write them into device SDRAM and start execution. This is also needed when the flash memory is blank or corrupted because the runtime firmware is the only way to write flash memory. Programs int6kf, int6kboot, ampboot and plcboot are used to configure a blank device then download runtime parameters and firmware and start execution. They all perform the same basic function but in different ways. -

Example 5.18.  - Start Firmware on INT6000™ -

-# int6kf -C abc.cfg -N abc.nvm -P abc.pib 
-

- Program int6kf can be used to download runtime firmware and parameters and start execution on and INT6000™ chipset. The process involves downloading a .cfg file using VS_SET_SDRAM, downloading a .nvm file using VS_WR_MEM, downloading a .pib file using VS_WR_MEM then starting firmware execution using VS_ST_MAC. See the int6kf man page for an explanation of the command line options and arguments used here. -


Example 5.19.  - Start Firmware on INT6300™ and INT6400™ -

-# int6kboot -N abc.nvm -P abc.pib 
-

- Program int6kboot can be used to download runtime firmware and parameters and start execution on an INT6300™ or INT6400™ chipset. The process involves downloading a .nvm file using VS_WR_MEM, downloading a .pib file using VS_WR_MEM then starting firmware execution using VS_ST_MAC. No .cfg file is needed or permitted with this application. -


Example 5.20.  - Start Firmware on AR7400™ -

-# ampboot -N abc.nvm -P abc.pib 
-

- Program ampboot can be used to download runtime firmware and parameters and start execution of runtime firmware on an INT6300™, INT6400™ or AR7400™ chipset. The process involves downloading a .pib file using VS_WR_MEM, downloading a .nvm file using VS_WR_MEM then starting firmware execution using VS_ST_MAC. A general purpose applet, stored in the .nvm file, configures SDRAM. No .cfg file is needed or permitted with this application. -


Example 5.21.  - Start Firmware on AR7420™ -

-# plcboot -N abc.nvm -P abc.pib 
-

- Program plcboot can be used to download runtime firmware and parameters and start execution an INT6300™, INT6400™, AR7400™ or AR7420™ chipset. This program detects the type of chipset and the image file format. The boot process varies depending on the chipset that is detected and the image file format. For the AR7420™ chipset, this process involves downloading a .pib and .nvm file using only VS_WRITE_EXECUTE messages. For earlier chipsets, the process is as described above. -


diff --git a/docbook/ch05s11.html b/docbook/ch05s11.html deleted file mode 100644 index dec98452..00000000 --- a/docbook/ch05s11.html +++ /dev/null @@ -1,34 +0,0 @@ -Testing a Device

- Testing a Device -

- When the Bootloader is running, it is possible to perform systematic diagnostic testing by downloading and executing a variety of small programs, called applets. A collection of applets can be found in the toolkit Applets folder. Applet manpages describe the purpose of each one. Some applets are more useful than others. Start by reading the applets manpage. -

- Program int6ktest can be used to sequentially download and execute a series of applets. Applets have evolved over time and some are more useful or informative than others. Newer applets report progress and errors on the console. Older applets report progress or errors by flashing the onboard LEDs. This means of testing cannot be used after the flash memory has been programmed unless you erase, corrupt or remove the flash. -

-# int6ktest -i eth4 connection.nvm memctl.nvm marchloop.nvm
-eth4 00:B0:52:00:00:01 Write Memory (00000000:32)
-eth4 00:B0:52:00:00:01 Wrote connection.nvm
-eth4 00:B0:52:00:00:01 Start connection.nvm (0)
-eth4 00:B0:52:00:00:01 Write Memory (00001000:664)
-eth4 00:B0:52:00:00:01 Wrote connection.nvm
-eth4 00:B0:52:00:00:01 Start connection.nvm (1)
-eth4 00:B0:52:00:00:01 Write Memory (00000040:6076)
-eth4 00:B0:52:00:00:01 Wrote memctl.nvm
-eth4 00:B0:52:00:00:01 Start memctl.nvm (0)
-eth4 00:B0:52:00:00:01 Write Memory (00001000:2212)
-eth4 00:B0:52:00:00:01 Wrote marchloop.nvm
-eth4 00:B0:52:00:00:01 Start marchloop.nvm (0)
-eth4 00:B0:52:00:00:01 0x00 March2 test - Pass
-

- This example uses program int6ktest to download and execute applets connection.nvm, memctl.nvm and marchloop.nvm to the powerline device on host interface eth4. The first applet checks circuit board connections to memory and reports progress and errors by flashing onboard LEDs. The second configures the SDRAM controller and exits without any indication. The third performs a systematic test of SDRAM and reports progress and errors on the console. In this case the test passed. -

- See programs amptest and plctest for updated versions of this program for use with AR7400™ and QCA7420™ chipsets. -

diff --git a/docbook/ch05s12.html b/docbook/ch05s12.html deleted file mode 100644 index 8e98422b..00000000 --- a/docbook/ch05s12.html +++ /dev/null @@ -1,30 +0,0 @@ -Programming NVRAM

- Programming NVRAM -

- int6kf and int6kboot -

- The INT6300™ and INT6400™ do not require a special SDRAM configuration file and so program int6kboot may be used in place of int6kf which is described here. The only real difference between the two programs is the presence or absence of option -C on the command line. -

- The int6kf program can program a blank or corrupted NVRAM on the INT6300. The process involves starting the runtime firmware as shown in the previous example then downloading a .nvm file using a VS_WR_MOD message, downloading a .pib file using another WR_WR_MOD message then writing both to NVRAM using a VS_MOD_NVM message. An example int6kf command line is shown below. It is identical to the one shown above except for the addition of the flash option at the end. -

Example 5.22.  - Flash NVRAM with int6kf -

-# int6kf -C abc.cfg -N abc.nvm -P abc.pib -F
-

- The example above starts the firmware then uses it to program the NVRAM. This was done in one step rather than two seperate steps as shown in the examples before it. The only difference is that int6k needs to use the 'force flash' option when using downloaded firmware to write NVRAM. The following example accomplishes the same thing as the previous example but uses int6k to program NVRAM. See the int6k man page for an explanation of the command line options and arguments used here. -

- The int6kf program cannot program blank or corrupted NVRAM on the INT6000 unless the Softloader is running. Since the Softloader resides in NVRAM, the NVRAM must be either pre-programmed before use or removed and externally re-programmed if it corrupts. -

Example 5.23.  - Flash NVRAM with int6k -

-# int6kf -C abc.cfg -N abc.nvm -P abc.pib 
-# int6k -N abc.nvm -P abc.pib -FF 
-

diff --git a/docbook/ch05s13.html b/docbook/ch05s13.html deleted file mode 100644 index 0df9d745..00000000 --- a/docbook/ch05s13.html +++ /dev/null @@ -1,54 +0,0 @@ -Pairing UART Devices post PTS

- Pairing UART Devices post PTS -

- This procedure describes how to pair two UART-enabled powerline adapters once they have been programmed, personalized and tested. This example assumes you are using a Windows host and two powerline adapters having MAC addresses 00:B0:52:00:05:F9 and 00:B0:52:00:05:FA. -

- Start with the first device, 00:B0:52)(00:05:F9. Plug the host serial cable into the RJ45 port on the device and plug the device into an AC power source. -

- Change to transparent mode using program int6kuart. Option -v displays outgoing command and incoming serial responses. The +++ is the serial data sent to the device and the OK is the device response. -

-# int6kuart -s com3 -wv
-+++
-OK
-

-

- Read the adapter PIB into a temporary file using program int6kuart. The following command reads the PIB from serial device com3 and saves it to file temp.pib on the host. You will see a series of dots appear on the console as the PIB is read from the device. The filename used is not important. -

-# int6kuart -s com3 -p temp.pib
-....................
-

-

- Program the PIB file with the default destination address using program setpib. The following command inserts the MAC address of the second device, 00B0520005FA, at fixed offset 0x2C8A in file temp.pib downloaded in the previous step. -

-# setpib temp.pib 2C8A data 00B0520005FA
-

-

- Write the modified PIB file back to the adapter and commit it to flash memory using program int6kuart. The following command write file temp.pib to serial device com3 then commits the PIB to flash memory. You will see a series of dots appear on the console as the PIB is written to the device. The device will reboot. -

-# int6kuart -s com3 -P temp.pib -C2
-....................
-

-

- Change the device to Transparent Mode using program int6kuart once the device resets. -

-# inc6kuart -s com3 -wv
-+++
-OK
-

-

- Verify that the destination MAC address is correct using program int6kuart. -

-# int6kuart -s com3 -d
-00B0520005FA
-

-

- Repeat this process on the second adapter, 00:B0:52:00:05:FA, using the MAC address of the first device, 00:B0:52:00:05:F9, as the destination address. -

diff --git a/docbook/ch05s14.html b/docbook/ch05s14.html deleted file mode 100644 index af7dd191..00000000 --- a/docbook/ch05s14.html +++ /dev/null @@ -1,41 +0,0 @@ -Trouble-shooting Problems

- Trouble-shooting Problems -

- The following steps may help determine why two devices cannot communicate via ethernet over the powerline. They assume that you have successfully installed the Powerline Toolkit but are having trouble forming a powerline network. -

  1. - On Linux, run program ifconfig to determine available interface names as described earlier. The default interface name is eth1 on Linux. You must use interface names, not numbers, on the Linux command line. -

    - On Windows, run program pcapdevs to determine available interface numbers as described earlier. The default interface number is 2 on Windows. You must use interface numbers, not names, on Windows command lines, even under Cygwin. -

    - In either case, Linux or Windows, if a powerline device is connected to any interface other than the default interface then you must specify the name or number on the command line each time you run int6k. In the following examples, we will use device numbers 3 and 4 to indicate two different interfaces on the same host. -

  2. - Make sure both devices respond to int6k -ri3 and int6k -ri4 as described earlier. They should each display the software revision information. If you get no response then check your connections and network configuration. If you see Bootloader then the connection is good but the firmware is not running. If the firmware versions are different then make them the same. -

    - You must have running firmware to continue and the firmware revisions should be the same. -

  3. - Make sure both devices respond to int6k -Ii3 then int6k -Ii4 as described earlier. They should display about 10 lines of information showing their MAC, DAK and NMK. -

    - If the MAC is 00:B0:52:00:00:01 then either the default Atheros PIB was stored in NVRAM or you downloaded and flashed the generic Atheros PIB without changing the MAC address beforehand. -

    - If the MAC is 00:B0:52:00:00:03 then either no PIB was stored in NVRAM or you downloaded and attempted to flashed an invalid PIB. The firmware will disable powerline communications in this case. -

  4. - If the devices have different NMKs they will not form a network. -

    - One way to form a network is to manually set the NMK on each device to a known value with int6k -Mi3 then int6k -Mi4. Each device will reset afterwards and may reset again when the other device is changed. Repeat Step 3 and confirm that both devices have the same NMK and that (HomePlugAV) appears next to the NMK. -

    - Another way to form a network is to physically press the push-button on each device for 2 to 3 seconds or simulate a push-button press on each device with int6k -B1 -i3 then int6k -B1 -i4. The devices should reset several times and then form a network. -

  5. - Make sure each device knows the other one is present on the network with int6k -mi3 then int6k -Mi4. Each device should show that a network exists and identify the other device as a station on that network. It may take up to 120 seconds for one device to find another and up to 5 minutes to recognise that the other device has left the network. -

  6. - Step 5 should also show the TX and RX PHY rates for each device. Ping each host Interface from the other several times to generate traffic. The PHY Rates should then be non-zero. We use efsu to generate traffic inside our own scripts. You may elect to use another method. -

  7. - Power down both devices then power them up. Wait about 20 seconds and confirm that you can ping in either direction. -

diff --git a/docbook/ch05s15.html b/docbook/ch05s15.html deleted file mode 100644 index 3ae8fe06..00000000 --- a/docbook/ch05s15.html +++ /dev/null @@ -1,135 +0,0 @@ -SLAC Configuration

- SLAC Configuration -

- Avitar can be used to configure a PLC device as either a normal PLC station or a SLAC PEV-PLC or SLAC EVSE-PLC station. In doing so, Avitar changes several PIB values at the same time. This section illustrates how to configurat a PIB the same way using the toolkit. -

- The HomePlug Green PHY Specification refers to the APCM_SET_CCO.REQ and APCM_CONF_SLAC primatives in the SLAC protocol description. These are virtual operations to be implemented by the user. In both cases, one must read the PIB from the PLC device, edit the PIB, recompute PIB checksums and write the PIB back to the PLC device. This can be done manually, using Avitar, or in a script, using the Powerline Toolkit as shown below, or programatically, using custom software. -

Table 5.1.  - PEV-PLC PIB Settings -

- OFFSET - - LENGTH - - SYMBOL - - DESCRIPTION -
- 0000F4 - - 1 - - CCoSelection - - 1: This sets CCo Selection to Never; -
- 001653 - - 1 - - SLAC_EnableMode - - 1: This sets SLAC Selection to PEV; -
- 001C98 - - 4 - - LowLinkSpeed_kbps - - 10240 -
- 001C9C - - 4 - - HighLinkSpeed_kbps - - 102400 -

-

- The following shell script converts a factory PIB to a SLAC PEV by setting the CCO Mode to Never and the SLAC Mode to PEV. The User HFID is set to PEV for role identification, optionally. This PIB must be written into PEV-PLC flash memory for proper operation. -

-#!/bin/sh
-# file: pev.sh
-# ========================================================================
-# convert a factory PIB to a SLAC PEV PIB by changing these PIB settings;
-# ------------------------------------------------------------------------
-setpib ${1} 74 hfid "PEV"
-setpib ${1} F4 byte 1
-setpib ${1} 1653 byte 1
-setpib ${1} 1C98 long 10240 long 102400
-

Table 5.2.  - PEV-EVSE PIB Settings -

- OFFSET - - LENGTH - - SYMBOL - - DESCRIPTION -
- 0000F4 - - 1 - - CcoSelection - - 2: This sets CCo Mode to Always; -
- 001653 - - 1 - - SLAC_EnableMode - - 2: This sets SLAC Mode to EVSE; -
- 001C98 - - 4 - - LowLinkSpeed_kbps - - 10240 -
- 001C9C - - 4 - - HighLinkSpeed_kbps - - 102400 -

- The following shell script converts a factory PIB to a SLAC EVSE by setting the CCO Mode to Always and the SLAC Mode to EVSE. The User HFID is set to EVSE for role identification, optionally. This PIB must be written into EVSE-PLC flash memory for proper operation. -

-#!/bin/sh
-# file: evse.sh
-# ========================================================================
-# convert a factory PIB to a SLAC EVSE PIB by changing these PIB settings;
-# ------------------------------------------------------------------------
-setpib ${1} 74 hfid "EVSE"
-setpib ${1} F4 byte 2
-setpib ${1} 1653 byte 2
-setpib ${1} 1C98 long 10240 long 102400
-

- APCM_SET_CCO Primative -

- This primative configures a PLC state by reading PIB from PLC, changing CCoSelection, computing new PIB checksum then writing the PIB back to PLC. It can be performed manually using Avitar, in a script using the Powerline Toolkit or programatically using custom software. -

- APCM_CONFIG_SLAC Primative -

-

diff --git a/docbook/ch05s16.html b/docbook/ch05s16.html deleted file mode 100644 index 5d3b613c..00000000 --- a/docbook/ch05s16.html +++ /dev/null @@ -1,45 +0,0 @@ -SLAC Demonstration

- SLAC Demonstration -

- This page explains how to install and use two Qualcomm Atheros Powerline Toolkit programs, pev and evse, to demonstrate the HomePlug AV Signal Level Attenuation Characterization (SLAC) protocol. -

- On Microsoft Windows, the two programs are distributed in a seperate Microsoft installation file slac-utils-x.x.x.msi. To install them on Microsoft Windows, double-click on the installation file. The programs will be installed in folder c:\Program Files (x86)\Qualcomm Atheros\Powerline Toolkit unless the user overrides the default settings durin installation. New users should add this folder to the PATH environment variable and define environment variable PLC to reference the Ethernet interface connected to their PLC device. -

- On Linux, the two programs are distibuted inside the full toolkit tarball plc-utils-x.x.x. To install them on Linux, unpack the tarball and change directory to the package folder. Type "sudo make install" to compile and install the toolkit. Type type "sudo make manuals" to install man pages. New users should define environment variable PLC to reference the inteface connected to their PLC device. -

- Exception! -

- In some cases QCA will distribute two Windows .exe files and two monolithic .c files. On Windows, copy the executable files to folder c:\Program Files (x86)\Qualcomm Atheros\Powerline Toolkit and update the system PATH and PLC environment variables. On Linux, compile the two source files using "gcc -o pev pev.c" and "gcc -o evse evse.c" and copy the two binary files to /usr/local/bin then update the system PLC environment variable. You will need root priviledge to copy the binary files to the system folder and you must change the binary file permissions to 4555 in order to execute them as a non-root user. -

- Each program reads an optional configuration file on start-up. Program pev reads pev.ini and program evse reads evse.ini. Qualcomm Atheros does not provide these files but option -c, on each program, can be used to print a template configuration file on stdout. Once a user settles on a convenient working folder, they should run command "pev -c > pev.ini" to create the configuration file for program pev and "evse -c > evse.ini" to create the configuration file for program evse. -

- A SLAC demonstration can be setup using two Qualcomm Atheros PL16 boards, two personal computers, a power strip and a powerline impairment of some kind. One PL16 board must be configured as a PEV and the other must be configured as an EVSE. Plug both PL16 boards into the powerstrip and connect each board to a different computer via Ethernet. Run program pev on the computer connected to the PEV configured board. Run program evse on the computer connected to the EVSE configured board. Program evse runs continuously waiting to service pev programs running on other computers. Program pev runs until charging occurs then exits. -

- On the EVSE host, start program evse as shown below. It will run until cancelled. -

-# evse   
-evse: UnoccupiedState: Listening ...
-

- Messages will appear on the console as events occur. The first field is the program name, in this case evse. The second field is the function name, in this case UnoccupiedState. In this case, program evse does nothing until some PEV trys to associate. -

- On the EVSE host, run program evse as shown below. It will run until it detects and connects to an available EVSE-HLE. Use option -w to vary probe timeouts. -

-# pev   
-pev: DisconnectedState: Probing ...
-pev: pev_cm_slac_param: --> CM_SLAC_PARAM.REQ
-pev: pev_cm_slac_param: <-- CM_SLAC_PARAM.CNF
-

- Messages will appear on the console as events occur. The first field is the program name, in this case pev. The second field is the function name, in this case DisconnectedState and pev_cm_slac_param. The right arrow indicates that function pev_cm_slac_param is sending a CM_SLAC_PARAM.REQ message. If things work properly, you will see a another message indicating that function pev_cm_slac_param is receiving a CM_SLAC_PARAM.CNF message. -

IMG_20130227_145749.jpg

- Unimpaired SLAC configuration. Result should be below threshold and PEV should connect. -

IMG_20130227_151458.jpg

- Impaired SLAC configuration. Result should be above threshold and PEV should not connect. -

diff --git a/docbook/ch06.html b/docbook/ch06.html deleted file mode 100644 index 62c0f5b9..00000000 --- a/docbook/ch06.html +++ /dev/null @@ -1,42 +0,0 @@ -Chapter 6.  Scripting

Chapter 6.  - Scripting -

Table of Contents

- Introduction -
- Linux Script Basics -
- Host Independence -
- Checking Device Connection -
- Random Device Identity -
- Actual Device Identity -
- Editing a PIB -
- Initialize a Device -
- Update a Device -
- Generating Powerline Traffic -
- Reading PHY Rates -
- User Interaction -

- Introduction -

- The Open Powerline Toolkit comes with a variety of example scripts in the scripts folder. They have proven useful to Atheros engineers but may not satisfy your specific needs. This chapter explains how some of these scripts work so that you can modify them to do what you need to do. Most scripts covered in this chapter are intended for a Powerline Workstation. -

- Atheros provides GNU bash scripts as examples and does not guarantee that they are suitable in any or all situations. Furthermore, Atheros may not always update them to reflect changes to toolkit programs. Toolkit command line syntax may change from one release to the next and so Atheros cannot guarantee that older scripts will work with newer programs. The scrips are small, simple and well organized. Do not run them until you have read them and understand what they do and how they work. -

- Sample scripts are available in the scripts folder. Some extremely useful ones are flash.sh, upgrade.sh and traffic.sh. They all reference files hardware.sh and firmware.sh.

- Although Toolkit programs run under Windows their power is realized through scripts. Scripting requires environmental support for sophisticated symbol substitution and expansion. Most Linux shells are suitable but Microsoft DOS is not. On Windows, consider using installing Cygwin and using their bash shell. Scripting languages Tcl and Python are suitable alternatives. Another alternative is to write small Windows programs that format and execute the DOS shell commands you want. -

diff --git a/docbook/ch06s02.html b/docbook/ch06s02.html deleted file mode 100644 index 97620502..00000000 --- a/docbook/ch06s02.html +++ /dev/null @@ -1,41 +0,0 @@ -Linux Script Basics

- Linux Script Basics -

- We summarize some scripting rules here for those who may not be familiar with Linux scripting. If you do not understand the rules or the syntax or have questions then you should consult Linux documentation available on the internet. -

- On Linux, all commands typed in a console window are read and interpreted by a command interpreter called a shell program. The are several shell programs available for Linux but we use bash exclusively. If you elect to use a different shell program, like csh, then you will probably need to modify our scripts. -

- If you do not set execute permissions you must submit it to the shell for execution. If you set execute permissions on a script file then you can execute it directly by typing the filename. You can set execute permission on Linux with the chmod utility as shown in the example below. -

-# bash script.sh
-...
-# chmod 0755 script.sh
-# script.sh
-...
-

- The example above show how to run a script file using bash when it does not have execute permissions set. It then shows how to set the execute permissions and run it directly without using bash. -

- It is good practice to insert a bang-path on the first line of a script to ensure is is executed by the correct shell program, regardless of the shell used to open the script. It is possible to open a script with one shell and have it execute under another shell. -

-#!/bin/bash
-

- The next example shows an example bang-path. The first two characters inform the shell that this file contains scripting commands. The remainder of the bang-path line includes a program path with any options and arguments needed by the program. The shell will invoke that program and pass the rest of the script file to the program as standard input. -

- Symbols are defined with the symbol name then an equals sign then the definition text. By convention, symbol names use uppercase letters. The definition consists of all characters from the equals sign to the line end. If a definition contains white space, enclose it in quotes so that it is treated as one string when expanded. Symbol scope ends with the defining file unless it is exported. -

-NIC=eth0
-MAC=00:B0:52:00:12:34
-MFG="Intergalactic Software Pirates, Inc."
-...
-echo NIC is ${NIC} MAC is ${MAC} MFG is ${MFG}
-

- To reference a symbol, precede the variable name with a dollar sign. Atheros scripts go one step further by enclosing the symbol name is braces. This improves readability and simplifies global search-and-replace operations. -

diff --git a/docbook/ch06s03.html b/docbook/ch06s03.html deleted file mode 100644 index ebe2569a..00000000 --- a/docbook/ch06s03.html +++ /dev/null @@ -1,82 +0,0 @@ -Host Independence

- Host Independence -

- Different hosts may use interfaces for different purposes. For example, one host might use eth0 for local network communications and eth1 for powerline communications. Another host might do the opposite. A portability problem is created when scripts use the literal interface names on the command line, as illustrated below: -

-#!/bin/bash
-int6k -i eth1 -r
-int6k -i eth2 -r
-

- The commands shown above will work on a host where eth1 and eth2 are used for powerline communications but will not work on another host where eth1 or eth2 are configured differently. Editing scripts can become a chore when they contain many interface references. One solution is the consistent use of symbols. For example, the following example provides some degree of portability. -

-#!/bin/bash
-
-NIC1=eth1
-NIC2=eth2
-
-int6k -i ${NIC1} -r
-int6k -i ${NIC2} -r
-

- The commands shown above are an improvment because symbols NIC1 and NIC2 can be edited once; however, if you frequently move many scripts from one host to another then each script must be changed. That can also become a chore. A better solution is to define the symbols NIC1 and NIC2 once in a single file and then include the definitions in scripts that need them. For example, if we created file hardware.sh like so ... -

-#!/bin/bash 
-# file: scripts/hardware.sh
-
-NIC1=eth1
-NIC2=eth2
-

- ... then we could include it in one or more other scripts, like so ... -

-. ../scripts/hardware.sh
-
-int6k -i ${NIC1} -r
-int6k -i ${NIC2} -r
-

- On Linux, the . command causes the named file to be included in-line as though it were part of the including file. This elminates the need to export symbol definitions. A full discussion of Linux environment variable scope can be found on the internet. The point is that each host should have it's own definitions files stored in a common folder so that other scripts can include them and reference them in a consistent manner. -

- Atheros example scripts include two definitions files: hardware.sh and firmware.sh. File hardware.sh defines hardware related symbols as shown below and file firmware.sh defines firmware and configuration filenames. They reside in a scripts folder and relative path is used to access them. This has proven to work well in most situations. -

Example 6.1.  - hardware.sh -

- You should create a hardware.sh file in a common folder on each host where you want to execute toolkit scripts. In this way, a script created on one host can be executed on another host without modification. -

-#!/bin/bash
-# file: scripts/hardware.sh
-
-NIC1=eth1
-NIC2=eth2
-MAC1=00:50:04:A5:D9:5A
-MAC2=00:01:03:2B:03:67
-
-DUT=eth1
-

- File hardware.sh assigns specific values to symbols that are used in many of the scripts found in the scripts folder. Some Atheros scripts uses all these symbols and some do not. By convention, NIC1 and NIC2 name the Ethernet interfaces connected to a Golden Node and Device Under Test. MAC1 and MAC2 are the hardware addresses of NIC1 and NIC2, respectively. These symbols can be referenced in scripts with references like ${NIC1} or ${MAC1}. Of course, you could define other symbols here, as well. See the script under Device Upgrade as one example of how file hardware.sh can be included in another script. -

- Some scripts, such as flash.sh and upgrade.sh, only operate on one device and do not need to define both NIC1 and NIC2. By convention, these scripts reference interface DUT only. -


Example 6.2.  - firmware.sh -

- You should create a firmware.sh file in a common folder on each host where you want to execute toolkit scripts. In this way, a script created on one host can be executed on another host without modification. -

-#!/bin/bash
-# file: scripts/firmware.sh
-
-CFG=sdram16mb.cfg
-CFG=sdram64mb.cfg
-
-PIB=v3.3.0.pib
-NVM=v3.3.0-0-5-A-FINAL.nvm
-NVM=v3.3.0-0-5-B-FINAL.nvm
-

- File firmware.sh assigns specific filenames to symbols that are used in some of the scripts found in the scripts folder. Some Atheros scripts use all of these symbols and some do not. By convention, CFG defines the SDRAM configuration file used to initialize an INT6000™ or INT6300™ device, PIB defines the Parameter Information Block file to be used and NVM defines the firmware image file to be used. -

- This file is especially useful when working with a specific version of firmware. If there are multiple definitions for a symbol, the last definition is the one that takes effect. At Atheros, this file often contains dozens of definitions and we merely move or copy the ones we want to the end of the file. Our custom scripts then operate on the same configuration, parameter and firmware files until we reorder the definitions in firmware.sh. -


diff --git a/docbook/ch06s04.html b/docbook/ch06s04.html deleted file mode 100644 index 52cbdc52..00000000 --- a/docbook/ch06s04.html +++ /dev/null @@ -1,21 +0,0 @@ -Checking Device Connection

- Checking Device Connection -

- You may want to confirm that a device is actually connected to an Etherenet interface before attempting to run a script. Program int6kwait can be used for this purpose. We often print a brief message to alert the operator that there is no connection or the device has no power applied. -

-int6kwait -xqsi ${NIC1}
-if [ ${?} != 0 ]; then
-        echo "Device is not connected"
-        exit 1
-fi
-

- In the above example, we invoke int6kwait to poll the device connected to a specific Ethernet interface (-i) until the firmware starts (-s). The program will return a non-zero return value (-x) if the device does not start within a given period of time. By default, the timeout period is 60 seconds. On return, we check the return code then print an error message and exit the script on timeout. Symbol NIC1 must be defined earlier in the script, possibly in hardware.sh. -

diff --git a/docbook/ch06s05.html b/docbook/ch06s05.html deleted file mode 100644 index b8659a0e..00000000 --- a/docbook/ch06s05.html +++ /dev/null @@ -1,18 +0,0 @@ -Random Device Identity

- Random Device Identity -

- Some Atheros scripts need random MAC, DAK or NMK strings as arguments to Toolkit programs. Program rkey can be used for this purpose. We demonstrate one way to define symbols here and demonstrate how to use symbols later on. -

-DAK=$(rkey secret.key -D)
-NMK=$(rkey secret.key -M)
-

- The first statement, above, uses program rkey to read file secret.key and compute a random DAK (-D). The ouput string is assigned to symbol DAK. The second statement uses program rkey to read the file secret.key and compute a random NMK (-M). The output is assigned to symbol NMK. -

diff --git a/docbook/ch06s06.html b/docbook/ch06s06.html deleted file mode 100644 index 06f1bc33..00000000 --- a/docbook/ch06s06.html +++ /dev/null @@ -1,19 +0,0 @@ -Actual Device Identity

- Actual Device Identity -

- Some scripts need actual MAC, DAK or NMK strings as arguments to Toolkit programs. Program int6kid can be used for this purpose. We demonstrate one way to define symbols here and demonstrate how to use them later on. - -

-DAK=$(int6kid -Di ${NIC1})
-NMK=$(int6kid -Mi ${NIC1})
-

- The first statement, above, uses program int6kid to echo the DAK (-D) from the device connected to Ethernet interface NIC1 and assign the output to symbol DAK. The second statement uses program int6kid to echo the NMK (-M) of the device connected to Ethernet interface NIC1 and assign the output to symbol NMK. -

diff --git a/docbook/ch06s07.html b/docbook/ch06s07.html deleted file mode 100644 index 5a4cb036..00000000 --- a/docbook/ch06s07.html +++ /dev/null @@ -1,22 +0,0 @@ -Editing a PIB

- Editing a PIB -

- Many scripts place a device in a known state by editing a PIB file and writing it to the device before starting an operation. Program modpib can be used for this purpose. It is safe because only certain values can be changed and, where necessary, certain cross-parameter computations are performed automatically. -

-modpib -C 0 -M next -D ${DAK} -N ${NMK} ${PIB}
-if [ ${?} != 0 ]; then
-        exit 1
-fi
-

- The example above uses modpib to set the CCo state (-C), the MAC address (-M), the DAK (-D) and the NMK (-N) in the defined PIB file. Argument 0 means CCo Auto and argument next increments the MAC address. The DAK and NMK were defined earlier in the script. Symbol PIB must be defined earlier in the script, possibly in firmware.sh. -

- Program modpib will print an error message and return a non-zero value on error. We test the return value and exit the script on error to avoid subsequent errors. One could, of course, suppress normal output (-q) and print your own error message using the Linux echo utility. -

diff --git a/docbook/ch06s08.html b/docbook/ch06s08.html deleted file mode 100644 index 2dbeb6e0..00000000 --- a/docbook/ch06s08.html +++ /dev/null @@ -1,35 +0,0 @@ -Initialize a Device

- Initialize a Device -

- Initializing a device involves downloading memory configuration parameters, runtime firmware and runtime parameters into SDRAM and then starting the runtime firmware to make the device fully functional. Program int6kf can be used for this purpose when the INT6000 Softloader or INT6300 Bootloader is running. Additionally, program int6kf can be used to flash blank or corrupted NVRAM once runtime firmware has started. -

- Device initialization is only necessary when a device that has no NVRAM or has corrupted NVRAM or has a Softloader stored in NVRAM. It is only possible when either the INT6000 Softloader or INT6300 Bootloader is running. See The Boot Process for detailed information. -

-int6kf -i ${NIC1} -C ${CFG} -P ${PIB} -N ${NVM}
-if [ ${?} != 0 ]; then
-        exit 1
-fi
-

- The example above uses program int6kf to download an SDRAM configuration file (-C), PIB file (-P) and NVM file (-N) then start firmware execution. Symbols NIC1, CFG, PIB and NVM must be defined earlier in the script, perhaps in files hardware.sh and firmware.sh. -

- Program int6kf returns a non-zero value on error. We can check the return code and exit the script on error to avoid subsequent errors. We could, of course, suppress normal output (-q) and print our own error message using the Linux echo utility. -

- In some cases, we may want to flash a blank or corrupted NVRAM after the runtime firmware has started. We could use program int6k for this purpose but program int6kf can be used, as well. Essentially, it initializes the device (as above) then downloads the PIB and NVM files again and flashes them into NVRAM. -

-int6kf -i ${NIC1} -C ${CFG} -P ${PIB} -N ${NVM} -FF
-if [ ${?} != 0 ]; then
-        exit 1
-fi
-

- The example above initializes a device with an SDRAM configuration file (-C), PIB file (-P) and NVM file (-N) as before. Once the runtime firmware has started, the PIB and NVM files are downloaded again and flashed (-FF) into NVRAM. -

- The force-flash option (-FF) is needed in this case because runtime firmware that has been written directly to SDRAM and started by the local host assumes there is no NVRAM present to flash or there might be Softloader firmware stored in NVRAM that must be protected from accidental flashing. Runtime firmware that has been read from NVRAM need not make that assumption. -

diff --git a/docbook/ch06s09.html b/docbook/ch06s09.html deleted file mode 100644 index a143a886..00000000 --- a/docbook/ch06s09.html +++ /dev/null @@ -1,34 +0,0 @@ -Update a Device

- Update a Device -

- In some cases we want to replace the runtime firmware or runtime parameters stored in NVRAM. Program int6k can be used for this purpose when runtime firmware is running. -

- A device update may be necessary when new runtime firmware or new runtime parameters or both must be programmed into NVRAM. It is only possible when NVRAM is present and the runtime firmware is running. -

-int6k -i ${NIC1} -P ${PIB} -N ${NVM} -F
-if [ ${?} != 0 ]; then
-        exit 1
-fi
-

- The example above uses int6k to download a PIB file (-P) and NVM file (-N) then flash NVRAM (-F). Symbol NIC1 must be defined earlier in the script, perhaps in file hardware.sh. Symbols PIB and NVM must also be defined earlier in the script, perhaps in file firmware.sh. -

- Program int6k returns a non-zero value on error. We can check the return code and exit the script on error to avoid subsequent errors. We could, of course, suppress normal output (-q) and print our own error message using the Linux echo utility. - -

- In some cases, you may want to preserve the current firmware on a device and update only the PIB. Program int6k can be used for this purpose, as well. -

-int6k -i ${NIC1} -P ${PIB} -C 2
-if [ ${?} != 0 ]; then
-        exit 1
-fi
-

- The example above downloads a PIB file (-P) and commits (-C) the PIB only to NVRAM. There are a variety of device flash scenarios and each requires some varation on one of the examples shown here. -

diff --git a/docbook/ch06s10.html b/docbook/ch06s10.html deleted file mode 100644 index 6bff1f3e..00000000 --- a/docbook/ch06s10.html +++ /dev/null @@ -1,24 +0,0 @@ -Generating Powerline Traffic

- Generating Powerline Traffic -

- Once two devices associate, you must send data across the powerline in both direction so that each device can compute a TX and RX PHY rate. One method is to use the efsu program that comes with the Toolkit. The program is designed to send free-form Ethernet frames for test and debug purposes but we can also use it to send lots of junk frames in either direction. -

-FRAME=frame.hex
-COUNT=1000
-efsu -i ${NIC1} -hd ${MAC2} ${FRAME} -l ${COUNT}
-efsu -i ${NIC2} -hd ${MAC1} ${FRAME} -l ${COUNT}
-efsu -i ${NIC1} -hd ${MAC2} ${FRAME} -l ${COUNT}
-efsu -i ${NIC2} -hd ${MAC1} ${FRAME} -l ${COUNT}
-

- The example above uses efsu to send the generic Ethernet frame stored in file frame.hex between the two Ethernet interfaces NIC1 and NIC2 (-i). In this example, NIC1 and NIC2 are both installed in the host. We have efsu insert the host source address in the OSA field (-h) and destination address in the ODA field (-d) of each frame as it is sent. The entire operation sends the same frame 1000 times (-l) in each direction, twice. -

- Other methods of generating bi-directional traffic can be used but this method is simple, needs nothing other than the toolkit programs and permits easy synchronization. Program efsu is designed to send custom Etherenet frames, not measure or control data rates, but the toolkit includes open source program ttcp which is designed to measure and control data rates. -

diff --git a/docbook/ch06s11.html b/docbook/ch06s11.html deleted file mode 100644 index b0cf84ae..00000000 --- a/docbook/ch06s11.html +++ /dev/null @@ -1,21 +0,0 @@ -Reading PHY Rates

- Reading PHY Rates -

- Atheros powerline devices automatically compute their average PHY rate which can be read and displayed. Average PHY rate is an indication of performance and can be affected by attenuation and ambient powerline noise. Program int6krate is designed to report the average PHY rate. -

-int6krate -xni ${NIC2}
-if [ ${?} != 0 ]; then
-        echo "Network did not converge"
-        exit 1
-fi
-

- The example above uses int6krate to read and display the average TX and RX PHY rates for the device connected to Ethernet interface NIC2. Option -n requests PHY rates. Option -x exits with a status that can be tested in the subsequent if statement. Output appears in fix-width columns to facilitate post-processing. Other ways to obtain PHY rates are int6k -m and int6kstat -t. -

diff --git a/docbook/ch06s12.html b/docbook/ch06s12.html deleted file mode 100644 index 112dc81b..00000000 --- a/docbook/ch06s12.html +++ /dev/null @@ -1,25 +0,0 @@ -User Interaction

- User Interaction -

- Scripts should be designed, whenever possible, to perform correctly without user intervention but there are cases where user intervention is appropriate. The following example illustrates one bash shell method that only requires user input when default values are wrong. -

-MAC=00:B0:52:00:BA:BE
-echo -n "MAC Address [${MAC}]: "; read
-if [ ! -z ${REPLY} ]; then
-        MAC="${REPLY}"
-fi
-

- First, we define symbol MAC with a default value. The Linux echo utility prints a prompt on the console that includes the symbol value. The trailing newline is suppressed (-n) so that text can be typed immediately after the prompt. The echo command is terminated with semicolon (;) so that another command can be included on the same line. The shell read statement waits for the user to type something and press the enter key. The shell will assign the input to shell variable REPLY. The value of REPLY is evaluated and used to redefine the symbol only if the input was a non-zero length string. -

-MAC Address [00:B0:52:00:BA:BE]: 
-

- The user will see something like this. If the value is correct the user can press the enter key to generate a zero length string. Otherwise, the user can type the correct value before pressing the enter key. -

diff --git a/docbook/ch07.html b/docbook/ch07.html deleted file mode 100644 index ac18bb5f..00000000 --- a/docbook/ch07.html +++ /dev/null @@ -1,235 +0,0 @@ -Chapter 7.  Support Function Reference

Chapter 7.  - Support Function Reference -

Table of Contents

- Introduction -
- Command Line Functions -
- assist -
- basespec -
- bytespec -
- checkfilename -
- dataspec -
- error -
- expect -
- getoptv -
- ipv4spec -
- ipv6spec -
- lookup -
- putoptv -
- synonym -
- uintspec -
- version -
- Ethernet Functions -
- channel -
- closechannel -
- openchannel -
- readpacket -
- sendpacket -
- Network Functions -
- NetworkBridges -
- NetworkDevices -
- Generic Functions -
- binout -
- checksum32 -
- checksum_32 -
- chrout -
- decout -
- endian -
- fdchecksum32 -
- fdchecksum_32 -
- filepart -
- hexdecode -
- hexdump -
- hexencode -
- hexin -
- hexout -
- hexstring -
- hexview -
- memdecr -
- memincr -
- memout -
- memswap -
- strdecr -
- strfbits -
- strincr -
- todigit -
- typename -
- Message Debug Functions -
- MMECode -
- MMEMode -
- MMEName -
- MMEPeek -
- Key Generation Functions -
- MACPasswords -
- HPAVKeyDAK -
- HPAVKeyNMK -
- HPAVKeyNID -
- HPAVKeyOut -
- SHA256Block -
- SHA256Fetch -
- SHA256Ident -
- SHA256Match -
- SHA256Print -
- SHA256Reset -
- SHA256Write -
- XML Editing Functions -
- xmledit -
- xmlfree -
- xmlnode -
- xmlopen -
- xmlscan -
- xmlschema -
- xmltree -
- Download Functions -
- WriteExecuteApplet -
- WriteExecuteApplet1 -
- WriteExecuteApplet2 -
- Procrastination Functions -
- WaitForAssoc -
- WaitForAssoc1 -
- WaitForAssoc2 -
- WaitForReset -
- WaitForStart -
- Traffic Functions -
- CrossTraffic1 -
- CrossTraffic2 -
- LocalTraffic1 -
- LocalTraffic2 -
- NetworkTraffic1 -
- NetworkTraffic2 -
- Traffic1 -
- Traffic2 -
- SLAC Functions and Variables -
- The Session Variable -
- pev_cm_slac_param -
- evse_cm_slac_param -
- pev_cm_start_atten_char -
- evse_cm_start_atten_char -
- pev_cm_mnbc_sound -
- evse_cm_mnbc_sound -
- evse_cm_atten_char -
- pev_cm_atten_char -
- pev_cm_slac_match -
- evse_cm_slac_match -
- evse_cm_set_key -
- pev_cm_set_key -

- Introduction -

- The Open Powerline Toolkit includes many general-purpose or multi-purpose functions that may appear in other Qualcomm Atheros applications or in third party packages. Consequently, we describe them separately and store them in separate folders withing the toolkit. -

diff --git a/docbook/ch07s02.html b/docbook/ch07s02.html deleted file mode 100644 index 8eeb1dc8..00000000 --- a/docbook/ch07s02.html +++ /dev/null @@ -1,87 +0,0 @@ -Command Line Functions

- Command Line Functions -

- Command line functions are used by all toolkit programs. They are generic functions but we include them in a special section because they collectively co-operate to convert command line options and arguments into appropriate binary representations and provide concise but meaningful feedback when that is not possible. -

- assist -

void assist(name,  
 type,  
 list,  
 size,  
 fp); 
char const * name;
char const * type;
const struct _code_ list [];
size_t size;
FILE * fp;
 

- Show why a symbolic name was rejected by function lookup or similar functions. Argument type contains a title for the class of names stored in list. This function prints an error message on file stream fp showing the program name, the type string, the symbolic name and all names stored in the list. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in assist.c. Function expect is used to print list names. -

- basespec -

uint64_t basespec(string,  
 base,  
 size); 
char const * string;
unsigned base;
unsigned size;
 

- Return the unsigned integer equivalent of a numeric string. Print an error message on stderr and exit the program with status 1 if a syntax error occurs or the result exceeds the capacity of the requested integer size in bytes. If base is 0, numeric values may be expressed in decimal, hexadecimal or binary notation where hexadecimal values start with "0x" and binary values start with "0b". When base is non-zero, the notation in string must conform to the corresponding number base rules. Applications should cast the return value to the appropriate data type prevent loss-of-data compiler warnings. This function is typically used to convert and length-check integers entered as command line arguments. The function is declared in number.h and defined in basespec.c. -

- Like function uintspec, this function both converts and range checks numeric string values, but the minimum and maximum value are implicit in the size of the integer. The minimum value is always 0 and the maximum value can be computed by ((1 << size << 3) - 1). -

- bytespec -

void bytespec(string,  
 memory,  
 extent); 
char const * string;
void * memory;
size_t extent;
 

- Encode a memory region with the binary equivalent of a fixed-length hexadecimal string. Print an error message on stderr and exit the program with status 1 if a syntax error occurs or the number of octets does not equal extent. Hexadecimal octets may be separated by colons for readability but colons are not required. Empty octets are illegal. The function is declared in memory.h and defined in bytespec.c. -

- This function is typically used to enter fixed-length data, like hardware addresses and encryption keys, on the command line. -

- checkfilename -

bool checkfilename(filename); 
char const * filename;
 

- Return logical true if the filename argument contains only letters, digits, slashes, periods, underscores and hyphens. This function can be used to detect cases where a user accidentally entered an Ethernet address in place of a filename on the command line. Ethernet address strings are, as it happens, also valid filenames. The function is declared in files.h and defined in checkfilename.c. -

- dataspec -

void dataspec(string,  
 memory,  
 extent); 
char const * string;
void * memory;
size_t extent;
 

- Encode a memory region with the binary equivalent of a variable-length hexadecimal string. Print an error message on stderr and exit the program with the status 1 if a syntax error occurs or the number of octets exceeds extent. The number of octets may, however, be less than extent. Unlike function bytespec, hexadecimal octets may not be separated by colons. This function is typically used to enter variable-length data from the command line. The function is declared in memory.h and defined in dataspec.c. -

- error -

void error(exitcode,  
 number,  
 format,  
 ...); 
intexitcode;
errno_t number;
char const * format;
...;
 

- This function works like printf except that printed messages appear on stderr and are prefixed with the program name and error information. If argument errno is non-zero then messages are prefixed with the system error description. If argument exitcode is non-zero then function error exits the program with value exitcode after printing the message and does not return to the caller. The function is declared in error.h and defined in error.c. -

- This function is used to print informative error messages on the console and prevent program execution from proceeding when input is invalid or some error condition exists. -

- expect -

void expect(list,  
 size,  
 fp); 
const struct _code_ list [];
size_t size;
FILE * fp;
 

- Display all names in argument list on file stream fp. This function is called by runction assist to print the list of symbolic names but other function may have use for it. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in expect.c. -

- getoptv -

int getoptv(argc,  
 argv,  
 optv); 
int argc;
char const * argv [];
char const * optv [];
 

- A custom version of the POSIX function getopt. It supports standard global variables optind, opterr, optopt and optarg and the non-standard variable optmin. It extracts the program name from argv[0] and sets global string pointer program_name for use by functions alert, error and others. Options -? and --help both display program information on stdout. Options -! and --version both display program version information on stdout. String vector optv includes both the standard argument optstring and usage text found in many programs. The function is declared in getoptv.h and defined in getoptv.c. -

- ipv4spec -

size_t ipv4spec(string,  
 memory); 
char const * string;
void * memory;
 

- Encode a 4-byte memory region with an IPv4 dotted-decimal string and return the number of bytes encoded. Terminate the program with an error message and exitcode of 1 on conversion error. The value returned by this function is always 4 and memory is always encoded in network byte order. This function is typically used to convert IPv4 strings entered as command line arguments. The function is declared in memory.h and defined in ipv4spec.c. -

- Dotted-decimal format consists of decimal values in the range 0 through 255. Each value represents one octet or 8-bit value. IPv4 addresses require 4 such values separated by one decimal point. This function permits empty octets and leading zeros within octets. For example, ... is equivalent to 0.0.0.0 and 127.0.000.001 is equivalent to 127.0.0.1. The second example will encode memory as follows { 0x7F, 0x00, 0x00, 0x01 } which is in network byte order, or big endian. -

- ipv6spec -

size_t ipv6spec(string,  
 memory); 
char const * string;
void * memory;
 

- Encode a 16-byte memory region with an IPv6 colon-separated hexadecimal quartet string and return the number of bytes encoded. Terminate the program with an error message and exitcode of 1 on conversion error. The value returned by this function is always 16 and memory is always encoded in network byte order. This function is typically used to convert IPv6 strings entered as command line arguments. The function is declared in memory.h and defined in ipv6spec.c. -

- Colon-separated hexadecimal quartet notation consists of hexadecimal values in the range 0 through FFFF. Each value represents a quartet or a 32-bit value. IPv6 addresses require 8 quartets separated by one colon. By convention, an empty quartet expands with enough zeros to right-justify the remainder of the address. This function permits multiple empty quartets and leading zeros within quartets. When multiple empty quartets appear, only the right-most occurance expands to zeros. For example, AA12::BB34::CC56::DD78 is equivalent to AA12:0000:BB34:0000:CC56:0000:0000:DD78 because only the right-most empty field expands. This will encode memory as follows { 0xAA, 0x12, 0x00, 0x00, 0xBB, 0x34, 0x00, 0x00, 0xCC, 0x56, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x78 } which is in network byte order, or big-endian. -

- lookup -

signed lookup(name,  
 list,  
 size); 
char const * name;
const struct _code_ list [];
size_t size;
 

- Lookup a symbolic name in a list and return an associated integer or -1 if the name does not appear in the list. A typical use is the translation of symbolic command line arguments to integer codes. For example, some Toolkit programs assign symbolic names to field codes so that users can enter names instead of numbers. This approach becomes more useful as the number of permitted codes increases. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in lookup.c. -

- This function offers two benefits: 1) multiple symbols can translate to one code and 2) names can be changed or new names added without affecting program logic. This function is similar to but different from function synonym which returns a character string instead of an integer. -

- putoptv -

void putoptv(optv); 
char const * optv [];
 

- Print program information on stdout. Program information is stored in string vector optv. String indexes are defined in file putoptv.h. String optv[0] is the POSIX standard argument optstring. This function is called by function getoptv whenever option -? or --help is detected on the command line. There is virtually no need to call this function directly. The function is declared in putoptv.h and defined in putoptv.c. -

- synonym -

char const * synonym(string,  
 list,  
 size); 
char const * string;
const struct _term_ list [];
size_t size;
 

- Lookup a symbolic name in a list and return an associated string or the original string if the name does not appear in the list. A typical use is the translation of symbolic command line arguments to their equivalent numeric strings before encoding them. For example, many Toolkit programs convert the command line argument local to 00:B0:52:00:00:01 before encoding the device MAC address. The _term_ structure is declared in types.h. The function is declared in symbol.h and defined in synonym.c. -

- This function is similar to but different from function lookup which returns an integer instead of a character string. -

- uintspec -

uint64_t uintspec(string,  
 minimum,  
 maximum); 
char const * string;
uint64_t minimum;
uint64_t maximum;
 

- Return the unsigned integer equivalent of a numeric string. Print an error message on stderr and exit the program with the value 1 when a syntax error occurs or the result exceeds the specified minimum or maximum value. Numeric values may be expressed in decimal, hexadecimal or binary notation where hexadecimal values start with "0x" and binary values start with "0b". Applications should cast the return value to the appropriate data type to avoid loss-of-data warnings on some compilers. This function is typically used to convert and range-check integer values entered as command-line arguments. The function is declared in number.h and defined in uintspec.c. -

- version -

void version(); 
 

- Print package and program version information on stdout. This function is called by function getoptv whenever option -! or --version is detected on the command line. There is no need to call this function directly. The function is declared in version.h and defined in version.c. Constants PACKAGE and VERSION define the information that is displayed. They are defined in file version.h and must be maintained by developers. -

diff --git a/docbook/ch07s03.html b/docbook/ch07s03.html deleted file mode 100644 index daa570c6..00000000 --- a/docbook/ch07s03.html +++ /dev/null @@ -1,88 +0,0 @@ -Ethernet Functions

- Ethernet Functions -

- The Open Powerline Toolkit supports raw Ethernet I/O on several popular operating systems, including Linux™, Mac OS X™ and Microsoft Windows™. Other operating systems will probably be added over time. These functions are found in the ether folder. -

- Each operating system has a different raw Ethernet interface and so some abstraction was needed to support the toolkit for all environments. Our solution was the channel which is implemented like a FILE pointer but is used like a file descriptor. All toolkit programs, with a few exceptions, perform raw Ethernet I/O by opening a channel, reading and writing to it and then closing it. -

- channel -

- The channel structure contains enough information to perform raw Ethernet I/O in several common runtime environments; however, portions of the structure vary depending on the environment. These differences are appled by compile time constants that include required structure members and exclude others. The common structure members are identified and described below. The others elements are not discussed because they may change. -

-typedef struct __packed channel
-{
-        signed fd;
-        signed ifindex;
-        char const * ifname;
-        uint8_t peer [ETHER_ADDR_LEN];
-        uint8_t host [ETHER_ADDR_LEN];
-        uint16_t type;
-
-	 ... <operating system dependent data> ...
-
-        signed timeout;
-        flag_t flags;
-} CHANNEL;
-
- .fd -

- Socket file descriptor. -

- .ifindex -

- Ethernet device index. The index only applies when the toolkit is compiled for LibPcap or WinPcap. This value is the same as that returned in the .ifr_ifindex member of the ifreq structure available on most operating systems. -

- .ifname -

- The interface name. On Linux, ethernet names are typically eth0, eth1 and so on. On Mac OS X, interface names are en0, en1 and so on. This string is the same as that returned by the ifr_ifname member of the ifreq structure available on most operating systems. -

- .peer -

- The Ethernet hardware address of some remote device. It is used to encode the ODA field of outgoing Ethernet frames and format some console messages. It is initialized to the Atheros Local Management Address, 00:B0:52:00:00:01 for HomePlug AV applications. Application programs can, and often do, replace this value at runtime. -

- .host -

- The Ethernet hardware address of the host computer. It is used to encode the OSA field of outgoing Ethernet frames and format some console messages. This address is initialized to the hardware address assigned to the interface by the host operating system. The value should not change. -

- .type -

- The Ethernet type/length field. It is used to encode the MTYPE field of outgoing Ethernet frames. The values is initialized to 0x88E1 for HomePlug AV application and 0x887B for HomePlug 1.0 application. The value should not change. -

- .timeout -

- A time interval. On Linux™ and Mac OS X™, it is the maximum time that the application will wait for a device to respond when a response is expected. With LibPcap™ and WinPcap™ it the mininum time the application will wait. It is initialized to 50 milliseconds which is a reasonable compromise but most toolkit programs allow the user to change this value. -

- .flags -

- A bitmap where each bit enables a special behavior during channel open or close or packet read or write. Of general interest is the CHANNEL_VERBOSE bit which prints outgoing and incoming frames on stderr in hexadecimal dump format. The verbose feature is implemented in for all toolkit programs that perform raw Ethernet I/O and is helpful when debugging device behavior. -

- Since toolkit applications typically communicate with one powerline device at a time, this structure is statically initialized in a stand-alone module that is linked into each application. It is possible to dynamically initialize it, if needed. The structure is declared in channel.h and statically defined in channel.c. -

- closechannel -

signed closechannel(channel); 
struct channel * channel;
 

- Close the Ethernet socket associated with a channel and free associated memory and data structures. Return 0 on success. Return -1 on failure. This function is declared in channel.h and defined in closechannel.c. -

- openchannel -

signed openchannel(channel,  
 protocol); 
struct channel * channel;
uint16_t protocol;
 

- Open an Ethernet socket that supports the specified protocol and associate it with the interface referenced by the channel structure .name member. Initialize the interface as needed. The protocol effectively filters incoming frames for the application. -

- Interface initialization differs significantly from environment to environment. The socket descriptor is stored in the channel structure .fd member and the interface hardware address is stored in the channel structure .host member. Return 0 on success. Terminate the program with an error message on failure. This function is declared in channel.h and defined in openchannel.c. -

- readpacket -

signed readpacket(channel,  
 packet,  
 length); 
struct channel * channel;
void * packet;
signed length;
 

- Read one Ethernet frame from the specified channel. The frame is written into memory starting at address packet and is truncated to the specified length, if necessary. Return the actual number of bytes read on success. Return 0 on timeout. Return -1 on network error. This function behaves like the standard library read function. The target memory region remains unchanged on timeout or error. This function is declared in channel.h and defined in readpacket.c. -

- On systems using Berkeley Packet Filters, such as MacOS X, the ODA field is automatically replaced on transmission to prevent Ethernet address spoofing. This may not be true on other systems but the practice is becoming more common. -

- sendpacket -

signed sendpacket(channel,  
 packet,  
 length); 
struct channel * channel;
void * packet;
signed length;
 

- Write one Ethernet frame to the specified channel. The frame is read from memory starting at address packet and ending at the specified length. Return the actual number of bytes sent on success. Return 0 on timeout. Return -1 on network error. The frame should be properly formatted as an ethernet frame and must be at least 60 bytes long or it will not be sent. This function behaves like the standard library write function. The source memory region is not modified. This function is declared in channel.h and defined in sendpacket.c. -

diff --git a/docbook/ch07s04.html b/docbook/ch07s04.html deleted file mode 100644 index 6ba4256e..00000000 --- a/docbook/ch07s04.html +++ /dev/null @@ -1,53 +0,0 @@ -Network Functions

- Network Functions -

- NetworkBridges -

size_t NetworkBridges(channel,  
 memory,  
 extent); 
struct channel * channel;
void * memory;
size_t extent;
 

- Search a channel for local powerline devices (bridges) and store their Ethernet hardware in consecutive memory locations. The memory extent is specified in bytes. The number of devices found is returned as the function value, provided enough space is available to store all addressed. Unlike function NetworkDevices, the channel peer address is ignored. -

- We call local devices bridges because each serves as an Ethernet-to-Powerline bridge for the local host. -

Example 7.1.  - Enumerating Local Devices -

-#include <net/if.h>
-#include "../ether/channel.h"
-extern struct channel channel; 
-uint8_t address [255][ETHER_ADDR_LEN]; 
-size_t bridges = NetworkBridges (&channel, address, sizeof (address));
-size_t bridge = 0; 
-while (bridge < bridges)
-{
-   binout (address [bridge], ETHER_ADDR_LEN, ':', stdout);
-   putc ('\n', stdout);  
-} 
-

- The code segment shown above illustrates how to use function NetworkBridges to identify all local devices. We do not need to set the channel peer because NetworkBridges always uses the Atheros localcast address. Array address is declared with two dimensions to simplify access to individual addresses on return. -


- NetworkDevices -

size_t NetworkDevices(channel,  
 memory,  
 extent); 
struct channel * channel;
void * memory;
size_t extent;
 

- Query a powerline device, specified by channel, for neighboring network devices and store their Ethernet addresses in consecutive memory locations. The memory extent is specified in bytes. The number of devices found is returned as the function value, provided sufficient space is available to store all addresses. Unlike function NetworkBridges, the channel peer address is identifies the device to be queried. -

Example 7.2.  - Enumerating Network Devices -

-#include <net/if.h>
-#include "../ether/channel.h"
-extern struct channel channel; 
-uint8_t address [255][ETHER_ADDR_LEN]; 
-size_t devices = NetworkDevices (&channel, address, sizeof (address));
-size_t device = 0; 
-while (device < devices)
-{
-   binout (address [device], ETHER_ADDR_LEN, ':', stdout);
-   putc ('\n';, stdout);  
-} 
-

- The code segment shown above illustrates how to use function NetworkDevices to identify all devices on a specific network. You must set the channel peer address before calling NetworkDevices. Array address is declared with two dimensions to simplify access to individual addresses on return. If the channel peer address is not the Ethernet broadcast or Atheros localcast address then the first address returned will be the channel peer address. -


diff --git a/docbook/ch07s05.html b/docbook/ch07s05.html deleted file mode 100644 index 87857853..00000000 --- a/docbook/ch07s05.html +++ /dev/null @@ -1,122 +0,0 @@ -Generic Functions

- Generic Functions -

- The functions in this chapter are generic and may have application beyond the Open Powerline Toolkit. In some cases, these functions appear in other Atheros or Open Source software packages. In a few cases, the Toolkit may include complementary or supplementary support functions but only use one or two of them. For example, functions memincr and memdecr are both included but memdecr is not used. -

- binout -

void binout(memory,  
 extent,  
 c,  
 e,  
 fp); 
void const * memory;
size_t extent;
char c;
char e;
FILE * fp;
 

- Print a memory region as a series of binary octets separated by character c and terminated by character e. Normally, character c will be BIN_EXTENDER, defined in file number.h, but it could be any character value. Normally, character e will be a space or newline, but it could be any character value. A typical use might be to print a register in readable format. For example, specifying c as '-', e as ';' and extent as 4 would produce output looking something like "10101010-1111111-00000000-11001100;" where each octet is expressed as a binary integer. The function is declared in memory.h and defined in binout.c. -

- checksum32 -

unint32_t checksum32(memory,  
 extent,  
 checksum); 
const uint32_t memory [];
size_t extent;
uint32_t checksum;
 

- Return the 32 bit checksum of a memory region. The checksum is the one's complement of the XOR of all 32 bit words in the region. Argument extent is the region extent in 32 bit words. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate PIB and NVM files or compute new checksums when these files are created or modified. The function is declared in memory.h and defined in checksum32.c. -

- This function is similar to checksum_32 but is used exclusively by API functions. It may be deprecated at some point in the future. -

- checksum_32 -

unint32_t checksum_32(memory,  
 extent,  
 checksum); 
void const * memory;
size_t extent;
uint32_t checksum;
 

- Return the 32 bit checksum of a memory region. The checksum is the one's complement of the XOR of all 32 bit words in the region. The region extent is specified in bytes but it will be rounded down to the nearest multiple of 4 bytes. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate PIB and NVM files or compute new checksums when these files are created or modified. The function is declared in memory.h and defined in checksum_32.c. -

- This function is similar to function checksum32 however there is no need to cast memory to uint32_t and there is no need to round extent down to a multiple of 4 bytes before calling the function because both operations are performed internally. Also, there is no unecessary endian manipulation of the checksum. It is the prefered method of computing a checksum. -

- chrout -

void chrout(memory,  
 extent,  
 c,  
 e,  
 fp); 
void const * memory;
size_t extent;
char c;
char e;
FILE * fp;
 

- Print a memory region as a string of printable ASCII characters terminated by character e. Character c is printed in place of non-printable characters. The string is terminated by character e. Normally, character c is '.' but it could be any character value. Normally, character e is space or newline but it could be any charcter value. A typical use might be to print a memory region that may (or may not) contain an HFID or other printable text. The function is declared in memory.h and defined in chrout.c. -

- decout -

void decout(memory,  
 extent,  
 c,  
 e,  
 fp); 
void const * memory;
size_t extent;
char c;
char e;
FILE * fp;
 

- Print a memory region as a series of decimal octets separated by character c and terminated by character e. Normally, character c will be DEC_EXTENDER, defined in file number.h, but it could be any character value. Normally, character e will be a space or newline but it could be any character value. A typical use might be to print an IP address in readable format. For example, specifying c as '.', character e as '/' and extent as 4 would produce output looking something like "192.168.099.001/" where each octet is expressed as a decimal integer. The function is declared in memory.h and defined in decout.c. -

- endian -

void endian(memory,  
 extent); 
void * memory;
size_t extent;
 

- Reverse the byte order of a memory region. It is a variable extent version of functions like __bswap_16, __bswap_32 and __bswap_64. The function is declared in memory.h and defined in endian.c. -

- fdchecksum32 -

unit32_t fdchecksum32(fd,  
 extent,  
 checksum); 
int fd;
size_t extent;
unit32_t checksum;
 

- Return the 32 bit checksum of a file region starting from the current file position. The checksum is the one's complement of the XOR or of all 32 bit words in the region. Argument extent must be specified in 32 bit words, not bytes. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate NVM files header by header or section by section. The function is declared in memory.h and defined in fdchecksum32.c. -

- fdchecksum_32 -

unit32_t fdchecksum_32(fd,  
 extent,  
 checksum); 
int fd;
size_t extent;
unit32_t checksum;
 

- Return the 32 bit checksum of a file region starting from the current file position. The checksum is the one's complement of the XOR or of all 32 bit words in the region. Argument extent is specified in bytes but is rounded down to the nearest multiple of 4 bytes. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate NVM files header by header or section by section. The function is declared in memory.h and defined in fdchecksum_32.c. -

- This function is similar to function fdchecksum32 but there is no need to round extent down to the nearest multiple of 4 bytes before calling the function because that is done internally. Also, there is no unecessary endian manuipulation of the checksum. -

- filepart -

char const * filepart(pathname); 
char const * pathname;
 

- Return the address of the filename portion of a pathname string. The filename portion is everything after the rightmost path separator. If a path separator is not present then the address of the pathname string is returned. This function is similar to the POSIX basename function but it returns an empty string whenever the rightmost character is a path separator. The path separator can be either slash ('/') or backslash ('\\'). The function is declared in files.h and defined in filepart.c. -

- hexdecode -

signed hexdecode(memory,  
 extent,  
 buffer,  
 extent); 
void * memory;
size_t extent;
char const buffer [];
size_t extent;
 

- Decode a memory region as a string of ASCII hexadecimal digits. Convert memory until the buffer or memory exhausts and return the string extent. Allow three (3) string characters for each memory byte to be decoded. The number of bytes decoded will be the lesser of argument extent divided by 3 or argument extent. The function is declared in memory.h and defined in hexdecode.c. -

- hexdump -

void hexdump(memory,  
 offset,  
 extent,  
 fp); 
void const * memory;
size_t offset;
size_t extent;
FILE * fp;
 

- Print a full or partial memory region in hexadecimal format showing memory offsets, hexadecimal byte values and ASCII character values. Argument memory contains some memory region. Argument extent is the region extent. Argument offset is the starting display location. Locations memory [offset] up to memory [extent] are displayed, allowing a partial dump of the memory region. An offset of 0 will display the entire region. The function is declared in memory.h and defined in hexdump.c. -

- This function is similar to but different from function hexview . -

- hexencode -

signed hexencode(memory,  
 extent,  
 string); 
void * memory;
size_t extent;
char const * string;
 

- Encode a memory region with the binary equivalent of an ASCII hexadecimal string. Return the number of bytes encoded or 0 on error. The value of errno is set to EINVAL if the number of bytes encoded is less than extent or the entire string cannot be converted due to illegal digits or excessive digits. Ignore optional HEX_EXTENDER characters separating octets in argument string. Constant HEX_EXTENDER is defined in file number.h. The function is declared in memory.h and defined in hexencode.c. -

- hexin -

ssize_t hexin(memory,  
 extent,  
 fp); 
void const * memory;
size_t extent;
FILE * fp;
 

- This function is similar to hexencode but it reads from file, instead of a string and ignores non-hexadecimal text and comments within the input stream. Incoming text is binary encoded and written to the specified memory region. The actual number of bytes encoded is returned or -1 on error. See the efsu man page for a thorough explanation of function behavior. The function is declared in memory.h and defined in hexin.c. -

- hexout -

void hexout(memory,  
 extent,  
 c,  
 e,  
 fp); 
void const * memory;
size_t extent;
char c;
char e;
FILE * fp;
 

- Print a memory region as a series of hexdecimal octets separated by character c and termianted by character e. Normally, character c will be HEX_EXTENDER, defined in file number.h, but it could be any character value. Normally, character e will be a space or newline but it could be any character value. A typical use might be to print a MAC or Ethernet address in readable format. For example, specifying c as ':', character e as ',' and extent as 6 would produce output looking something like "00:B0:52:DA:DA:01," where each octet is expressed as a hexadecimal integer. The function is declared in memory.h and defined in hexout.c. -

- hexstring -

char * hexstring(buffer,  
 length,  
 memory,  
 extent); 
char buffer [];
size_t length;
void const * memory;
size_t extent;
 

- Convert a memory region to a NUL terminated string and return the string address. This function is identical to function hexdecode but it return the string address instead of the number of characters decoded. The function is declared in memory.h and defined in hexstring.c. -

- hexview -

void hexview(memory,  
 offset,  
 extent,  
 fp); 
void const * memory;
size_t offset;
size_t extent;
FILE * fp;
 

- Print a partial memory region in hexadecimal format showing memory offsets, hexadecimal byte values and ASCII character values. Argument memory contains part of a larger memory region, much like a file window. Argument extent is the window length. Argument offset is the relative offset of the window within the region. Locations memory [0] up to but excluding memory [extent] are displayed as a partial dump, providing a window into the region. The function is declared in memory.h and defined in hexview.c.

- This function is similar to but different from function hexdump. -

- memdecr -

signed memdecr(memory,  
 extent); 
void * memory;
size_t extent;
 

- Decrement a multi-byte memory region. Return 0 on success or -1 if all bytes have decremented to 0x00. For example, { 0xFF, 0xFF, 0xFF } decrements to { 0xFF, 0xFF, 0xFE } and { 0xFF, 0x00, 0x00 } decrements to { 0xFE, 0xFF, 0xFF }. A typical use is to iterate through a range if IP or MAC address values. The function is declared in memory.h and defined in memdecr.c. -

- memincr -

signed memincr(memory,  
 extent); 
void * memory;
size_t extent;
 

- Increment a multi-byte memory region. Return 0 on success or -1 once all bytes have been incremented to 0xFF. For example { 0x00, 0x00, 0x00 } increments to { 0x00, 0x00, 0x01 } and { 0x00, 0xFF, 0xFF } increments to { 0x01, 0x00, 0x00 }. A typical use is to iterate through a range of IP or MAC address values. The function is declared in memory.h and defined in memincr.c. -

- memout -

void memout(memory,  
 extent,  
 format,  
 group,  
 c,  
 fp); 
void const * memory;
size_t extent;
char const * format;
unsigned group;
signed c;
FILE * fp;
 

- Print a memory region as a series of octet groups wach separated by character c. The group argument specifies the number of octets per group. The format argument determines how each octet is displayed. Normally, character c will be one of BIN_EXTENDER, DEC_EXTENDER or HEX_EXTENDER as defined in file number.h, but it could be any character value. The function is declared in memory.h and defined in memout.c. -

- memswap -

void memswap(buffer1,  
 buffer2,  
 length); 
void * buffer1;
void * buffer2;
size_t length;
 

- Exchange the contents of one buffer with that of another. No provision is made for buffer overlap. No value is returned. A typical use might be to exchange source and destination addresses in an ethernet packet. The function is declared in memory.h and defined in memswap.c. -

- strdecr -

signed strdecr(memory,  
 extent,  
 min,  
 max); 
void * memory;
size_t extent;
byte min;
byte max;
 

- Decrement a multi-byte memory region using only ASCII character values in the range min through max. Return 0 on success or -1 once all characters have been decremented to the value of argument min. For example, if argument min is 'A' and argument max is 'Z' then { 'A', 'B', 'C' } decrements to { 'A', 'B', 'B' } and { 'B', 'Z', 'Z' } decrements to { 'A', 'A', 'A' }. A typical use is to generate a sequence of distinct character strings to seed encryption key functions. The function is declared in memory.h and defined in strdecr.c. -

- strfbits -

size_t strfbits(buffer,  
 length,  
 operands,  
 operator,  
 flagword); 
char const buffer [];
size_t length;
char const * operands [];
char const * operator;
unsigned flagword;
 

- Encode a buffer with an enumerated list of the operands associated with the corresponding bits in flagword. separate enumerated operands with an operator string. For example, given char const *operands [] = { "loop", "wait", "busy" } and unsigned flagword = 0x05 then strfbits (buffer, length, operands, "|", flagword) would encode buffer with "loop|busy". Observe that each bit set in flagword appears in buffer as the corresponding string from operands. A typical application for this function is the enumeration of flagword states. The function is declared in format.h and defined in strfbits.c. -

- strincr -

signed strincr(memory,  
 extent,  
 min,  
 max); 
void * memory;
size_t extent;
byte min;
byte max;
 

- Increment a multi-byte memory region using only ASCII character values in the range min through max. Return 0 on success or -1 once all characters have been incremented to the value of argument max. For example, if argument min is 'A' and argument max is 'Z' then { 'A', 'B', 'C' } increments to { 'A', 'B', 'D' } and { 'A', 'Z', 'Z' } increments to { 'B', 'A', 'A' }. A typical use is to generate a sequence of distinct character strings to seed encryption key functions. The function is declared in memory.h and defined in strincr.c. -

- todigit -

unsigned todigit(c); 
unsigned c;
 

- Return the integer value of character c interpreted as digit in the base 36 number system. It is called by many encode functions to support number base conversion. If the value of c is '0' through '9' then integer 0 through 9 is returned. If the value of c is 'A' through 'Z' or 'a' through 'z' then integer 10 through 35 is returned. The function is declared in number.h and defined in todigit.c. -

- typename -

char const * typename(list,  
 size,  
 type,  
 name); 
const struct _type_ list [];
size_t size;
type_t type;
char const * name;
 

- Return the name associated with a message type by searching a list arranged in ascending order by message type. Return argument name as the function value if the message type is not present in the list. Data types struct _type_ and type_t are defined in file types.h. A typical use might be to return the name of message based on the message type. The function is declared in symbol.h and defined in typename.c. -

diff --git a/docbook/ch07s06.html b/docbook/ch07s06.html deleted file mode 100644 index d7d3ac0b..00000000 --- a/docbook/ch07s06.html +++ /dev/null @@ -1,35 +0,0 @@ -Message Debug Functions

- Message Debug Functions -

- Message debug functions are not needed for proper toolkit operation but they can be useful during development, debugging and testing phases of product development. They are specific to HomePlug AV messages only. -

- MMECode -

char const * MMECode(MMTYPE,  
 MSTATUS); 
uint16_t MMTYPE;
uint8_t MSTATUS;
 

- Return text that explains the status code for a given Atheros vendor-specific management message. Argument MMTYPE is an unsigned integer in the range 0xA000 through 0xAFFF and must exactly match the MMTYPE of the message returning the status code. For example, the CNF variant of a message is currently the only variant that has an MSTATUS field and so other variants return a default string. The function is declared in mme.h and defined in MMECode.c. -

- Inclusion of this function can increase application size by 3kb because the text associated with all Atheros vendor-specific management messages and errors are included whether needed or not. Conditional compilation statements are provided internally to suppress the full table with a terse substitute. -

- Although the Bootloader and firmware share some common Vendor Specific Management Messages, the two programs may return different codes for a given message and error condition. Where there are conflicts, Bootloader codes take precedence over firmware codes because it is unlikely that users will .issue the same messages to a device running firmware. -

- MMEMode -

char const * MMEMode(MMTYPE); 
uint16_t MMTYPE;
 

- Return the mode of a given management message type as a string. The mode is determined by the two least significant bits of argument MMTYPE. The mode string will be one of REQ, CNF, IND or RSP. The function is declared in ihp.h and defined in MMEMode.c. -

- Most management messages have a request and a confirmation variant while a few have an indication and a response variant. Requests originate from the host and are acknolwedged by a confirmation from the device. Indications originate from a device and are acknowledged by a response from the host. -

- MMEName -

char const * MMEName(MMTYPE); 
uint16_t MMTYPE;
 

- Return the name associated with a given management message type. The name is the mnemonic used to distinguish one message type from another in the HomePlug AV Specification or Atheros Firwmare Technical Reference Manual. Argument MMTYPE is an unsigned integer in the range 0x0000 through 0xAFFF. The request, confirmation, indication and response variants of a management message will all return the same message name. The function is declared in mme.h and defined in MMEName.c. -

- MMEPeek -

void MMEPeek(memory,  
 extent,  
 fp); 
void const * memory;
size_t extent;
FILE *fp;
 

- Prints an Atheros vendor-specific management message to stream fp in human readable format. Argument buffer is the message address and argument extent is the message extent in bytes. Output consists of a formatted header showing decoded header. The function is declared in mme.h and defined in MMEPeek.c. -

diff --git a/docbook/ch07s07.html b/docbook/ch07s07.html deleted file mode 100644 index 0aa18675..00000000 --- a/docbook/ch07s07.html +++ /dev/null @@ -1,100 +0,0 @@ -Key Generation Functions

- Key Generation Functions -

- Atheros applications use the SHA256 algorithm to compute unique HomePlug AV keys, including the Device Access Key (DAK), Network Membership Key (NMK) and Network Identifier (NID). The SHA256 algorithm is seeded, salted and rehashed differently for each type of HomePlug AV key. A different function is used to compute each type of HomePlug AV key but all of them call the SHA256 functions. The SHA256 algorithm returns a 256 bit (32 byte) digest but only the upper 128 bits (16 bytes) are used for HomePlug AV keys. -

Example 7.3.  - SHA256 Digest Computation -

- The following code example illustrates how to generate, rehash and print an SHA256 digest, or key, from a user-defined seed string and salt string. This logic is typical of that used to generate HomePlug AV compliant keys. See the HomePlug AV Specification for the specific rules used to generate each type of key. -

-#include <stdio.h>
-
-#include "../crypt/SHA256.h"
-
-#include "../crypt/SHA256Reset.c"
-#include "../crypt/SHA256Block.c"
-#include "../crypt/SHA256Write.c"
-#include "../crypt/SHA256Fetch.c"
-
-struct sha256 sha256; 
-char * seed = "ForMeToKnowAndYouToFindOut"; 
-char * salt = "X$z@p"; 
-byte digest [SHA256_DIGEST_SIZE];
-int i; 
-
-SHA256Reset (&sha256); 
-SHA256Write (&sha256, (byte *)(seed), strlen (seed)); 
-SHA256Write (&sha256, (byte *)(salt), strlen (salt)); 
-SHA256Fetch (&sha256, digest); 
-
-for (i = 0; i < 999; i++)
-{
-	SHA256Reset (&sha256); 
-	SHA256Write (&sha256, digest, sizeof (digest)); 
-	SHA256Fetch (&sha256, digest); 
-}
-for (i = 0;  i < 16; i++)
-{
-	printf ("%02x", digest [i]); 
-}
-printf ("\n"); 
-

- Above, we declare struct sha256 and initialize it using function SHA256Reset. We then write a user-defined seed string (or password) followed by an optional salt string to the digest using function SHA256Write. The resulting digest (or key) is obtained by calling function SHA256Fetch. Constant SHA256_DIGEST_SIZE is defined in SHA256.h. Although the digest is probably secure enough at this point, we rehash it 999 times for good measure. We then print the first 16 bytes of the result because HomePlug AV keys are always 16 bytes long. -


- MACPasswords -

void MACPasswords(vendor,  
 device,  
 number,  
 count,  
 bunch,  
 space,  
 flags); 
uint32_tvendor;
uint32_tdevice;
uint32_tnumber;
unsigned count;
unsigned bunch;
unsigned space;
flag_t flags;
 

- Print a range of device addresses and user passwords on stdout. The calling application must split the starting device address into a three-byte OUI and three-byte device number and pass them as the unsigned 32-bit integers vendor and device, respectively. Argument device is the first device number in the range and number is the final device number. Argument count is the number of uppercase letters comprising a password. Passwords contain this many letters but the letters are grouped for easy reading. Letter groups are separated by hyphens. Argument bunch defines how many letters form each group. Argument space is the character used to separate groups of letters. Argument flags enables or disables function features such as insertion of a used flag for use by the Atheros Production Test System or the omission of the device address on output. The output of this function is similar to that produced by the DB Builder utility distributed with the PTS. This function is declared in keys.h and defined in MACPasswords.c.

- HPAVKeyDAK -

void HPAVKeyDAK(DAK,  
 string); 
byte DAK [];
char const string;
 

- Encode buffer DAK with the Device Access Key (DAK) derived from the NUL terminated string. The string is salted, hashed and re-hashed using the SHA256 algorithm. The DAK is always HPAVKEY_DAK_LEN bytes, defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyDAK.c. -

- HPAVKeyNMK -

void HPAVKeyNMK(digest,  
 string); 
byte digest [];
char const string;
 

- Encode buffer NMK with the Network Membership Key (NMK) derived from the NUL terminated string. The string is salted, hashed and re-hashed using the SHA256 algorithm. The DAK is always HPAVKEY_NMK_LEN bytes, as defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyNMK.c. -

- HPAVKeyNID -

void HPAVKeyNID(NID,  
 NMK,  
 level); 
byte NID [];
byte const NMK [];
signed level;
 

- Encode buffer NID with the Network Identification Key (NID) derived from the 16-byte Network Membership Key (NMK). The NMK is hashed and re-hashed using the SHA256 algorithm then encoded with the security level. The NID is always HPAVKEY_NID_LEN bytes, as defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyNID.c. -

- HPAVKeyOut -

void HPAVKeyOut(digest,  
 length,  
 phrase,  
 flags); 
byte const digest [];
size_t length;
char const * phrase;
flag_t flags;
 

- Decode and print up to length bytes from buffer digest on stdout. Print NUL terminated phrase on the same line following the digest when bit HPAVKEY_VERBOSE, defined in HPAVKey.h, is set in flags. This procedure prints keys and phrases in a standard column-oriented format that other applications can easily read and use. This function is declared in HPAVKey.h and defined in HPAVKeyOut.c. -

- SHA256Block -

void SHA256Block(sha256,  
 memory); 
struct sha256 * sha256;
void const * memory;
 

- Merge 64 bytes of memory into the current SHA256 digest. This function performs the core computations required by the SHA256 algoithm. It is called by function SHA256Fetch and so there is no reason to call this function directly. The sha256 structure is defined in SHA256.h. The function is declared in SHA256.h and defined in SHA256Block.c. -

- SHA256Fetch -

void SHA256Fetch(sha256,  
 digest); 
struct sha256 * sha256;
byte digest [];
 

- Conclude SHA256 computation and transfer the result to the named 32-byte digest then flush the sha256 structure. The digest is always 32 bytes long regardless of the amount of information that has been written using function SHA256Write. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Fetch.c. -

- Once this function is called, the sha256 structure is purged for security reasons. You must call SHA256Reset again before starting another hash or subsequent calls to this function or SHA256Write will have unpredictable results. . -

- SHA256Ident -

void SHA256Ident(fd,  
 digest); 
int fd;
byte digest [];
 

- Compute the SHA256 digest from the content of a file. The digest serves as the file fingerprint and can be used to identify identical content despite filename changes. File descriptor fd is the subject file which must be positioned to the start befor calling this function. Buffer digest will be written with the computed 256-digest and must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Ident.c. -

- SHA256Match -

void SHA256Match(fd,  
 digest); 
int fd;
byte const digest [];
 

- Search a registry file for a known SHA256 digest. Return true on success or false on failure. File descriptor fd is the registry file which must be positioned to the start before calling this function. Buffer digest contains the known 256-bit digest and must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h. A registry file consists of 64-digit hexadecimal strings that represent SHA256 digest values. Optional text may be appear between the digest and newline to document digest significance. This function ignores such text. This function is declared in SHA256.h and defined in SHA256Match.c. -

- SHA256Print -

void SHA256Print(digest,  
 string); 
byte const digest [];
char const * string;
 

- Print an SHA256 digest and optional string on stdout. Buffer digest must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h, which results in 64 hexadecimal digits on output. Variable length string is NUL terminated but may be NULL. If string is not NULL and is not empty then a space is inserted between the digest and the string on output. This function may be used to print SHA256 digests and optional strings in standard format, such as a registry file. This function is declared in SHA256.h and defined in SHA256Print.c. -

- SHA256Reset -

void SHA256Reset(sha256); 
struct sha256 * sha256;
 

- Initialize a sha256 structure before computing a new SHA256 digest. This function should be called once before calling SHA256Write for the first time for a given digest. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Reset.c. -

- SHA256Write -

void SHA256Write(sha256,  
 memory,  
 extent); 
struct sha256 * sha256;
void const * memory;
size_t extent;
 

- Writes a region of memory to the current SHA256 digest contained in an sha256 structure. An application may call this function any number of times to concatinate multiple memory regions before fetching the digest with function SHA256Fetch. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Write.c. -

diff --git a/docbook/ch07s08.html b/docbook/ch07s08.html deleted file mode 100644 index 83ac0dc6..00000000 --- a/docbook/ch07s08.html +++ /dev/null @@ -1,200 +0,0 @@ -XML Editing Functions

- XML Editing Functions -

- Atheros provides support for remote PIB management using XML instruction files. The concept is based on an XML schema that defines the elements and attributes needed to edit a PIB file. The schema is located in file piboffset.xsd. In practice, this schema could be used to edit any buffer containing data but we are only interested in editing PIB files here. -

- Users may create XML files that conform to the schema and specify the PIB objects they want to change and how they want each to change. In brief, the files specify an offset, a data length and a data value. A data value has type dataString, dataHex or dataByte and may be a single data item or an array of data items. Each XML file should include a reference to the Atheros schema and be submitted to a validating XML parser, such as Internet Explorer or Firefox, to ensure that file structure and syntax are correct before use. An example XML file can be seen in piboffset.xml. -

- Editing involves the following steps. An example of these steps can be seen in the pxe program source code and in function RdModWrPib2.c which is a component of the int6k2 program. -

  1. - Obtain a copy of the PIB to be edited. This can be done by opening a PIB file and reading the entire file into memory or by requesting the PIB directly from an active Atheros powerline device. The PIB length can be determined from the PIB header. -

  2. - Open the XML file, generate an XML parse tree and close the file. This can be done by passing the filename to function xmlopen. It will perform all these steps and return the parse tree root node. -

  3. - Modify the PIB based to instructions stored in the parse tree. This is done by passing the parse tree, PIB buffer and PIB length to function xmledit. It will traverse the parse tree and apply changes to the buffer as defined in the parse tree. -

  4. - Discard the parse tree. This can be done by passing the parse tree to function xmlfree. -

  5. - Compute a new PIB checksum. This can be done by clearing the PIB checksum then passing the PIB buffer and PIB length to function checksum32 with a checksum value of 0. -

  6. - Write the PIB to file or transmit it over the network to an Atheros powerline device. -

-

- xmledit -

signed xmledit(node,  
 memory,  
 extent); 
struct node * node;
void *memory;
unsigned extent;
 

- Write data into memory based on the data offset and length defined in XML parse tree, node. This function will not apply modifications having malformed structure or having an invalid or illegal offset, length or data value. Use function xmlschema to print the current schema. The function is declared in node.h and defined in xmledit.c. The node structure is defined in node.h. -

- xmlfree -

void xmlfree(node); 
struct node * node;
 

- Release memory associated with an XML parse tree. The function is declared in node.h and defined in xmlfree.c. The node structure is defined in node.h. -

- The text member if the parse tree root node points to memory allocated by xmlscan to store the original XML string. The application must either deallocate that memory before calling this function or store the text address and deallocate that memory after calling this function; otherwise, memory leaks will result. -

- xmlnode -

struct node *xmlnode(node); 
struct node *node;
 

- Create an empty node blow the specified node and return a pointer to it. A typical application can be seen in function xmlscan.c. The function is declared in node.h and defined in xmlnode.c. The node structure is defined in node.h. -

- xmlopen -

struct node * xmlopen(filename); 
char const * filename;
 

- Open the named XML file, parse it and return the XML parse tree. The parse tree contains, among other things, all XML elements, attributes and values specified in the file. The function is declared in node.h and defined in xmlopen.c. The node structure is defined in node.h. -

- The returned parse tree is ready to traverse using struct node members above, below, prior and after. Each node has a line, type and test member. This function calls function xmlscan to parse the file and generate the tree. The parse tree can be inspected by passing the root node to function xmltree. -

- xmlscan -

signed xmlscan (node); 
struct node * node;
 

- Scan the XML string attached to the specified node and create a parse tree below it. Return 0 if parsing is successrul or -1 if not. The function is declared in node.h and defined in xmlscan.c. The node structure is defined in node.h. -

- The application must point the text member to a copy of the XML string before calling this function because parsing is destructive and requires write access to the string. The application can search and manipulate the tree on return. The application should deallocate string memory before calling xmlfree. -

Example 7.4.  - XML Source File -

- The following is sample input to function xmlscan. The element and attribute names shown are for illustration and were selected to that they can be easily identified in the output. The parse tree from this file can be seen in the example for function xmltree. -

-<?xml version="1.0" encoding="UTF-8" ?>
-<xmlfile 
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-	xsi:noNamespaceSchemaLocation="myschema.xsd">
-	<element name="Element1">
-		<attribute name="Attribute1">
-			1234567890
-			</attribute>
-		<attribute name="Attribute2">
-			The quick brown fox jumped over the lazy dog.
-			</attribute>
-		</element>
-	<element name="Element2">
-		<attribute name="Attribute1">
-			</attribute>
-		<attribute name="Attribute2">
-			The quick brown 
-			fox jumped over 
-			the lazy dog.
-			</attribute>
-		</element>
-<!-- comments can go anywhere -->
-	<element name="Element2">
-		<attribute name="Attribute1"/>
-		<attribute name="Attribute2">
-			value2
-			</attribute>
-		</element>
-	</xmlfile>
-

- xmlschema -

void xmlschema(); 
;
 

- Print an XML schema that supports function xmledit on stdout. This function has no argument. The schema produced by this function is guaranteed to support the parse logic implemented by function xmledit. Scheme element names are defined as constants in node.h so that they can be referenced by applications that create their own XML edit instructions. The function is declared in node.h and defined in xmlschema.c. -

- The text member in the parse tree root node points to memory allocated by xmlscan to store the original XML string. The application must either deallocate that memory before calling this function or store the text address and deallocate that memory after calling this function; otherwise, memory leaks will result. -

Example 7.5.  - XML Edit Schema -

-<?xml version='1.0' encoding='UTF-8'?>
-<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' elementFormDefault='qualified'>
-	<xs:element name='pib'>
-		<xs:complexType>
-			<xs:sequence>
-				<xs:element maxOccurs='unbounded' ref='object'/>
-				</xs:sequence>
-			</xs:complexType>
-		</xs:element>
-	<xs:element name='object'>
-		<xs:complexType>
-			<xs:attribute name='name' use='required' type='xs:NCName'/>
-			<xs:sequence>
-				<xs:sequence>
-					<xs:element ref='offset'/>
-					<xs:element ref='length'/>
-					</xs:sequence>
-				<xs:choice>
-					<xs:element ref='array'/>
-					<xs:element ref='dataString'/>
-					<xs:element ref='dataByte'/>
-					</xs:choice>
-				</xs:sequence>
-			</xs:complexType>
-		</xs:element>
-	<xs:element name='length' type='xs:positiveInteger'/>
-	<xs:element name='offset' type='xs:hexBinary'/>
-	<xs:element name='array'>
-		<xs:complexType>
-			<xs:choice maxOccurs='unbounded'>
-				<xs:element ref='dataByte'/>
-				<xs:element ref='dataHex'/>
-				</xs:choice>
-			</xs:complexType>
-		</xs:element>
-	<xs:element name='dataString' type='xs:string'/>
-	<xs:element name='dataHex' type='xs:hexBinary'/>
-	<xs:element name='dataByte' type='xs:unsignedByte'/>
-	</xs:schema>
-

- The schema shown above was produced by function xmlschema. It is should be used to validate XML edit instructions before submitting them to program pxe. -


- xmltree -

void xmltree(node); 
struct node * node;
 

- Print the XML parse tree on stdout. The function is declared in node.h and defined in xmltree.c. -

Example 7.6.  - XML Parse Tree -

- The following is sample output from function xmltree. The XML source is shown in the example for function xmlscan . The numbers appearing down the left margin indicate the input line number from the XML source file parsed by function xmlscan . The character codes indicate the node type and are defined in node.h. The node structure is defined in node.h. -

-001 [?] [xml]
-001 [ ] 	[version]
-001 [=] 		[1.0]
-001 [ ] 	[encoding]
-001 [=] 		[UTF-8]
-002 [<] [xmlfile]
-002 [ ] 	[xmlns:xsi]
-002 [=] 		[http://www.w3.org/2001/XMLSchema-instance]
-002 [ ] 	[xsi:noNamespaceSchemaLocation]
-002 [=] 		[myschema.xsd]
-003 [<] 	[element]
-003 [ ] 		[name]
-003 [=] 			[Element1]
-004 [<] 		[attribute]
-004 [ ] 			[name]
-004 [=] 				[Attribute1]
-005 [>] 			[1234567890]
-006 [/] 			[attribute]
-007 [<] 		[attribute]
-007 [ ] 			[name]
-007 [=] 				[Attribute2]
-008 [>] 			[The quick brown fox jumped over the lazy dog.]
-009 [/] 			[attribute]
-010 [/] 		[element]
-011 [<] 	[element]
-011 [ ] 		[name]
-011 [=] 			[Element2]
-012 [<] 		[attribute]
-012 [ ] 			[name]
-012 [=] 				[Attribute1]
-013 [/] 			[attribute]
-014 [<] 		[attribute]
-014 [ ] 			[name]
-014 [=] 				[Attribute2]
-015 [>] 			[The quick brown fox jumped over the lazy dog.azy]
-018 [/] 			[attribute]
-019 [/] 		[element]
-020 [!] 	[-- comments can go anywhere --]
-021 [<] 	[element]
-021 [ ] 		[name]
-021 [=] 			[Element2]
-022 [<] 		[attribute]
-022 [ ] 			[name]
-022 [=] 				[Attribute1]
-023 [<] 		[attribute]
-023 [ ] 			[name]
-023 [=] 				[Attribute2]
-024 [>] 			[value2]
-025 [/] 			[attribute]
-026 [/] 		[element]
-027 [/] 	[xmlfile]
-

diff --git a/docbook/ch07s09.html b/docbook/ch07s09.html deleted file mode 100644 index cfd7888f..00000000 --- a/docbook/ch07s09.html +++ /dev/null @@ -1,25 +0,0 @@ -Download Functions

- Download Functions -

- Download function write applets, parameters and runtime firmware to device SDRAM or NVRAM. -

- WriteExecuteApplet -

signed WriteExecuteApplet(plc,  
 header); 
struct plc * plc;
void const * header;
 

- Write an NVM image directly into SDRAM using VS_WRITE_AND_EXECUTE messages. This function calls either WriteExecuteApplet1 or WriteExecuteApplet2 based on the NVM header version. The function is declared in plc.h and defined in WriteExecuteApplet.c. The plc structure is defined in plc.h. -

- WriteExecuteApplet1 -

signed WriteExecuteApplet1(plc,  
 header); 
struct plc * plc;
struct nvm_header1 * header;
 

- Write an NVM image directly into SDRAM using VS_WRITE_AND_EXECUTE messages. This function is similar to WriteExecuteApplet2 but expects a structure nvm_header1 pointer instead of a structure nvm_header2 pointer. The function is declared in plc.h and defined in WriteExecuteApplet.c. Structure plc is defined in file plc.h. Structure nvm_header1 is defined in file nvm.h. -

- WriteExecuteApplet2 -

signed WriteExecuteApplet2(plc,  
 header); 
struct plc * plc;
struct nvm_header2 * header;
 

- Write an NVM image directly into SDRAM using VS_WRITE_AND_EXECUTE messages. This function is similar to WriteExecuteApplet1 but expects a structure nvm_header2 pointer instead of a structure nvm_header1 pointer. The function is declared in plc.h and defined in WriteExecuteApplet.c. Structure plc is defined in file plc.h. Structure nvm_header1 is defined in file nvm.h. -

diff --git a/docbook/ch07s10.html b/docbook/ch07s10.html deleted file mode 100644 index 8df22d13..00000000 --- a/docbook/ch07s10.html +++ /dev/null @@ -1,33 +0,0 @@ -Procrastination Functions

- Procrastination Functions -

- Procrastinations functions wait for specific events to occur or fail to occur. -

- WaitForAssoc -

signed WaitForAssoc(plc); 
struct plc * plc;
 

- Poll a powerline device using VS_NW_INFO messages until the device forms or joins a network. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. It calls either WaitForAssoc1 or WaitForAssoc2 to procrastinate based on the hardwareID member of structure plc. The function is declared in plc.h and defined in file WaitForAssoc.c. Struct plc is declared in file plc.h and defined in file plc.c. -

- WaitForAssoc1 -

signed WaitForAssoc1(plc); 
struct plc * plc;
 

- Poll a 200mbs powerline device using VS_NW_INFO version 0 messages until the device joins or forms a network. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. The function is declared in file plc.h and defined in file WaitForAssoc1.c. Struct plc is declared in file plc.h and defined in file plc.c. -

- WaitForAssoc2 -

signed WaitForAssoc2(plc); 
struct plc * plc;
 

- Poll a 1000mbs powerline device using VS_NW_INFO version 1 messages until the device joins or forms a network. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in file plc.h and defined in file WaitForAssoc2.c. -

- WaitForReset -

signed WaitForReset(plc); 
struct plc * plc;
 

- Poll a powerline device using VS_SW_VER messages until the device stops responding. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. Structure plc is declared in file plc.h and define in file plc.c. The function is declared in plc.h and defined in file WaitForReset.c. -

- WaitForStart -

signed WaitForStart(plc,  
 firmware,  
 length); 
struct plc * plc;
char firmware;
size_t length;
 

- Poll a powerline device using VS_SW_VER messages until the device responds. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. Update the hardwareID member of the plc structure. Return the firmware revision string contained in the confirmation message. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in file plc.h and defined in file WaitForStart.c. -

diff --git a/docbook/ch07s11.html b/docbook/ch07s11.html deleted file mode 100644 index 8bc51731..00000000 --- a/docbook/ch07s11.html +++ /dev/null @@ -1,51 +0,0 @@ -Traffic Functions

- Traffic Functions -

- Traffic functions generate powerline traffic in various ways. Some send traffic direct from the host to each device while others use the VS_FR_LBK message to echo Ethernet frames back to the sender. -

- CrossTraffic1 -

signed CrossTraffic1(plc); 
struct plc * plc;
 

- Instruct a powerline device to send a generic Ethernet frame to another powerline device for a fixed period of time in order to set the TX rate on the source device and the RX rate on the destination device. The source and destination address are specified in plc->MAC and plc->RDA, respectively, and the duration is specified in plc->timeperiod. This function is similar to function CrossTraffic2 but the source and destination addresses are reversed. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file CrossTraffic1.c. -

- CrossTraffic2 -

signed CrossTraffic2(plc); 
struct plc * plc;
 

- Instruct a powerline device to send a generic Ethernet frame to another powerline device for a fixed period of time in order to set the TX rate on the source device and the RX rate on the destination device. The source and destination address are specified in plc->RDA and plc->MAC, respectively, and the duration is specified in plc->timeperiod. This function is similar to function CrossTraffic1 but the source and destination addresses are reversed. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file CrossTraffic2.c. -

- LocalTraffic1 -

signed LocalTraffic1(plc); 
struct plc * plc;
 

- Send a fixed number of generic frames from the local host a remote powerline device in order to set the TX rate on the local powerline device and the RX rate on the remote powerline device. The local and remote device address are specified in plc->MAC and plc->RDA, respectively, and the count is specified in plc->count. This function is similar to function LocalTraffic2 which instructs a remote device to echo frames back to the local device. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file LocalTraffic1.c. -

- LocalTraffic2 -

signed LocalTraffic2(plc); 
struct plc * plc;
 

- Instruct a remote powerline device to echo generic Ethernet frames back to the local host for a fixed period of time in order to set the TX rate on the remote powerline device and the RX rate on the local powerline device. The local and remote device address are specified in plc->MAC and plc->RDA, respectively, and the count is specified in plc->count. This function is useful when there is no easy way to send traffic from the remote host. This function complements function LocalTraffic1 which send frames from the local device to a remote device. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file LocalTraffic2.c. -

- NetworkTraffic1 -

signed NetworkTraffic1(plc); 
struct plc * plc;
 

- This function is an alternative to function NetworkTraffic2 which uses Qualcomm Version 1 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file NetworkTraffic1.c. -

- This function use VS_SW_INFO and VS_NW_INFO messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic1, it does not generate traffic between various remote devices. -

- NetworkTraffic2 -

signed NetworkTraffic2(plc); 
struct plc * plc;
 

- This function is an alternative to function NetworkTraffic1 which uses Qualcomm Version 0 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file NetworkTraffic2.c. -

- Traffic1 -

signed Traffic1(plc); 
struct plc * plc;
 

- This function is an alternative to function Traffic2 which uses Qualcomm Version 1 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file Traffic1.c. -

- This function use VS_SW_INFO and VS_NW_INFO messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic1, it does not generate traffic between remote devices. -

- Traffic2 -

signed Traffic2(plc); 
struct plc * plc;
 

- This function is an alternative to function Traffic1 which uses Qualcomm Version 0 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file Traffic2.c. -

- This function use VS_SW_INFO and VS_NW_INFO messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic2, it does not generate traffic between remote devices. -

diff --git a/docbook/ch07s12.html b/docbook/ch07s12.html deleted file mode 100644 index 336f9e0e..00000000 --- a/docbook/ch07s12.html +++ /dev/null @@ -1,281 +0,0 @@ -SLAC Functions and Variables

- SLAC Functions and Variables -

- The functions described in this chapter implement SLAC protocol building blocks. Essentially, there is one function for each dataflow shown on the SLAC interface diagram. The implementations are not sophisticated. Customers must adapt them their own run-time environments. -

- To assist in adapting functions fo various environments, SLAC functions all accept three arguments. The first is a session variable that references information that supports a single PEV-EVSE SLAC interaction. The second is a channel variable that references information that supports ISO Layer 2 network communications. The third is a message variable that references an IEEE 802.3 frame buffer used to format, transmit, receive and interpret SLAC messages. Applications may create lists, stacks, queues or heaps of session variables to support multiple PEV-EVSE conversations. That has not been done here but may be done in the future. -

- PEV-HLE determines the application type and security type and stores them in the session variable before attempting a new SLAC session. PEV-HLE also generates and stores the run identifier in the session variable before attempting a new SLAC session. The run identifier is included in messages so that the EVSE-HLE can distinguish frames from different PEV-HLEs when transmitted in broadcast. -

- The Session Variable -

- The session variable is a structure defined in slac.h. It stores the information needed to manage a single SLAC protocol session between PEV-HLE and EVSE-HLE. It is necessary because there are cases where multiple PEV-HLE attempt to communicate with one EVSE-HLE or vice verse and each communication involves multiple steps and some steps will fail or be abandoned. -

- session.RunID -

-A session identifier used to support multiple PEV-EVSE sessions. -The PEV-HLE defines a new value with each associateion attempt and broadcasts it to EVSE-HLE in CM_SLAC_PARAM.REQ RunID. -EVSE-HLE receive it and store it in their session variable. -Once association starts, subsequent messages, in both directions, include this identifier so that PEV-HLE and EVSE-HLE can detect and collate messages from the same conversation. -

- session.APPLICATION_TYPE -

-Indicates the context in which the SLAC process is being carried out. -Currently, the only context is PEV-EVSE association. -The PEV-HLE sends this value to the EVSE-HLE in EVSE-HLE in CM_SLAC_PARAM.REQ message APPLICATION_TYPE field. -EVSE-HLE receive it and store it in their session variable. -

- session.SECURITY_TYPE -

-Indicates that the sender prefers Secure SLAC for PEV-EVSE matching. -Currently, the only value used in SLAC demonstration software is 0 for No Security. -The PEV-HLE defines this value as 0 on startup and broadcasts it to EVSE-HLE in in CM_SLAC_PARAM.REQ message SECURITY_TYPE field. -EVSE-HLE receive it and store it in their session variable for later use when sending SLAC messages. -

- session.RESP_TYPE -

-The EVSE-HLE defines this value and sends it to the PEV-HLE in CM_SLAC_PARAM.CNF message RESP_TYPE field. -THe default is 0 but this can be changed using response type = in profile evse.ini. -

- session.NUM_SOUNDS -

-The number of CM_MNBC_SOUND.IND messages that the PEV-HLE should send during sounding. -The EVSE-HLE defines this value and sends it to PEV-HLE in CM_SLAC_PARAM.CNF message NUM_SOUNDS field. -The default is 10 but this can be changed using time to soundi = in profile evse.ini. -

- session.TIME_OUT -

-The total time allowed for all session sounding to complete. -Any msounds arriving after the timeout will be lost. -The time is expressed in 100 msec increments. -The EVSE-HLE defines this value and sends it to PEV_HLE in CM_SLAC_PARAM.CNF. -The default is 8 but this can be changed using number of sounds = in profile evse.ini. -

- session.AAG [] -

-The cumulative average attenuation across 58 groups of 16 carriers. -The EVSE-HLE computes these averages from multiple CM_ATTEN_PROFILE.IND and forwards them to PEV-HLE in CM_ATTEN_CHAR.IND. -PEV_HLE populates array from CM_ATTEN_CHAR.IND message ACVarField.ATTEN_PROFILE.AAG field and evaluates it by averaging all values in the array to determine the overall average attenuation. -If that values is less than or equal to session.limit then a match may be attempted. -

- session.NumGroups -

-The number of elements in array session.AAG. -This EVSE-HLE defines this number and sends it to PEV-HLE in CM_ATTEN_CHAR.IND ACVarField.NumGroups. -For practical purposes, this value of this variable is constant at 58. -

- session.MSOUND_TARGET -

-MAC address of EVSE-HLE that will receive CM_MNBC_SOUND.IND messages. -The EVSE-HLE defines this address and broadcasts it to PEV-HLE in CM_SLAC_PARAM.CNF message M-SOUND_TRAGET field. -THe PEV-HLE stores this address in its session variable. -The default is FF:FF:FF:FF:FF:FF and remains constant. -This value is not used at this time. -

- session.FORWARDING_STA -

-MAC address of PEV-HLE to receive CM_SLAC_PROFILE.IND messages. -The EVSE-HLE defines this address and sends it to PEV-HLE in CM_SLAC_PARAM.CNF message FORWARDING_STA field. -THe PEV-HLE stores this address in its session variable. -The default is FF:FF:FF:FF:FF:FF and remains constant. -This value is ignored when RESP_TYPE=0. -

- session.PEV_ID -

-The vehicle identification number. -The PEV-HLE sends this value to the EVSE-HLE in CM_SLAC_MATCH.REQ MatchVarField.PEV_ID field. -The default is AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA but is can be changed using vehicle identifier = in profile pev.ini. -The MatchVarField portion of the message forms the transaction record and may be encrypted. -

- session.PEV_MAC -

-PEV-HLE MAC address. -The PEV-HLE sends this address to the EVSE-HLE in CM_SLAC_MATCH.REQ MatchVarField.PEV_MAC field. -The MatchVarField portion of the message forms the transaction record and may be encrypted. -

- session.EVSE_ID -

-The station identification number. -The EVSE-HLE sends this value to PEV-HLE in CM_SLAC_MATCH.CNF message MatchVarField.EVSE_ID field. -The default is BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB but is can be changed using station identifier = in profile evse.ini. -The MatchVarField portion of the message forms the transaction record and may be encrypted. -

- session.EVSE_MAC -

-EVSE-HLE MAC address. -The EVSE-HLE sends this value to PEV-HLE in CM_SLAC_MATCH.CNF message MatchVarField.EVSE_MAC field. -The MatchVarField portion of the message forms the transaction record and may be encrypted. -

- session.NMK -

-The EVSE-PLC Network Membership Key. -The EVSE-HLE defines this value when the station powers on. -The EVSE-HLE sends the NMK to the PEV-HLE in CM_SLAC_MATCH.CNF message MatchField.NMK field. -The PEV-HLE uses this value to form a network with the EVSE-PLC during charging. -The MatchVarField portion of the message forms the transaction record and may be encrypted. -

-The default for PEV-HLE is 50D3E4933F855B7040784DF815AA8DB7, which is the key derived from network password HomePlugAV, but that can be changed using nwtwork membership key = in profile pev.ini. -

-The default for EVSE-HLE is B59319D7E8157BA001B018669CCEE30D, which is the key derived from network password HomePlugAV0123, but that can be changed using nwtwork membership key = in profile evse.ini. -

- session.NID -

-The EVSE-PLC Network Identifier. -The EVSE-HLE defines this value when the station powers. -The EVSE-HLE sends the NID to the PEV-HLE in CM_SLAC_MATCH.CNF message MatchField.NID field. -The PEV-HLE uses this value to form a network with the EVSE-PLC during charging. -The MatchVarField portion of the message forms the transaction record and may be encrypted. -

-The default for PEV-HLE is B0F2E695666B03, which is the key derived from network password HomePlugAV, but that can be changed using nwtwork membership key = in profile pev.ini. -

-The default for EVSE-HLE is 026BCBA5354E08, which is the key derived from network password HomePlugAV0123, but that can be changed using nwtwork membership key = in profile evse.ini. -

- session.RND -

-A random value. -PEV-HLE computes this value and sends it to EVSE-HLE in CM_MNBC_SOUND.IND. -This value is not used at this time. -

- session.original_nmk -

-The original PEV-PLC Network Membership Key. -This is the original NMK of the PEV-HLE. -The PEV-HLE preserves this value before, and restores it after, the charging cycle. -The Qualcomm Atheros PEV-HLE and EVSE-HLE demonstration software reads these values from profile pev.ini and evse.ini, respectively, by network membership key = . -

- session.original_nid -

-The PLC Network Identifier (NID). -PEV-PLC and EVSE-PLC will each have a different NID at the start of the SLAC process. -This value must be preserved before, and restored after, charging. -Once charging is complete, PEV-HLE and EVSE-HLE restore this value to their respective PLC using CM_SET_KEY. -In a real world implementation, PEV-HLE and EVSE-HLE would read this value from their repective PLC and save it in session.nmk and session.NMK. -The Qualcomm Atheros PEV-HLE and EVSE-HLE demonstration software reads these values from profile pev.ini and evse.ini, respectively, by network identifier = . -

- session.state -

-The current SLAC protocol session state. Qualcomm Atheros PEV-HLE and EVSE-HLE demonstration programs use this value to direct internal state transitions. -Values range from 0 through 3. -

- session.sounds -

-The number of MSounds captured received by EVSE-HLE. -This value may be less that NUM_SOUNDS the requested by the EVSE_HLE due to network interruptions or EVSE-HLE overloading. -This is the denominator used when computing the average attenuation in array session.AAG. -The values is set by PEV_HLE from CM_ATTEN_CHAR.IND message NUM_SOUNDS field. -

- session.limit -

-The attenuation threshold. -If the average attenuation value in session.AAG exceeds this value the PEV-HLE will make no attempt to connect the PEV-PLC to the EVSE-PLC. -The default value is 10 but this can be re-defined in profile pev.ini by attenuation threshold = . -

- session.pause -

-The time in milliseconds between MSounds. -Sounding too frequently does not allow enough time for the EVSE-PLC to sample and compute values. -Sounding too infrequently wastes time. -The maximum sample rate may be limited by the quality of the powerline media and traffic passwing through the EVSE-PLC. -The default is 10 but can be re-defined in profile pev.ini by msound pause = . -

- session.chargetime -

-The time in milliseconds allowed for the charging cycle to complete. -The default is 10 but this can be changed using charge time = in profile pev.ini and evse.ini. -The charge time should be the same for PEV-HLE and EVSE-HLE when running long tests. -

- session.settletime -

-The time in milliseconds allowed for the charging cycle to complete. -The default is 10 but this can be changed using settle time = in profile pev.ini and evse.ini. -The settle time should be the same for PEV-HLE and EVSE-HLE when running long tests. -

- session.counter -

-The number of chaging session that have take place. -This variable is not part of the SLAC protocol. -The PEV-HLE and EVSE-HLE increment this counter each time they enter the Charging state and exchange this value in the unused CM_SLAC_PARAM.REW and CM_SLAC_PARAM.CNF message CipherSuite field. -Runtime options can be used to instruct either the PEV-HLE or EVSE-HLE to terminate if their counts are out-of-sync. -

- session.flags -

-A bit-mapped flagword used to control program flow based on user-specified command line options. -

- pev_cm_slac_param -

signed pev_cm_slac_param(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-PEV-HLE broadcasts CM_SLAC_PARAM.REQ messages and waits for a CM_SLAC_PARAM.CNF from EVSE-HLEs. -This is the first message sent and it initiates SLAC session one some EVSE-HLE responds. -Function pev_cm_slac_param copies session.APPLICATION_TYPE, session.SECURITY_TYPE and session.RunID into CM_SLAC_PARAM.REQ and broadcasts it to listening EVSE-HLE. -

-It is possible that multiple EVSE-HLEs will respond but one response is sufficient to proceed. -If a CM_SLAC_PARAM.CNF is not received within a reasonable time, PEV-HLE sends another another CM_SLAC_PARAM.REQ message. -PEV-HLE should compare the run identifier in the CM_SLAC_PARAM.CNF to that stored in the session variable to ensure that it is not processing CM_SLAC_PARAM.CNF messages from some other session. -PEV-HLE compares RunID, APPLICATION_TYPE and SECURITY_TYPE from CM_SLAC_PARAM.CNF to that stored in the session variable to ensure they have not changed. -PEV-HLE stores MSOUND_TARGET, NUM_SOUNDS and TIME_OUT in the session variable for later use. -

- evse_cm_slac_param -

signed evse_cm_slac_param(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-EVSE-HLE receives a CM_SLAC_PARAM.REQ and responds with a CM_SLAC_PARAM.CNF message. -This function waits indefinitly for CM_SLAC_PARAM.REQ then copies RunID, APPLICATION_TYPE and SECURITY_TYPE from CM_SLAC_PARAM.REQ to the session variable for later use. -It then copies session.MSOUND_TARGET, session.NUM_SOUNDS, session.TIME_OUT, session.RESP_TYPE, session.FORWARDING_STA, session.APPLICATION_TYPE, session.SECURITY_TYPE and session.RunID to CM_SLAC_PARAM.CNF and sends it unicast to the requesting PEV-HLE. -

- pev_cm_start_atten_char -

signed evse_cm_start_atten_char(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-PEV-HLE informs listening EVSE-HLE that sounding is about to start by broadcasting CM_START_ATTEN_CHAR.IND. -Function pev_cm_start_char copies session.NUM_SOUNDS, session.TIME_OUT, session.RESP_TYPE, session.FORWARDING_STA and session.RunID to CM_START_ATTEN_CHAR.IND. -

- The standard recommends that this message be sent three times. Our demonstration software does not do this. -

- evse_cm_start_atten_char -

signed evse_cm_start_atten_char(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-EVSE-HLE receives CM_START_ATTEN_CHAR from PEV-HLE and prepares to receive sounds by initializing msound counters and starting a timer. -This function compares RunID from CM_START_ATTEN_CHAR to session.RunID to ensure that this message belongs to a known session. -This function compares APPLICATION_TYPE, SECURITY_TYPE, NUM_SOUNDS, TIME_OUT, RESP_TYPE and FORWARDING_STA to the session variable to ensure that values have not changed. -

- pev_cm_mnbc_sound -

signed pev_cm_mnbc_sound(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-PEV-HLE sends periodic CM_MNBC_SOUND.IND to EVSE-HLE. -

- evse_cm_mnbc_sound -

signed evse_cm_mnbc_sound(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-EVSE-HLE receives interleaved CM_MNBC_SOUND.IND from PEV-HLE and CM_ATTEN_PROFILE.IND messages from EVSE-PLC. -This function maintains a running average of attenuation values across each carrier group in array session.AAG. -

- evse_cm_atten_char -

signed evse_cm_atten_char(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-EVSE-HLE sends CM_ATTEN_CHAR.IND to PEV-HLE. -This function copies session.AAG to CM_ATTEN_CHAR.IND. -

- pev_cm_atten_char -

signed pev_cm_atten_char(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-PEV-HLE receives CM_ATTEN_CHAR.IND from EVSE-HLE and acknwoledges with CM_ATTEN_CHAR.RSP. -

- pev_cm_slac_match -

signed pev_cm_slac_match(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-PEV-HLE sends CM_SLAC_MATCH.REQ to selected EVSE-HLE and waits for CM_SLAC_MATCH.CNF. -This function evaluates sounds across all carrier groups and compares result to some threshold and selects one EVSE-HLE. -This function copies session.APPLICAION_TYPE, session.SECURITY_TYPE, session.PEV_ID, session.PEV_MAC and session.RunID to CM_SLAC_PARAM.REQ and sends it unicast to the selected EVSE-HLE. -

- evse_cm_slac_match -

signed evse_cm_slac_match(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-EVSE-HLE listens for CM_SLAC_MATCH.REQ from PEV-HLE and abandons the session if no indication is received within a reasonable time. -If an indication is received then this function compares RunID from CM_SLAC_MATCH.REQ to the session.RunID to ensure the message is part of the current session. -This function compares APPLICATION_TYPE and SECURITY_TYPE to the session.APPLICATION_TYPE and session.SECURITY_TYPE to ensure that they have not changed. -This function copies PEV_ID and PEV_MAC from CM_SLAC_MATCH.REQ to the session variable for later use. -This function updates session.NMK and session.NID with random values. -This function copies session.EVSE_ID, session.EVSE_MAC, session.NMK and session.NID to CM_SLAC_MATCH.RSP and sends it unicast to the selecing PEV-HLE. -

- evse_cm_set_key -

signed evse_cm_mnbc_sound(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-

- pev_cm_set_key -

signed pev_cm_mnbc_sound(session,  
 channel,  
 message); 
struct session * session;
struct channel * channel;
struct message * message;
 

-

diff --git a/docbook/ch08.html b/docbook/ch08.html deleted file mode 100644 index cf1d43ab..00000000 --- a/docbook/ch08.html +++ /dev/null @@ -1,91 +0,0 @@ -Chapter 8.  Serial Drivers

Chapter 8.  - Serial Drivers -

Table of Contents

- Introduction -
- Principles of Operation -
- SPI Serial Driver -
- qcaspi_spi_thread -
- qcaspi_qca7k_sync -
- Register Functions -
- qcaspi_read_register -
- qcaspi_write_register -
- qcaspi_tx_cmd -
- Interrupt Functions -
- disable_spi_interrupts -
- enable_spi_interrupts -
- qcaspi_intr_handler -
- Transmit Functions -
- qcaspi_transmit -
- qcaspi_tx_frame -
- qcaspi_flush_txq -
- Receive Functions -
- qcaspi_receive -
- DMA Functions -
- qcaspi_dma_read_burst -
- qcaspi_dma_read_legacy -
- qcaspi_dma_write_burst -
- qcaspi_dma_write_legacy -
- Support Functions -
- QcaFrmCreateHeader -
- QcaFrmCreateFooter -
- QcaFrmFsmInit -
- QcaFrmFsmDecode -
- Kernel Functions -
- qcaspi_netdev_xmit -
- qcaspi_netdev_tx_timeout -
- qcaspi_netdev_uninit -
- qcaspi_netdev_get_stats -
- qcaspi_netdev_change_mtu -
- qcaspi_netdev_set_mac_address -
- qcaspi_netdev_close -
- qcaspi_mod_exit -

- Introduction -

- Most Qualcomm Atheros PLC chipsets are Ethernet-to-Powerline bridges but the QCA7000 is a Serial-to-Powerline bridge, ... with a big difference. The QCA7000 expects the host serial stream to be segmented into Ethernet frames where each frame is encapsulated by a distinct serial header and trailer. This means the host can format and transmit, or receive and decode, standard Ethernet 802.3 frames over an ordinary SPI or UART interface thereby enabling full Ethernet or Internet protocol communications over powerline at low cost and low speed. The enabling component here is an Ethernet-to-Serial driver that supports the SPI or UART interface connected to the QCA7000. This section covers such a driver. -

- The example driver described here was written for the Freescale iMX28 board support package running a custom Freescale Linux distribution. As such, we believe that this driver is suitable for the iMX28 processor out of the box but it could be adapted to other processors. -

diff --git a/docbook/ch08s02.html b/docbook/ch08s02.html deleted file mode 100644 index 87649c2b..00000000 --- a/docbook/ch08s02.html +++ /dev/null @@ -1,195 +0,0 @@ -Principles of Operation

- Principles of Operation -

- The basic unit of data transfer over MII and powerline is the IEEE 802.3 Ethernet frame. On output, the host must encapsulate each Ethernet frame as shown below before serial transmission to the QCA7000. The QCA7000 strips off the serial header and footer and forwards the frame over powerline. -

Table 8.1.  - SPI Transmit Frame -

- Allocate a 1528-byte buffer to accommodate the largest outgoing serial packet and pad with NUL bytes. Write SOF, compute and write FL, copy the outgoing frame then write EOF. Serially transmit FL + 12 buffer bytes to the QCA7000. -

- Offset - - Length - - Symbol - - Description -
- 0x0000 - - 4 - - SOF - - Start Of Frame. Must be 0xAAAAAAAA. -
- 0x0004 - - 2 - - FL - - The Ethernet frame length in little endian format. The frame starts at offset 0x0008 here and includes all fields up to but excluding EOF. The minimum is 60. The maximum is 1518 if VLAN is omitted and 1522 if not. -
- 0x0006 - - 2 - - RSVD - - Must be 0x0000. Reserved to ensure 4-byte frame alignment. -
- 0x0008 - - 6 - - DA - - Destination address. -
- 0x000E - - 6 - - SA - - Source address. This must not be the MAC address of the powerline device. This must be the MAC address of the local host serial interface as assigned by the SP or UART driver. The PLC device and the associated host interface must have different MAC address. -
- 0x0014 - - 4 - - VLAN - - Virtual LAN tag. This field may be omitted. -
- 0x0018 - - 2 - - ET - - Ethertype. This field starts at offset 0x0014 if VLAN is omitted. -
- 0x001A - - 42 to 1500 - - BODY - - Frame body. This field starts at offset 0x0016 and ranges from 46 to 1500 bytes if VLAN is omitted. -
- 0x004A to 0x05F8 - - 4 - - EOF - - End Of Frame. Must be 0x5555. This field starts at offset 0x0008 plus FL. -

Table 8.2.  - SPI Receive Frame -

- The SPI read frame occurs in response to a read interrupt generated by the QCA7000. The host must acknowledge a read interrupt and service it by reading and acting on QCA7000 SPI register values. For incoming frames, the host reads the 32-bit overall packet length reported by the QCA7000 then read that many bytes, stripping off the serial header and footer and forwarding the Ethernet frame to the host. -

- Allocate a 1532-byte buffer to accomodate the largest incoming serial packet. Read LEN to determine the size of the incoming serial packet. Read LEN bytes into the buffer. Beware that LEN is a multiple of 4-bytes so there may be a few trailing NUL bytes in buffer. -

- Offset - - Length - - Symbol - - Description -
- 0x0000 - - 4 - - LEN - - Hardware generated packet length. This field is only generated for SPI packets, not the UART packets. -
- 0x0004 - - 4 - - SOF - - Start Of Frame. Must be 0xAAAAAAAA. -
- 0x0008 - - 2 - - FL - - Ethernet frame length in little endian format. The frame starts at offset 0x000C here and includes all fields up to but excluding EOF. The minimum length is 60. The maximum is 1518 if VLAN is omitted and 1522 if not. -
- 0x000A - - 2 - - RSVD - - Must be 0x0000. Reserved to ensure 4-byte frame alignment. -
- 0x000C - - 6 - - DA - - Destination address. -
- 0x0012 - - 6 - - SA - - Source address. This must not be the MAC address of the powerline device. This must be the MAC address of the local host serial interface as assigned by the SP or UART driver. The PLC device and the associated host interface must have different MAC address. -
- 0x0018 - - 4 - - VLAN - - Virtual LAN tag. This field may be omitted. -
- 0x001C - - 2 - - ET - - Ethertype. This field starts offset 0x0018 if VLAN is omitted. -
- 0x001E - - 42 to 1500 - - BODY - - Frame body. This field starts at offset 0x001A and ranges from 46 to 1500 bytes if VLAN is omitted. -
- 0x004A to 0x05F8 - - 4 - - EOF - - End Of Frame. Must be 0x5555. This field starts at offset 0x000C plus FL. -

diff --git a/docbook/ch08s03.html b/docbook/ch08s03.html deleted file mode 100644 index deba1438..00000000 --- a/docbook/ch08s03.html +++ /dev/null @@ -1,21 +0,0 @@ -SPI Serial Driver

- SPI Serial Driver -

- qcaspi_spi_thread -

static int qcaspi_spi_thread(data); 
char void * data;
 

- Manages synchronization with the exteranl QCA7000. - Handles interrupts fomr the external QCA7000. - Transmits frames for the transmit queue to the QCA7000. -

- qcaspi_qca7k_sync -

void qca_qca7k_sync(qca,  
 event); 
char struct qcaspi * qca;
int event;
 

- Keeps track of the current synchonization state. -

diff --git a/docbook/ch08s04.html b/docbook/ch08s04.html deleted file mode 100644 index 1188b3ed..00000000 --- a/docbook/ch08s04.html +++ /dev/null @@ -1,23 +0,0 @@ -Register Functions

- Register Functions -

- qcaspi_read_register -

uint16_t qcaspi_read_register(qca,  
 reg); 
struct qcaspi * qca;
uint16_t reg;
 

- Reads a QCA7000 register and returns register content. -

- qcaspi_write_register -

void qcaspi_write_register(qca,  
 reg,  
 value); 
struct qcaspi * qca;
uint16_t reg;
uint16_t value;
 

- Write a value into a QCA7000 register. -

- qcaspi_tx_cmd -

int qcaspi_tx_cmd(qca,  
 cmd); 
struct qcaspi * qca;
uint16_t cmd;
 

- Transmit a 16-bit command to the QCA7000. This is currently used when performing a legacy DMA read or write. -

diff --git a/docbook/ch08s05.html b/docbook/ch08s05.html deleted file mode 100644 index b0a67f0b..00000000 --- a/docbook/ch08s05.html +++ /dev/null @@ -1,23 +0,0 @@ -Interrupt Functions

- Interrupt Functions -

- disable_spi_interrupts -

uint32_t disable_spi_interrupts(qca); 
struct qcaspi * qca;
 

- Disables interrupts by writing 0 to the QCA7000 INTR_ENABLE register. -

- enable_spi_interrupts -

uint32_t enable_spi_interrupts(qca,  
 intr_enable); 
struct qcaspi * qca;
uint32_t intr_enable;
 

- Enables interrupts specified by writing to the QCA7000 INTR_ENABLE register and returns the previous register value. -

- qcaspi_intr_handler -

static irqreturn_t qcaspi_intr_handler(irq,  
 data); 
int irq;
void * data;
 

- Called to service interrupts on rising edge of the QCA7000 interrupt line. -

diff --git a/docbook/ch08s06.html b/docbook/ch08s06.html deleted file mode 100644 index d6530bdf..00000000 --- a/docbook/ch08s06.html +++ /dev/null @@ -1,23 +0,0 @@ -Transmit Functions

- Transmit Functions -

- qcaspi_transmit -

int qcaspi_transmit(qca); 
struct qcaspi * qca;
 

- Transmit as many frames as possible from the transmit queue. -

- qcaspi_tx_frame -

int qcaspi_tx_frame(qca,  
 skb); 
struct qcaspi * qca;
struct sk_buff * skb;
 

- Transmit a single socket buffer over the SPI interface. -

- qcaspi_flush_txq -

void qcaspi_flush_txq(qca); 
struct qcaspi * qca;
 

- Flush the transmit queue. Typically called when a synchronization issue is detected between the SPI master (host) and SPI slave (QCA7000). -

diff --git a/docbook/ch08s07.html b/docbook/ch08s07.html deleted file mode 100644 index 38f860c4..00000000 --- a/docbook/ch08s07.html +++ /dev/null @@ -1,15 +0,0 @@ -Receive Functions

- Receive Functions -

- qcaspi_receive -

int qcaspi_receive(qca); 
struct qcaspi * qca;
 

- Reads the QCA7000 read buffer bytes register and reads all available data from the QCA7000. Calls function to parse out the individual Ethernet frames and passes them to the Linux kernel protocol stack. -

diff --git a/docbook/ch08s08.html b/docbook/ch08s08.html deleted file mode 100644 index fb807a17..00000000 --- a/docbook/ch08s08.html +++ /dev/null @@ -1,27 +0,0 @@ -DMA Functions

- DMA Functions -

- qcaspi_dma_read_burst -

uint32_t qcaspi_dma_read_burst(qca,  
 buffer,  
 length); 
struct qcaspi * qca;
uint8_t * buffer;
uint32_t length;
 

- Performs QCA7000 DMA burst read. -

- qcaspi_dma_read_legacy -

uint32_t qcaspi_dma_read_legacy(qca,  
 buffer,  
 length); 
struct qcaspi * qca;
uint8_t * buffer;
uint32_t length;
 

- Performs QCA7000 DMA legacy read. -

- qcaspi_dma_write_burst -

uint32_t qcaspi_dma_write_burst(qca,  
 buffer,  
 length); 
struct qcaspi * qca;
uint8_t * buffer;
uint32_t length;
 

- Called by qcaspi_tx_frame to peform a DMA burst write instead of a legacy write. -

- qcaspi_dma_write_legacy -

uint32_t qcaspi_dma_write_legacy(qca,  
 buffer,  
 length); 
struct qcaspi * qca;
uint8_t * buffer;
uint32_t length;
 

- Called by qcaspi_tx_frame to peform a DMA legacy write instead of a burst write. -

diff --git a/docbook/ch08s09.html b/docbook/ch08s09.html deleted file mode 100644 index 7cc2bac8..00000000 --- a/docbook/ch08s09.html +++ /dev/null @@ -1,27 +0,0 @@ -Support Functions

- Support Functions -

- QcaFrmCreateHeader -

uint32_t QcaFrmCreateHeader(buffer,  
 length); 
uint8_t * buffer;
uint16_t length;
 

- Encode buffer with the required SPI header and overall frame length. -

- QcaFrmCreateFooter -

uint32_t QcaFrmCreateFooter(buffer); 
uint8_t * buffer;
 

- Encode buffer with the required SPI footer. -

- QcaFrmFsmInit -

void QcaFrmFsmInit(frmHdl); 
QcaFrmHdl * frmHdl;
 

- Initialize the state machine used to decode the incoming QCA7000 byte stream. -

- QcaFrmFsmDecode -

uint32_t QcaFrmFsmDecode(frmHdl,  
 buffer,  
 length,  
 bytevalue); 
QcaFrmHdl * frmHdl;
uint8_t * buffer;
uint16_t length;
uint8_t bytevalue;
 

- Feeds incoming bytes into the state machine and breaks the stream into individual frames. Frames are passed to the Linux kernel. -

diff --git a/docbook/ch08s10.html b/docbook/ch08s10.html deleted file mode 100644 index 134ef1d2..00000000 --- a/docbook/ch08s10.html +++ /dev/null @@ -1,41 +0,0 @@ -Kernel Functions

- Kernel Functions -

- qcaspi_netdev_xmit -

int qcaspi_netdev_xmit(skb,  
 device); 
struct sk_buff * skb;
struct net_device * device;
 

- Called by the Linux kernel append outgoing frames to the transmit queue. -

- qcaspi_netdev_tx_timeout -

void qcaspi_netdev_tx_timeout(device); 
struct net_device * device;
 

- Called by the Linux kernel after the transmit queue has been stopped for an extended period of time. -

- qcaspi_netdev_uninit -

static void qcaspi_netdev_uninit(device); 
struct net_device * device;
 

- Called when function unregister_netdev is called. For the QCA7000 driver, function qcaspi_mod_exit calls function unregister_netdev. -

- qcaspi_netdev_get_stats -

struct net_device_stats * qcaspi_netdev_get_stats(device); 
struct net_device * device;
 

- Returns transmit, receive and error statistics associated with the net device. These are the statistics displayed by ifconfig. -

- qcaspi_netdev_change_mtu -

int qcaspi_netdev_change_mtu(device,  
 new_mtu); 
struct net_device * device;
int new_mtu;
 

- Changes the serial interface MTU size. -

- qcaspi_netdev_set_mac_address -

static int qcaspi_netdev_set_mac_address(device,  
 memory); 
struct net_device * device;
void * memory;
 

- Sets the serial interface MAC address. Called by ifconfig whenever user types ifconfig qca0 hw ether xx:xx:xx:xx:xx:xx. -

- qcaspi_netdev_close -

int qcaspi_netdev_close(device); 
struct net_device * device;
 

- Called by ifconfig to disable the network interface. -

- qcaspi_mod_exit -

static void qcaspi_mod_exit(void); 
void;
 

- Called by the kernel to shutdown the driver module. -

diff --git a/docbook/channel.c.html b/docbook/channel.c.html deleted file mode 100644 index 8c644d9a..00000000 --- a/docbook/channel.c.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - channel.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   channel.c - global channel structure;
- *
- *   channel.h
- *
- *   define and initialize a global channel structure; this structure
- *   is initialized for communication with Atheros devices and it is
- *   referenced by Atheros Linux Toolkit programs that do not need a
- *   full int6k data structure;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHANNEL_SOURCE
-#define CHANNEL_SOURCE
-
-#include "../ether/channel.h"
-
-struct channel channel =
-
-{
-	(file_t)(-1),
-	0,
-	CHANNEL_ETHNUMBER,
-	CHANNEL_ETHDEVICE,
-	{
-		0x00,
-		0xB0,
-		0x52,
-		0x00,
-		0x00,
-		0x01
-	},
-	{
-		0x00,
-		0x00,
-		0x00,
-		0x00,
-		0x00,
-		0x00
-	},
-	0x88E1,
-
-#if defined (__linux__)
-
-#elif defined (__APPLE__) || defined (__OpenBSD__)
-
-	(struct bpf *) (0),
-
-#elif defined (WINPCAP) || defined (LIBPCAP)
-
-	(pcap_t *)(0),
-	{
-		0
-	},
-
-#else
-#error "Unknown Environment"
-#endif
-
-	CHANNEL_TIMEOUT,
-	CHANNEL_TIMEOUT,
-	CHANNEL_FLAGS
-};
-
-#endif
-
-
-
- - - diff --git a/docbook/channel.h.html b/docbook/channel.h.html deleted file mode 100644 index 344ebb2a..00000000 --- a/docbook/channel.h.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - channel.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   channel.h - raw packet channel definitions and declarations;
- *
- *   the channel structure contains information needed to perform
- *   ISO Layer 2, raw packet I/O in a variety of environments;
- *
- *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
- *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
- *;  For demonstration and evaluation only; Not for production use.
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nathaniel.houghton@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHANNEL_HEADER
-#define CHANNEL_HEADER
-
-/*====================================================================*
- *  system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-
-/*====================================================================*
- *  custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../ether/ether.h"
-#include "../tools/types.h"
-
-/*====================================================================*
- *   sort out the raw socket mess;
- *--------------------------------------------------------------------*/
-
-#if defined (__linux__) || defined (__APPLE__) || defined (__OpenBSD__)
-#       ifdef WINPCAP
-#               error "Don't enable winpcap on Linux. It won't work."
-#               endif
-#       ifdef LIBPCAP
-#               error "Don't enable libpcap on Linux. You don't need it."
-#               endif
-#elif defined (WIN32)
-#       ifndef WINPCAP
-#               error "Define preprocessor constant WINPCAP on Windows."
-#               endif
-#       ifdef LIBPCAP
-#               error "Don't enable libpcap on Windows. It won't work."
-#               endif
-#elif defined (__CYGWIN__)
-# 	error "cygwin is unsupported!"
-#else
-#       error "unknown environment"
-#endif
-
-/*====================================================================*
- *   channel flagword bitmasks;
- *--------------------------------------------------------------------*/
-
-#define CHANNEL_VERBOSE (1 << 0)
-#define CHANNEL_SILENCE (1 << 1)
-#define CHANNEL_WARNING (1 << 2)
-#define CHANNEL_SUCCESS (1 << 3)
-#define CHANNEL_FAILURE (1 << 4)
-#define CHANNEL_MONITOR (1 << 5)
-
-#define CHANNEL_UPDATE_TARGET (1 << 5) /* used by efsu only */
-#define CHANNEL_UPDATE_SOURCE (1 << 6) /* used by efsu only */
-#define CHANNEL_LISTEN (1 << 7)        /* used by efsu only */
-
-#define CHANNEL_ETHNUMBER 2
-#if defined (__linux__)
-#       define CHANNEL_ETHDEVICE "eth1"
-#elif defined (__APPLE__)
-#       define CHANNEL_ETHDEVICE "en0"
-#       define CHANNEL_BPFDEVICE "/dev/bpf%d"
-#elif defined (__OpenBSD__)
-#       define CHANNEL_ETHDEVICE "bce0"
-#       define CHANNEL_BPFDEVICE "/dev/bpf%d"
-#else
-#       define CHANNEL_ETHDEVICE "nic1"
-#endif
-
-#define CHANNEL_FOREVER (unsigned)(-1)
-#define CHANNEL_BAILOUT 0
-#define CHANNEL_FLAGS 0
-
-#if defined (WIN32)
-#define CHANNEL_CAPTURE 50 
-#define CHANNEL_TIMEOUT 200   
-#else
-#define CHANNEL_CAPTURE 15 
-#define CHANNEL_TIMEOUT 50   
-#endif
-
-/*====================================================================*
- *   common channel error messages;
- *--------------------------------------------------------------------*/
-
-#define CHANNEL_CANTSEND "%s: Send timeout or network error", __func__
-#define CHANNEL_CANTREAD "%s: Read timeout or network error", __func__
-
-/*====================================================================*
- *   channel ethertype definitions;
- *--------------------------------------------------------------------*/
-
-#if !defined (__linux__)
-#       define ETH_P_802_2 1
-#endif
-
-/*====================================================================*
- *   communication channel structure;
- *--------------------------------------------------------------------*/
-
-typedef struct channel
-
-{
-	signed fd;
-	signed ifstate;
-	signed ifindex;
-	char const * ifname;
-	uint8_t peer [ETHER_ADDR_LEN];
-	uint8_t host [ETHER_ADDR_LEN];
-	uint16_t type;
-
-#if defined (__linux__)
-
-#elif defined (__APPLE__) || defined (__OpenBSD__)
-
-	struct bpf
-	{
-		signed bpf_length;
-		uint8_t * bpf_buffer;
-		uint8_t * bpf_bp;
-		signed bpf_bufused;
-	}
-	* bpf;
-
-#elif defined (WINPCAP) || defined (LIBPCAP)
-
-	pcap_t * socket;
-	char errbuf [PCAP_ERRBUF_SIZE];
-
-#else
-#error "Unknown Environment"
-#endif
-
-	signed capture;
-	signed timeout;
-	flag_t flags;
-}
-
-CHANNEL;
-
-/*====================================================================*
- *   channel functions;
- *--------------------------------------------------------------------*/
-
-signed openchannel (struct channel *);
-signed closechannel (struct channel const *);
-ssize_t sendpacket (struct channel const *, void * memory, ssize_t extent);
-ssize_t readpacket (struct channel const *, void * memory, ssize_t extent);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/chars.h.html b/docbook/chars.h.html deleted file mode 100644 index f0dc0f93..00000000 --- a/docbook/chars.h.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - chars.h - - - - - - - - - -
-/*====================================================================*
- *
- *   chars.h - character selection and matcing macros;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHARS_HEADER
-#define CHARS_HEADER
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#ifndef isblank
-#ifndef __CYGWIN__
-#define isblank(c) ((char)(c) == ' ') || ((char)(c) == '\t')
-#endif
-#endif
-
-#ifndef nobreak
-#define nobreak(c) ((char)(c) != '\n') && ((int)(c) != EOF)
-#endif
-
-#ifndef isquote
-#define isquote(c) ((char)(c) == '\'') || ((char)(c) == '\"')
-#endif
-
-#ifndef isslash
-#define isslash(c) ((char)(c) == '/') || ((char)(c) == '\\')
-#endif
-
-#ifndef isident
-#define isident(c) (isalnum (c) || (c == '_') || (c == '-') || (c == '.') || (c == ':'))
-#endif
-
-#ifndef isoctal
-#define isoctal(c) ((char)(c) >= '0') && ((char)(c) <= '7')
-#endif
-
-#ifndef nomatch
-#define nomatch(c,o) ((char)(c) != (char)(o)) && ((int)(c) != EOF)
-#endif
-
-#ifndef iskey
-#define iskey(c) ((int)(c) < 0x20) || ((int)(c) > 0x7E)
-#endif
-
-/*====================================================================*
- *   end definitions;
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/checkfilename.c.html b/docbook/checkfilename.c.html deleted file mode 100644 index 6b766bde..00000000 --- a/docbook/checkfilename.c.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - checkfilename.c - - - - - - - - - -
-/*====================================================================*
- *
- *   bool checkfilename (char const * pathname);
- *
- *   files.h
- *
- *   confirm that the filename portion of a pathname string contains
- *   only letters, digits, periods, underscores and hyphens;
- *
- *   this prevents users from entering an Ethernet address where a
- *   filename should appear on the command line; Ethernet addresses
- *   are also valid filenames;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHECKFILENAME_SOURCE
-#define CHECKFILENAME_SOURCE
-
-#include <string.h>
-#include <ctype.h>
-
-#include "../tools/files.h"
-
-bool checkfilename (char const * pathname)
-
-{
-	char const * filename = pathname;
-	while (*pathname)
-	{
-		if ((*pathname == '/') || (*pathname == '\\'))
-		{
-			filename = pathname + 1;
-		}
-		pathname++;
-	}
-	while (isalnum (*filename) || (*filename == '.') || (*filename == '_') || (*filename == '-'))
-	{
-		filename++;
-	}
-	return (*filename == (char) (0));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/checksum32.c.html b/docbook/checksum32.c.html deleted file mode 100644 index 4c63f63d..00000000 --- a/docbook/checksum32.c.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - checksum32.c - - - - - - - - - -
-/*====================================================================*
- *
- *   uint32_t checksum32 (void const * memory, size_t extent, uint32_t checksum);
- *
- *   memory.h
- *
- *   compute the 32 bit checksum of a memory segment; the calculated
- *   checksum is the one's complement of the XOR of all 32-bit words;
- *   this means that extent should be an even multiple of 4-bytes or
- *   trailing bytes will be excluded from the calculation;
- *
- *   set checksum argument to 0 when the memory region does not
- *   include the previous checksum value;
- *
- *   set checksum argument to the previous checksum value when the
- *   memory region includes the previous checksum value; this will
- *   effectively cancel-out the previous checksum value;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHECKSUM32_SOURCE
-#define CHECKSUM32_SOURCE
-
-#include <stdint.h>
-#include <memory.h>
-
-#include "../tools/memory.h"
-
-uint32_t checksum32 (register void const * memory, register size_t extent, register uint32_t checksum)
-
-{
-
-#ifdef __GNUC__
-
-	while (extent >= sizeof (checksum))
-	{
-		checksum ^= *(typeof (checksum) *)(memory);
-		memory += sizeof (checksum);
-		extent -= sizeof (checksum);
-	}
-
-#else
-
-	uint32_t * offset = (uint32_t *)(memory);
-	while (extent >= sizeof (* offset))
-	{
-		checksum ^= *offset++;
-		extent -= sizeof (* offset);
-	}
-
-#endif
-
-	return (~checksum);
-}
-
-/*====================================================================*
- *   demo/test program;
- *--------------------------------------------------------------------*/
-
-#if 0
-#include <stdio.h>
-
-int main (int argc, char const * argv [])
-
-{
-	uint32_t data [100];
-	read (0, data, sizeof (data));
-	data [10] = 0;
-	data [10] = checksum32 (data, sizeof (data), data [10]);
-	printf ("data [10] = 0x%08x\n", data [10]);
-	data [10] = checksum32 (data, sizeof (data), data [10]);
-	printf ("data [10] = 0x%08x\n", data [10]);
-	data [10] = checksum32 (data, sizeof (data), 0);
-	printf ("data [10] = 0x%08x\n", data [10]);
-	data [10] = checksum32 (data, sizeof (data), 0);
-	printf ("data [10] = 0x%08x\n", data [10]);
-	return (0);
-}
-
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/chipset.c.html b/docbook/chipset.c.html deleted file mode 100644 index cdf52ed1..00000000 --- a/docbook/chipset.c.html +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - chipset.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHIPSET_SOURCE
-#define CHIPSET_SOURCE
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../plc/plc.h"
-#include "../tools/types.h"
-#include "../tools/symbol.h"
-
-/*====================================================================*
- *
- *   char const * chipsetname (uint8_t MDEVICE)
- *
- *   plc.h
- *
- *   return the ASCII name string associated with the MDEVICE_CLASS
- *   field in the VS_SW_VER.CNF message; this field represents the
- *   chipset family or class of device;
- *
- *   the MDEVICE_CLASS field was named MDEVICEID at one time;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-char const * chipsetname (uint8_t MDEVICE_CLASS)
-
-{
-	static const struct _type_ chipname [] =
-	{
-		{
-			CHIPSET_UNKNOWN,
-			"UNKNOWN"
-		},
-		{
-			CHIPSET_INT6000A1,
-			"INT6000"
-		},
-		{
-			CHIPSET_INT6300A0,
-			"INT6300"
-		},
-		{
-			CHIPSET_INT6400A0,
-			"INT6400"
-		},
-		{
-			CHIPSET_AR7400A0,
-			" AR7400"
-		},
-		{
-			CHIPSET_AR6405A0,
-			" AR6405"
-		},
-		{
-			CHIPSET_PANTHER_LYNX,
-			"PANTHER/LYNX"
-		},
-		{
-			CHIPSET_QCA7450A0,
-			"QCA7450"
-		},
-		{
-			CHIPSET_QCA7451A0,
-			"QCA7451"
-		},
-		{
-			CHIPSET_QCA7420A0,
-			"QCA7420"
-		},
-		{
-			CHIPSET_QCA6410A0,
-			"QCA6410"
-		},
-		{
-			CHIPSET_QCA7000A0,
-			"QCA7000"
-		},
-		{
-			CHIPSET_QCA7005A0,
-			"QCA7005"
-		},
-		{
-			CHIPSET_QCA7500A0,
-			"QCA7500"
-		}
-	};
-	return (typename (chipname, SIZEOF (chipname), MDEVICE_CLASS, chipname [0].name));
-}
-
-/*====================================================================*
- *
- *   void chipset (void const * memory);
- *
- *   Chipset.h
- *
- *   replace VS_SW_VER message MDEVICE_CLASS field with correct value;
- *   the MDEVICE_CLASS field was named MDEVICEID at one time;
- *
- *   Atheros chipsets are identified by code in the VS_SW_VER vendor
- *   specific management message; the chipset [] vector translates a
- *   chipset code to a chipset name;
- *
- *   the basic assumption is that the firmware always tells the truth
- *   but the bootrom does not; because of engineering changes, the
- *   firmware uses a different device identification scheme than that
- *   used by the bootrom and that information appears in different
- *   locations depending on the source of the VS_SW_VER confirmation;
- *   see the Programmer's Guide for more information.
- *
- *   INT6000   0x01 / 0x01  0x00000042 / NA
- *   INT6300   0x01 / 0x02  0x00006300 / NA
- *   INT6400   0x03 / 0x03  0x00006400 / NA
- *    AR7400   0x03 / 0x04  0x00007400 / NA
- *    AR6405   0x03 / 0x05  0x00006400 / NA
- *   QCA7450   0x03 / 0x20  0x0F001D1A / NA
- *   QCA7420   0x06 / 0x20  0x001CFCFC
- *   QCA6410   0x06 / 0x21  0x001B58EC
- *   QCA6411   0x06 / 0x21  0x001B58BC
- *   QCA7000   0x06 / 0x22  0x001B589C
- *   QCA7000   0x06 / 0x22  0x001B58DC
- *   QCA7005   0x06 / 0x22  0x001B587C
- *   QCA7500   0x06 / 0x30  0x001D4C0F
- *
- *   some chipsets have have multiple STRAP field values; this is
- *   not an error; there may be multiple versions of a chipset;
- *
- *--------------------------------------------------------------------*/
-
-void chipset (void const * memory)
-
-{
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICE_CLASS;
-		uint8_t MVERLENGTH;
-		char MVERSION [254];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (memory);
-	struct __packed chipinfo
-	{
-		uint8_t RESVD;
-		uint32_t STRAP;
-		uint32_t STEP_NUMBER;
-	}
-	* chipinfo = (struct chipinfo *) (& confirm->MVERSION [64]);
-	typedef struct __packed
-	{
-		uint32_t STRAP;
-		uint8_t CLASS;
-		uint8_t DEVICE;
-	}
-	chipdata;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	chipdata bootrom [] =
-	{
-		{
-			0x00000042,
-			0x01,
-			CHIPSET_INT6000A1
-		},
-		{
-			0x00006300,
-			0x01,
-			CHIPSET_INT6300A0
-		},
-		{
-			0x00006400,
-			0x03,
-			CHIPSET_INT6400A0
-		},
-		{
-			0x00007400,
-			0x03,
-			CHIPSET_AR7400A0
-		},
-		{
-			0x0F001D1A,
-			0x03,
-			CHIPSET_QCA7450A0
-		},
-		{
-			0x0E001D1A,
-			0x03,
-			CHIPSET_QCA7451A0
-		},
-		{
-			0x001CFC00,
-			0x05,
-			CHIPSET_QCA7420A0
-		},
-		{
-			0x001CFCFC,
-			0x05,
-			CHIPSET_QCA7420A0
-		},
-		{
-			0x001CFCFC,
-			0x06,
-			CHIPSET_QCA7420A0
-		},
-		{
-			0x001B58EC,
-			0x06,
-			CHIPSET_QCA6410A0
-		},
-		{
-			0x001B58BC,
-			0x06,
-			CHIPSET_QCA6411A0
-		},
-		{
-			0x001B58DC,
-			0x06,
-			CHIPSET_QCA7000A0
-		},
-		{
-			0x001B587C,
-			0x06,
-			CHIPSET_QCA7005A0
-		},
-		{
-			0x001D4C00,
-			0x06,
-			CHIPSET_QCA7500A0
-		},
-		{
-			0x001D4C0F,
-			0x06,
-			CHIPSET_QCA7500A0
-		}
-	};
-	chipdata firmware [] =
-	{
-		{
-			0x00000000,
-			0x01,
-			CHIPSET_INT6000A1
-		},
-		{
-			0x00000000,
-			0x02,
-			CHIPSET_INT6300A0
-		},
-		{
-			0x00000000,
-			0x03,
-			CHIPSET_INT6400A0
-		},
-		{
-			0x00000000,
-			0x05,
-			CHIPSET_AR6405A0
-		},
-		{
-			0x00000000,
-			0x04,
-			CHIPSET_AR7400A0
-		},
-		{
-			0x0F001D1A,
-			0x20,
-			CHIPSET_QCA7450A0
-		},
-		{
-			0x0E001D1A,
-			0x20,
-			CHIPSET_QCA7451A0
-		},
-		{
-			0x001CFCFC,
-			0x20,
-			CHIPSET_QCA7420A0
-		},
-		{
-			0x001B58EC,
-			0x21,
-			CHIPSET_QCA6410A0
-		},
-		{
-			0x001B58BC,
-			0x21,
-			CHIPSET_QCA6411A0
-		},
-		{
-			0x001B58DC,
-			0x22,
-			CHIPSET_QCA7000A0
-		},
-		{
-			0x001D4C00,
-			0x30,
-			CHIPSET_QCA7500A0
-		},
-		{
-			0x001D4C0F,
-			0x30,
-			CHIPSET_QCA7500A0
-		}
-	};
-	unsigned chip;
-	if (! strcmp (confirm->MVERSION, "BootLoader"))
-	{
-		for (chip = 0; chip < SIZEOF (bootrom); chip++)
-		{
-			if (bootrom [chip].CLASS != confirm->MDEVICE_CLASS)
-			{
-				continue;
-			}
-			if (bootrom [chip].STRAP != LE32TOH (chipinfo->STRAP))
-			{
-				continue;
-			}
-			confirm->MDEVICE_CLASS = bootrom [chip].DEVICE;
-			return;
-		}
-	}
-	else 
-	{
-		for (chip = 0; chip < SIZEOF (firmware); chip++)
-		{
-			if (firmware [chip].CLASS != confirm->MDEVICE_CLASS)
-			{
-				continue;
-			}
-			if (firmware [chip].STRAP < CHIPSET_PANTHER_LYNX)
-			{
-				confirm->MDEVICE_CLASS = firmware [chip].DEVICE;
-				return;
-			}
-			chipinfo = (struct chipinfo *) (& confirm->MVERSION [64]);
-			if (firmware [chip].STRAP == LE32TOH (chipinfo->STRAP))
-			{
-				confirm->MDEVICE_CLASS = firmware [chip].DEVICE;
-				return;
-			}
-			chipinfo = (struct chipinfo *) (& confirm->MVERSION [128]);
-			if (firmware [chip].STRAP == LE32TOH (chipinfo->STRAP))
-			{
-				confirm->MDEVICE_CLASS = firmware [chip].DEVICE;
-				return;
-			}
-			chipinfo = (struct chipinfo *) (& confirm->MVERSION [253]);
-			if (firmware [chip].STRAP == LE32TOH (chipinfo->STRAP))
-			{
-				confirm->MDEVICE_CLASS = firmware [chip].DEVICE;
-				return;
-			}
-		}
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/chipset.h.html b/docbook/chipset.h.html deleted file mode 100644 index a16eff86..00000000 --- a/docbook/chipset.h.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - chipset.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHIPSET_HEADER
-#define CHIPSET_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define PLCHIPSET "PLCDEVICE"
-
-/*====================================================================*
- *   chipset codes returned in VS_SW_VER MDEVICE_CLASS field;
- *--------------------------------------------------------------------*/
-
-#define CHIPSET_UNKNOWN 0x00
-#define CHIPSET_INT6000A1 0x01
-#define CHIPSET_INT6300A0 0x02
-#define CHIPSET_INT6400A0 0x03
-#define CHIPSET_AR7400A0 0x04
-#define CHIPSET_AR6405A0 0x05
-#define CHIPSET_PANTHER_LYNX 0x06
-#define CHIPSET_QCA7450A0 0x07
-#define CHIPSET_QCA7451A0 0x08
-#define CHIPSET_QCA7452A0 0x09
-#define CHIPSET_QCA7420A0 0x20
-#define CHIPSET_QCA6410A0 0x21
-#define CHIPSET_QCA6411A0 0x21
-#define CHIPSET_QCA7000A0 0x22
-#define CHIPSET_QCA7000I 0x22
-#define CHIPSET_QCA7005A0 0x22
-#define CHIPSET_QCA7500A0 0x30
-
-/*
- * the following definitions define older constants in terms of
- * newer constants to avoid compiler errors; there is nothing
- * magic about the A0/A1 suffixes;
- */
-
-#define CHIPSET_INT6000 CHIPSET_INT6000A1
-#define CHIPSET_INT6300 CHIPSET_INT6300A0
-#define CHIPSET_INT6400 CHIPSET_INT6400A0
-#define CHIPSET_AR7400  CHIPSET_AR7400A0
-#define CHIPSET_INT6405 CHIPSET_AR6405A0
-#define CHIPSET_AR6405  CHIPSET_AR6405A0
-#define CHIPSET_QCA7450 CHIPSET_QCA7450A0
-#define CHIPSET_QCA7451 CHIPSET_QCA7451A0
-#define CHIPSET_QCA7452 CHIPSET_QCA7452A0
-#define CHIPSET_QCA7420 CHIPSET_QCA7420A0
-#define CHIPSET_QCA6410 CHIPSET_QCA6410A0
-#define CHIPSET_QCA6411 CHIPSET_QCA6411A0
-#define CHIPSET_QCA7000 CHIPSET_QCA7000A0
-#define CHIPSET_QCA7005 CHIPSET_QCA7005A0
-#define CHIPSET_QCA7500 CHIPSET_QCA7500A0
-
-/*====================================================================*
- *   chipset functions;
- *--------------------------------------------------------------------*/
-
-char const * chipsetname (uint8_t chipset);
-void chipset (void const * memory);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/chknvm.1.html b/docbook/chknvm.1.html deleted file mode 100644 index efd18b27..00000000 --- a/docbook/chknvm.1.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - chknvm.1 - - - - - - - - - -
-chknvm(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   chknvm(1)
-
-NAME
-       chknvm - Qualcomm Atheros PLC Image File Validator
-
-SYNOPSIS
-       chknvm [options] file [file] [...]
-
-DESCRIPTION
-       Validate  the image chain found inside a Qualcomm Atheros PLC firmware or parameter file by checking file structure, file
-       size, image header sizes and checksums and image sizes and checksums.  Optionally, display internal image header informa‐
-       tion  or information extracted from selected image types, when present.  Use this program to detect corrupted firmware or
-       parameter files or inspect image files to determine content.
-
-       This program handles both the older Thunderbolt and Lightning and the newer Panther and Lynx firmware file  formats.   It
-       validates files directly from disk and so it is slower than program chknvm2 but needs less memory at runtime.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -i     Print revision string identity fields in fixed-width columns.  This option is useful when searching  .nvm  folders
-              for a specific build.
-
-       -m     Display  manifest content, if present.  The manifest is a special module, included in some image chains, that con‐
-              tains useful information about the chain.  This option suppresses the summary 'looks good' message.
-
-       -r     Print firmware revision string on stdout.  This option suppresses the summary 'looks good' message.
-
-       -s     Print SDRAM configuration block on stdout.  This option automatically suppresses the summary 'looks good' message.
-
-       -q     Suppresses printing of routine messages.  Specifically, it suppresses the summary 'looks good' message.
-
-       -v     Print additional information such as the image header for each image processed.  This information can be  used  to
-              distinguish one firmware file from another, if you know what to look for.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   The name of an Atheros image file.  By convention, Atheros Image files have a .nvm file extension but this program
-              does not enforce this convention.
-
-DISCLAIMER
-       Qualcomm Atheros firmware file structure and content is proprietary to Qualcomm Atheros,  Ocala  FL  USA.   Consequently,
-       public information is not available.  Qualcomm Atheros reserves the right to change firmware file structure or content or
-       change the name or behavior of any program that inspects or changes firmware files, in future software  releases  without
-       any obligation to notify or compensate users of such programs.
-
-EXAMPLES
-       This example reads file abc.nvm and validates it.  The message shown indicates that the file is the correct length, image
-       headers and images have the correct length and checksum and there are no read errors.  The file can be  have  either  the
-       newer or older format.
-
-           # chknvm abc.nvm
-           abc.nvm looks good
-
-       The  following  example  reads three files in succession and reports on each one.  You can suppress good news with the -q
-       option.
-
-          # chknvm INT6400.nvm AR7400.nvm AR7420.nvm
-          INT6400.nvm looks good
-          AR7400.nvm looks good
-          AR7420.nvm looks good
-
-       This next example displays the SDRAM parameter block found in the named files.  SDRAM parameter blocks are a legacy  fea‐
-       ture.   They  were  to  configure  memory.   Powerline device now run a configuration applet, instead.  Observe that file
-       AR6400.nvm us the only one that contains SDRAM parameters.
-
-          # chknvm -s INT6400.nvm AR7400.nvm AR7420.nvm
-          ------- INT6400.nvm (0) -------
-                  SIZE=0x04000000 (64mb)
-                  CONF=0x00143188
-                  TIM0=0x01E1D491
-                  TIM1=0x000883D6
-                  CNTRL=0x00003089
-                  REF=0x00000366
-                  CLOCK=0x00000001
-
-       This next example prints the firmware revision string found inside older image files.  The option can be used to identify
-       the  actual  firmware  image  present  when  the  filename has been changed.  Newer image files have a manifest, instead.
-       Observe that file AR7420.nvm shows no firmware revision string because it has the newer image file format.
-
-          # chknvm -r INT6400.nvm AR7400.nvm AR7420.nvm
-          INT6400.nvm (3) INT6000-MAC-4-1-4122-01-4020-20100219-FINAL
-          AR7400.nvm (5) INT7400-MAC-7-0-7011-01-52-20110811-FINAL
-
-       This example prints the manifest found inside newer firmware files.  This can be used to distinguish firmware files  from
-       parameter  files,  determine  exact firmware or parameter file revisions and so forth.  Observe that we specified several
-       files on the command line but only one file, AR7420.nvm, contained a mainfest.
-
-          # chknvm -m INT6400.nvm AR7400.nvm AR7420.nvm
-          ------- AR7420.nvm (0) -------
-                  Signature: 1234ABCD
-                  Hardware Compatibility: AR74200
-                  Chain Major Version: 0
-                  Chain Minor Version: 1
-                  Chain Type: Firmware
-                  Build Major Version: 0
-                  Build Minor Version: 0
-                  Build Type: Special
-                  Manifest Version: 1
-                  Build Number: 0
-                  Build Date: 20110811
-                  Build Time: 203853
-                  Device Type: 29728
-                  Build Hostname: TOR-SW-SIM04
-                  Build Username: buildbot
-                  Build Description: Custom
-                  Build Version String: AR-7420-FW-0_0-0_2-20110811:203853-buildbot:TOR-SW-SIM04-1-0_1
-
-SEE ALSO
-       chknvm2(1), chkpib(1), chkpib2(1), int6ktest(7), nvmmerge(1), nvmsplit(1), plctest(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                   chknvm(1)
-
- - - diff --git a/docbook/chknvm.c.html b/docbook/chknvm.c.html deleted file mode 100644 index 1104695c..00000000 --- a/docbook/chknvm.c.html +++ /dev/null @@ -1,577 +0,0 @@ - - - - - - chknvm.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   chknvm.c
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <memory.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/memory.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/strfbits.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ram/sdrampeek.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvm.c"
-#include "../nvm/nvmpeek.c"
-#include "../nvm/nvmpeek1.c"
-#include "../nvm/nvmpeek2.c"
-#include "../nvm/manifest.c"
-#include "../nvm/fdmanifest.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define HARDWARE 0
-#define SOFTWARE 1
-#define VER 2
-#define REV 3
-#define BUILD 6
-#define DATE 7
-
-/*====================================================================*
- *
- *   unsigned string2vector (char ** vector, length, char * string, char c);
- *
- *   convert string to a vector and return vector count; split string
- *   on characer (c);
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static unsigned string2vector (char ** vector, char * string, char c)
-
-{
-	char ** origin = vector;
-	for (*vector++ = string; *string; string++)
-	{
-		if (*string == c)
-		{
-			*string++ = (char)(0);
-			*vector++ = string--;
-		}
-	}
-	*vector = (char *)(0);
-	return ((unsigned)(vector - origin));
-}
-
-/*====================================================================*
- *
- *   void firmware (signed fd, char const * filename, unsigned module, unsigned offset, flag_t flags);
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static void firmware (signed fd, char const * filename, unsigned module, unsigned offset, flag_t flags)
-
-{
-	char memory [512];
-	read (fd, memory, sizeof (memory));
-	lseek (fd, (off_t)(0) - sizeof (memory), SEEK_CUR);
-	if (_anyset (flags, NVM_FIRMWARE))
-	{
-		if ((*memory > 0x20) && (*memory < 0x7F))
-		{
-			printf ("%s (%d) %s\n", filename, module, memory);
-		}
-		else
-		{
-			printf ("%s (%d) %s\n", filename, module, memory + offset);
-		}
-	}
-	if (_anyset (flags, NVM_IDENTITY))
-	{
-		char * vector [16];
-		char buffer [256];
-		if ((* memory > 0x20) && (* memory < 0x7f))
-		{
-			strncpy (buffer, memory, sizeof (buffer));
-		}
-		else
-		{
-			strncpy (buffer, memory + offset, sizeof (buffer));
-		}
-		string2vector (vector, buffer, '-');
-		printf ("%s ", vector [HARDWARE]);
-		printf ("%04d ", atoi (vector [BUILD]));
-		printf ("%s ", vector [DATE]);
-		printf ("%s.", vector [VER]);
-		printf ("%s ", vector [REV]);
-		printf ("%s (%d)\n", filename, module);
-		return;
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   signed nvmchain1 (signed fd, char const * filename, flag_t flags);
- *
- *   validate a legcy PLC firmware file; return 0 on success or -1 on
- *   error;
- *
- *   keep as little information as possible in memory; this slows
- *   validation but minimizes the resources needed at runtime so
- *   that resource requirements do not grow with file size;
- *
- *   the checksum of the entire header, including header checksum, is
- *   always 0 for valid headers; similarly, the checksum of the module
- *   and module checksum is always 0 for valid modules;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed nvmchain1 (signed fd, char const * filename, flag_t flags)
-
-{
-	struct nvm_header1 nvm_header;
-	struct config_ram config_ram;
-	unsigned module = 0;
-	do
-	{
-		if (read (fd, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_CANTREAD, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		if (_anyset (flags, NVM_VERBOSE))
-		{
-			printf ("------- %s (%d) -------\n", filename, module);
-			nvmpeek1 (&nvm_header);
-		}
-		if (nvm_header.HEADERMINORVERSION)
-		{
-			if (LE32TOH (nvm_header.IMAGETYPE) == NVM_IMAGE_CONFIG_SYNOPSIS)
-			{
-				if (_anyset (flags, NVM_SDRAM))
-				{
-					printf ("------- %s (%d) -------\n", filename, module);
-					read (fd, &config_ram, sizeof (config_ram));
-					lseek (fd, (off_t)(0) - sizeof (config_ram), SEEK_CUR);
-					sdrampeek (&config_ram);
-				}
-			}
-			else if (LE32TOH (nvm_header.IMAGETYPE) == NVM_IMAGE_FIRMWARE)
-			{
-				firmware (fd, filename, module, 0x70, flags);
-			}
-		}
-		else if (!module)
-		{
-			if (_anyset (flags, NVM_SDRAM))
-			{
-				printf ("------- %s (%d) -------\n", filename, module);
-				read (fd, &config_ram, sizeof (config_ram));
-				lseek (fd, (off_t)(0) - sizeof (config_ram), SEEK_CUR);
-				sdrampeek (&config_ram);
-			}
-		}
-		else if (!nvm_header.NEXTHEADER)
-		{
-			firmware (fd, filename, module, 0x70, flags);
-		}
-		if (fdchecksum32 (fd, LE32TOH (nvm_header.IMAGELENGTH), nvm_header.IMAGECHECKSUM))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_IMG_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		module++;
-	}
-	while (nvm_header.NEXTHEADER);
-	if (lseek (fd, 0, SEEK_CUR) != lseek (fd, 0, SEEK_END))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, NVM_HDR_LINK, filename, module);
-		}
-		return (-1);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed nvmchain2 (signed fd, char const * filename, flag_t flags);
- *
- *   validate a PLC image file; return 0 on success or -1 on error;
- *
- *   keep as little information as possible in memory; this slows
- *   validation but minimizes the resources needed at runtime so
- *   that resource requirements do not grow with file size;
- *
- *   the checksum of the entire header, including header checksum, is
- *   always 0 for valid headers; similarly, the checksum of the module
- *   and module checksum is always 0 for valid modules;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed nvmchain2 (signed fd, char const * filename, flag_t flags)
-
-{
-	struct nvm_header2 nvm_header;
-	unsigned module = 0;
-	uint32_t origin = ~0;
-	uint32_t offset = 0;
-	do
-	{
-		if (read (fd, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_CANTREAD, filename, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header.MajorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header.MinorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header.PrevHeader) != origin)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_LINK, filename, module);
-			}
-			return (-1);
-		}
-		if (_anyset (flags, NVM_VERBOSE))
-		{
-			printf ("------- %s (%d) -------\n", filename, module);
-			nvmpeek2 (&nvm_header);
-		}
-		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_MANIFEST)
-		{
-			if (_anyset (flags, NVM_MANIFEST))
-			{
-				fdmanifest (fd, filename, &nvm_header, module);
-				return (0);
-			}
-		}
-		if (fdchecksum32 (fd, LE32TOH (nvm_header.ImageLength), nvm_header.ImageChecksum))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_IMG_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		origin = offset;
-		offset = LE32TOH (nvm_header.NextHeader);
-		module++;
-	}
-	while (~nvm_header.NextHeader);
-	if (lseek (fd, 0, SEEK_CUR) != lseek (fd, 0, SEEK_END))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, NVM_HDR_LINK, filename, module);
-		}
-		return (-1);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed chknvm (char const * filename, flag_t flags);
- *
- *   validate a PLC firmware module file; keep as little information
- *   as possible in memory; this slows validation but minimizes the
- *   resources needed at runtime; resource requirements do not grow
- *   with file size;
- *
- *   determine file format based on module header version then rewind
- *   the file and call the appropriate chknvm;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed chknvm (char const * filename, flag_t flags)
-
-{
-	uint32_t version;
-	signed status;
-	signed fd;
-	if ((fd = open (filename, O_BINARY|O_RDONLY)) == -1)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTOPEN, filename);
-		}
-		return (-1);
-	}
-	if (read (fd, &version, sizeof (version)) != sizeof (version))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTREAD, filename);
-		}
-		return (-1);
-	}
-	if (lseek (fd, 0, SEEK_SET))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTHOME, filename);
-		}
-		return (-1);
-	}
-	if (LE32TOH (version) == 0x60000000)
-	{
-		status = nvmchain1 (fd, filename, flags);
-	}
-	else
-	{
-		status = nvmchain2 (fd, filename, flags);
-	}
-	close (fd);
-	return (status);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *   validate a PLC firmware image file; keep as little information
- *   as possible in memory; this slows validation but minimizes the
- *   resources needed at runtime; resource requirements do not grow
- *   with file size;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"imqrsv",
-		"file [file] [...]",
-		"Qualcomm Atheros PLC Image File Validator",
-		"i\tprint firmware identity string",
-		"m\tdisplay manifest",
-		"q\tsuppress messages",
-		"r\tprint firmware revision string",
-		"s\tprint SDRAM configuration blocks",
-		"v\tverbose messages",
-		(char const *) (0)
-	};
-	signed state = 0;
-	flag_t flags = (flag_t)(0);
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'i':
-			_setbits (flags, NVM_IDENTITY);
-			break;
-		case 'r':
-			_setbits (flags, NVM_FIRMWARE);
-			break;
-		case 'm':
-			_setbits (flags, NVM_MANIFEST);
-			break;
-		case 's':
-			_setbits (flags, NVM_SDRAM);
-			break;
-		case 'q':
-			_setbits (flags, NVM_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, NVM_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	while ((argc) && (* argv))
-	{
-		if (chknvm (* argv, flags))
-		{
-			state = 1;
-		}
-		else if (_allclr (flags, (NVM_VERBOSE|NVM_SILENCE|NVM_MANIFEST|NVM_FIRMWARE|NVM_IDENTITY|NVM_SDRAM)))
-		{
-			printf ("file %s looks good\n", * argv);
-		}
-		argc--;
-		argv++;
-	}
-	return (state);
-}
-
-
-
- - - diff --git a/docbook/chknvm2.1.html b/docbook/chknvm2.1.html deleted file mode 100644 index d34b4208..00000000 --- a/docbook/chknvm2.1.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - chknvm2.1 - - - - - - - - - -
-chknvm2(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  chknvm2(1)
-
-NAME
-       chknvm2 - Qualcomm Atheros PLC Image File Validator
-
-SYNOPSIS
-       chknvm2 [options] file [file] [...]
-
-DESCRIPTION
-       Check  Atheros  HomePlug AV firmware files for obvious errors, including obsolete format, incorrect file size, bad check‐
-       sums and read errors.  Make no attempt to check any internal information other  than  firmware  header  checksums,  image
-       lengths and image checksums.  Optionally, display header and image information on stdout.
-
-       This  program  handles both the older Thunderbolt and Lightning and the newer Panther and Lynx firmware file formats.  It
-       validates files directly from memory and so it is faster than program chknvm but needs more memory at runtime.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -i     Print  revision  string identity fields in fixed-width columns.  This option is useful when searching .nvm folders
-              for a specific build.
-
-       -m     Display manifest content, if present.  The manifest is a special module, included in some image chains, that  con‐
-              tains useful information about the chain.  This option suppresses the summary 'looks good' message.
-
-       -r     Print firmware revision string on stdout.  This option automatically suppresses the summary 'looks good' message.
-
-       -q     Suppresses printing of routine messages.  Specifically, it suppresses the summary 'looks good' message.
-
-       -v     Print  additional  information such as the image header for each image processed.  This information can be used to
-              distinguish one firmware file from another, if you know what to look for.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   The name of an Atheros image file.  By convention, Atheros Image files have a .nvm file extension but this program
-              does not enforce this convention.
-
-DISCLAIMER
-       Qualcomm  Atheros  firmware  file  structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently,
-       public information is not available.  Qualcomm Atheros reserves the right to change firmware file structure or content or
-       change  the  name or behavior of any program that inspects or changes firmware files, in future software releases without
-       any obligation to notify or compensate users of such programs.
-
-EXAMPLES
-       This example reads file abc.nvm and validates it.  The message shown indicates that the file is the correct length, image
-       headers  and  images  have the correct length and checksum and there are no read errors.  The file can be have either the
-       newer or older format.
-
-           # chknvm2 abc.nvm
-           abc.nvm looks good
-
-       The following example reads three files in succession and reports on each one.  You can suppress good news  with  the  -q
-       option.
-
-          # chknvm2 INT6400.nvm AR7400.nvm AR7420.nvm
-          INT6400.nvm looks good
-          AR7400.nvm looks good
-          AR7420.nvm looks good
-
-       This next example prints the firmware revision string found inside older image files.  The option can be used to identify
-       the actual firmware image present when the filename has been changed.   Newer  image  files  have  a  manifest,  instead.
-       Observe  that  file AR7420.nvm shows no revision string since it is the newer image format where firmware images are com‐
-       pressed.
-
-          # chknvm2 -r INT6400.nvm AR7400.nvm AR7420.nvm
-          INT6400.nvm (3) INT6000-MAC-4-1-4122-01-4020-20100219-FINAL
-          AR7400.nvm (5) INT7400-MAC-7-0-7011-01-52-20110811-FINAL
-
-       The following example displays the firmware revision strings, from the last example, as  fixed  width  columns.   Observe
-       that the external filename may, in some cases, not reflect the file content.
-
-          # chknvm2 -i INT6400.nvm AR7400.nvm AR7420.nvm
-          INT6000 4020 20100219 4.1 INT6400.nvm (3)
-          INT7400 0052 20110811 7.0 AR7400.nvm (5)
-
-       This  example prints the manifest found inside newer firmware files.  This can be used to distinguish firmware files from
-       parameter files, determine exact firmware or parameter file revisions and so forth.  Observe that  we  specified  several
-       files on the command line but only one file, AR7420.nvm, contained a mainfest.
-
-          # chknvm2 -m INT6400.nvm AR7400.nvm AR7420.nvm
-          ------- AR7420.nvm (0) -------
-                  Signature: 1234ABCD
-                  Hardware Compatibility: AR74200
-                  Chain Major Version: 0
-                  Chain Minor Version: 1
-                  Chain Type: Firmware
-                  Build Major Version: 0
-                  Build Minor Version: 0
-                  Build Type: Special
-                  Manifest Version: 1
-                  Build Number: 0
-                  Build Date: 20110811
-                  Build Time: 203853
-                  Device Type: 29728
-                  Build Hostname: TOR-SW-SIM04
-                  Build Username: buildbot
-                  Build Description: Custom
-                  Build Version String: AR-7420-FW-0_0-0_2-20110811:203853-buildbot:TOR-SW-SIM04-1-0_1
-
-SEE ALSO
-       chknvm(1), chkpib(1), chkpib2(1), int6ktest(7), nvmmerge(1), nvmsplit(1), plctest(7)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  chknvm2(1)
-
- - - diff --git a/docbook/chknvm2.c.html b/docbook/chknvm2.c.html deleted file mode 100644 index 5a647b90..00000000 --- a/docbook/chknvm2.c.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - chknvm2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   chknvm2.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <memory.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/memory.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/checksum32.c"
-#include "../tools/strfbits.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvm.c"
-#include "../nvm/nvmpeek.c"
-#include "../nvm/nvmpeek1.c"
-#include "../nvm/nvmpeek2.c"
-#include "../nvm/manifest.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define HARDWARE 0
-#define SOFTWARE 1
-#define VER 2
-#define REV 3
-#define BUILD 6
-#define DATE 7
-
-/*====================================================================*
- *
- *   unsigned string2vector (char ** vector, length, char * string, char c);
- *
- *   convert string to a vector and return vector count; split string
- *   on characer (c);
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static unsigned string2vector (char ** vector, char * string, char c)
-
-{
-	char ** origin = vector;
-	for (*vector++ = string; *string; string++)
-	{
-		if (*string == c)
-		{
-			*string++ = (char)(0);
-			*vector++ = string--;
-		}
-	}
-	*vector = (char *)(0);
-	return ((unsigned)(vector - origin));
-}
-
-/*====================================================================*
- *
- *   void firmware (char const * filename, unsigned module, char const * memory, unsigned offset, flag_t flags);
- *
- *   locate and display information stored in a firmware image; this
- *   is magic that may change in future firmware releases;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static void firmware (char const * filename, unsigned module, char const * memory, unsigned offset, flag_t flags)
-
-{
-	if (_anyset (flags, NVM_FIRMWARE))
-	{
-		if ((* memory > 0x20) && (* memory < 0x7f))
-		{
-			printf ("%s (%d) %s\n", filename, module, memory);
-		}
-		else
-		{
-			printf ("%s (%d) %s\n", filename, module, memory + offset);
-		}
-		return;
-	}
-	if (_anyset (flags, NVM_IDENTITY))
-	{
-		char * vector [16];
-		char buffer [256];
-		if ((* memory > 0x20) && (* memory < 0x7f))
-		{
-			strncpy (buffer, memory, sizeof (buffer));
-		}
-		else
-		{
-			strncpy (buffer, memory + offset, sizeof (buffer));
-		}
-		string2vector (vector, buffer, '-');
-		printf ("%s ", vector [HARDWARE]);
-		printf ("%04d ", atoi (vector [BUILD]));
-		printf ("%s ", vector [DATE]);
-		printf ("%s.", vector [VER]);
-		printf ("%s ", vector [REV]);
-		printf ("%s (%d)\n", filename, module);
-		return;
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   signed nvmimage2 (void const * memory, size_t extent, char const * filename, flag_t flags)
- *
- *   verify a firmware image chain stored in memory; return 0 on
- *   success or -1 on error;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed nvmimage2 (void const * memory, size_t extent, char const * filename, flag_t flags)
-
-{
-	struct nvm_header1 * nvm_header;
-	unsigned module = 0;
-	uint32_t offset = 0;
-	do
-	{
-		nvm_header = (struct nvm_header1 *)((char *)(memory) + offset);
-		if (LE32TOH (nvm_header->HEADERVERSION) != 0x60000000)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		offset += sizeof (* nvm_header);
-		extent -= sizeof (* nvm_header);
-		if (_anyset (flags, NVM_VERBOSE))
-		{
-			printf ("------- %s (%d) -------\n", filename, module);
-			nvmpeek1 (nvm_header);
-		}
-		if (LE32TOH (nvm_header->IMAGETYPE) == NVM_IMAGE_FIRMWARE)
-		{
-			firmware (filename, module, (char *)(memory) + offset, 0x70, flags);
-		}
-		if (checksum32 ((char *)(memory) + offset, LE32TOH (nvm_header->IMAGELENGTH), nvm_header->IMAGECHECKSUM))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_IMG_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		offset += LE32TOH (nvm_header->IMAGELENGTH);
-		extent -= LE32TOH (nvm_header->IMAGELENGTH);
-		module++;
-	}
-	while (nvm_header->NEXTHEADER);
-	if (extent)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, NVM_HDR_LINK, filename, module);
-		}
-	}
-	return ((signed)(extent));
-}
-
-/*====================================================================*
- *
- *   signed nvmchain2 (void const * memory, size_t extent, char const * filename, flag_t flags)
- *
- *   verify a firmware image chain stored in memory; return 0 on
- *   success or -1 on error;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed nvmchain2 (void const * memory, size_t extent, char const * filename, flag_t flags)
-
-{
-	struct nvm_header2 * nvm_header;
-	unsigned module = 0;
-	uint32_t origin = ~0;
-	uint32_t offset = 0;
-	uint32_t length = 0;
-	do
-	{
-		nvm_header = (struct nvm_header2 *)((char *)(memory) + offset);
-		if (LE16TOH (nvm_header->MajorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header->MinorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header->PrevHeader) != origin)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_HDR_LINK, filename, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, 0, NVM_HDR_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		origin = offset;
-		offset += sizeof (* nvm_header);
-		extent -= sizeof (* nvm_header);
-		length = LE32TOH (nvm_header->ImageLength);
-		if (_anyset (flags, NVM_VERBOSE))
-		{
-			printf ("------- %s (%d) -------\n", filename, module);
-			nvmpeek2 (nvm_header);
-		}
-		if (LE32TOH (nvm_header->ImageType) == NVM_IMAGE_MANIFEST)
-		{
-			if (_anyset (flags, NVM_MANIFEST))
-			{
-				printf ("------- %s (%d) -------\n", filename, module);
-				manifest ((char *)(memory) + offset, length);
-				return (0);
-			}
-		}
-		if (checksum32 ((char *)(memory) + offset, length, nvm_header->ImageChecksum))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, errno, NVM_IMG_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		offset += length;
-		extent -= length;
-		module++;
-	}
-	while (~nvm_header->NextHeader);
-	if (extent)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, NVM_HDR_LINK, filename, module);
-		}
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed chknvm (char const * filename, flag_t flags);
- *
- *   read .nvm file into memory and validate it;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed chknvm (char const * filename, flag_t flags)
-
-{
-	void * memory = (void *)(0);
-	signed extent = 0;
-	signed status = 0;
-	signed fd;
-	if ((fd = open (filename, O_BINARY|O_RDONLY)) == -1)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTOPEN, filename);
-		}
-		return (-1);
-	}
-	if ((extent = lseek (fd, 0, SEEK_END)) == -1)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTSIZE, filename);
-		}
-		return (-1);
-	}
-	if (!(memory = malloc (extent)))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTLOAD, filename);
-		}
-		return (-1);
-	}
-	if (lseek (fd, 0, SEEK_SET))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTLOAD, filename);
-		}
-		return (-1);
-	}
-	if (read (fd, memory, extent) != extent)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTREAD, filename);
-		}
-		return (-1);
-	}
-	close (fd);
-	if (LE32TOH (* (uint32_t *)(memory)) == 0x60000000)
-	{
-		status = nvmimage2 (memory, extent, filename, flags);
-	}
-	else
-	{
-		status = nvmchain2 (memory, extent, filename, flags);
-	}
-	free (memory);
-	return (status);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"imqrv",
-		"file [file] [...]",
-		"Qualcomm Atheros PLC Image File Validator",
-		"i\tprint firmware identity string",
-		"m\tdisplay manifest",
-		"q\tsuppress messages",
-		"r\tprint firmware revision string",
-		"v\tverbose messages",
-		(char const *) (0)
-	};
-	flag_t flags = (flag_t)(0);
-	signed state = 0;
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'i':
-			_setbits (flags, NVM_IDENTITY);
-			break;
-		case 'm':
-			_setbits (flags, NVM_MANIFEST);
-			break;
-		case 'r':
-			_setbits (flags, NVM_FIRMWARE);
-			break;
-		case 'q':
-			_setbits (flags, NVM_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, NVM_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	while ((argc) && (* argv))
-	{
-		if (chknvm (* argv, flags))
-		{
-			state = 1;
-		}
-		else if (_allclr (flags, (NVM_VERBOSE|NVM_SILENCE|NVM_MANIFEST|NVM_FIRMWARE|NVM_IDENTITY)))
-		{
-			printf ("%s looks good\n", * argv);
-		}
-		argc--;
-		argv++;
-	}
-	return (state);
-}
-
-
-
- - - diff --git a/docbook/chkpib.1.html b/docbook/chkpib.1.html deleted file mode 100644 index a8e312c9..00000000 --- a/docbook/chkpib.1.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - chkpib.1 - - - - - - - - - -
-chkpib(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   chkpib(1)
-
-NAME
-       chkpib - Qualcomm Atheros PLC Parameter File Inspector
-
-SYNOPSIS
-       chkpib [options] file [file] [...]
-
-DESCRIPTION
-       The  Qualcomm  Atheros  Parameter  File  Validator  checks Qualcomm Atheros powerline parameter files for obvious errors,
-       including obsolete format, wrong file size, bad checksums and read errors.  It makes no attempt  to  check  any  internal
-       information other than file length and checksum.
-
-       This  program handles both the older Thunderbolt and Lightning and the newer Panther and Lynx parameter file formats.  It
-       validates files directly from disk and so it is slower than program chkpib2 but needs less memory at runtime.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -m     Display  manifest content, if present.  The manifest is a special module, included in some image chains, that con‐
-              tains useful information about the chain.  This option suppresses the summary 'looks good' message.
-
-       -q     Suppresses printing of progress messages.
-
-       -v     Print additional information such as the PIB header for each file.  This information can be used  to  confirm  pib
-              version and distinguish one PIB file from another.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   The  name of a runtime parameter file.  By convention, runtime parameter files have a .pib extention but this pro‐
-              gram does not enforce that convention.
-
-DISCLAIMER
-       Qualcomm Atheros parameter file structure and content is proprietary to Qualcomm Atheros, Ocala  FL  USA.   Consequently,
-       public  information  is not available.  Qualcomm Atheros reserves the right to change parameter file structure or content
-       or change the name or behavior of any program that inspects or changes parameter files, in future software releases with‐
-       out any obligation to notify or compensate users of such programs.
-
-EXAMPLES
-       The  next  example  reads file abc.pib and validates it.  The message shown indicates that the PIB version is recent, the
-       file is the correct size, the checksum is valid computes and there are no read errors.
-
-          # chkpib abc.pib
-          abc.pib looks good
-
-       The next example reads three files and reports on each one.  You can suppress good news with  the  -q  option.   Remember
-       that "looking good" does not mean "is good".
-
-          # chkpib INT6400.pib AR7400.pib AR7420.pib
-          INT6400.pib looks good
-          AR7400.pib looks good
-          AR7420.pib looks good
-
-       The  next  example  reads  three files and displays selected information about each one because option -v is present.  Ov
-       course, program output could be piped to a file and used for documentation purposes.
-
-          # chkpib -v INT6400.pib AR7400.pib AR7420.pib
-          ------- INT6400.pib -------
-                  PIB 4-2 10888 bytes
-                  MAC 00:B0:52:BA:BE:00
-                  DAK 68:9F:07:4B:8B:02:75:A2:71:0B:0B:57:79:AD:16:30 (HomePlugAV)
-                  NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
-                  NID B0:F2:E6:95:66:6B:03
-                  NET Intellon Enabled Network
-                  MFG Intellon HomePlug AV Device
-                  USR Intellon Enabled Product
-                  CCo Auto
-                  MDU N/A
-          ------- AR7400.pib -------
-                  PIB 7-1 16352 bytes
-                  MAC 00:B0:52:00:00:08
-                  DAK F0:84:B4:E8:F6:06:9F:F1:30:0C:9B:DB:81:23:67:FF (HomePlugAV0123)
-                  NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
-                  NID B0:F2:E6:95:66:6B:03
-                  NET Atheros Enabled Network
-                  MFG Atheros HomePlug AV Device
-                  USR Intergalactic Software Pirates
-                  CCo Never
-                  MDU Slave
-          ------- AR7420.pib -------
-                  PIB 0-2 10904 bytes
-                  MAC 00:B0:52:00:00:01
-                  DAK 68:9F:07:4B:8B:02:75:A2:71:0B:0B:57:79:AD:16:30 (HomePlugAV)
-                  NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
-                  NID B0:F2:E6:95:66:6B:03
-                  NET Atheros Enabled Network
-                  MFG Atheros HomePlug AV Device
-                  USR Atheros Enabled Product
-                  CCo Auto
-                  MDU N/A
-
-       This example prints the manifest found inside newer parameter files.  This can be used  to  distinguish  parameter  files
-       from  firmware  files, determine exact firmware or parameter file revisions and so forth.  Observe that we specified sev‐
-       eral files on the command line but only one file, AR7420.pib, contained a manifest.
-
-          # chkpib -m INT6400.pib AR7400.pib AR7420.pib
-          ------- AR7420.pib (0) -------
-                  Signature: 1234ABCD
-                  Hardware Compatibility: AR74200
-                  Chain Major Version: 0
-                  Chain Minor Version: 1
-                  Chain Type: Parameter Block
-                  Build Major Version: 0
-                  Build Minor Version: 0
-                  Build Type: Special
-                  Manifest Version: 1
-                  Build Number: 0
-                  Build Date: 20110811
-                  Build Time: 203853
-                  Device Type: 29728
-                  Build Hostname: TOR-SW-SIM04
-                  Build Username: buildbot
-                  Build Description: Custom
-                  Build Version String: AR-7420-FW-0_0-0_2-20110811:203853-buildbot:TOR-SW-SIM04-1-0_1
-
-SEE ALSO
-       chkpib2(7), getpib(7), modpib(1), pib2xml(1), pibcomp(1), pibdump(1), setpib(1), xml2pib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                   chkpib(1)
-
- - - diff --git a/docbook/chkpib.c.html b/docbook/chkpib.c.html deleted file mode 100644 index abcf85d8..00000000 --- a/docbook/chkpib.c.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - chkpib.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   chkpib.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../key/HPAVKey.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/checksum32.c"
-#include "../tools/hexstring.c"
-#include "../tools/hexdecode.c"
-#include "../tools/strfbits.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/SHA256Reset.c"
-#include "../key/SHA256Block.c"
-#include "../key/SHA256Write.c"
-#include "../key/SHA256Fetch.c"
-#include "../key/HPAVKeyNID.c"
-#include "../key/keys.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibpeek1.c"
-#include "../pib/pibpeek2.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/manifest.c"
-#include "../nvm/fdmanifest.c"
-#endif
-
-/*====================================================================*
- *
- *   signed pibimage1 (signed fd, char const * filename, flag_t flags);
- *
- *   validate a disk-resident lightning/thunderbolt PIB image; read
- *   the header then verify the checksum and preferred Network
- *   Identifier (NID); return 0 on success or -1 on error;
- *
- *   this is not a thorough check but it detects non-PIB images;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibimage1 (signed fd, char const * filename, flag_t flags)
-
-{
-	struct simple_pib simple_pib;
-	uint8_t NID [HPAVKEY_NID_LEN];
-	if (read (fd, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_CANTREAD, filename);
-		}
-		return (-1);
-	}
-	if (_anyset (flags, PIB_VERBOSE))
-	{
-		printf ("------- %s -------\n", filename);
-		if (pibpeek1 (&simple_pib))
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, PIB_BADVERSION, filename);
-			}
-			return (-1);
-		}
-	}
-	if (lseek (fd, (off_t)(0)-sizeof (simple_pib), SEEK_CUR) == -1)
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_CANTSEEK, filename);
-		}
-		return (-1);
-	}
-	if (fdchecksum32 (fd, LE16TOH (simple_pib.PIBLENGTH), 0))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADCHECKSUM, filename);
-		}
-		return (-1);
-	}
-	HPAVKeyNID (NID, simple_pib.NMK, simple_pib.PreferredNID [HPAVKEY_NID_LEN-1] >> 4);
-	if (memcmp (NID, simple_pib.PreferredNID, sizeof (NID)))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADNID, filename);
-		}
-		return (-1);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed pibimage2 (signed fd, char const * filename, uint32_t length, uint32_t checksum, flag_t flags);
- *
- *   validate a disk-resident panther/lynxPIB image; read the header
- *   then verify the checksum and preferred Network Identifuier (NID);
- *   return 0 on success or -1 on error;
- *
- *   this is not a thorough check but it detects non-PIB images;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibimage2 (signed fd, char const * filename, uint32_t length, uint32_t checksum, flag_t flags)
-
-{
-	struct simple_pib simple_pib;
-	struct pib_header pib_header;
-	uint8_t NID [HPAVKEY_NID_LEN];
-	memset (&pib_header, 0, sizeof (pib_header));
-	if (read (fd, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_CANTREAD, filename);
-		}
-		return (-1);
-	}
-	if (_anyset (flags, PIB_VERBOSE))
-	{
-		struct pib_header * pib_header = (struct pib_header *)(&simple_pib);
-		pib_header->PIBLENGTH = HTOLE16((uint16_t)(length));
-		printf ("------- %s -------\n", filename);
-		if (pibpeek2 (&simple_pib))
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, PIB_BADVERSION, filename);
-			}
-			return (-1);
-		}
-		memset (pib_header, 0, sizeof (* pib_header));
-	}
-	if (lseek (fd, (off_t)(0)-sizeof (simple_pib), SEEK_CUR) == -1)
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_CANTHOME, filename);
-		}
-		return (-1);
-	}
-	if (fdchecksum32 (fd, length, checksum))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADCHECKSUM, filename);
-		}
-		return (-1);
-	}
-	HPAVKeyNID (NID, simple_pib.NMK, simple_pib.PreferredNID [HPAVKEY_NID_LEN-1] >> 4);
-	if (memcmp (NID, simple_pib.PreferredNID, sizeof (NID)))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADNID, filename);
-		}
-		return (-1);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed pibchain2 (signed fd, char const * filename, flag_t flags);
- *
- *   open a panther/lynx parameter file and validate it;
- *
- *   traverse a panther/lynx image file looking for PIB images and
- *   validate each one; return 0 on success or -1 on error; errors
- *   occur due to an invalid image chain or a bad parameter block;
- *
- *   this implementation checks the parameter block without reading
- *   the entire block into memory;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibchain2 (signed fd, char const * filename, flag_t flags)
-
-{
-	struct nvm_header2 nvm_header;
-	uint32_t origin = ~0;
-	uint32_t offset = 0;
-	unsigned module = 0;
-	do
-	{
-		if (read (fd, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, errno, NVM_HDR_CANTREAD, filename, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header.MajorVersion) != 1)
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header.MinorVersion) != 1)
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, NVM_HDR_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header.PrevHeader) != origin)
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, NVM_HDR_LINK, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_PIB)
-		{
-			return (pibimage2 (fd, filename, LE32TOH (nvm_header.ImageLength), nvm_header.ImageChecksum, flags));
-		}
-		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_MANIFEST)
-		{
-			if (_anyset (flags, PIB_MANIFEST))
-			{
-				fdmanifest (fd, filename, &nvm_header, module);
-			}
-		}
-		if (fdchecksum32 (fd, LE32TOH (nvm_header.ImageLength), nvm_header.ImageChecksum))
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, NVM_IMG_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		origin = offset;
-		offset = LE32TOH (nvm_header.NextHeader);
-		module++;
-	}
-	while (~nvm_header.NextHeader);
-	if (lseek (fd, 0, SEEK_CUR) != lseek (fd, 0, SEEK_END))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, NVM_HDR_LINK, filename, module);
-		}
-		return (-1);
-	}
-	error (0, 0, "%s has no PIB", filename);
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed chkpib (char const * filename, flag_t flags);
- *
- *   open a named file and determine if it is a valid thunderbolt,
- *   lightning, panther or lynx PIB;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed chkpib (char const * filename, flag_t flags)
-
-{
-	uint32_t version;
-	signed status = 0;
-	signed fd;
-	if ((fd = open (filename, O_BINARY|O_RDONLY)) == -1)
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_CANTOPEN, filename);
-		}
-		return (-1);
-	}
-	if (read (fd, &version, sizeof (version)) != sizeof (version))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_CANTREAD, filename);
-		}
-		return (-1);
-	}
-	if (lseek (fd, 0, SEEK_SET))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_CANTHOME, filename);
-		}
-		return (-1);
-	}
-	if (LE32TOH (version) == 0x60000000)
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, errno, FILE_WONTREAD, filename);
-		}
-		status = -1;;
-	}
-	else if (LE32TOH (version) == 0x00010001)
-	{
-		status = pibchain2 (fd, filename, flags);
-	}
-	else
-	{
-		status = pibimage1 (fd, filename, flags);
-	}
-	close (fd);
-	return (status);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"mqv",
-		"file [file] [...]",
-		"Qualcomm Atheros PLC Parameter File Inspector",
-		"m\tdisplay manifest",
-		"q\tquiet",
-		"v\tverbose messages",
-		(char const *) (0)
-	};
-	flag_t flags = (flag_t)(0);
-	signed state = 0;
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'm':
-			_setbits (flags, PIB_MANIFEST);
-			break;
-		case 'q':
-			_setbits (flags, PIB_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, PIB_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	while ((argc) && (* argv))
-	{
-		errno = 0;
-		if (chkpib (* argv, flags))
-		{
-			state = 1;
-		}
-		else if (_allclr (flags, (PIB_VERBOSE | PIB_SILENCE | PIB_MANIFEST)))
-		{
-			printf ("%s looks good\n", * argv);
-		}
-		argc--;
-		argv++;
-	}
-	return (state);
-}
-
-
-
- - - diff --git a/docbook/chkpib2.1.html b/docbook/chkpib2.1.html deleted file mode 100644 index cc6283b1..00000000 --- a/docbook/chkpib2.1.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - chkpib2.1 - - - - - - - - - -
-chkpib2(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  chkpib2(1)
-
-NAME
-       chkpib2 - Qualcomm Atheros PLC Parameter File Inspector
-
-SYNOPSIS
-       chkpib2 [options] file [file] [...]
-
-DESCRIPTION
-       This  program  checks Atheros HomePlug AV parameter files for obvious errors, including obsolete format, wrong file size,
-       bad checksums and read errors.  It makes no attempt to check internal information other than file length and checksum.
-
-       This program handles both the older Thunderbolt and Lightning and the newer Panther and Lynx parameter file formats.   It
-       validates files directly from memory and so it is faster than program chkpib but needs more memory at runtime.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -m     Display manifest content, if present.  The manifest is a special module, included in some image chains, that  con‐
-              tains useful information about the chain.  This option suppresses the summary 'looks good' message.
-
-       -q     Suppresses printing of progress messages.
-
-       -v     Print additional information such as the PIB header for each file processed.  This information can be used to con‐
-              firm pib version and distinguish one PIB file from another.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   The name of a runtime parameter file.  By convention, runtime parameter files have a .pib extention but this  pro‐
-              gram does not enforce that convention.
-
-DISCLAIMER
-       Qualcomm  Atheros  parameter  file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently,
-       public information is not available.  Qualcomm Atheros reserves the right to change parameter file structure  or  content
-       or change the name or behavior of any program that inspects or changes parameter files, in future software releases with‐
-       out any obligation to notify or compensate users of such programs.
-
-EXAMPLES
-       The next example reads file abc.pib and validates it.  The message shown indicates that the PIB version  is  recent,  the
-       file is the correct size, the checksum is valid computes and there are no read errors.
-
-          # chkpib2 abc.pib
-          abc.pib looks good
-
-       The  next  example  reads  three files and reports on each one.  You can suppress good news with the -q option.  Remember
-       that "looking good" does not mean "is good".
-
-          # chkpib2 INT6400.pib AR7400.pib AR7420.pib
-          INT6400.pib looks good
-          AR7400.pib looks good
-          AR7420.pib looks good
-
-       The next example reads three files and displays selected information about each one because option -v is present.
-
-          # chkpib2 -v INT6400.pib AR7400.pib AR7420.pib
-          ------- INT6400.pib -------
-                  PIB 4-2 10888 bytes
-                  MAC 00:B0:52:BA:BE:00
-                  DAK 68:9F:07:4B:8B:02:75:A2:71:0B:0B:57:79:AD:16:30 (HomePlugAV)
-                  NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
-                  NID B0:F2:E6:95:66:6B:03
-                  NET Intellon Enabled Network
-                  MFG Intellon HomePlug AV Device
-                  USR Intellon Enabled Product
-                  CCo Auto
-                  MDU N/A
-          ------- AR7400.pib -------
-                  PIB 7-1 16352 bytes
-                  MAC 00:B0:52:00:00:08
-                  DAK F0:84:B4:E8:F6:06:9F:F1:30:0C:9B:DB:81:23:67:FF (HomePlugAV0123)
-                  NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
-                  NID B0:F2:E6:95:66:6B:03
-                  NET Atheros Enabled Network
-                  MFG Atheros HomePlug AV Device
-                  USR Intergalactic Software Pirates
-                  CCo Never
-                  MDU Slave
-          ------- AR7420.pib -------
-                  PIB 0-2 10904 bytes
-                  MAC 00:B0:52:00:00:01
-                  DAK 68:9F:07:4B:8B:02:75:A2:71:0B:0B:57:79:AD:16:30 (HomePlugAV)
-                  NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
-                  NID B0:F2:E6:95:66:6B:03
-                  NET Atheros Enabled Network
-                  MFG Atheros HomePlug AV Device
-                  USR Atheros Enabled Product
-                  CCo Auto
-                  MDU N/A
-
-       This example prints the manifest found inside newer parameter files.  This can be used  to  distinguish  parameter  files
-       from  firmware  files, determine exact firmware or parameter file revisions and so forth.  Observe that we specified sev‐
-       eral files on the command line but only one file, AR7420.pib, contained a manifest.
-
-          # chkpib2 -m INT6400.pib AR7400.pib AR7420.pib
-          ------- AR7420.pib (0) -------
-                  Signature: 1234ABCD
-                  Hardware Compatibility: AR74200
-                  Chain Major Version: 0
-                  Chain Minor Version: 1
-                  Chain Type: Parameter Block
-                  Build Major Version: 0
-                  Build Minor Version: 0
-                  Build Type: Special
-                  Manifest Version: 1
-                  Build Number: 0
-                  Build Date: 20110811
-                  Build Time: 203853
-                  Device Type: 29728
-                  Build Hostname: TOR-SW-SIM04
-                  Build Username: buildbot
-                  Build Description: Custom
-                  Build Version String: AR-7420-FW-0_0-0_2-20110811:203853-buildbot:TOR-SW-SIM04-1-0_1
-
-SEE ALSO
-       chkpib(7), getpib(7), modpib(1), pib2xml(1), pibcomp(1), pibdump(1), setpib(1), xml2pib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  chkpib2(1)
-
- - - diff --git a/docbook/chkpib2.c.html b/docbook/chkpib2.c.html deleted file mode 100644 index 98086b35..00000000 --- a/docbook/chkpib2.c.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - - - chkpib2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   chkpib2.c
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../key/HPAVKey.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/checksum32.c"
-#include "../tools/hexstring.c"
-#include "../tools/hexdecode.c"
-#include "../tools/strfbits.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/SHA256Reset.c"
-#include "../key/SHA256Block.c"
-#include "../key/SHA256Write.c"
-#include "../key/SHA256Fetch.c"
-#include "../key/HPAVKeyNID.c"
-#include "../key/keys.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibpeek1.c"
-#include "../pib/pibpeek2.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/manifest.c"
-#endif
-
-/*====================================================================*
- *
- *   signed pibimage1 (void const * memory, size_t extent, char const * filename, flag_t flags);
- *
- *   check memory-resident thunderbolt/lightning PIB image; return 0
- *   for a good image and -1 for a bad image;
- *
- *   the check performed here is not exhaustive but it is adequate;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibimage1 (void const * memory, size_t extent, char const * filename, flag_t flags)
-
-{
-	struct simple_pib * simple_pib = (struct simple_pib *)(memory);
-	uint8_t NID [HPAVKEY_NID_LEN];
-	if (_anyset (flags, PIB_VERBOSE))
-	{
-		printf ("------- %s -------\n", filename);
-		if (pibpeek1 (memory))
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, PIB_BADVERSION, filename);
-			}
-			return (-1);
-		}
-	}
-	if (extent != LE16TOH (simple_pib->PIBLENGTH))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADLENGTH, filename);
-		}
-		return (-1);
-	}
-	if (checksum32 (memory, extent, 0))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADCHECKSUM, filename);
-		}
-		return (-1);
-	}
-	HPAVKeyNID (NID, simple_pib->NMK, simple_pib->PreferredNID [HPAVKEY_NID_LEN-1] >> 4);
-	if (memcmp (NID, simple_pib->PreferredNID, sizeof (NID)))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADNID, filename);
-		}
-		return (-1);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed pibimage2 (void const * memory, size_t extent, char const * filename, flag_t flags);
- *
- *   check memory-resident panther/lynx PIB image; return 0 for a
- *   good image and -1 for an bad image;
- *
- *   the check performed here is not exhaustive but it is adequate;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibimage2 (void const * memory, size_t extent, char const * filename, flag_t flags)
-
-{
-	struct simple_pib * simple_pib = (struct simple_pib *)(memory);
-	struct pib_header * pib_header = (struct pib_header *)(memory);
-	uint8_t NID [HPAVKEY_NID_LEN];
-	if (_anyset (flags, PIB_VERBOSE))
-	{
-		pib_header->PIBLENGTH = HTOLE16(extent);
-		printf ("------- %s -------\n", filename);
-		if (pibpeek2 (memory))
-		{
-			if (_allclr (flags, PIB_SILENCE))
-			{
-				error (0, 0, PIB_BADVERSION, filename);
-			}
-			return (-1);
-		}
-		memset (pib_header, 0, sizeof (* pib_header));
-	}
-	HPAVKeyNID (NID, simple_pib->NMK, simple_pib->PreferredNID [HPAVKEY_NID_LEN-1] >> 4);
-	if (memcmp (NID, simple_pib->PreferredNID, sizeof (NID)))
-	{
-		if (_allclr (flags, PIB_SILENCE))
-		{
-			error (0, 0, PIB_BADNID, filename);
-		}
-		return (-1);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   signed pibchain2 (void const * memory, size_t extent, char const * filename, flag_t flags);
- *
- *   search a panther/lynx image chain looking for PIB images and
- *   verify each one; return 0 on success or -1 on error; errors
- *   occur due to an invalid image chain or a bad parameter block;
- *
- *   this implementation reads the parameter block from file into
- *   into memory and checks it there;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibchain2 (void const * memory, size_t extent, char const * filename, flag_t flags)
-
-{
-	struct nvm_header2 * nvm_header;
-	uint32_t origin = ~0;
-	uint32_t offset = 0;
-	unsigned module = 0;
-	do
-	{
-		nvm_header = (struct nvm_header2 *)((char *)(memory) + offset);
-		if (LE16TOH (nvm_header->MajorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, 0, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE16TOH (nvm_header->MinorVersion) != 1)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, 0, NVM_HDR_VERSION, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header->PrevHeader) != origin)
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, 0, NVM_HDR_LINK, filename, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, 0, NVM_HDR_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		origin = offset;
-		offset += sizeof (* nvm_header);
-		extent -= sizeof (* nvm_header);
-		if (checksum32 ((char *)(memory) + offset, LE32TOH (nvm_header->ImageLength), nvm_header->ImageChecksum))
-		{
-			if (_allclr (flags, NVM_SILENCE))
-			{
-				error (0, 0, NVM_IMG_CHECKSUM, filename, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header->ImageType) == NVM_IMAGE_MANIFEST)
-		{
-			if (_anyset (flags, NVM_MANIFEST))
-			{
-				printf ("------- %s (%d) -------\n", filename, module);
-				manifest ((char *)(memory) + offset, LE32TOH (nvm_header->ImageLength));
-				return (0);
-			}
-		}
-		else if (LE32TOH (nvm_header->ImageType) == NVM_IMAGE_PIB)
-		{
-			return (pibimage2 ((char *)(memory) + offset, LE32TOH (nvm_header->ImageLength), filename, flags));
-		}
-		offset += LE32TOH (nvm_header->ImageLength);
-		extent -= LE32TOH (nvm_header->ImageLength);
-		module++;
-	}
-	while (~nvm_header->NextHeader);
-	if (extent)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, NVM_HDR_LINK, filename, module);
-		}
-		return (-1);
-	}
-	error (0, 0, "%s has no PIB", filename);
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed chkpib (char const * filename, flag_t flags);
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed chkpib (char const * filename, flag_t flags)
-
-{
-	void * memory = 0;
-	signed extent = 0;
-	signed status;
-	signed fd;
-	if ((fd = open (filename, O_BINARY|O_RDONLY)) == -1)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTOPEN, filename);
-		}
-		return (-1);
-	}
-	if ((extent = lseek (fd, 0, SEEK_END)) == -1)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTSIZE, filename);
-		}
-		return (-1);
-	}
-	if (!(memory = malloc (extent)))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTLOAD, filename);
-		}
-		return (-1);
-	}
-	if (lseek (fd, 0, SEEK_SET))
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTHOME, filename);
-		}
-		return (-1);
-	}
-	if (read (fd, memory, extent) != extent)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, errno, FILE_CANTREAD, filename);
-		}
-		return (-1);
-	}
-	close (fd);
-	if (LE32TOH (* (uint32_t *)(memory)) == 0x60000000)
-	{
-		if (_allclr (flags, NVM_SILENCE))
-		{
-			error (0, 0, FILE_WONTREAD, filename);
-		}
-		status = -1;
-	}
-	else if (LE32TOH (* (uint32_t *)(memory)) == 0x00010001)
-	{
-		status = pibchain2 (memory, extent, filename, flags);
-	}
-	else
-	{
-		status = pibimage1 (memory, extent, filename, flags);
-	}
-	free (memory);
-	return (status);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"mqv",
-		"file [file] [...]",
-		"Qualcomm Atheros PLC Parameter File Inspector",
-		"m\tdisplay manifest",
-		"q\tquiet",
-		"v\tverbose messages",
-		(char const *) (0)
-	};
-	flag_t flags = (flag_t)(0);
-	signed state = 0;
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'm':
-			_setbits (flags, PIB_MANIFEST);
-			break;
-		case 'q':
-			_setbits (flags, PIB_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, PIB_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	while ((argc) && (* argv))
-	{
-		errno = 0;
-		if (chkpib (* argv, flags))
-		{
-			state = 1;
-		}
-		else if (_allclr (flags, (PIB_VERBOSE | PIB_SILENCE | PIB_MANIFEST)))
-		{
-			printf ("%s looks good\n", * argv);
-		}
-		argc--;
-		argv++;
-	}
-	return (state);
-}
-
-
-
- - - diff --git a/docbook/chrout.c.html b/docbook/chrout.c.html deleted file mode 100644 index 6654c173..00000000 --- a/docbook/chrout.c.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - chrout.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void chrout (void const * memory, size_t extent, char c, char e, FILE * fp)
- *
- *   memory.h
- *
- *   print memory as an ASCII character string; replace non-printable
- *   characters with (c) on output; terminate output with (e);
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CHROUT_SOURCE
-#define CHROUT_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include "../tools/memory.h"
-
-void chrout (void const * memory, size_t extent, char c, char e, FILE * fp)
-
-{
-	byte * offset = (byte *)(memory);
-	while (extent--)
-	{
-		putc (isprint (* offset)? * offset: c, fp);
-		offset++;
-	}
-	if (e)
-	{
-		putc (e, fp);
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/closechannel.c.html b/docbook/closechannel.c.html deleted file mode 100644 index 6fac0b52..00000000 --- a/docbook/closechannel.c.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - closechannel.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed closechannel (struct channel const * channel);
- *
- *   channel.h
- *
- *   close ethernet raw packet channel;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CLOSECHANNEL_SOURCE
-#define CLOSECHANNEL_SOURCE
-
-#include <unistd.h>
-#include <stdlib.h>
-
-#include "../ether/channel.h"
-
-signed closechannel (struct channel const * channel)
-
-{
-
-#if defined (__linux__)
-
-	return (close (channel->fd));
-
-#elif defined (__APPLE__) || (__OpenBSD__)
-
-	free (channel->bpf->bpf_buffer);
-	free (channel->bpf);
-	return (close (channel->fd));
-
-#elif defined (WINPCAP) || defined (LIBPCAP)
-
-	pcap_close (channel->socket);
-	return (0);
-
-#else
-#error "Unknown Environment"
-#endif
-
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/closeport.c.html b/docbook/closeport.c.html deleted file mode 100644 index e6177e77..00000000 --- a/docbook/closeport.c.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - closeport.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void closeport (struct _file_ * port);
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CLOSEPORT_SOURCE
-#define CLOSEPORT_SOURCE
-
-#include <unistd.h>
-#include <stdlib.h>
-
-#include "../tools/types.h"
-#include "../serial/serial.h"
-
-void closeport (struct _file_ * port)
-
-{
-	close (port->file);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/clr32bitmap.c.html b/docbook/clr32bitmap.c.html deleted file mode 100644 index fa9371c4..00000000 --- a/docbook/clr32bitmap.c.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - clr32bitmap.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void clr32bitmap (uint32_t * map, unsigned bit);
- *
- *   flags.h
- *
- *   clear the given bit in an 32-bit flagword array; macro _bits ()
- *   is defined in flags.h;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CLR32BITMAP_SOURCE
-#define CLR32BITMAP_SOURCE
-
-#include "../tools/flags.h"
-#include "../tools/endian.h"
-
-void clr32bitmap (uint32_t * map, unsigned bit)
-
-{
-	map [bit / _bits (* map)] &= ~ HTOLE32 (1 << (bit % _bits (* map)));
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/codelist.c.html b/docbook/codelist.c.html deleted file mode 100644 index e81a3596..00000000 --- a/docbook/codelist.c.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - codelist.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void codelist (struct _code_ const list [], size_t size, char const * comma, FILE * fp);
- *
- *   symbol.h
- *
- *   print a list of code names on the specified output stream;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CODELIST_SOURCE
-#define CODELIST_SOURCE
-
-#include <stdio.h>
-
-#include "../tools/symbol.h"
-
-void codelist (struct _code_ const list [], size_t size, char const * comma, char const * quote, FILE * fp)
-
-{
-	struct _code_ const * item = list;
-	if (list) while ((size_t)(item - list) < size)
-	{
-		if (item > list)
-		{
-			fputs (comma, fp);
-		}
-		if ((quote) && (*quote))
-		{
-			fputc (*quote++, fp);
-		}
-		fputs (item->name, fp);
-		if ((quote) && (*quote))
-		{
-			fputc (*quote--, fp);
-		}
-		item++;
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/codename.c.html b/docbook/codename.c.html deleted file mode 100644 index 36d97562..00000000 --- a/docbook/codename.c.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - codename.c - - - - - - - - - -
-/*====================================================================*
- *
- *   char const * codename (struct _code_ const list [], size_t size, code_t code, char const * name);
- *
- *   symbol.h
- *
- *   return the name associated with a given code by searching a name
- *   table arranged in ascending order by code; return the table name
- *   if the code is found or argument name if not;
- *
- *   typedefs code_t and struct _code_ are defined in codes.h;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CODENAME_SOURCE
-#define CODENAME_SOURCE
-
-#include <unistd.h>
-
-#include "../tools/symbol.h"
-
-char const * codename (struct _code_ const list [], size_t size, code_t code, char const * name)
-
-{
-	size_t lower = 0;
-	size_t upper = size;
-	while (lower < upper)
-	{
-		size_t index = (lower + upper) >> 1;
-		signed order = code - list [index].code;
-		if (order < 0)
-		{
-			upper = index - 0;
-			continue;
-		}
-		if (order > 0)
-		{
-			lower = index + 1;
-			continue;
-		}
-		return (list [index].name);
-	}
-	return (name);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/config.c.html b/docbook/config.c.html deleted file mode 100644 index f9feb32b..00000000 --- a/docbook/config.c.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - - config.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   config.c - configuration file reader;
- *
- *   configuration files contain named parts where each part may
- *   contain one of more named items that have text definitions;
- *
- *   the named file can be searched for the first occurance of a
- *   named part then the first occurance of a named item;
- *
- *   [part1]
- *   item1=text
- *   item2=text
- *
- *   [part2]
- *   item1=text
- *   item2=text
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CONFIG_SOURCE
-#define CONFIG_SOURCE
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <string.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/config.h"
-#include "../tools/types.h"
-#include "../tools/chars.h"
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-static char buffer [1024] = "";
-static signed c;
-
-/*====================================================================*
- *
- *   bool compare (FILE * fp, char const *sp);
- *
- *   compare file and text characters until they differ or until end
- *   of text, line or file occurs; a match is declared when the text
- *   ends before the line or file;
- *
- *   spaces and tabs within the argument string or file string are
- *   ignored such that "item1", " item1 " and "item 1" all match;
- *
- *--------------------------------------------------------------------*/
-
-static bool compare (FILE * fp, char const * sp)
-
-{
-	while (isblank (*sp))
-	{
-		sp++;
-	}
-	while ((*sp) && (c != '\n') && (c != EOF))
-	{
-		if (toupper (c) != toupper (*sp))
-		{
-			return (0);
-		}
-		do
-		{
-			sp++;
-		}
-		while (isblank (*sp));
-		do
-		{
-			c = getc (fp);
-		}
-		while (isblank (c));
-	}
-	return (!*sp);
-}
-
-/*====================================================================*
- *
- *   void collect (FILE * fp);
- *
- *   collect text to end of line; remove leading and trailing space
- *   but preserve embedded space; replace selected escape sequences;
- *
- *--------------------------------------------------------------------*/
-
-static void collect (FILE * fp)
-
-{
-	char *bp = buffer;
-	char *cp = buffer;
-	while ((c != ';') && (c != '\n') && (c != EOF))
-	{
-		if (c == '\\')
-		{
-			c = getc (fp);
-			if (c == 'n')
-			{
-				c = '\n';
-			}
-			if (c == 't')
-			{
-				c = '\t';
-			}
-		}
-		if ((cp - buffer) < (signed)(sizeof (buffer) - 1))
-		{
-			*cp++ = c;
-		}
-		if (!isblank (c))
-		{
-			bp = cp;
-		}
-		c = getc (fp);
-	}
-	*bp = '\0';
-	return;
-}
-
-/*====================================================================*
- *
- *   void discard (FILE * fp);
- *
- *   read and discard characters until end-of-line or end-of-file
- *   is detected; read the first character of next line if end of
- *   file has not been detected;
- *
- *--------------------------------------------------------------------*/
-
-static void discard (FILE * fp)
-
-{
-	while ((c != '\n') && (c != EOF))
-	{
-		c = getc (fp);
-	}
-	if (c != EOF)
-	{
-		c = getc (fp);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   Const char * configstring (char const * file, char const * part, char const * item, char const * text)
- *
- *   open the named file, locate the named part and return the named
- *   item text, if present; return alternative text if the file part
- *   or item is missing; the calling function must preserve returned
- *   text because it may be over-written on successive calls;
- *
- *--------------------------------------------------------------------*/
-
-char const * configstring (char const * file, char const * part, char const * item, char const * text)
-
-{
-	FILE *fp;
-	if ((!file) || (!part) || (!item))
-	{
-		return (text);
-	}
-	if ((fp = fopen (file, "rb")))
-	{
-		for (c = getc (fp); c != EOF; discard (fp))
-		{
-			while (isblank (c))
-			{
-				c = getc (fp);
-			}
-			if (c != '[')
-			{
-				continue;
-			}
-			do
-			{
-				c = getc (fp);
-			}
-			while (isblank (c));
-			if (!compare (fp, part))
-			{
-				continue;
-			}
-			if (c != ']')
-			{
-				continue;
-			}
-			for (discard (fp); (c != '[') && (c != EOF); discard (fp))
-			{
-				while (isblank (c))
-				{
-					c = getc (fp);
-				}
-				if (c == ';')
-				{
-					continue;
-				}
-				if (!compare (fp, item))
-				{
-					continue;
-				}
-				if (c != '=')
-				{
-					continue;
-				}
-				do
-				{
-					c = getc (fp);
-				}
-				while (isblank (c));
-				collect (fp);
-				text = strdup (buffer);
-				break;
-			}
-			break;
-		}
-		fclose (fp);
-	}
-	return (text);
-}
-
-/*====================================================================*
- *
- *   unsigned confignumber (char const * file, char const * part, char const * item, unsigned number)
- *
- *   open the named file, locate the named part and return the named
- *   item as an unsigned integer, if present; return a default number
- *   if the file, part or item is missing; 
- *
- *--------------------------------------------------------------------*/
-
-unsigned confignumber (char const * file, char const * part, char const * item, unsigned number) 
-
-{ 
-	unsigned value = 0; 
-	char const * string = configstring (file, part, item, ""); 
-	if ((string) && (* string)) 
-	{ 
-		while (isdigit (* string)) 
-		{ 
-			value *= 10; 
-			value += * string++ - '0'; 
-		} 
-		if (! (* string)) 
-		{ 
-			number = value; 
-		} 
-	} 
-	return (number); 
-}
-
-/*====================================================================*
- *
- *   unsigned confignumber_range (char const * file, char const * part, char const * item, unsigned number, unsigned min, unsigned max)
- *
- *   open the named file, locate the named part and return the named
- *   item as an unsigned integer, if present; return a default number
- *   if the file, part or item is missing or item is out of range; 
- *
- *--------------------------------------------------------------------*/
-
-unsigned confignumber_range (char const * file, char const * part, char const * item, unsigned number, unsigned min, unsigned max)
-
-{
-	unsigned value = 0;
-	char const * string = configstring (file, part, item, "");
-	if ((string) && (* string))
-	{
-		while (isdigit (* string))
-		{
-			value *= 10;
-			value += * string++ - '0';
-		}
-		if (! (* string))
-		{
-			if ((value >= min) && (value <= max))
-			{
-			    number = value;
-			}
-		}
-	}
-	return (number);
-} 
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *   demo/test program; arguments are file, part, item and text in
- *   that order; you can construct your own configuration file and
- *   observe behaviour;
- *
- *--------------------------------------------------------------------*/
-
-#if 0
-
-#include <stdio.h>
-
-int main (int argc, char const * argv [])
-
-{
-	char const * text = configstring (argv [1], argv [2], argv [3], argv [4]);
-	printf ("file=[%s] part=[%s] item=[%s] text=[%s]\n", argv [1], argv [2], argv [3], text);
-	return (0);
-}
-
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/config.h.html b/docbook/config.h.html deleted file mode 100644 index 6f76929a..00000000 --- a/docbook/config.h.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - config.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   config.h - configuration file definitions and declarations;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef CONFIG_HEADER
-#define CONFIG_HEADER
-
-/*====================================================================*
- *   functions;
- *--------------------------------------------------------------------*/
-
-char const * configstring (char const * file, char const * part, char const * item, char const * text);
-unsigned confignumber (char const * file, char const * part, char const * item, unsigned number);
-unsigned confignumber_range (char const * file, char const * part, char const * item, unsigned number, unsigned min, unsigned max);
-
-/*====================================================================*
- *   end definitions;
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/config2cfg.1.html b/docbook/config2cfg.1.html deleted file mode 100644 index 7fb61377..00000000 --- a/docbook/config2cfg.1.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - config2cfg.1 - - - - - - - - - -
-config2cfg(1)                                Qualcomm Atheros Open Powerline Toolkit                               config2cfg(1)
-
-NAME
-       config2cfg - Atheros Configuration File Converter
-
-SYNOPSIS
-       config2cfg [options] file [file] [...]
-
-DESCRIPTION
-       The  config2cfg program converts an SDRAM configuration file used by the Windows Device Manager to the configuration file
-       format used by the Qualcomm Atheros Powerline Toolkit.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       There are no options.
-
-EXPLANATION
-       The  Windows  Device Manager format consists of 64 ASCII hexadecomal characters.  Files usually have a .config extension.
-       File size is at least 64 characters.  Excess characters are ignored in input.  This means  that  files  can  be  modified
-       using  any text editor and there is no way to detect modification.  From a programmin standpoint, ASCII-to-binary conver‐
-       tion and checksum computation is required on input and binary-to-ASCII conversion iw required on output.
-
-       The Atheros Powerline Toolkit format consists of 32 binary bytes plus a 4 byte (32 bit) checksum.  Files usually  have  a
-       .cfg extension.  File size is always 36 characters.  The files can be edited using any hex editor but a new checksum must
-       be computed and inserted after any change.  No conversion or computation is required on input or output.  Input is  ready
-       for direct insertion into a VS_SET_SDRAM message.
-
-       Programs  int6k  and  int6kf  expect this latter format and so you can use this program determine if a given file has the
-       proper format.
-
-OPTIONS
-       file   The filename of a Windows Device Manager SDRAM configuration file.  The file is re-written such that the  filename
-              is  preserved  but  the contents are not.  Windows Device Manager SDRAM configuration files usually have a .config
-              extension but the program makes no assumption based on filename and does not enforce any filename conventions.
-
-       -q     Suppresses printing of progress messages.  There are no progress messages in this version.
-
-       -v     Print additional information.  There is no additional information printed in this version.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-EXAMPLES
-       The following example reads file abc.cfg and validates it.  The message shown indicates that the  configuration  file  is
-       the correct size and has a checksums and there are no read errors.
-
-           > chkcfg abc.cfg
-           chkcfg: abc.cfg looks good
-
-       The  following  example  reads three files in succession and reports on each one.  You can suppress good news with the -q
-       option.
-
-           # chkcfg abc.cfg def.cfg ghi.cfg
-           chkcfg: abc.cfg looks good
-           chkcfg: def.cfg is corrupt
-           chkcfg: ghi.cfg looks good
-
-       The following example displays the SDRAM configuration values in all files having names that match the  wildcard  pattern
-       sdram*.cfg.   We can confirm that the values inside are correct for their filenames.  Program output could have been sent
-       to a file and saved for later reference.
-
-           # chknvm -qv sdram*.cfg
-           ------- sdram32.cfg -------
-                   SIZE=0x02000000 (32mb)
-                   CONF=0x00143188
-                   TIM0=0x01E1D491
-                   TIM1=0x000883D6
-                   CNTRL=0x00003089
-                   REF=0x00000366
-                   CLOCK=0x00000001
-           ------- sdram16.cfg -------
-                   SIZE=0x01000000 (16mb)
-                   CONF=0x00142F68
-                   TIM0=0x0115124E
-                   TIM1=0x000883D6
-                   CNTRL=0x00003089
-                   REF=0x00000493
-                   CLOCK=0x00000001
-
-DISCLAIMER
-       The SDRAM file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public  information
-       is  not  available.   Qualcomm  Atheros  reserves  the  right  to change the file structure or content in future firmware
-       releases without any obligation to notify or compensate users of this program.
-
-SEE ALSO
-       int6k(1), int6kf(1), modpib(1), chknvm(1), chkpib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                               config2cfg(1)
-
- - - diff --git a/docbook/config2cfg.c.html b/docbook/config2cfg.c.html deleted file mode 100644 index fc9ab803..00000000 --- a/docbook/config2cfg.c.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - config2cfg.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   config2cfg.c - convert a .config file to a .cfg file;
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#define _GETOPT_H
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/version.h"
-#include "../tools/number.h"
-#include "../tools/flags.h"
-#include "../tools/memory.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ram/sdram.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/error.c"
-#include "../tools/checksum32.c"
-#include "../tools/todigit.c"
-#include "../tools/hexencode.c"
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"qv",
-		"file [file] [...]",
-		"convert ASCII SDRAM configuration files (DM) to binary (toolkit) format",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-	struct config_ram config_ram;
-	char string [(sizeof (config_ram) << 1) + 1];
-	uint32_t checksum;
-	flag_t flags = (flag_t)(0);
-	signed state = 1;
-	signed fd;
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'q':
-			_setbits (flags, SDRAM_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, SDRAM_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	while ((argc-- > 0) && (* argv != (char const *)(0)))
-	{
-
-#if 0
-
-		char const * pathname;
-		char const * filename;
-		char const * extender;
-		for (pathname = filename = * argv; *pathname; pathname++)
-		{
-			if ((*pathname == '/') || (*pathname == '\\'))
-			{
-				filename = pathname + 1;
-			}
-		}
-		for (pathname = extender = filename; *pathname; pathname++)
-		{
-			if (*pathname == '.')
-			{
-				extender = pathname;
-			}
-		}
-		if (extender == filename)
-		{
-			extender = pathname;
-		}
-
-#endif
-
-		if ((fd = open (* argv, O_BINARY|O_RDONLY)) == -1)
-		{
-			error (0, errno, "can't open %s for input", * argv);
-			state = 1;
-		}
-		else if (read (fd, &string, sizeof (string)) < (ssize_t) (sizeof (string) - 1))
-		{
-			error (0, errno, "can't read %s", * argv);
-			state = 1;
-		}
-		else
-		{
-			close (fd);
-			if (hexencode ((uint8_t *) (&config_ram), sizeof (config_ram), string) == sizeof (config_ram))
-			{
-				error (1, errno, "%s is suspect", * argv);
-			}
-			checksum = checksum32 (&config_ram, sizeof (config_ram), 0);
-			if ((fd = open (* argv, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "can't open %s for output", * argv);
-			}
-			write (fd, &config_ram, sizeof (config_ram));
-			write (fd, &checksum, sizeof (checksum));
-		}
-		close (fd);
-		argv++;
-	}
-	return (state);
-}
-
-
-
- - - diff --git a/docbook/coqos.h.html b/docbook/coqos.h.html deleted file mode 100644 index 903e41df..00000000 --- a/docbook/coqos.h.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - coqos.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   coqos.h - Qualcomm Atheros Definitions and Declarations;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef COQOS_HEADER
-#define COQOS_HEADER
-
-/*====================================================================*
- *   custom heder files;
- *--------------------------------------------------------------------*/
-
-#include "../plc/rules.h"
-
-/*====================================================================*
- *   network classification rule structure;
- *--------------------------------------------------------------------*/
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-struct __packed connection
-
-{
-	uint32_t REQ_ID;
-	uint32_t RSVD;
-	uint8_t APP_DA [6];
-	uint8_t RSVD2;
-	struct __packed
-	{
-		uint8_t MOPERAND;
-		uint8_t NUM_CLASSIFIERS;
-		struct MMEClassifier CLASSIFIERS [RULE_MAX_CLASSIFIERS];
-	}
-	rule;
-	struct __packed
-	{
-		uint16_t CSPEC_VERSION;
-		uint8_t CONN_CAP;
-		uint8_t CONN_COQOS_PRIO;
-		uint16_t CONN_RATE;
-		uint32_t CONN_TTL;
-	}
-	cspec;
-};
-
-struct __packed conn_info
-
-{
-	uint8_t SNID;
-	uint16_t CID;
-	uint8_t STEI;
-	uint8_t DTEI;
-	uint8_t LLID;
-	uint8_t RSVD;
-	uint16_t CSPECVERSION;
-	uint8_t CONN_CAP;
-	uint8_t CONN_COQOS_PRIO;
-	uint16_t CONN_RATE;
-	uint32_t CONN_TTL;
-	uint16_t BW_USED;
-};
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/coqos_add.1.html b/docbook/coqos_add.1.html deleted file mode 100644 index f99bdb32..00000000 --- a/docbook/coqos_add.1.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - coqos_add.1 - - - - - - - - - -
-coqos_add(1)                                 Qualcomm Atheros Open Powerline Toolkit                                coqos_add(1)
-
-NAME
-       coqos_add - Add a managed data stream
-
-SYNOPSIS
-       coqos_add action priority rate ttl operand condition [condition] [...]  [device] [...]
-
-DESCRIPTION
-       This page is under construction.
-
-       Add  a  managed  stream  to  one  or  more powerline devices using the VS_CONN_ADD message.  Consult the Qualcomm Atheros
-       Firmware Technical Reference Manual for a description of this vendor specific message type.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-BACKGROUND
-       Bandwidth  management  prioritizes  streams so that data from lowest priority stream is dropped first whenever one of the
-       following conditions is detected.  This ensures that the remaining streams continue operate at their full pontential.
-
-       Degraded line condition
-              The channel degrades to the point where the available PHY rate from the transmitter to the receiver is too low due
-              to the variability of the power line.s characteristics.
-
-       Over subscription
-              Too  much  data  is  being  sent per second, resulting in packet loss due to excessive collisions due to excessive
-              channel oversubscription.
-
-       Lack of channel Capacity
-              On starting new source there is not enough channel capacity to support it.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention progress messages and error messages  are  printed  on  stderr
-              while primary program output is printed on stdout.  This option prints all output on stdout in cases where this is
-              desired.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -r     Display relative memory offsets on output.  This option is the default.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Displays  program  help information on stderr.  This option takes precedence over all other options on the command
-              line except version information.
-
-       -!,--version
-              Displays program version information on stderr.  This option takes precedence over all other options on  the  com‐
-              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
-
-ARGUMENTS
-       action The action taken for frames that satisfy the selection criteria.  Valid actions are "CAP0", "CAP1", "CAP2", "CAP3"
-              to specify the channel access priority queue.  CAP0 and CAP1 are for best effort data.  CAP2 is for video and  non
-              urgent MMEs.  CAP3 is for voice, urgent MMEs and control messages such as IGMP and MLD.
-
-       priority
-              The  relative priority of this stream.  Valid values are 0 through 15 where 0 is the lowest priority and 15 is the
-              highest.
-
-       destination
-              The destination MAC address.
-
-       rate   The average expected data rate for this stream.  Valid values are 1 to 9000 where units are in 10kbps so the mini‐
-              mum rate is 10kbps and the maximum rate is 90mbps.
-
-       ttl    The  time to live for this stream.  Valid values are 10000 to 2000000 where units are in microseconds so the mini‐
-              mum is time is 10 milliseconds and the maximum time is 2 seconds.
-
-       operand
-              The operand specifies the logical relationship between conditions before the action to be taken.   Valid  operands
-              are listed and described under OPERANDS.
-
-       condition
-              A conditional expression consisting of a field, operator and value.  See CONDITIONS for more information.
-
-       device The  MAC  address  of some powerline device.  More than one address may be specified on the command line.  If more
-              than one address is specified then operations are performed on each  device  in  turn.   The  default  address  is
-              "local".  See DEVICES for more information.
-
-CONDITIONS
-       A  condition consists of a field, an operator and a value.  One condition is required but three are permitted.  Condition
-       order is not important but all conditions must appear after the operand and before the control.
-
-       field  The field is the part of the Ethernet frame to be examined.  Some fields are not valid for some actions  but  this
-              program  does not enforce such rules since validation is performed by runtime firmware on each device.  Recognized
-              fields are listed and described under FIELDS.
-
-       operator
-              The operator specifies the relationsip that must exist between the field and value in order for the  condition  to
-              evaluate  True.  Currently, only equality operators are supported.  Valid operators are listed and described under
-              OPERATORS.
-
-       value  The value must be appropriate to the field type.  Some fields are MAC or IP addresses, some are integers, some are
-              bitmaps  and  others  are states.  Integers and bitmaps may be expressed in binary, decimal or hexadecimal format.
-              Binary values staRt with 0b.  Hexadecimal values start with 0x.  States are expressed using keywords.   Users  are
-              responsible  for  knowing  how many bits are significant for each type of value.  Valid values are described along
-              with fields under FIELDS.
-
-OPERANDS
-       The operand indicates the logical relationship that must exist between conditions in the rule set before  the  action  is
-       applied  to  a frame.  Operands are expressed as discrete alphanumeric strings entered in upper, lower or mixed character
-       case.  Failure to enter a known operand will result in an error message that lists all possible operands.  They are posi‐
-       ton sensitive.  One operand is allowed and it must appear after the action and before any condition.
-
-       Any    Apply the action to frames that satisfy any of the conditions.  This is equivalent to the logical or operation.
-
-       All    Apply the action to frames that satisfy all of the conditions.  This is equivalent to the logical and operation.
-
-       Always Apply the action to all frames, regardless of any and all conditions that may be specified.
-
-FIELDS
-       Fields indicate the portion of the frame that is inspected during selection and the size and format of the value permited
-       in the condition statement.  They are expressed as discrete alphanumeric strings entered in upper, lower or mixed charac‐
-       ter case.  Failure to enter a known field will result in an error message that lists all possible fields.
-
-       ET     A 16-bit Ethertype expressed in decimal, hexadecimal or binary.  The format is described in IEEE Standard 802-2001
-              [4].
-
-       EthDA  A 48-bit Ethernet destination address expressed in hexadecimal.  The format is described in IEEE Standard 802-2001
-              [4].
-
-       EthSA  A 48-bit Ethernet source address expressed in hexadecimal.  The format is described in IEEE Standard 802-2001 [4].
-
-       VLANUP An  8-bit  Ethernet  VLAN tag where the lower 3 bits are the User Priority sub-field of a VLAN Tag defined in IEEE
-              Std 802.1Q-1998 (Virtual Bridged Local Area Networks) [11].  The upper 5 bits should be zero.
-
-       VLANID A 16-bit VLAN identifier where the lower 12 bits are the VLAN Identifier (VID) defined  in  IEEE  Std  802.1Q-1998
-              (Virtual Bridged Local Area Networks) [11].  The upper 4 bits should be zero.
-
-       IPV4TOS
-              An 8-bit Type-of-Service code where the format is defined in the RFC 791 (Internet Protocol) [14].
-
-       IPV4PROT
-              An 8-bit Ethernet Protocol identifier.  The format is defined in the RFC 791 (Internet Protocol) [14].
-
-       IPV4SA A 32-bit Internet Protocol source address expressed in dotted-decimal notation.  The official format is defined in
-              RFC 791 (Internet Protocol) [14].  Our implementation permits empty octets and leading zeros within  fields.   For
-              example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
-
-       IPV4DA A  32-bit  Internet  Protocol  destination  address  expressed  in dotted-decimal notation. The official format is
-              defined in RFC 791 (internet Protocol) [14]. Our implementation permits empty  octets  and  leading  zeros  within
-              fields. For example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
-
-       IPV6TC An 8-bit Internet Protocol V6 traffic class expressed as defined in RFC 2460 (Internet Protocol Version 6) [17].
-
-       IPV6FL A  24-bit  IPV6  flow label where the lower 20 bits are the IPv6 Flow Label defined in RFC 2460 (Internat Protocol
-              Version 6) [17].  The upper 4 bits should be zero.  The value can be entered either as a decimal,  binary  or  hex
-              integer.
-
-       IPV6SA A  128-bit IPV6 source address expressed as colon-separated hexadecmial quartets (octet pairs).  The official for‐
-              mat is defined in RFC 2460 (Internet Protocol Version 6) [17].  Our implementation permits multiple empty  fields,
-              abreviated  fields  and leading zeros within fields.  When multiple empty fields appear, only the right-most occu‐
-              rance    expands     to     zeros.      For     example,     "FFFF::DDDD::BBBB::AAAA"     is     equivalent     to
-              "FFFF:0000:DDDD:0000:BBBB:0000:0000:AAAA".
-
-       IPV6DA A  128-bit IPV6 destination address expressed as colon-separated hexadecimal quartets (octet pairs).  The official
-              format is defined in RFC 2460 (Internet Protocol Version 6)  [17].   Our  implementation  permits  multiple  empty
-              fields,  abbreviated  fields  and leading zeros within fields.  When multiple empty fields appear, only the right-
-              most   occurance   expands   to   zeros.     For    example,    "AAAA::BBBB::CCCC::DDDD"    is    equivalent    to
-              "AAAA:0000:BBBB:0000:CCCC:0000:0000:DDDD".
-
-       TCPSP  A  16-bit  TCP  source port as a decimal integer.  The format is defined in RFC 793 (Transmission Control Protocol
-              [15]).
-
-       TCPDP  A 16-bit TCP destination port expressed as a decimal integer.  The format is defined in RFC 793 (Transmission Con‐
-              trol Protocol [15]).
-
-       UDPSP  A 16-bit UDP source port expressed as a decimal integer.  The format is defined in RFC 768 (User Datagram Protocol
-              [13]).
-
-       UDPDP  A 16-bit UDP destination port expressed as a decimal integer.  The format is defined in  RFC  768  (User  Datagram
-              Protocol [13]).
-
-       IPSP   A  16-bit  IP  source  port  expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
-              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
-
-       IPDP   A 16-bit IP destination port expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
-              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
-
-       MME    A  24-bit  Atheros HomePlugAV Management Message type expressed in hexadecimal.  The first byte is the MMV and the
-              next two bytes are the MMTYPE for a HomePlug AV frame as defined in the HomePlug  AV  Specification.   The  MMTYPE
-              will match any MME sub-type (Request; Confirm; Indicate; Response).  This field is only valid for action "Boost".
-
-OPERATORS
-       An  operator  indicates an equality between a field and a value.  An operator is an alphanumeric string entered in upper,
-       lower or mixed character case.  Failure to enter a known operator will result in an error message that lists all possible
-       operators.  Operators are position sensitive and must appear between each field and value.
-
-       Is     Indicates that the frame field must equal the associated value for the condition to evaluate true.
-
-       Not    Indicates that the frame field must not equal the associated value for the condition to true true.
-
-STATES
-       A state is a special case of value.
-
-       True,On,Yes,Present
-              Indicates  a positive state or presence of some entity.  All are equivalent and can be used interchangeably.  Dou‐
-              ble negatives are permitted so "Is True" is equvalent to "Not False".
-
-       False,Off,No,Missing
-              Indicates a negative state or absence of some entity.  ALl are equivalent and can be used interchangeably.  Double
-              negatives are permitted so "Is False" is equvalent to "Not True".
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are common or special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
-              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.  See the Qual‐
-              comm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       The following example adds a temporary stream to device 00:b0:52:BA:BE:01 which will then manage the bandwidth  for  that
-       stream until removed with program coqos_rel.
-
-            # coqos_add CAP2 15 5000 200000 any ethda is 192.168.105 00:B0:52:BA:BE:01
-
-       This  adds a stream to the bandwidth manager that sets all traffic to destination address of 192.168.0.105 as priority 15
-       (the highest priority).  This would then need to also be sent to each device on the network.  Refer to int6krule for more
-       details on how to specify conditions.
-
-SEE ALSO
-       coqos_info(1), coqos_man(1), coqos_mod(1), coqos_rel(1)
-
-CREDITS
-        Bill Wike <bill.wike@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                coqos_add(1)
-
- - - diff --git a/docbook/coqos_add.c.html b/docbook/coqos_add.c.html deleted file mode 100644 index aff48b46..00000000 --- a/docbook/coqos_add.c.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - coqos_add.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   coqos_add.c - Add MCMSA Stream
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../plc/coqos.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/basespec.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/bytespec.c"
-#include "../tools/ipv4spec.c"
-#include "../tools/ipv6spec.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#include "../tools/lookup.c"
-#include "../tools/assist.c"
-#include "../tools/codelist.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Request.c"
-#include "../plc/Confirm.c"
-#include "../plc/Failure.c"
-#include "../plc/Display.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../plc/rules.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *
- *   signed add_conn (struct plc * plc, struct connection * connection);
- *
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed add_conn (struct plc * plc, struct connection * connection)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_add_conn_req
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		struct connection connection;
-	}
-	* request = (struct vs_add_conn_req *)(message);
-	struct __packed vs_add_conn_cnf
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t REQ_ID;
-		uint8_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RSVD;
-		uint16_t CID;
-		uint8_t REJECT_MAC [ETHER_ADDR_LEN];
-		uint16_t CSPEC_VERSION;
-		uint8_t CONN_CAP;
-		uint8_t CONN_COQOS_PRIO;
-		uint16_t CONN_RATE;
-		uint32_t CONN_TTL;
-	}
-	* confirm = (struct vs_add_conn_cnf *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Add COQOS connection");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_CONN_ADD | MMTYPE_REQ));
-	memcpy (&request->connection, connection, sizeof (struct connection));
-	memcpy (&request->connection.rule.CLASSIFIERS [request->connection.rule.NUM_CLASSIFIERS], &request->connection.cspec, sizeof (request->connection.cspec));
-	plc->packetsize = sizeof (struct vs_add_conn_req);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_CONN_ADD | MMTYPE_CNF)) <= 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, "Device won't add connection");
-			return (-1);
-		}
-		Confirm (plc, "Setting ...");
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:qv",
-		"action priority destination rate ttl operand condition [...] [device] [...]\n\n          where condition is field operator value",
-		"CoQos Stream Utility",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	struct connection connection;
-	struct MMEClassifier * rule = (struct MMEClassifier *)(&connection.rule.CLASSIFIERS);
-	uint16_t * word;
-	uint8_t * byte;
-	signed code;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	memset (&connection, 0, sizeof (connection));
-	if ((code = lookup (* argv++, actions, SIZEOF (actions))) == -1)
-	{
-		assist (*--argv, CLASSIFIER_ACTION_NAME, actions, SIZEOF (actions));
-	}
-	connection.cspec.CONN_CAP = (uint8_t)(code);
-	argc--;
-	if (!argc)
-	{
-		error (1, ECANCELED, "Expected Priority: 0-15");
-	}
-	connection.cspec.CONN_COQOS_PRIO = (uint8_t)(uintspec (* argv++, 0, 15));
-	argc--;
-	if (!argc)
-	{
-		error (1, ECANCELED, "Expected Destination MAC Address");
-	}
-	if (!hexencode (connection.APP_DA, sizeof (connection.APP_DA), synonym (* argv++, devices, SIZEOF (devices))))
-	{
-		error (1, errno, "Invalid MAC=[%s]", *--argv);
-	}
-	argc--;
-	if (!argc)
-	{
-		error (1, ECANCELED, "Expected Data Rate: 10-9000 (kbps)");
-	}
-	connection.cspec.CONN_RATE = (uint16_t)(uintspec (* argv++, 1, 9000));
-	argc--;
-	if (!argc)
-	{
-		error (1, ECANCELED, "Expected TTL: 10000-2000000 (microseconds)");
-	}
-	connection.cspec.CONN_TTL = (uint32_t)(uintspec (* argv++, 10000, 2000000));
-	argc--;
-	if ((code = lookup (* argv++, operands, SIZEOF (operands))) == -1)
-	{
-		assist (*--argv, CLASSIFIER_OPERAND_NAME, operands, SIZEOF (operands));
-	}
-	connection.rule.MOPERAND = (uint8_t)(code);
-	argc--;
-	while ((* argv) && (lookup (* argv, controls, SIZEOF (controls)) == -1))
-	{
-		if ((code = lookup (* argv++, fields, SIZEOF (fields))) == -1)
-		{
-			assist (*--argv, CLASSIFIER_FIELD_NAME, fields, SIZEOF (fields));
-		}
-		rule->CR_PID = (uint8_t)(code);
-		argc--;
-		if ((code = lookup (* argv++, operators, SIZEOF (operators))) == -1)
-		{
-			assist (*--argv, CLASSIFIER_OPERATOR_NAME, operators, SIZEOF (operators));
-		}
-		rule->CR_OPERAND = (uint8_t)(code);
-		argc--;
-		if (!argc || !* argv)
-		{
-			error (1, ENOTSUP, "Have %s '%s' without any value", CLASSIFIER_OPERATOR_NAME, *--argv);
-		}
-		switch (rule->CR_PID)
-		{
-		case FIELD_ETH_SA:
-		case FIELD_ETH_DA:
-			bytespec (* argv++, rule->CR_VALUE, ETHER_ADDR_LEN);
-			break;
-		case FIELD_IPV4_SA:
-		case FIELD_IPV4_DA:
-			ipv4spec (* argv++, rule->CR_VALUE);
-			break;
-		case FIELD_IPV6_SA:
-		case FIELD_IPV6_DA:
-			ipv6spec (* argv++, rule->CR_VALUE);
-			break;
-		case FIELD_VLAN_UP:
-		case FIELD_IPV4_TOS:
-		case FIELD_IPV4_PROT:
-			byte = (uint8_t *)(rule->CR_VALUE);
-			*byte = (uint8_t)(basespec (* argv++, 0, sizeof (* byte)));
-			break;
-		case FIELD_VLAN_ID:
-		case FIELD_TCP_SP:
-		case FIELD_TCP_DP:
-		case FIELD_UDP_SP:
-		case FIELD_UDP_DP:
-		case FIELD_IP_SP:
-		case FIELD_IP_DP:
-			word = (uint16_t *)(rule->CR_VALUE);
-			*word = (uint16_t)(basespec (* argv++, 0, sizeof (* word)));
-			*word = htons (*word);
-			break;
-		case FIELD_ETH_TYPE:
-			word = (uint16_t *)(rule->CR_VALUE);
-			*word = (uint16_t)(basespec (* argv++, 0, sizeof (* word)));
-			*word = htons (*word);
-			break;
-		case FIELD_HPAV_MME:
-			bytespec (* argv++, rule->CR_VALUE, sizeof (uint8_t) + sizeof (uint16_t));
-			byte = (uint8_t *)(rule->CR_VALUE);
-			HTOBE16 ((uint16_t)(* ++byte));
-			break;
-		case FIELD_IPV6_TC:
-		case FIELD_IPV6_FL:
-		case FIELD_TCP_ACK:
-		default:
-			error (1, ENOTSUP, "Field '%s' (0x%02X)", argv [-2], rule->CR_PID);
-			break;
-		}
-		connection.rule.NUM_CLASSIFIERS++;
-		if (connection.rule.NUM_CLASSIFIERS > RULE_MAX_CLASSIFIERS)
-		{
-			error (1, ENOTSUP, "More than %d classifiers in rule", RULE_MAX_CLASSIFIERS);
-		}
-		rule++;
-		argc--;
-	}
-	connection.cspec.CSPEC_VERSION = 0x0001;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		add_conn (&plc, &connection);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		add_conn (&plc, &connection);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/coqos_info.1.html b/docbook/coqos_info.1.html deleted file mode 100644 index d3a4651a..00000000 --- a/docbook/coqos_info.1.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - coqos_info.1 - - - - - - - - - -
-coqos_info(1)                                Qualcomm Atheros Open Powerline Toolkit                               coqos_info(1)
-
-NAME
-       coqos_info - CoQoS Stream Utility
-
-SYNOPSIS
-       coqos_info [options] type [cid] [limit] [device]
-
-DESCRIPTION
-       This page is under construction.
-
-       None.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention progress messages and error messages  are  printed  on  stderr
-              while primary program output is printed on stdout.  This option prints all output on stdout in cases where this is
-              desired.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -r     Display relative memory offsets on output.  This option is the default.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Displays  program  help information on stderr.  This option takes precedence over all other options on the command
-              line except version information.
-
-       -!,--version
-              Displays program version information on stderr.  This option takes precedence over all other options on  the  com‐
-              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
-
-ARGUMENTS
-       type   The  request  type.   Valid  types  are "STA", "CID", "RSVD", "VIC", "BW", and "BW".  Individual request types are
-              described below.
-
-       device The MAC address of some powerline device.  More than one address may be specified on the command  line.   If  more
-              than  one  address  is  specified  then  operations  are performed on each device in turn.  The default address is
-              "local".  See DEVICES for more information.
-
-TYPES
-       STA    Station.  Request information on all active connections for this station.
-
-       CID number
-              Connection identifier.  If present, it must be followed by a valid connection identifier.  Connection  identifiers
-              are  assigned  when the connection is added using program coqos_add.  The connection identifier is two bytes where
-              byte 0 is the LLID-F and byte 1 is the OrigTEI.
-
-       RSVD   Reserved.  Sets REQ_TYPE = 2 in the mme.
-
-       VIC    Vicinity.  Provide all active connections in the vicinity.
-
-        BW number
-              Bandwidth.  set station to provide info when the limit is exceeded.  BW must be followed by a number.  This number
-              is in units of 10kbps.  BWC cancels all previous requests.
-
-DEVICES
-       Ethernet  MAC addresses are expressed as six hexadecimal octets optionally separated by colon.  For example, the Qualcomm
-       Atheros Local Management Address (LMA) of "00b052000001" may also be entered as "00:b0:52:00:00:01"  or  "00b052:000001".
-       Addresses  are  case  insensitive  and  quotes  are optional.  In addition, some special addresses may be entered by name
-       rather than number where names are case sensitive.
-
-       all    A synonym for the "broadcast" address, described next.
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              will respond to this address.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.  See the Qual‐
-              comm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       This command requests connection from the station
-
-            # coqos_info STA 00:B0:52:BA:BE:01
-
-       This command set the station to provide notification if the bandwidth used exceeds 20mbps
-
-            # coqos_info BW 2000 00:B0:52:BA:BE:01
-
-SEE ALSO
-       coqos_add(1), coqos_rel(1), coqos_man(1), coqos_mod(1)
-
-CREDITS
-        Bill Wike <bill.wike@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                               coqos_info(1)
-
- - - diff --git a/docbook/coqos_info.c.html b/docbook/coqos_info.c.html deleted file mode 100644 index a9bc3269..00000000 --- a/docbook/coqos_info.c.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - - coqos_info.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   coqos_info.c - Retrieve MCMSA stream info
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../plc/coqos.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/bytespec.c"
-#include "../tools/ipv4spec.c"
-#include "../tools/ipv6spec.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#include "../tools/lookup.c"
-#include "../tools/assist.c"
-#include "../tools/codelist.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define CONTROL "control"
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-#define CONTROL_STA 0x00
-#define CONTROL_CID 0x01
-#define CONTROL_RSVD 0x02
-#define CONTROL_VIC 0x03
-#define CONTROL_BW 0x04
-#define CONTROL_BWC 0xFF
-
-static struct _code_ const types [] =
-
-{
-	{
-		CONTROL_STA,
-		"STA"
-	},
-	{
-		CONTROL_CID,
-		"CID"
-	},
-	{
-		CONTROL_RSVD,
-		"RSVD"
-	},
-	{
-		CONTROL_VIC,
-		"VIC"
-	},
-	{
-		CONTROL_BW,
-		"BW"
-	},
-	{
-		CONTROL_BWC,
-		"BWC"
-	}
-};
-
-/*====================================================================*
- *
- *   signed con_info (struct plc * plc, uint8_t TYPE, uint16_t CID, uint16_t TOT_BW_USED);
- *
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed con_info (struct plc * plc, uint8_t TYPE, uint16_t CID, uint16_t TOT_BW_USED)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_con_info_req
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t REQ_TYPE;
-		uint32_t RSVD;
-		uint16_t CSPEC_VER;
-		uint16_t CID;
-		uint16_t TOT_BW_USED;
-	}
-	* request = (struct vs_con_info_req *)(message);
-	struct __packed vs_con_info_cnf
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t REQ_TYPE;
-		uint8_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RSVD;
-		uint8_t NUM_CONN;
-		struct conn_info CONN_INFO [64];
-	}
-	* confirm = (struct vs_con_info_cnf *)(message);
-	struct conn_info * conn_info = (struct conn_info*)(confirm->CONN_INFO);
-	struct vs_con_info_cnf * indicate = (struct vs_con_info_cnf *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	int i;
-	Request (plc, "COQOS connection information");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_CONN_INFO | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->REQ_TYPE = TYPE;
-	request->CID = CID;
-	request->TOT_BW_USED = TOT_BW_USED;
-	request->CSPEC_VER = 0x01;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_CONN_INFO | MMTYPE_CNF)) <= 0);
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, "Error requesting information.");
-		return (-1);
-	}
-
-/* BW exceeded request and "cancel all requests" do not send indicate */
-
-	if ((TYPE == CONTROL_BW) || (TYPE == CONTROL_BWC))
-	{
-		Confirm (plc, "Success");
-		return (0);
-	}
-	Confirm (plc, "Received confirm, waiting for indicate...");
-	while (ReadMME (plc, 0, (VS_CONN_INFO | MMTYPE_IND)) <= 0);
-	if (indicate->MSTATUS)
-	{
-		Failure (plc, "Error requesting information.");
-		return (-1);
-	}
-	printf ("Number of Connections: %d\n", (int)indicate->NUM_CONN);
-	conn_info = (struct conn_info *)(indicate->CONN_INFO);
-	for (i = 0; i < indicate->NUM_CONN; i++)
-	{
-		printf ("SNID: %02X ", conn_info->SNID);
-		printf ("CID: %04X ", conn_info->CID);
-		printf ("STEI: %02X ", conn_info->STEI);
-		printf ("DTEI: %02X ", conn_info->DTEI);
-		printf ("LLID: %02X ", conn_info->LLID);
-		printf ("CSPEC_VERSION: %04X ", conn_info->CSPECVERSION);
-		printf ("CONN_CAP: %02d ", conn_info->CONN_CAP);
-		printf ("CONN_COQOS_PRIO: %02d ", conn_info->CONN_COQOS_PRIO);
-		printf ("CONN_RATE: %d ", conn_info->CONN_RATE);
-		printf ("CONN_TTL: %d ", conn_info->CONN_TTL);
-		printf ("BW_USED: %d \n", conn_info->BW_USED);
-		conn_info++;
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:qv",
-		"[sta|cid|rsvd|vic|bw|bwc] [limit] [device] [...]",
-		"CoQos Stream Utility",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	uint16_t cid = 0;
-	uint16_t limit = 0;
-	uint8_t type;
-	signed code;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if ((code = lookup (* argv++, types, SIZEOF (types))) == -1)
-	{
-		assist (*--argv, CONTROL, types, SIZEOF (types));
-	}
-	type = (uint8_t)(code);
-	argc--;
-	if (type == CONTROL_CID)
-	{
-		if (!argc)
-		{
-			error (1, errno, "Expected Connection Identifier");
-		}
-		if (!hexencode ((uint8_t *)(&cid), sizeof (cid), * argv++))
-		{
-			error (1, errno, "Invalid CID");
-		}
-		cid = htons (cid);
-		argc--;
-	}
-	else if (type == CONTROL_BW)
-	{
-		if (!argc)
-		{
-			error (1, errno, "Expected Bandwidth Limit");
-		}
-		limit = atoi (* argv++);
-		argc--;
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		con_info (&plc, type, cid, limit);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		con_info (&plc, type, cid, limit);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/coqos_man.1.html b/docbook/coqos_man.1.html deleted file mode 100644 index 48331c44..00000000 --- a/docbook/coqos_man.1.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - coqos_man.1 - - - - - - - - - -
-coqos_man(1)                                 Qualcomm Atheros Open Powerline Toolkit                                coqos_man(1)
-
-NAME
-       coqos_man - Set and monitor bandwidth
-
-SYNOPSIS
-       coqos_man [options] [device] [...]
-
-DESCRIPTION
-       This page is under construction.
-
-       Monitors  the  bandwidth  being  used and sets a bandwidth limit.  If the bandwidth limit is exceeded it will suspend the
-       lower priority streams in priority order until the bandwidth being used is less than the limit.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -e     Redirects  stderr  messages  to  stdout.  By convention progress messages and error messages are printed on stderr
-              while primary program output is printed on stdout.  This option prints all output on stdout in cases where this is
-              desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -r     Display relative memory offsets on output.  This option is the default.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
-              line except version information.
-
-       -!,--version
-              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
-              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
-
-ARGUMENTS
-       limit  The bandwidth limit, in kbps, expressed as a decimal integer.  This argument is required.  The range is 10 through
-              90000.
-
-       device The  MAC  address  of some powerline device.  More than one address may be specified on the command line.  If more
-              than one address is specified then operations are performed on each  device  in  turn.   The  default  address  is
-              "local".  See DEVICES for more information.
-
-DEVICES
-       Ethernet  MAC addresses are expressed as six hexadecimal octets optionally separated by colon.  For example, the Qualcomm
-       Atheros Local Management Address (LMA) of "00b052000001" may also be entered as "00:b0:52:00:00:01"  or  "00b052:000001".
-       Addresses  are  case  insensitive  and  quotes  are optional.  In addition, some special addresses may be entered by name
-       rather than number where names are case sensitive.
-
-       all    A synonym for the "broadcast" address, described next.
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              will respond to this address.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.  See the Qual‐
-              comm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       The following example suspends streams if the bandwidth used exceeds 20mbps.
-
-          # coqos_man 20000 00:B0:52:BA:BE:01
-
-SEE ALSO
-       coqos_add(1), coqos_info(1), coqos_mod(1), coqos_rel(1)
-
-CREDITS
-        Bill Wike <bill.wike@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                coqos_man(1)
-
- - - diff --git a/docbook/coqos_man.c.html b/docbook/coqos_man.c.html deleted file mode 100644 index d57d0d7f..00000000 --- a/docbook/coqos_man.c.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - coqos_man.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   coqos_man.c - Manage MCSMA streams
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../plc/coqos.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Request.c"
-#include "../plc/Confirm.c"
-#include "../plc/Failure.c"
-#include "../plc/Display.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *
- *   signed con_man (struct plc * plc, uint16_t TOT_BW_USED);
- *
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-signed con_man (struct plc * plc, uint16_t TOT_BW_USED)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_con_info_req
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t REQ_TYPE;
-		uint32_t RSVD;
-		uint16_t CSPEC_VER;
-		uint16_t CID;
-		uint16_t TOT_BW_USED;
-	}
-	* request = (struct vs_con_info_req *)(message);
-	struct __packed vs_con_info_cnf
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t REQ_TYPE;
-		uint8_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RSVD;
-		uint8_t NUM_CONN;
-		struct conn_info CONN_INFO [64];
-	}
-	* confirm = (struct vs_con_info_cnf *)(message);
-	struct conn_info * conn_info =(struct conn_info*)(confirm->CONN_INFO);
-	struct vs_con_info_cnf *indicate = (struct vs_con_info_cnf *)(message);
-	struct __packed vs_mod_conn_req
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t REQ_ID;
-		uint32_t RSVD;
-		uint16_t CID;
-		uint8_t MOD_CTRL;
-	}
-	* mc_request = (struct vs_mod_conn_req *)(message);
-	struct __packed vs_mod_conn_cnf
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t REQ_ID;
-		uint8_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RSVD;
-	}
-	* mc_confirm = (struct vs_mod_conn_cnf *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	int i;
-	int bwused;
-	int lowest;
-	uint16_t lowcid;
-	while (1)
-	{
-		Request (plc, "COQOS connection information (requesting bandwidth notification)");
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_CONN_INFO | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		request->REQ_TYPE = 0x04;
-		request->CID = 0x00;
-		request->CSPEC_VER = 0x01;
-		request->TOT_BW_USED = TOT_BW_USED;
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		while (ReadMME (plc, 0, (VS_CONN_INFO | MMTYPE_CNF)) <= 0);
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, "Could not set up bandwidth notification.");
-		}
-		else
-		{
-			Confirm (plc, "Set up bandwidth monitoring.");
-			break;
-		}
-		sleep (1);
-	}
-	while (1)
-	{
-
-/*
- * Wait for indications saying too much bandwidth is
- * in use.
- */
-
-		while (ReadMME (plc, 0, (VS_CONN_INFO | MMTYPE_IND)) <= 0)
-		{
-			continue;
-		}
-		if (indicate->MSTATUS)
-		{
-			Failure (plc, "Connection Info Indicate error");
-			continue;
-		}
-		printf ("Number of Connections: %d\n", indicate->NUM_CONN);
-		conn_info = (struct conn_info *)(confirm->CONN_INFO);
-		bwused = 0;
-		lowest = conn_info->CONN_COQOS_PRIO;
-		lowcid = conn_info->CID;
-		for (i = 0; i < indicate->NUM_CONN; i++)
-		{
-			bwused += conn_info->BW_USED;
-			if (conn_info->CONN_COQOS_PRIO < lowest)
-			{
-				lowest = conn_info->CONN_COQOS_PRIO;
-				lowcid = conn_info->CID;
-			}
-			conn_info++;
-		}
-		printf ("Total bandwidth used: %d\n", bwused);
-		if (bwused <= TOT_BW_USED)
-		{
-			continue;
-		}
-		printf ("Bandwidth limit exceeded dropping: %04X\n", lowcid);
-		Request (plc, "COQOS Modify Connection (suspend)");
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_CONN_MOD | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		mc_request->MOD_CTRL = 0x00;
-		mc_request->CID = lowcid;
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		while (ReadMME (plc, 0, (VS_CONN_MOD | MMTYPE_CNF)) <= 0);
-		if (mc_confirm->MSTATUS)
-		{
-			Failure (plc, "Could not suspend stream.");
-			continue;
-		}
-		printf ("Connection ID: %04X suspended\n", lowcid);
-		sleep (5);
-
-/* flush out old data */
-
-		while (ReadMME (plc, 0, (VS_CONN_INFO | MMTYPE_IND)) > 0);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:qv",
-		"limit [device] [...]",
-		"CoQos Stream Utility",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	uint16_t limit;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (!argc)
-	{
-		error (1, ECANCELED, "No limit given");
-	}
-	limit = (uint16_t)(uintspec (* argv++, 10, 90000));
-	argc--;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		con_man (&plc, limit);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		con_man (&plc, limit);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/coqos_mod.1.html b/docbook/coqos_mod.1.html deleted file mode 100644 index de46154e..00000000 --- a/docbook/coqos_mod.1.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - coqos_mod.1 - - - - - - - - - -
-coqos_mod(1)                                 Qualcomm Atheros Open Powerline Toolkit                                coqos_mod(1)
-
-NAME
-       coqos_mod - Suspend or resume a managed data stream
-
-SYNOPSIS
-       coqos_mod [options] action cid [device] [...]
-
-DESCRIPTION
-       This page is under construction.
-
-       Suspend  or  resume a stream through the bandwidth manager using an Atheros vendor specific VS_MOD_CONN message.  This is
-       the proper way to stop a stream flowing if the data rate exceeds the available bandwidth.  Use program coqos_man  to  set
-       stream bandwidth.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -r     Display relative memory offsets on output.  This option is the default.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
-              line except version information.
-
-       -!,--version
-              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
-              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
-
-ARGUMENTS
-       action A symbol indicating the action to be performed on the stream identified by argument cid.  Valid actions are  "sus‐
-              pend" and "resume".  See ACTIONS for an explanation of each action.
-
-       cid    A  connection  identifier.   (Charlie,  expand  on this.)  Connection ID.  2 byte number to identify the stream to
-              delete.  Byte 0 is the OrigTEI and byte one is the LLID-F.
-
-       device The MAC address of some powerline device.  More than one address may be specified on the command  line.   If  more
-              than  one  address  is  specified  then  operations  are performed on each device in turn.  The default address is
-              "local".  See DEVICES for more information.
-
-ACTIONS
-       suspend
-              Suspend the identified stream.  See argument cid for more information.
-
-       resume Resume the identified stream.  See argument cid for more information.
-
-DEVICES
-       Ethernet MAC addresses are expressed as six hexadecimal octets optionally separated by colon.  For example, the  Qualcomm
-       Atheros  Local  Management Address (LMA) of "00b052000001" may also be entered as "00:b0:52:00:00:01" or "00b052:000001".
-       Addresses are case insensitive and quotes are optional.  In addition, some special  addresses  may  be  entered  by  name
-       rather than number where names are case sensitive.
-
-       all    A synonym for the "broadcast" address, described next.
-
-       broadcast
-              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
-              will respond to this address.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.  Ethernet  MAC
-              addresses  are  six  hexadecimal octets optionally separated by colon.  For example, the addresses "00b052000001",
-              "00:b0:52:00:00:01" and "00b052:000001" are all valid and equivalent.  Certain Ethernet device addresses are  spe‐
-              cial and may be entered by name rather than number.
-
-       all    A synonym for "broadcast", described next.
-
-       broadcast
-              A  synonym  for the standard Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or
-              foreign will respond to this address.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       The following example suspends a stream 805.  All data in this cid will be discarded and not sent over the channel.
-
-          # coqos_mod SPND 805 00:B0:52:BA:BE:01
-
-SEE ALSO
-       coqos_add(1), coqos_info(1), coqos_man(1), coqos_rel(1)
-
-CREDITS
-        Bill Wike <bill.wike@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                coqos_mod(1)
-
- - - diff --git a/docbook/coqos_mod.c.html b/docbook/coqos_mod.c.html deleted file mode 100644 index cf1df0c5..00000000 --- a/docbook/coqos_mod.c.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - coqos_mod.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   coqos_mod.c - Modify MCMSA stream
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/bytespec.c"
-#include "../tools/ipv4spec.c"
-#include "../tools/ipv6spec.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#include "../tools/lookup.c"
-#include "../tools/assist.c"
-#include "../tools/codelist.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Request.c"
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define ACTION "action"
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-#define ACTION_SPND 0x00
-#define ACTION_RES 0x01
-
-static struct _code_ const actions [] =
-
-{
-	{
-		ACTION_SPND,
-		"suspend"
-	},
-	{
-		ACTION_RES,
-		"resume"
-	}
-};
-
-/*====================================================================*
- *
- *   signed mod_conn (struct plc * plc, uint8_t TYPE, uint16_t CID);
- *
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed mod_conn (struct plc * plc, uint8_t TYPE, uint16_t CID)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_mod_conn_req
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t REQ_ID;
-		uint32_t RSVD;
-		uint16_t CID;
-		uint8_t MOD_CTRL;
-	}
-	* request = (struct vs_mod_conn_req *)(message);
-	struct __packed vs_mod_conn_cnf
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t REQ_ID;
-		uint8_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RSVD;
-		uint16_t CID;
-	}
-	* confirm = (struct vs_mod_conn_cnf *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "COQOS modify connection");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_CONN_MOD | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->MOD_CTRL = TYPE;
-	request->CID = CID;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_CONN_MOD | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		Confirm (plc, "%s connection %04X", (TYPE == ACTION_SPND)? "Suspended": "Resumed", CID);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:qv",
-		"spnd,res cid",
-		"CoQos Stream Utility",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	uint16_t cid;
-	uint8_t type;
-	signed code;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if ((code = lookup (* argv++, actions, SIZEOF (actions))) == -1)
-	{
-		assist (*--argv, ACTION, actions, SIZEOF (actions));
-	}
-	type = (uint8_t)(code);
-	argc--;
-	if (argc == 0)
-	{
-		error (1, ECANCELED, "Missing CID");
-	}
-	if (!hexencode ((uint8_t *)(&cid), sizeof (cid), * argv++))
-	{
-		error (1, errno, "Invalid CID");
-	}
-	cid = htons (cid);
-	argc--;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		mod_conn (&plc, type, cid);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		mod_conn (&plc, type, cid);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/coqos_rel.1.html b/docbook/coqos_rel.1.html deleted file mode 100644 index 7a60c810..00000000 --- a/docbook/coqos_rel.1.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - coqos_rel.1 - - - - - - - - - -
-coqos_rel(1)                                 Qualcomm Atheros Open Powerline Toolkit                                coqos_rel(1)
-
-NAME
-       coqos_rel - Release Bandwidth Management
-
-SYNOPSIS
-       coqos_rel [options] cid [device] [...]
-
-DESCRIPTION
-       This page is under construction.
-
-       Instructs  one or more devices to stop managing a stream.  Use this program when bandwidth management is no longer needed
-       or wanted.  Use program coqos_mod to suspend and resume bandwidth management of a stream.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -r     Display relative memory offsets on output.  This option is the default.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Displays  program  help information on stderr.  This option takes precedence over all other options on the command
-              line except version information.
-
-       -!,--version
-              Displays program version information on stderr.  This option takes precedence over all other options on  the  com‐
-              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
-
-ARGUMENTS
-       cid    The connection identifier of the affected stream.
-
-       device The  MAC  address  of some powerline device.  More than one address may be specified on the command line.  If more
-              than one address is specified then operations are performed on each  device  in  turn.   The  default  address  is
-              "local".  See DEVICES for more information.
-
-DEVICES
-       Ethernet  MAC addresses are expressed as six hexadecimal octets optionally separated by colon.  For example, the Qualcomm
-       Atheros Local Management Address (LMA) of "00b052000001" may also be entered as "00:b0:52:00:00:01"  or  "00b052:000001".
-       Addresses  are  case  insensitive  and  quotes  are optional.  In addition, some special addresses may be entered by name
-       rather than number where names are case sensitive.
-
-       all    A synonym for the "broadcast" address, described next.
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              will respond to this address.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information may not be available.  Qualcomm Atheros  reserves  the  right  to  modify  message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       The  next  example instructs device 00:B0:52:BA:BE"01 to release stream 803. The stream will the remain unmanaged indefi‐
-       nitely.
-
-          # coqos_rel 803 00:B0:52:BA:BE:01
-
-SEE ALSO
-       coqos_add(1), coqos_info(1), coqos_man(1), coqos_mod(1)
-
-CREDITS
-        Bill Wike <bill.wike@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com> "
-
-open-plc-utils-0.0.3                                        Mar 2014                                                coqos_rel(1)
-
- - - diff --git a/docbook/coqos_rel.c.html b/docbook/coqos_rel.c.html deleted file mode 100644 index 733d811c..00000000 --- a/docbook/coqos_rel.c.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - coqos_rel.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   coqos_rel.c - Release MCSMA stream
- *
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/bytespec.c"
-#include "../tools/ipv4spec.c"
-#include "../tools/ipv6spec.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Request.c"
-#include "../plc/Confirm.c"
-#include "../plc/Failure.c"
-#include "../plc/Display.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *
- *   signed rel_conn (struct plc * plc, uint16_t CID);
- *
- *
- *
- *   Contributor(s):
- *	Bill Wike <bill.wike@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-signed rel_conn (struct plc * plc, uint16_t CID)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rel_conn_req
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t REQ_ID;
-		uint32_t RSVD;
-		uint16_t CID;
-	}
-	* request = (struct vs_rel_conn_req *)(message);
-	struct __packed vs_rel_conn_cnf
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint32_t REQ_ID;
-		uint8_t MSTATUS;
-		uint16_t ERR_REC_CODE;
-		uint32_t RSVD;
-	}
-	* confirm = (struct vs_rel_conn_cnf *)(message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Release COQOS connection");
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_CONN_REL | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->CID = CID;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	while (ReadMME (plc, 0, (VS_CONN_REL | MMTYPE_CNF)) > 0)
-	{
-		if (confirm->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		Confirm (plc, "Released %04X", CID);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:qv",
-		"cid",
-		"CoQos Stream Utility",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	uint16_t cid;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (!argc)
-	{
-		error (1, ECANCELED, "Missing CID");
-	}
-	if (!hexencode ((uint8_t *)(&cid), sizeof (cid), * argv++))
-	{
-		error (1, EINVAL, "CID=[%s]", *--argv);
-	}
-	cid = htons (cid);
-	argc--;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		rel_conn (&plc, cid);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		rel_conn (&plc, cid);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/cpp.txt b/docbook/cpp.txt deleted file mode 100644 index c66632af..00000000 --- a/docbook/cpp.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - -
-
    -
  1. - *.cpp -
  2. -
-
diff --git a/docbook/dataspec.c.html b/docbook/dataspec.c.html deleted file mode 100644 index 48cf38fc..00000000 --- a/docbook/dataspec.c.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - dataspec.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t dataspec (char const * string,  void * memory, size_t extent);
- *
- *   memory.h
- *
- *   encode a memory region with a variable-length hexadecimal string;
- *   return the number of bytes encoded or terminate the program on
- *   error;
- *
- *   the number of octets in string must equal the memory extent or
- *   an error will occur; octets may be seperated by semi-colons;
- *   empty octets are illegal;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DATASPEC_SOURCE
-#define DATASPEC_SOURCE
-
-#include <ctype.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-size_t dataspec (char const * string, void * memory, size_t extent)
-
-{
-	char const * number = string;
-	byte * origin = (byte *)(memory);
-	byte * offset = (byte *)(memory);
-	if (!number)
-	{
-		error (1, EFAULT, "dataspec");
-	}
-
-#ifdef WIN32
-
-	while (isspace (*number))
-	{
-		number++;
-	}
-
-#endif
-
-	while ((*number) && (extent))
-	{
-		unsigned digit = 0;
-
-#ifdef WIN32
-
-		if (isspace (*number))
-		{
-			break;
-		}
-
-#endif
-
-		if ((offset > origin) && (*number == HEX_EXTENDER))
-		{
-			number++;
-		}
-		if ((digit = todigit (*number++)) >= RADIX_HEX)
-		{
-			error (1, EINVAL, "You said '%s' but I want a hex digit", string);
-		}
-		*offset = digit << 4;
-		if (!*number)
-		{
-			error (1, EINVAL, "You said '%s' but I want another hex digit", string);
-		}
-		if ((digit = todigit (*number++)) >= 0x10)
-		{
-			error (1, EINVAL, "You said '%s' but I want valid hex data", string);
-		}
-		*offset |= digit;
-		offset++;
-		extent--;
-	}
-
-#ifdef WIN32
-
-	while (isspace (*number))
-	{
-		number++;
-	}
-
-#endif
-
-	if (*number && !extent)
-	{
-		error (1, EINVAL, "'%s' exceeds %d bytes", string, (unsigned)(offset - origin - extent));
-	}
-	if (*number)
-	{
-		error (1, EINVAL, "String '%s' contains trash", string);
-	}
-	return (offset - origin);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/debug.c.html b/docbook/debug.c.html deleted file mode 100644 index 0b88514a..00000000 --- a/docbook/debug.c.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - debug.c - - - - - - - - - -
-/*====================================================================*
- *
- *   signed debug (signed status, char const * string, char const * format, ...);
- *
- *   error.h
- *
- *   variation of the GNU error() function that accepts a message in
- *   place of an error code and always returns -1;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DEBUG_SOURCE
-#define DEBUG_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include "../tools/types.h"
-#include "../tools/error.h"
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 3, 4)))
-
-#endif
-
-signed debug (signed status, char const * string, char const * format, ...)
-
-{
-	extern char const * program_name;
-	if ((program_name) && (* program_name))
-	{
-		fprintf (stderr, "%s: ", program_name);
-	}
-	if ((string) && (* string))
-	{
-		fprintf (stderr, "%s: ", string);
-	}
-	if ((format) && (*format))
-	{
-		va_list arglist;
-		va_start (arglist, format);
-		vfprintf (stderr, format, arglist);
-		va_end (arglist);
-	}
-	fprintf (stderr, "\n");
-	fflush (stderr);
-	if (status)
-	{
-		exit (status);
-	}
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/debug.h.html b/docbook/debug.h.html deleted file mode 100644 index a075820e..00000000 --- a/docbook/debug.h.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - debug.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   debug.h - Debugging Definitions and Declarations;
- *
- *   this file is a subset of the original that includes only those
- *   definitions and declaration needed for toolkit programs;
- *
- *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
- *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
- *;  For demonstration and evaluation only; Not for production use.
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DEBUG_HEADER
-#define DEBUG_HEADER
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define QUALCOMM_DEBUG 1
-#define QUALCOMM_TRACE 1
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#if QUALCOMM_TRACE
-#define EVENT(s) printk(KERN_DEBUG "---[ %s ]---\n", (s))
-#define ENTER printk(KERN_DEBUG "-->[ %s:%d ]\n", __func__,__LINE__)
-#define ABORT printk(KERN_DEBUG "<--( %s:%d )\n", __func__,__LINE__)
-#define LEAVE printk(KERN_DEBUG "<--[ %s:%d ]\n", __func__,__LINE__)
-#define CRUMB printk(KERN_DEBUG "... %s:%d\n",__func__,__LINE__)
-#else
-#define EVENT {}
-#define ENTER {}
-#define ABORT {}
-#define LEAVE {}
-#define CRUMB {}
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#if QUALCOMM_DEBUG
-#define address(e) if (!(e)) { printk ("%s(%d): address %s is null\n",__func__,__LINE__,#e); }
-#define confirm(e) if (!(e)) { printk ("%s(%d): assertion %s is wrong\n",__func__,__LINE__, #e); }
-#else
-#define address(e) {}
-#define confirm(e) {}
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/decdecode.c.html b/docbook/decdecode.c.html deleted file mode 100644 index 3c13a9da..00000000 --- a/docbook/decdecode.c.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - decdecode.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t decdecode (void const * memory, size_t extent,  char buffer [], size_t length);
- *
- *   memory.h
- *
- *   decode a memory block of given length in bytes as a string of
- *   separated hexadecimal bytes; terminate once the string fills
- *   or the memory ends; terminate the string and return the actual
- *   string bytes;
- *
- *   allow three string characters for each memory byte; this means
- *   that the buffer must have at least three characters or nothing
- *   will be decoded; the maximum number of bytes is the lesser of
- *   chars/3 and bytes;;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DECDECODE_SOURCE
-#define DECDECODE_SOURCE
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-size_t decdecode (void const * memory, register size_t extent, char buffer [], register size_t length)
-
-{
-	register char * string = (char *)(buffer);
-	register byte * offset = (byte *)(memory);
-	if (length)
-	{
-		length /= DEC_DIGITS + 1;
-		while ((length--) && (extent--))
-		{
-			unsigned octet = *offset;
-			unsigned digit = DEC_DIGITS;
-			while (digit--)
-			{
-				string [digit] = '0' + octet % RADIX_DEC;
-				octet /= RADIX_DEC;
-			}
-			string += DEC_DIGITS;
-			if ((length) && (extent))
-			{
-				*string++ = DEC_EXTENDER;
-			}
-			offset++;
-		}
-		*string = (char) (0);
-	}
-	return (string - buffer);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/decout.c.html b/docbook/decout.c.html deleted file mode 100644 index b0882282..00000000 --- a/docbook/decout.c.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - decout.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void decout (const byte memory [], size_t extent, char c, char e, FILE * fp);
- *
- *   memory.h
- *
- *   print a memory region as a series of decimal octets separated
- *   by character c; normally, c will be DEC_EXTENDER as defined in
- *   number.h;
- *
- *   for example, decout (memory, 4, '.', stdout) would print
- *
- *      192.168.101.002
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DECOUT_SOURCE
-#define DECOUT_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-void decout (void const * memory, size_t extent, char c, char e, FILE * fp)
-
-{
-	byte * offset = (byte *)(memory);
-	while (extent--)
-	{
-		unsigned order = 100;
-		while (order)
-		{
-			putc (DIGITS_DEC [(* offset / order) % RADIX_DEC], fp);
-			order /= RADIX_DEC;
-		}
-		if ((extent) && (c))
-		{
-			putc (c, fp);
-		}
-		offset++;
-	}
-	if (e)
-	{
-		putc (e, fp);
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/decstring.c.html b/docbook/decstring.c.html deleted file mode 100644 index bcdeb9c1..00000000 --- a/docbook/decstring.c.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - decstring.c - - - - - - - - - -
-/*====================================================================*
- *
- *   char * decstring ( char buffer [], size_t length, void const * memory, size_t extent);
- *
- *   memory.h
- *
- *   decode a memory region into a decimal character buffer and
- *   return the buffer address;
- *
- *   allow four string characters for each memory byte; this means
- *   that the buffer must hold at least four characters or nothing
- *   will be decoded;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef DECSTRING_SOURCE
-#define DECSTRING_SOURCE
-
-#include <stdint.h>
-
-#include "../tools/memory.h"
-
-char * decstring (char buffer [], size_t length, void const * memory, size_t extent)
-
-{
-	decdecode (memory, extent, buffer, length);
-	return ((char *)(buffer));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/docbook.css b/docbook/docbook.css deleted file mode 100644 index ce09d53e..00000000 --- a/docbook/docbook.css +++ /dev/null @@ -1,65 +0,0 @@ -acronym.acronym { color: blue; } -body { background: white; margin: 10px 20px 10px 20px; font: normal 10pt verdana; } -b.fsfunc { color: maroon; } -code.computeroutput { } -code.constant { color: red; } -code.envar { } -code.filename { font: italic; color: blue; } -code.funcdef { font: normal 10pt courier; } -code.function { } -code.option { } -code.prompt { } -code.varname { color: blue; } -div.abstract { } -div.author { } -div.authorgroup { } -div.book { } -div.caption { } -div.chapter { } -div.example { } -div.figure { } -div.funcsynopsis { font: normal 10pt courier; padding: 10px; background: beige; } -div.itemizedlist { } -div.list-of-examples { } -div.list-of-figures { } -div.mediaobject { } -div.navfooter { width: 100%; } -div.navheader { width: 100%; } -div.orderedlist { } -div.section { } -div.titlepage { } -div.toc { } -div.variablelist { } -em.citetitle { } -h1.title { } -h2.title { } -h3.author { } -h3.corpauthor { } -h3.editor { } -h3.title { } -h4.editedby { } -h4.title { } -p.releaseinfo { } -p.title { } -pre { border: none; padding: 10px; font: monospace; } -pre.funcsynopsisinfo { background: aqua; color: black; } -pre.programlisting { background: #CCFFFF; color: black; } -pre.screen { background: black; color: lime; } -span.acronym { } -span.application { font: bold; } -span.chapter { } -span.citation { } -span.emphasis { } -span.firstname { } -span.productname { } -span.quote { } -span.section { } -span.surname { } -span.term { } -span.trademark { } -strong.command { } -strong.userinput { } -var.fsfunc { font: bold 10pt courier; color: maroon; } -var.pdparam { font: bold 10pt courier; color: navy; } -td.include { background: #FFFF00; } -td.exclude { background: #FFFFFF; } diff --git a/docbook/docbook.xsl b/docbook/docbook.xsl deleted file mode 100644 index 19d1b2b6..00000000 --- a/docbook/docbook.xsl +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No template matches - - - in - - - . - - - - < - - > - - </ - - > - - - - - - - - - white - black - #0000FF - #840084 - #0000FF - - - - - - - - - - <xsl:copy-of select="$title"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Stripping NS from DocBook-NG document. - - - - Processing stripped document. - - - - - - - - - ID ' - - ' not found in document. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docbook/edru.1.html b/docbook/edru.1.html deleted file mode 100644 index dc588beb..00000000 --- a/docbook/edru.1.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - edru.1 - - - - - - - - - -
-edru(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     edru(1)
-
-NAME
-       edru - Qualcomm Atheros Ethernet II Data Read Utility
-
-SYNOPSIS
-       edru [options] [>stdout]
-
-DESCRIPTION
-       Listen  for incoming Ethernet II frames and write frame data, less header information, to stdout as a binary data stream.
-       Since frame data can contain anything, users should direct output to a file or pipe it through some  type  of  filter  to
-       prevent  corruption of the terminal session.  If all incoming data is known to be ASCII then directing stdout to the con‐
-       sole should not cause any problems.
-
-       This program can be used to test remote Atheros UART-enabled powerline devices.  Remote device package serial  data  from
-       their  local  host as Ethernet II frames and forwared them over the powerline to a specific destination.  The destination
-       must be the Ethernet address of the receiving host.  This program reads such  frames,  discards  the  frame  headers  and
-       writes the frame dat on stdout.  Data should appear exactly as sent by the remote hos.
-
-OPTIONS
-       -e ethertype
-              The protocol (or ethertype) of interest expressed as a 16-bit hexadecimal integer.  Prefix "0x" is optional.  This
-              filters out frames having any other ethertype.  The default is ETH_P_802_2 as defined in if_ether.h.
-
-       -i interface
-              The host interface used to read frames.  The default is "eth1" because most people use "eth0" as  their  principle
-              network  connection; however, if the string "PLC" is defined in the environment then it will over-ride the program
-              default.  Any interface specified on the command line will over-ride the default.
-
-       -q     Quiet mode.  This option has no effect at this time.
-
-       -t milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is 50 milliseconds.
-
-       -v     Verbose mode.  This option has no effect at this time.
-
-ARGUMENTS
-       None.
-
-EXAMPLES
-       The  following  example  monitors host interface eth1 for incoming 802.2 Ethernet frames and writes frame data to stdout.
-       In this case, stdout is the console.  Frame data is written, as it arrives, and forms a single output stream.   Directing
-       output to  the console may corrupt your terminal session, forcing you to close the console window and open another one.
-
-          # edru -ieth1
-
-       The  next  example  does  the  same  thing but directs output to file test.log.  The output file may be inspected using a
-       binary hex editor.  The programs continues to read and write until interrupted using ctrl-c or ctrl-z.
-
-          # edru -ieth1 > test.log
-
-       The next example does the same thing but pipes output into program hexdmp which  displays  data  in  hexadecimal  format.
-       This prevents terminal session corruptions caused by binary data.  Programhexdmp may not be provided with the toolkit.
-
-          # edru -ieth1 | hexdmp
-
-SEE ALSO
-       amp(1), efsu(1), hpav(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     edru(1)
-
- - - diff --git a/docbook/edru.c.html b/docbook/edru.c.html deleted file mode 100644 index 5aea6801..00000000 --- a/docbook/edru.c.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - edru.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   edru.c - Qualcomm Atheros Ethernet II Data Read Utility
- *
- *   Listen for incoming Ethernet II frames and write frame data to
- *   stdout as a continuous binary data stream. Since frame data can
- *   contain anything, users should send program output to a file or
- *   pipe it through a filter program to prevent corruption of the
- *   terminal session. If all incoming data is ASCII then directing
- *   stdout to the console should not cause any problems.
- *
- *   this program can be used as a data target when testing AR6405
- *   UART applications; use program edsu to send files from a remote
- *   host and this program to display or save them;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <limits.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef __linux__
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <netpacket/packet.h>
-#include <signal.h>
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/basespec.c"
-#include "../tools/uintspec.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/sendpacket.c"
-#include "../ether/readpacket.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define PLCDEVICE "PLC"
-#define EDRU_ETHERTYPE ETH_P_802_2
-
-/*====================================================================*
- *
- *   int main (int argc, char * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	struct ethernet_frame frame;
-	signed length;
-	static char const * optv [] =
-	{
-		"e:i:qt:v",
-		PUTOPTV_S_DIVINE,
-		"Qualcomm Atheros Ethernet II Data Read Utility",
-		"e x\tethertype is (x) [" LITERAL (EDRU_ETHERTYPE) "]",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tsuppress normal output",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_FOREVER) "]",
-		"v\tverbose messages on stdout",
-		(char const *) (0)
-	};
-	signed c;
-	channel.type = EDRU_ETHERTYPE;
-	channel.timeout = CHANNEL_FOREVER;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			channel.type = (uint16_t)(basespec (optarg, 16, sizeof (channel.type)));
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ECANCELED, ERROR_TOOMANY);
-	}
-	openchannel (&channel);
-	while ((length = readpacket (&channel, &frame, sizeof (frame))) > 0)
-	{
-		write (STDOUT_FILENO, frame.frame_data, ntohs (frame.frame_type));
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/edsu.1.html b/docbook/edsu.1.html deleted file mode 100644 index 99d90a31..00000000 --- a/docbook/edsu.1.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - edsu.1 - - - - - - - - - -
-edsu(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     edsu(1)
-
-NAME
-       edsu - Qualcomm Atheros Ethernet II Data Send Utility
-
-SYNOPSIS
-       edsu [options] file [file] [...]
-
-DESCRIPTION
-       Send  one  or more files as a series of Ethernet II (IEEE 802.2) frames.  Input files are sequentially read and sent over
-       network as a continuous stream of standard Ethernet frames.  All frames (except perhaps the last  frame  for  each  file)
-       will contain 1500 bytes of file data.  The receiving host may elect to concatenate frame data as frames arrive.
-
-       This program can be used to test remote Atheros UART-enabled powerline devices.  The remote UART-enabled powerline device
-       will remove frame headers and forward frame data to the local host as a serial data stream.  No protocol  is  imposed  on
-       the  serial  data stream.  For example, there is no indication of frame or file start or end within the stream.  The ret‐
-       mote powerline device must be in Transparent Mode and configured to accept frames from the sending host.  The remote host
-       must also be ready to handle serial data as it arrives.
-
-OPTIONS
-       -d xx:xx:xx:xx:xx:xx
-              The  Ethernet  address  of  the destination device.  If the destination device is a Linux, Mac OSX or Windows host
-              then program edru can be used to receive and write frame data to stdout as a serial stream.   If  the  destination
-              device  is  an  Atheros  UART-enabled powerline device then received frame data will be converted to a serial data
-              stream and forwared to the host connected to that device.  In that case, the UART-enabled powerline device must be
-              programmed with the address of the sending host.
-
-       -e ethertype
-              The protocol (or ethertype) of interest expressed as a 16-bit hexadecimal integer.  Prefix "0x" is optional.  This
-              filters out frames having any other ethertype.  The default is ETH_P_802_2 as defined in if_ether.h.
-
-       -i interface
-              The host interface used to send frames.  The program default is "eth1" on Linux, "en0" on MacOSX  or  OpenBSD  and
-              "2"  on  Windows; however, if environment string "PLC" is defined, it supersedes the program default.  Any  inter‐
-              face specified on the command line supersedes all others.
-
-       -p seconds
-              Pause time in seconds between sending each frame.  Pauses may be necessary when the destination device is a  UART-
-              enabled  powerline  device because each frame must be converted and transmitted serially from the remote device to
-              the remote host.  Permitted pause times are 0 through 255 seconds.  The default is 0.
-
-       -q     Quiet mode.  This option has no effect at this time.
-
-       -v     Verbose mode.  This option displays outgoing frames on stdout in hexadecimal dump format as they are sent.
-
-ARGUMENTS
-       file   The name of a text or binary file accessible from the local host.
-
-EXAMPLES
-       The  following  example  sends  files  abc.txt  then  def.bin  to  the  remote  Atheros  UART-enabled  powerline   device
-       00:B0:52:BA:BE:55 over network interface eth1.  There is a constant 1 second delay between each frame sent so that remote
-       UART-enabled powerline devices have time to convert and forward each frame to their local host.
-
-          # edsu -ieth1 -d 00:b0:52:BA:BE:55 abc.txt def.bin
-
-SEE ALSO
-       amp(1), edru(1) efsu(1),
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     edsu(1)
-
- - - diff --git a/docbook/edsu.c.html b/docbook/edsu.c.html deleted file mode 100644 index 8be3f12a..00000000 --- a/docbook/edsu.c.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - edsu.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   edsu.c - Qualcomm Atheros Ethernet II Data Send Utility
- *
- *   send one or more files over Ethernet using IEEE 802.2 Ethernet
- *   Frames;
- *
- *   this program can be used as a data source when testing AR6405
- *   UART applications; use this program to send files and program
- *   edru to read and display or save them at the other end;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdlib.h>
-#include <limits.h>
-#include <memory.h>
-#include <signal.h>
-#include <unistd.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../ether/ether.h"
-#include "../ether/channel.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/efreopen.c"
-#include "../tools/basespec.c"
-#include "../tools/uintspec.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define EDSU_INTERFACE "PLC"
-#define EDSU_ETHERTYPE ETH_P_802_2
-#define EDSU_PAUSE 0
-
-/*====================================================================*
- *
- *   signed function (struct channel * channel, unsigned pause, signed fd);
- *
- *   read a file and transmit it over network as a stream of Ethernet
- *   frames; pause between frames to prevent over-loading the remote
- *   host;
- *
- *
- *--------------------------------------------------------------------*/
-
-signed function (struct channel * channel, unsigned pause, signed fd)
-
-{
-	struct ethernet_frame frame;
-	signed length = sizeof (frame.frame_data);
-	memcpy (frame.frame_dhost, channel->peer, sizeof (frame.frame_dhost));
-	memcpy (frame.frame_shost, channel->host, sizeof (frame.frame_shost));
-	while ((length = read (fd, frame.frame_data, sizeof (frame.frame_data))) > 0)
-	{
-		frame.frame_type = htons (length);
-		if (length < ETHERMIN)
-		{
-			length = ETHERMIN;
-		}
-		length += ETHER_HDR_LEN;
-		if (sendpacket (channel, &frame, length) < 0)
-		{
-			error (1, errno, CHANNEL_CANTSEND);
-		}
-		sleep (pause);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"e:d:i:p:qv",
-		"file [file] [...]",
-		"Qualcomm Atheros Ethernet II Data Send Utility",
-		"e x\tethertype is (x) [" LITERAL (EDSU_ETHERTYPE) "]",
-		"d x\tdestination address is (x) [00:B0:52:00:00:01]",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"p n\tpause (n) seconds between frames [" LITERAL (EDSU_PAUSE) "]",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *)(0)
-	};
-	unsigned pause = EDSU_PAUSE;
-	signed c;
-	if (getenv (EDSU_INTERFACE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (EDSU_INTERFACE));
-
-#else
-
-		channel.ifname = strdup (getenv (EDSU_INTERFACE));
-
-#endif
-
-	}
-	channel.type = EDSU_ETHERTYPE;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			channel.type = (uint16_t)(basespec (optarg, 16, sizeof (channel.type)));
-			break;
-		case 'd':
-			if (!hexencode (channel.peer, sizeof (channel.peer), optarg))
-			{
-				error (1, errno, "%s", optarg);
-			}
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'p':
-			pause = (unsigned)(uintspec (optarg, 0, UCHAR_MAX));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!argc)
-	{
-		function (&channel, pause, STDIN_FILENO);
-	}
-	while ((argc) && (* argv))
-	{
-		if (efreopen (* argv, "rb", stdin))
-		{
-			function (&channel, pause, fileno (stdin));
-		}
-		argc--;
-		argv++;
-	}
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/efbu.1.html b/docbook/efbu.1.html deleted file mode 100644 index 65663007..00000000 --- a/docbook/efbu.1.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - efbu.1 - - - - - - - - - -
-efbu(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     efbu(1)
-
-NAME
-       efbu - Ethernet Frame Blast Utility
-
-SYNOPSIS
-       efbu [options]
-
-DESCRIPTION
-       Send  IP  broadcast  frames  of maximum length at maximum rate over a given interface for a given period in seconds.  The
-       maximum frame length is ETHER_MAX_LEN as defined in <net/ethernet.h>.  The maximum rate is limited by the host  processor
-       type,  the  number  of  active processes, the interface hardware and so on.  This program does the best it can within the
-       given execution environment.  Multi-processosr and faster hosts should see at least 85mb.   Single-processor  and  slower
-       hosts will see less.
-
-       This  program is for test purposes.  It has no practical application beyond flooding the network with useless traffic and
-       annoying the network administrator.  Don't abuse it.
-
-OPTIONS
-       -b value
-              Byte value used to pad Ethernet frames. Valid values are 0 through 255 and may be specified in decimal,  hexadeci‐
-              mal or binary. Hexadecimal is prefixed with 0x. Binary is prefixed with 0b. The default is 0xAA or 0b10101010.
-
-       -d address
-              Replace  the  destination  Ethernet  address  of  each transmitted frame with the option argument. The destination
-              address consists of 12 hex digits in upper, lower or mixed case. Octets may be seperated with colons  for  clarity
-              but colons are not required.
-
-       -e ethertype
-              The  ethertype  expressed as a 16-bit hexadecimal integer. Prefix "0x" is optional.  The default is ETH_P_802_2 as
-              defined in if_ether.h.
-
-       -h     Replace the source address of each transmitted frame with the Ethernet address of the host interface used to  send
-              the frame. This allows frames to be sent correctly from any host interface. Use option -i to specify an interface.
-
-       -i interface
-              The  host  interface  used to send frames. The default is "eth1" because most people use "eth0" as their principle
-              network connection; however, if the string "PLC" is defined in the environment then it will over-ride the  program
-              default. Any interface specified on the command line will over-ride the default.
-
-       -p milliseconds
-              The pause time in milliseconds.  The program pause this long after sending each frame.  If 0 then the network will
-              be flooded with frames for the duration.  The default is 50 milliseconds which results in about 20 frames per sec‐
-              ond for the duration.  Permitted values are 0 through UINT_MAX as defined in <limits.h>.
-
-       -t milliseconds
-              The  blast duration in milliseconds.  The default is 1000 milliseconds seconds which is about 1 second.  Permitted
-              values are 0 through UINT_MAX as defined in <limits.h>.
-
-       -v     Print transmitted frames in hex dump format on stdout as they are sent. This reduces network transmission rate, as
-              a consequence.
-
-ARGUMENTS
-       None.
-
-EXAMPLES
-       The  following example sends an IP broadcast frame of maximum length on host interface eth2 for a duration of 20 seconds.
-       The destination address will be the Ethernet broadcast address because option -d is omitted. The source address  will  be
-       the  host  Ethernet  interface  address  because  option -h is present. Frames will be send at about 20 frames per second
-       because option -p is not present.
-
-          # efbu -ieth2 -t20000 -h -e0800
-
-       The outgoing frame will look something like this when captured with wireshark.
-
-          00000000 FF FF FF FF FF FF 00 50 04 D3 4E F2 08 00 AA AA .......P..N.....
-          00000010 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000020 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000030 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000040 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000050 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000060 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000070 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000080 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000090 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000000A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000000B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000000C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000000D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000000E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000000F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000100 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000110 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000120 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000130 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000140 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000150 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000160 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000170 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000180 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000190 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000001A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000001B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000001C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000001D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000001E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000001F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000200 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000210 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000220 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000230 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000240 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000250 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000260 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000270 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000280 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000290 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000002A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000002B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000002C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000002D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000002E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000002F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000300 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000310 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000320 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000330 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000340 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000350 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000360 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000370 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000380 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000390 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000003A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000003B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000003C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000003D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000003E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000003F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000400 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000410 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000420 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000430 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000440 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000450 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000460 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000470 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000480 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000490 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000004A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000004B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000004C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000004D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000004E0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000004F0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000500 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000510 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000520 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000530 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000540 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000550 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000560 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000570 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000580 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          00000590 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000005A0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000005B0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000005C0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000005D0 AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA ................
-          000005E0 AA AA AA AA AA AA AA AA AA AA                   ..........
-
-SEE ALSO
-       amp(1), efsu(1), hpav(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     efbu(1)
-
- - - diff --git a/docbook/efbu.c.html b/docbook/efbu.c.html deleted file mode 100644 index 9e1d8413..00000000 --- a/docbook/efbu.c.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - efbu.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   efbu.c - Ethernet Frame Blast Utility;
- *
- *   transmit an IP broadcast frame of maximum length at maximum rate
- *   for a given period of time in seconds;
- *
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <time.h>
-#include <sys/time.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/flags.h"
-#include "../ether/channel.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/error.c"
-#include "../tools/basespec.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdump.c"
-#include "../tools/todigit.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-/*====================================================================*
- *   program contants;
- *--------------------------------------------------------------------*/
-
-#define EFBU_VLAN_TAG 0
-#define EFBU_INTERFACE "PLC"
-#define EFBU_ETHERTYPE ETH_P_802_2
-#define EFBU_BINARY 0xAA
-#define EFBU_TIMER 1000
-#define EFBU_PAUSE 50
-
-#ifndef ETHER_CRC_LEN
-#define ETHER_CRC_LEN 4
-#endif
-
-#if defined (WIN32)
-#define SLEEP(milliseconds) Sleep(milliseconds)
-#else
-#define SLEEP(milliseconds) usleep(1000*(milliseconds))
-#endif
-
-/*====================================================================*
- *
- *   void function (struct channel * channel, void * memory, unsigned extent, unsigned timer, unsigned pause);
- *
- *   transmit an IP broadcast frame of given length at maximum rate
- *   for a given period of time in seconds;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void function (struct channel * channel, void * memory, ssize_t extent, byte binary, unsigned timer, unsigned pause)
-
-{
-
-#if EFBU_VLAN_TAG
-
-	struct ether_header
-	{
-		uint8_t ether_dhost [ETH_ALEN];
-		uint8_t ether_shost [ETH_ALEN];
-		uint32_t ether_vlan;
-		uint16_t ether_type;
-	}
-	__attribute__ ((__packed__)) * frame = (struct ether_header *)(memory);
-
-#else
-
-	struct ether_header * frame = (struct ether_header *)(memory);
-
-#endif
-
-	struct timeval ts;
-	struct timeval tc;
-	unsigned since;
-	memset (memory, binary, extent);
-	if (extent > (ETHER_MAX_LEN - ETHER_CRC_LEN))
-	{
-		extent = ETHER_MAX_LEN - ETHER_CRC_LEN;
-	}
-	memcpy (frame->ether_dhost, channel->peer, sizeof (frame->ether_dhost));
-	memcpy (frame->ether_shost, channel->host, sizeof (frame->ether_shost));
-
-#if EFBU_VLAN_TAG
-
-	frame->ether_vlan = htonl (0x8100A000);
-
-#endif
-
-	frame->ether_type = htons (channel->type);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (since = 0; since < timer; since = (tc.tv_sec - ts.tv_sec) * 1000 + ((tc.tv_usec - ts.tv_usec) / 1000))
-	{
-		sendpacket (channel, memory, extent);
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		SLEEP (pause);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"b:d:e:hi:p:t:v",
-		"",
-		"Ethernet Frame Blast Utility",
-		"b n\tbinary byte value is (n) [" LITERAL (EFBU_BINARY) "]",
-		"d x\treplace destination address with (x)",
-		"e x\tethertype is (x) [" LITERAL (EFBU_ETHERTYPE) "]",
-		"h\treplace source address with host address",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"t n\ttransmit for (n) milliseconds [" LITERAL (EFBU_TIMER) "]",
-		"p n\tpause (n) milliseconds between frames [" LITERAL (EFBU_PAUSE) "]",
-		"v\tverbose messages",
-		(char const *) (0)
-	};
-	byte buffer [ETHER_MAX_LEN];
-	byte binary = EFBU_BINARY;
-	unsigned timer = EFBU_TIMER;
-	unsigned pause = EFBU_PAUSE;
-	signed c;
-	if (getenv (EFBU_INTERFACE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (EFBU_INTERFACE));
-
-#else
-
-		channel.ifname = strdup (getenv (EFBU_INTERFACE));
-
-#endif
-
-	}
-	optind = 1;
-	memset (channel.peer, 0xFF, sizeof (channel.peer));
-	memset (channel.host, 0xFF, sizeof (channel.host));
-	channel.type = EFBU_ETHERTYPE;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'b':
-			binary = (uint8_t)(uintspec (optarg, 0, 255));
-			break;
-		case 'd':
-			_setbits (channel.flags, CHANNEL_UPDATE_TARGET);
-			if (!hexencode (channel.peer, sizeof (channel.peer), optarg))
-			{
-				error (1, errno, "%s", optarg);
-			}
-			break;
-		case 'e':
-			channel.type = (uint16_t)(basespec (optarg, 16, sizeof (channel.type)));
-			break;
-		case 'h':
-			_setbits (channel.flags, CHANNEL_UPDATE_SOURCE);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'p':
-			pause = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 't':
-			timer = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ECANCELED, ERROR_TOOMANY);
-	}
-	openchannel (&channel);
-	function (&channel, buffer, sizeof (buffer), binary, timer, pause);
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/efeu.1.html b/docbook/efeu.1.html deleted file mode 100644 index 636f6da2..00000000 --- a/docbook/efeu.1.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - efeu.1 - - - - - - - - - -
-efeu(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     efeu(1)
-
-NAME
-       efeu - HomePlug AV Packet Reflector
-
-SYNOPSIS
-       efeu [options]
-
-DESCRIPTION
-       Read  and  reflect  802.3  Ethernet  messages  addressed to this host or the broadcast address.  Do not display reflected
-       frames.
-
-       The program is one example of a simple packet listener.  Engineers and software developers can extend it to build  custom
-       sniffers or servers.  The framework is present but additional features must be added.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -e ethertype
-              The protocol (or ethertype) of interest expressed as a 16-bit hexadecimal integer.  Prefix "0x" is optional.  This
-              filters out frames having any other ethertype.  The default is ETH_P_802_2 as defined in if_ether.h.
-
-       -i interface
-              Names  the host ethernet interface to watch.  The named interface, such as eth0, eth1 and so on, must be connected
-              to a HomePlug AV ethernet-to-powerline bridge adapter to receive any HomePlug AV traffic.  The  default  interface
-              is eth1.
-
-       -q     Quiet mode.  Suppress the printing of the normal message descriptions on stdout.
-
-       -t milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is 50 milliseconds.
-
-       -v     Verbose mode.  Displays incoming frames in hexadecimal dump format on  stdout.   This  option  is  independent  of
-              option -a which prints VS_ARPC message text on stderr.
-
-       -?, --help
-              Print  program  help summary on stdout.  This option takes precedence over other options on the command line.  -!,
-              --version Print program version information on stdout.  This option takes precedence over  other  options  on  the
-              command  line.   Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly
-              which version of the Linux Toolkit you are using.  See the HomePlug AV Specification  for  a  description  of  all
-              HomePlug  AV  message  types.   See  the  Qualcomm  Atheros INT6000 Firmware Reference Manual for a description of
-              Atheros Vendor Specific message types.
-
-EXAMPLES
-       The following command monitors the default interface eth1 for HomePlug AV traffic and dumps detected frames on  the  con‐
-       sole  as they occur.  Terminate the foreground process by typing ^C or ^Z at the console.  This program is usually run in
-       a separate console window when performing other toolkit operations.
-
-          # efeu
-
-       The following command monitors host interface eth4 for incoming  HomePlug  AV  frames  and  dumps  writes  them  to  file
-       efeu.log.   Frames are printed in hexadecimal dump format because option -v is present.  Terminate the foreground process
-       by typing ^C or ^Z at the console.
-
-          # efeu -v -i eth4 > efeu.log
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public information is not available.  Qualcomm Atheros reserves the right to modify management mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-SEE ALSO
-       plc(1), efru(1), efsu(1), hpav(1), mme(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     efeu(1)
-
- - - diff --git a/docbook/efeu.c.html b/docbook/efeu.c.html deleted file mode 100644 index ecaba29e..00000000 --- a/docbook/efeu.c.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - efeu.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   edeu.c - Ethernet Frame Echo Utility
- *
- *   Listen for incoming Ethernet II frames and write frame data to
- *   stdout as a continuous binary data stream. Since frame data can
- *   contain anything, users should send program output to a file or
- *   pipe it through a filter program to prevent corruption of the
- *   terminal session. If all incoming data is ASCII then directing
- *   stdout to the console should not cause any problems.
- *
- *   this program can be used as a data target when testing AR6405
- *   UART applications; use program edsu to send files from a remote
- *   host and this program to display or save them;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <limits.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef __linux__
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <netpacket/packet.h>
-#include <signal.h>
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/uintspec.c"
-#include "../tools/memswap.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/sendpacket.c"
-#include "../ether/readpacket.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define EFEU_INTERFACE "PLC"
-#define EFEU_ETHERTYPE ETH_P_802_2
-
-/*====================================================================*
- *
- *   int main (int argc, char * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	struct ethernet_frame frame;
-	signed length;
-	static char const * optv [] =
-	{
-		"e:i:qt:v",
-		PUTOPTV_S_DIVINE,
-		"Qualcomm Atheros Ethernet Frame Echo Utility",
-		"e x\tethertype is (x) [" LITERAL (EFEU_ETHERTYPE) "]",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tsuppress normal output",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_FOREVER) "]",
-		"v\tverbose messages on stdout",
-		(char const *) (0)
-	};
-	signed c;
-	channel.type = EFEU_ETHERTYPE;
-	channel.timeout = CHANNEL_FOREVER;
-	if (getenv (EFEU_INTERFACE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (EFEU_INTERFACE));
-
-#else
-
-		channel.ifname = strdup (getenv (EFEU_INTERFACE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			channel.type = (uint16_t)(basespec (optarg, 16, sizeof (channel.type)));
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ECANCELED, ERROR_TOOMANY);
-	}
-	openchannel (&channel);
-	while ((length = readpacket (&channel, &frame, sizeof (frame))) > 0)
-	{
-		memswap (&frame.frame_dhost, &frame.frame_shost, sizeof (frame.frame_dhost));
-		if (sendpacket (&channel, &frame, length) != length)
-		{
-			error (1, errno, CHANNEL_CANTSEND);
-		}
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/efreopen.c.html b/docbook/efreopen.c.html deleted file mode 100644 index d0ed11a6..00000000 --- a/docbook/efreopen.c.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - efreopen.c - - - - - - - - - -
-/*====================================================================*
- *
- *   FILE *efreopen(char const *filename, char const *openmode, FILE *fp);
- *
- *   files.h
- *
- *   attempt to reopen a file using freopen(); return a valid file
- *   pointer on success; print an error message to stderr and then
- *   return NULL on failure;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EFREOPEN_SOURCE
-#define EFREOPEN_SOURCE
-
-#include <stdio.h>
-#include <errno.h>
-
-#include "../tools/files.h"
-#include "../tools/error.h"
-
-FILE *efreopen (char const *filename, char const *openmode, FILE *fp)
-
-{
-	if ((fp = freopen (filename, openmode, fp)) == (FILE *)(0))
-	{
-		error (0, errno, "%s", filename);
-	}
-	return (fp);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/efru.1.html b/docbook/efru.1.html deleted file mode 100644 index f3ca35e3..00000000 --- a/docbook/efru.1.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - efru.1 - - - - - - - - - -
-efru(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     efru(1)
-
-NAME
-       efru - HomePlug AV Packet Listener
-
-SYNOPSIS
-       efru [options]
-
-DESCRIPTION
-       Display incoming 802.3 Ethernet frames addressed to this host or broadcast.  Do not display outgoing frames.
-
-       The  program  is an example of a simple packet listener.  Engineers and software developers can extend this code to build
-       custom sniffers or servers.  The framework is present here but you must add any additional features.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -e ethertype
-              The protocol (or ethertype) of interest expressed as a 16-bit hexadecimal integer.  Prefix "0x" is optional.  This
-              filters out frames having any other ethertype.  The default is ETH_P_802_2 as defined in if_ether.h.
-
-       -i interface
-              Names the host ethernet interface to watch.  The named interface, such as eth0, eth1 and so on, must be  connected
-              to  a  HomePlug AV ethernet-to-powerline bridge adapter to receive any HomePlug AV traffic.  The default interface
-              is eth1.
-
-       -q     Quiet mode.  Suppress the printing of the normal message descriptions on stdout.
-
-       -t milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is 50 milliseconds.
-
-       -v     Verbose  mode.   Displays  incoming  frames  in  hexadecimal dump format on stdout.  This option is independent of
-              option -a which prints VS_ARPC message text on stderr.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command  line.   -!,
-              --version  Print  program  version  information on stdout.  This option takes precedence over other options on the
-              command line.  Use this option when sending screen dumps to Atheros Technical Support so that  they  know  exactly
-              which  version  of  the  Linux  Toolkit you are using.  See the HomePlug AV Specification for a description of all
-              HomePlug AV message types.  See the Qualcomm Atheros INT6000  Firmware  Reference  Manual  for  a  description  of
-              Atheros Vendor Specific message types.
-
-EXAMPLES
-       The  following  command monitors the default interface eth1 for HomePlug AV traffic and dumps detected frames on the con‐
-       sole as they occur.  Terminate the foreground process by typing ^C or ^Z at the console.  This program is usually run  in
-       a separate console window when performing other toolkit operations.
-
-          # efru
-
-       The  following  command  monitors  host  interface  eth4  for  incoming  HomePlug AV frames and dumps writes them to file
-       efru.log.  Frames are printed in hexadecimal dump format because option -v is present.  Terminate the foreground  process
-       by typing ^C or ^Z at the console.
-
-          # efru -v -i eth4 > efru.log
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information is not available.  Qualcomm Atheros reserves the right to modify  management  mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-SEE ALSO
-       plc(1), efsu(1), hpav(1), hpavd(1), mme(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     efru(1)
-
- - - diff --git a/docbook/efru.c.html b/docbook/efru.c.html deleted file mode 100644 index 2105c2bf..00000000 --- a/docbook/efru.c.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - efru.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   efru.c - Ethernet Frame Read Utility
- *
- *   print message header and/or full message content on stdout for
- *   each HomePlugAV or Atheros Vendor Specific message received by
- *   the host;
- *
- *   this program receives raw ethernet frames and so requires root
- *   privileges; if you install it using "chmod 555" and "chown
- *   root:root" then you must login as root to run it; otherwise, you
- *   can install it using "chmod 4555" and "chown root:root" so that
- *   anyone can run it; the program will refuse to run until you get
- *   thing right;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <limits.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef __linux__
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <netpacket/packet.h>
-#include <signal.h>
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../plc/plc.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/basespec.c"
-#include "../tools/uintspec.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/sendpacket.c"
-#include "../ether/readpacket.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define EFRU_VERBOSE (1 << 0)
-#define EFRU_SILENCE (1 << 1)
-
-#define EFRU_INTERFACE "PLC"
-#define EFRU_ETHERTYPE ETH_P_802_2
-
-/*====================================================================*
- *
- *   int main (int argc, char * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	struct message message;
-	static char const * optv [] =
-	{
-		"e:i:qt:v",
-		PUTOPTV_S_DIVINE,
-		"Qualcomm Atheros Ethernet Frame Read Utility",
-		"e x\tethertype is (x) [" LITERAL (EFRU_ETHERTYPE) "]",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (s) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (n) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tsuppress normal output",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_FOREVER) "]",
-		"v\tverbose messages on stdout",
-		(char const *) (0)
-	};
-	flag_t flags = (flag_t)(0);
-	signed length;
-	signed c;
-	if (getenv (EFRU_INTERFACE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (EFRU_INTERFACE));
-
-#else
-
-		channel.ifname = strdup (getenv (EFRU_INTERFACE));
-
-#endif
-
-	}
-	optind = 1;
-	channel.type = EFRU_ETHERTYPE;
-	channel.timeout = CHANNEL_FOREVER;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			channel.type = (uint16_t)(basespec (optarg, 16, sizeof (channel.type)));
-			break;
-		case 'i':
-
-#if defined (WIN32)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (flags, EFRU_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (flags, EFRU_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ECANCELED, ERROR_TOOMANY);
-	}
-	openchannel (&channel);
-	while ((length = readpacket (&channel, &message, sizeof (message))) >= 0)
-	{
-		hexdump (&message, 0, length, stdout);
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/efsu.1.html b/docbook/efsu.1.html deleted file mode 100644 index 98c7ce99..00000000 --- a/docbook/efsu.1.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - efsu.1 - - - - - - - - - -
-efsu(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     efsu(1)
-
-NAME
-       efsu - Ethernet Frame Send Utility
-
-SYNOPSIS
-       efsu [options] file [file] [...]
-
-       efsu [options] [<stdin]
-
-DESCRIPTION
-       Sends custom Ethernet frames over a specific host Ethernet interface.
-
-       A  frame is specified as a text stream of hexadecimal octets read from one or more frame description files or from stdin.
-       Each octet is converted to a binary byte, buffered and transmitted over the network on the specified host interface.  The
-       program  assumes  that  frames are valid and will transmit whatever you specify, right or wrong.  The program only checks
-       minimum and maximum frame length.
-
-       Frame descriptions are stored as plain text files.  Multiple frames may be specified in one file by separating them  with
-       a semicolon.  All descriptions in a file are read and sent immediately but multiple files may be specified on the command
-       line and options allow pauses between files, command line repetition and pauses between command line iterations.
-
-       A frame descriptions is a continuous stream of hexadecimal digits.  Intervening text, punctuation, white space  and  com‐
-       ments  are  discarded.  Hex characters inside script-style, C-style or C++-style comments are ignored.  Script-style com‐
-       ments include all characters between a hash ('#') and the next newline or EOF.  C-style  and  C++-style  comments  follow
-       normal  language  rules.   Comments may be used to document frame descriptions or hide frame segments.  In the end, there
-       must be an even number of hex digits that represent 60 to 1518 octets;
-
-OPTIONS
-       -d address
-              Replace the destination Ethernet address of each transmitted frame with  the  option  argument.   The  destination
-              address  consists of 12 hex digits in upper, lower or mixed case.  Octets may be seperated with colons for clarity
-              but colons are not required.
-
-       -e ethertype
-              Echo received frames having ethertype.  This effectively filters received frames but does not  filter  transmitted
-              frames.   The  ethertype  is expressed in hexadecimal without the "0x" prefix.  The keyword "hp10" can be used for
-              887B and keyword "hpav" can be used for 88E1.
-
-       -h     Replace the source address of each transmitted frame with the Ethernet address of the host interface used to  send
-              the  frame.   This allows frames to be sent correctly from any host interface.  Use option -i to specify an inter‐
-              face.
-
-       -i interface
-              The host interface used to send frames.  The default is "eth1" because most people use "eth0" as  their  principle
-              network  connection; however, if the string "PLC" is defined in the environment then it will over-ride the program
-              default.  Any interface specified on the command line will over-ride the default.
-
-       -l count
-              Repeat command line count times by re-sending all files each time.  The default is 1.
-
-       -p seconds
-              Pause between each file on the command line.  The default is 0 seconds.
-
-       -t timer
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is 50 milliseconds.
-
-       -v     Dumps  transmitted  frames on stdout as they are sent.  If an Ethertype was specified using option -e the received
-              frames having that Ethertype will also be dumped.
-
-       -w seconds
-              Wait between command line iterations.  The default is 0 seconds.
-
-ARGUMENTS
-       file   The name of a file containing one or more frame specifications.  When  more  than  one  file  is  specified,  efsu
-              behaves  like the cat utility by reading and sending each file in turn.  The program makes no assumptions based on
-              filename or extension and enforces no filename conventions; however, giving  frame  description  files  the  *.hex
-              extension  is  a  good  convention.   Some  toolkit distributions include example .hex files in the source folder.
-              These files are not needed for proper execution and may be deleted.
-
-NOTES
-       One way to create a frame description file is to cut-and-paste output from a packet sniffer program and discard the  line
-       numbers and ASCII text columns.  You can then break out selected frame segments onto new lines and insert comments.
-
-EXAMPLES
-       For example, a simple file might look like:
-
-          #!/usr/local/bin/efsu -ieth0
-          # file: abc.hex
-          # =====================================
-          # this is an example frame description;
-          # -------------------------------------
-          00 B0 52 00 00 01
-          // 00 B0 52 BE DE 73
-          00 E0 45 DA DA 07
-          88 E1
-          /* content */
-          00 00 00 00 00 00 00 00
-          00 00 00 00 00 00 00 00
-          00000000 0000 00 /* control byte */ 00
-          00 00 00 00 00 00 00 00
-          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-          00 00 00 00 00 00 00 00
-
-       The bang path permits direct execution of the file if 1) efsu is installed in the bang path directory, 2) the description
-       file has execute permissions and 3) the user has execute privileges for that file.  The script-style,  C++-style  and  C-
-       style  comments are ignored along with any white space.  Only the hexadecimal octets are read and sent.  Since the number
-       of octets exceeds 60 and the number of digits is even, efsu will report no errors and send the packet.  There is no guar‐
-       antee that this packet is valid.
-
-       Assuming  the  above  file is named abc.hex, we can transmit the file over the network as an Ethernet frame with the next
-       command.  A hexadecimal dump of the transmitted frame appears on the console because option -v is present.
-
-          # efsu abc.hex -v
-          00000000 00 B0 52 00 00 01 00 E0 45 DA DA 07 88 E1 00 00 ..R.....E.......
-          00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000040 00 00 00 00 00 00                               ......
-
-       Since every host interface has a different hardware address, one can replace the source  address  of  transmitted  frames
-       with  the  actual  host  interface address using option -h.  Observe that the source address above has been replaced with
-       that of the local host interface used to transmit the frame.
-
-          # efsu abc.hex -vh
-          00000000 00 B0 52 00 00 01 00 0F EA 10 D5 1C 88 E1 00 00 ..R.............
-          00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000040 00 00 00 00 00 00                               ......
-
-       You can also direct the frame to another device using option -d.  Observe that the destination  address  above  has  been
-       replaced with the one specified on the command line.
-
-          # efsu abc.hex -vhd 00b052beef01
-          00000000 00 B0 52 BE EF 01 00 0F EA 10 D5 1C 88 E1 00 00 ..R.............
-          00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-          00000040 00 00 00 00 00 00                               ......
-
-SEE ALSO
-       amp(1), hpav(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     efsu(1)
-
- - - diff --git a/docbook/efsu.c.html b/docbook/efsu.c.html deleted file mode 100644 index 7183228f..00000000 --- a/docbook/efsu.c.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - efsu.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   efsu.c - Ethernet Frame Send Utility;
- *
- *   convert hexadecimal text files to ethernet frames and transmit
- *   them over the network; basically, it is a 'send your own frame'
- *   utility;
- *
- *   the program works like cat, sending file after file to a given
- *   interface; as each file is read, all hexadecimal octets in the
- *   file are converted to bytes and buffered; a semicolon causes a
- *   buffer transmit as does the end of file; script-style comments
- *   starting with hash (#) and c-language-style comments starting
- *   with slash-slash or slash-asterisk are consumed and discard as
- *   the file is read; the errors that can occur are non-hex digits
- *   and odd number of hex digits;
- *
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/flags.h"
-#include "../ether/channel.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/error.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexload.c"
-#include "../tools/hexdump.c"
-#include "../tools/todigit.c"
-#include "../tools/uintspec.c"
-#include "../tools/basespec.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-/*====================================================================*
- *   program contants;
- *--------------------------------------------------------------------*/
-
-#define EFSU_INTERFACE "PLC"
-#define EFSU_ETHERTYPE 0x88E1
-#define EFSU_PAUSE 0
-#define EFSU_DELAY 0
-#define EFSU_LOOP 1
-
-#ifndef ETHER_CRC_LEN
-#define ETHER_CRC_LEN 4
-#endif
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-static const struct _term_ protocols [] =
-
-{
-	{
-		"hp10",
-		"887B"
-	},
-	{
-		"hpav",
-		"88E1"
-	}
-};
-
-/*====================================================================*
- *
- *   void function (struct channel * channel, void * memory, ssize_t extent);
- *
- *   read Ethernet frame descriptions from stdin and transmit them
- *   as raw ethernet frames; wait for a response if CHANNEL_LISTEN
- *   flagword bit is set;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void function (struct channel * channel, void * memory, ssize_t extent)
-
-{
-	struct ether_header * frame = (struct ether_header *)(memory);
-	unsigned length;
-	while ((length = (unsigned)(hexload (memory, extent, stdin))) > 0)
-	{
-		if (length < (ETHER_MIN_LEN - ETHER_CRC_LEN))
-		{
-			error (1, ENOTSUP, "Frame size of %d is less than %d bytes", length, (ETHER_MIN_LEN - ETHER_CRC_LEN));
-		}
-		if (length > (ETHER_MAX_LEN - ETHER_CRC_LEN))
-		{
-			error (1, ENOTSUP, "Frame size of %d is more than %d bytes", length, (ETHER_MAX_LEN - ETHER_CRC_LEN));
-		}
-		if (_anyset (channel->flags, CHANNEL_UPDATE_TARGET))
-		{
-			memcpy (frame->ether_dhost, channel->peer, sizeof (frame->ether_dhost));
-		}
-		if (_anyset (channel->flags, CHANNEL_UPDATE_SOURCE))
-		{
-			memcpy (frame->ether_shost, channel->host, sizeof (frame->ether_shost));
-		}
-		sendpacket (channel, memory, length);
-		if (_anyset (channel->flags, CHANNEL_LISTEN))
-		{
-			while (readpacket (channel, memory, extent) > 0);
-		}
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   void iterate (int argc, char const * argv [], void * memory, ssize_t extent, unsigned pause);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-static void iterate (int argc, char const * argv [], struct channel * channel, unsigned pause)
-
-{
-	byte buffer [ETHER_MAX_LEN];
-	if (!argc)
-	{
-		function (channel, buffer, sizeof (buffer));
-	}
-	while ((argc) && (* argv))
-	{
-		if (!freopen (* argv, "rb", stdin))
-		{
-			error (1, errno, "Can't open %s", * argv);
-		}
-		function (channel, buffer, sizeof (buffer));
-		argc--;
-		argv++;
-		if ((argc) && (* argv))
-		{
-			sleep (pause);
-		}
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"d:e:hi:l:p:t:vw:",
-		PUTOPTV_S_FUNNEL,
-		"Ethernet Frame Send Utility",
-		"d x\treplace destination address with (x)",
-		"e x\techo return frames having ethertype (x) [" LITERAL (EFSU_ETHERTYPE) "]",
-		"h\treplace source address with host address",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"l n\trepeat file sequence (n) times [" LITERAL (EFSU_LOOP) "]",
-		"p n\twait (n) seconds between files [" LITERAL (EFSU_PAUSE) "]",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose messages",
-		"w n\twait (n) seconds between loops [" LITERAL (EFSU_DELAY) "]",
-		(char const *) (0)
-	};
-	unsigned pause = EFSU_PAUSE;
-	unsigned delay = EFSU_DELAY;
-	unsigned loop = EFSU_LOOP;
-	signed c;
-	channel.type = EFSU_ETHERTYPE;
-	if (getenv (EFSU_INTERFACE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (EFSU_INTERFACE));
-
-#else
-
-		channel.ifname = strdup (getenv (EFSU_INTERFACE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'd':
-			_setbits (channel.flags, CHANNEL_UPDATE_TARGET);
-			if (!hexencode (channel.peer, sizeof (channel.peer), optarg))
-			{
-				error (1, errno, "%s", optarg);
-			}
-			break;
-		case 'e':
-			_setbits (channel.flags, CHANNEL_LISTEN);
-			channel.type = (uint16_t)(basespec (synonym (optarg, protocols, SIZEOF (protocols)), 16, sizeof (channel.type)));
-			break;
-		case 'h':
-			_setbits (channel.flags, CHANNEL_UPDATE_SOURCE);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'l':
-			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'p':
-			pause = (unsigned)(uintspec (optarg, 0, 1200));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		case 'w':
-			delay = (unsigned)(uintspec (optarg, 0, 1200));
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	while (loop--)
-	{
-		iterate (argc, argv, &channel, pause);
-		if (loop)
-		{
-			sleep (delay);
-		}
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/emalloc.c.html b/docbook/emalloc.c.html deleted file mode 100644 index 0a840dcc..00000000 --- a/docbook/emalloc.c.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - emalloc.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void * emalloc (size_t length)
- *
- *   error.h
- *
- *   attempt to allocate memory using malloc(); return the memory address
- *   on success; print an error message on stderr and then terminate the
- *   program on failure;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EMALLOC_SOURCE
-#define EMALLOC_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include "../tools/error.h"
-
-void * emalloc (size_t length)
-
-{
-	void * memory = malloc (length);
-	if (!memory)
-	{
-		error (1, errno, "need %lu bytes", (long)(length));
-	}
-	return (memory);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/embedding.xml b/docbook/embedding.xml deleted file mode 100644 index 24b0e887..00000000 --- a/docbook/embedding.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - Embedded Applications - -
- - Introduction - - - The Open Powerline Toolkit has been developed with embedded applications in mind but it is not an embedded turn-key system. It has been successfully cross-compiled for several big and little endian platforms. Qualcomm Atheros does not claim to support cross-compilation for any particular environment or guarantee proper program execution on all platforms. Customers should have (or obtain) embedded system expertise or allow time to develop the expertise before attempting any embedded project. - - - Many embedded systems use flash memory for persistent storage. When power is applied, an image is read from flash memory into volatile memory and executed there. The image contains an operating system kernel and filesystem image. The kernel mounts the filesystem image and starts applications found there. The filesystem stores application programs, support libraries and configuration files and should have enough free space for temporary files that might be needed. A typical embedded system uses Linux as the operating system kernel, Busybox as the principle application and uClib as the support library. All executable components must be compiled for the target host processor instruction set. -
-
diff --git a/docbook/endian.h.html b/docbook/endian.h.html deleted file mode 100644 index dbd04097..00000000 --- a/docbook/endian.h.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - endian.h - - - - - - - - - -
-/*====================================================================*
- *
- *   endian.h - integer byte order declarations and definitions;
- *
- *   this header is included to support recent moves to expand and
- *   standardize endian conversion functions on Linux, FreeBSD and
- *   NetBSD; Linux has implemented the following functions but OSX
- *   and Microsoft have not yet done so;
- *
- *   These functions are similar to network byteorder functions.
- *   For example, be32toh() is identical to ntohl().
- *
- *   #define _BSD_SOURCE
- *   #include <endian.h>
- *
- *   uint16_t htobe16(uint16_t x);
- *   uint16_t htole16(uint16_t x);
- *   uint16_t be16toh(uint16_t x);
- *   uint16_t le16toh(uint16_t x);
- *
- *   uint32_t htobe32(uint32_t x);
- *   uint32_t htole32(uint32_t x);
- *   uint32_t be32toh(uint32_t x);
- *   uint32_t le32toh(uint32_t x);
- *
- *   uint64_t htobe64(uint64_t x);
- *   uint64_t htole64(uint64_t x);
- *   uint64_t be64toh(uint64_t x);
- *   uint64_t le64toh(uint64_t x);
- *
- *   The advantage of network byteorder functions is that they are
- *   available on all Unix systems but they were meant for network
- *   applications and lack little-endian and 64-bit variants;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ENDIAN_HEADER
-#define ENDIAN_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-
-#if defined (__linux__)
-#       include <endian.h>
-#       include <byteswap.h>
-#elif defined (__APPLE__)
-#       include <netinet/in.h>
-#       include <libkern/OSByteOrder.h>
-#elif defined (__OpenBSD__)
-#       include <sys/types.h>
-#elif defined (WIN32)
-#       include <stdint.h>
-#       define BYTE_ORDER LITTLE_ENDIAN
-#elif defined (__vxworks)
-#       include <netinet/in.h>
-#elif defined (__CYGWIN__)
-#	error "Cygwin is unsupported"
-#else
-#	error "Unknown environment"
-#endif
-
-/*====================================================================*
- *   definitions;
- *--------------------------------------------------------------------*/
-
-#if defined (BYTE_ORDER)
-#       if BYTE_ORDER == LITTLE_ENDIAN
-#               define BE16TOH(x) __bswap_16(x)
-#               define BE32TOH(x) __bswap_32(x)
-#               define BE64TOH(x) __bswap_64(x)
-#               define HTOBE16(x) __bswap_16(x)
-#               define HTOBE32(x) __bswap_32(x)
-#               define HTOBE64(x) __bswap_64(x)
-#               define LE16TOH(x) (x)
-#               define LE32TOH(x) (x)
-#               define LE64TOH(x) (x)
-#               define HTOLE16(x) (x)
-#               define HTOLE32(x) (x)
-#               define HTOLE64(x) (x)
-#       elif BYTE_ORDER == BIG_ENDIAN
-#               define BE16TOH(x) (x)
-#               define BE32TOH(x) (x)
-#               define BE64TOH(x) (x)
-#               define HTOBE16(x) (x)
-#               define HTOBE32(x) (x)
-#               define HTOBE64(x) (x)
-#               define LE16TOH(x) __bswap_16(x)
-#               define LE32TOH(x) __bswap_32(x)
-#               define LE64TOH(x) __bswap_64(x)
-#               define HTOLE16(x) __bswap_16(x)
-#               define HTOLE32(x) __bswap_32(x)
-#               define HTOLE64(x) __bswap_64(x)
-#       else
-#               error "Undefined host byte order (2)."
-#       endif
-#elif defined (__vxworks) && defined (_BYTE_ORDER)
-#       if _BYTE_ORDER == _LITTLE_ENDIAN
-#               define BE16TOH(x) __bswap_16(x)
-#               define BE32TOH(x) __bswap_32(x)
-#               define BE64TOH(x) __bswap_64(x)
-#               define HTOBE16(x) __bswap_16(x)
-#               define HTOBE32(x) __bswap_32(x)
-#               define HTOBE64(x) __bswap_64(x)
-#               define LE16TOH(x) (x)
-#               define LE32TOH(x) (x)
-#               define LE64TOH(x) (x)
-#               define HTOLE16(x) (x)
-#               define HTOLE32(x) (x)
-#               define HTOLE64(x) (x)
-#       elif _BYTE_ORDER == _BIG_ENDIAN
-#               define __bswap_32(x)    ((((x) & 0x000000ff) << 24) | (((x) & 0x0000ff00) <<  8) | (((x) & 0x00ff0000) >>  8) | (((x) & 0xff000000) >> 24))
-#               define __bswap_16(x)    ((((x) & 0x00ff) << 8) | (((x) & 0xff00) >> 8))
-#               define BE16TOH(x) (x)
-#               define BE32TOH(x) (x)
-#               define BE64TOH(x) (x)
-#               define HTOBE16(x) (x)
-#               define HTOBE32(x) (x)
-#               define HTOBE64(x) (x)
-#               define LE16TOH(x) __bswap_16(x)
-#               define LE32TOH(x) __bswap_32(x)
-#               define LE64TOH(x) __bswap_64(x)
-#               define HTOLE16(x) __bswap_16(x)
-#               define HTOLE32(x) __bswap_32(x)
-#               define HTOLE64(x) __bswap_64(x)
-#       else
-#               error "Undefined host byte order vxworks."
-#       endif
-#else
-#error "Undefined host byte order (1)."
-#endif
-
-/*====================================================================*
- *   endian conversion functions;
- *--------------------------------------------------------------------*/
-
-#if defined (WIN32)
-
-uint16_t __bswap_16 (uint16_t x);
-uint32_t __bswap_32 (uint32_t x);
-uint64_t __bswap_64 (uint64_t x);
-
-#elif defined (__OpenBSD__)
-
-#define __bswap_16(x) swap16(x)
-#define __bswap_32(x) swap32(x)
-#define __bswap_64(x) swap64(x)
-
-#elif defined (__APPLE__)
-
-#define __bswap_16(x) OSSwapInt16(x)
-#define __bswap_32(x) OSSwapInt32(x)
-#define __bswap_64(x) OSSwapInt64(x)
-
-#elif defined (__linux__)
-
-#else
-#error "Unknown Environment"
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/erase.sh.html b/docbook/erase.sh.html deleted file mode 100644 index cd048163..00000000 --- a/docbook/erase.sh.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - erase.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/erase.sh
-
-# this script erases flash memory only on selected firmware versions;
- 
-# ====================================================================
-# symbols;
-# --------------------------------------------------------------------
-
-. /etc/environment
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# query connection;
-# --------------------------------------------------------------------
-
-echo -n "Interface [${ETH}]: "; read  
-if [ ! -z ${REPLY} ]; then
-	ETH=${REPLY}
-fi
-
-# ====================================================================
-# check connection;
-# --------------------------------------------------------------------
-
-int6kwait -xqsi ${ETH}
-if [ ${?} != 0 ]; then
-	echo "Device is not connected"
-	exit 1
-fi
-
-# ====================================================================
-# read device DAK;
-# --------------------------------------------------------------------
-
-DAK=$(int6kid -i ${ETH} -D)
-
-# ====================================================================
-# erase NVRAM on local device; only works on some firmware versions;  
-# --------------------------------------------------------------------
-
-int6kp -i ${ETH} -D ${DAK} -E
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# return success;
-# --------------------------------------------------------------------
-
-exit 0
-
-
-
- - - diff --git a/docbook/error.c.html b/docbook/error.c.html deleted file mode 100644 index d2cfdb5b..00000000 --- a/docbook/error.c.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - error.c - - - - - - - - - -
-/*====================================================================*
- *
- *   signed error (signed status, errno_t number, char const * format, ...);
- *
- *   error.h
- *
- *   custom implementation of GNU error() function for systems
- *   that do not have it; this version always returns -1;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ERROR_SOURCE
-#define ERROR_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include "../tools/types.h"
-#include "../tools/error.h"
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 3, 4)))
-
-#endif
-
-signed error (signed status, errno_t number, char const * format, ...)
-
-{
-	extern char const *program_name;
-	if ((program_name) && (*program_name))
-	{
-		fprintf (stderr, "%s: ", program_name);
-	}
-
-#if 1
-
-	if ((format) && (*format))
-	{
-		va_list arglist;
-		va_start (arglist, format);
-		vfprintf (stderr, format, arglist);
-		va_end (arglist);
-	}
-	if (number)
-	{
-		fprintf (stderr, ": %s", strerror (number));
-	}
-
-#else
-
-	if (number)
-	{
-		fprintf (stderr, "%s: ", strerror (number));
-	}
-	if ((format) && (*format))
-	{
-		va_list arglist;
-		va_start (arglist, format);
-		vfprintf (stderr, format, arglist);
-		va_end (arglist);
-	}
-
-#endif
-
-	fprintf (stderr, "\n");
-	fflush (stderr);
-	if (status)
-	{
-		exit (status);
-	}
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/error.h.html b/docbook/error.h.html deleted file mode 100644 index 08a7ea9c..00000000 --- a/docbook/error.h.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - error.h - - - - - - - - - -
-/*====================================================================*
- *
- *   error.h - error function definitions and declarations;
- *
- *   this file is an alterantive to GNU header file of the same
- *   name; in addition to standard GNU error function declarations,
- *   some additional functions are declared;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ERROR_HEADER
-#define ERROR_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/types.h"
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#if defined (WIN32)
-#define __func__ __FUNCTION__
-#endif
-
-/*====================================================================*
- *   define error codes for systems that do not support POSIX codes;
- *--------------------------------------------------------------------*/
-
-#ifndef ECANCELED
-#define ECANCELED 0
-#endif
-#ifndef ENOTSUP
-#define ENOTSUP EPERM
-#endif
-#ifndef EBADMSG
-#define EBADMSG 0
-#endif
-#ifndef EPROTONOSUPPORT
-#define EPROTONOSUPPORT 124
-#endif
-#ifndef ENODATA
-#define ENODATA 0
-#endif
-#ifndef EOVERFLOW
-#define EOVERFLOW 0
-#endif
-
-/*====================================================================*
- *   define common error message strings;
- *--------------------------------------------------------------------*/
-
-#define ERROR_NOTROOT "This program needs root privileges"
-#define ERROR_TOOMANY "Too many command line arguments"
-
-#define CANT_START_TIMER "function %s can't start timer", __func__
-#define CANT_RESET_TIMER "function %s can't reset timer", __func__
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#define TRACE error (0, 0, "%s (%d)", __FILE__, __LINE__);
-
-/*====================================================================*
- *   declare GNU error() and error_at_line() functions;
- *--------------------------------------------------------------------*/
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 3, 4)))
-
-#endif
-
-signed error (signed status, errno_t number, char const * format, ...);
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 3, 4)))
-
-#endif
-
-signed debug (signed status, char const * string, char const * format, ...);
-
-signed extra (signed status, errno_t number, int argc, char const * argv []);
-
-/*====================================================================*
- *   end definitions and declarations;
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/ether.h.html b/docbook/ether.h.html deleted file mode 100644 index e0cfbad8..00000000 --- a/docbook/ether.h.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - ether.h - - - - - - - - - -
-/*====================================================================*
- *
- *   ether.h - Ethernet definitions and declarations;
- *
- *   include or exclude various ethernet related definitions based
- *   platform and environment;
- *
- *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
- *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
- *;  For demonstration and evaluation only; Not for production use.
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ETHER_HEADER
-#define ETHER_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-#if defined (__linux__)
-#       include <net/if.h>
-#       include <net/ethernet.h>
-#       include <arpa/inet.h>
-#elif defined (__APPLE__)
-#       include <sys/types.h>
-#       include <sys/socket.h>
-#       include <net/if.h>
-#       include <net/ethernet.h>
-#       include <arpa/inet.h>
-#       include <net/bpf.h>
-#elif defined (__OpenBSD__)
-#       include <sys/ioctl.h>
-#       include <sys/types.h>
-#       include <sys/socket.h>
-#       include <net/if.h>
-#       include <netinet/in.h>
-#       include <netinet/if_ether.h>
-#       include <net/bpf.h>
-#       include <fcntl.h>
-#elif defined (WIN32)
-#       if defined (WINPCAP)
-#               include <pcap.h>
-#               include <Packet32.h>
-#       endif
-#       include <net/ethernet.h>
-#       include <net/if.h>
-#elif defined (__CYGWIN__)
-#	error "Cygwin in unsupported!"
-#else
-#	error "Unknown environment!"
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/types.h"
-
-/*====================================================================*
- *   variables;
- *--------------------------------------------------------------------*/
-
-typedef struct nic
-
-{
-	unsigned ifindex;
-	byte ethernet [ETHER_ADDR_LEN];
-	byte internet [4];
-	char ifname [IF_NAMESIZE];
-	char ifdesc [255];
-}
-
-NIC;
-
-/*====================================================================*
- *   ethertypes;
- *--------------------------------------------------------------------*/
-
-#define ETH_P_HP10 0x887B
-#define ETH_P_HCP  0x88B7
-#define ETH_P_LLDP 0x88CC
-#define ETH_P_HPAV 0x88E1
-#define ETH_P_1905 0x893A
-
-/*====================================================================*
- *   basic 802.2 Ethernet frame structure;
- *--------------------------------------------------------------------*/
-
-#ifndef __GNUC__
-#pragma pack (push, 1)
-#endif
-
-typedef struct ethernet_frame
-
-{
-	byte frame_dhost [ETHER_ADDR_LEN];
-	byte frame_shost [ETHER_ADDR_LEN];
-	uint16_t frame_type;
-	byte frame_data [ETHERMTU];
-}
-
-FRAME;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-/*====================================================================*
- *   functions;
- *--------------------------------------------------------------------*/
-
-char * getifname (signed number);
-signed gethwaddr (void * memory, char const * device);
-signed anynic (char buffer [], unsigned length);
-unsigned hostnics (struct nic list [], unsigned size);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/ethernet.h.html b/docbook/ethernet.h.html deleted file mode 100644 index a190b7cf..00000000 --- a/docbook/ethernet.h.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - ethernet.h - - - - - - - - - -
-/*====================================================================*
- *   
- *   Copyright (c) 2011 by Qualcomm Atheros.
- *   
- *   Permission to use, copy, modify, and/or distribute this software 
- *   for any purpose with or without fee is hereby granted, provided 
- *   that the above copyright notice and this permission notice appear 
- *   in all copies.
- *   
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *   
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   ethernet.h - substitute net/ethernet.h for systems without one;
- *
- *.  Intellon INT6000 Linux Toolkit for HomePlug AV;
- *:  Published 2006-2009 by Intellon Corp. ALL RIGHTS RESERVED;
- *;  For demonstration; Not for production use;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef ETHERNET_HEADER
-#define ETHERNET_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-
-/*====================================================================*
- *   Ethernet frame lengths;
- *--------------------------------------------------------------------*/
-
-#define	ETHER_ADDR_LEN		6
-#define	ETHER_TYPE_LEN		2
-#define	ETHER_CRC_LEN		4
-#define	ETHER_HDR_LEN		(ETHER_ADDR_LEN + ETHER_ADDR_LEN + ETHER_TYPE_LEN)
-#define	ETHER_MIN_LEN		64
-#define	ETHER_MAX_LEN		1518
-#define	ETHERMTU		1500
-#define ETHERMIN		(ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
-
-/*====================================================================*
- *   Ethernet type/length field values;
- *--------------------------------------------------------------------*/
-
-#define	ETHERTYPE_PUP		0x0200	
-#define	ETHERTYPE_IP		0x0800	
-#define ETHERTYPE_ARP		0x0806	
-#define ETHERTYPE_REVARP	0x8035	
-#define	ETHERTYPE_VLAN		0x8100	
-#define ETHERTYPE_IPV6		0x86dd	
-#define	ETHERTYPE_LOOPBACK	0x9000	
-#define ETHERTYPE_HP10		0x887B  
-#define ETHERTYPE_HPAV		0x88E1  
-
-/*====================================================================*
- *  Ethernet frame structure;
- *--------------------------------------------------------------------*/
-
-#pragma pack (push, 1)
-
-struct ether_header 
-
-{
-	uint8_t ether_dhost [ETHER_ADDR_LEN];
-	uint8_t ether_shost [ETHER_ADDR_LEN];
-	uint16_t ether_type;
-};
-
-#pragma pack (pop)
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif 
-
-
-
- - - diff --git a/docbook/evse.1.html b/docbook/evse.1.html deleted file mode 100644 index c7618114..00000000 --- a/docbook/evse.1.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - evse.1 - - - - - - - - - -
-evse(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     evse(1)
-
-NAME
-       evse - Qualcomm Atheros Electric Vehicle Supply Equipment Emulator
-
-SYNOPSIS
-       evse [options]
-
-DESCRIPTION
-       Emulate  the  EVSE  part  of  the HomePlug AV Signal Level Attentuation Characterization (SLAC) protocol where a PEV is a
-       "Plug-in Electric Vehicle" and an EVSE is an "Electric Vehicle Supply  Equipment"  or  charging  station.   This  program
-       remains active until terminated by the user.  It waits for some PEV-HLE on the powerline network to attempt to connect in
-       order to charge a virtual vehicle then services the PEV-HLE until the PEV-HLE elects to connect, elects not to connect or
-       abandons  the  attempt.  See the HomePlug Green PHY Specification Release Version 1.1 for more information on this proto‐
-       col.
-
-       Signal Level Attenuation Characterization (SLAC) enables a station to measure the signal level  of  its  transmission  at
-       other  stations  in  the  network.   It  is designed for automotive applications where there are multiple plug-in vehicle
-       (PEVs) and electric vehicle supply equipment (EVSE) on the network.  The PEV signal level is measured at  multiple  EVSEs
-       to determine which EVSE the PEV is actually plugged into.  The process leading to this determination is called "Green PHY
-       PEV-EVSE Association" (GreenPPEA).
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -c     Print  the  EVSE-HLE  configuration  profile on stdout.  The configuration profile specifies program defaults in a
-              format that you, as a user, can edit and save.  Use options -p and -s to read named profiles and sections.
-
-       -d     Print the contents of the EVSE-HLE session variable on stdout.  The session variable is an program data  structure
-              that  stores  information passed between the PEV-HLE and EVSE-HLE during SLAC association.  This option is used to
-              inspect and veriify information relevant to the process.
-
-       If the program was compiled with variable SLAC_DEBUG defined then this option also prints MME message fields before  mes‐
-       sages are sent or after they are received.  Interested parties can follow along in the source code.
-
-       -i     Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -p profile
-              The EVSE-HLE configuration profile name.  The program will supply default values  for  missing  profile  elements.
-              See the example profile shown below.  The default profile is "evse.ini".
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -s section
-              The  configuration profile section name.  The program will supply default values for missing configuration profile
-              elements.  See the example profile shown below.  The default section name is "default".
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-PROFILE
-       The default configuration profile for this program is "evse.ini".  The default profile section is "default".   Users  may
-       create  addition profiles and reference them with option -p or add additional sections to an existing profiles and refer‐
-       ence them with option -s.
-
-       Time to Sound
-              The time in 100 millisecond increments for all msounds to arrive at the msound target.  The msound target may pro‐
-              ceed  with  attenuation  characterization computations should all msounds fail to arrive within this period.  This
-              value is read but not used by program pev or program evse.  This value is the same as  CM_SLAC_PARAM.CNF.TIME_OUT.
-              The default value is 10 which represents 1000 milliseconds.
-
-       Number of Sounds
-
-       The total number of msounds that will be sent to the msound target.
-              All  msounds  must  arrive  within  the  allotted  time  or  they  will  be  lost.   This  value  is  the  same as
-              CM_SLAC_PARAM.CNF.NUM_SOUNDS.  The default is 8.
-
-       Response Type
-              Controls whether the msound recipient sends signal attenuation characteristic profile  data  to  the  EVSE-HLE  or
-              another  station.   The  only response specified at this time is the EVSE-HLE.  The default value is 0.  Any other
-              value is ignored.
-
-       Station Identifier
-              Vehicle identification.  The 17-byte Vehicle Identification Number to  be  placed  in  CM_MNBC_SOUND.IND.SenderID.
-              This value is not used but is can be changed here so that the field is easy to spot within network message traces.
-
-       Network Membership Key
-              The 16-byte Network Memberhip Key (NMK) for the PEV-PLC device.  This program uses CM_SET_KEY to sets the EVSE-PLC
-              NMK to this value after disconnecting.  The default value is the key for Network Password "HomePlugAV0123".
-
-       Network Identifier
-              The 7-byte Network Identifier (NID) for the PEV-PLC device.  This program uses CM_SET_KEY to sets the EVSE-PLC NID
-              to this value after disconnecting.  The default value is the same as that for Network Password "HomePlugAV0123".
-
-REFERENCES
-       See  the  Qualcomm Atheros AR7420, QCA6410 IEEE 1901, HomePlug AV and QCA7000 HomePlug Green PHY PLC Chipset Programmer's
-       Guide or the HomePlug Green PHY Specification Release Version 1.1 for more information on this protocol.
-
-REFERENCES
-       See the Qualcomm Atheros AR7420, QCA6410 IEEE 1901, HomePlug AV and QCA7000 HomePlug Green PHY PLC Chipset  Programmer'sw
-       Guide or the HomePlug Green PHY Specification Release Version 1.1 for more information on this protocol.
-
-EXAMPLES
-       The following example starts a EVSE session on interface eth0 and wait up to 2000 milliseconds (or 2 seconds) for the PEV
-       to respond during any given exchange.
-
-          # evse -ieth0 -w2000
-
-       The default EVSE-HLE configuration profile, "evse.ini", looks something like this but it can be changed  using  a  normal
-       text editor.  Use option -P to produce a template profile, if one is needed.
-
-          # file: evse.ini
-          # ====================================================================
-          # EVSE-HLE initiaization;
-          # --------------------------------------------------------------------
-          [default]
-          time to sound = 10
-          number of sounds = 8
-          response type = 0
-          station identifier = BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-          network membership key = B59319D7E8157BA001B018669CCEE30D
-          network identifier = 026BCBA5354E08
-
-SEE ALSO
-       plc(1), pev(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     evse(1)
-
- - - diff --git a/docbook/evse.c.html b/docbook/evse.c.html deleted file mode 100644 index 55a95abd..00000000 --- a/docbook/evse.c.html +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - evse.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   evse.c - QCA Electric Vehicle Supply Equipment Emulator;
- *
- *   This program, in the current state, is not a finished product;
- *   It has been released so that interested parties can begin to 
- *   see how the SLAC protocol might be implemented;
- *
- *   Some key design features are:
- *
- *   1) the use of a channel variable to abstract ISO Layer 2 I/O;
- *      the variable is used by functions openchannel, readmessage,
- *      sendmessage and closechannel;
- *
- *   2) the use of a message variable to represent an IEEE 802.3 
- *      Ethernet frame; the variable allows one frame to be used
- *      and re-used throughout the program but supports multiple
- *      frame buffers if needed;
- *
- *   3) the use of a session variable to support multiple PEV-EVSE
- *      interactions without using threads or subrocesses; this has
- *      not demonstrated in this version of the program; some more
- *      work is needed;
- *
- *   4) the absence of threads or subprocesses so that the  program 
- *      can be ported to hosts without a multi-tasking operating 
- *      system;
- *
- *   5) lots of debugging messages; these can be suppressed or 
- *      deleted if not wanted;
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <errno.h>
-#include <sys/time.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../ether/channel.h"
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/config.h"
-#include "../tools/types.h"
-#include "../tools/timer.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../iso15118/slac.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexout.c"
-#include "../tools/hexstring.c"
-#include "../tools/decdecode.c"
-#include "../tools/decstring.c"
-#include "../tools/todigit.c"
-#include "../tools/strfbits.c"
-#include "../tools/error.c"
-#include "../tools/config.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/HomePlugHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/readmessage.c"
-#include "../mme/sendmessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../iso15118/slac_session.c"
-#include "../iso15118/slac_debug.c"
-#include "../iso15118/evse_cm_slac_param.c"
-#include "../iso15118/evse_cm_start_atten_char.c"
-#include "../iso15118/evse_cm_atten_char.c"
-#include "../iso15118/evse_cm_mnbc_sound.c"
-#include "../iso15118/evse_cm_slac_match.c"
-#include "../iso15118/evse_cm_set_key.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define PLCDEVICE "PLC"
-#define PROFILE "evse.ini"
-#define SECTION "default" 
-#define STATION ""
-
-#define EVSE_STATE_UNAVAILABLE 0
-#define EVSE_STATE_UNOCCUPIED 1
-#define EVSE_STATE_UNMATCHED 2
-#define EVSE_STATE_MATCHED 3
-
-#define EVSE_SID "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"	// Station Identifier
-#define EVSE_NMK "B59319D7E8157BA001B018669CCEE30D" 	// HomePlugAV0123
-#define EVSE_NID "026BCBA5354E08"		    	// HomePlugAV0123
-
-/*====================================================================*
- *
- *   void configure ()
- *
- *   print default EVSE-HLE configuration file on stdout so that the
- *   profile, section and element names match; 
- *
- *--------------------------------------------------------------------*/
-
-static void configure () 
-
-{ 
-	printf ("# file: %s\n", PROFILE); 
-	printf ("# ====================================================================\n"); 
-	printf ("# EVSE-HLE initiaization;\n"); 
-	printf ("# --------------------------------------------------------------------\n"); 
-	printf ("[%s]\n", SECTION); 
-	printf ("station identifier = %s\n", EVSE_SID); 
-	printf ("network membership key = %s\n", EVSE_NMK); 
-	printf ("network identifier = %s\n", EVSE_NID); 
-	printf ("number of sounds = %d\n", SLAC_MSOUNDS); 
-	printf ("time to sound = %d\n", SLAC_TIMETOSOUND); 
-	printf ("response type = %d\n", SLAC_RESPONSE_TYPE); 
-	printf ("settle time = %d\n", SLAC_SETTLETIME); 
-	printf ("charge time = %d\n", SLAC_CHARGETIME); 
-	return; 
-} 
-
-/*====================================================================*
- *
- *   char void initialize (struct session * session, char const * profile, char const * section) 
- *
- *   read EVSE-HLE configuration profile; initialize session variable;
- *   
- *--------------------------------------------------------------------*/
-
-static void initialize (struct session * session, char const * profile, char const * section) 
-
-{ 
-	session->next = session->prev = session; 
-	hexencode (session->EVSE_ID, sizeof (session->EVSE_ID), configstring (profile, section, "StationIdentifier", EVSE_SID)); 
-	hexencode (session->NMK, sizeof (session->NMK), configstring (profile, section, "NetworkMembershipKey", EVSE_NMK)); 
-	hexencode (session->NID, sizeof (session->NID), configstring (profile, section, "NetworkIdentifier", EVSE_NID)); 
-	session->NUM_SOUNDS = confignumber_range (profile, section, "NumberOfSounds", SLAC_MSOUNDS, 0, UCHAR_MAX); 
-	session->TIME_OUT = confignumber_range (profile, section, "TimeToSound", SLAC_TIMETOSOUND, 0, UCHAR_MAX); 
-	session->RESP_TYPE = confignumber_range (profile, section, "ResponseType", SLAC_RESPONSE_TYPE, 0, UCHAR_MAX); 
-	session->chargetime = confignumber_range (profile, section, "ChargeTime", SLAC_CHARGETIME, 0, UINT_MAX); 
-	session->settletime = confignumber_range (profile, section, "SettleTime", SLAC_SETTLETIME, 0, UINT_MAX); 
-	memcpy (session->original_nmk, session->NMK, sizeof (session->original_nmk)); 
-	memcpy (session->original_nid, session->NID, sizeof (session->original_nid)); 
-	session->state = EVSE_STATE_UNOCCUPIED; 
-	slac_session (session); 
-	return; 
-} 
-
-/*====================================================================*
- *
- *   signed identifier (struct session * session, struct channel * channel);
- *
- *   copy channel host address to session EVSE MAC address; set session
- *   EVSE identifier to zeros;
- *
- *--------------------------------------------------------------------*/
-
-static signed identifier (struct session * session, struct channel * channel) 
-
-{ 
-	memcpy (session->EVSE_MAC, channel->host, sizeof (session->EVSE_MAC)); 
-	return (0); 
-} 
-
-/*====================================================================*
- *
- *   void UnoccupiedState (struct session * session, struct channel * channel, struct message * message);
- *
- *--------------------------------------------------------------------*/
-
-static void UnoccupiedState (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	slac_session (session); 
-	slac_debug (session, 0, __func__, "Listening ..."); 
-	while (evse_cm_slac_param (session, channel, message)); 
-	session->state = EVSE_STATE_UNMATCHED; 
-	return; 
-} 
-
-/*====================================================================*
- *
- *   void MatchingState (struct session * session, struct channel * channel, struct message * message);
- *
- *   the cm_start_atten_char message establishes msound count and 
- *   timeout;
- *
- *--------------------------------------------------------------------*/
-
-static void UnmatchedState (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	slac_session (session); 
-	slac_debug (session, 0, __func__, "Sounding ..."); 
-	if (evse_cm_start_atten_char (session, channel, message)) 
-	{ 
-		session->state = EVSE_STATE_UNOCCUPIED; 
-		return; 
-	} 
-	if (evse_cm_mnbc_sound (session, channel, message)) 
-	{ 
-		session->state = EVSE_STATE_UNOCCUPIED; 
-		return; 
-	} 
-	if (evse_cm_atten_char (session, channel, message)) 
-	{ 
-		session->state = EVSE_STATE_UNOCCUPIED; 
-		return; 
-	} 
-	slac_debug (session, 0, __func__, "Matching ..."); 
-	if (evse_cm_slac_match (session, channel, message)) 
-	{ 
-		session->state = EVSE_STATE_UNOCCUPIED; 
-		return; 
-	} 
-	session->state = EVSE_STATE_MATCHED; 
-	return; 
-} 
-
-/*====================================================================*
- *
- *   void MatchedState (struct session * session, struct channel * channel, struct message * message);
- *
- *--------------------------------------------------------------------*/
-
-static void MatchedState (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	slac_debug (session, 0, __func__, "Connecting ..."); 
-
-#if SLAC_AVLN_EVSE
-
-	if (evse_cm_set_key (session, channel, message)) 
-	{ 
-		session->state = EVSE_STATE_UNOCCUPIED; 
-		return; 
-	} 
-	sleep (session->settletime); 
-
-#endif
-#if SLAC_AVLN_PEV
-
-	slac_debug (session, 0, __func__, "waiting for pev to settle ..."); 
-	sleep (session->settletime); 
-
-#endif
-
-	slac_debug (session, 0, __func__, "Charging (%d) ...\n\n", session->counter++); 
-	sleep (session->chargetime); 
-	slac_debug (session, 0, __func__, "Disconnecting ..."); 
-
-#if SLAC_AVLN_EVSE
-
-	memcpy (session->NMK, session->original_nmk, sizeof (session->NMK)); 
-	memcpy (session->NID, session->original_nid, sizeof (session->NID)); 
-	if (evse_cm_set_key (session, channel, message)) 
-	{ 
-		session->state = EVSE_STATE_UNOCCUPIED; 
-		return; 
-	} 
-	sleep (session->settletime); 
-
-#endif
-#if SLAC_AVLN_PEV
-
-	slac_debug (session, 0, __func__, "waiting for pev to settle ..."); 
-	sleep (session->settletime); 
-
-#endif
-
-	session->state = EVSE_STATE_UNOCCUPIED; 
-	return; 
-} 
-
-/*====================================================================*
- *   
- *   int main (int argc, char const * argv[]);
- *   
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv []) 
-
-{ 
-	extern struct channel channel; 
-	static char const * optv [] = 
-	{ 
-		"cCdi:p:qs:t:vx", 
-		"", 
-		"Electric Vehicle Supply Equipment Emulator", 
-		"c\tprint template configuration file on stdout", 
-		"C\tstop on count mismatch", 
-		"d\tdisplay debug information", 
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]", 
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]", 
-
-#endif
-
-		"p s\tconfiguration profile is (s) [" LITERAL (PROFILE) "]", 
-		"s s\tconfiguration section is (s) [" LITERAL (SECTION) "]", 
-		"q\tquiet mode", 
-		"t n\tread timeout is (n) milliseconds [" LITERAL (SLAC_TIMEOUT) "]", 
-		"v\tverbose mode", 
-		"x\texit on error", 
-		(char const *) (0)
-	}; 
-	struct session session; 
-	struct message message; 
-	char const * profile = PROFILE; 
-	char const * section = SECTION; 
-	signed c; 
-	memset (& session, 0, sizeof (session)); 
-	memset (& message, 0, sizeof (message)); 
-	channel.timeout = SLAC_TIMEOUT; 
-	if (getenv (PLCDEVICE)) 
-	{ 
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE)); 
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE)); 
-
-#endif
-
-	} 
-	optind = 1; 
-	while (~ (c = getoptv (argc, argv, optv))) 
-	{ 
-		switch (c) 
-		{ 
-		case 'c': 
-			configure (); 
-			return (0); 
-		case 'C': 
-			_setbits (session.flags, SLAC_COMPARE); 
-			break; 
-		case 'd': 
-			_setbits (session.flags, (SLAC_VERBOSE | SLAC_SESSION)); 
-			break; 
-		case 'i': 
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg); 
-
-#else
-
-			channel.ifname = optarg; 
-
-#endif
-
-			break; 
-		case 'p': 
-			profile = optarg; 
-			break; 
-		case 's': 
-			section = optarg; 
-			break; 
-		case 'q': 
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (session.flags, SLAC_SILENCE); 
-			break; 
-		case 't': 
-			channel.timeout = (signed) (uintspec (optarg, 0, UINT_MAX)); 
-			break; 
-		case 'v': 
-			_setbits (channel.flags, CHANNEL_VERBOSE); 
-			break; 
-		case 'x': 
-			session.exit = session.exit? 0: 1; 
-			break; 
-		default: 
-			break; 
-		} 
-	} 
-	argc -= optind; 
-	argv += optind; 
-	if (argc) 
-	{ 
-		slac_debug (& session, 1, __func__, ERROR_TOOMANY); 
-	} 
-	openchannel (& channel); 
-	initialize (& session, profile, section); 
-	identifier (& session, & channel); 
-	if (evse_cm_set_key (& session, & channel, & message)) 
-	{ 
-		slac_debug (& session, 1, __func__, "Can't set key."); 
-	} 
-	sleep (session.settletime); 
-	while (session.state) 
-	{ 
-		if (session.state == EVSE_STATE_UNOCCUPIED) 
-		{ 
-			UnoccupiedState (& session, & channel, & message); 
-			continue; 
-		} 
-		if (session.state == EVSE_STATE_UNMATCHED) 
-		{ 
-			UnmatchedState (& session, & channel, & message); 
-			continue; 
-		} 
-		if (session.state == EVSE_STATE_MATCHED) 
-		{ 
-			MatchedState (& session, & channel, & message); 
-			continue; 
-		} 
-		slac_debug (& session, 1, __func__, "Illegal state!"); 
-	} 
-	closechannel (& channel); 
-	exit (0); 
-} 
-
-
-
- - - diff --git a/docbook/evse_cm_atten_char.c.html b/docbook/evse_cm_atten_char.c.html deleted file mode 100644 index db32ab4f..00000000 --- a/docbook/evse_cm_atten_char.c.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - evse_cm_atten_char.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed evse_cm_atten_char (struct session * session, struct channel * channel, struct message * message);
- *
- *   slac.h
- *
- *   EVSE-HLE sends average msound values to the PEV-HLE for a match
- *   decision;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EVSE_CM_ATTEN_CHAR_SOURCE
-#define EVSE_CM_ATTEN_CHAR_SOURCE
-
-#include <string.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../iso15118/slac.h"
-
-signed evse_cm_atten_char (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	struct cm_atten_char_indicate * indicate = (struct cm_atten_char_indicate *) (message); 
-	struct cm_atten_char_response * response = (struct cm_atten_char_response *) (message); 
-	slac_debug (session, 0, __func__, "--> CM_ATTEN_CHAR.IND"); 
-	memset (message, 0, sizeof (* message)); 
-	EthernetHeader (& indicate->ethernet, session->PEV_MAC, channel->host, channel->type); 
-	HomePlugHeader1 (& indicate->homeplug, HOMEPLUG_MMV, (CM_ATTEN_CHAR | MMTYPE_IND)); 
-	indicate->APPLICATION_TYPE = session->APPLICATION_TYPE; 
-	indicate->SECURITY_TYPE = session->SECURITY_TYPE; 
-	memcpy (indicate->ACVarField.SOURCE_ADDRESS, session->PEV_MAC, sizeof (indicate->ACVarField.SOURCE_ADDRESS)); 
-	memcpy (indicate->ACVarField.RunID, session->RunID, sizeof (indicate->ACVarField.RunID)); 
-	memset (indicate->ACVarField.SOURCE_ID, 0, sizeof (indicate->ACVarField.SOURCE_ID)); 
-	memset (indicate->ACVarField.RESP_ID, 0, sizeof (indicate->ACVarField.RESP_ID)); 
-	indicate->ACVarField.NUM_SOUNDS = session->sounds; 
-	indicate->ACVarField.ATTEN_PROFILE.NumGroups = session->NumGroups; 
-	memcpy (indicate->ACVarField.ATTEN_PROFILE.AAG, session->AAG, session->NumGroups); 
-	if (sendmessage (channel, message, sizeof (* indicate)) <= 0) 
-	{ 
-		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
-	} 
-	if (readmessage (channel, message, HOMEPLUG_MMV, (CM_ATTEN_CHAR | MMTYPE_RSP)) > 0) 
-	{ 
-		if (! memcmp (session->RunID, response->ACVarField.RunID, sizeof (session->RunID))) 
-		{ 
-			slac_debug (session, 0, __func__, "<-- CM_ATTEN_CHAR.RSP"); 
-
-#if SLAC_DEBUG
-
-			if (_anyset (session->flags, SLAC_VERBOSE)) 
-			{ 
-				char string [256]; 
-				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.RSP.APPLICATION_TYPE %d", response->APPLICATION_TYPE); 
-				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.RSP.SECURITY_TYPE %d", response->SECURITY_TYPE); 
-				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.RSP.ACVarfield.SOURCE_ADDRESS %s", HEXSTRING (string, response->ACVarField.SOURCE_ADDRESS)); 
-				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.RSP.ACVarFIeld.RunID %s", HEXSTRING (string, response->ACVarField.RunID)); 
-				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.RSP.ACVarField.SOURCE_ID %s", HEXSTRING (string, response->ACVarField.SOURCE_ID)); 
-				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.RSP.ACVarField.RESP_ID %s", HEXSTRING (string, response->ACVarField.RESP_ID)); 
-				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.RSP.ACVarField.Result %d", response->ACVarField.Result); 
-			} 
-
-#endif
-
-			return (0); 
-		} 
-	} 
-	return (slac_debug (session, session->exit, __func__, "<-- CM_ATTEN_CHAR.RSP ?")); 
-} 
-
-#endif
-
-
-
- - - diff --git a/docbook/evse_cm_mnbc_sound.c.html b/docbook/evse_cm_mnbc_sound.c.html deleted file mode 100644 index 632b7a24..00000000 --- a/docbook/evse_cm_mnbc_sound.c.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - evse_cm_mnbc_sound.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed evse_cm_mnbc_sound (struct session * session, struct channel * channel, struct message * message);
- *
- *   slac.h
- *   
- *   the GP specification recommends that the EVSE-HLE set an overall 
- *   timer once the cm_start_atten_char message is received and use it
- *   to terminate the msound loop in case some msounds are lost; 
- *
- *   accept only CM_MNBC_SOUND.IND that match RunID from the earlier
- *   CM_SLAC_PARAM.REQ and CM_START_ATTRN_CHAT.IND;
- *
- *   each CM_MNBC_MSOUND.IND is accompanied by a CM_ATTEN_PROFILE.IND
- *   but sometimes they arrive out of expected order;
- *
- *   store the running total of CM_ATTEN_PROFILE.IND.AAG values in 
- *   the session variable and compute the average based on actual
- *   number of sounds before returning;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EVSE_CM_MNBC_SOUND_SOURCE
-#define EVSE_CM_MNBC_SOUND_SOURCE
-
-#include <stdio.h>
-#include <memory.h>
-#include <sys/time.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../tools/timer.h"
-#include "../iso15118/slac.h"
-
-signed evse_cm_mnbc_sound (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	struct timeval ts; 
-	struct timeval tc; 
-	signed timer = 100 * session->TIME_OUT; 
-	unsigned AAG [SLAC_GROUPS]; 
-	unsigned sounds = 0; 
-	ssize_t length; 
-	session->sounds = 0; 
-	memset (AAG, 0, sizeof (AAG)); 
-	memset (session->AAG, 0, sizeof (session->AAG)); 
-	if (gettimeofday (& ts, NULL) == - 1) 
-	{ 
-		slac_debug (session, 1, __func__, CANT_START_TIMER); 
-	} 
-	while ((length = readpacket (channel, message, sizeof (* message))) >= 0) 
-	{ 
-		struct homeplug * homeplug = (struct homeplug *) (message); 
-		if (! length) 
-		{ 
-		} 
-		else if (ntohs (homeplug->ethernet.MTYPE) != ETH_P_HPAV) 
-		{ 
-			slac_debug (session, session->exit, __func__, "bad MTYPE"); 
-		} 
-		else if (homeplug->homeplug.MMV != HOMEPLUG_MMV) 
-		{ 
-			slac_debug (session, session->exit, __func__, "bad MMV"); 
-		} 
-		else if (LE16TOH (homeplug->homeplug.MMTYPE) == (CM_MNBC_SOUND | MMTYPE_IND)) 
-		{ 
-			struct cm_mnbc_sound_indicate * indicate = (struct cm_mnbc_sound_indicate *) (message); 
-			if (! memcmp (session->RunID, indicate->MSVarField.RunID, sizeof (session->RunID))) 
-			{ 
-				slac_debug (session, 0, __func__, "<-- CM_MNBC_SOUND.IND (%d)", sounds); 
-
-#if SLAC_DEBUG
-
-				if (_anyset (session->flags, SLAC_VERBOSE)) 
-				{ 
-					char string [256]; 
-					slac_debug (session, 0, __func__, "CM_MNBC_SOUND.IND.APPLICATION_TYPE %d", indicate->APPLICATION_TYPE); 
-					slac_debug (session, 0, __func__, "CM_MNBC_SOUND.IND.SECURITY_TYPE %d", indicate->SECURITY_TYPE); 
-					slac_debug (session, 0, __func__, "CM_MNBC_SOUND.IND.MSVarField.SenderID %s", HEXSTRING (string, indicate->MSVarField.SenderID)); 
-					slac_debug (session, 0, __func__, "CM_MNBC_SOUND.IND.MSVarField.Count %d", indicate->MSVarField.CNT); 
-					slac_debug (session, 0, __func__, "CM_MNBC_SOUND.IND.MSVarField.RunID %s", HEXSTRING (string, indicate->MSVarField.RunID)); 
-					slac_debug (session, 0, __func__, "CM_MNBC_SOUND.IND.MSVarField.RND %s", HEXSTRING (string, indicate->MSVarField.RND)); 
-				} 
-
-#endif
-
-				if (memcmp (session->PEV_MAC, indicate->ethernet.OSA, sizeof (session->PEV_MAC))) 
-				{ 
-					slac_debug (session, session->exit, __func__, "Unexpected OSA"); 
-				} 
-				sounds++; 
-			} 
-		} 
-		else if (LE16TOH (homeplug->homeplug.MMTYPE) == (CM_ATTEN_PROFILE | MMTYPE_IND)) 
-		{ 
-			struct cm_atten_profile_indicate * indicate = (struct cm_atten_profile_indicate *) (message); 
-			if (! memcmp (session->PEV_MAC, indicate->PEV_MAC, sizeof (session->PEV_MAC))) 
-			{ 
-				slac_debug (session, 0, __func__, "<-- CM_ATTEN_PROFILE.IND (%d)", session->sounds); 
-
-#if SLAC_DEBUG
-
-				if (_anyset (session->flags, SLAC_VERBOSE)) 
-				{ 
-					char string [256]; 
-					slac_debug (session, 0, __func__, "CM_ATTEN_PROFILE.PEV_MAC %s", HEXSTRING (string, indicate->PEV_MAC)); 
-					slac_debug (session, 0, __func__, "CM_ATTEN_PROFILE.NumGroups %d", indicate->NumGroups); 
-					slac_debug (session, 0, __func__, "CM_ATTEN_PROFILE.AAG %s", hexstring (string, sizeof (string), indicate->AAG, indicate->NumGroups)); 
-				} 
-
-#endif
-
-				for (session->NumGroups = 0; session->NumGroups < indicate->NumGroups; session->NumGroups++) 
-				{ 
-					AAG [session->NumGroups] += indicate->AAG [session->NumGroups]; 
-				} 
-				session->NumGroups = indicate->NumGroups; 
-				session->sounds++; 
-			} 
-		} 
-		if (gettimeofday (& tc, NULL) == - 1) 
-		{ 
-			slac_debug (session, 1, __func__, CANT_RESET_TIMER); 
-		} 
-		if ((MILLISECONDS (ts, tc) < timer) && (session->sounds < session->NUM_SOUNDS)) 
-		{ 
-			continue; 
-		} 
-		if (session->sounds > 0) 
-		{ 
-			for (session->NumGroups = 0; session->NumGroups < SLAC_GROUPS; ++ session->NumGroups) 
-			{ 
-				session->AAG [session->NumGroups] = AAG [session->NumGroups] / session->sounds; 
-			} 
-		} 
-		return (0); 
-	} 
-	return (slac_debug (session, session->exit, __func__, "Sound timeout")); 
-} 
-
-#endif
-
-
-
- - - diff --git a/docbook/evse_cm_set_key.c.html b/docbook/evse_cm_set_key.c.html deleted file mode 100644 index 7303536f..00000000 --- a/docbook/evse_cm_set_key.c.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - evse_cm_set_key.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed evse_cm_set_key (struct session * session, struct channel * channel, struct message * message);
- *
- *   slac.h
- *
- *   PEV-HLE sets the NMK and NID on PEV-PLC using CM_SET_KEY.REQ; 
- *   the NMK and NID must match those provided by EVSE-HLE using 
- *   CM_SLAC_MATCH.CNF;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EVSE_CM_SET_KEY_SOURCE
-#define EVSE_CM_SET_KEY_SOURCE
-
-#include <string.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../mme/qualcomm.h"
-#include "../mme/homeplug.h"
-#include "../iso15118/slac.h"
-
-signed evse_cm_set_key (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-
-#ifndef __GNUC__
-#pragma pack(push,1)
-#endif
-
-	struct __packed cm_set_key_request 
-	{ 
-		struct ethernet_hdr ethernet; 
-		struct homeplug_fmi homeplug; 
-		uint8_t KEYTYPE; 
-		uint32_t MYNOUNCE; 
-		uint32_t YOURNOUNCE; 
-		uint8_t PID; 
-		uint16_t PRN; 
-		uint8_t PMN; 
-		uint8_t CCOCAP; 
-		uint8_t NID [SLAC_NID_LEN]; 
-		uint8_t NEWEKS; 
-		uint8_t NEWKEY [SLAC_NMK_LEN]; 
-		uint8_t RSVD [3]; 
-	} 
-	* request = (struct cm_set_key_request *) (message); 
-	struct __packed cm_set_key_confirm 
-	{ 
-		struct ethernet_hdr ethernet; 
-		struct homeplug_fmi homeplug; 
-		uint8_t RESULT; 
-		uint32_t MYNOUNCE; 
-		uint32_t YOURNOUNCE; 
-		uint8_t PID; 
-		uint16_t PRN; 
-		uint8_t PMN; 
-		uint8_t CCOCAP; 
-		uint8_t RSVD [27]; 
-	} 
-	* confirm = (struct cm_set_key_confirm *) (message); 
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message)); 
-	slac_debug (session, 0, __func__, "--> CM_SET_KEY.REQ"); 
-	EthernetHeader (& request->ethernet, channel->peer, channel->host, channel->type); 
-	HomePlugHeader1 (& request->homeplug, HOMEPLUG_MMV, (CM_SET_KEY | MMTYPE_REQ)); 
-	request->KEYTYPE = SLAC_CM_SETKEY_KEYTYPE; 
-	memset (& request->MYNOUNCE, 0xAA, sizeof (request->MYNOUNCE)); 
-	memset (& request->YOURNOUNCE, 0x00, sizeof (request->YOURNOUNCE)); 
-	request->PID = SLAC_CM_SETKEY_PID; 
-	request->PRN = HTOLE16 (SLAC_CM_SETKEY_PRN); 
-	request->PMN = SLAC_CM_SETKEY_PMN; 
-	request->CCOCAP = SLAC_CM_SETKEY_CCO; 
-	memcpy (request->NID, session->NID, sizeof (request->NID)); 
-	request->NEWEKS = SLAC_CM_SETKEY_EKS; 
-	memcpy (request->NEWKEY, session->NMK, sizeof (request->NEWKEY)); 
-
-#if SLAC_DEBUG
-
-	if (_anyset (session->flags, SLAC_VERBOSE)) 
-	{ 
-		char string [1024]; 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.KEYTYPE %d", request->KEYTYPE); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.MYNOUNCE %s", hexstring (string, sizeof (string), & request->MYNOUNCE, sizeof (request->MYNOUNCE))); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.YOURNOUNCE %s", hexstring (string, sizeof (string), & request->YOURNOUNCE, sizeof (request->MYNOUNCE))); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.PID %d", request->PID); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.PRN %d", LE32TOH (request->PRN)); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.PMN %d", request->PMN); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.CCoCAP %d", request->CCOCAP); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.NID %s", HEXSTRING (string, request->NID)); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.NEWEKS %d", request->NEWEKS); 
-		slac_debug (session, 0, __func__, "CM_SET_KEY.NEWKEY %s", HEXSTRING (string, request->NEWKEY)); 
-	} 
-
-#endif
-
-	if (sendpacket (channel, request, sizeof (* request)) <= 0) 
-	{ 
-		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
-	} 
-	while (readpacket (channel, confirm, sizeof (* confirm)) > 0) 
-	{ 
-		if (ntohs (confirm->ethernet.MTYPE) != ETH_P_HPAV) 
-		{ 
-			slac_debug (session, session->exit, __func__, "Ignore MTYPE 0x%04X", htons (confirm->ethernet.MTYPE)); 
-			continue; 
-		} 
-		if (confirm->homeplug.MMV != HOMEPLUG_MMV) 
-		{ 
-			slac_debug (session, session->exit, __func__, "Ignore MMV 0x%02X", confirm->homeplug.MMV); 
-			continue; 
-		} 
-		if (LE32TOH (confirm->homeplug.MMTYPE) != (CM_SET_KEY | MMTYPE_CNF)) 
-		{ 
-			slac_debug (session, session->exit, __func__, "Ignore MMTYPE 0x%04X", LE32TOH (confirm->homeplug.MMTYPE)); 
-			continue; 
-		} 
-		slac_debug (session, 0, __func__, "<-- CM_SET_KEY.CNF"); 
-		if (! confirm->RESULT) 
-		{ 
-			return (slac_debug (session, session->exit, __func__, "Device refused request")); 
-		} 
-
-#if SLAC_DEBUG
-
-		if (_anyset (session->flags, SLAC_VERBOSE)) 
-		{ 
-			char string [1024]; 
-			slac_debug (session, 0, __func__, "CM_SET_KEY.RESULT %d", confirm->RESULT); 
-			slac_debug (session, 0, __func__, "CM_SET_KEY.MYNOUNCE %s", hexstring (string, sizeof (string), & confirm->MYNOUNCE, sizeof (confirm->MYNOUNCE))); 
-			slac_debug (session, 0, __func__, "CM_SET_KEY.YOURNOUNCE %s", hexstring (string, sizeof (string), & confirm->YOURNOUNCE, sizeof (confirm->MYNOUNCE))); 
-			slac_debug (session, 0, __func__, "CM_SET_KEY.PID %d", confirm->PID); 
-			slac_debug (session, 0, __func__, "CM_SET_KEY.PRN %d", LE32TOH (confirm->PRN)); 
-			slac_debug (session, 0, __func__, "CM_SET_KEY.PMN %d", confirm->PMN); 
-			slac_debug (session, 0, __func__, "CM_SET_KEY.CCoCAP %d", confirm->CCOCAP); 
-		} 
-
-#endif
-
-		return (0); 
-	} 
-	return (slac_debug (session, session->exit, __func__, "<-- CM_SET_KEY.REQ ?")); 
-} 
-
-#endif
-
-
-
- - - diff --git a/docbook/evse_cm_slac_match.c.html b/docbook/evse_cm_slac_match.c.html deleted file mode 100644 index 838d8ff3..00000000 --- a/docbook/evse_cm_slac_match.c.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - evse_cm_slac_match.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *  
- *   signed evse_cm_slac_match (struct session * session, struct channel * channel, struct message * message);
- *
- *   slac.h
- *  
- *   receive CM_SLAC_MATCH.REQ and send CM_SLAC_MATCH.CNF containing
- *   random NMK/NID that EVSE-HLE will use to configure EVSE-PLC for
- *   charging; 
- *
- *   users must develop their own means of generating random NMK/NID
- *   pairs because it is not part of the standard; this example does
- *   not attempt to randomize NMK/NID;
- *  
- *--------------------------------------------------------------------*/
-
-#ifndef EVSE_CM_SLAC_MATCH_SOURCE
-#define EVSE_CM_SLAC_MATCH_SOURCE
-
-#include <stdio.h>
-#include <string.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../iso15118/slac.h"
-
-signed evse_cm_slac_match (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	struct cm_slac_match_request * request = (struct cm_slac_match_request *) (message); 
-	struct cm_slac_match_confirm * confirm = (struct cm_slac_match_confirm *) (message); 
-	while (readmessage (channel, message, HOMEPLUG_MMV, (CM_SLAC_MATCH | MMTYPE_REQ)) > 0) 
-	{ 
-		if (! memcmp (session->RunID, request->MatchVarField.RunID, sizeof (session->RunID))) 
-		{ 
-			slac_debug (session, 0, __func__, "<-- CM_SLAC_MATCH.REQ"); 
-			memcpy (session->PEV_ID, request->MatchVarField.PEV_ID, sizeof (session->PEV_ID)); 
-			memcpy (session->PEV_MAC, request->MatchVarField.PEV_MAC, sizeof (session->PEV_MAC)); 
-			memcpy (session->RunID, request->MatchVarField.RunID, sizeof (session->RunID)); 
-
-#if SLAC_DEBUG
-
-			if (_anyset (session->flags, SLAC_VERBOSE)) 
-			{ 
-				char string [256]; 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.APPLICATION_TYPE %d", request->APPLICATION_TYPE); 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.SECURITY_TYPE %d", request->SECURITY_TYPE); 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.MVFLength %d", LE16TOH (request->MVFLength)); 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.PEV_ID %s", HEXSTRING (string, request->MatchVarField.PEV_ID)); 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.PEV_MAC %s", HEXSTRING (string, request->MatchVarField.PEV_MAC)); 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.EVSE_ID %s", HEXSTRING (string, request->MatchVarField.EVSE_ID)); 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.EVSE_MAC %s", HEXSTRING (string, request->MatchVarField.EVSE_MAC)); 
-				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.REQ.RunID %s", HEXSTRING (string, request->MatchVarField.RunID)); 
-			} 
-
-#endif
-
-			slac_debug (session, 0, __func__, "--> CM_SLAC_MATCH.CNF"); 
-			memset (message, 0, sizeof (* message)); 
-			EthernetHeader (& confirm->ethernet, session->PEV_MAC, channel->host, channel->type); 
-			HomePlugHeader1 (& confirm->homeplug, HOMEPLUG_MMV, (CM_SLAC_MATCH | MMTYPE_CNF)); 
-			confirm->APPLICATION_TYPE = session->APPLICATION_TYPE; 
-			confirm->SECURITY_TYPE = session->SECURITY_TYPE; 
-			confirm->MVFLength = HTOLE16 (sizeof (confirm->MatchVarField)); 
-			memcpy (confirm->MatchVarField.PEV_ID, session->PEV_ID, sizeof (confirm->MatchVarField.PEV_ID)); 
-			memcpy (confirm->MatchVarField.PEV_MAC, session->PEV_MAC, sizeof (confirm->MatchVarField.PEV_MAC)); 
-			memcpy (confirm->MatchVarField.EVSE_ID, session->EVSE_ID, sizeof (confirm->MatchVarField.EVSE_ID)); 
-			memcpy (confirm->MatchVarField.EVSE_MAC, session->EVSE_MAC, sizeof (confirm->MatchVarField.EVSE_MAC)); 
-			memcpy (confirm->MatchVarField.RunID, session->RunID, sizeof (confirm->MatchVarField.RunID)); 
-			memcpy (confirm->MatchVarField.NID, session->NID, sizeof (confirm->MatchVarField.NID)); 
-			memcpy (confirm->MatchVarField.NMK, session->NMK, sizeof (confirm->MatchVarField.NMK)); 
-			if (sendmessage (channel, message, sizeof (* confirm)) <= 0) 
-			{ 
-				return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
-			} 
-			return (0); 
-		} 
-	} 
-	return (slac_debug (session, session->exit, __func__, "<-- CM_SLAC_MATCH.REQ ?")); 
-} 
-
-#endif
-
-
-
- - - diff --git a/docbook/evse_cm_slac_param.c.html b/docbook/evse_cm_slac_param.c.html deleted file mode 100644 index 774a17ad..00000000 --- a/docbook/evse_cm_slac_param.c.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - evse_cm_slac_param.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *  
- *   signed evse_cm_slac_param (struct session * session, struct channel * channel, struct message * message);
- *
- *   slac.h
- *  
- *   EVSE-HLE listens indefinitely for a cm_slac_param request and 
- *   responds with a cm_slac_param confirm; this function should not
- *   exit untile a cm_slac_param request so that SLAC sessions will
- *   properly synchronize;
- *
- *   unlike some other EVSE-HLE functions, this one does not check
- *   the run identifier because this is the first point at which a
- *   new run identifier is received; it should, however, store the
- *   run identifier to verify future messages from the PEV;
- *
- *   EVSE-HLE should copy the message OSA to the session variable PEV
- *   MAC address; the PEV MAC address can then be used to respond in
- *   unicast to the right PEVHLE;
- *
- *   EVSE-HLE should copy the run identifier to the session variable 
- *   for use later in the session; this will be used to distinguish
- *   one PEV-EVSE session from another;   
- *
- *   EVSE-HLE should copy the application type and security type to
- *   the session variable unless it wants to operate in a mode that
- *   is different from the PEV;
- *
- *   at this point, the EVSE-HLE dictates the number of msounds and
- *   the msound timeout;
- *
- *   EVSE-HLE should set the msound target to the broadcast address;
- *
- *   EVSE-HLE should set the number of sounds to 8 and the timeout
- *   to 10 intervals of 100ms.
- *
- *   EVSE-HLE may send zeros for the forwarding station since it is
- *   not used here;
- *  
- *--------------------------------------------------------------------*/
-
-#ifndef EVSE_CM_SLAC_PARAM_SOURCE
-#define EVSE_CM_SLAC_PARAM_SOURCE
-
-#include <stdio.h>
-#include <string.h>
-
-#include "../ether/channel.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/memory.h"
-#include "../iso15118/slac.h"
-
-signed evse_cm_slac_param (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	extern byte const broadcast [ETHER_ADDR_LEN]; 
-	struct cm_slac_param_request * request = (struct cm_slac_param_request *) (message); 
-	struct cm_slac_param_confirm * confirm = (struct cm_slac_param_confirm *) (message); 
-	while (readmessage (channel, message, HOMEPLUG_MMV, (CM_SLAC_PARAM | MMTYPE_REQ)) > 0) 
-	{ 
-		slac_debug (session, 0, __func__, "<-- CM_SLAC_PARAM.REQ"); 
-		session->APPLICATION_TYPE = request->APPLICATION_TYPE; 
-		session->SECURITY_TYPE = request->SECURITY_TYPE; 
-		memcpy (session->PEV_MAC, request->ethernet.OSA, sizeof (session->PEV_MAC)); 
-		memcpy (session->RunID, request->RunID, sizeof (session->RunID)); 
-
-#if SLAC_DEBUG
-
-		if (_anyset (session->flags, SLAC_VERBOSE)) 
-		{ 
-			char string [256]; 
-			slac_debug (session, 0, __func__, "CM_SLAC_PARAM.REQ.APPLICATION_TYPE %d", request->APPLICATION_TYPE); 
-			slac_debug (session, 0, __func__, "CM_SLAC_PARAM.REQ.SECURITY_TYPE %d", request->SECURITY_TYPE); 
-			slac_debug (session, 0, __func__, "CM_SLAC_PARAM.REQ.RunID %s", HEXSTRING (string, request->RunID)); 
-			slac_debug (session, 0, __func__, "CM_SLAC_PARAM.REQ.CipherSuiteSetSize %d", request->CipherSuiteSetSize); 
-			slac_debug (session, 0, __func__, "CM_SLAC_PARAM.REQ.CipherSuite [0] %d", request->CipherSuite [0]); 
-			slac_debug (session, 0, __func__, "CM_SLAC_PARAM.REQ.CipherSuite [1] %d", request->CipherSuite [1]); 
-		} 
-
-#endif
-
-		if (_anyset (session->flags, SLAC_COMPARE)) 
-		{ 
-			if (LE16TOH (request->CipherSuite [0]) != (uint16_t) (session->counter)) 
-			{ 
-				slac_debug (session, session->exit, __func__, "session->counter mismatch! PEV=(%d) EVSE=(%d)", LE16TOH (request->CipherSuite [0]), session->counter); 
-			} 
-		} 
-		slac_debug (session, 0, __func__, "--> CM_SLAC_PARAM.CNF"); 
-		memset (message, 0, sizeof (* message)); 
-		EthernetHeader (& confirm->ethernet, session->PEV_MAC, channel->host, channel->type); 
-		HomePlugHeader1 (& confirm->homeplug, HOMEPLUG_MMV, (CM_SLAC_PARAM | MMTYPE_CNF)); 
-		memcpy (confirm->MSOUND_TARGET, broadcast, sizeof (confirm->MSOUND_TARGET)); 
-		confirm->NUM_SOUNDS = session->NUM_SOUNDS; 
-		confirm->TIME_OUT = session->TIME_OUT; 
-		confirm->RESP_TYPE = session->RESP_TYPE; 
-		memcpy (confirm->FORWARDING_STA, session->FORWARDING_STA, sizeof (confirm->FORWARDING_STA)); 
-		confirm->APPLICATION_TYPE = session->APPLICATION_TYPE; 
-		confirm->SECURITY_TYPE = session->SECURITY_TYPE; 
-		memcpy (confirm->RunID, session->RunID, sizeof (confirm->RunID)); 
-		confirm->CipherSuite = HTOLE16 ((uint16_t) (session->counter)); 
-		if (sendmessage (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0) 
-		{ 
-			return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
-		} 
-		return (0); 
-	} 
-	return (slac_debug (session, 0, __func__, "<-- CM_SLAC_PARAM.REQ ?")); 
-} 
-
-#endif
-
-
-
- - - diff --git a/docbook/evse_cm_start_atten_char.c.html b/docbook/evse_cm_start_atten_char.c.html deleted file mode 100644 index 70a102ea..00000000 --- a/docbook/evse_cm_start_atten_char.c.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - evse_cm_start_atten_char.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed evse_cm_start_atten_char (struct session * session, struct channel * channel, struct message * message);
- *
- *   slac.h
- *
- *   EVSE_HLE stores NUM_SOUNDS, TIME_OUT and FORWARDING_STA for use
- *   later in the SLAC session;
- *
- *   accept only CM_ATTEN_CHAR.IND with RunID that match the earlier
- *   CM_SLAC_PARAM.REQ;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EVSE_CM_START_ATTEN_CHAR_SOURCE
-#define EVSE_CM_START_ATTEN_CHAR_SOURCE
-
-#include <string.h>
-
-#include "../ether/channel.h"
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/flags.h"
-#include "../iso15118/slac.h"
-
-signed evse_cm_start_atten_char (struct session * session, struct channel * channel, struct message * message) 
-
-{ 
-	struct cm_start_atten_char_indicate * indicate = (struct cm_start_atten_char_indicate *) (message); 
-	if (readmessage (channel, message, HOMEPLUG_MMV, (CM_START_ATTEN_CHAR | MMTYPE_IND)) > 0) 
-	{ 
-		if (! memcmp (session->RunID, indicate->ACVarField.RunID, sizeof (session->RunID))) 
-		{ 
-			slac_debug (session, 0, __func__, "<-- CM_START_ATTEN_CHAR.IND"); 
-
-#if SLAC_DEBUG
-
-			if (_anyset (session->flags, SLAC_VERBOSE)) 
-			{ 
-				char string [256]; 
-				slac_debug (session, 0, __func__, "CM_START_ATTEN_CHAR.IND.APPLICATION_TYPE %d", indicate->APPLICATION_TYPE); 
-				slac_debug (session, 0, __func__, "CM_START_ATTEN_CHAR.IND.SECURITY_TYPE %d", indicate->SECURITY_TYPE); 
-				slac_debug (session, 0, __func__, "CM_START_ATTEN_CHAR.IND.ACVarField.NUM_SOUNDS %d", indicate->ACVarField.NUM_SOUNDS); 
-				slac_debug (session, 0, __func__, "CM_START_ATTEN_CHAR.IND.ACVarField.TIME_OUT %d", indicate->ACVarField.TIME_OUT); 
-				slac_debug (session, 0, __func__, "CM_START_ATTEN_CHAR.IND.ACVarField.RESP_TYPE %d", indicate->ACVarField.RESP_TYPE); 
-				slac_debug (session, 0, __func__, "CM_START_ATTEN_CHAR.IND.ACVarField.FORWARDING_STA %s", HEXSTRING (string, indicate->ACVarField.FORWARDING_STA)); 
-				slac_debug (session, 0, __func__, "CM_START_ATTEN_CHAR.IND.ACVarField.RunID %s", HEXSTRING (string, indicate->ACVarField.RunID)); 
-			} 
-
-#endif
-
-			if (indicate->APPLICATION_TYPE != session->APPLICATION_TYPE) 
-			{ 
-				slac_debug (session, session->exit, __func__, "%s: APPLICATION_TYPE", __func__); 
-			} 
-			if (indicate->SECURITY_TYPE != session->SECURITY_TYPE) 
-			{ 
-				slac_debug (session, session->exit, __func__, "%s: SECURITY_TYPE", __func__); 
-			} 
-			session->NUM_SOUNDS = indicate->ACVarField.NUM_SOUNDS; 
-			session->TIME_OUT = indicate->ACVarField.TIME_OUT; 
-			if (indicate->ACVarField.RESP_TYPE != session->RESP_TYPE) 
-			{ 
-				slac_debug (session, session->exit, __func__, "%s: RESP_TYPE", __func__); 
-			} 
-			memcpy (session->FORWARDING_STA, indicate->ACVarField.FORWARDING_STA, sizeof (session->FORWARDING_STA)); 
-			return (0); 
-		} 
-	} 
-	return (slac_debug (session, session->exit, __func__, "CM_START_ATTEN_CHAR.IND ?")); 
-} 
-
-#endif
-
-
-
- - - diff --git a/docbook/extra.c.html b/docbook/extra.c.html deleted file mode 100644 index c5c52077..00000000 --- a/docbook/extra.c.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - extra.c - - - - - - - - - -
-/*====================================================================*
- *
- *   signed extra (signed status, errno_t number, int argc, char const * arg []);
- *
- *   error.h
- *
- *   print error message plus excess argments on stdout;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef EXTRA_SOURCE
-#define EXTRA_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include "../tools/types.h"
-#include "../tools/error.h"
-
-signed extra (signed status, errno_t number, int argc, char const * argv [])
-
-{
-	extern char const *program_name;
-	if ((program_name) && (*program_name))
-	{
-		fprintf (stderr, "%s: ", program_name);
-	}
-	if (number)
-	{
-		fprintf (stderr, "%s: ", strerror (number));
-	}
-	fprintf (stderr, "Excess data: ");
-	while ((argc) && (* argv))
-	{
-		fprintf (stderr, "%s ", * argv);
-		argv++;
-		argc--;
-	}
-	fprintf (stderr, "\n");
-	fflush (stderr);
-	if (status)
-	{
-		exit (status);
-	}
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/fcs.c.html b/docbook/fcs.c.html deleted file mode 100644 index 4b9df06d..00000000 --- a/docbook/fcs.c.html +++ /dev/null @@ -1,686 +0,0 @@ - - - - - - fcs.c - - - - - - - - - -
-/*====================================================================*
- *
- *   fcs.c - ethernet frame check sequence functions
- *
- *   see http://www.csm.ornl.gov/~dunigan/crc.html for an explanation
- *   of the CRC-32 algorithm reportedly used by PKZip, Ethernet, FDDI
- *   and other popular protocols for error detection;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FCS_SOURCE
-#define FCS_SOURCE
-
-/*====================================================================*
- * system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-
-/*====================================================================*
- * variables;
- *--------------------------------------------------------------------*/
-
-static uint32_t CRCTable [256] =
-
-{
-	0x00000000,
-	0x77073096,
-	0xee0e612c,
-	0x990951ba,
-	0x076dc419,
-	0x706af48f,
-	0xe963a535,
-	0x9e6495a3,
-	0x0edb8832,
-	0x79dcb8a4,
-	0xe0d5e91e,
-	0x97d2d988,
-	0x09b64c2b,
-	0x7eb17cbd,
-	0xe7b82d07,
-	0x90bf1d91,
-	0x1db71064,
-	0x6ab020f2,
-	0xf3b97148,
-	0x84be41de,
-	0x1adad47d,
-	0x6ddde4eb,
-	0xf4d4b551,
-	0x83d385c7,
-	0x136c9856,
-	0x646ba8c0,
-	0xfd62f97a,
-	0x8a65c9ec,
-	0x14015c4f,
-	0x63066cd9,
-	0xfa0f3d63,
-	0x8d080df5,
-	0x3b6e20c8,
-	0x4c69105e,
-	0xd56041e4,
-	0xa2677172,
-	0x3c03e4d1,
-	0x4b04d447,
-	0xd20d85fd,
-	0xa50ab56b,
-	0x35b5a8fa,
-	0x42b2986c,
-	0xdbbbc9d6,
-	0xacbcf940,
-	0x32d86ce3,
-	0x45df5c75,
-	0xdcd60dcf,
-	0xabd13d59,
-	0x26d930ac,
-	0x51de003a,
-	0xc8d75180,
-	0xbfd06116,
-	0x21b4f4b5,
-	0x56b3c423,
-	0xcfba9599,
-	0xb8bda50f,
-	0x2802b89e,
-	0x5f058808,
-	0xc60cd9b2,
-	0xb10be924,
-	0x2f6f7c87,
-	0x58684c11,
-	0xc1611dab,
-	0xb6662d3d,
-	0x76dc4190,
-	0x01db7106,
-	0x98d220bc,
-	0xefd5102a,
-	0x71b18589,
-	0x06b6b51f,
-	0x9fbfe4a5,
-	0xe8b8d433,
-	0x7807c9a2,
-	0x0f00f934,
-	0x9609a88e,
-	0xe10e9818,
-	0x7f6a0dbb,
-	0x086d3d2d,
-	0x91646c97,
-	0xe6635c01,
-	0x6b6b51f4,
-	0x1c6c6162,
-	0x856530d8,
-	0xf262004e,
-	0x6c0695ed,
-	0x1b01a57b,
-	0x8208f4c1,
-	0xf50fc457,
-	0x65b0d9c6,
-	0x12b7e950,
-	0x8bbeb8ea,
-	0xfcb9887c,
-	0x62dd1ddf,
-	0x15da2d49,
-	0x8cd37cf3,
-	0xfbd44c65,
-	0x4db26158,
-	0x3ab551ce,
-	0xa3bc0074,
-	0xd4bb30e2,
-	0x4adfa541,
-	0x3dd895d7,
-	0xa4d1c46d,
-	0xd3d6f4fb,
-	0x4369e96a,
-	0x346ed9fc,
-	0xad678846,
-	0xda60b8d0,
-	0x44042d73,
-	0x33031de5,
-	0xaa0a4c5f,
-	0xdd0d7cc9,
-	0x5005713c,
-	0x270241aa,
-	0xbe0b1010,
-	0xc90c2086,
-	0x5768b525,
-	0x206f85b3,
-	0xb966d409,
-	0xce61e49f,
-	0x5edef90e,
-	0x29d9c998,
-	0xb0d09822,
-	0xc7d7a8b4,
-	0x59b33d17,
-	0x2eb40d81,
-	0xb7bd5c3b,
-	0xc0ba6cad,
-	0xedb88320,
-	0x9abfb3b6,
-	0x03b6e20c,
-	0x74b1d29a,
-	0xead54739,
-	0x9dd277af,
-	0x04db2615,
-	0x73dc1683,
-	0xe3630b12,
-	0x94643b84,
-	0x0d6d6a3e,
-	0x7a6a5aa8,
-	0xe40ecf0b,
-	0x9309ff9d,
-	0x0a00ae27,
-	0x7d079eb1,
-	0xf00f9344,
-	0x8708a3d2,
-	0x1e01f268,
-	0x6906c2fe,
-	0xf762575d,
-	0x806567cb,
-	0x196c3671,
-	0x6e6b06e7,
-	0xfed41b76,
-	0x89d32be0,
-	0x10da7a5a,
-	0x67dd4acc,
-	0xf9b9df6f,
-	0x8ebeeff9,
-	0x17b7be43,
-	0x60b08ed5,
-	0xd6d6a3e8,
-	0xa1d1937e,
-	0x38d8c2c4,
-	0x4fdff252,
-	0xd1bb67f1,
-	0xa6bc5767,
-	0x3fb506dd,
-	0x48b2364b,
-	0xd80d2bda,
-	0xaf0a1b4c,
-	0x36034af6,
-	0x41047a60,
-	0xdf60efc3,
-	0xa867df55,
-	0x316e8eef,
-	0x4669be79,
-	0xcb61b38c,
-	0xbc66831a,
-	0x256fd2a0,
-	0x5268e236,
-	0xcc0c7795,
-	0xbb0b4703,
-	0x220216b9,
-	0x5505262f,
-	0xc5ba3bbe,
-	0xb2bd0b28,
-	0x2bb45a92,
-	0x5cb36a04,
-	0xc2d7ffa7,
-	0xb5d0cf31,
-	0x2cd99e8b,
-	0x5bdeae1d,
-	0x9b64c2b0,
-	0xec63f226,
-	0x756aa39c,
-	0x026d930a,
-	0x9c0906a9,
-	0xeb0e363f,
-	0x72076785,
-	0x05005713,
-	0x95bf4a82,
-	0xe2b87a14,
-	0x7bb12bae,
-	0x0cb61b38,
-	0x92d28e9b,
-	0xe5d5be0d,
-	0x7cdcefb7,
-	0x0bdbdf21,
-	0x86d3d2d4,
-	0xf1d4e242,
-	0x68ddb3f8,
-	0x1fda836e,
-	0x81be16cd,
-	0xf6b9265b,
-	0x6fb077e1,
-	0x18b74777,
-	0x88085ae6,
-	0xff0f6a70,
-	0x66063bca,
-	0x11010b5c,
-	0x8f659eff,
-	0xf862ae69,
-	0x616bffd3,
-	0x166ccf45,
-	0xa00ae278,
-	0xd70dd2ee,
-	0x4e048354,
-	0x3903b3c2,
-	0xa7672661,
-	0xd06016f7,
-	0x4969474d,
-	0x3e6e77db,
-	0xaed16a4a,
-	0xd9d65adc,
-	0x40df0b66,
-	0x37d83bf0,
-	0xa9bcae53,
-	0xdebb9ec5,
-	0x47b2cf7f,
-	0x30b5ffe9,
-	0xbdbdf21c,
-	0xcabac28a,
-	0x53b39330,
-	0x24b4a3a6,
-	0xbad03605,
-	0xcdd70693,
-	0x54de5729,
-	0x23d967bf,
-	0xb3667a2e,
-	0xc4614ab8,
-	0x5d681b02,
-	0x2a6f2b94,
-	0xb40bbe37,
-	0xc30c8ea1,
-	0x5a05df1b,
-	0x2d02ef8d
-};
-
-/*====================================================================*
- *
- *   uint32_t ReflectBits (uint32_t value, uint32_t bits);
- *
- *   return the bitwise mirror image of an integer value;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#if 0
-
-static uint32_t ReflectBits (uint32_t value, uint32_t bits)
-
-{
-	uint32_t image = 0;
-	uint32_t bit;
-	for (bit = 0; bit < bits; bit++)
-	{
-		if (value & 1)
-		{
-			image |= 1 << (bits - bit - 1);
-		}
-		value >>= 1;
-	}
-	return (image);
-}
-
-#endif
-
-/*====================================================================*
- *
- *   void InitCRCTable (void);
- *
- *   write frame control sequence table with values; this function is
- *   only needed to populate an empty CRCTable;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#if 0
-
-static void InitCRCTable (uint32_t CRCTable [])
-
-{
-	extern uint32_t CRCTable [];
-	uint32_t word;
-	uint32_t bit;
-	for (word = 0; word < 256; word++)
-	{
-		uint32_t crc = ReflectBits (word, 8) << 24;
-		for (bit = 0; bit < 8; bit++)
-		{
-			crc = (crc << 1) ^ ((crc & 0x80000000)? 0x04c11db7: 0);
-		}
-		CRCTable [word] = ReflectBits (crc, 32);
-	}
-	return;
-}
-
-#endif
-
-/*====================================================================*
- *
- *   uint32_t ComputeCRC (uint8_t buffer [], uint32_t length);
- *
- *
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-uint32_t ComputeCRC (uint8_t buffer [], uint32_t length)
-
-{
-	extern uint32_t CRCTable [];
-	uint32_t crc = ~0;
-	while (length--)
-	{
-		crc = (crc >> 8) ^ CRCTable [(crc & 0xff) ^ *buffer++];
-	}
-	return (~crc);
-}
-
-/*====================================================================*
- *
- *   int VerifyCRC (uint8_t buffer [], uint32_t length, uint32_t crc);
- *
- *
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-int VerifyCRC (uint8_t buffer [], uint32_t length, uint32_t crc)
-
-{
-	return (crc = ComputeCRC (buffer, length));
-}
-
-/*====================================================================*
- *
- *   int main (int argc, const char * argv [])
- *
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#if 0
-#include <stdio.h>
-
-static uint8_t frame [192]=
-
-{
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x01,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x02,
-	0x08,
-	0x00,
-	0x45,
-	0x60,
-	0x00,
-	0xAE,
-	0x00,
-	0x00,
-	0x40,
-	0x00,
-	0x40,
-	0x11,
-	0xDF,
-	0xB9,
-	0xAC,
-	0x11,
-	0x01,
-	0x02,
-	0xAC,
-	0x11,
-	0x01,
-	0x01,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x9A,
-	0xA4,
-	0x94,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00,
-	0x00
-};
-
-int main (int argc, const char * argv [])
-
-{
-	uint32_t size = sizeof (frame);
-	uint32_t word;
-	uint8_t blah [] =
-	{
-		0x00,
-		0xB0,
-		0x52,
-		0x11,
-		0x22,
-		0x33,
-		0x00,
-		0x0A,
-		0x5E,
-		0x5A,
-		0x27,
-		0x38,
-		0x88,
-		0xE1,
-		0x00,
-		0x28,
-		0xA0,
-		0x00,
-		0xB0,
-		0x52,
-		0x02
-	};
-	while (size > 160)
-	{
-		word = ComputeCRC (frame, size);
-		printf ("%d %08X\n", size, word);
-		size -= sizeof (word);
-	}
-	size = 21;
-	word = ComputeCRC (blah, size);
-	printf ("%d %08X\n", size, word);
-	return (0);
-}
-
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/fdchecksum32.c.html b/docbook/fdchecksum32.c.html deleted file mode 100644 index 2a090e73..00000000 --- a/docbook/fdchecksum32.c.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - fdchecksum32.c - - - - - - - - - -
-/*====================================================================*
- *
- *   uint32_t fdchecksum32 (int fd, size_t extent, uint32_t checksum);
- *
- *   memory.h
- *
- *   return the 32-bit checksum of a file region starting from the
- *   current file position; extent is specified in bytes but will be
- *   rounded to a multiple of four bytes;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FDCHECKSUM32_SOURCE
-#define FDCHECKSUM32_SOURCE
-
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-
-uint32_t fdchecksum32 (int fd, register size_t extent, register uint32_t checksum)
-
-{
-	uint32_t memory;
-	while (extent >= sizeof (memory))
-	{
-		if (read (fd, &memory, sizeof (memory)) != sizeof (memory))
-		{
-			return (-1);
-		}
-		extent -= sizeof (memory);
-		checksum ^= memory;
-	}
-	return (~checksum);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/fdmanifest.c.html b/docbook/fdmanifest.c.html deleted file mode 100644 index 0cf532e5..00000000 --- a/docbook/fdmanifest.c.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - fdmanifest.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed fdmanifest (signed fd, char const * filename, struct nvm_header2 * nvm_header, unsigned module);
- *
- *   given the manifest image header and a file positioned to the
- *   start of the manifest image, extract the manifest and print
- *   it on stdout in human readable form;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FDMANIFEST_SOURCE
-#define FDMANIFEST_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <errno.h>
-
-#include "../tools/endian.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../nvm/nvm.h"
-
-signed fdmanifest (signed fd, char const * filename, struct nvm_header2 * nvm_header, unsigned module)
-
-{
-	off_t extent = LE32TOH (nvm_header->ImageLength);
-	void * memory = malloc (extent);
-	if (!memory)
-	{
-		error (1, 0, FILE_CANTLOAD, filename);
-	}
-	if (read (fd, memory, extent) != (signed)(extent))
-	{
-		error (1, errno, FILE_CANTREAD, filename);
-	}
-	if (lseek (fd, (off_t)(0) - extent, SEEK_CUR) == -1)
-	{
-		error (1, errno, FILE_CANTSEEK, filename);
-	}
-	printf ("------- %s (%d) -------\n", filename, module);
-	if (manifest (memory, extent))
-	{
-		error (1, 0, "Bad manifest: %s", filename);
-	}
-	free (memory);
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/files.h.html b/docbook/files.h.html deleted file mode 100644 index 1c31a891..00000000 --- a/docbook/files.h.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - files.h - - - - - - - - - -
-/*====================================================================*
- *
- *   files.h - custom filesystem definitions and declarations;
- *
- *   this file is a subset of the original that includes only those
- *   definitions and declaration needed for toolkit programs;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FILES_HEADER
-#define FILES_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/types.h"
-
-/*====================================================================*
- *   path and file extenders;
- *--------------------------------------------------------------------*/
-
-#ifdef WIN32
-#define PATH_C_EXTENDER '\\'
-#define FILE_C_EXTENDER '.'
-#else
-#define PATH_C_EXTENDER '/'
-#define FILE_C_EXTENDER '.'
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#define FILE_CANTSTAT "%s can't stat %s", __func__
-#define FILE_CANTOPEN "%s can't open %s", __func__
-#define FILE_CANTHOME "%s can't home %s", __func__
-#define FILE_CANTSIZE "%s can't size %s", __func__
-#define FILE_CANTSEEK "%s can't seek %s", __func__
-#define FILE_CANTREAD "%s can't read %s", __func__
-#define FILE_CANTLOAD "%s can't load %s", __func__
-#define FILE_CANTEDIT "%s can't edit %s", __func__
-#define FILE_CANTSAVE "%s can't save %s", __func__
-#define FILE_CANTSPAN "%s won't span %s", __func__
-#define FILE_WONTREAD "%s won't read %s", __func__
-
-/*====================================================================*
- *   file create and access modes;
- *--------------------------------------------------------------------*/
-
-#ifdef WIN32
-#define FILE_FILEMODE S_IREAD|S_IWRITE
-#else
-#define FILE_FILEMODE S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH
-#define O_BINARY 0
-#endif
-
-/*====================================================================*
- *   functions;
- *--------------------------------------------------------------------*/
-
-FILE *efopen (char const *filename, char const *openmode);
-FILE *efreopen (char const *filename, char const *openmode, FILE *fp);
-bool checkfilename (char const * string);
-char const * filepart (char const * string);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/firmware-6000-boot.xml b/docbook/firmware-6000-boot.xml deleted file mode 100644 index 5f2ea866..00000000 --- a/docbook/firmware-6000-boot.xml +++ /dev/null @@ -1,98 +0,0 @@ -
- - Boot from Host (INT6000) - - - The Boot from Host operation downloads a firmware image and PIB image from the local host and starts firmware execution. The process is initiated by the INT6000 Bootloader following a device reset. The Bootloader passes control to the INT6000 Softloader to negotiate with the local host. The process therefore requires Softloader aware software running on the local host in order to complete. - - - The device does not have a unique hardware address until the firmware starts and assigns one. Until that time, the Softloader accepts messages addressed to 00:B0:52:00:00:01. In addition, the Softloader does not know the hardware address of the local host and so it addresses VS_HST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not forwarded over powerline. - -
- - Boot from Host (INT6000) - -| [03] - [05] |<------- VS_HST_ACTION.RSP ---------| [04] - | | - [07] |<------- VS_WR_MOD.REQ -------------| [07] - [07] |-------- VS_WR_MOD.CNF ------------>| [07] - [07] |<-----------------------------------| [07] - [07] |----------------------------------->| [07] - | | - [08] |<------- VS_WR_MOD.REQ -------------| [08] - [08] |-------- VS_WR_MOD.CNF ------------>| [08] - [08] |<-----------------------------------| [08] - [08] |----------------------------------->| [08] - | | - [10] |<------- VS_ST_MAC.REQ -------------| [09] - [11] |-------- VS_ST_MAC.CNF ------------>| [12] - - ]]> -
- - - - The INT6000 Bootloader automatically starts after device reset. It reads the Softloader from NVRAM, writes it into SDRAM and starts execution. The Softloader then manages the Boot from Host process. - - - - - The Softloader broadcasts a VS_HST_ACTION.IND message every 500 milliseconds to request the download of runtime firmware and PIB. The HOST_ACTION_REQ field of the message is 0x00 in this case. The message source address if 00:B0:52:00:00:01 as explained above. - - - - - The local host receives the VS_HST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine action requested. It may then elect to service the request or ignore it. On a single-host system, the host must service the request or the device will not start. On a multi-host system, one of the hosts must elect to service the request or the device will not start. - - - - - The local host sends a VS_HST_ACTION.RSP message to the device to indicate the ability and willingness to service the request. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. - - - - - The Softloader receives the VS_HST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative status, the Softloader stops sending VS_HST_ACTION messages and waits indefinitely for the firmware image and PIB. - - - - - The local host determines which firmware image and PIB to download. In some cases there may be no choice. In other cases, there may be a choice between default and custom software or between current and upgraded software. This is a principle design issue to consider. - - - - - The local host downloads a firmware image to the device by sending VS_WR_MOD.REQ messages to the device and waiting for a VS_WR_MEM.CNF messages from the device after each request. Each message contains an image segment, the memory offset, the segment length and the checksum used to monitor and manage download progress. If a single transaction fails, the local host should detect it and repeat it. - - - - - The local host downloads a PIB to the device by sending VS_WR_MOD.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each request. Each message contains an image segement, the memory offset, the segment length and the checksum used to monitor and manage download progress. If a single transaction fails, the local host should detect it and repeat it. - - - - - The local host starts execution of the downloaded firmware by sending a VS_ST_MAC.REQ message to the device. The message contains the start address for the firmware. - - - - - The Softloader receives the VS_ST_MAC.REQ from the local host, validates the content. - - - - The Softloader sends a VS_ST_MAC.CNF message to the local host to indicate an ability or willingness to start execution. Assuming an ability and willingness, the Softloader immediately starts firmware execution which relinquishes device control to the firmware. - - - - - The local host receives the VS_ST_MAC.CNF message from the device, inspects the MSTATUS field and acts accordingly. Assuming an affirmative status, this process terminates. - - - -
diff --git a/docbook/firmware-6000-flash.xml b/docbook/firmware-6000-flash.xml deleted file mode 100644 index 06c91b9b..00000000 --- a/docbook/firmware-6000-flash.xml +++ /dev/null @@ -1,66 +0,0 @@ -
- - Upgrade Device (INT6000/INT6300/INT6400) - - - The Upgrade Device operation downloads firmware and/or PIB from a remote host to an Atheros device for permanent storage and immediate execution. The device determines where and how it will store the information based on the availability of onboard flash memory. If the device has dedicated flash memory then it will store the firmware and PIB there and reset itself; otherwise, it will hand the firmware and PIB to the local host for storage and the local host will reset the device. The reset ensures that new firmware and PIB take immediate effect once they are saved. This operation requires custom software on the remote host and Atheros firmware on the device. - -
- - Upgrade Device (INT6000/INT6300/INT6400) - - | [01] - [01] |<------- VS_WR_MOD.CNF -------------| [01] - [01] |----------------------------------->| [01] - [01] |<-----------------------------------| [01] - | | - [02] |-------- VS_WR_MOD.REQ ------------>| [02] - [02] |<------- VS_WR_MOD.CNF -------------| [02] - [02] |----------------------------------->| [02] - [02] |<-----------------------------------| [02] - | | - [03] |-------- VS_MOD_NVM.REQ ----------->| [04] - [05] |<------- VS_MOD_NVM.CNF ------------| [04] - | | [06] - -]]> -
- - - - Optionally, the remote host writes firmware to the device by sending a series of VS_WR_MOD.REQ messages and waiting for a VS_WR_MOD.CNF message after each one. The message MODULEID field is set to 0x01 for this operation. - - - - - Optionally, the remote host writes the PIB to the device by sending VS_WR_MOD.REQ messages and waiting for a VS_WR_MOD.CNF message after each one. The MODULEID is set to 0x02 for this operation. - - - - - The remote host commits the firmware and/or PIB to persistent storage by sending a VS_MOD_NVM.REQ message and waiting for a VS_MOD_NVM.CNF message. - - - - - The device received the VS_MOD_NVM.REQ and sends a VS_MOD_NVM.CNF message to the remote host. - - - - - The remote host receives the VS_MOD_NVM.CNF and proceeds with other activity. The remote host does not know or care that the device may not have dedicated flash memory available. - - - - - The device determines where and how to store the information. If dedicated flash memory is available, the device writes the downloaded firmware and PIB to flash memory and performs a software reset that results in a normal Boot from Flash operation. If no dedicated flash memory is available, the device initiates an Update Local Host operation. - - - - - The device does not notify the remote host when the upgrade operation completes. It is therefore incumbent on the remote host to determine ultimate success or failure by polling the device, possiby using a VS_SW_VER.REQ message, until a response is received. The complete upgrade operation can take from 20 seconds to 45 seconds depending on device configuration. - -
diff --git a/docbook/firmware-6000-upload.xml b/docbook/firmware-6000-upload.xml deleted file mode 100644 index a004b783..00000000 --- a/docbook/firmware-6000-upload.xml +++ /dev/null @@ -1,76 +0,0 @@ -
- - Update Local Host (INT6000/INT6300/INT6400) - - - The Update Local Host operation transfers a firmware image and/or PIB image from the device to the local host for permanent storage. After the firmware and PIB are stored, the local host will reset the device and the device will retrieve parameters and firmware using the Boot from Host operation described in the next section. - - - The firmware may initiate this operation after a remote host has downloaded new firmware or PIB and issued a VS_MOD_NVM.REQ to the device, the device has been asked to restore factory default settings or the firmware has dynamically altered the runtime PIB in some way. Consequently, the device will be reset by the host in each case. - - - The device initiates this operation to complete an Upgrade Device operation when the device has no dedicated flash memory onboard. This operation requires running Atheros firmware on the device and custom software on the local host. - -
- - Update Local Host (INT6000/INT6300/INT6400) - - | [01] - [03] |<------- VS_HOST_ACTION.RSP --------| [02] - | | - [04] |<------- VS_RD_MOD.REQ -------------| [04] - [04] |-------- VS_RD_MOD.CNF ------------>| [04] - [04] |<-----------------------------------| [04] - [04] |----------------------------------->| [04] - | | - [05] |<------- VS_RD_MOD.REQ -------------| [05] - [05] |-------- VS_RD_MOD.CNF ------------>| [05] - [05] |<-----------------------------------| [05] - [05] |----------------------------------->| [05] - | | - [06] |<------- VS_RS_DEV.REQ -------------| [06] - [07] |-------- VS_RS_DEV.CNF ------------>| [07] - -]]> -
- - - - The runtime firmware initiates this operation by broadcasting VS_HOST_ACTION.IND messages every 500 milliseconds. The HOST_ACTION_REQ field of the message can be either 0x01, 0x02 or 0x03 to indicate that a firmware image, a parameter block image or both are ready for upload by the local host. - - - - - The local host sends a VS_HOST_ACTION.RSP message to the device to indicate the ability and willingness to upload the information. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. - - - - - Assuming an affirmative response, the device stops broadcasting and will wait indefinitely for local host action. - - - - - Optionally, the local host reads the firmware image from the device by sending a series of VS_RD_MOD.REQ messages to the device and waiting for a VS_RD_MOD.CNF message after each one. The message MODULEID field is set to 0x01 for this operation. - - - - - Optionally, the local host reads the PIB from the device by sending a series of VS_RD_MOD.REQ messages to the device and waiting for a VS_RD_MOD.CNF message after each one. The message MODULEID field is set to 0x02 for this operation. - - - - - The local host sends a VS_RS_DEV.REQ message to the device to initiate a firmware reboot. - - - - - The device sends a VS_RS_DEV.CNF to the host and performs a software reset. This forces a Boot from Host. - - - -
diff --git a/docbook/firmware-6300-boot.xml b/docbook/firmware-6300-boot.xml deleted file mode 100644 index 9621a0cb..00000000 --- a/docbook/firmware-6300-boot.xml +++ /dev/null @@ -1,119 +0,0 @@ -
- - Boot from Host (INT6300) - - - The boot-from-host operation downloads SDRAM configuration information, runtime parameters and runtime firmware from a local host and starts firmware execution. This method is initiated by the device bootloader after reset reset if the device has no flash memory, blank flash memory or corrupted flash memory. The method requires the bootloader aware software running on the local host to detect and service VS_HOST_ACTION messages from the device. - - - The INT6300 boot-from-host method is similar to the INT6000 method but it has an extra stage to download SDRAM configuration parameters and it uses VS_WR_MEM messages to download runtime parameters and firmware instead of VS_WR_MOD messages. The VS_WR_MEM messages write directly to SDRAM and an VS_ST_MAC message is needed to start firmware execution. Once the firmware is running, another method is used to write runtime parameters and firmware to flash memory. - - - The INT6300 does not have a unique hardware address until runtime firmware starts and assigns one from the runtime parameter block. Until that time, the bootloader will accept messages addressed to 00:B0:52:00:00:01. In addition, the bootloader does not know the hardware address of the local host and so it addresses VS_HOST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline. - -
- - boot-from-host (INT6300) - - | [03] - [05] |<------- VS_HOST_ACTION.RSP --------| [04] - | | - [07] |<------- VS_SET_SDRAM.REQ ----------| [06] - [07] |-------- VS_SET_SDRAM.CNF --------->| [08] - | | [09] - [10] |<------- VS_WR_MEM.REQ -------------| [10] - [10] |-------- VS_WR_MEM.CNF ------------>| [10] - [10] |<-----------------------------------| [10] - [10] |----------------------------------->| [10] - | | - [11] |<------- VS_WR_MEM.REQ -------------| [11] - [11] |-------- VS_WR_MEM.CNF ------------>| [11] - [11] |<-----------------------------------| [11] - [11] |----------------------------------->| [11] - | | - [13] |<------- VS_ST_MAC.REQ -------------| [12] - [14] |-------- VS_ST_MAC.CNF ------------>| [15] - - ]]> -
- - - - The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into SDRAM and start execution. If it succeeds then normal operation begins and no further action is required. If it fails, for any reason, then the bootloader starts the boot-from-host process. - - - - - The bootloader broadcasts VS_HOST_ACTION.IND with HOST_ACTION_REQ set to 0x04 to indicate that configuration is required. The destination address is FF:FF:FF:FF:FF:FF and the source address is 00:B0:52:00:00:01 as explained above. This message is sent every 10 seconds which differs from that of other chips. - - - - - The host receives the VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the action requested. On a single-host system, the local host must elect to service the request or the device will not start. On a multi-host system, one of the hosts must elect to service the request of the device will not start. - - - - - The host sends a VS_HOST_ACTION.RSP message to the device to indicate an ability and willingness to service the request. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. - - - - - The bootloader receives the VS_HOST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative response, the bootloader stops broadcasting VS_HOST_ACTION.IND and waits indefinitely for SDRAM configuration information from the host. - - - - - The host sends a VS_SET_SDRAM.REQ message to the device containing an SDRAM configuration block and the block checksum. - - - - - The bootloader receives the VS_SET_SDRAM.REQ, validates the content, initializes SDRAM parameters and sends a VS_SET_SDRAM.CNF message to the servicing host to indicate either success or failure. - - - - - The local host receives the VS_SET_SDRAM.CNF and inspects the MSTATUS field for success or failure. Assuming success, the local host waits indefinitely for further requests from the device. - - - - - The local host determines which parameter block and firmware image to download. In some cases there may be no choice. In other cases, there may be a choice between default and custom software or between current and upgraded software. This is a principle design issue to consider. - - - - - The local host downloads the firmware image to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF messages from the device after each request. Each message contains an image segment, the memory offset, the segment length and the checksum used to monitor and manage download progress. It a single transaction fails, the local host should detect it and repeat it. - - - - - The local host downloads a parameter block to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each request. Each message contains an image segment, the memory offset, the segment length and the checksum used to monitor and manage download progress. If a single transaction fails, the local host should detect it and repeat it. - - - - - The local host starts firmware execution by sending a VS_ST_MAC.REQ message to the device. The message contains the firmware start address. - - - - - The bootloader receives the VS_ST_MAC.REQ from the local host, validates the content. - - - - The device sends a VS_ST_MAC.CNF message to indicate an ability or willingness to start firmware execution. The device immediately starts firmware execution which relinquishes device control to the firmware. It can take 5 to 10 seconds for the firmware to start. - - - - - The host receives the VS_ST_MAC.CNF message from the device, inspects the MSTATUS field and acts accordingly. An afffirmative indication means that the firmware will start executing on the device in 5 to 10 seconds. Once the firmware starts, future messages will contain the unique hardware address for the device. - - - -
diff --git a/docbook/firmware-6400-boot.xml b/docbook/firmware-6400-boot.xml deleted file mode 100644 index c1d3a830..00000000 --- a/docbook/firmware-6400-boot.xml +++ /dev/null @@ -1,174 +0,0 @@ -
- - Boot from Host (INT6400) - - - The INT6400 boot-from-host operation downloads and executes a memory configuration applet then downloads runtime parameters and firmware from a local host and starts firmware execution. This method is initiated by the INT6400 bootloader after reset on a device having no flash memory, blank flash memory or corrupted flash memory. The method requires bootloader aware software running on the local host in order to complete. - - - The INT6400 boot-from-host method is similar to the INT6300 boot-from-host method but it downloads and executes an SDRAM configuration applet instead of downloading SDRAM parameters. The applet is downloaded and executed using the same mechanism as runtime firmware. The applet executes and returns to the bootloader when done. The bootloader then continues to drive the boot process using VS_HOST_ACTION messages. - - - The INT6400 boot-from-host method will work for AR7400 and QCA7420 chipsets but will not work on successive chipsets. Customers should adopt or implement the AR7400 boot-from-host method, instead of this one, to avoid building obsolete products. - - - The INT6400 does not have a unique hardware address until the firmware starts and assigns one from the parameter information block. Until that time, the bootloader will only acknowledge messages addressed to 00:B0:52:00:00:01. In addition, the bootloader does not know the hardware address of the local host and so it addresses VS_HOST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline. - -
- - Boot from Host (INT6400) - -| [03] - [05] |<------- VS_HOST_ACTION.RSP --------| [04] - | | - [06] |<------- VS_WR_MEM.REQ -------------| [06] - [06] |-------- VS_WR_MEM.CNF ------------>| [06] - [06] |<-----------------------------------| [06] - [06] |----------------------------------->| [06] - | | - [08] |<------- VS_ST_MAC.REQ -------------| [07] - [09] |-------- VS_ST_MAC.CNF ------------>| [10] - [11] | | - [12] |-------- VS_HOST_ACTION.IND ------->| [13] - [15] |<------- VS_HOST_ACTION.RSP --------| [14] - | | - | | [16] - | | - [17] |<------- VS_WR_MEM.REQ -------------| [17] - [17] |-------- VS_WR_MEM.CNF ------------>| [17] - [17] |<-----------------------------------| [17] - [17] |----------------------------------->| [17] - | | - [18] |<------- VS_WR_MEM.REQ -------------| [18] - [18] |-------- VS_WR_MEM.CNF ------------>| [18] - [18] |<-----------------------------------| [18] - [18] |----------------------------------->| [18] - | | - [20] |<------- VS_ST_MAC.REQ -------------| [19] - [21] |-------- VS_ST_MAC.CNF ------------>| [22] - - ]]> -
- - - - The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into SDRAM and start execution. If it succeeds then normal operation begins and no futher action is required. If it fails, for any reason, then the bootloader initiates the boot-from-host sequence. - - - - - The bootloader broadcasts VS_HOST_ACTION.IND with HOST_ACTION_REQ set to 0x04 to request configuration. The destination address is FF:FF:FF:FF:FF:FF and source address is 00:B0:52:00:00:01 as explained above. This message is sent every 500 milliseconds which differs from that of other chips. - - - - - The local host receives the VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the appropriate action. On a single-host system, the lone host must service the request or the device will not start. On a multi-host system, one host must elect to service the request of the device will not start. - - - - - The local host sends VS_HOST_ACTION.RSP to silence the bootloader or indicate the ability and willingness to service the request. The destination address must be 00:B0:52:00:00:01 and the source address is that of the host interface. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. - - - - - The bootloader receives the VS_HOST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative response, the bootloader stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to download a configuation applet and start execution. - - - - - The host downloads the memory control applet to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each one. Each message contains an image segment and the segment memory offset, length and checksum. These values are used to monitor and manage download progress. If a transaction fails, the host can detect it and should repeat it. - - - - - The host starts execution of the memory control applet by sending a VS_ST_MAC.REQ message to the device. The message contains the applet load address, length, checksum and start address. These values are often obtained from an NVM file image header. - - - - - - The bootloader receives the VS_ST_MAC.REQ from the host and validates the contents. - - - - - The bootloader sends a VS_ST_MAC.CNF message to the host indicating the ability and willingness to start applet execution. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. - - - - - The host receives the VS_ST_MAC.CNF message from the device and evaluates the MSTATUS field. On affirmative, the host waits for further requests from the device. On negative, the host may attempt another start or another download followed by a start or attempt to alert a human. - - - - - The bootloader starts applet execution. The applet configures memory, runs to completion and returns to the Bootloader. - - - - - The bootloader broadcasts a VS_HOST_ACTION.IND message every 500 milliseconds to request runtime firmware and parameter download. The message destination address is FF:FF:FF:FF:FF:FF and source address is 00:B0:52:00:00:01 as explained above. The HOST_ACTION_REQ field is set to 0x00. - - - - - The host receives the VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the requested action. On a single-host system, the lone host must service the request or the device will not start. On a multi-host system, one host must elect to service the request of the device will not start. - - - - - The host sends a VS_HOST_ACTION.RSP message to the device to indicate the ability and willingness to service the request. The MSTATUS field is set to 0x00 for affirmative and 0x01 for negative. - - - - - The bootloader receives the VS_HOST_ACTION.RSP from the host and inspects the MSTATUS field. On affirmative response, the bootloader stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the host to download the runtime firmware and parameters and start execution. - - - - - The host determines which firmware and parameter image to download. In some cases there may be no choice. In other cases, there may be a choice between default and custom images or between current and upgraded images. This is a principle design issue to consider. - - - - - The host downloads the firmware image to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each one. Each message contains an image segment and the segment memory offset, length and checksum. These values are used to monitor and manage download progress. If a transaction fails, the local host can detect it and should repeat it. - - - - - The host downloads the parameter block to the device by sending VS_WR_MEM.REQ messages to the device and waiting for a VS_WR_MEM.CNF message from the device after each one. Each message contains an image segment and the segment memory offset, length and checksum. These values are used to monitor and manage download progress. If a transaction fails, the local host can detect it and should repeat it. - - - - - The host starts runtime firmware execution by sending a VS_ST_MAC.REQ message to the device. The message contains the firmware load address, length, checksum and start address. These values are often obtained from an NVM file image header. - - - - - The bootloader receives the VS_ST_MAC.REQ from the host and validates the content. - - - - - The bootloader sends a VS_ST_MAC.CNF message to indicate the ability or willingness to start firmware execution. - - - - - The host receives the VS_ST_MAC.CNF message from the device, inspects the MSTATUS field and acts accordingly. - - - - - The bootloader starts runtime firmware execution. The firmware reads and validates the parameter block then assumes full control of the device. It can take several seconds for firmware start to be evident. Once the firmware starts, any future VS_HOST_ACTION messages will contain the unique hardware address for the device. - - - -
diff --git a/docbook/firmware-7400-boot.xml b/docbook/firmware-7400-boot.xml deleted file mode 100644 index 7c14e931..00000000 --- a/docbook/firmware-7400-boot.xml +++ /dev/null @@ -1,175 +0,0 @@ -
- - Boot from Host (AR7400) - - - The AR7400 boot-from-host method downloads and executes a device configuration applet then downloads runtime parameters and firmware from a local host and starts firmware execution. This method is initiated by the Bootloader after reset on a device having no flash memory, blank flash memory or corrupted flash memory. The method requires Bootloader aware software running on the local host in order to complete. - - - The AR7400 boot-from-host method is similar to the INT6400 boot-from-host method but it uses the VS_WRITE_AND_EXECUTE message instead of the VS_WR_MEM message write into SDRAM and start firmware execution. This eliminates the need for the VS_ST_MAC message. The VS_WR_MEM and VS_ST_MAC message types will no longer be recognized by bootloaders after the QCA7420 chipset. - - - The AR7400 boot-from-host method works on AR6400 and will continue to work on QCA7420 and planned successors. Customers should implement this boot-from-host method now to avoid building obsolete products. - - - The AR7400 does not have a unique hardware address until the firmware starts and assigns one read from the PIB. Until that time, the Bootloader will only acknowledge messages addressed to 00:B0:52:00:00:01. In addition, the Bootloader does not know the hardware address of the local host and so it addresses all VS_HOST_ACTION messages to FF:FF:FF:FF:FF:FF; however, these messages are not transmitted over the powerline. - -
- - Boot from Host (AR7400) - -| [03] - [05] |<------- VS_HOST_ACTION.RSP --------| [04] - | | [06] - |<---- VS_WRITE_AND_EXECUTE.REQ -----| [07] - [08] |----- VS_WRITE_AND_EXECUTE.CNF ---->| - |<-----------------------------------| [09] - [10] |----------------------------------->| [11] - [12] | | - [13] |-------- VS_HOST_ACTION.IND ------->| [14] - [16] |<------- VS_HOST_ACTION.RSP --------| [15] - | | [16] - |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [17] - [18] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->| - |<-----------------------------------| [19] - [20] |----------------------------------->| - |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [21] - [22] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->| - |<-----------------------------------| [23] - [24] |----------------------------------->| - [25] | | - - ]]> -
- - - - The bootloader automatically starts after device reset and attempts to read the runtime firmware image from flash memory, write it into SDRAM and start execution. If it succeeds then normal operation begins and no further action is required. If it fails, for any reason, then the bootloader initiates the boot-from-host sequence. - - - - - The bootloader broadcasts VS_HOST_ACTION.IND with HOST_ACTION_REQ set to 0x04 to indicate that it is waiting to be configured. The bootloader continues to broadcast this message message every 750 milliseconds which differs from that of other chips. - - - - - The local host receives the VS_HOST_ACTION.IND and inspects HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. - - - - - The local host sends a VS_HOST_ACTION.RSP message with MSTATUS set to 0 to indicate the start of sequence. - - - - - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. - - - - - The local host retrieves the firmware chain and extracts the configuration applet image from the chain. The firmware chain may be stored on disk or in memory depending on how the local host is programmed. - - - - - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2 and ALLOWED_MEM_TYPES to 1 to download the applet in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download the applet in relative address mode. The TOTAL_LENGTH will be the applet image header IMAGELENGTH but CURR_PART_LENGTH cannot exceed 1400 bytes. - - - - - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host continues to increment CURR_PART_OFFSET and download the configuration applet in 1400 byte blocks until the last block is reached. The local host then sets START_ADDR to the applet image header ENTRYPOINT, the CHECKSUM to the applet image header IMAGECHECKSUM and the execute bit in FLAGS to 1 in the last message frame. - - - - - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the configuration applet checksum then acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host exists the boot from host sequence and returns to listening mode. - - - - - The bootloader executes the configuration applet. The device hardware address is 00:B0:52:00:00:01 in this state. - - - - - The bootloader broadcasts a VS_HOST_ACTION.IND message with HOST_ACTION_REQ set to 0 to indicate that it is waiting for runtime parameters and firmware. - - - - - The local host receives a VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. - - - - - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. - - - - - The local host locates the parameter chain and firmware chain. The chains may be stored on disk or in memory depending on how the local host is programmed. - - - - - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2 and ALLOWED_MEM_TYPES set to 1 to download parameters in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download parameters in relative address mode. The TOTAL_LENGTH will be the entire parameter file length but the CURR_PART_LENGTH cannot exceed 1400 bytes. - - - - - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host continues to CURR_PART_OFFSET and download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets the START_ADDR field to the parameter image header ENTRYPOINT, the CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1 in the last message frame. - - - - - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the parameter chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2 and ALLOWED_MEM_TYPES to 1 to download firmware in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download firmware in relative address mode. The TOTAL_LENGTH will be the firmware image header IMAGELENGTH but the CURR_PART_LENGTH cannot exceed 1400 bytes. - - - - - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. - - - - - The local host continues to increment CURR_PART_OFFSET and download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets START_ADDR to the parameter image header ENTRYPOINT, the CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1 in the last message frame. - - - - - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the firmware chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. - - - - - The bootloader executes the runtime firmware and the device begins operation. The device hardware address will become that programmed into the parameter inforamtion block. - - - -
diff --git a/docbook/firmware-7420-boot.xml b/docbook/firmware-7420-boot.xml deleted file mode 100644 index ff4b4cb1..00000000 --- a/docbook/firmware-7420-boot.xml +++ /dev/null @@ -1,169 +0,0 @@ -
- - Boot from Host (AR7420) - - - The VS_WRITE_AND_EXECUTE message is now the only way to write runtime parameters and firmware into volatile memory. The legacy VS_RD_MEM, VS_WR_MEM and VS_ST_MAC are deprecated and will no longer be supported by the bootloader. This means that some customers must re-write their applications to boot newer powerline devices. - -
- - Boot from Host (AR6410/AR7420) - -| [03] - [05] |<------- VS_HOST_ACTION.RSP --------| [04] - | | [06] - |<---- VS_WRITE_AND_EXECUTE.REQ -----| [07] - [08] |----- VS_WRITE_AND_EXECUTE.CNF ---->| - |<-----------------------------------| [09] - [10] |----------------------------------->| [11] - [12] | | - [13] |-------- VS_HOST_ACTION.IND ------->| [14] - [16] |<------- VS_HOST_ACTION.RSP --------| [15] - | | [16] - |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [17] - [18] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->| - |<-----------------------------------| [19] - [20] |----------------------------------->| - |<-VS_WRITE_AND_EXECUTE_APPLET.REQ --| [21] - [22] |--VS_WRITE_AND_EXECUTE_APPLET.CNF ->| - |<-----------------------------------| [23] - [24] |----------------------------------->| - [25] | | - - ]]> -
- - - - The bootloader enters boot-from-host mode based on the hardware strapping or failure to load runtime firmware from flash memory. The device hardware address is 00:B0:52:00:00:01 in this state. - - - - - The bootloader broadcasts a VS_HOST_ACTION.IND message with HOST_ACTION_REQ set to 4 to indicate that it is waiting to be configured. The bootloader will continue to broadcast the VS_HOST_ACTION.IND message every 750ms until it receives a VS_HOST_ACTION.RSP message from the local host. The BootROM does not know the local host hardware address at this stage so indications are broadcast, not addressed. - - - - - The local host receives a VS_HOST_ACTION.IND message and inspects HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. The first indcation requests device configuration. - - - - - The local host sends a VS_HOST_ACTION.RSP message with MSTATUS set to 0 to indicate a willingness and ability to service the request. - - - - - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. - - - - - The local host retrieves the firmware chain and extracts the configuration applet image from the chain. The firmware chain may be stored on disk or in memory depending on how the local host is programmed. - - - - - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2, ALLOWED_MEM_TYPES to 1, CURR_PART_OFFSET to the applet image header IMAGEADDRESS and CURR_PART_LENGTH to the applet image header IMAGELENGTH to download the applet in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download the applet in relative address mode. - - - - - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host continues to download the configuration applet in 1400 byte blocks until the last block is reached. The local host sets START_ADDR to the applet image header ENTRYPOINT, CHECKSUM to the applet image header IMAGECHECKSUM and the execute bit in FLAGS to 1. - - - - - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the configuration applet checksum then acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host exists the boot from host sequence and returns to listening mode. - - - - - The bootloader executes the configuration applet. The device hardware address is 00:B0:52:00:00:01 in this state. - - - - - The bootloader broadcasts a VS_HOST_ACTION.IND message with HOST_ACTION_REQ set to 0 to indicate that it is waiting for runtime parameters and firmware. - - - - - The local host receives a VS_HOST_ACTION.IND message and inspects the HOST_ACTION_REQ field to determine the required action. The local host must be programmed to listen and act appropriately. - - - - - The bootloader receives the VS_HOST_ACTION.RSP message, stops broadcasting VS_HOST_ACTION.IND messages and waits indefinitely for the local host to act. - - - - - The local host locates the parameter chain and firmware chain. The chains may be stored on disk or in memory depending on how the local host is programmed. - - - - - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2, ALLOWED_MEM_TYPES set to 1, CURR_PART_OFFSET to the parameter image header IMAGEADDRESS and CURR_PART_LENGTH to the entire parameter image chain length to download parameters in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download parameters in relative address mode. - - - - - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host continues to download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets the START_ADDR field to the parameter image header ENTRYPOINT, CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1. - - - - - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the parameter chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having MSTATUS set to 0. - - - - - The local host sends a VS_WRITE_AND_EXECUTE.REQ message with FLAGS set to 2, ALLOWED_MEM_TYPES to 1, CURR_PART_OFFSET to the firmware image header IMAGEADDRESS and CURR_PART_LENGTH to the firmware image header IMAGELENGTH to download firmware in absolute address mode. Alternately, setting FLAGS to 0 and CURR_PART_OFFSET to 0 will download firmware in relative address mode. - - - - - The bootloader acknowledges each VS_WRITE_AND_EXECUTE.REQ message with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. - - - - - The local host continues to download the parameter chain in 1400 byte blocks until the last block is reached. The local host then sets START_ADDR to the parameter image header ENTRYPOINT, CHECKSUM to the parameter image header IMAGECHECKSUM and the execute bit in FLAGS to 1. - - - - - The bootloader receives the last VS_WRITE_AND_EXECUTE.REQ message, confirms the firmware chain checksum and acknowledges with a VS_WRITE_AND_EXECUTE.CNF message having the MSTATUS field set to 0. - - - - - The bootloader executes the runtime firmware and the device begins operation. The device hardware address will become that programmed into the parameter inforamtion block. - - - - - At this point, runtime firmware is executing in volatile memory with runtime parameters. If the power is reset at this point then all would be lost. If the device has dedicated flash memory attached then we may want to write runtime parameters and firmware to flash memory so that the device can boot from flash in case of a power failure or reset. - -
diff --git a/docbook/firmware-7420-flash.xml b/docbook/firmware-7420-flash.xml deleted file mode 100644 index 45f7aa0b..00000000 --- a/docbook/firmware-7420-flash.xml +++ /dev/null @@ -1,212 +0,0 @@ -
- - Flash Memory (AR6410/AR7420) - - - The VS_MODULE_OPERATION message is now the only way of write flash memory. The legacy message types VS_RD_MOD, VS_WR_MOD, VS_MOD_NVM and VS_PTS_NVM are deprecated and will no longer be supported by runtime firmware. This means that some customers must re-write their applications to flash newer powerline devices. - - - - The VS_MODULE_OPERATION message type has many formats and the structure differs with each format. Readers should consult the QCA Firmware Technical Reference Manual for a complete description. - - - - A blank flash memory must first be programmed with a softloader module. The module consists of a manifest, the executable softloader program image and a flash memory map. The map is used to manage flash memory during initializations and upgrades. The softloader module must be written into flash memory as a separate module before parameter and firmware modules are written. After that, parameter and firmware modules may be written and re-written without re-writing the softloader module. Of course, the softloader module must be re-written if flash memory is erased. - -
- - Flashing the Softloader (AR7420) - - | [04] - | | - [06] |<-- VS_MODULE_OPERATION.REQ (Write Module) ---| [05] - [07] |--- VS_MODULE_OPERATION.CNF (Write Module) -->| [08] - |<---------------------------------------------| - |--------------------------------------------->| - | | - [10] |<- VS_MODULE_OPERATION.REQ (Close Session) ---| [09] - [11] |-- VS_MODULE_OPERATION.CNF (Close Session) -->| [12] - - ]]> -
- - - - The local host sends a VS_MODULE_OPERATION.REQ module write session request to register a session identifier and the module identifier, module length and module checksum of the softloader module. The softloader module identifier is 0x7003. The softloader module is the entire softloader chain including manifest, softloader image and flash memory layout. - - - - - The device receives the request, validates the module identifier and preserves the module length and checksum until the module write session is closed. The local host has 30 minutes to complete registered module write operations and close the module write session. - - - - - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0, if things went well. - - - - - The local host receives the confirmation and prepares to download the softloader module. - - - - - The local host sends a VS_MODULE_OPERATION.REQ module write request containing the offset, length and content of the first portion of the module being downloaded. - - - - - The device receives the request and write to a scrath region of flash memory awaiting session close. - - - - - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0 if things went well. - - - - - The local host receives the confirmation and continues downloading the softloader in fragments using VS_MODULE_OPERATION write requests, advancing the offset and adjusting the length with each write. - - - - - The local host send a VS_MODULE_OPERATION.REQ close module write session request having COMMIT_CODE bits 0 and 1 set. to indicate Force Commit and Commit without reset, respectively. - - - - - The device recevies the request, verifies the module length and checksum then transfers the module from scratch memory to it's final location in flash memory. - - - - - The device responds with VS_MODULE_OPERATION.CNF close module write session with MSTATUS set to 0 if things went well. If things did not go well then the local host must request a new write module session and start over. - - - - - Once the softloader module is written, the parameter and firmware modules may be written in much the same way except that they must be written as a pair. The parameter module must be downloaded first. The firmware module cannot be committed to without a compatible parameter module. - - - When parameters and firmware are written together the User PIB, Factory PIB and firmware are modified modified. The new User PIB is created by copying the old User PIB over the new one. Consequently the only change comes from extra fields found at the end of the new User PIB. The new Factory PIB becomes the new User PIB with certain fields from the old User PIB preserved, such as the MAC, DAK and so on. - -
- - Flash Parameters and Firmware (AR7420) - - | [04] - | | - [06] |<-- VS_MODULE_OPERATION.REQ (write module) ---| [05] - [07] |--- VS_MODULE_OPERATION.CNF (write module) -->| [08] - |<---------------------------------------------| - |--------------------------------------------->| - | | - [10] |<-- VS_MODULE_OPERATION.REQ (write module) ---| [09] - [11] |--- VS_MODULE_OPERATION.CNF (write module) -->| [12] - |<---------------------------------------------| - |--------------------------------------------->| - | | - [14] |<- VS_MODULE_OPERATION.REQ (commit modules) --| [13] - [15] |-- VS_MODULE_OPERATION.CNF (commit modules) ->| [16] - - ]]> -
- - - - The local host sends a VS_MODULE_OPERATION.REQ module write session request to register the session identifier, module identifiers, module lengths and module checksums. In this case, the two modules are the runtime parameters and runtime firmware. The module identifiers are 0x7002 and 0x7003, respectively. The application running on the local must must locate these modules and determine their size and checksum. - - - - - The device receives the request, validates the module identifier and preserves the module lengths and checksums until the module write session is closed. The local host has 30 minutes to complete registered module write operations and close the module write session. - - - - - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0, if things went well. - - - - - The local host receives the confirmation and prepares to download the parameter module. - - - - - The local host sends a VS_MODULE_OPERATION.REQ module write request containing the offset, length and content of the first portion of the module being downloaded. - - - - - The device receives the request and write to a scratch region of flash memory awaiting write session close. - - - - - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0 if things went well. - - - - - The local host receives the confirmation and continues downloading the parameter module in fragments using VS_MODULE_OPERATION write requests, advancing the offset and adjusting the length with each write. - - - - - - - The local host receives the confirmation and prepares to download the firmware module. - - - - - The local host sends a VS_MODULE_OPERATION.REQ module write request containing the offset, length and content of the first portion of the module being downloaded. - - - - - The device receives the request and write to a scratch region of flash memory awaiting write session close. - - - - - The device responds with VS_MODULE_OPERATION.CNF with MSTATUS set to 0 if things went well. - - - - - The local host receives the confirmation and continues downloading the firmware module in fragments using VS_MODULE_OPERATION write requests, advancing the offset and adjusting the length with each write. - - - - - - The local host send a VS_MODULE_OPERATION.REQ close module write session request having COMMIT_CODE bits 0 and 1 set. to indicate force commit and commit without reset, respectively. - - - - - The device receives the request, verifies the module length and checksum then transfers the module from scratch memory to it's final location in flash memory. - - - - - The device responds with VS_MODULE_OPERATION.CNF close module write session with MSTATUS set to 0 if things went well. If things did not go well then the local host must request a new write module session and start over. - - - - - At this point, the device is ready to boot from flash memory if the power fails or the device resets. - -
diff --git a/docbook/firmware.sh.html b/docbook/firmware.sh.html deleted file mode 100644 index b85e6a2a..00000000 --- a/docbook/firmware.sh.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - firmware.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/firmware.sh
-
-#
-# this file contains a list of *.cfg, *.pib and *.nvm files available
-# on the host for use by scripts; scripts such as start.sh, flash.sh, 
-# upgrade.sh and pts.sh all include this file; 
-#
-# the last definition is the one that takes effect so you can merely 
-# move the definition you want to the bottom of this file;
-#
-# to include this file in a new script:
-#
-#   . ${SCRIPTS}/firmware.sh 
-#
-
-# ====================================================================
-# a la carte; 
-# --------------------------------------------------------------------
-
-. /etc/environment
-CFG=${FIRMWARE}/sdram64mb.cfg
-CFG=${FIRMWARE}/sdram16mb.cfg
-
-# ====================================================================
-# a la carte;            
-# --------------------------------------------------------------------
-
-PIB=${FIRMWARE}/v2.0.4.pib
-NVM=${FIRMWARE}/v2.0.4-0-0-A-FINAL.nvm
-NVM=${FIRMWARE}/v2.0.4-0-0-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.0.1.pib
-NVM=${FIRMWARE}/v3.0.1-0-1-A-RC3.nvm
-NVM=${FIRMWARE}/v3.0.1-0-1-B-RC3.nvm
-
-PIB=${FIRMWARE}/v3.0.5.pib
-NVM=${FIRMWARE}/v3.0.5-0-2-A-FINAL.nvm
-NVM=${FIRMWARE}/v3.0.5-0-2-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.1.0.pib
-NVM=${FIRMWARE}/v3.1.0-0-3-A-FINAL.nvm
-NVM=${FIRMWARE}/v3.1.0-0-3-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.1.3.pib
-NVM=${FIRMWARE}/v3.1.3-0-3-A-FINAL.nvm
-NVM=${FIRMWARE}/v3.1.3-0-3-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.1.4.pib
-NVM=${FIRMWARE}/v3.1.4-0-3-A-FINAL.nvm
-NVM=${FIRMWARE}/v3.1.4-0-3-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.1.7.pib
-NVM=${FIRMWARE}/v3.1.7-0-3-A-FINAL.nvm
-NVM=${FIRMWARE}/v3.1.7-0-3-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.1.8.pib
-NVM=${FIRMWARE}/v3.1.8-0-3-A-FINAL.nvm
-NVM=${FIRMWARE}/v3.1.8-0-3-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.1.9.pib
-NVM=${FIRMWARE}/v3.1.9-0-3-A-FINAL.nvm
-NVM=${FIRMWARE}/v3.1.9-0-3-B-FINAL.nvm
-
-PIB=${FIRMWARE}/v3.3.0.pib
-NVM=${FIRMWARE}/v3.3.0-0-5-A-RC3.nvm
-NVM=${FIRMWARE}/v3.3.0-0-5-C-RC3.nvm
-NVM=${FIRMWARE}/v3.3.0-0-5-B-RC3.nvm
-
-PIB=${FIRMWARE}/v3.3.0.pib
-NVM=${FIRMWARE}/v3.3.0-0-5-A-RC5.nvm
-NVM=${FIRMWARE}/v3.3.0-0-5-C-RC5.nvm
-NVM=${FIRMWARE}/v3.3.0-0-5-B-RC5.nvm
-
-PIB=${FIRMWARE}/v3.3.0.pib
-NVM=${FIRMWARE}/v3.3.0-0-5-A-RC8.nvm
-NVM=${FIRMWARE}/v3.3.0-0-5-C-RC8.nvm
-NVM=${FIRMWARE}/v3.3.0-0-5-B-RC8.nvm
-
-PIB=${FIRMWARE}/v3.3.1.pib
-NVM=${FIRMWARE}/v3.3.1-0-5-A-RC5.nvm
-NVM=${FIRMWARE}/v3.3.1-0-5-B-RC5.nvm
-NVM=${FIRMWARE}/v3.3.1-0-5-C-RC5.nvm
-
-PIB=${FIRMWARE}/v3.3.4.pib
-NVM=${FIRMWARE}/v3.3.4-0-8-A-RC1.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-B-RC1.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-C-RC1.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-D-RC1.nvm
-
-PIB=${FIRMWARE}/v3.3.4.pib
-NVM=${FIRMWARE}/v3.3.4-0-8-A-RC2.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-B-RC2.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-C-RC2.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-D-RC2.nvm
-
-PIB=${FIRMWARE}/v3.3.4.pib
-NVM=${FIRMWARE}/v3.3.4-0-8-A-RC3.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-B-RC3.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-C-RC3.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-D-RC3.nvm
-
-PIB=${FIRMWARE}/v3.3.4.pib
-NVM=${FIRMWARE}/v3.3.4-0-8-A-RC5.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-B-RC5.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-C-RC5.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-D-RC5.nvm
-
-PIB=${FIRMWARE}/v3.3.4.pib
-NVM=${FIRMWARE}/v3.3.4-0-8-A-RC6.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-B-RC6.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-C-RC6.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-D-RC6.nvm
-
-PIB=${FIRMWARE}/v3.3.4.pib
-NVM=${FIRMWARE}/v3.3.4-0-8-A-RC7.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-B-RC7.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-C-RC7.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-D-RC7.nvm
-
-PIB=${FIRMWARE}/v3.3.4.pib
-NVM=${FIRMWARE}/v3.3.4-0-8-A-RC9.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-B-RC9.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-C-RC9.nvm
-NVM=${FIRMWARE}/v3.3.4-0-8-D-RC9.nvm
-
-PIB=${FIRMWARE}/v3.3.5.pib
-NVM=${FIRMWARE}/v3.3.5-0-8-A-RC1.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-B-RC1.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-C-RC1.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-D-RC1.nvm
-
-PIB=${FIRMWARE}/v3.3.5.pib
-NVM=${FIRMWARE}/v3.3.5-0-8-A-RC2.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-B-RC2.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-C-RC2.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-D-RC2.nvm
-
-PIB=${FIRMWARE}/v3.3.5.pib
-NVM=${FIRMWARE}/v3.3.5-0-8-A-RC3.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-B-RC3.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-C-RC3.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-D-RC3.nvm
-
-PIB=${FIRMWARE}/v3.3.5.pib
-NVM=${FIRMWARE}/v3.3.5-0-8-A-RC4.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-B-RC4.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-C-RC4.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-D-RC4.nvm
-
-PIB=${FIRMWARE}/v3.3.5.pib
-NVM=${FIRMWARE}/v3.3.5-0-8-A-RC5.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-B-RC5.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-C-RC5.nvm
-NVM=${FIRMWARE}/v3.3.5-0-8-D-RC5.nvm
-
-PIB=${FIRMWARE}/v3.3.6.pib
-NVM=${FIRMWARE}/v3.3.6-0-8-A-RC3.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-B-RC3.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-C-RC3.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-D-RC3.nvm
-
-PIB=${FIRMWARE}/v3.3.6.pib
-NVM=${FIRMWARE}/v3.3.6-0-8-A-RC4.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-B-RC4.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-C-RC4.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-D-RC4.nvm
-
-PIB=${FIRMWARE}/v3.3.6.pib
-NVM=${FIRMWARE}/v3.3.6-0-8-A-RC1.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-B-RC1.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-C-RC1.nvm
-NVM=${FIRMWARE}/v3.3.6-0-8-D-RC1.nvm
-
-# ====================================================================
-#
-# --------------------------------------------------------------------
-
-
-
- - - diff --git a/docbook/firmware.xml b/docbook/firmware.xml deleted file mode 100644 index 9084cb99..00000000 --- a/docbook/firmware.xml +++ /dev/null @@ -1,987 +0,0 @@ - - - Firmware - -
- - Introduction - - - An Atheros chipset consists of an integral CPU, ROM and proprietary circuitry. The CPU requires a minimum amount of external SDRAM to execute runtime software and store runtime configuration parameters. The INT6000 chipset also requires a minimum amount of external flash memory in order to start. The INT6300 can use external flash memory in the same way as the INT6000 or it can use a local host processor as surrogate flash memory. - - - On startup, the SDRAM memory controller must be configured before runtime firmware and parameters are loaded. On the INT6000, runtime firmware and configuration parameters must be loaded from external flash memory. On the INT6300, it may be loaded from external flash memory or from a external host processor. Runtime firmware determines device capability. Runtime configuration parameters determine device network identity and personality. - - - The following sections identify and describe firmware related components and discuss some of the routine actions required to manage them. Consult the Atheros HomePlug AV Hardware Technical Reference Manual and HomePlug AV Firmware Technical Reference Manual for more information. - -
-
- Firmware Components - - Device initialization involves the following components. They are described here and then referenced throughout the toolkit documentation. You may want to read and re-read this page. - -
- - Bootloader - - - The Bootloader is permanent software burned into the chipset. The INT6000 and INT6300 both have a Bootloader program but they behave differently because the INT6000 needs flash memory and the INT6300 does not. Neither the INT6000 Bootloader nor the INT6300 Bootloader can write to flash memory. - - - On startup, the INT6000 Bootloader attempts to load runtime firmware from flash memory into SDRAM. If flash memory is not available, or the runtime firmware stored there cannot be loaded, then the INT6000 Bootloader cannot continue so the device cannot function. - - - On startup, the INT6300 Bootloader attempts to load runtime firmware from flash memory into SDRAM. If flash memory is not available, or the runtime firmware stored there cannot be loaded, then Bootloader will request runtime firmware from the local host processor. - -
-
- - Softloader - - - An optional program stored in flash memory in place of runtime firmware. This program is used on the INT6000 to support the Boot From Host operation, if needed. It is not used on the INT6300 because the INT6300 Bootloader now performs similar functions. The Softloader cannot write to flash memory. - - - On startup, the INT6000 Bootloader loads the Softloader from flash memory into SDRAM, as it would do with runtime firmware. The Softloader then requests the actual runtime firmware from local host. - -
-
- - Memory Configuration Parameters - - - A small block of information that describes the type, size and characteristics of the SDRAM available for the benefit of the Bootloader. On the INT6000, SDRAM configuration must be stored in flash memory. On the INT6300, it may be stored in flash memory or on the local host. The INT6300 Bootloader attempts to read configuration information from flash memory when it is present; otherwise, it requests that information from the local host using a VS_HST_ACTION message and so the host must store this information until it is requested. - - - There are two SDRAM configuration file formats. The first format is used by the Windows Device Manager and the - int6k2 - program and typically has a .config file extension. The second format is used by the - int6k - program and - int6kf - program and typically has a .cfg file extension. The latter format is more robust and should eventually replace the format. - - - The Windows Device Manager form consists of 64 hexadecimal ASCII characters. Files are at least 64 bytes but only the first 64 bytes are used. Files can be modified using a text editor. ASCII hex to binary conversion and checksum computation is needed on input. The - config2cfg - program can be used to convert this format to Open Powerline Toolkit format. - - - The Open Powerline Toolkit format consists of 32 binary bytes plus a 4 byte checksum. The file size is exactly 36 bytes. No conversion or checksum computation is needed on input. The - chkcfg - program can be used the validate this file format because it contains a checksum. - - - The INT6400 chipset does not need a memory configuration parameter file because it has a different memory controller than earlier chipsets. SDRAM is now configured dynamically by an applets stored in the .nvm file. - -
-
- - Runtime Firmware (MAC Software) - - - The executable image that determines INT6000 or INT6300 capability and functionality. Runtime firmware refers to any executable image except the Bootloader which is considered to be boot firmware. Firmware files have a .nvm extension and can contain multiple firmware images. One of these images could be the parameter information block but Atheros currently distributes that as a separate file. The chknvm program can be used to detect obsolete or corrupt .nvm files. Runtime firmware can write to flash memory and must be running in order to re-program the chipset. - -
-
- - Parameter Information Block (PIB) - - - The configuration image that determines device network identity, functional capability and operational mode. The PIB structure often changes from one major firmware release to the next and often is not portable across major releases. Parameter information files have a .pib extension by convention and contain one parameter set. The chkpib program can be used to detect obsolete or corrupt PIB files. - - - Recent firmware releases support two PIB images in flash memory: the Factory PIB and the User PIB. The Factory PIB is the first PIB image written to flash memory. Once written, the Factory PIB cannot be changed without special software. The User PIB is created and over-written whenever the device needs to save new PIB parameters. Factory default values are restored by erasing the User PIB and rebooting the device. When a device reboots, it attempts to load the User PIB from flash memory. Failing that, it attempts to load the Factory PIB from flash memory. Failing that, it loads a Default PIB having minimum functionality. The loaded PIB becomes the Working PIB and determines runtime device identity and behavior. - -
-
-
- - Architecture Overview - - - The following figure illustrates a hypothetical powerline network consisting of two devices. Each device has an INT6300 with optional dedicated flash memory and an onboard processor with associated storage. The processor in each device is the local host for that device and the remote host for the other device. The processor storage is unspecified but it must be persistent. The two devices are connected via coax or powerline. The flash memory is optional in this design because it uses the INT6300 chipset. - -
- - Simple Network - - - - - - -
- - The Boot Loader is permanent program that executes on startup. It detects the presence of flash memory and attempts to read SDRAM configuration from flash memory then load and runtime the firmware image and PIB from flash memory. On success, the Boot runtime firmware starts and the device assumes HomePlug AV compliant behavior. On failure, the Boot Loader requests SDRAM configuration, runtime firmware image and PIB from the local host. The local host must be prepared to respond to these requests. - - - On a system having no flash memory, the Boot Loader will request SDRAM configuration information from the local host. Once that is received, the Boot Loader will request a firmware image and PIB from the local host. The local host determines which firmware image and PIB to download, manages the download sequence and starts firmware execution. - - - Atheros software, such as the Windows Device Manager, Linux Flash Utility and Embedded API all support the Boot from Host configuration. - - - Once the firmware is running on the INT6300 , a remote host can forward runtime firmware and PIB to the local host via the INT6300 firmware. The remote host might reside on anotherINT6300 device, as shown in the previous figure, or be located anywhere on the HomePlug AV network. In either case, the operations described are the same. - -
-
- - Firmware Boot Process - - - The INT6300 can boot HomePlug AV firmware from either dedicated flash memory or a local host processor. This means that dedicated flash memory in not necessary when an onboard processor having persistent storage is available. The absence of dedicated flash memory and availability of an onboard host processor is called a Boot from Host configuration. - - - The Boot from Host configuration is of interest to customers who are committed to using a host processor in their INT6300 based product and want to use it to eliminate the additional cost of dedicated flash memory to store HomePlug AV firmware for INT6300 devices. - - - The Boot from Host configuration supports three operations: Upgrade Device, Update Local Host and Boot from Host. Product designers must write host software to support all three operations as described later in this document. Atheros provides an Embedded Application Program Interface to assist product designers with this effort. Obtain a copy of the HomePlug AV Application Programming Interface User's Guide from Atheros Communications, Ocala FL USA for more information. - - - Readers should not confuse a Boot from Host configuration with the Boot from Host operation. The former is a hardware configuration having an INT6300 with no dedicated flash memory available. The latter is the process of downloading configuration information, firmware and PIB from the local host to the device and starting firmware execution on startup. - - - This discussion assumes that the reader is familiar with the following: - - - - - The distinction between a local and remote host - - - - - The relationship between the powerline device H1, M1 and PHY interfaces. - - - - - The structure of the following Atheros Management Message types: VS_HST_ACTION, VS_SET_SDRAM, VS_WR_MEM, VS_WR_MOD, VS_RS_DEV, VS_ST_MAC and VS_WRITE_AND_EXECUTE. Be aware that message types VS_SET_SDRAM, VS_WR_MEM, VS_WR_MOD and VS_ST_MAC are deprecated and will no longer be supported by the newest firmware. - - - - - Hardware architecture covered in the QCA Powerline Hardware Technical Reference Manual and the management message formats covered in the QCA Powerline Firmware Technical Reference Manual. - - - -
- -
- - Boot from Host Configuration - - - The Boot from Host configuration requires a permanent connection between the powerline device and a local host having some type of persistent storage. In most cases, the powerline device and local host are co-located, possibly on the same board or same chip, and act together as an integral unit. Essentially, the local host provides persistent memory for the device. - - - The Boot from Host configuration lets the local host decide which runtime parameters and firmware to download on startup. This offers a considerable degree of product adaptability, allowing different parameter and firmware combinations to be downloaded based on external factors. - - - In a Boot from Host configuration, the processor must act as local host while the device is booting but it can also act as remote host when upgrading other devices. The former is a design requirement and latter is a design option. - -
-
- - Things to Remember - - - The Boot from Host configuration offers design flexibility but also increases the possibilities. Remember that the processes described here are based on simple rules that ultimately dictate why each process step is needed. Readers may find it helpful to review these rules. - - - - - - The softloader and bootloader programs have limited vocabulary. - - - - The INT6000 softloader recognizes only the VS_SW_VER, VS_ST_MAC, VS_RS_DEV, VS_WR_MOD requests. It does not recognize VS_WR_MEM. - - - The INT6300 bootloader recognizes only the VS_SW_VER, VS_WR_MEM, VS_ST_MAC, VS_RS_DEV and VS_SET_SDRAM requests. It does not recognize VS_WR_MOD. - - - The INT6400 bootloader recognizes only the VS_SW_VER, VS_WR_MEM, VS_ST_MAC, VS_RS_DEV requests. It recognizes VS_SET_SDRAM and responds to it but ignores it. It does not recognize VS_WR_MOD. - - - The AR7400 bootloader recognizes only VS_SW_VER, VS_WR_MEM, VS_ST_MAC, VS_RS_DEV requests. It recognizes VS_SET_SDRAM and responds to it but ignores it. It does not recognize VS_WR_MOD. - - - The AR7420 bootloader recognizes only VS_SW_VER, VS_RS_DEV, VS_WRITE_AND_EXECUTE and VS_RAND_MAC_ADDRESS requests. Early versions recognize VS_WRITE_MEM and VS_ST_MAC requests but they must not be used. - - - - Softloader/Bootloader MMEs - - - - - - - - - - - - MME - - - NAME - - - INT6000 Softloader - - - INT6300 Bootloader - - - INT6400 Bootloader - - - AR7400 Bootloader - - - AR7420 Bootloader - - - - - - - 0xA000 - - - VS_SW_VER - - - Yes - - - Yes - - - Yes - - - Yes - - - Yes - - - - - 0xA008 - - - VS_WR_MEM - - - No - - - Yes - - - Yes - - - Yes - - - Deprecated - - - - - 0xA00C - - - VS_ST_MAC - - - Yes - - - Yes - - - Yes - - - Yes - - - Deprecated - - - - - 0xA01C - - - VS_RS_DEV - - - Yes - - - Yes - - - Yes - - - Yes - - - Yes - - - - - 0xA020 - - - VS_WR_MOD - - - Yes - - - No - - - No - - - No - - - No - - - - - 0xA05C - - - VS_SDRAM - - - No - - - Yes - - - Ignored - - - Ignored - - - No - - - - - 0xA060 - - - VS_HOST_ACTION - - - No - - - Yes - - - Yes - - - Yes - - - Yes - - - - - 0xA098 - - - VS_WRITE_AND_EXECUTE - - - No - - - No - - - No - - - Yes - - - Yes - - - - - 0xA0D4 - - - VS_RAND_MAC_ADDRESS - - - No - - - No - - - No - - - Yes - - - Yes - - - - -
-
- - - The Softloader, Bootloader and runtime firmware may treat the same MME differently because each is a different program. A notorious obvious example is the VS_SW_VER message type. This means that one may need to be aware of the device state when anticipating device behaviour or interpreting device response. - - - - - The local host is surrogate flash memory. When dedicated flash memory is not available to a device, the device will request firmware and parameter storage services from the local host using VS_HST_ACTION messages. The local host must be programmed to detect and respond to these messages or the firmware will appear to hang. See program int6khost, int64host, amphost or plchost to demonstrate and experiment with this interaction. - - - - - Only runtime firmware can write flash memory. Runtime firmware must be executing in order to write flash memory or upload to the local host. The Softloader and Bootloader cannot perform either operation. - - - - - All PIB changes must be written in flash memory. There are several things that can cause PIB changes. When a PIB change is needed, the Working PIB is copied to a scratch area and modified there. The Scratch PIB must then be written to flash memory or sent to the local host for storage. The device then resets causing the stored PIB to replace the Working PIB. If a freshly downloaded PIB changes for any reason then the cycle will repeat, automatically. - - - - - Runtime firmware updates the PIB after joining and before leaving an AVLN. This will cause a device reset in each case. If the device is using the local host for persistent storage, runtime firmware will send the associated VS_HST_ACTION messages to the host and the host will send the associated VS_RD_MOD and VS_RS_DEV messages as per Update Local Host. - - -
-
-
- - Every Little Bit Hurts - - - With the addition of Push Button Encryption, and other planned features, runtime firmware can now modify the PIB. Consequently, host applications must not assume that the PIB has not changed since it was last downloaded. Atheros strongly recommends that applications always perform a read-modify-write when making PIB modifications. Failure to do so can result in infinite reset loops caused when a device modifies the PIB that has just been downloaded. - - - As one example, recent PIBs contain a network membership bit to indicate that the device has successfully joined the network associated with the current NMK. If the firmware detects the network and discovers that the membership bit is clear then it will join the network and set the bit. The firmware will then attempt to preserve the change by sending a VS_HOST_ACTION message to the local host. If the host application does not upload and store the changed PIB (as the device requested) before resetting the device then the original PIB will be downloaded again, after reset, and the process will repeat. Of course, a similar situation will occur when the device leaves the network and again when it joins another network. - -
-
- - Liar! Liar! Pants on Fire! - - - It is important to use the right Boot from Host sequence for each type of Atheros device. This means that you should query the device using a VS_SW_VER message beforehand to determine or confirm the device type. Although this should be a simple operation, there have been several changes that complicate matters. - - - - - The INT6300 Bootloader incorrectly identifies the chipset as an INT6000 chipset in the MDEVICEID field of the VS_SW_VER message. - - - - - The AR7400 Bootloader incorrectly identifies the chipset as an INT6400 chipset in the MDEVICEID field of the VS_SW_VER message. - - - - - The Bootloader, for INT6400 chipsets and later, returns two additional field, IDENT and STEP_NUMBER in the VS_SW_VER confirmation message. These fields, the hardware identifier and step number, are correct but are not returned in earlier chipsets. - - - - - The table below illustrates what is reported by various firmware, in the DEVICEID field of the VS_SW_VER message, on each type of hardware platform. - - - - Legacy Device Identification - - - - - - - - - - - Chipset - - - DEVICEID/IDENT (Bootloader) - - - MVERSION (Bootloader) - - - DEVICEID/IDENT (Firmware) - - - MVERSION (Firmware) - - - - - - - INT6000 - - - 0x01 / 0x00000042 - - - BootLoader - - - 0x01 / na - - - INT6000-MAC-0-0-3213-1206-20071224-FINAL - - - - - INT6300 - - - 0x02 / 0x00006300 - - - BootLoader - - - 0x02 / na - - - INT6300-MAC-0-0-4203-00-4089-20091105-FINAL - - - - - INT6400 - - - 0x03 / 0x00006400 - - - BootLoader - - - 0x03 / na - - - INT6400-MAC-4-3-4304-01-4397-20100924-FINAL - - - - - INT7400 - - - 0x03 / 0x00007400 - - - BootLoader - - - 0x04 / na - - - INT7400-MAC-5-2-5213-01-1027-20110428-FINAL - - - - - INT7450 - - - 0x03 / 0x0F001D1A - - - BootLoader - - - 0x20 / 0x00001D1A - - - QCA7450-MAC-5-2-5213-01-1027-20110428-FINAL - - - - - INT7451 - - - 0x03 / 0x00007400 - - - BootLoader - - - 0x20 / 0x0E001D1A - - - QCA7451-MAC-5-2-5213-01-1027-20110428-FINAL - - - - - AR6405 - - - 0x03 / 0x00006400 - - - BootLoader - - - 0x05 / na - - - INT6405-MAC-4-3-4304-01-4397-20100924-FINAL - - - - - AR7420 - - - 0x05 / 0x001CFCFC - - - BootLoader - - - 0x20 / 0x001CFCFC - - - MAC-QCA7420-2.5.14.2259-23-20110621-FINAL - - - - - QCA6410 - - - 0x05 / 0x001B58EC - - - BootLoader - - - 0x21 / 0x001B58EC - - - MAC-QCA6410-2.5.14.2259-23-20110621-FINAL - - - - - QCA6411 - - - 0x05 / 0x001B58BC - - - BootLoader - - - 0x21 / 0x001B58BC - - - MAC-QCA6411-2.5.14.2259-23-20110621-FINAL - - - - - QCA7000 - - - 0x05 / 0x001B589C - - - BootLoader - - - 0x22 / 0x001B589C - - - MAC-QCA7000-1.4.13.3259-43-20110621-FINAL - - - - -
- - To properly detect the correct chipset perform the following steps. - - - - - Send a VS_SW_VER request message from the local host to the local device using the Atheros Local Management Address. - - - - - Read the VS_SW_VER confirm message returned to the host by the device. - - - - - Extract and save the MDEVICEID field (a small integer) and the MVERSION field (a string). - - - - - If the MVERSION string is SoftLoader then the MDEVICEID field is valid. - - - - - If the MVERSION string is not BootLoader then the MDEVICEID field is valid unless it is 0x07. In that case, set the stored DEVICEID to 0x04 to indicate an AR7400. Do not inspect the IDENT field because it does not exist in the firmware version of the VS_SW_VER message on any platform. - - - - - If the MDEVICEID field is 1, indicating an INT6000, then the chipset is actually an INT6300. Set the stored MDEVICEID to 2, indicating an INT6300. Do not inspect the IDENT field because it does not exist in the BootLoader version of the VS_SW_VER message for either of these two chipsets. - - - - - If the MDEVICEID field is 3, indicating an INT6400, then the chipset could be either an INT6300 or an AR7400. Inspect the IDENT field. - - - - - If the IDENT field is 0x6400, indicating an INT6400, then the stored MDEVICEID is valid. - - - - - If the IDENT field is 0x7400, indicating an AR7400, then set the stored MDEVICEID to 4, indicating an AR7400. - - - - - Having performed the previous conversions, the expression (1 << (DEVICEID - 1)) now indicates the proper IGNORE bit found in each NVM file header. Unfortunately, this only works for DeviceID values from 0x01 through 0x06. After that, the device identification scheme changes. - -
-
- - But wait! There's more ... - - - Starting with the AR7420, the DeviceID field in VS_SW_VER is now the DEVICE_CLASS field and identifies the Device Family, not the device type. Instead, the IDENT field in VS_SW_VER identifies the device type and the IDENT field is located at a variable offset within the message frame. Previously, the IDENT was located a fixed offset within the frame. - - - - Device Identification - - - - - - - - - - - Chipset - - - Softloader - - - Bootloader - - - Firmware - - - Identity - - - - - - - INT6000 - - - 0x01 - - -   - - - 0x01 - - - 0x00000042 - - - - - INT6300 - - -   - - - 0x01 - - - 0x02 - - - 0x00006300 - - - - - INT6400 - - -   - - - 0x03 - - - 0x03 - - - 0x00006400 - - - - - AR7400 - - -   - - - 0x03 - - - 0x04 - - - 0x00007400 - - - - - AR6405 - - -   - - - 0x03 - - - 0x05 - - - 0x00006400 - - - - - AR7420 - - -   - - - 0x05 - - - 0x20 - - - 0x001CFCFC - - - - - QCA6410 - - -   - - - 0x05 - - - 0x21 - - - 0x001B58EC - - - - - QCA7000 - - -   - - - 0x05 - - - 0x22 - - - 0x001B589C - - - - -
-
- &firmware-6000-flash; - &firmware-6000-upload; - &firmware-6000-boot; - &firmware-6300-boot; - &firmware-6400-boot; - &firmware-7400-boot; - &firmware-7420-boot; - &firmware-7420-flash; -
diff --git a/docbook/flags.h.html b/docbook/flags.h.html deleted file mode 100644 index 39713f48..00000000 --- a/docbook/flags.h.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - flags.h - - - - - - - - - -
-/*====================================================================*
- *
- *   flags.h - bitmap flagword definitions and declarations;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FLAGS_HEADER
-#define FLAGS_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-
-/*====================================================================*
- *   define macros for common, but error prone, bitmap operations;
- *--------------------------------------------------------------------*/
-
-#define _bits(object) (sizeof (object) << 3)
-#define _getbits(map,pos,cnt) (((map)>>((pos)-(cnt)+1))&~(~(0)<<(cnt)))
-
-#define _bitmask(bits) ~(~(0) << bits)
-
-#define _setbits(flag,mask) flag |=  (mask)
-#define _clrbits(flag,mask) flag &= ~(mask)
-#define _toggle(flag,mask)  flag = ~(flag) & ~(mask)
-
-#define _anyset(flag,mask) ((flag) & (mask)) != (0)
-#define _anyclr(flag,mask) ((flag) & (mask)) != (mask)
-#define _allset(flag,mask) ((flag) & (mask)) == (mask)
-#define _allclr(flag,mask) ((flag) & (mask)) == (0)
-
-// #define _notset(flag,mask) ((flag) & (mask)) == (0)
-
-#define _anybits(flag,mask) ((flag) & (mask)) != (0)
-#define _allbits(flag,mask) ((flag) & (mask)) == (mask)
-
-#define _clean(flag,mask) ((flag) & ~(mask)) == (0)
-#define _dirty(flag,mask) ((flag) & ~(mask)) != (0)
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-void set32bitmap (uint32_t * map, unsigned bit);
-void clr32bitmap (uint32_t * map, unsigned bit);
-
-/*====================================================================*
- *   end definitions and declarations;
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/flash.sh.html b/docbook/flash.sh.html deleted file mode 100644 index fe425d5c..00000000 --- a/docbook/flash.sh.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - flash.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/flash.sh
-
-# ====================================================================
-# symbols;
-# --------------------------------------------------------------------
-
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# confirm connection;
-# --------------------------------------------------------------------
-
-echo -n "Interface [${ETH}]: "; read  
-if [ ! -z ${REPLY} ]; then
-	ETH=${REPLY}
-fi
-
-# ====================================================================
-# check connection;
-# --------------------------------------------------------------------
-
-int6kwait -xqsi ${ETH}
-if [ ${?} != 0 ]; then
-	echo "Device is not connected"
-	exit 1
-fi
-
-# ====================================================================
-# randomize identity;
-# --------------------------------------------------------------------
-
-MAC=auto
-DAK=$(rkey secret.key -D)
-NMK=$(rkey secret.key -M)
-
-# ====================================================================
-# confirm address;
-# --------------------------------------------------------------------
-
-echo -n "MAC [${MAC}]: "; read
-if [ ! -z ${REPLY} ]; then
-	MAC="${REPLY}"                  
-fi
-
-echo -n "DAK [${DAK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	DAK="${REPLY}"                  
-fi
-
-echo -n "NMK [${NMK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	NMK="${REPLY}"                  
-fi
-
-# ====================================================================
-# edit PIB file;
-# --------------------------------------------------------------------
-
-modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB} 
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# write SDRAM with firmware and PIB; 
-# --------------------------------------------------------------------
-
-int6kf -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -FF
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# confirm identity;
-# --------------------------------------------------------------------
-
-int6k -i ${ETH} -I
-
-# ====================================================================
-# return success;
-# --------------------------------------------------------------------
-
-exit 0
-
-
-
- - - diff --git a/docbook/flashp.sh.html b/docbook/flashp.sh.html deleted file mode 100644 index 4f18e537..00000000 --- a/docbook/flashp.sh.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - flashp.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/flashp.sh
-
-# use the int6kfp to initialize an INT6300 device having a blank or 
-# corrupted NVRAM; the Bootloader must be running for this script to
-# work properly;
-
-# ====================================================================
-# host symbols;
-# --------------------------------------------------------------------
-
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# confirm connection;
-# --------------------------------------------------------------------
-
-echo -n "Interface [${ETH}]: "; read  
-if [ ! -z ${REPLY} ]; then
-	ETH=${REPLY}
-fi
-
-# ====================================================================
-# check connection;
-# --------------------------------------------------------------------
-
-int6kwait -xqsi ${ETH} 
-if [ ${?} != 0 ]; then
-	echo "Device is not connected"
-	exit 1
-fi
-
-# ====================================================================
-# randomize identity;
-# --------------------------------------------------------------------
-
-MAC=auto
-DAK=$(rkey secret.key -D)
-NMK=$(rkey secret.key -M)
-
-# ====================================================================
-# confirm address;
-# --------------------------------------------------------------------
-
-echo -n "MAC [${MAC}]: "; read
-if [ ! -z ${REPLY} ]; then
-	MAC="${REPLY}"                  
-fi
-
-echo -n "DAK [${DAK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	DAK="${REPLY}"                  
-fi
-
-echo -n "NMK [${NMK}]: "; read
-if [ ! -z ${REPLY} ]; then
-	NMK="${REPLY}"                  
-fi
-
-# ====================================================================
-# modify PIB;
-# --------------------------------------------------------------------
-
-modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB} -v
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# flash NVRAM with firmware and factory PIB;
-# --------------------------------------------------------------------
-
-int6kfp -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -D ${DAK} -FF
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# confirm identity;
-# --------------------------------------------------------------------
-
-int6k -i ${ETH} -I
-
-# ====================================================================
-# return success;
-# --------------------------------------------------------------------
-
-exit 0   
-
-
-
- - - diff --git a/docbook/folders.xml b/docbook/folders.xml deleted file mode 100644 index 55817b76..00000000 --- a/docbook/folders.xml +++ /dev/null @@ -1,176 +0,0 @@ -
- - Toolkit Folders - - - The Atheros Open Powerline Toolkit package folder has many subfolders. Some contain source code, some contain documentation and others contain shell scripts. Some source folders contain programs that require components in neighboring folders. Consequently, you will see references to relative pathnames like ../folder, throughout source code, makefiles and shell scripts. This notation simplifies development and maintenance and is helpful when locating specific files. - - - Folder descriptions appear below in alphabetical order: - - - - - ./applets - - - - A library of programs that can run, stand-alone, on Atheros powerline devices and perform diagnostic tests for connection, functionality and performance. Some run to completion and return to the Bootloader. Others run continuously until the device is reset. Most can be run and executed in sequence using program int6ktest. - - - - - - ./classes - - - - A collection of C++ classes that implement many of the ANSI C functions found elsewhere in the toolkit. These classes will compile and run on most platforms but are still a work-in-progress. The programs folder contains actual and sample programs that use these classes. - - - - - - ./docbook - - - - HTML pages generated by several methods, but mostly Docbook 4.5. Some pages have been created using special tools that are not provided and will not be made available. The Makefile in this folder will compile the core XML source files on GNU/Linux systems that have Docbook 4.5 installed with extentions by Normal Walsh but it does not install the pages. See Installation on Linux for more information. - - - - - - ./ether - - - - Network specific source code that supports raw ethernet packets in a platform independent fashion using plugin modules. The principle feature is the channel data structure used to read and write raw ethernet packets using network features on GNU/Linux, with or without libpcap, and on Windows with winpcap. The source code in this folder is difficult to port cross-platform due to the way different operating systems implement their system header files and network stacks. - - - - - - ./plc - - - - The main source code for programs that communicate with Qualcomm Atheros powerline devices over Ethernet. The programs in this folder are essential programs for engineers and embedded software developers wanting to explore powerline device behavior. The Makefile in this folder will compile and install programs in /usr/local/bin on GNU/Linux systems. - - - - - - ./mme - - - - A collection of helper functions dealing with HomePlug and Atheros management messages. They are not needed for proper toolkit operation but they can be useful during development and debugging because they print message content in readable format. Most of these functions require extra memory because they include symbol tables and extra data conversion functions. - - - - - - ./nodes - - - - A collection of functions that comrpise a generic, light-weight XML parser. Atheros is currently exprimenting with various XML-based applications to support device management on embedded systems. These functions are the core. Currently, they are only used by the pxe and int6k2 programs. See XML Editing Functions for more information. - - - - - - ./nvm - - - - Programs, functions and make files related to Atheros NonVolatile Memory (NVM) files. All programs in this folder either read from or write to NVM files. None communicate with powerline devices. Some of the popular programs are chknvm, nvmsplit and nvmmerge. - - - - - - ./patches - - - - A collection of useful Linux kernel patches and install scripts. Of particular interest is the send-to-self patch that enables external routing of ISO Layer 3 traffic between two Ethernet interfaces on the same host. Atheros provides them but does not support them. - - - - - - ./pib - - - - Programs, functions and make files related to Atheros Parameter Information Block (PIB) files. All programs in this folder either read from or write to PIB files. None communicate with powerline devices. Some of the popular programs are chkpib, modpib, getpib and setpib. - - - - - - ./programs - - - - A small collection of sample C++ programs that use the Atheros C++ powerline classes. These programs compile and run on most environments but are still a work-in-progress. Users may actually find netifs and plcnets useful. - - - - - - ./serial - - - - Programs, functions and make files related to the Atheros Serial Communication Interface for Powerline devices. All of the programs in this folder communicate using a host serial port. None communicate with powerline devices over Ethernet. The main program of interest is int6kuart. - - - - - - ./scripts - - - - Miscellaneous shell scripts that call various programs in this package to perform tasks such as flashing a FW2.0 device. Care must be taken here to ensure that environment variables at the start of each script are appropriate for your system. - - - - - - ./ram - - - - Support modules for reading, printing and checking NVRAM and SDRAM configuration files. The .cfg files in this folder have a different format than the .config files released with the Atheros Windows Device Manager. The files distributed with the Windows Device Manger are 64 ASCII character with no checksum. The files in this directory are 32 binary bites with trailing checksum. Users may create new sdram configuration files by compiling sdram.c, using gcc -o sdram sdram.c and running it without any command line arguments. - - - - - - ./tools - - - - Source code and header files used by virtually all programs in the toolkit. These files are generic and have application beyond this package. They provide GNU/Linux-style or POSIX-style functionality to programs running in environments that do not have either. They also implement operations like checksum computation and multi-byte hexadecimal encoding and decoding. See Support Function Reference for more information. - - - - - - ./VisualStudioNET - - - - Components unique to Microsoft Windows are kept in and under this folder. Specifically, it contains a Visual Studio .NET solution to compile most of the programs in this package using only Microsoft and winpcap libraries. Compiled .exe files can be run on Windows enabled systems having winpcap installed. Adjustments may be necessary depending on your environment. - - - Microsoft does not provide full POSIX support on Windows platforms. Consequently, alternative headers and libraries are included under this folder. For example, an abridged version of unistd.h and an alternative version of stdint.h are included under VisualStudioNET/include. Other significant header files included here are ethernet.h, if_ether.h and in.h. Subfolder VisualStudio\Library contains WinPcap libraries. These folders are referenced in appropriate compiler and linker options for Microsoft Development environments. - - - - -
diff --git a/docbook/format.h.html b/docbook/format.h.html deleted file mode 100644 index 42c37a67..00000000 --- a/docbook/format.h.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - format.h - - - - - - - - - -
-/*====================================================================*
- *
- *   format.h - format function definitions and declarations;;
- *
- *   this file is a subset of the original that includes only those
- *   definitions and declaration needed for toolkit programs;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef FORMAT_HEADER
-#define FORMAT_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-
-/*====================================================================*
- *   functions;
- *--------------------------------------------------------------------*/
-
-size_t strfbits (char buffer [], size_t length, char const * operands [], char const *operator, unsigned flagword);
-
-/*====================================================================*
- *   functions;
- *--------------------------------------------------------------------*/
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 2, 3)))
-
-#endif
-
-void output (signed indent, char const * format, ...);
-
-#ifdef __GNUC__
-
-__attribute__ ((format (printf, 3, 4)))
-
-#endif
-
-void markup (signed fd, signed level, char const * format, ...);
-
-/*====================================================================*
- *   end definitions;
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/fresh.sh.html b/docbook/fresh.sh.html deleted file mode 100644 index 1ae29bf0..00000000 --- a/docbook/fresh.sh.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - fresh.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/fresh.sh
-
-# ====================================================================
-# symbols;
-# --------------------------------------------------------------------
-
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# confirm connection;
-# --------------------------------------------------------------------
-
-echo -n "Interface [${ETH}]: "; read  
-if [ ! -z ${REPLY} ]; then
-	ETH=${REPLY}
-fi
-
-# ====================================================================
-# check connection;
-# --------------------------------------------------------------------
-
-int6kwait -xqsi ${ETH}
-if [ ${?} != 0 ]; then
-	echo "Device is not connected"
-	exit 1
-fi
-
-# ====================================================================
-# fetch device identity;
-# --------------------------------------------------------------------
-
-MAC=$(int6kid -i ${ETH} -A)
-DAK=$(int6kid -i ${ETH} -D)
-NMK=$(int6kid -i ${ETH} -M)
-
-# ====================================================================
-# confirm address;     
-# --------------------------------------------------------------------
-
-# echo -n "MAC Address [${MAC}]: "; read
-# if [ ! -z ${REPLY} ]; then
-# 	MAC="${REPLY}"                  
-# fi
-
-# ====================================================================
-# edit PIB;  
-# --------------------------------------------------------------------
-
-modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB}
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# erase NVRAM;        
-# --------------------------------------------------------------------
-
-int6kp -xi ${ETH} -D ${DAK} -X
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# start firmware; 
-# --------------------------------------------------------------------
-
-int6kf -xi ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} 
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# define final firmware;
-# --------------------------------------------------------------------
-
-PIB=${FIRMWARE}/v3.3.0.pib
-NVM=${FIRMWARE}/v3.3.0-0-5-B-FINAL.nvm
-
-# ====================================================================
-# download firmware then force flash device; 
-# --------------------------------------------------------------------
-
-int6k -xi ${ETH} -P ${PIB} -N ${NVM}  -FF
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# return success;
-# --------------------------------------------------------------------
-
-exit 0
-
-
-
- - - diff --git a/docbook/getargv.c.html b/docbook/getargv.c.html deleted file mode 100644 index 1cf7c0c8..00000000 --- a/docbook/getargv.c.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - getargv.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2012 Qualcomm Atheros Inc.
- *
- *   Permission to use, copy, modify, and/or distribute this software
- *   for any purpose with or without fee is hereby granted, provided
- *   that the above copyright notice and this permission notice appear
- *   in all copies.
- *
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   signed getargv (signed argc, char const * argv [])
- *
- *   symbol.h
- *
- *   read one line from stdin; fill argv [] with fields from that
- *   line; return the number of fields found; ignore blank lines
- *   and script style comment lines; this implementation inserts
- *   a program name at argv [0] to emulate a true argv [];
- *
- *--------------------------------------------------------------------*/
-
-#ifndef GETARGV_SOURCE
-#define GETARGV_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-#include <memory.h>
-
-#include "../tools/symbol.h"
-#include "../tools/chars.h"
-
-signed getargv (signed argc, char const * argv [])
-
-{
-	extern char const * program_name;
-	static char string [1024];
-	char const ** argp = argv;
-	char * sp = string;
-	signed c = getc (stdin);
-	memset (string, 0, sizeof (string));
-	memset ((char **)(argv), 0, argc * sizeof (char const *));
-	while (nobreak (c))
-	{
-		if (isspace (c))
-		{
-			do
-			{
-				c = getc (stdin);
-			}
-			while (isspace (c));
-		}
-		if (c == '#')
-		{
-			do
-			{
-				c = getc (stdin);
-			}
-			while (nobreak (c));
-			c = getc (stdin);
-			continue;
-		}
-		*argp++ = program_name;
-		*argp++ = sp = string;
-		while (nobreak (c))
-		{
-			if (c == '#')
-			{
-				do
-				{
-					c = getc (stdin);
-				}
-				while (nobreak (c));
-				break;
-			}
-			if (isblank (c))
-			{
-				c = (char)(0);
-				*argp = sp + 1;
-			}
-			else if (sp == *argp)
-			{
-				if ((signed)(argp - argv) < argc)
-				{
-					argp++;
-				}
-			}
-			*sp++ = (char)(c);
-			c = getc (stdin);
-		}
-		*argp = (char const *)(0);
-		*sp = (char)(0);
-	}
-	return ((unsigned)(argp - argv));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/gethwaddr.c.html b/docbook/gethwaddr.c.html deleted file mode 100644 index 47701389..00000000 --- a/docbook/gethwaddr.c.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - gethwaddr.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int gethwaddr (void volatile * memory, char const * device);
- *
- *   ether.h
- *
- *   encode memory with the hardware address of a named host Ethernet
- *   interface;
- *
- *   there are two ways to obtain the hardware address on Linux; we
- *   use the first because some systems do not support getifaddrs()
- *   and some implementations are inconsistent;
- *
- *
- *   Contributor(s):
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef GETHWADDR_SOURCE
-#define GETHWADDR_SOURCE
-
-#include <stdint.h>
-#include <unistd.h>
-#include <memory.h>
-
-#include "../tools/error.h"
-#include "../ether/ether.h"
-
-#ifndef OID_802_3_CURRENT_ADDRESS
-#define OID_802_3_CURRENT_ADDRESS 0x01010102
-#endif
-
-int gethwaddr (void * memory, char const * device)
-
-{
-
-#if defined (__linux__)
-
-#	include <ifaddrs.h>
-#	include <netpacket/packet.h>
-#	include <sys/ioctl.h>
-
-	struct ifreq ifreq;
-	int fd;
-	if ((fd = socket (AF_INET, SOCK_DGRAM, 0)) == -1)
-	{
-		error (1, errno, "%s: %s", __func__, device);
-	}
-	memcpy (ifreq.ifr_name, device, sizeof (ifreq.ifr_name));
-	if (ioctl (fd, SIOCGIFHWADDR, &ifreq) == -1)
-	{
-		close (fd);
-		return (-1);
-	}
-	memcpy (memory, ifreq.ifr_ifru.ifru_hwaddr.sa_data, ETHER_ADDR_LEN);
-	close (fd);
-
-#elif defined (__linux__)
-
-#include <ifaddrs.h>
-#include <net/if_types.h>
-
-	struct ifaddrs *ifaddrs;
-	struct ifaddrs *ifaddr;
-	if (getifaddrs (&ifaddrs) == -1)
-	{
-		error (1, errno, "No interfaces available");
-	}
-	for (ifaddr = ifaddrs; ifaddr; ifaddr = ifaddr->ifa_next)
-	{
-		if (strcmp (device, ifaddr->ifa_name))
-		{
-			continue;
-		}
-		if (!ifaddr->ifa_addr)
-		{
-			continue;
-		}
-		if (ifaddr->ifa_addr->sa_family == AF_PACKET)
-		{
-			struct sockaddr_ll * sockaddr = (struct sockaddr_ll *) (ifaddr->ifa_addr);
-			memcpy (memory, sockaddr->sll_addr, ETHER_ADDR_LEN);
-			break;
-		}
-	}
-	freeifaddrs (ifaddrs);
-
-#elif defined (__APPLE__)
-
-#include <ifaddrs.h>
-#include <net/if_dl.h>
-
-	struct ifaddrs *ifaddrs;
-	struct ifaddrs *ifaddr;
-	if (getifaddrs (&ifaddrs) == -1)
-	{
-		error (1, errno, "No interfaces available");
-	}
-	for (ifaddr = ifaddrs; ifaddr; ifaddr = ifaddr->ifa_next)
-	{
-		if (strcmp (device, ifaddr->ifa_name))
-		{
-			continue;
-		}
-		if (!ifaddr->ifa_addr)
-		{
-			continue;
-		}
-		if (ifaddr->ifa_addr->sa_family == AF_LINK)
-		{
-			struct sockaddr_dl * sockaddr = (struct sockaddr_dl *) (ifaddr->ifa_addr);
-			memcpy (memory, LLADDR (sockaddr), ETHER_ADDR_LEN);
-			break;
-		}
-	}
-	freeifaddrs (ifaddrs);
-
-#elif defined (__OpenBSD__)
-
-#include <ifaddrs.h>
-#include <net/if_dl.h>
-
-	struct ifaddrs *ifaddrs;
-	struct ifaddrs *ifaddr;
-	if (getifaddrs (&ifaddrs) == -1)
-	{
-		error (1, errno, "No interfaces available");
-	}
-	for (ifaddr = ifaddrs; ifaddr; ifaddr = ifaddr->ifa_next)
-	{
-		if (strcmp (device, ifaddr->ifa_name))
-		{
-			continue;
-		}
-		if (!ifaddr->ifa_addr)
-		{
-			continue;
-		}
-		if (ifaddr->ifa_addr->sa_family == AF_LINK)
-		{
-			struct sockaddr_dl * sockaddr = (struct sockaddr_dl *) (ifaddr->ifa_addr);
-			memcpy (memory, LLADDR (sockaddr), ETHER_ADDR_LEN);
-			break;
-		}
-	}
-	freeifaddrs (ifaddrs);
-
-#elif defined (WINPCAP) || defined (LIBPCAP)
-
-	LPADAPTER adapter = PacketOpenAdapter ((PCHAR)(device));
-	PPACKET_OID_DATA data = (PPACKET_OID_DATA)(malloc (ETHER_ADDR_LEN + sizeof (PACKET_OID_DATA)));
-	if (!data)
-	{
-		error (1, errno, "Can't allocate packet: %s", device);
-	}
-	data->Oid = OID_802_3_CURRENT_ADDRESS;
-	data->Length = ETHER_ADDR_LEN;
-	if ((adapter == 0) || (adapter->hFile == INVALID_HANDLE_VALUE))
-	{
-		error (1, errno, "Can't access interface: %s", device);
-	}
-	if (!PacketRequest (adapter, FALSE, data))
-	{
-		memset (memory, 0, ETHER_ADDR_LEN);
-		PacketCloseAdapter (adapter);
-		free (data);
-		return (-1);
-	}
-	memcpy (memory, data->Data, data->Length);
-	PacketCloseAdapter (adapter);
-	free (data);
-
-#else
-#error "Unknown environment"
-#endif
-
-	return (0);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/getifname.c.html b/docbook/getifname.c.html deleted file mode 100644 index f87206d1..00000000 --- a/docbook/getifname.c.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - getifname.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   char * getifname (signed number);
- *
- *   ether.h
- *
- *   return the PCAP interface name for a given interface number; this
- *   function is only needed when using LIBPCAP or WINPCAP libraries;
- *
- *
- *   Contributor(s):
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef GETIFNAME_SOURCE
-#define GETIFNAME_SOURCE
-
-#include <string.h>
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-#include <pcap.h>
-#endif
-
-#include "../ether/ether.h"
-#include "../tools/error.h"
-
-char * getifname (signed index)
-
-{
-	char * name = (char *)(0);
-
-#if defined (__linux__)
-
-#elif defined (__APPLE__) || defined (__OpenBSD__)
-
-#elif defined (WINPCAP) || defined (LIBPCAP)
-
-	char buffer [PCAP_ERRBUF_SIZE];
-	pcap_if_t *devices = (pcap_if_t *)(0);
-	pcap_if_t *device;
-	signed count;
-	if (pcap_findalldevs (&devices, buffer) == -1)
-	{
-		error (1, errno, "can't enumerate pcap devices");
-	}
-	for (device = devices, count = 1; device; device = device->next, count++)
-	{
-		if (count == index)
-		{
-			name = strdup (device->name);
-			break;
-		}
-	}
-	if (!device)
-	{
-		error (1, EINVAL, "invalid interface: %d", index);
-	}
-	pcap_freealldevs (devices);
-
-#else
-#error "Unknown environment"
-#endif
-
-	return (name);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/getoptv.c.html b/docbook/getoptv.c.html deleted file mode 100644 index d0155ab4..00000000 --- a/docbook/getoptv.c.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - getoptv.c - - - - - - - - - -
-/*====================================================================*
- *
- *   int getoptv (int argc, char const * argv[], char const * optv[]);
- *
- *   getoptv.h
- *
- *   this is a posix compliant getopt() function that supports no
- *   extensions; see the posix website for specification details;
- *
- *   <http://www.opengroup.org/onlinepubs/007904975/functions/getopt.html>
- *
- *   we implemented this function to ensure that linux and windows
- *   consoles act the same; microsoft c++ would not compile the
- *   debian version of getopt and so, after trying to fix things,
- *   we decided to start fresh; the debian version is too complex;
- *
- *   this function conforms to posix standard; it does not support
- *   gnu style extensions like "--option" for arguments or "ab::c"
- *   for operands; if you don't know what that means then you won't
- *   care, either; you should avoid such extentions, anyway;
- *
- *   the posix standard says that command options and operands must
- *   precede other arguments; this version of getopt allows options
- *   and operands to appear anywhere and makes non-compliant argv[]
- *   compliant in the process;
- *
- *   we define characters instead of coding them so that microsoft
- *   folks can use '/' instead of '-' and still preserve the posix
- *   behaviour;
- *
- *   we declare optarg as "char const *" so that the target cannot
- *   be changed by the application; this is not POSIX compliant so
- *   it will conflict with other getopt variants; getopt.h is often
- *   included with unistd.h which is a common file;
- *
- *   systems.
- *
- *   this version calls virtually no functions and should compile
- *   on any posix system;
- *
- *   you may include getoptv.h or declare these variables:
- *
- *    extern char const *optarg;
- *    extern int optopt;
- *    extern int optind;
- *    extern int opterr;
- *
- *   you may cut and paste this c language code segment to get you
- *   started; you must insert your own code and case breaks;
- *
- *    signed c;
- *    optind = 1;
- *    opterr = 1;
- *
- *    while ((c = getoptv(argc, argv, * optv)) != -1)
- *    {
- *       switch(c)
- *       {
- *          case 'a': // optopt is 'a'; optarg is NULL;
- *          case 'b': // optopt is 'b'; optarg is operand;
- *          case ':': // optopt is option; optarg is NULL; missing operand;
- *          case '?': // optopt is option; optarg is NULL; illegal option;
- *           default: // optopt is option: optarg is NULL; illegal option;
- *       }
- *    }
- *
- *    after options and operands are processed, optind points to
- *    the next argv [] string; loop until optind equals argc or
- *    argv[optind] is NULL; we check both but either will do;
- *
- *    while ((optind < argc) && (argv [optind]))
- *    {
- *       // do stuff to argv[optind++].
- *    }
- *
- *   alternately, and even better, the following works just fine:
- *
- *    argc -= optind;
- *    argv += optind;
- *    while ((argc) && (* argv))
- *    {
- *       // do stuff to * argv.
- *
- *    }
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef GETOPTV_SOURCE
-#define GETOPTV_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/version.h"
-#include "../tools/error.h"
-
-char const * program_name = "program";
-char * optarg = (char *) (0);
-signed optopt = (char) (0);
-signed optind = 1;
-signed opterr = 1;
-signed optmin = 0;
-signed getoptv (int argc, char const * argv [], char const * optv [])
-
-{
-	static char const * string;
-	static char const * option;
-	static signed count;
-	signed index;
-	if ((optind == 0) || (optind == 1))
-	{
-		for (program_name = string = * argv; * string; string++)
-		{
-			if ((* string == '/') || (* string == '\\'))
-			{
-				program_name = string + 1;
-			}
-		}
-		string = (char *) (0);
-		if (argc == optmin)
-		{
-			putoptv (optv);
-			exit (0);
-		}
-		count = optind = 1;
-	}
-	while ((count < argc) || (string))
-	{
-		if (string)
-		{
-			if (*string)
-			{
-				optarg = (char *) (0);
-				optopt = *string++;
-				for (option = * optv; * option; option++)
-				{
-					if (optopt == GETOPTV_C_OPERAND)
-					{
-						continue;
-					}
-					if (*option == GETOPTV_C_OPERAND)
-					{
-						continue;
-					}
-					if (*option == optopt)
-					{
-						option++;
-						if (*option != GETOPTV_C_OPERAND)
-						{
-							return (optopt);
-						}
-						if (*string)
-						{
-							optarg = (char *) (string);
-							string = (char *) (0);
-							return (optopt);
-						}
-						if (count < argc)
-						{
-							optarg = (char *)(argv [count]);
-							for (index = count++; index > optind; index--)
-							{
-								argv [index] = argv [index - 1];
-							}
-							argv [optind++] = optarg;
-							return (optopt);
-						}
-						if (opterr)
-						{
-							error (1, 0, "option '%c' needs an operand.", optopt);
-						}
-						if (** optv == GETOPTV_C_OPERAND)
-						{
-							return (GETOPTV_C_OPERAND);
-						}
-						return (GETOPTV_C_ILLEGAL);
-					}
-				}
-				if (opterr)
-				{
-					error (1, 0, "option '%c' has no meaning.", optopt);
-				}
-				return (GETOPTV_C_ILLEGAL);
-			}
-			else
-			{
-				string = (char *) (0);
-			}
-		}
-		if (count < argc)
-		{
-			string = argv [count];
-			if (*string == GETOPTV_C_OPTION)
-			{
-				for (index = count; index > optind; index--)
-				{
-					argv [index] = argv [index - 1];
-				}
-				argv [optind++] = string++;
-				if (*string == GETOPTV_C_VERSION)
-				{
-					version ();
-					exit (0);
-				}
-				if (*string == GETOPTV_C_SUMMARY)
-				{
-					putoptv (optv);
-					exit (0);
-				}
-				if (*string == GETOPTV_C_OPTION)
-				{
-					string++;
-					if (!strcmp (string, ""))
-					{
-						optarg = (char *) (0);
-						optopt = (char) (0);
-						return (-1);
-					}
-					if (!strcmp (string, "version"))
-					{
-						version ();
-						exit (0);
-					}
-					if (!strcmp (string, "help"))
-					{
-						putoptv (optv);
-						exit (0);
-					}
-					optarg = (char *)(string);
-					optopt = GETOPTV_C_OPTION;
-					return (-1);
-				}
-			}
-			else
-			{
-				string = (char *) (0);
-			}
-			count++;
-		}
-	}
-	optarg = (char *) (0);
-	optopt = (char) (0);
-	return (-1);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/getoptv.h.html b/docbook/getoptv.h.html deleted file mode 100644 index cdf87a0e..00000000 --- a/docbook/getoptv.h.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - getoptv.h - - - - - - - - - -
-/*====================================================================*
- *
- *   getoptv.h - getopt related definitions and declarations;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef GETOPTV_HEADER
-#define GETOPTV_HEADER
-
-/*====================================================================*
- *   constant definitions;
- *--------------------------------------------------------------------*/
-
-#define GETOPTV_VERSION 1
-#define GETOPTV_SUMMARY 1
-
-#define GETOPTV_C_OPTION  ('-')
-#define GETOPTV_C_OPERAND (':')
-#define GETOPTV_C_ILLEGAL ('?')
-#define GETOPTV_C_VERSION ('!')
-#define GETOPTV_C_SUMMARY ('?')
-
-/*====================================================================*
- *   variable declarations;
- *--------------------------------------------------------------------*/
-
-extern char * optarg;
-extern signed optopt;
-extern signed optind;
-extern signed opterr;
-extern signed optmin;
-
-/*====================================================================*
- *   function declarations;
- *--------------------------------------------------------------------*/
-
-signed getoptv (int argc, char const * argv [], char const * optv []);
-
-/*====================================================================*
- *   end definitions;
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/getpib.1.html b/docbook/getpib.1.html deleted file mode 100644 index f1dc1f92..00000000 --- a/docbook/getpib.1.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - getpib.1 - - - - - - - - - -
-getpib(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   getpib(1)
-
-NAME
-       getpib - Qualcomm Atheros PIB Data Extractor
-
-SYNOPSIS
-       getpib file offset format [length]
-
-DESCRIPTION
-       This  program is a companion to program setpib and is designed to support shell scripts.  It extracts PIB file parameters
-       so that a scripting language can evaluate, manipulate or store them with minimal effort.  Good scripting skills and  some
-       imagination may be required to make effective use of this program.
-
-       Users having a detailed knowledge of PIB content and structure can make extremely effective use of this program; however,
-       Atheros is under no obligation to provide customers with the offset, length or format of PIB file parameters.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       - c character
-              The appended character.  Append this character each line of output instead of newline.  Use this to create a comma
-              separated list of value, for example, by specifying a comma.
-
-       -n     Append a newline to the output.
-
-       -q     Enable quiet mode which has no effect.
-
-       -v     Verbose mode.  Does nothing.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Usethis  option  when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   The PIB filename.  This argument is required and must appear first on the command line.  No assumptions  are  made
-              based on filename and no filename conventions are enforced; however, an invalid PIB file will be rejected.
-
-       offset The  data  offset  in  bytes expressed in hexadecimal.  This argument is required and must follow the filename.  A
-              leading "0x" prefix is optional.  The data offset plus the data length cannot exceed the file extent.
-
-       format The output format.  This argument is required and must follow the offset.  Some formats imply fixed  data  length.
-              Others formats are for variable length data.  The fixed data formats are byte, word, long, hfid, mac and key.  The
-              variable data formats are data and text.  The formats are described in the next section.
-
-       length The data length in bytes expressed in decimal.  This argument is only required for the the data formats  data  and
-              text.  The data offset plus the data length cannot exceed the file extent.  The data length cannot exceed 1024.
-
-FORMATS
-       byte   Extract  1  byte  and  display it as an unsigned decimal integer value.  The offset advances  byte before starting
-              another extraction.
-
-       word   Extract 2 consecutive bytes and display them as an unsigned decimal integer value after  endian  conversion.   The
-              offset advances  bytes before starting another extraction.
-
-       long   Extract  4  consecutive  bytes and display them as an unsigned decimal integer value after endian conversion.  The
-              offset advances 4 bytes before starting another extraction.
-
-       huge   Extract 8 consecutive bytes and display them as an unsigned decimal integer value after  endian  conversion.   The
-              offset advances 8 bytes before starting another extraction.
-
-       xbyte  Extract  1  byte and display it as a hexadecimal integer value.  The offset advances  byte before starting another
-              extraction.
-
-       xword  Extract 2 consecutive bytes and display them as a hexadecimal integer value after endian conversion.   The  offset
-              advances  bytes before starting another extraction.
-
-       xlong  Extract  4  consecutive bytes and display them as a hexadecimal integer value after endian conversion.  The offset
-              advances 4 bytes before starting another extraction.
-
-       xhuge  Extract 8 consecutive bytes and display them as a hexadecimal integer value after endian conversion.   The  offset
-              advances 8 bytes before starting another extraction.
-
-       data length
-              Extract  the  specified  number  of bytes and display them as a hexadecimal string with no punctuation to separate
-              octets.  The offset advances length bytes before starting another extraction.  The minimum length is 1.  The maxi‐
-              mum length is 1024.
-
-       mac    Extract  6  bytes  and  display  them as a colon-separated hexadecimal string.  The offset advances 6 bytes before
-              starting another extraction.  This is similar to "data 6" but colons separate each octet.
-
-       key    Extract 16 bytes and display them as a colon-separated hexadecimal string.  The offset advances  16  bytes  before
-              starting another extraction.  This is similar to "data 16" but colons separate each octet.
-
-       hfid   Extract  64 consecutive bytes and display them as an ASCII string that terminates at the first non-printable char‐
-              acter.  The offset advances 64 bytes before starting another extraction.  This is equivalent to "text 64".
-
-       skip length
-              Advance the specified number of bytes without displaying anything.  The offset advances  by  length  bytes  before
-              starting another extraction.  The minimum length is 1.  The maximum length is 1024.
-
-       text length
-              Extract  the specified number of bytes and display them as an ASCII string that terminates at the first non-print‐
-              able character.  The offset advances the specified number of bytes before starting another extraction.
-
-TR-069
-       accesspassword
-              Extract 65 consecutive bytes and display them as an ASCII string that terminates at the first non-printable  char‐
-              acter.  The offset advances 65 bytes before starting another extraction.  This format is equivalent to "text 65".
-
-       accessusername
-              Extract  33 consecutive bytes and display them as an ASCII string that terminates at the first non-printable char‐
-              acter.  The offset advances 33 bytes before starting another extraction.  This format is equivalent to "text 33".
-
-       adminpassword
-              Extract 33 consecutive bytes and display them as an ASCII string that terminates at the first non-printable  char‐
-              acter.  The offset advances 33 bytes before starting another extraction.  This format is equivalent to "text 33".
-
-       adminusername
-              Extract  33 consecutive bytes and display them as an ASCII string that terminates at the first non-printable char‐
-              acter.  The offset advances 33 bytes before starting another extraction.  This format is equivalent to "text 33".
-
-       password
-              Extract 257 consecutive bytes and display them as an ASCII string that terminates at the first non-printable char‐
-              acter.   The  offset  advances  257  bytes before starting another extraction.  This format is equivalent to "text
-              257".
-
-       url    Extract 257 consecutive bytes and display them as an ASCII string that terminates at the first non-printable char‐
-              acter.   The  offset  advances  257  bytes before starting another extraction.  This format is equivalent to "text
-              257".
-
-       username
-              Extract 257 consecutive bytes and display them as an ASCII string that terminates at the first non-printable char‐
-              acter.   The  offset  advances  257  bytes before starting another extraction.  This format is equivalent to "text
-              257".
-
-EXAMPLES
-       The following example extracts one byte from offset 01F7 of PIB file abc.pib and displays it as an unsigned decimal inte‐
-       ger  string.   No  length specification is needed because the byte format has an implied length of 1 byte.  The displayed
-       value is 232 because the byte format is decimal.  We could have specified "data 1" to display the  byte  in  hexadecimal.
-       The return prompt appears on the display line because option -n was omitted.
-
-          # getpib abc.pib 01F7 byte
-          232#
-
-       The  next  example  extracts two bytes at offset 01F7 and displays them as a hexadecimal string.  A length of 2 is needed
-       because the data format is variable length.  We could have specified "word" to display these bytes as an unsigned decimal
-       integer  string.   The hexadecimal string consists two octets E8 and 8A.  The first byte is the same one extracted in the
-       last example.  The return prompt appears on a new line because option -n was present.
-
-          # getpib abc.pib 01F7 data 2 -n
-          E88A
-          #
-
-DISCLAIMER
-       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
-       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
-       out any obligation to notify or compensate users of this program.
-
-SEE ALSO
-       chkpib(7), chkpib2(7), modpib(1), pib2xml(1), pibcomp(1), pibdump(1), setpib(1), xml2pib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                   getpib(1)
-
- - - diff --git a/docbook/getpib.c.html b/docbook/getpib.c.html deleted file mode 100644 index 30c8d158..00000000 --- a/docbook/getpib.c.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - - - getpib.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   getpib.c - PIB Data Extractor
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../pib/pib.h"
-#include "../nvm/nvm.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/basespec.c"
-#include "../tools/todigit.c"
-#include "../tools/hexout.c"
-#include "../tools/error.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmseek2.c"
-#endif
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define GETPIB_COMMA ' '
-#define GETPIB_TOOBIG "object '%s' exceeds extent of " SIZE_T_SPEC " bytes"
-#define GETPIB_NOSIZE "object '%s' has no length"
-
-#define GETPIB_VERBOSE (1 << 0)
-#define GETPIB_SILENCE (1 << 1)
-#define GETPIB_NEWLINE (1 << 2)
-
-/*====================================================================*
- *
- *   void getmemory (byte const * memory, size_t extent, char const * object, size_t length);
- *
- *--------------------------------------------------------------------*/
-
-static void getmemory (byte const * memory, size_t extent, char const * object, size_t length) 
-
-{ 
-	if (length > extent) 
-	{ 
-		error (1, ECANCELED, GETPIB_TOOBIG, object, length); 
-	} 
-	hexout (memory, length, ':', '\0', stdout); 
-	return; 
-} 
-
-/*====================================================================*
- *
- *   void getstring (byte const * memory, size_t extent, char const * object, size_t length);
- *
- *--------------------------------------------------------------------*/
-
-static void getstring (byte const * memory, size_t extent, char const * object, size_t length) 
-
-{ 
-	char const * string = (char const *) (memory); 
-	if (length > extent) 
-	{ 
-		error (1, ECANCELED, GETPIB_TOOBIG, object, length); 
-	} 
-	while (isprint (* string) && (length--)) 
-	{ 
-		putc (* string++, stdout); 
-	} 
-	return; 
-} 
-
-/*====================================================================*
- *
- *   void snatch (int argc, char const * argv [], byte const * memory, size_t extent, char comma);
- *
- *   extract and print the specified data objects from memory; comma
- *   delimits consecutive objects on output; 
- *
- *--------------------------------------------------------------------*/
-
-static void snatch (int argc, char const * argv [], byte const * memory, size_t extent, char comma) 
-
-{ 
-	size_t length = 0; 
-	size_t offset = 0; 
-	if (! (argc) || ! (* argv)) 
-	{ 
-		error (1, ECANCELED, "Need an offset"); 
-	} 
-	offset = (size_t) (basespec (* argv, 16, sizeof (uint32_t))); 
-	if (offset > extent) 
-	{ 
-		error (1, ECANCELED, "offset " SIZE_T_SPEC " exceeds extent of " SIZE_T_SPEC " bytes", offset, extent); 
-	} 
-	memory += offset; 
-	extent -= offset; 
-	argc--; 
-	argv++; 
-	while ((argc) && (* argv)) 
-	{ 
-		char const * object = * argv; 
-		argc--; 
-		argv++; 
-		if (! strcmp (object, "byte")) 
-		{ 
-			uint8_t * number = (uint8_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("%u", * number); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-		else if (! strcmp (object, "word")) 
-		{ 
-			uint16_t * number = (uint16_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("%u", LE16TOH (* number)); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-		else if (! strcmp (object, "long")) 
-		{ 
-			uint32_t * number = (uint32_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("%u", LE32TOH (* number)); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-		else if (! strcmp (object, "huge")) 
-		{ 
-			uint64_t * number = (uint64_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("%llu", LE64TOH (* number)); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-
-#if 1
-
-		else if (! strcmp (object, "xbyte")) 
-		{ 
-			uint8_t * number = (uint8_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("0x%02X", * number); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-		else if (! strcmp (object, "xword")) 
-		{ 
-			uint16_t * number = (uint16_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("0x%04X", LE16TOH (* number)); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-		else if (! strcmp (object, "xlong")) 
-		{ 
-			uint32_t * number = (uint32_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("0x%08X", LE32TOH (* number)); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-		else if (! strcmp (object, "xhuge")) 
-		{ 
-			uint64_t * number = (uint64_t *) (memory); 
-			if (sizeof (* number) > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			printf ("0x%016llX", LE64TOH (* number)); 
-			memory += sizeof (* number); 
-			extent -= sizeof (* number); 
-		} 
-
-#endif
-
-		else if (! strcmp (object, "mac")) 
-		{ 
-			length = ETHER_ADDR_LEN; 
-			if (length > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			getmemory (memory, extent, object, length); 
-			memory += length; 
-			extent -= length; 
-		} 
-		else if (! strcmp (object, "key")) 
-		{ 
-			length = PIB_KEY_LEN; 
-			if (length > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			getmemory (memory, extent, object, length); 
-			memory += length; 
-			extent -= length; 
-		} 
-		else if (! strcmp (object, "hfid")) 
-		{ 
-			length = PIB_HFID_LEN; 
-			if (length > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			getstring (memory, extent, object, length); 
-			memory += length; 
-			extent -= length; 
-		} 
-
-#if 1
-
-		else if (! strcmp (object, "adminusername") || ! strcmp (object, "adminpassword") || ! strcmp (object, "accessusername")) 
-		{ 
-			length = PIB_NAME_LEN +  1; 
-			if (length > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			getstring (memory, extent, object, length); 
-			memory += length; 
-			extent -= length; 
-		} 
-		else if (! strcmp (object, "accesspassword")) 
-		{ 
-			length = PIB_HFID_LEN +  1; 
-			if (length > extent) 
-			{ 
-				error (1, ECANCELED, GETPIB_TOOBIG, object, extent); 
-			} 
-			getstring (memory, extent, object, length); 
-			memory += length; 
-			extent -= length; 
-		} 
-		else if (! strcmp (object, "username") || ! strcmp (object, "password") || ! strcmp (object, "url")) 
-		{ 
-			length = PIB_TEXT_LEN +  1; 
-			getstring (memory, extent, object, length); 
-			memory += length; 
-			extent -= length; 
-		} 
-
-#endif
-
-		else if (! strcmp (object, "data")) 
-		{ 
-			if (! * argv) 
-			{ 
-				error (1, EINVAL, GETPIB_NOSIZE, object); 
-			} 
-			length = (unsigned) (uintspec (* argv, 1, extent)); 
-			hexout (memory, length, 0, 0, stdout); 
-			memory += length; 
-			extent -= length; 
-			argc--; 
-			argv++; 
-		} 
-		else if (! strcmp (object, "text")) 
-		{ 
-			if (! * argv) 
-			{ 
-				error (1, EINVAL, GETPIB_NOSIZE, object); 
-			} 
-			length = (unsigned) (uintspec (* argv, 1, extent)); 
-			getstring (memory, extent, object, length); 
-			memory += length; 
-			extent -= length; 
-			argc--; 
-			argv++; 
-		} 
-		else if (! strcmp (object, "skip")) 
-		{ 
-			if (! * argv) 
-			{ 
-				error (1, EINVAL, GETPIB_NOSIZE, object); 
-			} 
-			length = (unsigned) (uintspec (* argv, 1, extent)); 
-			memory += length; 
-			extent -= length; 
-			argc--; 
-			argv++; 
-			continue; 
-		} 
-		else 
-		{ 
-			error (1, ENOTSUP, "%s", object); 
-		} 
-		if ((argc) && (* argv)) 
-		{ 
-			putc (comma, stdout); 
-		} 
-	} 
-	return; 
-} 
-
-/*====================================================================*
- *
- *   signed pibimage1 (int argc, char const * argv [], char comma);
- * 
- *   read an entire flat parameter file into memory, edit it, save 
- *   it and display it;
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibimage1 (int argc, char const * argv [], char comma) 
-
-{ 
-	signed fd; 
-	off_t extent; 
-	byte * memory; 
-	if ((fd = open (* argv, O_BINARY | O_RDWR)) == - 1) 
-	{ 
-		error (1, errno, FILE_CANTOPEN, * argv); 
-	} 
-	if ((extent = lseek (fd, 0, SEEK_END)) == - 1) 
-	{ 
-		error (1, errno, FILE_CANTSIZE, * argv); 
-	} 
-	if (lseek (fd, 0, SEEK_SET)) 
-	{ 
-		error (1, errno, FILE_CANTHOME, * argv); 
-	} 
-	if (! (memory = malloc (extent))) 
-	{ 
-		error (1, errno, FILE_CANTLOAD, * argv); 
-	} 
-	if (read (fd, memory, extent) != extent) 
-	{ 
-		error (1, errno, FILE_CANTREAD, * argv); 
-	} 
-	close (fd); 
-	snatch (argc - 1, argv +  1, memory, extent, comma); 
-	free (memory); 
-	return (0); 
-} 
-
-/*====================================================================*
- *
- *   signed pibimage2 (int argc, char const * argv [], char comma);
- * 
- *   read an entire flat parameter file into memory, edit it, save 
- *   it and display it;
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed pibimage2 (int argc, char const * argv [], char comma) 
-
-{ 
-	struct nvm_header2 header; 
-	signed fd; 
-	off_t extent; 
-	byte * memory; 
-	if ((fd = open (* argv, O_BINARY | O_RDWR)) == - 1) 
-	{ 
-		error (1, errno, FILE_CANTOPEN, * argv); 
-	} 
-	if (nvmseek2 (fd, * argv, & header, NVM_IMAGE_PIB)) 
-	{ 
-		error (1, errno, "Can't find PIB image in %s", * argv); 
-	} 
-	extent = LE32TOH (header.ImageLength); 
-	if (! (memory = malloc (extent))) 
-	{ 
-		error (1, errno, FILE_CANTLOAD, * argv); 
-	} 
-	if (read (fd, memory, extent) != extent) 
-	{ 
-		error (1, errno, FILE_CANTREAD, * argv); 
-	} 
-	close (fd); 
-	snatch (argc - 1, argv +  1, memory, extent, comma); 
-	free (memory); 
-	return (0); 
-} 
-
-/*====================================================================*
- *
- *   signed function (int argc, char const * argv [], char comma);
- *
- *   call an appropriate parameter edit function based on the file 
- *   header;
- *
- *   older parameter files are flat with their own header; newer ones
- *   are image chains where one of image contains the parameter block;
- *
- *   
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed function (int argc, char const * argv [], char comma) 
-
-{ 
-	uint32_t version; 
-	signed status; 
-	signed fd; 
-	if ((fd = open (* argv, O_BINARY | O_RDWR)) == - 1) 
-	{ 
-		error (1, errno, FILE_CANTOPEN, * argv); 
-	} 
-	if (read (fd, & version, sizeof (version)) != sizeof (version)) 
-	{ 
-		error (1, errno, FILE_CANTREAD, * argv); 
-	} 
-	close (fd); 
-	if (LE32TOH (version) == 0x00010001) 
-	{ 
-		status = pibimage2 (argc, argv, comma); 
-	} 
-	else 
-	{ 
-		status = pibimage1 (argc, argv, comma); 
-	} 
-	return (status); 
-} 
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *   
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv []) 
-
-{ 
-	static char const * optv [] = 
-	{ 
-		"c:qvn", 
-		"file offset type [size]\n\n\tstandard-length types are 'byte'|'word'|'long'|'huge'|'hfid'|'mac'|'key'\n\tvariable-length types are 'data'|'text'|'skip' and need a size", 
-		"PIB Data Extractor", 
-		"c c\tobject separator is (c) [" LITERAL (GETPIB_COMMA) "]", 
-		"n\tappend newline", 
-		"q\tquiet mode", 
-		"v\tverbose mode", 
-		(char const *) (0)
-	}; 
-	flag_t flags = (flag_t) (0); 
-	char comma = GETPIB_COMMA; 
-	signed c; 
-	optind = 1; 
-	opterr = 1; 
-	while (~ (c = getoptv (argc, argv, optv))) 
-	{ 
-		switch (c) 
-		{ 
-		case 'c': 
-			comma = * optarg; 
-			break; 
-		case 'n': 
-			_setbits (flags, GETPIB_NEWLINE); 
-			break; 
-		case 'q': 
-			_setbits (flags, GETPIB_SILENCE); 
-			break; 
-		case 'v': 
-			_setbits (flags, GETPIB_VERBOSE); 
-			break; 
-		default: 
-			break; 
-		} 
-	} 
-	argc -= optind; 
-	argv += optind; 
-	if ((argc) && (* argv)) 
-	{ 
-		function (argc, argv, comma); 
-		if (_anyset (flags, GETPIB_NEWLINE)) 
-		{ 
-			putc ('\n', stdout); 
-		} 
-	} 
-	return (0); 
-} 
-
- - - diff --git a/docbook/gettimeofday.c.html b/docbook/gettimeofday.c.html deleted file mode 100644 index de72bcaf..00000000 --- a/docbook/gettimeofday.c.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - gettimeofday.c - - - - - - - - - -
-/*====================================================================*
- *
- *   gettimeofday.c - get time of day for Windows;
- *
- *   A gettimeofday implementation for Microsoft Windows;
- *
- *   Public domain code, author "ponnada";
- *
- *--------------------------------------------------------------------*/
-
-#ifndef GETTIMEOFDAY_SOURCE
-#define GETTIMEOFDAY_SOURCE
-
-#include <time.h>
-#include <windows.h>
-#include <sys/time.h>
-
-int gettimeofday (struct timeval *tv, struct timezone *tz)
-
-{
-	FILETIME ft;
-	unsigned __int64 tmpres = 0;
-	static int tzflag = 0;
-	if (NULL != tv)
-	{
-		GetSystemTimeAsFileTime (&ft);
-		tmpres |= ft.dwHighDateTime;
-		tmpres <<= 32;
-		tmpres |= ft.dwLowDateTime;
-		tmpres /= 10;
-		tmpres -= DELTA_EPOCH_IN_MICROSECS;
-		tv->tv_sec = (long)(tmpres / 1000000UL);
-		tv->tv_usec = (long)(tmpres % 1000000UL);
-	}
-	if (NULL != tz)
-	{
-		if (!tzflag)
-		{
-			_tzset ();
-			tzflag++;
-		}
-		tz->tz_minuteswest = _timezone / 60;
-		tz->tz_dsttime = _daylight;
-	}
-	return 0;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/gpioinfo.c.html b/docbook/gpioinfo.c.html deleted file mode 100644 index 96de5fe1..00000000 --- a/docbook/gpioinfo.c.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - gpioinfo.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   gpioinfo.c - print gpio Iinformation
- *
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <limits.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/types.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/todigit.c"
-#include "../tools/hexstring.c"
-#include "../tools/hexdecode.c"
-#include "../tools/error.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define TM_VERBOSE (1 << 0)
-#define TM_SILENCE (1 << 1)
-
-#define OFFSET 0x24BF
-#define LENGTH 50
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"",
-		"file [file] [...] [> stdout]",
-		"print GPIO information",
-		(char const *) (0)
-	};
-
-#ifndef __GNUC__
-#pragma pack (push, 1)
-#endif
-
-	typedef struct __packed EventBlock
-	{
-		uint8_t EvtPriorityId;
-		uint8_t EvtId;
-		uint8_t BehId [3];
-		uint16_t ParticipatingGPIOs;
-		uint8_t EventAttributes;
-		uint8_t RSVD [3];
-	}
-	EventBlock;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	struct EventBlock EventBlockArray [50];
-	file_t fd;
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	while ((argc) && (* argv))
-	{
-		if ((fd = open (* argv, O_BINARY|O_RDONLY)) == -1)
-		{
-			error (0, errno, "Can't open %s", * argv);
-		}
-		else if (lseek (fd, OFFSET, SEEK_SET) != OFFSET)
-		{
-			error (0, errno, "Can't seek %s", * argv);
-			close (fd);
-		}
-		else if (read (fd, &EventBlockArray, sizeof (EventBlockArray)) != sizeof (EventBlockArray))
-		{
-			error (0, errno, "Can't read %s", * argv);
-			close (fd);
-		}
-		else
-		{
-			for (c = 0; c < LENGTH; c++)
-			{
-				struct EventBlock * EventBlock = (&EventBlockArray [c]);
-				char string [10];
-				printf ("EvtPriorityId %3d ", EventBlock->EvtPriorityId);
-				printf ("EvtId %3d ", EventBlock->EvtId);
-				printf ("BehId %s ", hexstring (string, sizeof (string), EventBlock->BehId, sizeof (EventBlock->BehId)));
-				printf ("ParticipatingGPIOs %3d ", EventBlock->ParticipatingGPIOs);
-				printf ("EventAttributes %3d ", EventBlock->EventAttributes);
-				printf ("\n");
-			}
-			close (fd);
-		}
-		argc--;
-		argv++;
-	}
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/hardware.sh.html b/docbook/hardware.sh.html deleted file mode 100644 index 305edaea..00000000 --- a/docbook/hardware.sh.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - hardware.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/hardware.sh
-
-# this file defines the names and addresses of ethernet interfaces
-# on the host and the powerline device connected to each; every host 
-# should have its own copy of this file so that generic scripts can 
-# written and moved from one host to another without change;
-#
-# symbol ETH is referenced in files such as start.sh, flash.sh and
-# upgrade.sh that operation on one device only; 
-#
-# symbols ETH1, ETH2, NIC1, NIC, PLD1 and PLD22 are referenced in 
-# files such as pts.sh that operate on two devices; by convention: 
-#
-# interface ETH1 has address NIC1 and is connected to device PLD1;
-# interface ETH2 had address NIC2 and is connected to device PLD2;
-#
-# to include this file in a new script:
-#
-# . ${SCRIPTS}/hardware.sh
-#
-
-# ====================================================================
-# symbols;
-# --------------------------------------------------------------------
-
-ETH=eth1
-
-# ====================================================================
-# host interface names;
-# --------------------------------------------------------------------
-
-ETH1=eth2 
-ETH2=eth4 
-
-# ====================================================================
-# host interface addresses;
-# --------------------------------------------------------------------
-
-NIC1=00:50:04:a5:d9:5a  
-NIC2=00:01:02:d0:8f:89  
-
-# ====================================================================
-# powerline device addresses;
-# --------------------------------------------------------------------
-
-PLD1=00:B0:52:00:FD:0D 
-PLD2=00:B0:52:00:FD:0E 
-
-# ====================================================================
-# miscellaneous device addresses;
-# --------------------------------------------------------------------
-
-master=00:b0:52:da:da:01
-slave1=00:b0:52:da:da:02
-slave2=00:b0:52:da:da:03
-slave3=00:b0:52:da:da:04
-slave4=00:b0:52:dd:dd:05
-
-
-
- - - diff --git a/docbook/hardware.xml b/docbook/hardware.xml deleted file mode 100644 index d1ccd93e..00000000 --- a/docbook/hardware.xml +++ /dev/null @@ -1,921 +0,0 @@ - - - Hardware - -
- - Introduction - - - -
-
- - Device Form Factors - - - Atheros Communications, Ocala FL USA designs and manufactures chipsets that permit network communications over powerline. They do no not manufacture powerline communication products for market. Instead, they provide chipsets, reference designs and expertise needed to build powerline communications products. Atheros does manufacture some sample products, in various form factors, for evaluation purposes only. - - - - - Wall Adapters - - - - A small unit that plugs into any power outlet and has one RJ45 Ethernet jack. The RJ45 jack can be used to connect the unit to another Ethernet device, such as a hub, switch or computer network interface card using CAT5 Ethernet cable. Two or more such units can be used to connect Ethernet devices over the powerline. For example, a computer on one room can be connected to a network printer in another room. See Atheros Product Brief 27003417 - RD6300-ETH HomePlug AV Wall Adapter Reference Design for more information. - - - - - - Desktop Adapters - - - - A compact unit having a 6ft power cord, one threaded coax cable F connector and one RJ45 Ethernet jack. Two such units can be used to connect Ethernet devices over either powerline (as above) or coax cable. Use of coax cable improves performance over longer distances and permits network segments to be isolated from each other. See Atheros Product Brief 27002824 - RD6000-ETH HomePlug AV Ethernet Hybrid Adapter Reference Design for more information. - - - - - - PCI Cards - - - - A standard PCI compliant computer card having one DIN powerline connector and one threaded coax cable F connector. The card can be inserted into a PCI bus slot on a computer, or other device. Atheros provides device drivers that make the card behave like an ordinary Ethernet card. Like the desktop unit (above), computers and embedded systems can be connected either over powerline or coax cable. See Atheros Product Brief 27003239 - EK6000-PCI HomePlug AV Card Evaluation Kit for more information. - - - PCI cards are no longer available from Atheros but reference designs may be obtained from selected Atheros customers that specialize in PCI designs. - - - - - - Mini-PLC - - - - A Mini-PCI form factor card that integrates most components needed to embed HomePlug AV into your product design. Although the card will insert into a Mini-PCI slot, it is not electrically compatible with the Mini-PCI standard. Atheros uses this card in both the RD6000-ETH Desktop Adaptor and the EK6000-PCI Card described above. See Atheros Product Brief 27002835 - RD6000-PLC HomePlug AV Mini-PLC Module Reference Design for more information. - - - Unlike Wall and Desktop Adapters, the Mini-PLC Cards require a device driver written for the particular operating system used. Atheros provides a device drivers for the Windows XP Operating System and for the Linux 2.4 and Linux 2.6 kernel. These drivers make the PCI card look like an ordinary Ethernet interface card. - - - Mini-PLC cards are no longer available from Atheros but cards may be obtained from selected Atheros customers that specialize in PCI designs. - - - - - - Embedded Systems - - - - Atheros offers an expanding family of reference designs for powerline-enabled switches and routers. Most include onboard CPU and enablement software based on Linux, OpenWRT and other suitable operating systems. Atheros will assist customers in adapting the basic hardware and software to suite particular markets. - - - - - - Chipsets - - - - Atheros offers an expanding family of Powerline enabled chipsets. Several SoC chipsets are also planned to support a variety of communications applications. - - - - -
-
- - Device Communications - - - Atheros powerline communication chipsets serve as a transparent bridges between an Ethernet network and an active powerline or passive coax cable, effectively extending the Ethernet network. HomePlug AV devices on the powerline, or at either end of a coax cable, will automatically detect each other and establish communications. Normal Ethernet frames that are detected by one HomePlug AV device are passed over powerline or coax to other HomePlug AV devices which then pass the frames on to any Etherenet devices that may be connected to them. - - - There are three levels of communication. - - - - - Powerline Communications - - - - HomePlug AV devices use a proprietary protocol defined by the HomePlug Powerline Alliance. In most cases, HomePlug AV communications do not leave the powerline or coax media used to connect devices. Connected devices use this protocol to detect each other, establish connection, encapsulate Ethernet frames and route them between devices. This level of communications is proprietary and hidden. See the HomePlug Powerline Alliance HomePlug AV Specification for more information. - - - - - - Atheros Device Communications - - - - Atheros devices use a subset of the HomePlug AV protocol, mentioned above, to communicate with a local host processor. The subset is known as - - vendor-specific messages - - . Atheros vendor-specific messages are intercepted and processed by Atheros devices. In some cases, they are forwared over powerline or coax to other Atheros devices. Atheros vendor-specific messages are used to interrogate, synchronize, configure and control Atheros devices without affecting HomePlug AV devices from other manufacturers. See the Atheros HomePlug AV Firmware Technical Reference Manual for more information. - - - - - - Network Traffic - - - - This is the normal network traffic that passes transparently from local Ethernet, over powerline or coax, to remote Ethernet through HomePlug AV devices. - - - - -
-
- - Device Configurations - - - There are several test configurations that can be used to experiment with Atheros powerline communication devices. Configurations vary based on the powerline communications devices you have available to work with. All configurations described here require at least one computer with an Ethernet card and the Open Powerline Toolkit installed. Most configurations require two Atheros powerline devices. - - - Open Powerline Toolkit programs let the user specify which Ethernet interface card to use when sending and receiving Ethernet frames. This means that a computer with two interface cards installed can emulate two computers provided there are not internal routing conflicts. To avoid routing conflicts, Atheros recommends that you start with two computers until your are ready for more sophisticated experimentation. - - - Open Powerline Toolkit programs default to eth0 . This allows the computer to be connected to the normal network on eth0 and connected to the powerline network on eth1. To over-ride the default powerline interfaces, set environment variable PLC to the desired interface name. All configurations assume that the Ethernet card is installed, the Ethernet driver for that card is loaded and the correct interface is enabled. - - - Atheros powerline communication devices radiate across powerline or coax at radio frequencies. If two devices are connected, in any way, without intermmediate filters or isolation, they will attempt to commicate. Additionally, they will attempt to circumvent certain types of powerline noise or competing frequencies which can cause reduce data rates. Atheros recomends that devices under test (DUT) take their power from a shared but isolated power source like an isolation power strip or an uninterruptable power supply. - - - ( ... explain about powerline isolation ... ) The power strip should have no filtering, surge protectors or electronic cirtuits inside. - - - ---> [ATTENUATOR] ---> [POWER_STRIP] ---> [POWERLINE_DEVICE] ---> - - - Typical configurations are: - -
- - Local Host to Local Device - - - This is the simplest configuration. It establishes an Ethernet connection between the host and one powerline device. It can be used to test or program a single powerline device. - - - It requires - - - - - One host computer with an Ethernet interface card - - - - - One CAT-5 Ethernet cable with an RJ-45 connector at either end. - - - - - One Atheros powerline device with RJ-45 connector. - - - - - An isolated power source - - - - - [LOCAL_HOST] ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /-----> - - - Connect the local host to the powerline device with an ordinary CAT-5 Ethernet cable. Apply power to the powerline device. The local host cannot ping the powerline device because it functions at the data link layer. The local host can interrogate and control the powerline device using - - int6k - - or - - int6k2 - - programs. - - - - - Type "int6k -r" and note the hardware and firmware revision. - - - - - Type "int6k -I" and note the device MAC, DAK and NMK. - - - - - - Type "int6k -m" and confirm that the device detects no other devices indicating proper powerline isolation. - - - -
-
- - Local Host to Remote Device - - - This configuration is the simplest powerline network configuration. It expands the previous configuration by creating a simple powerline network having two powerline devices. One device, the "local device", is connected to the host via Ethernet. A second device, the "remote device", is connected to the first via powerline. - - - It requires - - - - - One host computer with an Ethernet interface card - - - - - One CAT-5 Ethernet cable with an RJ-45 connector at either end. - - - - - Two Atheros powerline devices, one with RJ-45 connector. - - - - - An isolated power source. - - - - - [LOCAL_HOST] ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /-----> - [POWERLINE_DEVICE] ---/ powerline /-----> - - - Configure the previous network then plug a second powerline device into the same power source as the first powerline device. The local host still cannot ping any Ethernet network devices because there are no remote Ethernet devices to ping but it can interrogate and control both powerline devices. - -
-
- - Local Host to Remote Host - - - This configuration is the simplest Ethernet network configuration. It expands the previous network by connecting the second powerline device to an existing Ethernet network through an Ethernet switch. - - - It requires - - - - - Two host computers, each with an Ethernet interface card - - - - - Two CAT-5 Ethernet cables with RJ-45 connectors at either end. - - - - - Two Atheros powerline devices, each with RJ-45 connector. - - - - - An isolated power source. - - - - - [LOCAL_HOST] ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /-----> - [REMOTE_HOST] ---/ ethernet /-----> [POWERLINE_DEVICE] ---/ powerline /-----> - - - Configure the previous network then plug the second powerline device into an Ethernet switch connected to an exiting Ethernet network. The local host can now ping other Ethernet network devices on the. - -
-
-
- - Powerline Workstations - - - The Open Powerline Toolkit is a collection of independent programs. Individually, they perform basic but useful operations on powerline communication devices and associated support files such as PIB and NVM files. Collectively, they can perform many types of engineering experiments, functional tests and production tasks. Their simplicity and high degree of flexibility lets customers adapt an off-the-shelf linux host to meet a wide range of production requirements. We call this configuration a powerline workstation. - - - This section explains how to configure a powerline workstation and setup the Open Powerline Toolkit on that workstation. It covers some necessary aspects of Linux and the Toolkit but it is not a Linux tutorial or a Open Powerline Toolkit tutorial. Linux essentials are covered on the Internet and Open Powerline Toolkit essentials are covered in other sections of this documentation and on-line man pages. Although some typical configurations are illustrated, many variations are possible and are left to the customer to develop based on our examples. There is no single correct way to do anything. - -
- - Host Hardware - - - A powerline workstation host has no special hardware requirements. Any host capable of running Linux and supporting multiple Ethernet cards will do. For example, a 450mhz CPU having 128mb of memory, one 3gb disk and three 10/100 Ethernet cards is adequate. - - - Production tasks such as device initialization or firmware upgrade require one Ethernet card. Experimentation and functional testing typically require two Ethernet cards. Atheros recommends three Ethernet cards so that the host can communicate with other hosts over a local area network while talking to powerline devices. Atheros also recommends that all Ethernet cards installed support at least 100mbps and be of the same type to simplify network configuration. - -
-
- - Host Software - - - Atheros recommends installiing a Debian-based or Ubuntu-based Linux distribution due to the simplicity of network configuration. Redhat-based or SuSE-based distributions are also acceptable. A complete GNU toolchain is required to compile and install the Open Powerline Toolkit. Atheros uses GNU make 3.8.0, GNU gcc 3.3.5 and GNU ld 2.15. If these components are not installed then you must install them. Linux system installation and configuration is beyond the scope of this documentation but there is a wealth of information available on the Internet. - - - Of course, the Open Powerline Toolkit needs to be installed and successful installation proves that all required Linux components are installed correctly. See Installation on Linux for more information on how to install the Open Powerline Toolkit. - -
-
- - Network Configuration - - - Linux will assign interface names like eth0, eth1 and eth2 to each installed network card. Atheros recommends that eth0 be connected to your local network so that you can communicate with other hosts on that network. The other two interface cards can then be connected to Atheros devices that are plugged into an isolated power-strip. Of course, one CAT-5 Ethenet cable will be needed for each Ethernet card installed. - - - Interfaces eth1 and eth2 should be assigned IP addresses on a separate sub-net so that you can ping one card from the other over the powerline without sending traffic over the local network. Remember that powerline devices have MAC addresses but not IP addresses. Also, Linux ping uses the routing table to route messages and so you may need to use the -I option when pinging over the powerline. Otherwise, ping packets may go out over the local network by default. - - -# ifconfig -eth0 Link encap:Ethernet HWaddr 00:50:04:A5:D9:5A - inet addr:192.168.99.12 Bcast:192.168.99.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - -eth1 Link encap:Ethernet HWaddr 00:01:03:2B:03:67 - inet addr:192.168.101.10 Bcast:192.168.101.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - -eth2 Link encap:Ethernet HWaddr 00:01:03:2B:03:73 - inet addr:192.168.101.11 Bcast:192.168.101.255 Mask:255.255.255.0 - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - UP LOOPBACK RUNNING MTU:16436 Metric:1 - - - The abbreviated ifconfig console display, shown above, illustrates a typical Ethernet configuration using three cards, as recommended by Atheros. Interface eth0 is on the 192.168.99.0 subnet which serves as the local network, in this case. Interfaces eth1 and eth2 are both on the 192.168.101.0 subnet which serves as the powerline network, in this case. - - - Although not required, installing both wireshark and tshark is a great idea because they can be used to monitor and log network traffic on any or all of the Ethernet interfaces during various operations. - -
-
- - Isolated Power-strip - - - Atheros devices have a way of finding each other over powerline and sometimes across nearby powerlines. Power-strip isolation prevents cross-talk with other powerline devices that may be plugged into nearby. Proper isolation is not critical when getting started but can be critical in technical evaluation and production environments. - - - There are many ways to isolate powerline devices. One way is to plug the powerline workstation and the power-strip into an Uninterruptable Power Supply (UPS). Atheros also provides several reference designs for both expensive and inexpensive hardware that can be used to isolate devices and workstations. - - - Atheros powerline devices tend to work best when there is some signal attenuation over powerline or coax connections. Engineering evaluation configurations should insert some type of variable attenuation between powerline devices to measure the performance of their own powerline device designs. Consult with your Atheros Field Application Engineer on this matter. - -
-
-
- - Send-to-self Patch - - - One advantage of Linux powerline workstations is the ability to control the low-level networking environment. ISO Layer 2 traffic can be easily directed from one Ethernet interface to another on the same host but Layer 3 traffic is a different matter because routing software merely routes this type of traffic internally. - - - A Linux kernel patch is available that will allow ISO Layer 3 traffic to be routed from one Ethernet interface to another on the same host. With this patch, multiple instances of a traffic generator, like ttcp or iperf, can be effectively deployed on the same host without modification. - - - This patch is useful for testing on a closed network but it could pose a security risk to the local host when connected to a public network. Kernels having this patch installed should have a special designation such as linux-2.6.28-send-to-self so that users are aware that the patch is installed. - - - - <quote>send-to-self</quote> Patch Description - - - The following is the full, original patch description. - -, July 2003 - - Patches for different kernels: - - send-to-self-2.4.21-1.diff - send-to-self-2.5.73-1.diff - - The presented patch implements routing of traffic between local -IP addresses externally via ethernet interfaces. This patch is basically -the Ben Greear's send-to-self work but reimplemented entirely on routing -level. The idea is to return output route via external interfaces if -path between two local IP addresses is requested and they are configured -on different interfaces with /proc/sys/net/ipv4/conf/DEVNAME/loop set to -1. As result, arp_filter (if enabled - the recommended value) -automatically accepts the ARP requests on the right interface. The -rp_filter check is modified to accept traffic from such interfaces with -local IP as sender, so using loop=1 for interfaces attached to insecure -mediums is not recommended. - -Pros: -- it can be used from all existing applications without change -- it is not limited to 2 interfaces -- you can use it with many IP addresses -- does not depend on the rp_filter and arp_filter states, they -can be set to 1 -- the packets are not altered in any way, useful for QoS testings -- the routing result is cached, the routing checks are not per packet - -Cons: -- not possible to use it for interfaces attached to insecure -mediums (the rp_filter protection allows saddr to be local IP). -By design. Use at your own risk. - - The usage is simple: - -# Connect two or more interfaces to same hub or via crossover cable - -# Enable loopback mode for eth0 and eth1. This even can be -# default mode without breaking any other talks. By this way -# we allow external routing only between local IPs configured -# on the specified interfaces. - -echo 1 > /proc/sys/net/ipv4/conf/eth0/loop -echo 1 > /proc/sys/net/ipv4/conf/eth1/loop - -# Add some IP addresses for testing, eg. client and server IP - -ip address add 192.168.1.1 dev eth0 -ip address add 192.168.2.1 dev eth1 - -# Testing with applications that are aware of this binding. -# The main thing the apps need to know is what src and dst IP -# addresses to use. The client app needs to bind to the src IP -# and by this way to request output route to the dst IP. There -# is no specific configuration for the server app listening on -# 192.168.2.1 - -ping -I 192.168.1.1 192.168.2.1 - -# Note that specifying the output device (SO_BINDTODEVICE is -# not recommended) - - -# Testing with applications that are not aware of this feature: -# for 192.168.1.1 client (the same for the server is not needed). -# Note that by default, in local routes the kernel uses the local -# IPs as preferred source. This is the safe default mode (if loop=1) -# for applications that do not care what src IP will be used -# for their talks with local IPs. We try to change that and to -# use IPs from different interfaces. - -ip route replace local 192.168.2.1 dev eth1 scope host src 192.168.1.1 proto kernel - -# but for any case, here it is and for the "server": - -ip route replace local 192.168.1.1 dev eth0 scope host src 192.168.2.1 proto kernel - -# Testing it: - -ping 192.168.2.1 -ping -I 192.168.1.1 192.168.2.1 -telnet 192.168.2.1 - -# Note that by replacing the local route's preferred source IP address -# we help the IP address autoselection to select proper IP to the -# target, in our case, route via eth -]]> - - - - <quote>send-to-self</quote> Patch Application - - - The following example illustrates how to use iperf to perform TCP and UDP traffic measurements once this patch is installed. We illustrate the use of iperf but do not necessarily endorse it for traffic measurement. We also illustrate the use of two interfaces but the send-to-self patch will support additional interfaces. We also illustrate the use of environment variables so that procedures can execute on different hosts without modification but these environment variables are not required. - - - First, we define environment variables, IF1 and IF2, for each Ethernet interface and, IP1 and IP2, for their IP addresses. Each interface must be on a separate IP subnet. We export definitions here so that they are accessible to this process and any subprocesses, such as shell scripts. Do whatever is appropriate for your environment. - - - - Next, we assign the IP addresses to the interfaces using program ifconfig. There are other ways to do this. Observe that we reference our environment variables on the command line. - - - - Next, we suppress internal routing between local interfaces. The loop propery only exists on kernels that have the send-to-self patch installed and have the /proc filesystem mounted. Some systems may not mount this file system. - - /proc/sys/net/ipv4/conf/${IF1}/loop -echo 1 > /proc/sys/net/ipv4/conf/${IF2}/loop -]]> - - Alternately, you could edit file /etc/sysctl.conf, as follows, to set the loop property for each interface during system startup. Again, the loop propery only exists on kernels that have the send-to-self patch installed and so errors will occur if you boot another kernel that does not have it installed. - - - - Open a console window and start iperf as a server. Option -s identifies this instance of iperf as the server. Option -B binds this instance to one host interface by IP address, in this case IP1 defined earlier. - - - - Open a second console window and start iperf as a client. Option -c identifies this instance of iperf as a client. Option -B binds this instance to the one interface by IP address, in this case IP2 defined earlier. The server address must also be specified, in this case IP1 bound to the server in the last step. - - - - - - <quote>send-to-self</quote> Patch Installation - - - The send-to-self patch exists for several recent Linux kernel versions but not all versions. Assuming you have obtained the correct kernel archive and the correct patch version, the following script illustrates the steps needed to apply the patch on Ubuntu 9.04 and recompile the kernel. Observe that, in this case, the patch version does not match the kernel version because a patch has not been published for that kernel version. - - - The following script can be used on a Ubuntu Linux distribution to download kernel source, the send-to-self patch, apply the patch then compile and install the resulting kernal image. When the menuconfig screen appears: - - - - - Select General Setup on the Linux Kernel Configuration screen. - - - - - Select Local version - append to kernel release on the General Setup screen. - - - - - Enter the version suffix -send-to-self. - - - - - Select ok to return to the General Setup screen. - - - - - Select Automatically append version information to the version string on the General Setup screen. - - - - - Select exit to return to the Linux Kernel Configuration screen. - - - - - Select exit to close the menuconfig program. - - - - - Select yes if prompted to save your new kernel configuration. This message does not appear each time. - - - - - - - - In case you don't know ... - - - apt-get --reinstall - - - The apt-get program is only available on Debian-based distributions. If you do not use a Debian-based system then you must find another way to obtain the necessary packages. Option --reinstall instructs apt-get to download the kernel even though it has been installed before. It is not needed on the first script execution but may be needed on subsequent script executions if you have deleted the kernel archive file. - - - mkinitramfs - - - This script uses mkinitramfs instead of the mkinitrd. This may differ on other distributions. The kernel source package used here has Ubuntu modifications that result in a minor version being appended to the kernel version. This may not happen with other distributions or with kernels obtained directly from kernel.org. - - - cut-and-paste - - - This script, or some like it, are included in the ./patches folder of the toolkit. You can also copy and paste this script but remember to edit the environment variables at the top, remove all carriage returns and set correct file permissions with chmod 0755 before executing it on your Linux host. Run the script as root user. - - grub/menu.lst - - - If your system uses grub then edit file /boot/grub/menu.lst and add a new reference to the new initrd.img, System.map and vmlinuz files installed in folder /boot by this script. We recommend adding these references as the last ones in the file so that the new kernel does not start by default. Once you are confident that everything works, you can then move the references to the first entry. We also recommend setting the timeout value to 10 for now. - - - - - <quote>send-to-self</quote> Patch Listing - - - The following send-to-self patch is specifically for Linux kernel 2.6.30 and is provided for information only. For practical purposes, the patch has not changed much from version to version but the line numbers have changed. Some recent send-to-self patches are included in the toolkit ./patches folder. - -ifa_list == NULL; - rpf = IN_DEV_RPFILTER(in_dev); -+ loop = IN_DEV_LOOP(in_dev); - } - rcu_read_unlock(); - -@@ -258,6 +259,11 @@ int fib_validate_source(__be32 src, __be - net = dev_net(dev); - if (fib_lookup(net, &fl, &res)) - goto last_resort; -+ if (loop && res.type == RTN_LOCAL) { -+ *spec_dst = FIB_RES_PREFSRC(res); -+ fib_res_put(&res); -+ return 0; -+ } - if (res.type != RTN_UNICAST) - goto e_inval_res; - *spec_dst = FIB_RES_PREFSRC(res); -diff -urp v2.6.30/linux/net/ipv4/route.c linux/net/ipv4/route.c ---- v2.6.30/linux/net/ipv4/route.c 2009-06-13 10:53:58.000000000 +0300 -+++ linux/net/ipv4/route.c 2009-06-13 15:54:15.000000000 +0300 -@@ -2521,6 +2521,11 @@ static int ip_route_output_slow(struct n - dev_put(dev_out); - goto out; /* Wrong error code */ - } -+ err = -ENETDOWN; -+ if (!(dev_out->flags&IFF_UP)) { -+ dev_put(dev_out); -+ goto out; -+ } - - if (ipv4_is_local_multicast(oldflp->fl4_dst) || - oldflp->fl4_dst == htonl(0xFFFFFFFF)) { -@@ -2588,10 +2593,41 @@ static int ip_route_output_slow(struct n - free_res = 1; - - if (res.type == RTN_LOCAL) { -- if (!fl.fl4_src) -- fl.fl4_src = fl.fl4_dst; -+ struct in_device *in_dev; -+ __be32 src; -+ - if (dev_out) - dev_put(dev_out); -+ dev_out = FIB_RES_DEV(res); -+ in_dev = in_dev_get(dev_out); -+ src = fl.fl4_src? : FIB_RES_PREFSRC(res); -+ if (in_dev && IN_DEV_LOOP(in_dev) && src) { -+ struct net_device *dev_src; -+ -+ in_dev_put(in_dev); -+ in_dev = NULL; -+ dev_src = ip_dev_find(net, src); -+ if (dev_src && dev_src != dev_out && -+ (in_dev = in_dev_get(dev_src)) && -+ IN_DEV_LOOP(in_dev)) { -+ in_dev_put(in_dev); -+ dev_out = dev_src; -+ fl.fl4_src = src; -+ fl.oif = dev_out->ifindex; -+ res.type = RTN_UNICAST; -+ if (res.fi) { -+ fib_info_put(res.fi); -+ res.fi = NULL; -+ } -+ goto make_route; -+ } -+ if (dev_src) -+ dev_put(dev_src); -+ } -+ if (in_dev) -+ in_dev_put(in_dev); -+ if (!fl.fl4_src) -+ fl.fl4_src = fl.fl4_dst; - dev_out = net->loopback_dev; - dev_hold(dev_out); - fl.oif = dev_out->ifindex; -]]> - -
-
- diff --git a/docbook/hexdecode.c.html b/docbook/hexdecode.c.html deleted file mode 100644 index 5298cb50..00000000 --- a/docbook/hexdecode.c.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - hexdecode.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t hexdecode (void const * memory, size_t extent,  char buffer [], size_t length);
- *
- *   memory.h
- *
- *   decode a memory region as a string of hex octets separated with
- *   character HEX_EXTENDER;
- *
- *   allow three string characters for each memory byte; this means
- *   that the buffer must hold at least three characters or nothing
- *   will be decoded; the maximum number of bytes is the lesser of
- *   chars/3 and bytes;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXDECODE_SOURCE
-#define HEXDECODE_SOURCE
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-size_t hexdecode (void const * memory, register size_t extent, char buffer [], register size_t length)
-
-{
-	register char * string = (char *)(buffer);
-	register byte * offset = (byte *)(memory);
-	if (length)
-	{
-		length /= HEX_DIGITS + 1;
-		while ((length--) && (extent--))
-		{
-			*string++ = DIGITS_HEX [(*offset >> 4) & 0x0F];
-			*string++ = DIGITS_HEX [(*offset >> 0) & 0x0F];
-			if ((length) && (extent))
-			{
-				*string++ = HEX_EXTENDER;
-			}
-			offset++;
-		}
-		*string = (char) (0);
-	}
-	return (string - buffer);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexdump.c.html b/docbook/hexdump.c.html deleted file mode 100644 index 5f9a407f..00000000 --- a/docbook/hexdump.c.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - hexdump.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void hexdump (void const * memory, size_t offset, size_t extent, FILE * fp);
- *
- *   memory.h
- *
- *   print memory as a hexadecimal dump showing relative offsets and
- *   an ASCII character display; this function is similar to but not
- *   the same as function hexview;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXDUMP_SOURCE
-#define HEXDUMP_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdint.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-void hexdump (void const * memory, size_t offset, size_t extent, FILE * fp)
-
-{
-	byte * origin = (byte *)(memory);
-	unsigned block = 0x10;
-	size_t lower = block * (offset / block);
-	size_t upper = block + lower;
-	size_t index = 0;
-	char buffer [ADDRSIZE + 72];
-	char * output;
-	while (lower < extent)
-	{
-		output = buffer + ADDRSIZE;
-		for (index = lower; output-- > buffer; index >>= 4)
-		{
-			*output = DIGITS_HEX [index & 0x0F];
-		}
-		output = buffer + ADDRSIZE;
-		for (index = lower; index < upper; index++)
-		{
-			*output++ = ' ';
-			if (index < offset)
-			{
-				*output++ = ' ';
-				*output++ = ' ';
-			}
-			else if (index < extent)
-			{
-				*output++ = DIGITS_HEX [(origin [index] >> 4) & 0x0F];
-				*output++ = DIGITS_HEX [(origin [index] >> 0) & 0x0F];
-			}
-			else
-			{
-				*output++ = ' ';
-				*output++ = ' ';
-			}
-		}
-		*output++ = ' ';
-		for (index = lower; index < upper; index++)
-		{
-			if (index < offset)
-			{
-				*output++ = ' ';
-			}
-			else if (index < extent)
-			{
-				unsigned c = origin [index];
-				*output++ = isprint (c)? c: '.';
-			}
-			else
-			{
-				*output++ = ' ';
-			}
-		}
-		*output++ = '\n';
-		*output++ = '\0';
-		fputs (buffer, fp);
-		lower += block;
-		upper += block;
-	}
-	if (extent)
-	{
-		output = buffer;
-		*output++ = '\n';
-		*output++ = '\0';
-		fputs (buffer, fp);
-	}
-	fflush (fp);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexencode.c.html b/docbook/hexencode.c.html deleted file mode 100644 index 5b4e9360..00000000 --- a/docbook/hexencode.c.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - hexencode.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t hexencode (void * memory, size_t extent, char const * string);
- *
- *   memory.h
- *
- *   encode a hexadecimal string into a fixed length memory region;
- *   return the number of bytes encoded or 0 on error; an error will
- *   occur of the entire region cannot be encoded or the entire
- *   string cannot be converted due to illegal or excessive digits;
- *
- *   permit an optional HEX_EXTENDER character between successive
- *   octets; constant character HEX_EXTENDER is defined in number.h;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXENCODE_SOURCE
-#define HEXENCODE_SOURCE
-
-#include <errno.h>
-#include <ctype.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-size_t hexencode (void * memory, register size_t extent, register char const * string)
-
-{
-	register byte * origin = (byte *)(memory);
-	register byte * offset = (byte *)(memory);
-	unsigned radix = RADIX_HEX;
-	unsigned digit = 0;
-	while ((extent) && (*string))
-	{
-		unsigned field = HEX_DIGITS;
-		unsigned value = 0;
-		if ((offset > origin) && (*string == HEX_EXTENDER))
-		{
-			string++;
-		}
-		while (field--)
-		{
-			if ((digit = todigit (*string)) < radix)
-			{
-				value *= radix;
-				value += digit;
-				string++;
-				continue;
-			}
-			errno = EINVAL;
-			return (0);
-		}
-		*offset = value;
-		offset++;
-		extent--;
-	}
-
-#if defined (WIN32)
-
-	while (isspace (*string))
-	{
-		string++;
-	}
-
-#endif
-
-	if ((extent) || (*string))
-	{
-		errno = EINVAL;
-		return (0);
-	}
-	return (offset - origin);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexload.c.html b/docbook/hexload.c.html deleted file mode 100644 index f51c252d..00000000 --- a/docbook/hexload.c.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - hexload.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t hexload (void * memory, size_t extent, FILE * fp);
- *
- *   memory.h
- *
- *   read a file and convert hexadecimal octets to binary bytes then
- *   store them in consecutive memory locations up to a given length;
- *   return the actual number of bytes stored;
- *
- *   digits may be consecutive or separated by white space or comment
- *   text; a colon terminates a frame, to allow multiple frames in a
- *   on one file;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXLOAD_SOURCE
-#define HEXLOAD_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdint.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/error.h"
-#include "../tools/chars.h"
-
-/*====================================================================*
- *   private variables;
- *--------------------------------------------------------------------*/
-
-static unsigned row = 1;
-static unsigned col = 1;
-
-/*====================================================================*
- *
- *   signed fpgetc (FILE * fp)
- *
- *   return the next input character after updating the file cursor
- *   position;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-static signed fpgetc (FILE * fp)
-
-{
-	extern unsigned row;
-	extern unsigned col;
-	signed c = getc (fp);
-	if (c == '\n')
-	{
-		row++;
-		col = 0;
-	}
-	else
-	{
-		col++;
-	}
-	return (c);
-}
-
-/*====================================================================*
- *
- *   size_t hexload (void * memory, size_t extent, FILE * fp);
- *
- *   memory.h
- *
- *   read a file and convert hexadecimal octets to binary bytes then
- *   store them in consecutive memory locations up to a given length;
- *   return the actual number of bytes stored;
- *
- *   digits may be consecutive or separated by white space or comment
- *   text; a colon terminates a frame, to allow multiple frames in a
- *   on one file;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-size_t hexload (void * memory, size_t extent, FILE * fp)
-
-{
-	extern unsigned row;
-	extern unsigned col;
-	byte * origin = (uint8_t *)(memory);
-	byte * offset = (uint8_t *)(memory);
-	unsigned digits = sizeof (* offset) << 1;
-	unsigned digit = 0;
-	signed c = EOF;
-	while ((extent) && ((c = fpgetc (fp)) != EOF) && (c != ';'))
-	{
-		if (isspace (c))
-		{
-			continue;
-		}
-		if (c == '#')
-		{
-			do
-			{
-				c = fpgetc (fp);
-			}
-			while (nobreak (c));
-			continue;
-		}
-		if (c == '/')
-		{
-			c = fpgetc (fp);
-			if (c == '/')
-			{
-				do
-				{
-					c = fpgetc (fp);
-				}
-				while (nobreak (c));
-				continue;
-			}
-			if (c == '*')
-			{
-				while ((c != '/') && (c != EOF))
-				{
-					while ((c != '*') && (c != EOF))
-					{
-						c = fpgetc (fp);
-					}
-					c = fpgetc (fp);
-				}
-				continue;
-			}
-			continue;
-		}
-		if ((c >= '0') && (c <= '9'))
-		{
-			*offset *= 16;
-			*offset += c - '0';
-			if (!(++digit % digits))
-			{
-				offset++;
-				extent--;
-			}
-			continue;
-		}
-		if ((c >= 'A') && (c <= 'F'))
-		{
-			*offset *= 16;
-			*offset += 10;
-			*offset += c - 'A';
-			if (!(++digit % digits))
-			{
-				offset++;
-				extent--;
-			}
-			continue;
-		}
-		if ((c >= 'a') && (c <= 'f'))
-		{
-			*offset *= 16;
-			*offset += 10;
-			*offset += c - 'a';
-			if (!(++digit % digits))
-			{
-				offset++;
-				extent--;
-			}
-			continue;
-		}
-
-#if 1
-
-		error (1, ENOTSUP, "Unexpected character '%c': row %d: col %d", c, row, col);
-
-#else
-
-		return ((size_t)(-1));
-
-#endif
-
-	}
-	if (digit & 1)
-	{
-
-#if 1
-
-		error (1, ENOTSUP, "Odd digit count (%d) in source", digit);
-
-#else
-
-		return ((size_t)(-1));
-
-#endif
-
-	}
-	return (offset - origin);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexoffset.c.html b/docbook/hexoffset.c.html deleted file mode 100644 index 83046329..00000000 --- a/docbook/hexoffset.c.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - hexoffset.c - - - - - - - - - -
-/*====================================================================*
- *
- *   char * hexoffset (char buffer [], size_t length, off_t offset);
- *
- *   memory.h
- *
- *   encode buffer with with a NUL terminated string containing the
- *   hexadecimal representation of a memory offset; the result will
- *   be padded with leading zeros;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXOFFSET_SOURCE
-#define HEXOFFSET_SOURCE
-
-#include <memory.h>
-
-#include "../tools/number.h"
-#include "../tools/memory.h"
-
-char * hexoffset (char buffer [], size_t length, off_t offset)
-
-{
-	char * string = buffer + length - 1;
-	memset (buffer, 0, length);
-	while (string > buffer)
-	{
-		*--string = DIGITS_HEX [offset & 0x0F];
-		offset >>= 4;
-	}
-	return (buffer);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexout.c.html b/docbook/hexout.c.html deleted file mode 100644 index 043d1fbf..00000000 --- a/docbook/hexout.c.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - hexout.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void hexout (void const * memory, size_t extent, char c, char e, FILE * fp);
- *
- *   memory.h
- *
- *   print memory as a series of hexadecimal octets seperated by
- *   character c; normally, character c will be HEX_EXTENDER as
- *   defined in number.h;
- *
- *   for example, hexout (memory, 6, ':', ';', stdout) would print:
- *
- *      00:B0:52:00:00:01;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXOUT_SOURCE
-#define HEXOUT_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-void hexout (void const * memory, size_t extent, char c, char e, FILE * fp)
-
-{
-	byte * offset = (byte *)(memory);
-	while (extent--)
-	{
-		putc (DIGITS_HEX [(* offset >> 4) & 0x0F], fp);
-		putc (DIGITS_HEX [(* offset >> 0) & 0x0F], fp);
-		if ((extent) && (c))
-		{
-			putc (c, fp);
-		}
-		offset++;
-	}
-	if (e)
-	{
-		putc (e, fp);
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexpeek.c.html b/docbook/hexpeek.c.html deleted file mode 100644 index d46748c9..00000000 --- a/docbook/hexpeek.c.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - hexpeek.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void hexpeek (void const * memory, size_t origin, size_t offset, size_t extent, size_t window, FILE * fp);
- *
- *   memory.h
- *
- *   print a hexadecimal dump of a memory region on stdout within a
- *   window that precedes and follows the region;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <stdint.h>
-
-#include "../tools/memory.h"
-
-void hexpeek (void const * memory, size_t origin, size_t offset, size_t extent, size_t window, FILE * fp)
-
-{
-	if (offset == origin)
-	{
-		offset++;
-	}
-	hexdump (memory, window < origin? origin - window: 0, offset + window < extent? offset + window: extent, fp);
-	return;
-}
-
-
-
- - - diff --git a/docbook/hexstring.c.html b/docbook/hexstring.c.html deleted file mode 100644 index b3f45aa4..00000000 --- a/docbook/hexstring.c.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - hexstring.c - - - - - - - - - -
-/*====================================================================*
- *
- *   char * hexstring ( char buffer [], size_t length, void const * memory, size_t extent);
- *
- *   memory.h
- *
- *   decode a memory region into a hexadecimal character buffer and
- *   return the buffer address;
- *
- *   allow three string characters for each memory byte; this means
- *   that the buffer must hold at least three characters or nothing
- *   will be decoded;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXSTRING_SOURCE
-#define HEXSTRING_SOURCE
-
-#include <stdint.h>
-
-#include "../tools/memory.h"
-
-char * hexstring (char buffer [], size_t length, void const * memory, size_t extent)
-
-{
-	hexdecode (memory, extent, buffer, length);
-	return ((char *)(buffer));
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexview.c.html b/docbook/hexview.c.html deleted file mode 100644 index 763775f8..00000000 --- a/docbook/hexview.c.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - hexview.c - - - - - - - - - -
-/*====================================================================*
- *
- *   void hexview (void const * memory, size_t offset, size_t extent, FILE *fp);
- *
- *   memory.h
- *
- *   print memory as a hexadecimal dump showing absolute offsets and
- *   an ASCII character display; this function is similar to but not
- *   the same as function hexdump;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXVIEW_SOURCE
-#define HEXVIEW_SOURCE
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdint.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-
-void hexview (void const * memory, size_t offset, size_t extent, FILE *fp)
-
-{
-	byte * origin = (byte *)(memory);
-	unsigned block = 0x10;
-	size_t lower = block * (offset / block);
-	size_t upper = block + lower;
-	size_t index = 0;
-	char buffer [ADDRSIZE + 72];
-	char * output;
-	while (lower < offset + extent)
-	{
-		output = buffer + ADDRSIZE;
-		for (index = lower; output-- > buffer; index >>= 4)
-		{
-			*output = DIGITS_HEX [index & 0x0F];
-		}
-		output = buffer + ADDRSIZE;
-		for (index = lower; index < upper; index++)
-		{
-			*output++ = ' ';
-			if (index < offset)
-			{
-				*output++ = ' ';
-				*output++ = ' ';
-			}
-			else if (index < offset + extent)
-			{
-				*output++ = DIGITS_HEX [(origin [index-offset] >> 4) & 0x0F];
-				*output++ = DIGITS_HEX [(origin [index-offset] >> 0) & 0x0F];
-			}
-			else
-			{
-				*output++ = ' ';
-				*output++ = ' ';
-			}
-		}
-		*output++ = ' ';
-		for (index = lower; index < upper; index++)
-		{
-			if (index < offset)
-			{
-				*output++ = ' ';
-			}
-			else if (index < offset + extent)
-			{
-				unsigned c = origin [index-offset];
-				*output++ = isprint (c)? c: '.';
-			}
-			else
-			{
-				*output++ = ' ';
-			}
-		}
-		*output++ = '\n';
-		*output++ = '\0';
-		fputs (buffer, fp);
-		lower += block;
-		upper += block;
-	}
-	fflush (fp);
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hexwrite.c.html b/docbook/hexwrite.c.html deleted file mode 100644 index 8479b496..00000000 --- a/docbook/hexwrite.c.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - hexwrite.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   void hexwrite (signed fd, void const * memory, size_t extent);
- *
- *   number.h
- *
- *   write a memory region as a stream of hexadecimal characters;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HEXWRITE_SOURCE
-#define HEXWRITE_SOURCE
-
-#include <unistd.h>
-
-#include "../tools/types.h"
-#include "../tools/number.h"
-
-void hexwrite (signed fd, void const * memory, size_t extent)
-
-{
-	byte * offset = (byte *)(memory);
-	while (extent--)
-	{
-		byte byte = * offset;
-		write (fd, &DIGITS_HEX [(byte >> 4) & 0x0F], sizeof (byte));
-		write (fd, &DIGITS_HEX [(byte >> 0) & 0x0F], sizeof (byte));
-		offset++;
-	}
-	return;
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/homeplug.h.html b/docbook/homeplug.h.html deleted file mode 100644 index 58027556..00000000 --- a/docbook/homeplug.h.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - homeplug.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   homeplug.h - HomePlug Definitions and Declarations;
- *
- *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
- *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
- *;  For demonstration and evaluation only; Not for production use.
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *	Alex Vasquez <alex.vasquez@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HOMEPLUG_HEADER
-#define HOMEPLUG_HEADER
-
-/*====================================================================*
- *   HomePlug AV Constants;
- *--------------------------------------------------------------------*/
-
-#define HOMEPLUG_MMV 0x01
-#define HOMEPLUG_MMTYPE 0x0000
-
-/*====================================================================*
- * HomePlug Management Message Ranges for Information Only;
- *--------------------------------------------------------------------*/
-
-#define CC_MMTYPE_MIN 0x0000
-#define CC_MMTYPE_MAX 0x1FFF
-#define CP_MMTYPE_MIN 0x2000
-#define CP_MMTYPE_MAX 0x3FFF
-#define NN_MMTYPE_MIN 0x4000
-#define NN_MMTYPE_MAX 0x5FFF
-#define CM_MMTYPE_MIN 0x6000
-#define CM_MMTYPE_MAX 0x7FFF
-#define MS_MMTYPE_MIN 0x8000
-#define MS_MMTYPE_MAX 0x9FFF
-#define VS_MMTYPE_MIN 0xA000
-#define VS_MMTYPE_MAX 0xBFFF
-#define HA_MMTYPE_MIN 0xC000
-#define HA_MMTYPE_MAX 0xFFFF
-
-/*====================================================================*
- * HomePlug AV MMEs have 4 variants indicated by the 2 MMTYPE LSBs;
- *--------------------------------------------------------------------*/
-
-#define MMTYPE_CC 0x0000
-#define MMTYPE_CP 0x2000
-#define MMTYPE_NN 0x4000
-#define MMTYPE_CM 0x6000
-#define MMTYPE_MS 0x8000
-#define MMTYPE_VS 0xA000
-#define MMTYPE_XX 0xC000
-
-#ifndef IHPAPI_HEADER
-#define MMTYPE_REQ 0x0000
-#define MMTYPE_CNF 0x0001
-#define MMTYPE_IND 0x0002
-#define MMTYPE_RSP 0x0003
-#define MMTYPE_MODE  (MMTYPE_REQ|MMTYPE_CNF|MMTYPE_IND|MMTYPE_RSP)
-#define MMTYPE_MASK ~(MMTYPE_REQ|MMTYPE_CNF|MMTYPE_IND|MMTYPE_RSP)
-#endif
-
-/*====================================================================*
- * HomePlug AV Management Message Types;
- *--------------------------------------------------------------------*/
-
-#define CC_CCO_APPOINT 0x0000
-#define CC_BACKUP_APPOINT 0x0004
-#define CC_LINK_INFO 0x0008
-#define CC_HANDOVER 0x000C
-#define CC_HANDOVER_INFO 0x0010
-#define CC_DISCOVER_LIST 0x0014
-#define CC_LINK_NEW 0x0018
-#define CC_LINK_MOD 0x001C
-#define CC_LINK_SQZ 0x0020
-#define CC_LINK_REL 0x0024
-#define CC_DETECT_REPORT 0x0028
-#define CC_WHO_RU 0x002C
-#define CC_ASSOC 0x0030
-#define CC_LEAVE 0x0034
-#define CC_SET_TEI_MAP 0x0038
-#define CC_RELAY 0x003C
-#define CC_BEACON_RELIABILITY 0x0040
-#define CC_ALLOC_MOVE 0x0044
-#define CC_ACCESS_NEW 0x0048
-#define CC_ACCESS_REL 0x004C
-#define CC_DCPPC 0x0050
-#define CC_HP1_DET 0x0054
-#define CC_BLE_UPDATE 0x0058
-#define CP_PROXY_APPOINT 0x2000
-#define PH_PROXY_APPOINT 0x2004
-#define CP_PROXY_WAKE 0x2008
-#define NN_INL 0x4000
-#define NN_NEW_NET 0x4004
-#define NN_ADD_ALLOC 0x4008
-#define NN_REL_ALLOC 0x400C
-#define NN_REL_NET 0x4010
-#define CM_ASSOCIATED_STA 0x6000
-#define CM_ENCRYPTED_PAYLOAD 0x6004
-#define CM_SET_KEY 0x6008
-#define CM_GET_KEY 0x600C
-#define CM_SC_JOIN 0x6010
-#define CM_CHAN_EST 0x6014
-#define CM_TM_UPDATE 0x6018
-#define CM_AMP_MAP 0x601C
-#define CM_BRG_INFO 0x6020
-#define CM_CONN_NEW 0x6024
-#define CM_CONN_REL 0x6028
-#define CM_CONN_MOD 0x602C
-#define CM_CONN_INFO 0x6030
-#define CM_STA_CAP 0x6034
-#define CM_NW_INFO 0x6038
-#define CM_GET_BEACON 0x603C
-#define CM_HFID 0x6040
-#define CM_MME_ERROR 0x6044
-#define CM_NW_STATS 0x6048
-#define CM_SLAC_PARAM 0x6064
-#define CM_START_ATTEN_CHAR 0x6068
-#define CM_ATTEN_CHAR 0x606C
-#define CM_PKCS_CERT 0x6070
-#define CM_MNBC_SOUND 0x6074
-#define CM_VALIDATE 0x6078
-#define CM_SLAC_MATCH 0x607C
-#define CM_SLAC_USER_DATA 0x6080
-#define CM_ATTEN_PROFILE 0x6084
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/host.sh.html b/docbook/host.sh.html deleted file mode 100644 index ca072af0..00000000 --- a/docbook/host.sh.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - host.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/host.sh
-
-# edit a PIB file then kick off the INT6300 Host Emulator; if you do
-# not want to edit the PIB file before starting then comment out the
-# line that does that;
-
-# ====================================================================
-# host symbols;
-# --------------------------------------------------------------------
-
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# file symbols;
-# --------------------------------------------------------------------
-
-MAC=auto
-DAK=$(rkey secret.key -D)
-NMK=$(rkey secret.key -M)
-
-# ====================================================================
-# confirm MAC;
-# --------------------------------------------------------------------
-
-echo -n "MAC Address [${MAC}]: "; read
-if [ ! -z ${REPLY} ]; then
-	MAC="${REPLY}"                  
-fi
-
-# ====================================================================
-# modify PIB;
-# --------------------------------------------------------------------
-
-modpib ${PIB} -C0 -M ${MAC} -N ${NMK} -D ${DAK}
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# service host action request messages;
-# --------------------------------------------------------------------
-
-# int6khost -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm -FF
-# int6khost -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm -F
-int6khost -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-
-
- - - diff --git a/docbook/host64.sh.html b/docbook/host64.sh.html deleted file mode 100644 index 3dc846e6..00000000 --- a/docbook/host64.sh.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - host64.sh - - - - - - - - - -
-#!/bin/sh
-# file: scripts/host.sh
-
-# edit a PIB file then kick off the INT6300 Host Emulator; if you do
-# not want to edit the PIB file before starting then comment out the
-# line that does that;
-
-# ====================================================================
-# host symbols;
-# --------------------------------------------------------------------
-
-. ${SCRIPTS}/hardware.sh
-. ${SCRIPTS}/firmware.sh
-
-# ====================================================================
-# file symbols;
-# --------------------------------------------------------------------
-
-MAC=auto
-DAK=$(rkey secret.key -D)
-NMK=$(rkey secret.key -M)
-
-# ====================================================================
-# confirm MAC;
-# --------------------------------------------------------------------
-
-echo -n "MAC Address [${MAC}]: "; read
-if [ ! -z ${REPLY} ]; then
-	MAC="${REPLY}"                  
-fi
-
-# ====================================================================
-# modify PIB;
-# --------------------------------------------------------------------
-
-modpib ${PIB} -C0 -M ${MAC} -N ${NMK} -D ${DAK}
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-# ====================================================================
-# service host action request messages;
-# --------------------------------------------------------------------
-
-# Force Flash NVRAM 
-# int64host -i ${ETH} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm -FF
-# Flash NVRAM (continuous loop because FW/PIB sent to host) 
-# int64host -i ${ETH} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm -F
-int64host -i ${ETH} -P ${PIB} -N ${NVM} -p abc.pib -n abc.nvm
-if [ ${?} != 0 ]; then
-	exit 1
-fi
-
-
-
- - - diff --git a/docbook/hostnics.c.html b/docbook/hostnics.c.html deleted file mode 100644 index 32932e8a..00000000 --- a/docbook/hostnics.c.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - hostnics.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   unsigned hostnics (struct nic list [], unsigned size);
- *
- *   ether.h
- *
- *   encode an external memory region with a packed list of available
- *   nost network interfaces; return the number of interfaces found;
- *   each interface has an index, ethernet address, internet address,
- *   name and description;
- *
- *   this function is implemented for Linux and MacOSX;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef HOSTNICS_SOURCE
-#define HOSTNICS_SOURCE
-
-#if defined (__linux__)
-#	include <net/if.h>
-#	include <net/ethernet.h>
-#	include <sys/ioctl.h>
-#elif defined (__linux__)
-#	include <net/if.h>
-#	include <netpacket/packet.h>
-#	include <ifaddrs.h>
-#elif defined (__APPLE__) || defined (__OpenBSD__)
-#	include <sys/types.h>
-#	include <sys/socket.h>
-#	include <net/if.h>
-#	include <net/if_dl.h>
-#	include <net/if_types.h>
-#	include <ifaddrs.h>
-#elif defined (WIN32)
-#error "Not implemented for Windows"
-#else
-#error "Unknown environment"
-#endif
-
-#include <unistd.h>
-#include <memory.h>
-#include <errno.h>
-
-#include "../ether/ether.h"
-#include "../tools/error.h"
-
-unsigned hostnics (struct nic nics [], unsigned size)
-
-{
-
-#if defined (__linux__)
-
-/*
- *	native method on Linux systems;
- */
-
-	char buffer [1024];
-	struct ifconf ifconf;
-	struct ifreq * ifreq;
-	unsigned next;
-	signed fd;
-	memset (nics, 0, size * sizeof (struct nic));
-	ifconf.ifc_len = sizeof (buffer);
-	ifconf.ifc_buf = buffer;
-	if ((fd = socket (AF_INET, SOCK_DGRAM, 0)) < 0)
-	{
-		error (1, errno, "Can't open socket");
-	}
-	if (ioctl (fd, SIOCGIFCONF, &ifconf) < 0)
-	{
-		error (1, errno, "Can't read socket configuration");
-	}
-	ifreq = ifconf.ifc_req;
-	next = ifconf.ifc_len / sizeof (struct ifreq);
-	if (next > size)
-	{
-		next = size;
-	}
-	if (next < size)
-	{
-		size = next;
-	}
-	for (next = 0; next < size; next++)
-	{
-		struct nic * nic = &nics [next];
-		struct sockaddr_in * sockaddr_in = (struct sockaddr_in *)(&ifreq->ifr_addr);
-		memcpy (nic->ifname, ifreq->ifr_name, sizeof (nic->ifname));
-		memcpy (nic->ifdesc, ifreq->ifr_name, sizeof (nic->ifdesc));
-		memcpy (nic->internet, &sockaddr_in->sin_addr, sizeof (nic->internet));
-		if (ioctl (fd, SIOCGIFHWADDR, ifreq) == -1)
-		{
-			error (0, errno, "Can't read hardware address: %s", ifreq->ifr_name);
-		}
-		memcpy (nic->ethernet, ifreq->ifr_hwaddr.sa_data, sizeof (nic->ethernet));
-		if (ioctl (fd, SIOCGIFINDEX, ifreq) == -1)
-		{
-			error (0, errno, "Can't read interface index: %s", ifreq->ifr_name);
-		}
-		nic->ifindex = ifreq->ifr_ifindex;
-		ifreq++;
-	}
-	close (fd);
-
-#elif defined (__linux__) || defined (__APPLE__) || defined (__OpenBSD__)
-
-/*
- *	generic (POSIX) method for unix-like systems;
- */
-
-	struct ifaddrs * ifaddrs;
-	memset (nics, 0, size * sizeof (struct nic));
-	unsigned next = 0;
-	if (getifaddrs (&ifaddrs) != -1)
-	{
-		struct ifaddrs * ifaddr;
-		for (ifaddr = ifaddrs; ifaddr && size; ifaddr = ifaddr->ifa_next)
-		{
-			struct nic * nic = &nics [next];
-			struct nic * tmp = nics;
-			if (!ifaddr->ifa_addr)
-			{
-				continue;
-			}
-			nic->ifindex = if_nametoindex (ifaddr->ifa_name);
-			for (tmp = nics; tmp->ifindex != nic->ifindex; tmp++);
-			if (tmp == nic)
-			{
-				next++;
-				size--;
-			}
-			else
-			{
-				nic = tmp;
-			}
-			memcpy (nic->ifname, ifaddr->ifa_name, sizeof (nic->ifname));
-			memcpy (nic->ifdesc, ifaddr->ifa_name, sizeof (nic->ifdesc));
-			if (ifaddr->ifa_addr->sa_family == AF_INET)
-			{
-				struct sockaddr_in * sockaddr_in = (struct sockaddr_in *) (ifaddr->ifa_addr);
-				struct in_addr * in_addr = (struct in_addr *)(&sockaddr_in->sin_addr);
-				memcpy (nic->internet, &in_addr->s_addr, sizeof (nic->internet));
-			}
-
-#if defined (__linux__)
-#define LLADDR(socket) &(socket)->sll_addr
-
-			if (ifaddr->ifa_addr->sa_family == AF_PACKET)
-			{
-				struct sockaddr_ll * sockaddr_ll = (struct sockaddr_ll *) (ifaddr->ifa_addr);
-				memcpy (nic->ethernet, LLADDR (sockaddr_ll), sizeof (nic->ethernet));
-			}
-
-#elif defined (__APPLE__) || defined (__OpenBSD__)
-
-			if (ifaddr->ifa_addr->sa_family == AF_LINK)
-			{
-				struct sockaddr_dl * sockaddr_dl = (struct sockaddr_dl *) (ifaddr->ifa_addr);
-				if (sockaddr_dl->sdl_type == IFT_ETHER)
-				{
-
-#if 1
-
-					memcpy (nic->ethernet, LLADDR (sockaddr_dl), sizeof (nic->ethernet));
-
-#else
-
-					memcpy (nic->ethernet, LLADDR (sockaddr_dl), sockaddr_dl->sdl_alen);
-
-#endif
-
-				}
-			}
-
-#else
-#error "Abandon all hope!"
-#endif
-
-		}
-		freeifaddrs (ifaddrs);
-	}
-
-#else
-#error "Unknown environment"
-#endif
-
-	return (next);
-}
-
-#endif
-
-
-
- - - diff --git a/docbook/hpav.1.html b/docbook/hpav.1.html deleted file mode 100644 index cc6d1309..00000000 --- a/docbook/hpav.1.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - hpav.1 - - - - - - - - - -
-hpav(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     hpav(1)
-
-NAME
-       hpav - HomePlug AV Packet Listener
-
-SYNOPSIS
-       hpav [options]
-
-DESCRIPTION
-       Display HomePlug AV Ethernet messages sent by a local powerline device to the host or the broadcast address.  Do not dis‐
-       play HomePlug AV frames sent from the host to powerline devices or forwarded over powerline through the  local  powerline
-       devices.
-
-       The  program  is  an  example of a simple packet listener and daemon.  Engineers and software developers can extend it to
-       build custom sniffers or servers.  The framework is present but additional features must be added.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -i interface
-              Names  the host ethernet interface to watch.  The named interface, such as eth0, eth1 and so on, must be connected
-              to a HomePlug AV ethernet-to-powerline bridge adapter to receive any HomePlug AV traffic.  The  default  interface
-              is eth1.
-
-       -q     Quiet mode.  Suppress the printing of the normal message descriptions on stdout.
-
-       -v     Verbose  mode.   Displays  incoming  frames  in  hexadecimal dump format on stdout.  This option is independent of
-              option -a which prints VS_ARPC message text on stderr.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.  See the HomePlug AV Specification for a description of all HomePlug  AV  message
-              types.   See  the  Qualcomm Atheros INT6000 Firmware Reference Manual for a description of Atheros Vendor Specific
-              message types.
-
-EXAMPLES
-       The following command monitors the default host interface eth1 for HomePlug AV traffic and dumps detected frames  on  the
-       console  as they arrive.  To terminate the process, type ^C or ^Z at the console.  This program is usually run in a sepa‐
-       rate console window while performing powerline operations.
-
-          # hpav
-
-       The following command monitors host interface eth4 for incoming  HomePlug  AV  frames  and  dumps  writes  them  to  file
-       hpav.log.   Frames are printed in hexadecimal dump format because option -v is present.  Terminate the foreground process
-       by typing ^C or ^Z at the console.
-
-          # hpav -v -i eth4 > hpav.log
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public information is not available.  Qualcomm Atheros reserves the right to modify management mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-SEE ALSO
-       plc(1), efru(1), efsu(1), mme(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                     hpav(1)
-
- - - diff --git a/docbook/hpav.c.html b/docbook/hpav.c.html deleted file mode 100644 index 356255b5..00000000 --- a/docbook/hpav.c.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - hpav.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   hpav.c - Atheros HomePlug AV Packet Monitor;
- *
- *   print message header and/or full message content on stdout for
- *   each HomePlugAV or Atheros Vendor Specific message received by
- *   the host;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <limits.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#if defined (__linux__)
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <netpacket/packet.h>
-#include <signal.h>
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../plc/plc.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/uintspec.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/sendpacket.c"
-#include "../ether/readpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMEPeek.c"
-#include "../mme/MMEName.c"
-#include "../mme/MMEMode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define HPAV_VERBOSE (1 << 0)
-#define HPAV_SILENCE (1 << 1)
-
-#define PLCDEVICE "PLC"
-
-/*====================================================================*
- *
- *   int main (int argc, char * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	struct message message;
-	static char const * optv [] =
-	{
-		"i:qt:v",
-		PUTOPTV_S_DIVINE,
-		"Qualcomm Atheros HomePlug AV Packet Monitor",
-
-#if defined (WINPCAP)
-
-		"i s\thost interface is (s) [" CHANNEL_ETHDEVICE "]",
-
-#else
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#endif
-
-		"q\tsuppress normal output",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose messages on stdout",
-		(char const *) (0)
-	};
-	flag_t flags = (flag_t)(0);
-	signed length;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'i':
-
-#if defined (WIN32)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (flags, HPAV_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (flags, HPAV_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	while ((length = readpacket (&channel, &message, sizeof (message))) >= 0)
-	{
-		if (length > 0)
-		{
-			if (_allclr (flags, HPAV_SILENCE))
-			{
-				MMEPeek (&message, length, stdout);
-			}
-			if (_anyset (flags, HPAV_VERBOSE))
-			{
-				hexdump (&message, 0, length, stdout);
-			}
-		}
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/hpavd.c.html b/docbook/hpavd.c.html deleted file mode 100644 index 440c1c9f..00000000 --- a/docbook/hpavd.c.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - hpavd.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   hpavd.c - Qualcomm Atheros Homeplug AV Packet Daemon;
- *
- *   prints incoming Qualcomm Atheros HomePlug AV vendor-specific
- *   management messages on stdout in hex dump format for analysis;
- *
- *   the program can be run in foreground or background, as a daemon;
- *
- *   this program receives raw ethernet frames and so requires root
- *   privileges; if you install it using "chmod 555" and "chown
- *   root:root" then you must login as root to run it; otherwise, you
- *   can install it using "chmod 4555" and "chown root:root" so that
- *   anyone can run it; the program will refuse to run until you get
- *   thing right;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/signal.h>
-#include <sys/ioctl.h>
-#include <errno.h>
-
-#ifdef __linux__
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <netpacket/packet.h>
-#include <signal.h>
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexstring.c"
-#include "../tools/hexdecode.c"
-#include "../tools/error.c"
-#include "../tools/emalloc.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMEPeek.c"
-#include "../mme/MMEName.c"
-#include "../mme/MMEMode.c"
-#endif
-
-/*====================================================================*
- *    program constants;
- *--------------------------------------------------------------------*/
-
-#define HPAVD_DAEMON (1 << 0)
-#define HPAVD_VERBOSE (1 << 1)
-#define HPAVD_SILENCE (1 << 2)
-#define HPAVD_ERROR (1 << 3)
-
-#define PLCDEVICE "PLC"
-#define ETHDEVICE "eth1"
-#define ETHNUMBER 2
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-static bool done = false;
-
-/*====================================================================*
- *
- *   void terminate (signo_t signal);
- *
- *   terminate the program; we want to ensure an orgaized program
- *   exit so that the original Ethernet adapter state is restored;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void terminate (signo_t signal)
-
-{
-	done = true;
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	struct sigaction sa;
-	struct ifreq ifreq;
-	struct sockaddr_ll sockaddr =
-	{
-		PF_PACKET,
-		htons (ETH_P_HPAV),
-		0x0000,
-		ARPHRD_ETHER,
-		PACKET_OTHERHOST,
-		ETHER_ADDR_LEN,
-		{
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00
-		}
-	};
-	static char const * optv [] =
-	{
-		"di:qv",
-		PUTOPTV_S_DIVINE,
-		"Qualcomm Atheros HomePlug AV Packet Daemon",
-		"d\trun in background as daemon",
-		"i s\thost interface is (s) [" ETHDEVICE "]",
-		"q\tsuppress normal output",
-		"v\tverbose messages on stdout",
-		(char const *) (0)
-	};
-	uint8_t packet [ETHER_MAX_LEN];
-	flag_t state = (flag_t)(0);
-	flag_t flags = (flag_t)(0);
-	sock_t fd = -1;
-	signed c;
-	memset (&ifreq, 0, sizeof (ifreq));
-	memcpy (ifreq.ifr_name, ETHDEVICE, sizeof (ETHDEVICE));
-	if (getenv (PLCDEVICE))
-	{
-		memcpy (ifreq.ifr_name, getenv (PLCDEVICE), sizeof (ifreq.ifr_name));
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'd':
-			_setbits (flags, HPAVD_DAEMON);
-			break;
-		case 'i':
-			memcpy (ifreq.ifr_name, optarg, sizeof (ifreq.ifr_name));
-			break;
-		case 'q':
-			_setbits (flags, HPAVD_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, HPAVD_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (geteuid ())
-	{
-		error (1, EPERM, ERROR_NOTROOT);
-	}
-	if (_anyset (flags, HPAVD_DAEMON))
-	{
-		pid_t pid = fork ();
-		if (pid < 0)
-		{
-			error (1, errno, "razzlefrats!");
-		}
-		if (pid > 0)
-		{
-			exit (0);
-		}
-	}
-	memset (&sa, 0, sizeof (struct sigaction));
-	sa.sa_handler = terminate;
-	sigaction (SIGTERM, &sa, (struct sigaction *)(0));
-	sigaction (SIGQUIT, &sa, (struct sigaction *)(0));
-	sigaction (SIGTSTP, &sa, (struct sigaction *)(0));
-	sigaction (SIGINT, &sa, (struct sigaction *)(0));
-	sigaction (SIGHUP, &sa, (struct sigaction *)(0));
-	if ((fd = socket (sockaddr.sll_family, SOCK_RAW, sockaddr.sll_protocol)) == -1)
-	{
-		error (1, errno, "Can't create socket for %s", ifreq.ifr_name);
-	}
-	if (ioctl (fd, SIOCGIFFLAGS, &ifreq) < 0)
-	{
-		error (1, errno, "Can't read %s device state", ifreq.ifr_name);
-	}
-	state = ifreq.ifr_flags;
-	_setbits (ifreq.ifr_flags, (IFF_UP | IFF_BROADCAST));
-	_clrbits (ifreq.ifr_flags, (IFF_MULTICAST | IFF_ALLMULTI | IFF_PROMISC));
-	if (ioctl (fd, SIOCSIFFLAGS, &ifreq) < 0)
-	{
-		error (1, errno, "Can't change %s device state", ifreq.ifr_name);
-	}
-	if (ioctl (fd, SIOCGIFINDEX, &ifreq) == -1)
-	{
-		error (1, errno, "Can't get %s interface index", ifreq.ifr_name);
-	}
-	sockaddr.sll_ifindex = ifreq.ifr_ifindex;
-	if (ioctl (fd, SIOCGIFHWADDR, &ifreq) == -1)
-	{
-		error (1, errno, "Can't get %s hardware address", ifreq.ifr_name);
-	}
-	memcpy (sockaddr.sll_addr, ifreq.ifr_ifru.ifru_hwaddr.sa_data, sizeof (sockaddr.sll_addr));
-	if (bind (fd, (struct sockaddr *) (&sockaddr), sizeof (struct sockaddr_ll)) == -1)
-	{
-		error (1, errno, "Can't bind socket to %s", ifreq.ifr_name);
-	}
-	while (!done)
-	{
-		signed length = recvfrom (fd, packet, sizeof (packet), 0, (struct sockaddr *) (0), (socklen_t *)(0));
-		if (length > 0)
-		{
-			if (_allclr (flags, HPAVD_SILENCE))
-			{
-				MMEPeek (&packet, length, stdout);
-			}
-			if (_anyset (flags, HPAVD_VERBOSE))
-			{
-				hexdump (&packet, 0, length, stdout);
-			}
-		}
-	}
-	ifreq.ifr_flags = state;
-	if (ioctl (fd, SIOCSIFFLAGS, &ifreq) < 0)
-	{
-		error (1, errno, "Can't restore %s device state", ifreq.ifr_name);
-	}
-	close (fd);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/hpavkey.1.html b/docbook/hpavkey.1.html deleted file mode 100644 index 3ea2b4b1..00000000 --- a/docbook/hpavkey.1.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - hpavkey.1 - - - - - - - - - -
-hpavkey(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  hpavkey(1)
-
-NAME
-       hpavkey - HomePlug AV Key Generator
-
-SYNOPSIS
-       hpavkey [options] phrase [phrase] [...]
-
-DESCRIPTION
-       Convert  one  or  more  phrases  to encrypted HomePlug AV keys.  Phrases are read as command line arguments, converted to
-       either Device Access Keys, Network Membership Keys or Network Identification Keys and printed  on  stdout.   By  default,
-       only keys are printed, one key per line, but keys and phrases can both be printed, one pair per line.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
-       instructions.
-
-BACKGROUND
-       HomePlug AV technology makes use of special 16-byte binary values, called "keys", for various purposes such  as  identity
-       and  security.  Three keys of interest to users are the Device Access Key (DAK), the Network Memership Key (NMK) and Net‐
-       work Identification Key (NID).  Their purpose is described in the HomePlug AV Specification.
-
-       The HomePlug AV Specification explains how to generate 16-byte binary DAK, NMK and NID values using the SHA-256 algorithm
-       to hash user-supplied ASCII strings, called "pass phrases" in the specification.  HomePlug AV compliant pass phrases have
-       from 12 to 64 7-bit ASCII character values in the range 0x20 to 0x7F.  In some cases, a specified 8-byte salt is added to
-       the  pass  phrase  before computing the 32-byte hash value.  In all cases, the computed hash is then rehashed a specified
-       number of times to produce the final 32-byte value.  The HomePlug AV key is the lower 16-bytes of that value.
-
-       Keys can be any 16-byte binary value but binary values are difficult to remember.  HomePlug AV applications, such as  the
-       Qualcomm  Atheros  Windows  Device  Manager, will ask users for a pass phrase that is converted to a 16-byte binary value
-       using a known hashing algorithm.  In principle, no two phrases will product the same key and it would be  computationally
-       expensive to derive the pass phrase given the key.  Although HomePlug AV software deals directly with the key, users need
-       only remember the pass phrase in order to reproduce the key.
-
-OPTIONS
-       -D     Uses HomePlug AV rules to compute Device Access Keys (DAK) from pass phrases read from file or stdin.  A DAK is 16
-              bytes  expressed  as  32 hexadecimal digits.  This option over-rides any -M and -N options previously specified on
-              the command line.
-
-       -e     Enforce HomePlug AV length and content rules for phrases.  Non-compliant phrases are reported and  ignored.   Com‐
-              pliant  phrases  are 12 to 64 7-bit ASCII characters in the range 0x20 (SP) through 0x7F (DEL).  Essentially, this
-              includes any character that can be typed on a standard US or UK keyboard, excluding horizontal tab (HT).  Be aware
-              that  some  command shells intercept and act on special characters instead of passing them to the application.  In
-              such cases, you may need to include meta characters.
-
-       -L level
-              Set security level.  The security level is encoded into the NID.  Level 0 enables  pushbutton  pairing.   Level  1
-              disables it.  This option has no effect unless a NID is computed.
-
-       -M     Uses HomePlug AV rules to compute Network Membership Keys (NMK) from pass phrases read from file or stdin.  An NMK
-              is 16 bytes expressed as 32 hexadecimal digits.  This option over-rides any -D or -N options previously  specified
-              on the command line.
-
-       -N     Uses  HomePlug AV rules to compute Network Identification Keys (NID) from pass phrases read from file or stdin.  A
-              NID is 7 bytes expressed as 14 hexadecimal digits.  This option over-rides any -D or -M options previously  speci‐
-              fied on the command line.
-
-       -q     Enable quiet mode which, for this application, has no effect.
-
-       -v     Enable verbose mode which, for this application, prints the pass phrase after each key.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       phrase A pass phrase to be converted to a DAK, NMK or NID.  More than one pass phrase can be entered on the command line.
-              Each phrase will be converted to the same type of key and printed in the order specified.   Phrases  that  contain
-              quotes  or  special delimiters should be enclosed in quotes or apostrophes.  By default, phrases can be any length
-              and contain any ASCII chracter except ASCII NUL.  Use option -e to enforce  HomePlug  AV  password  character  and
-              length rules.
-
-EXAMPLES
-       The  following  example prints the ordinary SHA256 key for the phrase, "HomePlugAV0123", entered on the command line.  An
-       SHA key is 256 bits or 32 bytes expressed as 64 hexadecimal characters.  SHA256 keys are the default output when  no  key
-       type is specified.  SHA256 is a public domain standard, not a HomePlug AV standard.
-
-          # hpavkey HomePlugAV0123
-          EA41A2383355FA7CA3B467DF0848A8EB9C41591BE53696C5F45DDAF621784F07
-
-       The following example prints the DAK for the phrase, "HomePlugAV0123", entered on the command line.
-
-          # hpavkey -D HomePlugAV0123
-          F084B4E8F6069FF1300C9BDB812367FF
-
-       The  following command prints the NMK, instead of the DAK, for the phrase entered on the command line.  The ouput is dif‐
-       ferent because the DAK and NMK are computed differently given the same pass phrase.
-
-          # hpavkey -M HomePlugAV0123
-          B59319D7E8157BA001B018669CCEE30D
-
-       The following command prints the NMK for each phrase entered on the command line.  Notice that spaces are legal and  sig‐
-       nificant.  Phrases containing spaces must be enclosed in quotes.
-
-          # hpavkey -M HomePlugAV0123 "The quick brown fox jumped over the lazy dog."
-          B59319D7E8157BA001B018669CCEE30D
-          56F3C7F539D4F8F5EEC00E63F11A8DEC
-
-       The following command prints the NMK and pass phrase for each pass phrase entered on the command line because the verbose
-       option is specified.
-
-          # hpavkey -v -M HomePlugAV0123 "The quick brown fox jumped over the lazy dog."
-          B59319D7E8157BA001B018669CCEE30D HomePlugAV0123
-          56F3C7F539D4F8F5EEC00E63F11A8DEC The quick brown fox jumped over the lazy dog.
-
-       hpavkey can be used to compute a key and pass it to another program as an argument.  The modpib command shown below  will
-       edit file example.pib by replacing the DAK.  The -D option expects a hexadecimal key so we can supply one from the phrase
-       "HomePlugAV0123".
-
-          # modpid -D $(hpavkey -D HomePlugAV0123) example.pib
-
-TIPS&TRICKS
-       The following example illustrates an unusual case where the passwords start with dash ("-").  The  program  assumes  that
-       the dash is an option prefix which is incorrect in this case.  An error occurs because option -H is illegal.
-
-          # hpavkey -vM -HomePlugAV -HomePlugAV123
-          hpavkey: Operation canceled: Option 'H' has no meaning
-
-       one solution is to insert a double-dash ("--") on the command line to indicate that no further options appear on the com‐
-       mand line.  We include option -v to display the passwords on output.
-
-          # hpavkey -vM -- -HomePlugAV -HomePlugAV123
-          80B74B14E92A739AD41ACDC377451D1B -HomePlugAV
-          1A46BDE6F75209292FDFC4CCE4D19B4E -HomePlugAV123
-
-       See the hpavkeys man page for yet another solution to this problem.
-
-REFERENCES
-       See the HomePlug AV Specification for more information on encryption keys, pass phrases and hash  algorithms  used.   See
-       standard FIPS180-2 sec 5.3.2 for more information on SHA256 encoding.
-
-DISCLAIMER
-       Qualcomm Atheros reserves the right to modify program names, functionality, input format or output format in future tool‐
-       kit releases without any obligation to notify or compensate toolkit users.
-
-SEE ALSO
-       hpavkeys(1), mac2pw(1), mac2pwd(1), rkey(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  hpavkey(1)
-
- - - diff --git a/docbook/hpavkey.c.html b/docbook/hpavkey.c.html deleted file mode 100644 index c5fb3b67..00000000 --- a/docbook/hpavkey.c.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - hpavkey.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-#define _GETOPT_H
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <unistd.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/version.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../key/HPAVKey.h"
-#include "../key/SHA256.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/todigit.c"
-#include "../tools/hexout.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/HPAVKeyDAK.c"
-#include "../key/HPAVKeyNMK.c"
-#include "../key/HPAVKeyNID.c"
-#include "../key/HPAVKeySHA.c"
-#include "../key/HPAVKeyOut.c"
-#include "../key/SHA256.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, const char * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-#define DEFAULT_LEVEL 0
-
-int main (int argc, const char * argv [])
-
-{
-	static const char * optv [] =
-	{
-		"DeL:MNqv",
-		"phrase [phrase] [...]",
-		"HomePlug AV key generator",
-		"D\tconvert password to Device Access Key",
-		"e\tenforce HomePlug AV password rules",
-		"M\tconvert password to Network Membership Key",
-		"N\tconvert password to Network Identifier",
-		"L n\tSecurity Level is (n) [" LITERAL (DEFAULT_LEVEL) "]",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(const char *) (0)
-	};
-	byte digest [SHA256_DIGEST_LENGTH];
-	const char * phrase;
-	const char * sp;
-	signed type = 0;
-	signed level = DEFAULT_LEVEL;
-	flag_t flags = (flag_t)(0);
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'D':
-			type = HPAVKEY_DAK;
-			break;
-		case 'M':
-			type = HPAVKEY_NMK;
-			break;
-		case 'N':
-			type = HPAVKEY_NID;
-			break;
-		case 'L':
-			level = (signed)(uintspec (optarg, 0, 1));
-			break;
-		case 'q':
-			_setbits (flags, HPAVKEY_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, HPAVKEY_VERBOSE);
-			break;
-		case 'e':
-			_setbits (flags, HPAVKEY_ENFORCE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	while ((argc--) && (* argv))
-	{
-		sp = phrase = * argv++;
-		while (isprint (*sp))
-		{
-			sp++;
-		}
-		if (_anyset (flags, HPAVKEY_ENFORCE))
-		{
-			if (*sp)
-			{
-				error (0, ENOTSUP, "Phrase \"%s\" contains illegal characters", phrase);
-				continue;
-			}
-			if ((sp - phrase) < HPAVKEY_PHRASE_MIN)
-			{
-				error (0, ENOTSUP, "Phrase \"%s\" less than %d characters", phrase, HPAVKEY_PHRASE_MIN);
-				continue;
-			}
-			if ((sp - phrase) > HPAVKEY_PHRASE_MAX)
-			{
-				error (0, ENOTSUP, "Phrase \"%s\" more than %d characters", phrase, HPAVKEY_PHRASE_MAX);
-				continue;
-			}
-		}
-		if (type == HPAVKEY_DAK)
-		{
-			HPAVKeyDAK (digest, phrase);
-			HPAVKeyOut (digest, HPAVKEY_DAK_LEN, phrase, flags);
-			continue;
-		}
-		if (type == HPAVKEY_NMK)
-		{
-			HPAVKeyNMK (digest, phrase);
-			HPAVKeyOut (digest, HPAVKEY_NMK_LEN, phrase, flags);
-			continue;
-		}
-		if (type == HPAVKEY_NID)
-		{
-			HPAVKeyNMK (digest, phrase);
-			HPAVKeyNID (digest, digest, level);
-			HPAVKeyOut (digest, HPAVKEY_NID_LEN, phrase, flags);
-			continue;
-		}
-		HPAVKeySHA (digest, phrase);
-		HPAVKeyOut (digest, HPAVKEY_SHA_LEN, phrase, flags);
-	}
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/hpavkeys.1.html b/docbook/hpavkeys.1.html deleted file mode 100644 index 6b76739a..00000000 --- a/docbook/hpavkeys.1.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - hpavkeys.1 - - - - - - - - - -
-hpavkeys(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 hpavkeys(1)
-
-NAME
-       hpavkeys - HomePlug AV Key Generator
-
-SYNOPSIS
-       hpavkeys [options] file [file] [...]
-
-DESCRIPTION
-       Convert  blocks  of  phrases to encrypted HomePlug AV keys.  Phrases are read from one or more files, converted to either
-       Device Access Keys, Networks Membership Keys or Network Identification Keys and printed on stdout.  By default, only keys
-       are printed, one per line, but both keys and phrases can be printed, one pair per line.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
-       instructions.
-
-BACKGROUND
-       HomePlug AV technology uses 16-byte binary values, called "keys", for various purposes such  as  identity  and  security.
-       Three  keys of interest to users are the Device Access Key (DAK), the Network Memership Key (NMK) and Network Identifica‐
-       tion Key (NID).  Their purpose is described in the HomePlug AV Specification.
-
-       The HomePlug AV Specification explains how to generate 16-byte binary DAK, NMK and NID values using the SHA-256 algorithm
-       to hash user-supplied ASCII strings, called "pass phrases" in the specification.  HomePlug AV compliant pass phrases have
-       from 12 to 64 7-bit ASCII character values in the range 0x20 to 0x7F.  In some cases, a specified 8-byte salt is added to
-       the  pass  phrase  before computing the 32-byte hash value.  In all cases, the computed hash is then rehashed a specified
-       number of times to produce the final 32-byte value.  The HomePlug AV key is the lower 16-bytes of that value.
-
-       Keys can be any 16-byte binary value but binary values are difficult to remember.  HomePlug  AV  compliant  applications,
-       like the Qualcomm Atheros Device Manager, ask users for a pass phrase that is converted to a 16-byte binary value using a
-       standard hashing algorithm.  In principle, no two phrases will produce the same  key  and  it  would  be  computationally
-       expensive to derive the pass phrase given the key.  Although HomePlug AV software deals directly with the key, users need
-       only remember the pass phrase in order to reproduce the key.
-
-OPTIONS
-       -D     Uses HomePlug AV rules to compute Device Access Keys (DAK) from pass phrases read from file or stdin.  A DAK is 16
-              bytes  expressed  as  32 hexadecimal digits.  This option over-rides any -M and -N options previously specified on
-              the command line.
-
-       -e     Enforce HomePlug AV length and content rules for phrases.  Non-compliant phrases are reported and  ignored.   Com‐
-              pliant  phrases  are 12 to 64 7-bit ASCII characters in the range 0x20 (SP) through 0x7F (DEL).  Essentially, this
-              includes any character that can be typed on a standard US or UK keyboard, excluding horizontal tab (HT).  Be aware
-              that  some  command shells intercept and act on special characters instead of passing them to the application.  In
-              such cases, you may need to include meta characters.
-
-       -L level
-              Set security level.  The security level is encoded into the NID.  Level 0 enables  pushbutton  pairing.   Level  1
-              disables it.  This option has no effect unless a NID is computed.
-
-       -M     Uses HomePlug AV rules to compute Network Membership Keys (NMK) from pass phrases read from file or stdin.  An NMK
-              is 16 bytes expressed as 32 hexadecimal characters.  This option over-rides any -D or -N options previsously spec‐
-              ified on the command line.
-
-       -N     Uses HomePlug AV rules to compute Network Identification Keys (NID) from pass phrases read from file or stdin.  An
-              NID is 7 bytes expressed as 14 hexadecimal digits.  This option over-rides any -D or -M options previously  speci‐
-              fied on the command line.
-
-       -p     Print  the  password, or pass phrase, used to generate each key after each key on stdout.  One single space seper‐
-              ates the pass phrase from the key string.  The pass phrase consists of all subsequent characters,  including  spa‐
-              ces, appearing up to the end of the line.  Without this option, only the keys are printed.
-
-       -q     Enable quiet mode which, for this application, has no effect.  This behavior has changed from earlier program ver‐
-              sions.
-
-       -v     Enable verbose mode which, for this application, prints the input  phrase  after  each  key.   This  behavior  has
-              changed from earlier program versions.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   Any  valid filename.  Each file on the command line is read in turn and output is written to stdout, much like the
-              cat utility.  Input is read from the console when no filenames are specified.
-
-EXAMPLES
-       The following command reads file example.keys and prints the SHA256 key for each phrase in that file.  An SHA256  key  is
-       128  bits  or 32 bytes expressed as 32 hexadecimal digits.  SHA256 keys are the default output when no key type is speci‐
-       fied.  SHA256 is a public domain standard, not a HomePlug AV standard.
-
-          # hpavkeys example.keys
-          EA41A2383355FA7CA3B467DF0848A8EB9C41591BE53696C5F45DDAF621784F07
-          4E76AD8354461437C04EF9B9B242540B6406D782FF2C3FB28AFDAB5B423F88FE
-          71C480DF93D6AE2F1EFAD1447C66C9525E316218CF51FC8D9ED832F2DAF18B73
-          7257DF11A035A49119FD881F20AA7FE88970F1A034E4BBBF2D50FAB0D0239F25
-          FAC202F439E47EB5EACF6B9CC4151BF6B2B6E736A79BCAB0F589C63BCB78D16B
-
-       The following command reads file example.keys and prints the DAK for each phrase in that file.  Input phrases are checked
-       for  HomePlugAV compliance and illegal phrases are reported then ignored.  A legal HomePlug pass phrase is 12 to 64 char‐
-       acters consisting of ASCII characters ' ' through '~'.  Essentially, these are the only characters that one can enter  on
-       a standard English keyboard.
-
-          # hpavkeys -D example.keys
-          F084B4E8F6069FF1300C9BDB812367FF
-          7A6F36AC0DF1031CF04C5AF8DC0A70F0
-          910B3D08D309BCE66452DBB40FDCB551
-          309743236F0403C450A718494825FC02
-          3C94A168BDF4BC19AA111BAB930171A5
-          72D6E17E6756CD778F59FAFC6BF6D2B6
-          914EB1D58AB66461A27794BFF648C04F
-          7B7C094380A6E26F9F4618884C81DB63
-          08AE750B07884E2C380BDCEDBC28D2C8
-          F8EE1AC7F4234A3F724D21F8B837B547
-
-       The  following  example  reads  the  same file as above but prints the NMK for each phrase, instead of the DAK.  The keys
-       printed here have different values because the HomePlug AV Specification requires different hash algorithms for  the  DAK
-       and NMK.  Don't mix them up.
-
-          # hpavkeys -M example.keys
-          B59319D7E8157BA001B018669CCEE30D
-          F2B0C7F6C355981EBDD484FF49957420
-          54CB8AB1235896E45E6B643C7BF11ADB
-          75CD66973ED683E041F8AC37ACA88B58
-          E20A0A69A3C6326C623202D3F42AF416
-          1671D61F305E81BAF000D58AF09888D5
-          05EFD9C9452BF8415D84BB1C415EE52A
-          56F3C7F539D4F8F5EEC00E63F11A8DEC
-          9718D29451897404DA2719CB80CA2ADA
-          E5A7C020E0889A0265759D80DB3F9834
-
-       The  following  command reads the same file as above but prints the pass phrase because the -v option is specified.  Keys
-       are printed as 32 hex digits then one space then the phrase. Spaces are significant within the  phrase.  Printed  phrases
-       start in column 34 and continue to the end of the line.
-
-          # hpavkeys -M example.keys -v
-          B59319D7E8157BA001B018669CCEE30D HomePlugAV0123
-          F2B0C7F6C355981EBDD484FF49957420 01234567890123456789
-          54CB8AB1235896E45E6B643C7BF11ADB abcdefghijklmnopqrstuvwxyz
-          75CD66973ED683E041F8AC37ACA88B58    I     love     my    dog   .
-          E20A0A69A3C6326C623202D3F42AF416 A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z
-          1671D61F305E81BAF000D58AF09888D5 ~!@#$%^&*()_-`{}[]":;'<>./?
-          05EFD9C9452BF8415D84BB1C415EE52A QWRT-YPSD-FGHJ-KLZX
-          56F3C7F539D4F8F5EEC00E63F11A8DEC The quick brown fox jumped over the lazy dog.
-          9718D29451897404DA2719CB80CA2ADA Super-Duper Electrosonic Frepitator SSEI43
-          E5A7C020E0889A0265759D80DB3F9834 A = 3 * (5+2) - 1045
-
-TIPS&TRICKS
-       The  following  example  illustrates an unusual case where passwords start with dash ("-").  Program hpavkey assumes that
-       the dash is an option prefix which is incorrect in this case.  An error occurs because option -H is illegal.
-
-          # hpavkey -vM -HomePlugAV -HomePlugAV123
-          hpavkey: Operation canceled: Option 'H' has no meaning
-
-       One solution is to insert the keys verbatim in a password file, in this case password.txt, then run program  hpavkeys  on
-       that file.
-
-          # hpavkeys -vM password.txt
-          80B74B14E92A739AD41ACDC377451D1B -HomePlugAV
-          1A46BDE6F75209292FDFC4CCE4D19B4E -HomePlugAV123
-
-REFERENCES
-       See  the  HomePlug  AV Specification for more information on encryption keys, pass phrases and hash algorithms used.  See
-       standard FIPS180-2 sec 5.3.2 for more information on SHA256 encoding.
-
-DISCLAIMER
-       Qualcomm Atheros reserves the right to modify program names, functionality, input format or output format in future tool‐
-       kit releases without any obligation to notify or compensate toolkit users.
-
-SEE ALSO
-       hpavkey(1), keys(1), mac2pw(1), mac2pwd(1), rkey(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                 hpavkeys(1)
-
- - - diff --git a/docbook/hpavkeys.c.html b/docbook/hpavkeys.c.html deleted file mode 100644 index f7403f56..00000000 --- a/docbook/hpavkeys.c.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - hpavkeys.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-#define _GETOPT_H
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <unistd.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/version.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../key/HPAVKey.h"
-#include "../key/SHA256.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/todigit.c"
-#include "../tools/hexout.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/HPAVKeyDAK.c"
-#include "../key/HPAVKeyNMK.c"
-#include "../key/HPAVKeyNID.c"
-#include "../key/HPAVKeySHA.c"
-#include "../key/HPAVKeyOut.c"
-#include "../key/SHA256.c"
-#endif
-
-/*====================================================================*
- *
- *   void generate (signed type, signed level, flag_t flags);
- *
- *   read pass phrases from stdin, compute the digest for each and
- *   print both on stdout; ignore illegal pass phrases;
- *
- *   a pass phrase consists of consecutive ASCII characters in the
- *   range 0x20 through 0x7F; other characters are noise and serve
- *   to delimit the phrase; phrases less than HPAVKEY_PHRASE_MIN characters
- *   or more than HPAVKEY_PHRASE_MAX characters are also illegal;
- *
- *   effectively, each text line is a candidate phrase where spaces
- *   are legal and significant; tabs characters are illegal and act
- *   as line breaks;
- *
- *   detected errors are reported along with the input line number;
- *
- *
- *--------------------------------------------------------------------*/
-
-void generate (signed class, signed level, flag_t flags)
-
-{
-	uint8_t digest [SHA256_DIGEST_LENGTH];
-	char phrase [BUFSIZ];
-	char * sp = phrase;
-	unsigned line = 1;
-	signed c = getc (stdin);
-	while (c != EOF)
-	{
-		if (!isprint (c))
-		{
-			if (c == '\n')
-			{
-				line++;
-			}
-			c = getc (stdin);
-			continue;
-		}
-		sp = phrase;
-		while (isprint (c))
-		{
-			if ((sp - phrase) < (signed)(sizeof (phrase) - 1))
-			{
-				*sp++ = c;
-			}
-			c = getc (stdin);
-		}
-		if ((c != '\r') && (c != '\n') && (c != EOF))
-		{
-			error (0, ENOTSUP, "Illegal characters on line %d", line);
-			continue;
-		}
-		*sp = (char)(0);
-		if (_anyset (flags, HPAVKEY_ENFORCE))
-		{
-			if ((sp - phrase) < HPAVKEY_PHRASE_MIN)
-			{
-				error (0, ENOTSUP, "Less than %d characters on line %d", HPAVKEY_PHRASE_MIN, line);
-				continue;
-			}
-			if ((sp - phrase) > HPAVKEY_PHRASE_MAX)
-			{
-				error (0, ENOTSUP, "More than %d characters on line %d", HPAVKEY_PHRASE_MAX, line);
-				continue;
-			}
-		}
-		if (class == HPAVKEY_DAK)
-		{
-			HPAVKeyDAK (digest, phrase);
-			HPAVKeyOut (digest, HPAVKEY_DAK_LEN, phrase, flags);
-			continue;
-		}
-		if (class == HPAVKEY_NMK)
-		{
-			HPAVKeyNMK (digest, phrase);
-			HPAVKeyOut (digest, HPAVKEY_NMK_LEN, phrase, flags);
-			continue;
-		}
-		if (class == HPAVKEY_NID)
-		{
-			HPAVKeyNMK (digest, phrase);
-			HPAVKeyNID (digest, digest, level);
-			HPAVKeyOut (digest, HPAVKEY_NID_LEN, phrase, flags);
-			continue;
-		}
-		HPAVKeySHA (digest, phrase);
-		HPAVKeyOut (digest, HPAVKEY_SHA_LEN, phrase, flags);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, const char * argv []);
- *
- *
- *--------------------------------------------------------------------*/
-
-#define DEFAULT_LEVEL 0
-
-int main (int argc, const char * argv [])
-
-{
-	static const char * optv [] =
-	{
-		"DeL:MNqv",
-		"file [file] [...]",
-		"HomePlug AV key generator",
-		"D\tconvert password to Device Access Key",
-		"e\tenforce HomePlug AV password rules",
-		"M\tconvert password to Network Membership Key",
-		"N\tconvert password to Network Identification Key",
-		"L n\tSecurity Level is (n) [" LITERAL (DEFAULT_LEVEL) "]",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(const char *) (0)
-	};
-	flag_t flags = (flag_t)(0);
-	signed type = 0;
-	signed level = DEFAULT_LEVEL;
-	signed c;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'D':
-			type = HPAVKEY_DAK;
-			break;
-		case 'M':
-			type = HPAVKEY_NMK;
-			break;
-		case 'N':
-			type = HPAVKEY_NID;
-			break;
-		case 'L':
-			level = (signed)(uintspec (optarg, 0, 1));
-			break;
-		case 'q':
-			_setbits (flags, HPAVKEY_SILENCE);
-			break;
-		case 'v':
-			_setbits (flags, HPAVKEY_VERBOSE);
-			break;
-		case 'e':
-			_setbits (flags, HPAVKEY_ENFORCE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (!argc)
-	{
-		generate (type, level, flags);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!freopen (* argv, "r", stdin))
-		{
-			error (0, errno, "%s", * argv);
-		}
-		else
-		{
-			generate (type, level, flags);
-		}
-		argv++;
-		argc--;
-	}
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/hpp.txt b/docbook/hpp.txt deleted file mode 100644 index d7b88125..00000000 --- a/docbook/hpp.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - -
-
    -
  1. - *.hpp -
  2. -
-
diff --git a/docbook/if.h.html b/docbook/if.h.html deleted file mode 100644 index 8739e983..00000000 --- a/docbook/if.h.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - if.h - - - - - - - - - -
-/*====================================================================*
- *   
- *   Copyright (c) 2011 by Qualcomm Atheros.
- *   
- *   Permission to use, copy, modify, and/or distribute this software 
- *   for any purpose with or without fee is hereby granted, provided 
- *   that the above copyright notice and this permission notice appear 
- *   in all copies.
- *   
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *   
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   if.h - substitute net/if.h for systems without one;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IF_HEADER
-#define IF_HEADER
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#if defined (WIN32)
-#define IF_NAMESIZE 128
-#endif
-
-/*====================================================================*
- *   end;
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/if_arp.h.html b/docbook/if_arp.h.html deleted file mode 100644 index eb8f907e..00000000 --- a/docbook/if_arp.h.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - if_arp.h - - - - - - - - - -
-/*====================================================================*
- *   
- *   Copyright (c) 2011 by Qualcomm Atheros.
- *   
- *   Permission to use, copy, modify, and/or distribute this software 
- *   for any purpose with or without fee is hereby granted, provided 
- *   that the above copyright notice and this permission notice appear 
- *   in all copies.
- *   
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *   
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   if_arp.h - Substitute Linux header for systems without one;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IF_ARP_HEADER
-#define IF_ARP_HEADER
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-/*
- * do nothing with blinding speed and absolute accuracy;
- */
- 
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/if_ether.h.html b/docbook/if_ether.h.html deleted file mode 100644 index 8e102d50..00000000 --- a/docbook/if_ether.h.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - if_ether.h - - - - - - - - - -
-/*====================================================================*
- *   
- *   Copyright (c) 2011 by Qualcomm Atheros.
- *   
- *   Permission to use, copy, modify, and/or distribute this software 
- *   for any purpose with or without fee is hereby granted, provided 
- *   that the above copyright notice and this permission notice appear 
- *   in all copies.
- *   
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *   
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   if_ether.h - Substitute Linux header for systems without one;
- *
- *   On Linux systems, this file is actually included by header file
- *   net/ethernet.h which defines ethernet constants in terms of the
- *   ones defined here; 
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IF_ETHER_HEADER
-#define IF_ETHER_HEADER
- 
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#include <net/ethernet.h>
- 
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
- 
-
-
-
- - - diff --git a/docbook/in.h.html b/docbook/in.h.html deleted file mode 100644 index ad4a66b3..00000000 --- a/docbook/in.h.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - in.h - - - - - - - - - -
-/*====================================================================*
- *   
- *   Copyright (c) 2011 by Qualcomm Atheros.
- *   
- *   Permission to use, copy, modify, and/or distribute this software 
- *   for any purpose with or without fee is hereby granted, provided 
- *   that the above copyright notice and this permission notice appear 
- *   in all copies.
- *   
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *   
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   in.h - Substitute Linux header for systems without one;
- *
- *   Emulate the POSIX header netinet/in.h; 
- *
- *   specifically, obtain declare endian conversion functions htons(), 
- *   ntohs(), htonl() and ntohl();
- *
- *.  Intellon Linux Toolkit; 
- *:  Published 2007 by Intellon Corp. ALL RIGHTS RESERVED;
- *;  For demonstration; Not for production use;
- *
- *   Contributor(s):
- *	Charles Maier <charles.maier@atheros.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IN_HEADER
-#define IN_HEADER
- 
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#if defined (WIN32)
-#include <winsock2.h>
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
- 
-
-
-
- - - diff --git a/docbook/index.html b/docbook/index.html deleted file mode 100644 index 23298fb2..00000000 --- a/docbook/index.html +++ /dev/null @@ -1,733 +0,0 @@ -Qualcomm Atheros Open Powerline Toolkit

- Qualcomm Atheros Open Powerline Toolkit -

- Qualcomm Atheros, Ocala FL USA -

Edited by

- Charles - - Maier -

- Andrew Barnes <abarnes@qca.qualcomm.com> -
- Marc Bertola <mbertola@qti.qualcomm.com> -
- Florian Fainelli <f.fainelli@gmail.com> -
- Nate Houghton <nhoughto@qca.qualcomm.com> -
- Mathieu Poullet <m.poullet@avm.de> -
- Stefan Wahren <stefan.wahren@i2se.com> -
- Bill Wike <bwike@qca.qualcomm.com> -
- Alejandro Vasquez <avasquez@qca.qualcomm.com> -

- open-plc-utils-0.0.4 -

Abstract

- This document is the manual for the Qualcomm Atheros Open Powerline Toolkit. New users should read the first chapter before starting using the toolkit because it will answer many questions about toolkit installation, structure, content and application. New users may want to add this page and toolkit.html to their browser favorites for later reference. -

- HomePlug® AV is a registered trademark of the HomePlug Powerline Alliance. Linux™ is a trademark of Linus Tovalds. Windows® is a registered trademark of Microsoft Corporation. INT6000™, INT6300™, INT6400™, AR6410™, QCA7000™, AR7400™ and AR7420™ are powerline products from Qualcomm Atheros. -


Table of Contents

1. - Overview -
- Introduction -
- Background -
- Toolkit Distribution -
- Toolkit Installation on Linux -
- Toolkit Installation on GNU/Linux™ -
- Toolkit Documentation on GNU/Linux -
- Toolkit Removal on GNU/Linux™ -
- Toolkit Installation on Mac OS X -
- Toolkit Installation on Windows XP™ -
- Obtaining the Toolkit -
- Installing the Toolkit -
- Setting the PATH variable -
- Removing the Toolkit -
- Toolkit Installation on Windows 7™ -
- Obtaining the Toolkit -
- Installing the Toolkit -
- Setting the PATH variable -
- Removing the Toolkit -
- Toolkit Programs -
- INT6400 Device Management -
- INT6400 Device Monitoring -
- AR7400 Device Management -
- AR7400 Device Monitoring -
- AR7420 Device Configuration -
- Parameter File Management -
- Firmware File Management -
- Ethernet Traffic -
- Passwords and Keys -
- MDIO Programming -
- Serial Programming -
- Toolkit Folders -
- Packages -
- Toolkit Support -
2. - Hardware -
- Introduction -
- Device Form Factors -
- Device Communications -
- Device Configurations -
- Local Host to Local Device -
- Local Host to Remote Device -
- Local Host to Remote Host -
- Powerline Workstations -
- Host Hardware -
- Host Software -
- Network Configuration -
- Isolated Power-strip -
- Send-to-self Patch -
3. - Software -
- Introduction -
- Security Considerations -
- Platform Options -
- GNU/Linux -
- GNU/Linux with Libpcap -
- GNU/Linux with BPF -
- Mac OS X™ with BPF -
- Windows XP™ with Winpcap -
- GNU Makefiles on Linux -
- Stand-alone Compiling on GNU/Linux -
- Cross-Compiling on GNU/Linux -
- Compilation with Visual Studio .NET 2003 -
- Microsoft Solution Files -
- Header Files -
- Compiler Constants -
- Platform Constants -
- Ethernet Constants -
- LibPcap, WinPcap and BPF -
- Structure Packing -
- Endian-ness -
- Packet Basics -
- Frame Encoding -
4. - Firmware -
- Introduction -
Firmware Components
- Bootloader -
- Softloader -
- Memory Configuration Parameters -
- Runtime Firmware (MAC Software) -
- Parameter Information Block (PIB) -
- Architecture Overview -
- Firmware Boot Process -
- Boot from Host Configuration -
- Things to Remember -
- Every Little Bit Hurts -
- Liar! Liar! Pants on Fire! -
- But wait! There's more ... -
- Upgrade Device (INT6000/INT6300/INT6400) -
- Update Local Host (INT6000/INT6300/INT6400) -
- Boot from Host (INT6000) -
- Boot from Host (INT6300) -
- Boot from Host (INT6400) -
- Boot from Host (AR7400) -
- Boot from Host (AR7420) -
- Flash Memory (AR6410/AR7420) -
5. - Procedures -
- Introduction -
- Select an Interface on Linux -
- Select an Interface on Windows -
- Identify a Device -
- Browse the Network -
- Forming a Network -
- Configuring a Device -
- Upgrading Firmware and PIB -
- Upgrading PIB Only -
- Starting a Device -
- Testing a Device -
- Programming NVRAM -
- Pairing UART Devices post PTS -
- Trouble-shooting Problems -
- SLAC Configuration -
- APCM_SET_CCO Primative -
- APCM_CONFIG_SLAC Primative -
- SLAC Demonstration -
6. - Scripting -
- Introduction -
- Linux Script Basics -
- Host Independence -
- Checking Device Connection -
- Random Device Identity -
- Actual Device Identity -
- Editing a PIB -
- Initialize a Device -
- Update a Device -
- Generating Powerline Traffic -
- Reading PHY Rates -
- User Interaction -
7. - Support Function Reference -
- Introduction -
- Command Line Functions -
- assist -
- basespec -
- bytespec -
- checkfilename -
- dataspec -
- error -
- expect -
- getoptv -
- ipv4spec -
- ipv6spec -
- lookup -
- putoptv -
- synonym -
- uintspec -
- version -
- Ethernet Functions -
- channel -
- closechannel -
- openchannel -
- readpacket -
- sendpacket -
- Network Functions -
- NetworkBridges -
- NetworkDevices -
- Generic Functions -
- binout -
- checksum32 -
- checksum_32 -
- chrout -
- decout -
- endian -
- fdchecksum32 -
- fdchecksum_32 -
- filepart -
- hexdecode -
- hexdump -
- hexencode -
- hexin -
- hexout -
- hexstring -
- hexview -
- memdecr -
- memincr -
- memout -
- memswap -
- strdecr -
- strfbits -
- strincr -
- todigit -
- typename -
- Message Debug Functions -
- MMECode -
- MMEMode -
- MMEName -
- MMEPeek -
- Key Generation Functions -
- MACPasswords -
- HPAVKeyDAK -
- HPAVKeyNMK -
- HPAVKeyNID -
- HPAVKeyOut -
- SHA256Block -
- SHA256Fetch -
- SHA256Ident -
- SHA256Match -
- SHA256Print -
- SHA256Reset -
- SHA256Write -
- XML Editing Functions -
- xmledit -
- xmlfree -
- xmlnode -
- xmlopen -
- xmlscan -
- xmlschema -
- xmltree -
- Download Functions -
- WriteExecuteApplet -
- WriteExecuteApplet1 -
- WriteExecuteApplet2 -
- Procrastination Functions -
- WaitForAssoc -
- WaitForAssoc1 -
- WaitForAssoc2 -
- WaitForReset -
- WaitForStart -
- Traffic Functions -
- CrossTraffic1 -
- CrossTraffic2 -
- LocalTraffic1 -
- LocalTraffic2 -
- NetworkTraffic1 -
- NetworkTraffic2 -
- Traffic1 -
- Traffic2 -
- SLAC Functions and Variables -
- The Session Variable -
- pev_cm_slac_param -
- evse_cm_slac_param -
- pev_cm_start_atten_char -
- evse_cm_start_atten_char -
- pev_cm_mnbc_sound -
- evse_cm_mnbc_sound -
- evse_cm_atten_char -
- pev_cm_atten_char -
- pev_cm_slac_match -
- evse_cm_slac_match -
- evse_cm_set_key -
- pev_cm_set_key -
8. - Serial Drivers -
- Introduction -
- Principles of Operation -
- SPI Serial Driver -
- qcaspi_spi_thread -
- qcaspi_qca7k_sync -
- Register Functions -
- qcaspi_read_register -
- qcaspi_write_register -
- qcaspi_tx_cmd -
- Interrupt Functions -
- disable_spi_interrupts -
- enable_spi_interrupts -
- qcaspi_intr_handler -
- Transmit Functions -
- qcaspi_transmit -
- qcaspi_tx_frame -
- qcaspi_flush_txq -
- Receive Functions -
- qcaspi_receive -
- DMA Functions -
- qcaspi_dma_read_burst -
- qcaspi_dma_read_legacy -
- qcaspi_dma_write_burst -
- qcaspi_dma_write_legacy -
- Support Functions -
- QcaFrmCreateHeader -
- QcaFrmCreateFooter -
- QcaFrmFsmInit -
- QcaFrmFsmDecode -
- Kernel Functions -
- qcaspi_netdev_xmit -
- qcaspi_netdev_tx_timeout -
- qcaspi_netdev_uninit -
- qcaspi_netdev_get_stats -
- qcaspi_netdev_change_mtu -
- qcaspi_netdev_set_mac_address -
- qcaspi_netdev_close -
- qcaspi_mod_exit -

List of Figures

1.1. - Windows Installer Dialogue -
1.2. - Control Panel System Dialogue -
1.3. - Control Panel Add/Remove Dialogue -
1.4. - Windows Installer Dialogue -
1.5. - Control Panel System Dialogue -
1.6. - Control Panel Add/Remove Dialogue -
4.1. - Simple Network -
4.2. - Upgrade Device (INT6000/INT6300/INT6400) -
4.3. - Update Local Host (INT6000/INT6300/INT6400) -
4.4. - Boot from Host (INT6000) -
4.5. - boot-from-host (INT6300) -
4.6. - Boot from Host (INT6400) -
4.7. - Boot from Host (AR7400) -
4.8. - Boot from Host (AR6410/AR7420) -
4.9. - Flashing the Softloader (AR7420) -
4.10. - Flash Parameters and Firmware (AR7420) -

List of Tables

1.1. - Program/Package Matrix -
4.1. - Softloader/Bootloader MMEs -
4.2. - Legacy Device Identification -
4.3. - Device Identification -
5.1. - PEV-PLC PIB Settings -
5.2. - PEV-EVSE PIB Settings -
8.1. - SPI Transmit Frame -
8.2. - SPI Receive Frame -

List of Examples

1.1. - Toolkit Installation on GNU/Linux™ -
1.2. - Toolkit Removal on GNU/Linux™ -
1.3. - Setting the PATH variable on OS X™ -
1.4. - Removing the Toolkit from Mac OS X™ -
2.1. - send-to-self Patch Description -
2.2. - send-to-self Patch Application -
2.3. - send-to-self Patch Installation -
2.4. - send-to-self Patch Listing -
3.1. - The MAKEFILE constant -
3.2. - Stand-alone Compiling on GNU/Linux -
3.3. - Cross-compiling with make.def -
3.4. - Microsoft Visual Studio .NET 2003 -
3.5. - Packing Structures with keyword __packed -
3.6. - Packing Structures with Attribute packed -
3.7. - Packing Structures with the Pragma pack -
3.8. - Packing Structures the Atheros Way -
3.9. - Frame Encoding by Offset -
3.10. - Frame Encoding by Address -
5.1. - Selecting another Interface on Linux -
5.2. - Changing the Default Interface on Linux -
5.3. - Finding Interfaces on Linux -
5.4. - Selecting another Interface on Windows -
5.5. - Finding Interfaces on Windows -
5.6. - Device Identification -
5.7. - Inspecting Device Configuration -
5.8. - Display Network Information -
5.9. - Setting the Network Membership Key -
5.10. - Forming a Custom Network -
5.11. - Remote Network Configuration -
5.12. - Read a PIB File -
5.13. - Modify a PIB File -
5.14. - Save a PIB File -
5.15. - Upgrade Firmware and PIB -
5.16. - Upgrade local device PIB -
5.17. - Upgrade remote PIB -
5.18. - Start Firmware on INT6000™ -
5.19. - Start Firmware on INT6300™ and INT6400™ -
5.20. - Start Firmware on AR7400™ -
5.21. - Start Firmware on AR7420™ -
5.22. - Flash NVRAM with int6kf -
5.23. - Flash NVRAM with int6k -
6.1. - hardware.sh -
6.2. - firmware.sh -
7.1. - Enumerating Local Devices -
7.2. - Enumerating Network Devices -
7.3. - SHA256 Digest Computation -
7.4. - XML Source File -
7.5. - XML Edit Schema -
7.6. - XML Parse Tree -
diff --git a/docbook/inet.h.html b/docbook/inet.h.html deleted file mode 100644 index 2bc9e567..00000000 --- a/docbook/inet.h.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - inet.h - - - - - - - - - -
-/*====================================================================*
- *   
- *   Copyright (c) 2011 by Qualcomm Atheros.
- *   
- *   Permission to use, copy, modify, and/or distribute this software 
- *   for any purpose with or without fee is hereby granted, provided 
- *   that the above copyright notice and this permission notice appear 
- *   in all copies.
- *   
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *   
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   inet.h - Substitute Linux header for systems without one;
- *
- *   Emulate the POSIX header arpa/inet.h; 
- *
- *   specifically, obtain declare endian conversion functions htons(), 
- *   ntohs(), htonl() and ntohl();
- *
- *.  Intellon Linux Toolkit; 
- *:  Published 2007 by Intellon Corp. ALL RIGHTS RESERVED;
- *;  For demonstration; Not for production use;
- *
- *   Contributor(s):
- *	Charles Maier <charles.maier@atheros.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IN_HEADER
-#define IN_HEADER
- 
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#include <winsock2.h>
- 
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
- 
-
-
-
- - - diff --git a/docbook/install-linux.xml b/docbook/install-linux.xml deleted file mode 100644 index ae388334..00000000 --- a/docbook/install-linux.xml +++ /dev/null @@ -1,69 +0,0 @@ -
- - Toolkit Installation on Linux - - - The Linux version of the toolkit must be compiled from source code. The only requirement is the standard GNU/Linux toolchain consisting of make, gcc and ld. These are included with most Linux distributions but may require installation. On Debian based distributions, such as Ubuntu, they may be installed using apt-get. On RedHat distributions, such as Fedora, they may be installed using rpm. On SuSE based distributions, they may be installed using YaST2. - -
- - Toolkit Installation on GNU/<productname>Linux</productname> - - - - Toolkit Installation on GNU/<productname>Linux</productname> - - -# cp plc-utils-1.2.1.tar.gz /home/mydir -# cd /home/mydir -# tar -vzxf plc-utils-1.2.1.tar.gz -# cd plc-utils-1.2.1 -# make -# make install -# make manuals - - - - Decompress the archive and extract the contents with the tar utility. This will create a folder having the same basename as the archive such that one version will not over-write another. Consult the tar man page on your system for detailed instructions. Change directory to the appropriate folder. - - - The main package folder contains a recursive Makefile that will compile and install all toolkit programs. If you do not want to compile and install all programs then change directory to the appropriate folder and run make from there. To compile binary files, type make. To install binary files, type make install. To install man pages, type make manuals. The package does not automatically install examples, scripts, applets or man pages. - - - We recommend that you login as root user before installing the toolkit; otherwise, you will be prompted for the root password as each program or component is installed. - - - Programs are installed in folder /usr/local/bin and man pages are installed in folders /usr/share/man/man1. If these folders are not correct for your system, or if you want to install in other folders, then edit the folder names defined in the make.def file found in main toolkit folder or over-ride these definitions in subordinate makefiles. - -
-
- - Toolkit Documentation on GNU/Linux - - - Toolkit web pages are not automatically installed. To access toolkit documentation, point your browser to docbook/index.html and add the page to the browser bookmark or favorites list. If you are interested in how the toolkit has been implemented then do the same for page docbook/toolkit.html. - - The method described above is only recommended if you do not plan to move or remove toolkit folders. Otherwise, you can merely copy the entire contents of the toolkit docbook folder to another folder of your choice and point your browser to the new file locations. - - -cp -rv docbook/* /home/mydir/toolkit - -
-
- - Toolkit Removal on GNU/<productname>Linux</productname> - - - To uninstall installed programs and man pages on Linux, change to the main toolkit folder and type make uninstall. - - - - Toolkit Removal on GNU/<productname>Linux</productname> - - -# cd /home/mydir/plc-utils-1.2.1 -make uninstall - - -
-
diff --git a/docbook/install-macosx.xml b/docbook/install-macosx.xml deleted file mode 100644 index c1cf655d..00000000 --- a/docbook/install-macosx.xml +++ /dev/null @@ -1,41 +0,0 @@ -
- - Toolkit Installation on Mac OS X - - - Toolkit installation on Mac OS X is essentially identical to installation on Linux but special steps are needed before starting. - - - First, you must install the toolkit as the root user or you will be denied permission. The root user account is disabled by default and so you must enable it in order to login. Follow instructions at Enabling the "root" user in Mac OS X to enable the account and login. After installation, toolkit programs should be run from a normal user account. - - - Second, Mac OS X does not include C Language development tools by default. You must download and install them in order to build the toolkit. You can download and install them from the Apple website or (if you are ambitious) download, compile and install them from various open source websites. Consider using Xcode on Mac OS X Leopard or Lion. - - - Login as the root user and download or copy the toolkit archive file to your preferred folder then follow the instructions for installing the toolkit on Linux. - - - - Setting the <constant>PATH</constant> variable on <productname>OS X</productname> - - - While still logged in as the root user, edit /etc/profile and add folder/usr/local/bin to the PATH definition found there. This will ensure that all users can access toolkit programs. The change may not take effect until the next time you login or open a new command shell. - - - -PATH="/bin:/sbin:/usr/local/bin" - - - - - Installing the Toolkit on <productname>Mac OS X</productname> - - - While still logged in as the root user, remember to delete the toolkit source folder or, at least change ownership of all files in the toolkit folder, so that you can access and/or remove them later. - - -cd .. -rm -r plc-utils-x.x.x - - -
diff --git a/docbook/install-windows-7.xml b/docbook/install-windows-7.xml deleted file mode 100644 index 75b78bd0..00000000 --- a/docbook/install-windows-7.xml +++ /dev/null @@ -1,142 +0,0 @@ -
- - Toolkit Installation on <productname>Windows 7</productname> - - - The Windows version of the toolkit comes pre-compiled and ready to install and run using the native Windows Installer. You may copy and distribute installation file plc-utils-x.x.x.msi. Users merely click on the file to install the package and may discard it afterwards. This method of installation permits remote installation over network. - - - The version of the Windows Installer used here needs Microsoft .NET Framework 1.1 to work correctly. Newer versions of the .NET Framework will not work. The .NET Framework must be installed before the toolkit is installed or the Windows Installer will report dependency errors and refuse to complete installation. Multiple versions of the .NET Framework can coexist under Windows 7. The .NET Framework needed is included in the toolkit support folder. - - - Failure to remove previous toolkit versions on some systems may result in the message "Another version of this product is already installed" when trying to install a new version. You may want to remove prior version before starting toolkit installation. - - - Windows versions of toolkit programs that communicate with powerline devices all need WinPcap from winpcap.org to read and write Ethernet frames. WinPcap may be installed before or after toolkit installation but tools that access powerline devices will not run without it. You may want to install WinPcap before starting toolkit installation. If you have Wireshark installed then you probably already have WinPcap installed. A recent copy of WinPcap is included in the toolkit support folder. - -
- - Obtaining the Toolkit - - - QCA customers can download the toolkit from the QCA Customer FTP Site. - - - QCA employees may be able to download the toolkit from the QCA Application Engineering World FTP site ftp://appslinux01.qca.qualcomm.com/toolkit/plc-utils/. There are several installers available for Windows. Each installs a subset of the toolkit. Download the desired installer files to your local machine then execute them by right-clicking on them and selecting option "Run as Administrator". - -
-
- - Installing the Toolkit - - - Older toolkit programs were installed in folder C:\Program Files\Atheros\Toolkit by default but now they are installed in C:\Program Files (x86)\Qualcomm Atheros\Open Powerline Toolkit instead. If you select a different folder during installation then remember it for the next step. - -
- - Windows Installer Dialogue - - - - - - -
- - Accept install defaults. - -
-
- - Setting the PATH variable - - - Toolkit programs have command line interfaces and must be run from an open console window. To simplify program access and minimize the typing required, add the toolkit installation path mentioned above to the PATH environment variable by following steps listed below. If you have Administrator privileges then we recommend that you edit the system PATH variable; otherwise, you may need to create and/or edit a user PATH variable. - -
- - Control Panel System Dialogue - - - - - - -
- - - - On the Start menu, select the Control Panel option. - - - - - On the Adjust system settings page, select the System icon. - - - - - On the View basic information about your computer page, select the Advanced system settings option. - - - - - On the System Properties dialog, press the Environment Variables button. - - - - - On the Environment Variables dialog box, scroll down the System variables list and select the Path variable then press the Edit button. - - - - - On the Edit System Variable dialogue box, append the installation path to the Variable value field. - - - - - Press the OK button. - - - - - Environment variable changes made here do not take effect until a console window is opened. This means that you may need to close and then reopen console windows that depend on the changes. It is a good idea to immediately open a console window and execute a toolkit command in order to confirm that the PATH variable is properly defined. - -
-
- - Removing the Toolkit - - - To remove an existing version of the Qualcomm Atheros Open Powerline Toolkit from your system, follow the steps listed below. If the toolkit is not installed on your system then omit these steps. If you are unsure, you can follow them to determine if you have the toolkit installed or you can attempt to install, anyway, and return here if installation is prevented. - -
- - Control Panel Add/Remove Dialogue - - - - - - -
- - - - On the Start menu, select the option. - - - - - On the Adjust system settings page, select the Programs and Features icon. - - - - - On the Uninstall or change a program page, scroll down and select the appropriate QCA entry then press the pushbutton. There may be several different QCA Open Powerline Toolkit entries so be sure to select the correct one. - - - -
-
diff --git a/docbook/install-windows-xp.xml b/docbook/install-windows-xp.xml deleted file mode 100644 index 7cc4eab6..00000000 --- a/docbook/install-windows-xp.xml +++ /dev/null @@ -1,139 +0,0 @@ -
- - Toolkit Installation on <productname>Windows XP</productname> - - - The Windows version of the toolkit comes pre-compiled and ready to install and run using the Windows Installer. You may copy and distribute installation file plc-utils-x.x.x.msi. Users may then click on the installation file to install the package then discard it afterwards. The installation file permits remote installation over the network. - - - The version of the Windows Installer used here needs Microsoft .NET Framework 1.1 to work correctly. Newer versions of the .NET Framework will not work. The .NET Framework must be installed before the toolkit is installed or the Windows Installer will report dependency errors and refuse to complete installation. Multiple versions of the .NET Framework can coexist under Windows 7. The .NET Framework needed is included in the toolkit support folder. - - - Windows versions of toolkit programs that communicate with powerline devices all need WinPcap from winpcap.org to read and write Ethernet frames. WinPcap may be installed before or after toolkit installation but tools that access powerline devices will not run without it. You may want to install WinPcap before starting toolkit installation. If you have Wireshark installed then you probably already have WinPcap installed. A recent copy of WinPcap is included in the toolkit support folder. - - - Failure to remove previous toolkit versions on some systems may result in the message "Another version of this product is already installed" when trying to install a new version. You may want to remove prior version before starting toolkit installation. - -
- - Obtaining the Toolkit - - - QCA customers can download the toolkit from the QCA Customer FTP Site. - - - QCA employees may be able to download the toolkit from the QCA Application Engineering World FTP site ftp://appslinux01.qca.qualcomm.com/toolkit/plc-utils/. There are several installers available for Windows. Each installs a subset of the toolkit. Download the desired installer files to your local machine then execute them by right-clicking on them and selecting option "Run as Administrator". - -
-
- - Installing the Toolkit - - - Use a compression program like WinZip to decompress the archive file and extract all files. Use Microsoft Windows Explorer to locate file .\VisualStudioNET\plc-utils-x.x.x.msi under the main toolkit folder. Click on the file to start the Windows Installer then follow the installation instructions. - -
- - Windows Installer Dialogue - - - - - - -
- - Older toolkit programs were installed in folder C:\Program Files\Atheros\Toolkit but they are now installed in folder C:\Program Files\Qualcomm Atheros\Open Powerline Toolkit instead. If you select a different folder, remember it for the next step. - -
-
- - Setting the PATH variable - - - Toolkit programs have command line interfaces and must be run from an open console window. To simplify program access and minimize the typing required, add the toolkit installation path mentioned above to the PATH environment variable by following steps listed below. If you have Administrator privileges then we recommend that you edit the system PATH variable; otherwise, you may need to create and/or edit a user PATH variable. - -
- - Control Panel System Dialogue - - - - - - -
- - - - On the Start menu, select the Control Panel option. - - - - - In the Control Panel window, select the System icon. - - - - - On the System Properties dialog box, select the Advanced tab. - - - - - On the Advanced tab, press the Environment Variables button. - - - - - On the Environment Variables dialog box, scroll down the System variables list and select the Path variable then press the Edit button. - - - - - On the Edit System Variable dialogue box, append the installation path to the Variable value field. - - - - - Press the OK button. - - - -
-
- - Removing the Toolkit - - - To remove an existing version of the Qualcomm Atheros Open Powerline Toolkit from your system, follow the steps listed below. If the toolkit is not installed on your system then omit these steps. If you are unsure, you can follow them to determine if you have the toolkit installed or you can attempt to install, anyway, and return here if installation is prevented. - -
- - Control Panel Add/Remove Dialogue - - - - - - -
- - - - On the Start menu, select the option. - - - - - In the Control Panel window, select the icon. - - - - - On the Add or Remove Programs dialog box, scroll down and select the Qualcomm Atheros entry then press the pushbutton. - - - -
-
diff --git a/docbook/install.xml b/docbook/install.xml deleted file mode 100644 index 33db17a0..00000000 --- a/docbook/install.xml +++ /dev/null @@ -1,5 +0,0 @@ -&install-linux; -&install-macosx; -&install-windows-xp; -&install-windows-7; - diff --git a/docbook/int64host.1.html b/docbook/int64host.1.html deleted file mode 100644 index ac16e64c..00000000 --- a/docbook/int64host.1.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - int64host.1 - - - - - - - - - -
-int64host(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int64host(1)
-
-NAME
-       int64host - INT6400 Host Emulator
-
-SYNOPSIS
-       int64host [options] -N file -P file -n file -p file
-
-DESCRIPTION
-       The  INT6400 Host Emulator waits for VS_HST_ACTION.IND messages from a local device and services them as described in the
-       INT6400 Technical Reference Manual.  It can be used to demonstrate or verify proper device/host  interaction  for  flash-
-       less  devices.   This  program  is not production grade and will stop dead - like a bug! - when things go wrong.  Use the
-       Qualcomm Atheros Embedded API for real-time, production-grade applications.
-
-       Host emulation applies to flash-less device designs where a local host processor provides the  persistent  storage.   The
-       local  host  can provide a wide range of intelligent storage functions for a device but this program offers one.  Options
-       -N and -P name existing files that store the factory default runtime firmware and parameters, respectively.   Options  -n
-       and  -p  name scratch files that will store user firmware and parameters, respectively.  This is similiar to the standard
-       Atheros NVRAM scheme but is not the same.
-
-       To use the program, connect a flash-less device to the host via ethernet then start this program with the  correct  file‐
-       names.   The  program  will  automatically  respond  to device requests to download memory configuration, firmware and/or
-       parameters and upload firmware or and/or parameters under device control.  See the Qualcomm  Atheros  Firmware  Technical
-       Reference Manual for more information.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -F[F]  Flash NVRAM once downloaded firmware has started.   The  same  firmware  and  PIB  are  downloaded,  again,  using
-              VS_WR_MOD  and  written  to  NVRAM using VS_MOD_NVM.  Adding a second F here or another -F anywhere on the command
-              line will perform a forced flash.  When no NVRAM is present, normal and force flash cause the device to upload  to
-              the  host.  When blank or corrupted NVRAM is present, forced flash writes to NVRAM.  This operation will fail when
-              no NVRAM is present.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -N filename
-              Use  this  file to download firmware when requested by the local device.  The file must exist and have a valid NVM
-              file format or it will be rejected.  No assumptions are made based on filename and  no  filename  conventions  are
-              enforced.  The program will not over-write this file.  This option and argument are required.
-
-       -n filename
-              Use  this  file to store firmware uploaded from the local device.  The file need not exist but an error will occur
-              if it cannot be created or written.  If firmware is uploaded to this file, it  is  used  for  subsequent  firmware
-              downloads  unless  the  device  requests  a factory reset.  In that case, the file specified by option -N is used.
-              This option and argument are optional.  If omitted then the default filename host.pib will be used.
-
-       -P filename
-              Use this file to download parameters when requested by the local device.  The file must exist and have a valid PIB
-              file  format  or  it  will be rejected.  No assumptions are made based on filename and no filename conventions are
-              enforced.  The program will not over-write this file.  This option and argument are required.
-
-       -p filename
-              Use this file to store parameters uploaded from the local device.  The file need not exist but an error will occur
-              if  it cannot be created or written.  Once parameters are uploaded to this file, it is used for subsequent parame‐
-              ter downloads unless the device requests a factory reset.  In that case, the file specified by option -P is  used.
-              This option and argument are optional.  If omitted then the default filename host.nvm will be used.
-
-       -q     Suppress status messages on stderr.
-
-       -t milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is shown in brackets on the program menu.
-
-       -v     Print additional information on stdout.  In particular, this option will  print  incoming  and  outgoing  Ethernet
-              frames on stdout.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       None.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The  following  command  starts the host emulator.  The -N and -P options are always required.  Their order is not impor‐
-       tant.
-
-          # int64host -N test.nvm -P test.pib -n temp.nvm -p temp.pib
-          eth1 00:B0:52:00:00:01 Waiting for Host Action Requests
-
-          eth1 00:B0:52:00:00:01 Waiting for Host Action
-          eth1 00:B0:52:00:00:01 Host Action Request is (4) configure memory.
-          eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
-          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
-          eth1 00:B0:52:00:00:01 Started BootLoader
-
-          eth1 00:B0:52:00:00:01 Host Action Request is (0) initialize device.
-          eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
-          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
-          eth1 00:B0:52:00:00:01 Started BootLoader
-          eth1 00:B0:52:00:00:01 Write Memory (00204000:1013952)
-          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
-          eth1 00:B0:52:00:00:01 Write Memory (01F00000:11400)
-          eth1 00:B0:52:00:00:01 Wrote AR7400-WallAdapter-HomePlugAV_NorthAmerica.pib
-          eth1 00:B0:52:00:00:03 Started INT7400-MAC-0-0-1008-00-63-20100227-AUTO-D
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-SEE ALSO
-       plc(1), int64host(1), int6k(1), int6kboot(1) plchost(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int64host(1)
-
- - - diff --git a/docbook/int64host.c.html b/docbook/int64host.c.html deleted file mode 100644 index b10f7401..00000000 --- a/docbook/int64host.c.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - int64host.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int64host.c - Atheros INT6400 Host Emulator
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/BootDevice1.c"
-#include "../plc/BootFirmware1.c"
-#include "../plc/BootParameters1.c"
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Failure.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/HostActionResponse.c"
-#include "../plc/InitDevice1.c"
-#include "../plc/EmulateHost64.c"
-#include "../plc/Request.c"
-#include "../plc/ResetDevice.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WriteExecuteFirmware1.c"
-#include "../plc/WriteExecutePIB.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/WriteMEM.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/WriteCFG.c"
-#include "../plc/ReadFirmware1.c"
-#include "../plc/ReadParameters1.c"
-#include "../plc/ModuleRead.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/error.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibfile1.c"
-#include "../pib/pibpeek1.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary when asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"Fi:n:N:p:P:qt:vx",
-		"-N file -P file [-n file] [-p file]",
-		"Qualcomm Atheros INT6400 Host Emulator",
-		"F[F]\tflash (force) NVRAM using VS_MOD_NVM",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"n f\tread NVM from device into file using VS_RD_MOD",
-		"N f\twrite NVM file to device using VS_WR_MEM",
-		"p f\tread PIB from device into file using VS_RD_MOD",
-		"P f\twrite PIB file to device using VS_WR_MEM",
-		"q\tquiet mode",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed c;
-	plc.timer = 10000;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'F':
-			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'n':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.nvm.name);
-			}
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.PIB.name);
-			}
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'p':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.pib.name);
-			}
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-
-/*
- *      cancel operation if the user omitted a file or entered to extra argments
- *      on the command line;
- */
-
-	if (argc)
-	{
-		error (1, ENOTSUP, ERROR_TOOMANY);
-	}
-	if (plc.NVM.file == -1)
-	{
-		error (1, ECANCELED, "No host NVM file named");
-	}
-	if (plc.PIB.file == -1)
-	{
-		error (1, ECANCELED, "No host PIB file named");
-	}
-	if (plc.nvm.file == -1)
-	{
-		error (1, ECANCELED, "No user NVM file named");
-	}
-	if (plc.pib.file == -1)
-	{
-		error (1, ECANCELED, "No user PIB file named");
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	EmulateHost64 (&plc);
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6k.1.html b/docbook/int6k.1.html deleted file mode 100644 index 1bd190d8..00000000 --- a/docbook/int6k.1.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - int6k.1 - - - - - - - - - -
-int6k(1)                                     Qualcomm Atheros Open Powerline Toolkit                                    int6k(1)
-
-NAME
-       int6k - Qualcomm Atheros INT6x00 Powerline Device Manager
-
-SYNOPSIS
-       int6k [options] [device] [device] [...]
-
-DESCRIPTION
-       This  version of the Qualcomm Atheros Device Manager for Linux performs basic operations on Atheros INT6x00 devices using
-       the raw Ethernet protocol described in the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual.  It  can  be
-       used to interrogate and control devices or upgrade firmware if on-board NVRAM is present.
-
-       This  program  is  part  of  the  Qualcomm  Atheros  Powerline Toolkit.  Is supports legacy chipsets INT6000, INT6300 and
-       INT6400.  See program amptool for AR7400 and AR7450 chipsets.  See program  plctool  for  QCA6410,  QCA7000  and  QCA7420
-       chipsets.  See the plc man page for an overview and installation instructions.
-
-OPTIONS
-       -a     Read  device  attributes  using  VS_OP_ATTRIBUTES.  Attributes are short strings and integers that describe device
-              hardware and firmware.  They are concatenated to form the output that is similar to option -r but derived  differ‐
-              ently.
-
-       -B action
-              Press  the  simple  connect  pushbutton using VS_PB_ENC.  The action can be specified by number 1, 2, 3 or 4 or by
-              symbol "join", "leave", "status" or "reset", respectively.  Use 1 on both devices that are expected to join.   Use
-              2 only on the device that is expected to leave the network.
-
-       -C module
-              Commit  (flash)  downloaded modules to NVRAM using VS_MOD_NVM.  The module can be spedified by number 1, 2 or 3 or
-              by symbol "nvm", "pib" or "both", repectively.  Module 3 is equivalent to option -F which writes the NVM  and  PIB
-              together.  You cannot force flash NVRAM using this option.  Use option -FF to force flash.
-
-       -d filename
-              Read  Watchdog Report from the device and write it to the named file in binary format using VS_WD_RPT.  The report
-              file can be sent to Qualcomm Atheros for technical analysis.  No assumptions are made based  on  filename  and  no
-              filename convetions are enforced; however, you should use a .log file extension to indicate binary format.
-
-       -D xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
-              Define  the  16 octet Device Access Key (DAK) in hex format.  The DAK is used by option -J.  It may also be set to
-              "key1" or "key2" as explained in the KEYS section.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -f     Read  device  NVRAM parameters using VS_GET_NVM.  An error will be reported when no NVRAM is present.  This option
-              can be used to determine if NVRAM is large enough to store the runtime firmware and parameter block.
-
-       -F[F]  Write previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.  Adding a second F here or another -F  anywhere
-              on  the  command  line  will force-flash a blank or corrupted NVRAM.  Firmware loaded from NVRAM will treat force-
-              flash as an error.  This option can be used to create factory settings but cannot be used to change them once cre‐
-              ated.   Subsequent  use  creates  and updates operational settings that can be erased using a factory reset.  This
-              option is executed after all others on the command line, except for the -R option.
-
-       -g     Read multicast group information discovered while IGMP snooping using VS_MULTICAST_INFO.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -I     Read  the  device PIB header using VS_RD_MOD and print the firmware major revision number, PIB minor revision num‐
-              ber, Device Access Key (DAK), Network Membership Key (NMK), MAC address and other information on stdout.
-
-       -J xx:xx:xx:xx:xx:xx
-              Set the Network Membership Key (NMK) on the remote device, specified by MAC, using  VS_SET_KEY.   This  option  is
-              similar  to  option  -K  but  requires  the  remote device MAC and DAK in addition to the NMK and local device MAC
-              address.  The NMK value is defined using option -K unless you want to use the default value.  The  remote  DAK  is
-              defined  using option -D unless you want to use the default value.  Programming remote device keys is complicated.
-              It is often easier to connect the device directly to the host and use the -K option.
-
-       -K xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
-              Define the Network Membership Key (NMK) value used by options -M or -J.  The symbolic names "key1" and "key2"  are
-              recognized as described in the KEY section.
-
-       -l count
-              Define the number of times that the command will be repeated for each device specified.  Normally, you will repeat
-              operations on one device only.
-
-       -m     Read network membership information using VS_NW_INFO.  This can be used to determine network configuration.
-
-       -M     Set the Network Membership Key (NMK) on the local device using VS_SET_KEY.  The NMK value is specified  using  the
-              -K option unless you want to use the default value.
-
-       -n filename
-              Read  firmware  from  the  device SDRAM and write it to the named .nvm file using multiple VS_RD_MOD messages.  No
-              assumptions are made based on filename and no filename conventions are enforced.  This option is performed  before
-              option -N when both are specified.
-
-       -N filename
-              Read  the  named  .nvm file and write it to the device using multiple VS_WR_MOD messages.  No assumptions are made
-              based on filename and no filename conventions are enforced; however, files having  invalid  .nvm  format  will  be
-              rejected.  This option is executed after -n when both are specified.
-
-       -p filename
-              Read parameters from the device SDRAM and write them to the named .pib file using multiple VS_RD_MOD messages.  No
-              assumptions are made based on filename and no filename convetions are enforced.  This option  is  executed  before
-              option BP when both are specified.
-
-       -P filename
-              Read  the  named  .pib file and write it to the device using multiple VS_WR_MOD messages.  No assumptions are made
-              based on filename and no filename conventions are enforced; however, files having  invalid  .pib  format  will  be
-              rejected.  This option is executed after -p when both are specified.
-
-       -q     Suppresses status messages on stderr.
-
-       -Q     Quick  flash.  The program will not wait for a device to reset or the firmware to restart after writing flash mem‐
-              ory.  This option is desirable with newer firmware that writes flash memory in the background.  It has  no  effect
-              unless used with option -F or -C.
-
-       -r     Read device firmware and hardware revision using VS_SW_VER.  Output is similar to option -a but is derived differ‐
-              ently.
-
-       -R     Reset the device using VS_RS_DEV.  This option is executed after all others on the same command line.
-
-       -s     Read device SDRAM configuration using VS_RD_CBLOCK.
-
-       -S filename
-              Read the named .cfg file and write it to the device using VS_SET_SDRAM.  No assumptions are made based on filename
-              and  no filename conventions are enforced; however, files having an invalid .cfg file format will be rejected.  Do
-              not confuse .cfg files with .config files.  See chkcfg and config2cfg for more information on SDRAM  configuration
-              file formats.
-
-       -t milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is shown in brackets on the program menu.
-
-       -T     Restore factory defaults.  This permanently erases all PIB changes made since the device was last programmed  with
-              factory default settings.  The device will automatically reset and reboot.
-
-       -v     Print  additional information on stdout.  In particular, this option dumps incoming and outgoing packets which can
-              be saved as text files for reference.
-
-       -w seconds
-              Defines the number of seconds to wait before repeating command line options.  This option  has  no  effect  unless
-              option -l is also specified with a non-zero value.
-
-       -x     Cause  the  program  to  exit  on  the  first error instead of continuing with remaining iterations, operations or
-              devices.  Normally, the program reports errors and moves on to the next operation, iteration or  device  depending
-              on the command line.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  Ethernet  hardware  address  of some powerline device.  More than one address may be specified on the command
-              line.  If more than one address is specified then operations are performed on each device in  turn.   The  default
-              address is local.  as explained in the DEVICES section.
-
-KEYS
-       Passwords are variable length character strings that end-users can remember.  Keys are fixed length binary values created
-       by encrypting passwords.  There are two encryption algorithms for HomePlugAV.  One for DAKs and the other for NMKs.  This
-       means that a given password will produce different keys depending on use.  This program only deals with keys because that
-       is what powerline devices recognize.  The passwords that generated the keys are irrelevant here.
-
-       Encryption keys are tedious to type and prone to error.  For convenience, symbolic names have  been  assigned  to  common
-       encryption keys and are recognized by options -D and -K.
-
-       key1   Key   for  encrypted  password  "HomePlugAV".   This  is  "689F074B8B0275A2710B0B5779AD1630"  for  option  -D  and
-              "50D3E4933F855B7040784DF815AA8DB7" for option -K.
-
-       key2   Key for encrypted password  "HomePlugAV0123".   This  is  "F084B4E8F6069FF1300C9BDB812367FF"  for  option  -D  and
-              "B59319D7E8157BA001B018669CCEE30D" for option -K.
-
-       none   Always "00000000000000000000000000000000".
-
-DEVICES
-       Powerline  devices  use Ethernet hardware, or Media Access Control (MAC), addresses.  Device addresses are 12 hexadecimal
-       digits (0123456789ABCDEFabcdef) in upper, lower or mixed case.  Individual octets may be separated by colons,  for  clar‐
-       ity,  but  not all octets need to be seperated.  For example, "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are
-       valid and equivalent.
-
-       These symbolic addresses are recognized by this program and may be used instead of the actual address value.
-
-       all    Equivalent to "broadcast", described next.
-
-       broadcast
-              The Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign will respond  to
-              this address.
-
-       local  The  Atheros  Local  Management  Address (LMA), 00:B0:52:00:00:01.  Local Atheros powerline devices recognize this
-              address but remote and foreign powerline devices do not.  A remote device is any poserline device at the  far  end
-              of the powerline.  A foreign device is a powerline device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information may not be available.  Qualcomm Atheros  reserves  the  right  to  modify  message
-       structure or content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-          # int6k -n old.nvm -p old.pib -N new.nvm -P new.pib -F 01:23:45:67:89:AB
-
-       Performs  5  operations on one device.  Uploads the firmware and PIB from the device and writes them to files old.nvm and
-       old.pib, respectively.  Reads files new.nvm and new.pib and downloads them as new firmware and PIB,  respectively.   Com‐
-       mits  the  downloaded  firmware  and PIB to NVRAM.  Operations are executed in the order just described regardless of the
-       order specified on the command line.  If you want reading and writing to occur in a different order then you must use two
-       or more commands to accomplish tasks in the order you want.
-
-          # int6k -N new.nvm 01:23:45:67:89:28
-          # int6k -P new.pib 01:23:45:67:89:28
-          # int6k -C 3 01:23:45:67:89:28
-
-       It  is  not  neccessary  to specify all operations on one command line.  The three command lines above do essentially the
-       same thing as the command line shown in the previou example.  Notice that this example uses -C 3, instead of  -F,  as  an
-       alternate  way  to write MAC and PIB to NVRAM.  Specifying -C 1, instead, would write the .nvm file only.  Specifying, -C
-       2, instead, would write the .pib file only.  The value 3 is the logical OR of 1 and 2.
-
-          # int6k -N new.nvm -P new.pib -FF local
-
-       Downloads file new.nvm and file new.pib and force flashes the  local  device.   Force  flashing  only  works  on  running
-       firmware that has been downloaded and stated by the Qualcomm Atheros Boot Loader.  See int6kf to download, start firmware
-       and perform a force flash in one operation.
-
-          # int6k -MK key1
-          # int6k -M
-
-       These two commands are equivalent.  They set the NMK on the local device to key1 as descripted in the KEYS section.   The
-       first  command  resets  the NMK on the local device with -M then specifies the NMK as key1.  The second command omits the
-       key specification since key1 is the program default NMK.  One could, of course, type the encryption key.
-
-SEE ALSO
-       plc(1),  amptool(1),  int6kf(1),  int6khost(1),  int6kid(1),  int6krate(1),  int6krule(1),  int6kstat(1),   int6kwait(1),
-       plctool(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                    int6k(1)
-
- - - diff --git a/docbook/int6k.c.html b/docbook/int6k.c.html deleted file mode 100644 index ad435778..00000000 --- a/docbook/int6k.c.html +++ /dev/null @@ -1,706 +0,0 @@ - - - - - - int6k.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   int6k.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ether/channel.h"
-#include "../key/HPAVKey.h"
-#include "../key/keys.h"
-#include "../ram/sdram.h"
-#include "../pib/pib.h"
-#include "../nvm/nvm.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Attributes1.c"
-#include "../plc/chipset.c"
-#include "../plc/Devices.c"
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/FactoryDefaults.c"
-#include "../plc/Identity1.c"
-#include "../plc/HostActionResponse.c"
-#include "../plc/NetInfo1.c"
-#include "../plc/NVRAMInfo.c"
-#include "../plc/PushButton.c"
-#include "../plc/SDRAMInfo.c"
-#include "../plc/SetNMK.c"
-#include "../plc/Request.c"
-#include "../plc/ReadFirmware1.c"
-#include "../plc/ReadMME.c"
-#include "../plc/ReadMFG.c"
-#include "../plc/ReadParameters1.c"
-#include "../plc/ResetDevice.c"
-#include "../plc/SendMME.c"
-#include "../plc/VersionInfo1.c"
-#include "../plc/WriteCFG.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WaitForRestart.c"
-#include "../plc/WatchdogReport.c"
-#include "../plc/StationRole.c"
-#include "../plc/ModuleRead.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/synonym.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ram/nvram.c"
-#include "../ram/sdramfile.c"
-#include "../ram/sdrampeek.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibfile1.c"
-#include "../pib/pibpeek1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define INT6K_WAIT 0
-#define INT6K_LOOP 1
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-static struct _term_ const modules [] =
-
-{
-	{
-		"nvm",
-		"1"
-	},
-	{
-		"pib",
-		"2"
-	},
-	{
-		"both",
-		"3"
-	}
-};
-
-static struct _term_ const buttons [] =
-
-{
-	{
-		"join",
-		"1"
-	},
-	{
-		"leave",
-		"2"
-	},
-	{
-		"status",
-		"3"
-	}
-};
-
-/*====================================================================*
- *
- *   void manager (struct plc * plc, signed count, signed pause);
- *
- *   perform operations in logical order despite any order specfied
- *   on the command line; for example read PIB before writing PIB;
- *
- *   operation order is controlled by the order of "if" statements
- *   shown here; the entire operation sequence can be repeated with
- *   an optional pause between each iteration;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void manager (struct plc * plc, signed count, signed pause)
-
-{
-	while (count--)
-	{
-		if (_anyset (plc->flags, PLC_VERSION))
-		{
-			VersionInfo1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_ATTRIBUTES))
-		{
-			Attributes1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_WATCHDOG_REPORT))
-		{
-			WatchdogReport (plc);
-		}
-		if (_anyset (plc->flags, PLC_NVRAM_INFO))
-		{
-			NVRAMInfo (plc);
-		}
-		if (_anyset (plc->flags, PLC_SDRAM_INFO))
-		{
-			SDRAMInfo (plc);
-		}
-		if (_anyset (plc->flags, PLC_READ_IDENTITY))
-		{
-			Identity1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK))
-		{
-			NetInfo1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_SDRAM_CONFIG))
-		{
-			WriteCFG (plc);
-		}
-		if (_anyset (plc->flags, PLC_WRITE_MAC))
-		{
-			WriteNVM (plc);
-		}
-		if (_anyset (plc->flags, PLC_READ_MAC))
-		{
-			ReadFirmware1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_WRITE_PIB))
-		{
-			WritePIB (plc);
-		}
-		if (_anyset (plc->flags, PLC_READ_PIB))
-		{
-			ReadParameters1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_HOST_ACTION))
-		{
-			HostActionResponse (plc);
-		}
-		if (_anyset (plc->flags, PLC_PUSH_BUTTON))
-		{
-			PushButton (plc);
-		}
-		if (_anyset (plc->flags, (PLC_SETLOCALKEY | PLC_SETREMOTEKEY)))
-		{
-			SetNMK (plc);
-		}
-		if (_anyset (plc->flags, PLC_FACTORY_DEFAULTS))
-		{
-			FactoryDefaults (plc);
-		}
-		if (_anyset (plc->flags, PLC_FLASH_DEVICE))
-		{
-			FlashNVM (plc);
-			WaitForRestart (plc);
-		}
-		if (_anyset (plc->flags, PLC_RESET_DEVICE))
-		{
-			ResetDevice (plc);
-		}
-		sleep (pause);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	extern struct _term_ const daks [];
-	extern struct _term_ const nmks [];
-	static char const * optv [] =
-	{
-		"aB:C:d:D:efFHi:IJ:K:l:mMn:N:p:P:QqrRS:st:Tvw:x",
-		"device [device] [...]",
-		"Qualcomm Atheros INT6x00 Powerline Device Manager",
-		"a\tread device attributes using VS_OP_ATTRIBUTES",
-		"B n\tperform pushbutton action (n) using MS_PB_ENC [1|2|3|'join'|'leave'|'status']",
-		"C n\tflash NVRAM with module (n) using VS_MOD_NVM [1|2|3|'nvm'|'pib'|'both']",
-		"d f\tdump and clear watchdog report to file (f) using VS_WD_RPT",
-		"D x\tset DAK to (x) for option -J [" DAK1 "]",
-		"e\tredirect stderr to stdout",
-		"f\tread NVRAM Configuration using VS_GET_NVM",
-		"F[F]\tflash [force] NVRAM with PIB and firmware using VS_MOD_NVM",
-		"H\tstop host action requests using VS_HOST_ACTION.IND",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"I\tread device identity using VS_RD_MOD",
-		"J x\tset NMK on remote device (x) via local device using VS_SET_KEY (see -K)",
-		"K x\tset NMK to (x) for options -J and -M [" NMK1 "]",
-		"l n\tloop (n) times [" LITERAL (INT6K_LOOP) "]",
-		"m\tread network membership information using VS_NW_INFO",
-		"M\tset NMK on local device using VS_SET_KEY (see -K)",
-		"n f\tread NVM from SDRAM to file (f) using VS_RD_MOD",
-		"N f\twrite NVM file (f) to SDRAM using VS_WR_MOD",
-		"p f\tread PIB from SDRAM to file (f) using VS_RD_MOD",
-		"P f\twrite PIB file (f) to SDRAM using VS_WR_MOD",
-		"q\tquiet mode",
-		"Q\tquick flash (return immediately)",
-		"r\tread hardware and firmware revision using VS_SW_VER",
-		"R\treset device using VS_RS_DEV",
-		"s\tread SDRAM Configuration using VS_RD_CBLOCK",
-		"S f\twrite an SDRAM Configuration file (f) using VS_SET_SDRAM",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"T\trestore factory defaults using VS_FAC_DEFAULTS",
-		"v\tverbose mode",
-		"w n\tpause (n) seconds [" LITERAL (INT6K_WAIT) "]",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed loop = INT6K_LOOP;
-	signed wait = INT6K_WAIT;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'a':
-			_setbits (plc.flags, PLC_ATTRIBUTES);
-			break;
-		case 'B':
-			_setbits (plc.flags, PLC_PUSH_BUTTON);
-			plc.pushbutton = (unsigned)(uintspec (synonym (optarg, buttons, SIZEOF (buttons)), 0, UCHAR_MAX));
-			break;
-		case 'C':
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			plc.module = (unsigned)(uintspec (synonym (optarg, modules, SIZEOF (modules)), 0, UCHAR_MAX));
-			break;
-		case 'd':
-			_setbits (plc.flags, PLC_WATCHDOG_REPORT);
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.rpt.file = open (plc.rpt.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.rpt.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			plc.readaction = 3;
-			break;
-		case 'D':
-			if (!hexencode (plc.DAK, sizeof (plc.DAK), synonym (optarg, daks, SIZEOF (daks))))
-			{
-				error (1, errno, PLC_BAD_DAK, optarg);
-			}
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'f':
-			_setbits (plc.flags, PLC_NVRAM_INFO);
-			break;
-		case 'F':
-			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'H':
-			_setbits (plc.flags, PLC_HOST_ACTION);
-			break;
-		case 'I':
-			_setbits (plc.flags, PLC_READ_IDENTITY);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'J':
-			if (!hexencode (plc.RDA, sizeof (plc.RDA), (char const *)(optarg)))
-			{
-				error (1, errno, PLC_BAD_MAC, optarg);
-			}
-			_setbits (plc.flags, PLC_SETREMOTEKEY);
-			break;
-		case 'K':
-			if (!hexencode (plc.NMK, sizeof (plc.NMK), synonym (optarg, nmks, SIZEOF (nmks))))
-			{
-				error (1, errno, PLC_BAD_NMK, optarg);
-			}
-			break;
-		case 'M':
-			_setbits (plc.flags, PLC_SETLOCALKEY);
-			break;
-		case 'l':
-			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'm':
-			_setbits (plc.flags, PLC_NETWORK);
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'n':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.nvm.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			_setbits (plc.flags, PLC_READ_MAC);
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.PIB.name);
-			}
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'p':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.pib.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			_setbits (plc.flags, PLC_READ_PIB);
-			break;
-		case 'Q':
-			_setbits (plc.flags, PLC_QUICK_FLASH);
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'R':
-			_setbits (plc.flags, PLC_RESET_DEVICE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_VERSION);
-			break;
-		case 'S':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.CFG.file = open (plc.CFG.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.CFG.name);
-			}
-			if (sdramfile (plc.CFG.file, optarg, plc.flags))
-			{
-				error (1, ECANCELED, "SDRAM config file %s is corrupt", optarg);
-			}
-			_setbits (plc.flags, PLC_SDRAM_CONFIG);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_SDRAM_INFO);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'T':
-			_setbits (plc.flags, PLC_FACTORY_DEFAULTS);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'V':
-			_setbits (plc.flags, PLC_SNIFFER);
-			plc.action = (uint8_t)(uintspec (optarg, 0, UCHAR_MAX));
-			break;
-		case 'w':
-			wait = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc != 1)
-	{
-		if (plc.nvm.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-		if (plc.pib.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-		if (plc.rpt.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		manager (&plc, loop, wait);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		manager (&plc, loop, wait);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6kbaud.1.html b/docbook/int6kbaud.1.html deleted file mode 100644 index 2916c384..00000000 --- a/docbook/int6kbaud.1.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - int6kbaud.1 - - - - - - - - - -
-int6kbaud(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6kbaud(1)
-
-NAME
-       int6kbaud - Qualcomm Atheros Serial Line Device Configuration
-
-SYNOPSIS
-       int6kbaud [options] [...]
-
-DESCRIPTION
-       Set serial line parameters on a UART-enabled Atheros powerline device using the ATBR serial line command.
-
-       Serial  line  commands  are  7-bit  ASCII character strings sent to the local powerline device over the host serial port.
-       They can be sent using any terminal emulator but this program will, in many cases, reduce typing and simplify  scripting.
-       It is especially useful for downloading device parameters and uploading device parameters or firmware because those oper‐
-       ations involve large volumes of data.  Also, this program permits decimal integer  arguments  in  many  cases  where  the
-       serial  line  commands require hexadecimal integer values.  See the COMMANDS section below for a list of supported serial
-       line commands;
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
-       instructions.
-
-COMMENTS
-       This program does not configure or reconfigure host serial port settings since most systems provide a utility to do that.
-       Be sure to configure them before using this program since other programs may change them before or  after  use.   Atheros
-       factory  default  settings for UART-enabled powerline devices are 1115200 baud, 8 data bits, 1 stop bit, no parity and no
-       flow control.
-
-       On Linux, use the stty utility to inspect and set serial port parameters.  The following  Linux  command  will  configure
-       serial  device  /dev/ttyS0 speed to 115200 baud with 8 data bits, 1 stop bit, no parity bit and no flow control.  Consult
-       the stty man page for an explanation of these and other options.
-
-          #stty -f /dev/ttyS0 115200 cs8 cstopb -cparenb -ixon
-
-       On Windows, use the the Device Manager dialog to set serial Port properties.  To open this  dialog,  select  Start  Menu,
-       Control Panel, System, Hardware, Device Manager, Ports, Advanced.
-
-OPTIONS
-       -B baudrate
-              The new baud rate.  Any integer value may be entered here but only certain values may be accepted by the powerline
-              device.  Although the device may support some value, the local host may not support it.  Supported values are 300,
-              600, 1200, 2400, 4800, 9600, 38400, 57600, 115200, 230400, 460800 and 921600.  The default is 115200.
-
-       -D databits
-              The number of bits per data byte.  Accepted values are 7 and 8.  The default is 8.
-
-       -F flowctrl
-              The hardware flowcontrol state.  Accepted values are 0=off and 1=on where numeric values or keywords "off" or "on"
-              may be used.  Keyword "none" is synonymous with "off" for this option.  The default is none.
-
-       -m mode
-              Accepted values are 1=transparent and 2=command where numeric values or keywords "transparent" or "command" may be
-              used.
-
-       -P parity
-              The  number  of parity bits and parity mode.  Accepted values are 0=none, 1=odd and 2=even where numeric values of
-              keywords "none", "odd" or "even" may be used.  The default is none.
-
-       -q     Suppress progress and error information on stderr.
-
-       -s tty Communicate with the local powerline device over the named serial  interface  on  the  local  host.   The  program
-              default is "/dev/ttyUSB0" for Linux and "com1:" for Windows.  The program default may be replace by defining envi‐
-              ronment variable PLCUART.  This command line option will over-ride those defaults.
-
-       -S stopbits
-              The number of stop bits.  Accepted values are 1 or 2.  The default is 1.
-
-       -u     Force default host port settings to match the default setting for UART-enabled  Atheros  powerline  devices.   The
-              setting  are  115200 baud, 8 data bits, no parity bits and 1 stop bit.  These settings will remain active when the
-              program terminates and will not change unless changed by some other means, perhaps by another  application.   This
-              option  is  an easy means of establishg an initial serial connection with a powerline device, unless it's settings
-              have been changed.
-
-       -v     Display serial line commands and responses on stdout.
-
-       -w     Place the local powerline device in Command Mode using the +++ serial line command. The device will remain in com‐
-              mand mode until it is reset or forced into Transparaent Mode or High Speed Command Mode.
-
-       -?,--help
-              Print program help summary on stdout. This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print  program version information on stdout. This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       None.
-
-COMMANDS
-       This  section  lists  serial  line  commands  recognized by local powerline devices when in Command Mode. Commands can be
-       issued interactively using a terminal emulator, like minicom on Linux or HyperTerminal on Windows or stored as  text  and
-       copied to the serial port using system utilities, like cat on Linux or type on Windows. This program merely converts com‐
-       mand line options and arguments into one or more of the serial line commands shown below.
-
-       +++    Exit Transparent Mode and enter Command Mode. See option -w above.
-
-       AT     Test for Command Mode by doing nothing, successfully. See option -t above.
-
-       ATBRmode,baudrate,databits,parity,stopbits,flowctrl
-              Set serial line parameters on the local powerline device. Beware that this will break the existing serial  connec‐
-              tion when the new parameters differ from those of the local host.
-
-       ATBSZ? Get Transparent Mode buffer size. See option -z above.
-
-       ATBSZsize
-              Set Transparent Mode buffer size. See option -Z above.
-
-       ATDST? Get Transparent Mode destination device address. See option -d above.
-
-       ATDSTaddress
-              Set Transparent Mode destination device address. See option -D above.
-
-       ATFD   Reset local device to factory defaults. See option -T above.
-
-       ATHSC  Exit  Command Mode and enter High Speed Command Mode. Once the OK response is received, the local host should send
-              commands to the device at successively higher speeds until a valid response is received.
-
-       ATNI?  Read nework information and store the information internally. Return the number of associated stations and  infor‐
-              mation  about  the first associated station. The information includes the peer station device address, TX rate and
-              RX rate.
-
-       ATNIstation
-              Extract and display previously stored network information for a specific peer station. The information returned is
-              that previosly stored using a ATNI serial line command query.
-
-       ATO    Exit  Command  Mode and enter Transparent Mode. Successful switch requires a valid destination MAC address, buffer
-              size and aggregation timeout value. Use serial line commands ATDST and ATBSZ to get and/or set the first two  val‐
-              ues. Use serial line command ATTO to set the timeout value.
-
-       ATPStime
-              Place  the  device  in  Power Save Mode for a specified time in seconds. Accepted values are 1 to 384 seconds. The
-              default time is A seconds.
-
-       ATRPlength,offset
-              Read and display a parameter block segment where length is the number of bytes read and  offset  is  the  relative
-              position,  in bytes, from the start of the parameter block. Valid length values are 0 through 400 hexadecimal. See
-              option -p above to read and save an entire parameter block.
-
-       ATRPM  Get PIB version and device MAC address.
-
-       ATRV   Get hardware and firmware revision. See option -r above.
-
-       ATSK?  Get device Network Membership Key. See option -m above.
-
-       ATSKkey
-              Set device Network Membership Key. See option -M above.
-
-       ATTO?  Get the Transparent Mode aggregation timeout in milliseconds.
-
-       ATTOtimeout
-              Set the Transparent Mode aggregation timeout in milliseconds. See option -W above.
-
-       ATWNVmodule
-              Update NVM with PIB and/or Firmware module. See option -C above.
-
-       ATWPFmodule,length,offset,checksum,data
-              Write a parameter block or firmware segment to the local powerline device where module is the  module  identifier,
-              length  is the number of bytes to write, offset is the relative position from the start of the module, checksum is
-              the 1's complement of the data and data is the data to be written.  Valid module identifiers are 1=FW  and  2=PIB.
-              Valid  length  values are 0 up to 400 hexadecimal.  See options -N and -P above to write an entire parameter block
-              or firmware images.
-
-       ATZ    Reset device.  See option -R above.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros serial line commands are proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is  not
-       available.  Qualcomm Atheros reserves the right to modify command line syntax or command functionality in future firmware
-       releases without any obligation to notify or compensate product or program users.
-
-EXAMPLES
-       The following example sets the baud speed to 115200 baud with 8 data bits, 1 stop bits, no flow control  and  no  parity.
-       The outgoing serial line command and incoming response are displayed on stderr because option -f is present.
-
-          #int6kbaud -B 115200 -D 8 -F 0 -P 0 -S 1 -v
-          ATBR00,000000000001C200,08,00,01,00
-          OK
-
-       Observe that decimal command line arguments are converted to hexadecimal on output.  Although this program outputs fixed-
-       length fields, including leaing zeros, device firmware ignores them.  Leading zeros may be omitted when  entering  serial
-       line commands manually.
-
-       The  next example set the speed to 38400.  Observe that program default values appear in the outgoing serial line command
-       when the corresponding command line options are omitted.
-
-          #int6kbaud -B 38400 -v
-          ATBR00,0000000000009600,08,00,01,00
-          OK
-
-       The next command does the same thing as the first example except that keywords replace numeric values  for  some  of  the
-       options.  Since option -v is omitted the outgoing command and incoming response are not displayed.
-          #int6kbaud -B 115200 -D 8 -F off -P none -S 1
-
-SEE ALSO
-       amp(1), int6kuart(1), ttysig(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6kbaud(1)
-
- - - diff --git a/docbook/int6kbaud.c.html b/docbook/int6kbaud.c.html deleted file mode 100644 index 18b42a8a..00000000 --- a/docbook/int6kbaud.c.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - int6kbaud.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kbaud.c - Atheros Serial Line Device Manager;
- *
- *
- *   Contributor(s):
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-
-#if defined (WIN32)
-#elif defined (__linux__)
-#	include <termios.h>
-#elif defined (__APPLE__)
-#	include <termios.h>
-#elif defined (__OpenBSD__)
-#	include <termios.h>
-#else
-#error "Unknown Environment"
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/number.h"
-#include "../tools/memory.h"
-#include "../tools/endian.h"
-#include "../tools/symbol.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/types.h"
-#include "../serial/serial.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/basespec.c"
-#include "../tools/synonym.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#include "../tools/checksum32.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexstring.c"
-#include "../tools/hexdecode.c"
-#include "../tools/synonym.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../serial/openport.c"
-#include "../serial/closeport.c"
-#include "../serial/serial.c"
-#endif
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-typedef struct uart
-
-{
-	struct _file_ port;
-	char const * string;
-	byte mode;
-	uint64_t baudrate;
-	byte databits;
-	byte parity;
-	byte stopbits;
-	byte flowctrl;
-	unsigned flags;
-}
-
-uart;
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-static const struct _term_ modes [] =
-
-{
-	{
-		"command",
-		"2"
-	},
-	{
-		"transparent",
-		"1"
-	}
-};
-
-static const struct _term_ paritybits [] =
-
-{
-	{
-		"even",
-		"2"
-	},
-	{
-		"none",
-		"0"
-	},
-	{
-		"odd",
-		"1"
-	}
-};
-
-static const struct _term_ flowctrls [] =
-
-{
-	{
-		"none",
-		"0"
-	},
-	{
-		"off",
-		"0"
-	},
-	{
-		"on",
-		"1"
-	}
-};
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define MODES 		(sizeof (modes) / sizeof (struct _term_))
-#define PARITYBITS 	(sizeof (paritybits) / sizeof (struct _term_))
-#define FLOWCTRLS 	(sizeof (flowctrls) / sizeof (struct _term_))
-
-/*====================================================================*
- *
- *   void at_command (struct uart * uart);
- *
- *--------------------------------------------------------------------*/
-
-static void at_command (struct uart * uart)
-
-{
-	clearcommand ();
-	while (*uart->string)
-	{
-		insert (*uart->string++);
-	}
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	return;
-}
-
-/*====================================================================*
- *
- *   void at_wake (struct uart * uart);
- *
- *   send wake command "+++" to enter command mode;
- *
- *--------------------------------------------------------------------*/
-
-static void at_wake (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('+');
-	insert ('+');
-	insert ('+');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void atbr (struct uart * uart);
- *
- *   set serial line parameters;
- *
- *--------------------------------------------------------------------*/
-
-static void atbr (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('B');
-	insert ('R');
-	decode (&uart->mode, sizeof (uart->mode));
-	insert (',');
-	uart->baudrate = HTOBE64 (uart->baudrate);
-	decode (&uart->baudrate, sizeof (uart->baudrate));
-	uart->baudrate = BE64TOH (uart->baudrate);
-	insert (',');
-	decode (&uart->databits, sizeof (uart->databits));
-	insert (',');
-	decode (&uart->parity, sizeof (uart->parity));
-	insert (',');
-	decode (&uart->stopbits, sizeof (uart->stopbits));
-	insert (',');
-	decode (&uart->flowctrl, sizeof (uart->flowctrl));
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void manager (struct uart * uart);
- *
- *   examine flagword in struct uart and perform requested operations
- *   in the order that bits are tested; the order that bits are tested
- *   may be changed as needed;
- *
- *--------------------------------------------------------------------*/
-
-static void manager (struct uart * uart)
-
-{
-	if (_anyset (uart->flags, UART_WAKE))
-	{
-		at_wake (uart);
-	}
-	if (_anyset (uart->flags, UART_COMMAND))
-	{
-		at_command (uart);
-	}
-	if (_anyset (uart->flags, UART_ATBR))
-	{
-		atbr (uart);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"B:c:D:F:m:p:P:q:S:uvw",
-		"",
-		"Atheros Serial Line Device Settings",
-		"B n\tbaud rate is (n) [" LITERAL (UART_BAUDRATE) "]",
-		"c s\tsend custom serial line command (s)",
-		"D n\tuse (n) data bits [" LITERAL (UART_DATABITS) "]",
-		"F n\tflow control is (n) ["LITERAL (UART_FLOWCTRL) "]",
-		"m n\tcommand mode is (n)",
-		"p f\tserial port is (f) [" DEVICE "]",
-		"P n\tuse (n) parity bits [" LITERAL (UART_PARITY) "]",
-		"q\tquiet mode",
-		"S n\tuse (n) stop bits [" LITERAL (UART_STOPBITS) "]",
-		"u\tforce default host port settings [115200 8N1]",
-		"v\tverbose mode",
-		"w\twake device [+++]",
-		(char const *) (0)
-	};
-	struct uart uart =
-	{
-		{
-			0,
-			DEVICE
-		},
-		(char *)(0),
-		UART_MODE,
-		UART_BAUDRATE,
-		UART_DATABITS,
-		UART_PARITY,
-		UART_STOPBITS,
-		UART_FLOWCTRL,
-		0
-	};
-	signed c;
-	if (getenv (UART_PORT))
-	{
-		uart.port.name = strdup (getenv (UART_PORT));
-	}
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'B':
-			_setbits (uart.flags, UART_ATBR);
-			uart.baudrate = (uint64_t)(uintspec (optarg, 1, ULONG_MAX));
-			break;
-		case 'c':
-			_setbits (uart.flags, UART_COMMAND);
-			uart.string = optarg;
-			break;
-		case 'D':
-			_setbits (uart.flags, UART_ATBR);
-			uart.databits = (byte)(uintspec (optarg, 7, 8));
-			break;
-		case 'F':
-			_setbits (uart.flags, UART_ATBR);
-			uart.flowctrl = (byte)(uintspec (synonym (optarg, flowctrls, FLOWCTRLS), 0, UCHAR_MAX));
-			break;
-		case 'm':
-			_setbits (uart.flags, UART_ATBR);
-			uart.mode = (byte)(uintspec (synonym (optarg, modes, MODES), 0, UCHAR_MAX));
-		case 'P':
-			_setbits (uart.flags, UART_ATBR);
-			uart.parity = (byte)(uintspec (synonym (optarg, paritybits, PARITYBITS), 0, UCHAR_MAX));
-			break;
-		case 'q':
-			_setbits (uart.flags, UART_SILENCE);
-			break;
-		case 'p':
-			uart.port.name = optarg;
-			break;
-		case 'S':
-			_setbits (uart.flags, UART_ATBR);
-			uart.stopbits = (unsigned)(uintspec (optarg, 1, 2));
-			break;
-		case 'u':
-			_setbits (uart.flags, UART_DEFAULT);
-			break;
-		case 'v':
-			_setbits (uart.flags, UART_VERBOSE);
-			break;
-		case 'w':
-			_setbits (uart.flags, UART_WAKE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ENOTSUP, ERROR_TOOMANY);
-	}
-	openport (&uart.port, uart.flags);
-	manager (&uart);
-	closeport (&uart.port);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6kboot.1.html b/docbook/int6kboot.1.html deleted file mode 100644 index 00cc5f91..00000000 --- a/docbook/int6kboot.1.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - int6kboot.1 - - - - - - - - - -
-int6kboot(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6kboot(1)
-
-NAME
-       int6kboot - Qualcomm Atheros Powerline Device Boot Utility I
-
-SYNOPSIS
-       int6kboot [options] -N file -P file [device] [device] [...]
-
-DESCRIPTION
-       Download  and  start runtime firmware on any local Atheros powerline device that is in bootloader mode.  A device remains
-       in bootloader mode when it cannot load firmware from flash memory for some reason.  This can happen because there  is  no
-       flash  memory  or  because the flash memory is blank or corrupted.  This program can start a device or start then flash a
-       device.
-
-       The bootloader only recognizes a subset of Atheros message types.   This  program  uses  that  subset  to  write  runtime
-       firmware  and  parameters into SDRAM then start firmware execution at a known address.  Optionally, this program can then
-       proceed to download the same firmware and parameters, again, and instruct the runtime firmware to  write  them  to  flash
-       memory.
-
-       Starting  a device is a three phase operation that can only be performed when the bootloader is running.  The first phase
-       writes an SDRAM configuration program into TCM and executes it.  The second phase writes runtime firmware and  parameters
-       as  images  into SDRAM.  The third phase starts firmware execution.  Once the runtime firmware starts, the device will be
-       operational.
-
-       Flashing a device is a two phase operation that can only be performed when the firmware  is  running.   The  first  phase
-       downloads  runtime  firmare  and  parameters into scratch buffers under firmware control.  The second phase instructs the
-       firmware to write the scratch buffers to flash memory and restart the device.  After flashing, the device will  be  self-
-       sustaining.
-
-       Since  the  device address is 00:B0:52:00:00:01 on boot, the host must send all messages to that address.  This can cause
-       problems if multiple devices are connected to the host and in Bootloader mode.  The devices will have the  same  firmware
-       and MAC address because their PIBs will be identical.  One should avoid this situation.
-
-       Is  probably alright to have other device connected to the host that are running firmware because they will still see but
-       not recognize the messages used in this operation.  If only one device is connected to the host, then is  save  to  flash
-       the  device using address 00:B0:52:00:00:01.  Otherwise, the host should address messages to the actual device address so
-       that other devices do not attempt to write to their own flash memory at the same time.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -F[F]  Write previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.  Adding a second F here or another -F  anywhere
-              on  the  command  line  will force-flash a blank or corrupted NVRAM.  Firmware loaded from NVRAM will treat force-
-              flash as an error.  This option can be used to create factory settings but cannot be used to change them once cre‐
-              ated.  Subsequent use creates and updates operational settings that can be erased using a factory reset.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -N filename
-              Read the named NVM file and write it to the device.  This option and argument are required.  Any  file  having  an
-              invalid  NVM  file format will be rejected.  No assumptions are made based on filename and no filename conventions
-              are enforced.
-
-       -P filename
-              Read the named PIB file and write it to the device.  This option and argument are required.  Any  file  having  an
-              invalid  PIB  file format will be rejected.  No assumptions are made based on filename and no filename conventions
-              are enforced.
-
-       -q     Suppresses status messages on stderr.
-
-       -t milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is shown in brackets on the program menu.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  Ethernet  hardware  address  of some powerline device.  More than one address may be specified on the command
-              line.  If more than one address is specified then operations are performed on each device in  turn.   The  default
-              address is local.  as explained in the DEVICES section.
-
-DEVICES
-       Powerline  device  addresses are 12 hexadecimal digits in upper, lower or mixed case.  Individual octets may be separated
-       by  colons,  for  clarity,  but  colons  are  not  required.   For  example,  "00b052000001",   "00:b0:52:00:00:01"   and
-       "00b052:000001" are valid and equivalent.
-
-       A  local  device is any Atheros Powerline Device connected directly to a host Ethernet interface.  A remote device is any
-       Atheros Powerline Device at the far end of a powerline connection.  A foreign device is any powerline device not manufac‐
-       tured by Atheros.
-
-       Common  device  addresses  have symbolic names that can be used in place of the actual address value.  The following sym‐
-       bolic addresses are recognized by this program and most other toolkit programs.
-
-       all    Equivalent to "broadcast", described next.
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              will respond to this address.
-
-       local  A  synonym  for the Qualcomm Atheros Local Management Address (LMA), 00:B0:52:00:00:01.  All local Atheros devices
-              will respond to this address but remote and foreign devices will not.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical  information.   See  the  Qualcomm
-       Atheros Powerline Toolkit Online Documetation for practical information and examples.
-
-EXAMPLES
-       The  -N and -P options are always required.  Their order is not important.  Tne MAC address is not needed because devices
-       default to address 00:B0:52:00:00:01 (the program default address) in bootloader mode.  Once  this  operation  completes,
-       firmware is running in SDRAM but the NVRAM, if present, has not been programmed.  This operation is common for flash-less
-       devices.  If we reset the device at this point then the device will return to bootloader mode.
-
-          int6kboot -N test.nvm -P test.pib
-          # eth0 00:B0:52:00:00:01 Write SDRAM Configuration
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Start Firmware
-          # eth0 00:B0:52:00:00:01 Started.
-
-       The next example does the same thing but performs the extra steps needed  to  program  NVRAM.   It  first  downloads  the
-       firmware  image  from file test.nvm and the parameter block image from file test.pib using VS_WR_MEM then starts firmware
-       execution using VS_ST_MAC.  Once runtime firmware has started, it downloads the same firmware image and  parameter  block
-       image (again) using VS_WR_MOD and commits them to NVRAM using VS_MOD_NVM.
-
-          int6kboot -N test.nvm -P test.pib -F
-          # eth0 00:B0:52:00:00:01 Write SDRAM Configuration
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write to device memory
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Start Firmware
-          # eth0 00:B0:52:00:00:01 Started.
-          # eth0 00:B0:52:00:00:01 Write MAC as module
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Write PIB as module
-          # eth0 00:B0:52:00:00:01 Written.
-          # eth0 00:B0:52:00:00:01 Flash Device
-          # eth0 00:B0:52:00:00:01 Flashed.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information may not be available.  Qualcomm Atheros  reserves  the  right  to  modify  message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-SEE ALSO
-       plc(1), ampboot(1), chknvm(1), chkpib(1), int6k(1), modpib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6kboot(1)
-
- - - diff --git a/docbook/int6kboot.c.html b/docbook/int6kboot.c.html deleted file mode 100644 index 4d3b72a8..00000000 --- a/docbook/int6kboot.c.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - int6kboot.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kboot.c - Qualcomm Atheros INT6x00 Powerline Device Bootstrapper
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <sys/stat.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/WriteMEM.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WaitForRestart.c"
-#include "../plc/InitDevice1.c"
-#include "../plc/BootDevice1.c"
-#include "../plc/BootFirmware1.c"
-#include "../plc/BootParameters1.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/WriteExecuteFirmware1.c"
-#include "../plc/WriteExecutePIB.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/FlashDevice1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/error.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-
-// #include "../ram/sdramfile.c"// #include "../ram/sdrampeek.c"
-
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibfile1.c"
-#include "../pib/pibpeek1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary when asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:FN:p:P:qt:vx",
-		"-N file -P file [device] [device] [...]",
-		"Qualcomm Atheros INT6x00 Powerline Device Bootstrapper",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"F[F]\tflash [force] NVRAM after firmware start using VS_MOD_NVM",
-		"N f\twrite NVM file to device using VS_WR_MEM",
-		"P f\twrite PIB file to device using VS_WR_MEM",
-		"q\tquiet mode",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	char firmware [PLC_VERSION_STRING];
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'F':
-			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.PIB.name);
-			}
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ENOTSUP, ERROR_TOOMANY);
-	}
-	if (plc.PIB.file == -1)
-	{
-		error (1, ECANCELED, "No PIB file specified");
-	}
-	if (plc.NVM.file == -1)
-	{
-		error (1, ECANCELED, "No NVM file specified");
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (WaitForStart (&plc, firmware, sizeof (firmware)))
-	{
-		Failure (&plc, PLC_NODETECT);
-		exit (1);
-	}
-	if (strcmp (firmware, "BootLoader"))
-	{
-		Failure (&plc, "Bootloader must be running");
-		exit (1);
-	}
-	if (plc.hardwareID < CHIPSET_INT6300)
-	{
-		Failure (&plc, "Device must be %s or later. Try program int6kf instead.", chipsetname (CHIPSET_INT6300));
-		exit (1);
-	}
-	if (plc.hardwareID >= CHIPSET_AR7400)
-	{
-		Failure (&plc, "Program does not support %s or later; try program ampboot instead.", chipsetname (CHIPSET_AR7400));
-		exit (1);
-	}
-	if (!InitDevice1 (&plc))
-	{
-		if (!BootDevice1 (&plc))
-		{
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				FlashDevice1 (&plc);
-			}
-		}
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6kdetect.1.html b/docbook/int6kdetect.1.html deleted file mode 100644 index e0a764f1..00000000 --- a/docbook/int6kdetect.1.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - int6kdetect.1 - - - - - - - - - -
-int6kdetect(1)                               Qualcomm Atheros Open Powerline Toolkit                              int6kdetect(1)
-
-NAME
-       int6kdetect - Qualcomm Atheros UART Device Detector
-
-SYNOPSIS
-       int6kdetect [options] [...]
-
-DESCRIPTION
-       None.
-
-COMMENTS
-       None.
-
-OPTIONS
-       -c     Assume device is in command mode.  This reduces the amount of time needed to detect serial device settings.
-
-       -l tty Communicate  with  the  local  powerline  device  over  the named serial interface on the local host.  The program
-              default is "/dev/ttyUSB0" for Linux and "com1:" for Windows.  The program default is replaced if environment vari‐
-              able PLCUART is defined.  This option over-rides those default settings.
-
-       -q     Suppress progress and error information on stderr.
-
-       -v     Display actual serial line commands and responses on stdout.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       None.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Qualcomm  Atheros  serial line commands are proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public informa‐
-       tion is not available.  Qualcomm Atheros reserves the right to modify command line syntax  or  command  functionality  in
-       future firmware releases without any obligation to notify or compensate product or program users.
-
-EXAMPLES
-       None.
-
-SEE ALSO
-       amp(1), int6kbaud(1), int6kuart(1), ttysig(1)
-
-CREDITS
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                              int6kdetect(1)
-
- - - diff --git a/docbook/int6kdetect.c.html b/docbook/int6kdetect.c.html deleted file mode 100644 index 15da7b82..00000000 --- a/docbook/int6kdetect.c.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - - - int6kdetect.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kdetect.c
- *
- *
- *   Contributor(s):
- *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifdef WIN32
-#include <windows.h>
-#else
-#include <termios.h>
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/error.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../tools/putoptv.h"
-#include "../tools/getoptv.h"
-#include "../serial/serial.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../serial/baudrate.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define SERIAL_PORT "/dev/ttyS0"
-
-#define INT6KDETECT_QUIET    (1 << 0)
-#define INT6KDETECT_CMD_MODE (1 << 1)
-
-struct serial
-
-{
-
-#ifdef WIN32
-
-	HANDLE h;
-
-#else
-
-	int fd;
-
-#endif
-
-};
-
-#define UART_NOPARITY   0
-#define UART_EVENPARITY 1
-#define UART_ODDPARITY  2
-
-struct serial_mode
-
-{
-	int baud_rate;
-	int parity;
-	int data_bits;
-	int stop_bits;
-};
-
-ssize_t read_serial (struct serial *s, void *buf, size_t nbytes)
-
-{
-
-#ifdef WIN32
-
-	DWORD read;
-	BOOL r;
-	r = ReadFile (s->h, buf, (DWORD) nbytes, &read, NULL);
-	if (r) return read;
-	else return -1;
-
-#else
-
-	return (read (s->fd, buf, nbytes));
-
-#endif
-
-}
-
-ssize_t write_serial (struct serial *s, void *buf, size_t nbytes)
-
-{
-
-#ifdef WIN32
-
-	DWORD written;
-	BOOL r;
-	r = WriteFile (s->h, buf, (DWORD) nbytes, &written, NULL);
-	if (r) return written;
-	else return -1;
-
-#else
-
-	return (write (s->fd, buf, nbytes));
-
-#endif
-
-}
-
-int open_serial (char const *file, struct serial *s)
-
-{
-
-#ifdef WIN32
-
-	s->h = CreateFile (file, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-	if (s->h == INVALID_HANDLE_VALUE)
-	{
-		return (-1);
-	}
-
-#else
-
-	if ((s->fd = open (file, O_RDWR)) == -1)
-	{
-		return (-1);
-	}
-
-#endif
-
-	return (0);
-}
-
-int close_serial (struct serial *s)
-
-{
-
-#ifdef WIN32
-
-	if (CloseHandle (s->h)) return 0;
-	else return -1;
-
-#else
-
-	return (close (s->fd));
-
-#endif
-
-}
-
-int set_serial (struct serial *s, struct serial_mode *serial_mode)
-
-{
-
-#ifdef WIN32
-
-	COMMTIMEOUTS timeouts;
-	DCB dcbSerial;
-	memset (&dcbSerial, 0, sizeof (dcbSerial));
-	dcbSerial.DCBlength = sizeof (dcbSerial);
-	if (!GetCommState (s->h, &dcbSerial))
-	{
-		return (-1);
-	}
-	dcbSerial.BaudRate = serial_mode->baud_rate;
-	dcbSerial.ByteSize = serial_mode->data_bits;
-	switch (serial_mode->stop_bits)
-	{
-	case 1:
-		dcbSerial.StopBits = ONESTOPBIT;
-		break;
-	case 2:
-		dcbSerial.StopBits = TWOSTOPBITS;
-		break;
-	default:
-		error (1, 0, "invalid stop bit setting");
-	}
-	switch (serial_mode->parity)
-	{
-	case UART_ODDPARITY:
-		dcbSerial.Parity = ODDPARITY;
-		dcbSerial.fParity = TRUE;
-		break;
-	case UART_EVENPARITY:
-		dcbSerial.Parity = EVENPARITY;
-		dcbSerial.fParity = TRUE;
-		break;
-	case UART_NOPARITY:
-		dcbSerial.Parity = NOPARITY;
-		dcbSerial.fParity = FALSE;
-		break;
-	default:
-		error (1, 0, "invalid parity serial_mode");
-	}
-	if (!SetCommState (s->h, &dcbSerial))
-	{
-		error (0, 0, "could not set serial port settings");
-		return (-1);
-	}
-	timeouts.ReadIntervalTimeout = 0;
-	timeouts.ReadTotalTimeoutConstant = 10;
-	timeouts.ReadTotalTimeoutMultiplier = 0;
-	timeouts.WriteTotalTimeoutConstant = 10;
-	timeouts.WriteTotalTimeoutMultiplier = 10;
-	if (!SetCommTimeouts (s->h, &timeouts))
-	{
-		return (-1);
-	}
-
-#else
-
-	struct termios termios;
-	speed_t speed;
-	tcgetattr (s->fd, &termios);
-	cfmakeraw (&termios);
-	termios.c_cflag &= ~CSIZE;
-	switch (serial_mode->data_bits)
-	{
-	case 8:
-		termios.c_cflag |= CS8;
-		break;
-	case 7:
-		termios.c_cflag |= CS7;
-		break;
-	case 6:
-		termios.c_cflag |= CS6;
-		break;
-	case 5:
-		termios.c_cflag |= CS5;
-		break;
-	default:
-		error (1, 0, "invalid serial byte size");
-	}
-	switch (serial_mode->stop_bits)
-	{
-	case 2:
-		termios.c_cflag |= CSTOPB;
-		break;
-	case 1:
-		termios.c_cflag &= ~CSTOPB;
-		break;
-	default:
-		error (1, 0, "invalid number of stop bits");
-	}
-	switch (serial_mode->parity)
-	{
-	case UART_ODDPARITY:
-		termios.c_cflag |= PARENB;
-		termios.c_cflag |= PARODD;
-		break;
-	case UART_EVENPARITY:
-		termios.c_cflag |= PARENB;
-		termios.c_cflag &= ~PARODD;
-		break;
-	case UART_NOPARITY:
-		termios.c_cflag &= ~PARENB;
-		break;
-	default:
-		error (1, 0, "invalid parity serial_mode");
-	}
-	if (baudrate (serial_mode->baud_rate, &speed) == -1)
-	{
-		error (0, 0, "warning: unsupported baud rate: %d", serial_mode->baud_rate);
-		return (-1);
-	}
-	if (cfsetspeed (&termios, speed) == -1) error (1, 0, "could not set serial baud rate");
-	termios.c_cc [VTIME] = 1;
-	termios.c_cc [VMIN] = 0;
-	if (tcsetattr (s->fd, TCSANOW, &termios) == -1) error (1, 0, "could not set serial attributes");
-
-#endif
-
-	return (0);
-}
-
-int at_cmd (struct serial *s)
-
-{
-	char buf [32];
-	ssize_t r;
-	if (write_serial (s, "AT\r", 3) == -1) error (1, 0, "could not write");
-	memset (buf, 0, sizeof (buf));
-	r = read_serial (s, buf, sizeof (buf) - 1);
-	if (r < 0) return -1;
-	else if (r == 0) return -1;
-	if (!strcmp (buf, "OK\r")) return 0;
-	return (-1);
-}
-
-void wakeup (struct serial *s)
-
-{
-	sleep (1);
-	if (write_serial (s, "+++", 3) == -1) error (1, 0, "could not write");
-	sleep (1);
-}
-
-void dump_serial_mode (struct serial_mode *serial_mode)
-
-{
-	printf ("baud_rate = %d\n", serial_mode->baud_rate);
-	printf ("stop_bits = %d\n", serial_mode->stop_bits);
-	printf ("data_bits = %d\n", serial_mode->data_bits);
-	printf ("parity    = %d\n", serial_mode->parity);
-}
-
-int try_serial_mode (struct serial *s, struct serial_mode *serial_mode, flag_t flags)
-
-{
-	if (set_serial (s, serial_mode) == -1)
-	{
-		error (0, 0, "could not set serial_mode");
-		return (-1);
-	}
-	if (!_anyset (flags, INT6KDETECT_CMD_MODE)) wakeup (s);
-	at_cmd (s);
-	return (at_cmd (s));
-}
-
-int detect (struct serial *s, struct serial_mode *serial_mode, flag_t flags)
-
-{
-	static int rate [] =
-	{
-		115200,
-		9600,
-		460800,
-		230400,
-		57600,
-		38400,
-		19200,
-		4800,
-		2400,
-		600,
-		300,
-		50
-	};
-	static int parity [] =
-	{
-		UART_NOPARITY,
-		UART_EVENPARITY,
-		UART_ODDPARITY
-	};
-	size_t i;
-	size_t j;
-	unsigned current;
-	unsigned total;
-	total = 2 * 2 * 3 * (sizeof (rate) / sizeof (int));
-	current = 0;
-	for (serial_mode->stop_bits = 1; serial_mode->stop_bits <= 2; ++serial_mode->stop_bits)
-	{
-		for (serial_mode->data_bits = 8; serial_mode->data_bits >= 7; --serial_mode->data_bits)
-		{
-			for (i = 0; i < sizeof (parity) / sizeof (int); ++i)
-			{
-				serial_mode->parity = parity [i];
-				for (j = 0; j < sizeof (rate) / sizeof (int); ++j)
-				{
-					serial_mode->baud_rate = rate [j];
-					++current;
-					if (!_anyset (flags, INT6KDETECT_QUIET))
-					{
-						printf ("\rTesting mode: %03d/%03d (%.01f%%)...", current, total, current * 100.0 / total);
-						fflush (stdout);
-					}
-					if (!try_serial_mode (s, serial_mode, flags))
-					{
-						if (!_anyset (flags, INT6KDETECT_QUIET)) printf ("\n");
-						return (0);
-					}
-				}
-			}
-		}
-	}
-	if (!_anyset (flags, INT6KDETECT_QUIET)) printf ("\n");
-	return (-1);
-}
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"cl:qv",
-		"",
-		"Atheros UART Device Detector",
-		"c\tassume device is in command mode",
-		"l f\tserial port is (f) [" SERIAL_PORT "]",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-	signed c;
-	char const *line = SERIAL_PORT;
-	struct serial serial;
-	struct serial_mode serial_mode;
-	flag_t flags = 0;
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'c':
-			_setbits (flags, INT6KDETECT_CMD_MODE);
-			break;
-		case 'l':
-			line = optarg;
-			break;
-		case 'q':
-			_setbits (flags, INT6KDETECT_QUIET);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (open_serial (line, &serial) == -1) error (1, errno, "could not open %s", line);
-	if (detect (&serial, &serial_mode, flags) == -1) error (1, 0, "could not detect device");
-	printf ("Detected the following serial mode:\n");
-	dump_serial_mode (&serial_mode);
-	close_serial (&serial);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6keth.1.html b/docbook/int6keth.1.html deleted file mode 100644 index 69fbcf94..00000000 --- a/docbook/int6keth.1.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - int6keth.1 - - - - - - - - - -
-int6keth(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 int6keth(1)
-
-NAME
-       int6keth - Qualcomm Atheros Ethernet PHY Settings
-
-SYNOPSIS
-       int6keth [options] [device] [device] [...]
-
-DESCRIPTION
-       Read or write INT6x00 Ethernet PHY Settings using VS_ENET_SETTINGS.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -a mode
-              Advertise auto-negotiate capabilities.  This option takes effect when option -w is present.  It  is  ignored  when
-              option  -r  is  present.   Valid  values are "1000Full", "100Full", "100Half", "10Full" and "10Half".  The default
-              value is no advertisement of capabilities.
-
-       -d mode
-              Device duplex transmission mode.  This option takes effect when option -w is present.  It is ignored  when  option
-              -r is present.  Valid values are "Half" and "Full".  The default value is "Half".
-
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -f control
-              Flow control enable.  This option takes effect when option -w is  present.   It  is  ignored  when  option  -r  is
-              present.  Valid values are "On", "Off", "Tx" and "Rx".  The default value is "Off".
-
-       -n mode
-              Auto-negotiate  mode.   This  option  takes  effect  when  option  -w is present.  It is ignored when option -r is
-              present.  Valid values are "On" and "Off".  The default value is "On".
-
-       -p number
-              The ethernet port number.  Available port numbers differ with chipset and firmware version so consult  the  appro‐
-              priate technical documentation.  Permitted values are 0 through 7.  The default port is 0.
-
-       -s speed
-              Network  transmission  speed  in  mbps.   This  option takes effect when option -w is present.  It is ignored when
-              option -r is present.  Valid values are "10", "100" and "1000".  The default value is "10".
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -r     Read settings from the Ethernet interface on the designated port.  If present, or implied by default, then options
-              -a, -d, -f, -n and -s have no effect.  This option and option -w are mutually exclusive.
-
-       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
-              be saved as text files for reference.
-
-       -w     Write  settings to the Ethernet interface on the specified port.  Be sure to specify all settings to avoid writing
-              default values.  This option and option -r are mutually exclusive.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The MAC address of some powerline device.  More than one address may be specified on the command  line.   If  more
-              than one address is specified then operations are performed on each device in turn.  The default address is local.
-              See DEVICES for information.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information is not available.  Qualcomm Atheros reserves the right to modify message structure
-       or content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       None.
-
-SEE ALSO
-       plc(1) int6kid(1), int6krule(1), int6kstat(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                 int6keth(1)
-
- - - diff --git a/docbook/int6keth.c.html b/docbook/int6keth.c.html deleted file mode 100644 index 5379aaab..00000000 --- a/docbook/int6keth.c.html +++ /dev/null @@ -1,618 +0,0 @@ - - - - - - int6keth.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6keth.c - Atheros Ethernet PHY Settings;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ether/channel.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../mme/UnwantedMessage.c"
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/assist.c"
-#include "../tools/error.c"
-#include "../tools/codelist.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#include "../tools/lookup.c"
-#include "../tools/synonym.c"
-#include "../tools/uintspec.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define MCONTROL_READ 	0x00
-#define MCONTROL_WRITE 	0x01
-#define ETH_PORT 0
-
-#define NEGOTIATE 	SIZEOF (negotiate)
-#define SPEEDS  	SIZEOF (speeds)
-#define DUPLEX 		SIZEOF (duplex)
-#define CONTROL 	SIZEOF (control)
-#define ADVCAP 		SIZEOF (advcap)
-
-static struct _code_ const negotiate [] =
-
-{
-	{
-		0,
-		"Off"
-	},
-	{
-		1,
-		"On"
-	}
-};
-
-static struct _code_ const speeds [] =
-
-{
-	{
-		0,
-		"10"
-	},
-	{
-		1,
-		"100"
-	},
-	{
-		2,
-		"1000"
-	}
-};
-
-static struct _code_ const duplex [] =
-
-{
-	{
-		0,
-		"Half"
-	},
-	{
-		1,
-		"Full"
-	}
-};
-
-static struct _code_ const control [] =
-
-{
-	{
-		0,
-		"Off"
-	},
-	{
-		1,
-		"Tx"
-	},
-	{
-		2,
-		"Rx"
-	},
-	{
-		3,
-		"On"
-	}
-};
-
-static struct _code_ const advcap [] =
-
-{
-	{
-		1,
-		"100Full"
-	},
-	{
-		2,
-		"100Half"
-	},
-	{
-		4,
-		"10Full"
-	},
-	{
-		8,
-		"10Half"
-	},
-	{
-		16,
-		"1000Full"
-	}
-};
-
-#define RATES SIZEOF (rates)
-#define MODES SIZEOF (modes)
-#define LINKS SIZEOF (links)
-#define FLOWS SIZEOF (flows)
-
-static char const * rates [] =
-
-{
-	"10",
-	"100",
-	"1000"
-};
-
-static char const * modes [] =
-
-{
-	"Half",
-	"Full"
-};
-
-static char const * links [] =
-
-{
-	"Unknown",
-	"Off",
-	"On"
-};
-
-static char const * flows [] =
-
-{
-	"Off",
-	"Tx",
-	"Rx",
-	"On"
-};
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-typedef struct __packed phy_settings
-
-{
-	uint8_t MCONTROL;
-	uint8_t AUTONEGOTIATE;
-	uint8_t ADVCAPS;
-	uint8_t ESPEED;
-	uint8_t EDUPLEX;
-	uint8_t EFLOWCONTROL;
-}
-
-phy_settings;
-typedef struct __packed phy_readings
-
-{
-	uint8_t MSTATUS;
-	uint8_t ESPEED;
-	uint8_t EDUPLEX;
-	uint8_t ELINKSTATUS;
-	uint8_t EFLOWCONTROL;
-}
-
-phy_readings;
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-/*====================================================================*
- *
- *   signed PHYSettings (struct channel * channel, struct phy_settings * settings, flag_t flags);
- *
- *   plc.h
- *
- *   read and display Ethernet PHY settings or write then read and
- *   display settings;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-signed PHYSettings (struct channel * channel, struct phy_settings * settings, flag_t flags)
-
-{
-	struct message message;
-	signed packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_enet_settings_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MCONTROL;
-		uint8_t AUTONEGOTIATE;
-		uint8_t ADVCAPS;
-		uint8_t ESPEED;
-		uint8_t EDUPLEX;
-		uint8_t EFLOWCONTROL;
-	}
-	* request = (struct vs_enet_settings_request *) (&message);
-	struct __packed vs_enet_settings_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t ESPEED;
-		uint8_t EDUPLEX;
-		uint8_t ELINKSTATUS;
-		uint8_t EFLOWCONTROL;
-	}
-	* confirm = (struct vs_enet_settings_confirm *) (&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	char address [ETHER_ADDR_LEN * 3];
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_ENET_SETTINGS | MMTYPE_REQ));
-	request->MCONTROL = settings->MCONTROL;
-	request->AUTONEGOTIATE = settings->AUTONEGOTIATE;
-	request->ADVCAPS = settings->ADVCAPS;
-	request->ESPEED = settings->ESPEED;
-	request->EDUPLEX = settings->EDUPLEX;
-	request->EFLOWCONTROL = settings->EFLOWCONTROL;
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) < 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-	{
-		if (UnwantedMessage (&message, packetsize, 0, (VS_ENET_SETTINGS | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if ((confirm->MSTATUS == 1) || (confirm->MSTATUS == 3))
-		{
-			error (0, 0, "%s: %s (0x%0X): ", PLC_WONTDOIT, MMECode (confirm->qualcomm.MMTYPE, confirm->MSTATUS), confirm->MSTATUS);
-			continue;
-		}
-		if (_anyset (flags, PLC_ANALYSE))
-		{
-			printf ("Bits Mode Link Flow\n");
-			printf ("%4d ", confirm->ESPEED);
-			printf ("%4d ", confirm->EDUPLEX);
-			printf ("%4d ", confirm->ELINKSTATUS);
-			printf ("%4d\n", confirm->EFLOWCONTROL);
-		}
-		else
-		{
-			printf ("%s %s ", channel->ifname, hexstring (address, sizeof (address), channel->host, sizeof (channel->host)));
-			printf ("Speed=%s ", rates [confirm->ESPEED]);
-			printf ("Duplex=%s ", modes [confirm->EDUPLEX]);
-			printf ("LinkStatus=%s ", links [confirm->ELINKSTATUS]);
-			printf ("FlowControl=%s\n", flows [confirm->EFLOWCONTROL]);
-		}
-	}
-	if (packetsize < 0)
-	{
-		error (1, errno, CHANNEL_CANTREAD);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"a:d:ef:i:n:p:qrs:tvw",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros Ethernet PHY Settings",
-		"a s\tadvertise capabilities as (s) ['1000Full'|'100Full'|'100Half'|10Full'|'10Half']",
-		"d s\tduplex setting is (s) ['half'|'full']",
-		"e\tredirect stderr to stdout",
-		"f s\tflow control is (s) ['on'|'tx'|'rx'|'off']",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"n s\tauto-negotiate mode is (s) ['on'|'off']",
-		"p n\tport number is (n) [" LITERAL (ETH_PORT) "]",
-		"q\tquiet mode",
-		"r\tread settings instead of write settings",
-		"s s\ttransmission speed in mbps is (s) ['10'|'100'|'1000']",
-		"v\tverbose mode",
-		"w\twrite settings instead of read settings",
-		(char const *) (0)
-	};
-	struct phy_settings settings =
-	{
-		0,
-		1,
-		0,
-		0,
-		0,
-		0
-	};
-	flag_t flags = (flag_t)(0);
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'a':
-			if ((c = lookup (optarg, advcap, ADVCAP)) == -1)
-			{
-				assist (optarg, "capability", advcap, ADVCAP);
-			}
-			settings.ADVCAPS |= (uint8_t)(c);
-			break;
-		case 'd':
-			if ((c = lookup (optarg, duplex, DUPLEX)) == -1)
-			{
-				assist (optarg, "duplex", duplex, DUPLEX);
-			}
-			settings.EDUPLEX = (uint8_t)(c);
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'f':
-			if ((c = lookup (optarg, control, CONTROL)) == -1)
-			{
-				assist (optarg, "control", control, CONTROL);
-			}
-			settings.EFLOWCONTROL = (uint8_t)(c);
-			break;
-		case 'n':
-			if ((c = lookup (optarg, negotiate, NEGOTIATE)) == -1)
-			{
-				assist (optarg, "auto-negotiate", negotiate, NEGOTIATE);
-			}
-			settings.AUTONEGOTIATE = (uint8_t)(c);
-			break;
-		case 's':
-			if ((c = lookup (optarg, speeds, SPEEDS)) == -1)
-			{
-				assist (optarg, "speed", speeds, SPEEDS);
-			}
-			settings.ESPEED = (uint8_t)(c);
-			break;
-		case 't':
-			_setbits (flags, PLC_ANALYSE);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'p':
-			settings.MCONTROL &= 0x0F;
-			settings.MCONTROL |= (unsigned)(uintspec (optarg, 0, 7)) << 4;
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 'r':
-			settings.MCONTROL &= 0xF0;
-			settings.MCONTROL |= 0x00;
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		case 'w':
-			settings.MCONTROL &= 0xF0;
-			settings.MCONTROL |= 0x01;
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!argc)
-	{
-		PHYSettings (&channel, &settings, flags);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		PHYSettings (&channel, &settings, flags);
-		argc--;
-		argv++;
-	}
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6kf.1.html b/docbook/int6kf.1.html deleted file mode 100644 index 97e34178..00000000 --- a/docbook/int6kf.1.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - int6kf.1 - - - - - - - - - -
-int6kf(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   int6kf(1)
-
-NAME
-       int6kf - INT6300 Flash Utility for Linux
-
-SYNOPSIS
-       int6kf [options] -C file -N file -P file
-
-DESCRIPTION
-       This program is deprecated.  Use int6kboot when downloading firmware 3.3.4 or later on INT6300 devices or later.
-
-       Download  and  start  runtime firmware on a local Atheros powerline device that is in bootloader mode.  A device stays in
-       bootloader mode when it cannot load firmware from NVRAM.  That can happen because there is no NVRAM or because the  NVRAM
-       is  blank  or corrupted.  The bootloader only understands a subset of Atheros message types and cannot flash NVRAM.  This
-       program uses that subset to download runtime firmware and start execution.  Optionally, it will proceed  to  flash  NVRAM
-       after the firmware has started.
-
-       Booting  a device is a two part operation.  The first part downloads SDRAM configuration parameters then download runtime
-       firmware and parameters into SDRAM and starts the firmware.  The second part downloads  runtime  firmare  and  parameters
-       (again)  into scratch buffers and instructs the firmware to write them into to NVRAM.  This program can perform the first
-       part alone or the first then the second part but not the second part alone.  The second part can be performed alone using
-       program int6k.
-
-       This  program  is  part of the Atheros Powerline Toolkit.  See the AMP man page for compilation and installation instruc‐
-       tions.
-
-OPTIONS
-       -a     Wait until device sends a VS_HOST_ACTION.IND before downloading SDRAM configuration, firmware and PIB.
-
-       -C filename
-              Read the named SDRAM configuration file and write it to the device.  This option and argument are  required.   Any
-              file  having  an invalid SDRAM configuration file format will be rejected.  No assumptions are made based on file‐
-              name and no filename conventions are enforced.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -F[F]  Write  previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.  Adding a second F here or another -F anywhere
-              on the command line will force-flash a blank or corrupted NVRAM.  Firmware loaded from  NVRAM  will  treat  force-
-              flash as an error.  This option can be used to create factory settings but cannot be used to change them once cre‐
-              ated.  Subsequent use creates and updates operational settings that can be erased using  a  factory  reset.   This
-              option is executed after all others on the command line, except for the -R option.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this interface and only reponses received via this
-              interface are recognized.  The default interface is eth1 because most people use eth0 as their  principle  network
-              connection;  however,  if environment string "PLC" is defined then it takes precedence over the default interface.
-              This option then takes precedence over either default.
-
-       -N filename
-              Read the named NVM file and write it to the device.  This option and argument are required.  Any  file  having  an
-              invalid  NVM  file format will be rejected.  No assumptions are made based on filename and no filename conventions
-              are enforced.
-
-       -P filename
-              Read the named PIB file and write it to the device.  This option and argument are required.  Any  file  having  an
-              invalid  PIB  file format will be rejected.  No assumptions are made based on filename and no filename conventions
-              are enforced.
-
-       -q     Suppresses status messages on stderr.
-
-       -t timer
-              Read timeout or capture period in milliseconds.  Values range from 0 through UINT_MAX.  This value  has  different
-              effects on Linux and Windows.  On Linux, where native raw sockets are used, this is the maximum time allowed for a
-              response and so larger values should not affect performance.  On Windows, where WinPcap is used, this is the  time
-              allotted  for  packet  capture  and  so  larger values will certainly affect performance.  The default is shown in
-              brackets on the program menu.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       None.
-
-REFERENCES
-       See the Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The -C, -N and -P options are always required.  Their order is not important.  Notice  that  no  MAC  address  is  needed
-       because devices use address 00:B0:52:00:00:01, the program default address, when in bootloader mode.
-
-          int6kf -C test.cfg -N test.nvm -P test.pib
-          > eth0 00:B0:52:00:00:01 Write SDRAM Configuration
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Write to device memory
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Write to device memory
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Start Firmware
-          > eth0 00:B0:52:00:00:01 Started.
-
-       Downloads  SDRAM  configuration  file test.cfg with VS_SET_SDRAM then firmware from file test.nvm with VS_WR_MEM then PIB
-       from file test.pib then starts firmware execution with VS_ST_MAC.  This operation is common on flash-less systems.
-
-          int6kf -C test.cfg -N test.nvm -P test.pib -F
-          > eth0 00:B0:52:00:00:01 Write SDRAM Configuration
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Write to device memory
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Write to device memory
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Start Firmware
-          > eth0 00:B0:52:00:00:01 Started.
-          > eth0 00:B0:52:00:00:01 Write MAC as module
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Write PIB as module
-          > eth0 00:B0:52:00:00:01 Written.
-          > eth0 00:B0:52:00:00:01 Flash Device
-          > eth0 00:B0:52:00:00:01 Flashed.
-
-       Perform the same actions as before with some extra steps.  After starting firmware execution, the same firmware  and  PIB
-       are  downloaded again, using VS_WR_MOD instead of VS_WR_MEM, and written to NVRAM using VS_MOD_NVM with force.  The force
-       option is only recognized by firmware that has been started by the bootloader and will  fail  when  no  flash  memory  is
-       present.
-
-DISCLAIMER
-       Atheros  HomePlug  AV Vendor Specific Management Message Entry structure and content is proprietary to Atheros Communica‐
-       tions, Ocala FL USA.  Consequently, public information may not be available.  Atheros Communications reserves  the  right
-       to  modify message structure and content in future firmware releases without any obligation to notify or compensate users
-       of this program.
-
-SEE ALSO
-       AMP(1), int6k(1), int6kid(1), int6krate(1), int6kwait(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                   int6kf(1)
-
- - - diff --git a/docbook/int6kf.c.html b/docbook/int6kf.c.html deleted file mode 100644 index 15f23bba..00000000 --- a/docbook/int6kf.c.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - int6kf.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kf.c - Atheros Powerline Device Flash Utility;
- *
- *   this program sends and receives raw ethernet frames and so needs
- *   root priviledges; if you install it using "chmod 555" and "chown
- *   root:root" then you must login as root to run it; otherwise, you
- *   can install it using "chmod 4555" and "chown root:root" so that
- *   anyone can run it; the program will refuse to run until you get
- *   things right;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../plc/plc.h"
-#include "../pib/pib.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/StartDevice1.c"
-#include "../plc/FlashDevice1.c"
-#include "../plc/UpgradeDevice1.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/WriteCFG.c"
-#include "../plc/WriteMEM.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WaitForRestart.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/typename.c"
-#include "../tools/strfbits.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ram/sdramfile.c"
-#include "../ram/sdrampeek.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvm.c"
-#include "../nvm/nvmfile1.c"
-#include "../nvm/nvmpeek1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibfile1.c"
-#include "../pib/pibpeek1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/HomePlugHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, const char * argv[]);
- *
- *   parse command line, populate int6k structure and perform selected
- *   operations; show help summary when asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   int6k.h for the definition of struct int6k;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, const char * argv [])
-
-{
-	extern struct channel channel;
-	static const char *optv [] =
-	{
-		"C:i:eFN:p:P:qt:vx",
-		"-C file -P file -N file",
-		"Atheros Powerline Device Flash Utility for INT6300",
-		"C f\twrite CFG file to device using VS_SET_SDRAM",
-		"e\tredirect stderr messages to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface number [2]",
-
-#else
-
-		"i s\thost interface name [" CHANNEL_ETHDEVICE "]",
-
-#endif
-
-		"F[F]\tflash [force] NVRAM after firmware start using VS_MOD_NVM",
-		"N f\twrite NVM file to device using VS_WR_MEM",
-		"P f\twrite PIB file to device using VS_WR_MEM",
-		"q\tquiet mode",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"t n\tread capture time is (n) milliseconds [50]",
-
-#else
-
-		"t n\tread timeout is (n) milliseconds [50]",
-
-#endif
-
-		"v\tverbose mode",
-		"x\texit on error",
-		(const char *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	char firmware [PLC_VERSION_STRING];
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	opterr = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch ((char) (c))
-		{
-		case 'C':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.CFG.file = open (optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", optarg);
-			}
-			if (sdramfile (plc.CFG.file, optarg, plc.flags))
-			{
-				error (1, ECANCELED, "CFG file %s is corrupt", optarg);
-			}
-			_setbits (plc.flags, PLC_SDRAM_CONFIG);
-			plc.CFG.name = optarg;
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'F':
-			_setbits (plc.module, PLC_MODULE_NVM_PIB);
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", optarg);
-			}
-			plc.NVM.name = optarg;
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", optarg);
-			}
-			plc.PIB.name = optarg;
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ECANCELED, "Too many arguments");
-	}
-	if (plc.CFG.file == -1)
-	{
-		error (1, ECANCELED, "No CFG file specified");
-	}
-	if (plc.PIB.file == -1)
-	{
-		error (1, ECANCELED, "No PIB file specified");
-	}
-	if (plc.NVM.file == -1)
-	{
-		error (1, ECANCELED, "No NVM file specified");
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (struct message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (WaitForStart (&plc, firmware, sizeof (firmware)))
-	{
-		Failure (&plc, "Device must be connected");
-		return (-1);
-	}
-	if (plc.hardwareID > CHIPSET_INT6300)
-	{
-		Failure (&plc, "Device must be %s or earlier; try using int6kboot.", chipsetname (CHIPSET_INT6300));
-		return (-1);
-	}
-	if (strcmp (firmware, "BootLoader"))
-	{
-		Failure (&plc, "Bootloader must be running");
-		return (-1);
-	}
-	if (!StartDevice1 (&plc))
-	{
-		if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-		{
-			UpgradeDevice1 (&plc);
-		}
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6khost.1.html b/docbook/int6khost.1.html deleted file mode 100644 index 55f6fec6..00000000 --- a/docbook/int6khost.1.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - int6khost.1 - - - - - - - - - -
-int6khost(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6khost(1)
-
-NAME
-       int6khost - INT6300 Host Emulator
-
-SYNOPSIS
-       int6khost [options] -C file -N file -P file -n file -p file
-
-DESCRIPTION
-       The  INT6300 Host Emulator waits for VS_HST_ACTION.IND messages from a local device and services them as described in the
-       INT6300 Technical Reference Manual.  It can be used to demonstrate or verify proper device/host  interaction  for  flash-
-       less  devices.   This  program  is not production grade and will stop dead - like a bug! - when things go wrong.  Use the
-       Qualcomm Atheros Embedded API for real-time, production-grade applications.
-
-       Host emulation applies to flash-less device designs where a local host processor provides the  persistent  storage.   The
-       local  host  can provide a wide range of intelligent storage functions for a device but this program offers one.  Options
-       -C, -N and -P name existing files that store factory default  memory  configuration,  runtime  firmware  and  parameters,
-       respectively.   Options  -n  and -p name scratch files that will store user firmware and parameters, respectively.This is
-       similiar to the standard Atheros NVRAM scheme but still different.
-
-       To use the program, connect a flash-less device to the host via ethernet then start this program with the  correct  file‐
-       names.   The  program  will  automatically  respond  to device requests to download memory configuration, firmware and/or
-       parameters and upload firmware or and/or parameters under device control.  See the Qualcomm  Atheros  Firmware  Technical
-       Reference Manual for more information.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -C filename
-              Use this file to download memory configuration when requested by the local device.  The file must exist and have a
-              valid configuration file format or it will be rejected.  No assumptions are made based on filename and no filename
-              conventions are enforced.  The program will not over-write this file.  This option and argument are required.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -F[F]  Flash  NVRAM  once  downloaded  firmware  has  started.   The  same  firmware and PIB are downloaded, again, using
-              VS_WR_MOD and written to NVRAM using VS_MOD_NVM.  Adding a second F here or another -F  anywhere  on  the  command
-              line  will perform a forced flash.  When no NVRAM is present, normal and force flash cause the device to upload to
-              the host.  When blank or corrupted NVRAM is present, forced flash writes to NVRAM.  This operation will fail  when
-              no NVRAM is present.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -N filename
-              Use this file to download firmware when requested by the local device.  The file must exist and have a  valid  NVM
-              file  format  or  it  will be rejected.  No assumptions are made based on filename and no filename conventions are
-              enforced.  The program will not over-write this file.  This option and argument are required.
-
-       -n filename
-              Use this file to store firmware uploaded from the local device.  The file need not exist but an error  will  occur
-              if  it  cannot  be  created  or written.  If firmware is uploaded to this file, it is used for subsequent firmware
-              downloads unless the device requests a factory reset.  In that case, the file specified  by  option  -N  is  used.
-              This option and argument are optional.  If omitted then the default filename host.pib will be used.
-
-       -P filename
-              Use this file to download parameters when requested by the local device.  The file must exist and have a valid PIB
-              file format or it will be rejected.  No assumptions are made based on filename and  no  filename  conventions  are
-              enforced.  The program will not over-write this file.  This option and argument are required.
-
-       -p filename
-              Use this file to store parameters uploaded from the local device.  The file need not exist but an error will occur
-              if it cannot be created or written.  Once parameters are uploaded to this file, it is used for subsequent  parame‐
-              ter  downloads unless the device requests a factory reset.  In that case, the file specified by option -P is used.
-              This option and argument are optional.  If omitted then the default filename host.nvm will be used.
-
-       -q     Suppress status messages on stderr.
-
-       -t milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is shown in brackets on the program menu.
-
-       -v     Print  additional  information  on  stdout.   In particular, this option will print incoming and outgoing Ethernet
-              frames on stdout.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       None.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The following command starts the host emulator.  The -C, -N and -P options are  always  required.   Their  order  is  not
-       important.
-
-          int6khost -C test.cfg -N test.nvm -P test.pib
-          > eth0 00:B0:52:00:00:01 Waiting for Host Action Requests
-          >
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-SEE ALSO
-       plc(1), int64host(1), int6k(1), int6kboot(1) plchost(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6khost(1)
-
- - - diff --git a/docbook/int6khost.c.html b/docbook/int6khost.c.html deleted file mode 100644 index 218a5266..00000000 --- a/docbook/int6khost.c.html +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - int6khost.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6khost.c - Atheros Powerline Device Host Emulator
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../plc/EmulateHost.c"
-#include "../plc/Failure.c"
-#include "../plc/FactoryDefaults.c"
-#include "../plc/FlashNVM.c"
-#include "../plc/HostActionResponse.c"
-#include "../plc/ModuleRead.c"
-#include "../plc/Request.c"
-#include "../plc/ResetDevice.c"
-#include "../plc/ReadMME.c"
-#include "../plc/ReadFirmware1.c"
-#include "../plc/ReadParameters1.c"
-#include "../plc/SendMME.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/WaitForReset.c"
-#include "../plc/WaitForStart.c"
-#include "../plc/WriteMEM.c"
-#include "../plc/WriteNVM.c"
-#include "../plc/WritePIB.c"
-#include "../plc/WriteCFG.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/error.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../key/keys.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ram/sdramfile.c"
-#include "../ram/sdrampeek.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../pib/pibfile1.c"
-#include "../pib/pibpeek1.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary when asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"C:eFi:n:N:p:P:qt:vx",
-		"-N file -P file [-n file] [-p file]",
-		"Qualcomm Atheros Powerline Device Host Emulator for INT6300",
-		"C f\twrite NVM file to device using VS_SET_SDRAM",
-		"e\tredirect stderr to stdout",
-		"F[F]\tflash (force) NVRAM using VS_MOD_NVM",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"n f\tread NVM from device into file using VS_RD_MOD",
-		"N f\twrite NVM file to device using VS_WR_MEM",
-		"p f\tread PIB from device into file using VS_RD_MOD",
-		"P f\twrite PIB file to device using VS_WR_MEM",
-		"q\tquiet mode",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'C':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.CFG.file = open (plc.CFG.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.CFG.name);
-			}
-			if (sdramfile (plc.CFG.file, optarg, plc.flags))
-			{
-				error (1, ECANCELED, "CFG file %s is corrupt", optarg);
-			}
-			_setbits (plc.flags, PLC_SDRAM_CONFIG);
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'F':
-			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
-			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
-			{
-				_setbits (plc.module, VS_MODULE_FORCE);
-			}
-			_setbits (plc.flags, PLC_FLASH_DEVICE);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'N':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (nvmfile1 (&plc.NVM))
-			{
-				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_MAC);
-			break;
-		case 'n':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.nvm.name);
-			}
-			break;
-		case 'P':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.PIB.name);
-			}
-			if (pibfile1 (&plc.PIB))
-			{
-				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
-			}
-			_setbits (plc.flags, PLC_WRITE_PIB);
-			break;
-		case 'p':
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.pib.name);
-			}
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-
-/*
- *      cancel operation if the user omitted a file or entered to extra argments
- *      on the command line;
- */
-
-	if (argc)
-	{
-		error (1, ENOTSUP, ERROR_TOOMANY);
-	}
-	if (plc.CFG.file == -1)
-	{
-		error (1, ECANCELED, "No host CFG file named");
-	}
-	if (plc.NVM.file == -1)
-	{
-		error (1, ECANCELED, "No host NVM file named");
-	}
-	if (plc.PIB.file == -1)
-	{
-		error (1, ECANCELED, "No host PIB file named");
-	}
-	if (plc.nvm.file == -1)
-	{
-		error (1, ECANCELED, "No user NVM file named");
-	}
-	if (plc.pib.file == -1)
-	{
-		error (1, ECANCELED, "No user PIB file named");
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	EmulateHost (&plc);
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6kid.1.html b/docbook/int6kid.1.html deleted file mode 100644 index bf7deb3c..00000000 --- a/docbook/int6kid.1.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - int6kid.1 - - - - - - - - - -
-int6kid(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  int6kid(1)
-
-NAME
-       int6kid - Echo Device Key
-
-SYNOPSIS
-       int6kid [options] [device] [device] [ ... ]
-
-DESCRIPTION
-       This  program  prints  a single powerline device key or HFID on stdout.  It can be used to dynamically define environment
-       variables or insert command line arguments in scripts at runtime.  It is intended to echo a specific key read from a sin‐
-       gle  device  but  it  can be used to echo a specific key type read from several devices by specifying either the Qualcomm
-       Atheros Local Management Address or a broadcast address.
-
-       This program is, in some sense, the inverse of modpib but it reads the key and HFID directly from  the  powerline  device
-       instead of reading from a PIB file.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -A     Prints the Ethernet address (MAC) for each specified device.  This option and options -D, -M, -N, -S  and  -U  are
-              mutually exclusive.
-
-       -D     Prints  the  Device Access Key (DAK) for each specified device.  This option and options -A, -M, -N, -S and -U are
-              mutually exclusive.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -n     Append a newline to the end of each key.  Newlines are omitted by default so that program output can  be  used  as
-              the raw input to another program.  If you want the newline then you must request it with this option.
-
-       -M     Prints  the Network Membership Key (NMK) for each specified device.  This option and options -A, -D, -N, -S and -U
-              are mutually exclusive.
-
-       -N     Prints the network HFID string for each specified device.  This option and options -A, -D, -M, -S and -U are mutu‐
-              ally exclusive.
-
-       -q     Suppresses status messages on stderr.
-
-       -S     Prints  the manufacturer HFID string for each specified device.  This option and options -A, -D, -M, -N and -U are
-              mutually exclusive.
-
-       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
-              be saved as text files for reference.
-
-       -x     Cause  the  program  to  exit  on  the  first error instead of continuing with remaining iterations, operations or
-              devices.  Normally, the program reports errors and moves on to the next operation, iteration or  device  depending
-              on the command line.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
-              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
-              information about symbolic device addresses.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
-              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-EXAMPLES
-       The following example prints the DAK of the local device on stdout.  The local device  is  interrogated  because  no  MAC
-       address was specified.  The default interface, eth1 on Linux and 2 on Windows, is used unless environment variable PLC is
-       defined.  The DAK is always printed by default.  Depending on your system, you may want to use option -n when using  this
-       program interactively.
-
-          # int6kid
-          00:11:22:33:44:55:66:77:88:99:AA:DD:CC:DD:EE:FF
-
-       The  following example prints the NMK of device 00:B0:52:DA:DA:57 connected to interface eth2 on a Linux system.  Several
-       devices could be specified but that is not a common request.
-
-          # DAK -Mi eth2 00:B0:52:DA:DA:57
-          F4:23:71:4A:51:39:C2:2D:E5:EA:87:43:99:A1:37:81
-
-       The following example dynamically inserts the DAK and NMK of the previous device on the command line of another  program.
-       In  this  example, we want to insert the DAK and NMK into PIB file abc.pib using program modpib.  See the modpib man page
-       for an explanation of command line syntax.  See the GNU bash manuals for an explanation of why this works.
-
-          # modpib abc.pib -D $(int6kid -Di eth2 00:B0:52:DA:DA:57) -N $(int6kid -Mi eth2 00:B0:52:DA:DA:57)
-
-       The following example is an alternate way of accomplishing the same thing using shell script variables.  This method  may
-       be easier to read and maintain.  Notice that we 'squished' all the options together for brevity.
-
-          # PLC=00:B0:52:DA:DA:57
-          # DAK=$(int6kid -Dieth2 ${PLC})
-          # NMK=$(int6kid -Mieth2 ${PLC})
-          # modpib abc.pib -D ${DAK} -N ${NMK}
-
-SEE ALSO
-       plc(1), int6k(1), int6kf(1), int6kp(1), modpib(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                  int6kid(1)
-
- - - diff --git a/docbook/int6kid.c.html b/docbook/int6kid.c.html deleted file mode 100644 index 505e51a4..00000000 --- a/docbook/int6kid.c.html +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - int6kid.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kid.c - Atheros Powerline Device Identity
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexout.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../plc/Display.c"
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define INT6KID_VERBOSE (1 << 0)
-#define INT6KID_SILENCE (1 << 1)
-#define INT6KID_NEWLINE (1 << 2)
-
-#define INT6KID_DAK 0
-#define INT6KID_NMK 1
-#define INT6KID_MAC 2
-#define INT6KID_MFG 3
-#define INT6KID_USR 4
-#define INT6KID_NET 5
-
-/*====================================================================*
- *
- *   void ReadKey1 (struct channel * channel, unsigned c, int key);
- *
- *   read the first block of the PIB from a device then echo one of
- *   several parameters on stdout as a string; program output can be
- *   used in scripts to define variables or compare strings;
- *
- *   this function is an abridged version of ReadParameters(); it reads only
- *   the first 1024 bytes of the PIB then stops; most parameters of
- *   general interest occur in that block;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void ReadKey1 (struct channel * channel, unsigned c, int key)
-
-{
-	struct message message;
-	static signed count = 0;
-	signed packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rd_mod_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MODULEID;
-		uint8_t RESERVED;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint8_t DAK [16];
-	}
-	* request = (struct vs_rd_mod_request *)(&message);
-	struct __packed vs_rd_mod_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t RESERVED1 [3];
-		uint8_t MODULEID;
-		uint8_t RESERVED2;
-		uint16_t MLENGTH;
-		uint32_t MOFFSET;
-		uint32_t MCHKSUM;
-		struct simple_pib pib;
-	}
-	* confirm = (struct vs_rd_mod_confirm *)(&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
-	request->MODULEID = VS_MODULE_PIB;
-	request->MLENGTH = HTOLE16 (PLC_RECORD_SIZE);
-	request->MOFFSET = HTOLE32 (0);
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) < 0)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-	{
-		if (UnwantedMessage (&message, packetsize, 0, (VS_RD_MOD | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (confirm->MSTATUS)
-		{
-			error (0, 0, "%s (%0X): ", MMECode (confirm->qualcomm.MMTYPE, confirm->MSTATUS), confirm->MSTATUS);
-			continue;
-		}
-		if (count++ > 0)
-		{
-			putc (c, stdout);
-		}
-		if (key == INT6KID_MAC)
-		{
-			hexout (confirm->pib.MAC, sizeof (confirm->pib.MAC), HEX_EXTENDER, 0, stdout);
-			continue;
-		}
-		if (key == INT6KID_DAK)
-		{
-			hexout (confirm->pib.DAK, sizeof (confirm->pib.DAK), HEX_EXTENDER, 0, stdout);
-			continue;
-		}
-		if (key == INT6KID_NMK)
-		{
-			hexout (confirm->pib.NMK, sizeof (confirm->pib.NMK), HEX_EXTENDER, 0, stdout);
-			continue;
-		}
-		if (key == INT6KID_MFG)
-		{
-			confirm->pib.MFG [PIB_HFID_LEN - 1] = (char)(0);
-			printf ("%s", confirm->pib.MFG);
-			continue;
-		}
-		if (key == INT6KID_USR)
-		{
-			confirm->pib.USR [PIB_HFID_LEN - 1] = (char)(0);
-			printf ("%s", confirm->pib.USR);
-			continue;
-		}
-		if (key == INT6KID_NET)
-		{
-			confirm->pib.NET [PIB_HFID_LEN - 1] = (char)(0);
-			printf ("%s", confirm->pib.NET);
-			continue;
-		}
-	}
-	if (packetsize < 0)
-	{
-		error (1, errno, CHANNEL_CANTREAD);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"Ac:Dei:MnNqSUv",
-		"device",
-		"Qualcomm Atheros Powerline Device Identity",
-		"A\tEthernet address (MAC)",
-		"c c\tcharacter delimiter is (c)",
-		"D\tDevice Access Key (DAK)",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"M\tNetwork Membership Key (NMK)",
-		"n\tappend newline on output",
-		"N\tnetwork HFID",
-		"q\tquiet mode",
-		"S\tmanufacturer HFID",
-		"U\tuser HFID",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-	signed newline = '\n';
-	signed key = INT6KID_DAK;
-	flag_t flags = (flag_t)(0);
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'A':
-			key = INT6KID_MAC;
-			break;
-		case 'c':
-			newline = * optarg;
-			break;
-		case 'D':
-			key = INT6KID_DAK;
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'M':
-			key = INT6KID_NMK;
-			break;
-		case 'n':
-			_setbits (flags, INT6KID_NEWLINE);
-			break;
-		case 'N':
-			key = INT6KID_NET;
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (flags, PLC_SILENCE);
-			break;
-		case 'S':
-			key = INT6KID_MFG;
-			break;
-		case 'U':
-			key = INT6KID_USR;
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!argc)
-	{
-		ReadKey1 (&channel, newline, key);
-		if (_anyset (flags, INT6KID_NEWLINE))
-		{
-			putc (newline, stdout);
-		}
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		ReadKey1 (&channel, newline, key);
-		if (_anyset (flags, INT6KID_NEWLINE))
-		{
-			putc (newline, stdout);
-		}
-		argv++;
-		argc--;
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6klist.1.html b/docbook/int6klist.1.html deleted file mode 100644 index 4a8d9e48..00000000 --- a/docbook/int6klist.1.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - int6klist.1 - - - - - - - - - -
-int6klist(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6klist(1)
-
-NAME
-       int6klist - List Atheros Device Addresses
-
-SYNOPSIS
-       int6klist [options] [device] [device] [...]
-
-DESCRIPTION
-       print  the  local  device  address or all network device addresses for a specific device.  This program is ideal for that
-       special script jokey in your life.  It only prints device addresses.  Nothing else.
-
-       Devices are detected using one of two methods.  The two methods can be used in combination to determine network topology.
-
-       The first method sends one VS_SW_VER message to the Qualcomm Atheros Local Management Address  and  prints  the  Ethernet
-       source  address  found  in each received confirmation message.  The method is used when no device addresses appear on the
-       command line.  The result is a list of all local devices, being this connected directly to the local  host.   Each  local
-       device device may bridge to an independent powerline network having remote devices as members.
-
-       The  second  method sends one VS_NW_INFO message to each specified device and prints the Ethernet source address found in
-       each received message plus the Ethernet addresses of each network station identified in that message body.   This  method
-       is  used  whenever  one,  or more, device addresses appear on the command line.  It is possible to query remote powerline
-       devices directly and so duplicate devices addresses are printed when devices share powerline neighbors.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -b     Print  bridge  device  addresses.  Each specified device reports it's own address. This option has no effect if no
-              devices are specified.
-
-       -i     Select the host Ethernet interface. All requests are sent via this host interface and only reponses  received  via
-              this  host interface are recognized. The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface. This option then takes precedence over either default.
-
-       -n     Append a newline to output.
-
-       -q     Enter quiet mode. This option has no effect at this time.
-
-       -r     Print  remote device addresses. Each specified device reports neighbor device addresses. This option has no effect
-              when no devices are speceified.
-
-       -s     Insert a newline, instead of a space, between each device address.
-
-       -v     Enter verbose mode. All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -?, --help
-              Print program help summary on stdout. This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout. This option takes precedence over other options on the command  line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The MAC address of some powerline device. More than one address may be specified. If omitted the the program  out‐
-              put  consists  of local device addresses only. Otherwise, output conisists of the specified device followed by all
-              devices associated with it. The default address is local.  See  DEVICES  for  information  about  symbolic  device
-              addresses.
-
-DEVICES
-       Powerline  devices use Ethernet Media Access Control (MAC) addresses. A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal digits in upper, lower or mixed character case. Octets may be separated with colons  for  clarity.  For  example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A  synonym  for  the  Ethernet broadcast address, FF:FF:FF:FF:FF:FF. All devices, whether local, remote or foreign
-              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A  synonym  for  the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01. All local
-              Atheros devices recognize this address but remote and foreign devices do not. A remote device is any device at the
-              far end of a powerline connection. A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA. Consequently, public information may not be available. Qualcomm Atheros reserves the right to  modify  mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-EXAMPLES
-       The following command lists all local devices because no device was specified. Because no devices are  specified  on  the
-       command  line,  a VS_SW_VER message is sent to 00:B0:52:00:00:01 and device responses are collected. As we can see, there
-       is only one local device available at this time. Observe that the prompt appears immediately after  the  address  because
-       newlines are omitted by default.
-
-          # int6klist
-          00:B0:52:BE:EF:04 #
-
-       The next examples do the same thing but this time there are several local devicer available.
-
-          # int6klist
-          00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01 # int6k
-
-       The  next  example  queries  the  first  local  device  from the previous example, 00:B0:52:BE:EF:04, for a list neighbor
-       devices. This time a VS_NW_INFO message is sent because we named a device on the command line. The named  device  happens
-       to be a local device but it need not be. We can see that the device has no neighbors.
-
-          # int6klist 00:B0:52:BE:EF:04
-          00:B0:52:BE:EF:04 # int6k
-
-       The next example we query the next ocal device, 00:B0:52:BA:BE:02, and find that it has two neighbor devices that did not
-       show up earlier because they are remote devices. Observe that the three devices comprise  a  complete  logical  powerline
-       network.  Device  00:B0:52:BA:BE:02  is  connected to the local host but 00:0F:33:F2:01:21 and 00:0f:00:F2:01:13 are con‐
-       nected to other hosts, somewhere.
-
-          # int6klist 00:B0:52:BA:BE:02
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-
-       The next example shows that we can query multiple devices at a time for neighbors. We have copied  the  output  from  the
-       second example and pasted it onto the command line. We now have a list of all devices, local and remote.
-
-          # int6klist 00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01
-          00:B0:52:BE:EF:04 00:B0:52:BA:BE:01 00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-
-       This  next  example does the same thing but uses option -n to append a newline after each query. This output is eaiser to
-       understand because each device queried starts on a new line and is followed by any neighbors.
-
-          # int6klist 00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01 -n
-          00:B0:52:BE:EF:04
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-          00:B0:52:BA:BE:01
-
-       This example invokes int6klist which returns a list of local devices. That list is inserted into another  int6klist  com‐
-       mand line. This demontrates how program output can be used in scripts.
-
-          # int6klist $(int6klist) -n
-          00:B0:52:BE:EF:04
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-          00:B0:52:BA:BE:01
-
-       This next example accomplishes the same thing since all local device respond with a list of powerline neighbors.
-
-          # int6klist local
-          00:B0:52:BE:EF:04
-          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
-          00:B0:52:BA:BE:01
-
-SEE ALSO
-       plc(1), int6krate(1), int6krule(1), int6ktone(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6klist(1)
-
- - - diff --git a/docbook/int6klist.c.html b/docbook/int6klist.c.html deleted file mode 100644 index df9c7771..00000000 --- a/docbook/int6klist.c.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - int6klist.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *   int6klist.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../plc/ListLocalDevices.c"
-#include "../plc/ListRemoteDevices1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexout.c"
-#include "../tools/todigit.c"
-#include "../tools/synonym.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	extern const struct _term_ devices [];
-	static char const * optv [] =
-	{
-		"i:bnqrsv",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros Device Statistics Utility",
-		"b\tprint bridge devices; exclude remote devices",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"n\tappend newline to output",
-		"q\tquiet mode",
-		"r\tprint remote devices; exclude bridge devices",
-		"s\tprint newlines instead of spaces",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	char const * space = " ";
-	char const * comma = "\0";
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'b':
-			_setbits (plc.flags, PLC_BRIDGE_LIST);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'n':
-			comma = "\n";
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_REMOTE_LIST);
-			break;
-		case 's':
-			space = "\n";
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (_allclr (plc.flags, (PLC_BRIDGE_LIST|PLC_REMOTE_LIST)))
-	{
-		_setbits (plc.flags, (PLC_BRIDGE_LIST|PLC_REMOTE_LIST));
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		ListLocalDevices (&plc, space, comma);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		ListRemoteDevices1 (&plc, space, comma);
-		argc--;
-		argv++;
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6klog.1.html b/docbook/int6klog.1.html deleted file mode 100644 index 50e7d470..00000000 --- a/docbook/int6klog.1.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - int6klog.1 - - - - - - - - - -
-int6klog(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 int6klog(1)
-
-NAME
-       int6klog - Qualcomm Atheros Log Retrieval Utility
-
-SYNOPSIS
-       int6klog [options] [device] [device] [...]  [>stdout]
-
-DESCRIPTION
-       Read  and print the device watchdog and checkpoint report on stdout for subsequent analysis by Atheros Technical Support.
-       Report output is in XML format and contains base-64 encoded binary data returned by the device.  Aside from the XML tags,
-       output is not in human readable format.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -C     Return customer log.  This option has no effect unless used with option -r and is for EoC only.
-
-       -c     Clear report.  This option is independent of options -r and -C.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -f     Specifies  the output format.  Possible values are "xml" and "raw".  "xml" will output the watchdog and checkpoint
-              log in the customer XML xlog format.  "raw" will output the watchdog log in the Engineering  Device  Manager  .log
-              format.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -r     Read watchdog log.  This is not the default option and must be specified when needed.
-
-       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
-              be saved as text files for reference.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
-              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
-              information about symbolic device addresses.
-
-LOGFILES
-       Log  files  are save in binary format by default but they can also be saved in XML format by adding option -x to the com‐
-       mand line.  By convention, binary log files have a .log extension and XML log files have a .xlog extension.   The  exten‐
-       sion is not critical but it helps us determine the format before we open the file.
-
-DEVICES
-       Powerline  devices  use  Ethernet  Media  Access  Control  (MAC)  addresses.   MAC  addresses  are  12 hexadecimal digits
-       (0123456789ABCDEFabcdef) in upper, lower or mixed case.  Individual octets may be separated by colons, for  clarity,  but
-       not  all octets need to be seperated.  For example, "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and
-       equivalent.
-
-       The following MAC addresses are special and may be expressed by name instead of number.
-
-       all    Equivalent to "broadcast", described next.
-
-       broadcast
-              A synonym for the standard Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or
-              foreign will respond to this address.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices will recognize this address but remote and foreign devices will  not.   A  remote  device  is  any
-              device at the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message structure and content is proprietary to Atheros Communications,
-       Ocala FL USA.  Consequently, public information is not available.  Atheros Communications reserves the  right  to  modify
-       message  structure  or  content  in future firmware releases without any obligation to notify or compensate users of this
-       program.
-
-EXAMPLES
-       The following example reads the Watchdog and Checkpoint Report from device 00:B0:52:BA:BE:02 and prints them on stdout in
-       XML  format.  The output contains data segments formatted in base-64 notation which preserved data integrity when read or
-       transmitted in text format.
-
-          # int6klog 00:B0:52:BA:BE:02
-
-       The next example does the same thing but pipes output to file temp.log.  Atheros recommends using a  .log  extension  for
-       compatibility with the WIndows Device Manager.
-
-          # int6klog 00:B0:52:BA:BE:02 > temp.log
-
-SEE ALSO
-       amp(1), int6k(1), int6kf(1), int6khost(1), int6kid(1), int6krate(1), int6krule(1), int6kstat(1), int6kwait(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                 int6klog(1)
-
- - - diff --git a/docbook/int6klog.c.html b/docbook/int6klog.c.html deleted file mode 100644 index 4c268267..00000000 --- a/docbook/int6klog.c.html +++ /dev/null @@ -1,739 +0,0 @@ - - - - - - int6klog.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6klog.c - Atheros INT6x00 Log Retrieval Utility;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/format.h"
-#include "../tools/base64.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Devices.c"
-#include "../plc/Failure.c"
-#include "../plc/SendMME.c"
-#include "../plc/ReadMME.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/error.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/strfbits.c"
-#include "../tools/synonym.c"
-#include "../tools/lookup.c"
-#include "../tools/assist.c"
-#include "../tools/codelist.c"
-#include "../tools/b64dump.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *   constants
- *--------------------------------------------------------------------*/
-
-#define MSTATUS_STATUS (7 << 0)
-#define MSTATUS_MAJORVERSION (1 << 3)
-#define MSTATUS_BUFFERISLOCKED (1 << 4)
-#define MSTATUS_AUTOLOCKONRESET (1 << 5)
-#define MSTATUS_UNSOLICITEDUPDATES (1 << 6)
-#define MSTATUS_UNSOLICITED (1 << 7)
-
-#define INT6KLOG_FMT_RAW  1
-#define INT6KLOG_FMT_XML  2
-
-#define WD_ACTION_READ   (1 << 0)
-#define WD_ACTION_CLEAR  (1 << 1)
-#define WD_ACTION_CUSTOM (1 << 2)
-
-/*====================================================================*
- * program variables;
- *--------------------------------------------------------------------*/
-
-static struct _code_ const formats [] =
-
-{
-	{
-		INT6KLOG_FMT_RAW,
-		"raw",
-	},
-	{
-		INT6KLOG_FMT_XML,
-		"xml",
-	}
-};
-
-/*====================================================================*
- *
- *   static signed PrintRawWatchdogReport (struct plc * plc);
- *
- *   Read the watchdog report using VS_WD_RPT and write to file in
- *   binary format; the output can be sent to Atheros Support for
- *   analysis;
- *
- *   VS_WD_RPT request returns an indication instead of a confirmation
- *   message; this is unusual but so is life;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed PrintRawWatchdogReport (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wd_rpt_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t SESSIONID;
-		uint8_t CLR;
-	}
-	* request = (struct vs_wd_rpt_request *) (message);
-	struct __packed vs_wd_rpt_indicate
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint16_t SESSIONID;
-		uint8_t NUMPARTS;
-		uint8_t CURPART;
-		uint16_t RDATALENGTH;
-		uint8_t RDATAOFFSET;
-		uint8_t RDATA [1];
-	}
-	* indicate = (struct vs_wd_rpt_indicate *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_WD_RPT | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->SESSIONID = HTOLE16 (plc->cookie);
-	request->CLR = plc->readaction;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	do
-	{
-		printf ("%d %d\n", LE16TOH (indicate->RDATALENGTH), indicate->RDATAOFFSET);
-		if (ReadMME (plc, 0, (VS_WD_RPT | MMTYPE_IND)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		printf ("%d %d\n", LE16TOH (indicate->RDATALENGTH), indicate->RDATAOFFSET);
-		if (indicate->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		printf ("%d %d\n", LE16TOH (indicate->RDATALENGTH), indicate->RDATAOFFSET);
-		write (STDOUT_FILENO, indicate->RDATA + indicate->RDATAOFFSET, LE16TOH (indicate->RDATALENGTH) - indicate->RDATAOFFSET);
-	}
-	while (indicate->CURPART < indicate->NUMPARTS);
-	return (0);
-}
-
-/*====================================================================*
- *
- *   static signed PrintWatchdogReport (struct plc * plc, char const * version);
- *
- *   Read the watchdog report using VS_WD_RPT and print to file in
- *   XML format; this file may be sent to QCA for analysis;
- *
- *   VS_WD_RPT request returns an indication instead of a confirmation
- *   message; this is unusual but so is life;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed PrintWatchdogReport (struct plc * plc, char const * version)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_wd_rpt_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t SESSIONID;
-		uint8_t CLR;
-	}
-	* request = (struct vs_wd_rpt_request *) (message);
-	struct __packed vs_wd_rpt_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint16_t SESSIONID;
-		uint8_t NUMPARTS;
-		uint8_t CURPART;
-		uint16_t RDATALENGTH;
-		uint8_t RDATAOFFSET;
-		uint8_t RDATA [1];
-	}
-	* indicate = (struct vs_wd_rpt_ind *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_WD_RPT | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->SESSIONID = HTOLE16 (plc->cookie);
-	request->CLR = plc->readaction;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	printf ("<WatchdogReport>");
-	do
-	{
-		if (ReadMME (plc, 0, (VS_WD_RPT | MMTYPE_IND)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (indicate->MSTATUS)
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		printf ("<Packet>");
-		printf ("<Version>%s</Version>", version);
-		printf ("<OUI>%s</OUI>", "00B052");
-		printf ("<Status>0</Status>");
-		printf ("<SessionId>0</SessionId>");
-		printf ("<NumParts>%d</NumParts>", indicate->NUMPARTS);
-		printf ("<CurPart>%d</CurPart>", indicate->CURPART);
-		printf ("<DataLength>%d</DataLength>", LE16TOH (indicate->RDATALENGTH));
-		printf ("<DataOffset>%d</DataOffset>", indicate->RDATAOFFSET);
-		printf ("<Data>");
-		b64dump (indicate->RDATA + indicate->RDATAOFFSET, LE16TOH (indicate->RDATALENGTH) - indicate->RDATAOFFSET, 0, stdout);
-		printf ("</Data>");
-		printf ("</Packet>");
-	}
-	while (indicate->CURPART < indicate->NUMPARTS);
-	printf ("</WatchdogReport>");
-	return (0);
-}
-
-/*====================================================================*
- *
- *   static signed PrintCheckpointReport (struct plc * plc, char const * version);
- *
- *   Read the watchdog reqport using VS_CP_RPT and write to file in
- *   binary or XML format; this file can be sent to Atheros Support
- *   for analysis;
- *
- *   VS_CP_RPT request returns an indication instead of a confirmation
- *   message; this is unusual but so is life;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed PrintCheckpointReport (struct plc * plc, char const * version)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_cp_rpt_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t SESSIONID;
-		uint8_t CLR;
-	}
-	* request = (struct vs_cp_rpt_request *) (message);
-	struct __packed vs_cp_rpt_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MAJORVERSION;
-		uint8_t MINORVERSION;
-		uint8_t RESERVED [14];
-		uint16_t SESSIONID;
-		uint32_t TOTALBUFFERSIZE;
-		uint32_t BLOCKOFFSET;
-		uint32_t BYTEINDEXOFNEXTPOSITION;
-		uint8_t NUMPARTS;
-		uint8_t CURPART;
-		uint16_t RDATALENGTH;
-		uint8_t RDATAOFFSET;
-		uint8_t RDATA [1];
-	}
-	* indicate = (struct vs_cp_rpt_ind *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_CP_RPT | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	request->SESSIONID = HTOLE16 (plc->cookie);
-	request->CLR = plc->readaction;
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	printf ("<CheckpointReport>");
-	do
-	{
-		if (ReadMME (plc, 0, (VS_CP_RPT | MMTYPE_IND)) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (_anyset (indicate->MSTATUS, MSTATUS_STATUS))
-		{
-			Failure (plc, PLC_WONTDOIT);
-			return (-1);
-		}
-		printf ("<Packet>");
-		printf ("<Version>%s</Version>", version);
-		printf ("<Status>0</Status>");
-		printf ("<MajorVersionBit>%d</MajorVersionBit>", indicate->MSTATUS & MSTATUS_MAJORVERSION? 1:0);
-		printf ("<BufferIsLocked>%d</BufferIsLocked>", indicate->MSTATUS & MSTATUS_BUFFERISLOCKED? 1:0);
-		printf ("<AutoLockOnResetIsOn>%d</AutoLockOnResetIsOn>", indicate->MSTATUS & MSTATUS_AUTOLOCKONRESET? 1:0);
-		printf ("<UnsolicitedUpdatesIsOn>%d</UnsolicitedUpdatesIsOn>", indicate->MSTATUS & MSTATUS_UNSOLICITEDUPDATES? 1:0);
-		printf ("<Unsolicited>%d</Unsolicited>", indicate->MSTATUS & MSTATUS_UNSOLICITED? 1:0);
-		printf ("<MajorVersion>%d</MajorVersion>", indicate->MAJORVERSION);
-		printf ("<MinorVersion>%d</MinorVersion>", indicate->MINORVERSION);
-		printf ("<Reserved1>0</Reserved1>");
-		printf ("<Reserved2>0</Reserved2>");
-		printf ("<Reserved3>0</Reserved3>");
-		printf ("<Reserved4>0</Reserved4>");
-		printf ("<SessionId>1</SessionId>");
-		printf ("<TotalBufferSize>%d</TotalBufferSize>", LE32TOH (indicate->TOTALBUFFERSIZE));
-		printf ("<BlockOffset>%d</BlockOffset>", LE32TOH (indicate->BLOCKOFFSET));
-		printf ("<ByteIndexOfNextPos>%d</ByteIndexOfNextPos>", LE32TOH (indicate->BYTEINDEXOFNEXTPOSITION));
-		printf ("<NumParts>%d</NumParts>", indicate->NUMPARTS);
-		printf ("<CurPart>%d</CurPart>", indicate->CURPART);
-		printf ("<RDataLength>%d</RDataLength>", LE16TOH (indicate->RDATALENGTH));
-		printf ("<RDataOffset>%d</RDataOffset>", indicate->RDATAOFFSET);
-		printf ("<RData>");
-		b64dump (indicate->RDATA + indicate->RDATAOFFSET, LE16TOH (indicate->RDATALENGTH), 0, stdout);
-		printf ("</RData>");
-		printf ("</Packet>");
-	}
-	while (indicate->CURPART < indicate->NUMPARTS);
-	printf ("</CheckpointReport>");
-	return (0);
-}
-
-/*====================================================================*
- *
- *   static signed Diagnostics (struct plc * plc)
- *
- *   read the firmware version string from a device before reading
- *   and writing the watchdog and checkpoint reports in XML format;
- *
- *
- *--------------------------------------------------------------------*/
-
-static signed Diagnostics (struct plc * plc)
-
-{
-	char version [PLC_VERSION_STRING];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (message, 0, sizeof (* message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-	if (SendMME (plc) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-		return (-1);
-	}
-	if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) <= 0)
-	{
-		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-		return (-1);
-	}
-	if (confirm->MSTATUS)
-	{
-		Failure (plc, PLC_WONTDOIT);
-		return (-1);
-	}
-	memcpy (version, confirm->MVERSION, sizeof (version));
-	if (plc->action == INT6KLOG_FMT_XML)
-	{
-		printf ("<?xml version='1.0' encoding='utf-8' standalone='yes'?>");
-		printf ("<Diagnostics>");
-		PrintWatchdogReport (plc, version);
-		PrintCheckpointReport (plc, version);
-		printf ("</Diagnostics>\n");
-		return (0);
-	}
-	if (plc->action == INT6KLOG_FMT_RAW)
-	{
-		PrintRawWatchdogReport (plc);
-		return (0);
-	}
-	return (0);
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"cCef:ri:qvz:",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros INT6x00 Log Retrieval Utility",
-		"c\tclear watchdog and checkpoint reports",
-		"C\tcustom watchdog report",
-		"e\tredirect stderr to stdout",
-		"f s\tprint Watchdog Report in format (s) [xml]",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"r\tread ",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	plc.readaction = 0;
-	plc.action = INT6KLOG_FMT_XML;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'C':
-			_setbits (plc.readaction, WD_ACTION_CUSTOM);
-			break;
-		case 'c':
-			_setbits (plc.readaction, WD_ACTION_CLEAR);
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'f':
-			if ((c = lookup (optarg, formats, SIZEOF (formats))) == -1)
-			{
-				assist (optarg, "format", formats, SIZEOF (formats));
-			}
-			plc.action = (uint8_t)(c);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'r':
-			_setbits (plc.readaction, WD_ACTION_READ);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'z':
-			plc.readaction = (uint8_t)(uintspec (optarg, 0, 255));
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc != 1)
-	{
-		if (plc.rpt.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-
-#ifdef WIN32
-
-	if (plc.action == INT6KLOG_FMT_RAW)
-	{
-		setmode (STDOUT_FILENO, O_BINARY);
-	}
-
-#endif
-
-	if (!argc)
-	{
-		Diagnostics (&plc);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		Diagnostics (&plc);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6kmdio.1.html b/docbook/int6kmdio.1.html deleted file mode 100644 index bfed34bc..00000000 --- a/docbook/int6kmdio.1.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - int6kmdio.1 - - - - - - - - - -
-int6kmdio(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6kmdio(1)
-
-NAME
-       int6kmdio - Qualcomm Atheros 16-bit MDIO Register Editor
-
-SYNOPSIS
-       int6kmdio [options] [device] [device] [...]
-
-DESCRIPTION
-       Read  or  write the generic MDIO registers on an Atheros powerline device using the Qualcomm Atheros VS_MDIO_COMMAND ven‐
-       dor-specific management message.  The default operation is to read a register.  Registers are written  only  if  data  is
-       specified on the command line.
-
-       This program writes MDIO instructions using 802.3 Clause 22 (phy, reg, data and mask) format.  See program int6kmdio2 for
-       a similar program to write instructions using 802.3ae Clause 45 (address, data and mask) format.
-
-       This program is deprecated and may be removed in later toolkit releases.  Use program plcmdio16 instead.
-
-OPTIONS
-       -d data
-              A 16-bit data value to be inserted into the specified register.  The specified data value  is  written  when  this
-              option  is  present;  otherwise  the  specified register is read and the content is displayed.  Data values may be
-              expressed in decimal, hexadecimal or binary notation.  Hexadecimal values are prefixed with "0x" or "0X".   Binary
-              values are prefixed with "0b" or "0B".
-
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -p address
-              The  5-bit PHY address.  Some devices may not support all possible addresses.  Addresses may be expressed in deci‐
-              mal, hexadecimal or binary notation.  Hexadecimal values must be prefixed with "0x" or "0X".  Binary  values  must
-              be prefixed with "0b" or "0B".
-
-       -q     Suppresses status messages on stderr.
-
-       -r register
-              The  5-bit  register address.  Addresses may be expressed in decimal, hexadecimal or binary notation.  Hexadecimal
-              values must be prefixed with "0x" or "0X".  Binary values must be prefixed with "0b" or "0B".   Some  devices  may
-              not support all possible addresses.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Displays  program  help information on stderr.  This option takes precedence over all other options on the command
-              line except version information.
-
-       -!,--version
-              Displays program version information on stderr.  This option takes precedence over all other options on  the  com‐
-              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
-
-ARGUMENTS
-       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
-              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
-              information about symbolic device addresses.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
-              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information may not be available.  Qualcomm Atheros  reserves  the  right  to  modify  message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       None.
-
-SEE ALSO
-       plc(1), int6kmod(1), int6kmdio2(1), mdioblock(1), mdioblock2(1), mdiodump(1), mdiogen(1), plcmdio16(1), plcmdio32(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6kmdio(1)
-
- - - diff --git a/docbook/int6kmdio.c.html b/docbook/int6kmdio.c.html deleted file mode 100644 index b808a487..00000000 --- a/docbook/int6kmdio.c.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - int6kmdio.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kmdio.c - Atheros Powerline PHY Register Editor
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../mme/mme.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexview.c"
-#include "../tools/regview32.c"
-#include "../tools/synonym.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define INT6KMDIO_RELATIVE (1 << 0)
-#define INT6KMDIO_ABSOLUTE (1 << 1)
-#define INT6KMDIO_REGISTER (1 << 2)
-#define INT6KMDIO_HEADINGS (1 << 3)
-#define INT6KMDIO_WRITE (1 << 4)
-
-/*====================================================================*
- *
- *   void function (struct channel * channel, uint32_t offset, uint32_t length, flag_t flags);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-static void function (struct channel * channel, uint8_t mode, uint8_t phy, uint8_t reg, uint16_t data)
-
-{
-	struct message message;
-	signed packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_mdio_command_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t OPERATION;
-		uint8_t PHY;
-		uint8_t REG;
-		uint16_t DATA;
-	}
-	* request = (struct vs_mdio_command_request *)(&message);
-	struct __packed vs_mdio_command_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint16_t DATA;
-		uint8_t PHY;
-		uint8_t REG;
-	}
-	* confirm = (struct vs_mdio_command_confirm *)(&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MDIO_COMMAND | MMTYPE_REQ));
-	request->OPERATION = mode;
-	request->PHY = phy;
-	request->REG = reg;
-	request->DATA = HTOLE16 (data);
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) == -1)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-	{
-		if (UnwantedMessage (&message, packetsize, 0, (VS_MDIO_COMMAND | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (confirm->MSTATUS)
-		{
-			error (0, 0, "%s (%0X): %s", MMECode (confirm->qualcomm.MMTYPE, confirm->MSTATUS), confirm->MSTATUS, PLC_WONTDOIT);
-			continue;
-		}
-		printf (" phy 0x%02X", confirm->PHY);
-		printf (" reg 0x%02X", confirm->REG);
-		printf (" data 0x%04X", confirm->DATA);
-		printf ("\n");
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"d:ei:p:qr:v",
-		"[device] [...]",
-		"Qualcomm Atheros 16-bit MDIO Register Editor",
-		"d n\tdata value is (n) [0x0000]",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"p n\tPHY number (n) [0xFF]",
-		"q\tquiet mode",
-		"r n\tregister number (n) [0xFF]",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-	uint8_t mode = 0;
-	uint8_t phy = 0;
-	uint8_t reg = 0;
-	uint16_t data = 0;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'd':
-			mode = 1;
-			data = (uint16_t)(uintspec (optarg, 0, 0xFFFF));
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'p':
-			phy = (uint8_t)(uintspec (optarg, 0, 0x1F));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 'r':
-			reg = (uint8_t)(uintspec (optarg, 0, 0x1F));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!argc)
-	{
-		function (&channel, mode, phy, reg, data);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		function (&channel, mode, phy, reg, data);
-		argv++;
-		argc--;
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6kmdio2.1.html b/docbook/int6kmdio2.1.html deleted file mode 100644 index e8bb2051..00000000 --- a/docbook/int6kmdio2.1.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - int6kmdio2.1 - - - - - - - - - -
-int6kmdio2(1)                                Qualcomm Atheros Open Powerline Toolkit                               int6kmdio2(1)
-
-NAME
-       int6kmdio2 - Qualcomm Atheros 32-bit MDIO Register Editor
-
-SYNOPSIS
-       int6kmdio2 [options] [device] [device] [...]
-
-DESCRIPTION
-       Read  or  write  the  global MDIO registers on an Atheros powerline device using multiple VS_MDIO_COMMAND vendor-specific
-       management messages.  Commands are entered using 32-bit register and data  values  then  converted  to  three  equivalent
-       16-bit  commands.   The  default operation is to read a register.  Registers are written only if data is specified on the
-       command line.
-
-       This program writes MDIO instructions using 802.3ae Clause 45 (address, data and mask) format.  See program int6kmdio for
-       a similar program to write instructions using 802.3 Clause 22 (phy, reg, data and mask) format.
-
-       This program is deprecated and may be removed in future toolkit releases.  Use program plcmdio32 instead.
-
-OPTIONS
-       -a address
-              The  19-bit  global  register  address.   Some  devices  may not support all possible addresses.  Addresses may be
-              expressed in decimal, hexadecimal or binary notation.  Hexadecimal values must be  prefixed  with  "0x"  or  "0X".
-              Binary values must be prefixed with "0b" or "0B".
-
-       -d data
-              A  32-bit  data  value  to be inserted into the specified register.  The specified data value is written when this
-              option is present; otherwise the specified register is read and the content is  displayed.   Data  values  may  be
-              expressed  in decimal, hexadecimal or binary notation.  Hexadecimal values are prefixed with "0x" or "0X".  Binary
-              values are prefixed with "0b" or "0B".
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -h     Write high order-byte before low-order byte.  This option is only useful on some architectures.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -q     Suppresses status messages on stderr.
-
-       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
-
-       -?,--help
-              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
-              line except version information.
-
-       -!,--version
-              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
-              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
-
-ARGUMENTS
-       device The MAC address of some powerline device.  More than one address may be specified.  If more than  one  address  is
-              specified  then  operations  are performed on each device in turn.  The default address is local.  See DEVICES for
-              information about symbolic device addresses.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
-       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       None.
-
-SEE ALSO
-       plc(1), int6kmod(1), int6kmdio(1), int6kmdio2(1), mdioblock(1),  mdioblock2(1),  mdiodump(1),  mdiogen(1),  plcmdio16(1),
-       plcmdio32(1)
-
-CREDITS
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                               int6kmdio2(1)
-
- - - diff --git a/docbook/int6kmdio2.c.html b/docbook/int6kmdio2.c.html deleted file mode 100644 index e763e7a9..00000000 --- a/docbook/int6kmdio2.c.html +++ /dev/null @@ -1,479 +0,0 @@ - - - - - - int6kmdio2.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kmdio2 - Qualcomm Atheros 32-bit MDIO Register Editor
- *
- *
- *   Contributor(s):
- *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../mme/mme.h"
-#include "../mdio/mdio.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexview.c"
-#include "../tools/regview32.c"
-#include "../tools/synonym.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define MDIO_FLAG_REVERSE (1 << 0)
-
-#define MDIO_MODE_READ 0
-#define MDIO_MODE_WRITE 1
-
-#define CODE_SHIFT 3
-#define CODE_MASK (0x03 << CODE_SHIFT)
-#define CODE_HIGH_ADDR 0x03
-#define CODE_LOW_ADDR 0x02
-
-#define HIGH_ADDR_SHIFT 9
-#define LOW_ADDR_SHIFT 1
-
-#define HIGH_ADDR_MASK (0x000003FF << HIGH_ADDR_SHIFT)
-#define LOW_ADDR_MASK 0x000001FC
-
-/*====================================================================*
- *
- *   signed mdio (struct channel * channel, uint8_t mode, uint8_t phy, uint16_t * data);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-static signed mdio (struct channel * channel, uint8_t mode, uint8_t phy, uint8_t reg, uint16_t * data)
-
-{
-	struct message message;
-	signed packetsize;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_mdio_command_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t OPERATION;
-		uint8_t PHY;
-		uint8_t REG;
-		uint16_t DATA;
-	}
-	* request = (struct vs_mdio_command_request *)(&message);
-	struct __packed vs_mdio_command_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint16_t DATA;
-		uint8_t PHY;
-		uint8_t REG;
-	}
-	* confirm = (struct vs_mdio_command_confirm *)(&message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (&message, 0, sizeof (message));
-	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-	QualcommHeader (&request->qualcomm, 0, (VS_MDIO_COMMAND | MMTYPE_REQ));
-	request->OPERATION = mode;
-	request->PHY = phy;
-	request->REG = reg;
-	request->DATA = HTOLE16 (*data);
-
-#if 1
-
-	printf (" phy 0x%02X", phy);
-	printf (" reg 0x%02X", reg);
-	printf (" data 0x%04X", * data);
-	printf ("\n");
-
-#endif
-
-	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) == -1)
-	{
-		error (1, errno, CHANNEL_CANTSEND);
-	}
-	while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
-	{
-		if (UnwantedMessage (&message, packetsize, 0, (VS_MDIO_COMMAND | MMTYPE_CNF)))
-		{
-			continue;
-		}
-		if (confirm->MSTATUS)
-		{
-			error (0, 0, "%s (%0X): %s", MMECode (confirm->qualcomm.MMTYPE, confirm->MSTATUS), confirm->MSTATUS, PLC_WONTDOIT);
-			continue;
-		}
-		*data = confirm->DATA;
-		return (0);
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   void function (struct channel * channel, uint8_t mode, uint32_t address, uint32_t content, flag_t flags);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-static void function (struct channel * channel, uint8_t mode, uint32_t address, uint32_t content, flag_t flags)
-
-{
-	uint8_t phy;
-	uint8_t reg;
-	uint16_t mdio_data;
-	uint16_t high_addr = (address & HIGH_ADDR_MASK) >> HIGH_ADDR_SHIFT;
-	uint16_t low_addr = (address & LOW_ADDR_MASK) >> LOW_ADDR_SHIFT;
-
-/*
- *   supply chip with high address bytes
- */
-
-	phy = CODE_HIGH_ADDR << CODE_SHIFT;
-	reg = 0;
-	mdio_data = high_addr;
-	if (mdio (channel, MDIO_MODE_WRITE, phy, reg, &mdio_data))
-	{
-		error (1, 0, "could not set high address bits");
-	}
-	if (_allclr (flags, MDIO_FLAG_REVERSE))
-	{
-
-/*
- *   supply chip with first low address bytes and first data chunk
- */
-
-		phy = CODE_LOW_ADDR << CODE_SHIFT;
-		phy |= (low_addr & 0xE0) >> 5;
-		reg = (low_addr & 0x1F);
-		mdio_data = (content & 0x0000FFFF);
-		if (mdio (channel, mode, phy, reg, &mdio_data))
-		{
-			error (1, 0, "could not read low 16bits");
-		}
-		if (mode == MDIO_MODE_READ)
-		{
-			content = mdio_data;
-		}
-
-/*
- *   supply chip with second low address bytes and second data chunk
- */
-
-		phy = CODE_LOW_ADDR << CODE_SHIFT;
-		phy |= (low_addr & 0xE0) >> 5;
-		reg = (low_addr & 0x1F) | 0x01;
-		mdio_data = (content & 0xFFFF0000) >> 16;
-		if (mdio (channel, mode, phy, reg, &mdio_data))
-		{
-			error (1, 0, "could not read high 16bits");
-		}
-		if (mode == MDIO_MODE_READ)
-		{
-			content |= (mdio_data << 16);
-			printf ("0x%08x: 0x%08x\n", address, content);
-		}
-	}
-	else
-	{
-
-/*
- *   supply chip with second low address bytes and second data chunk
- */
-
-		phy = CODE_LOW_ADDR << CODE_SHIFT;
-		phy |= (low_addr & 0xE0) >> 5;
-		reg = (low_addr & 0x1F) | 0x01;
-		mdio_data = (content & 0xFFFF0000) >> 16;
-		if (mdio (channel, mode, phy, reg, &mdio_data))
-		{
-			error (1, 0, "could not read high 16bits");
-		}
-		if (mode == MDIO_MODE_READ)
-		{
-			content = (mdio_data << 16);
-		}
-
-/*
- *   supply chip with first low address bytes and first data chunk
- */
-
-		phy = CODE_LOW_ADDR << CODE_SHIFT;
-		phy |= (low_addr & 0xE0) >> 5;
-		reg = (low_addr & 0x1F);
-		mdio_data = (content & 0x0000FFFF);
-		if (mdio (channel, mode, phy, reg, &mdio_data))
-		{
-			error (1, 0, "could not read low 16bits");
-		}
-		if (mode == MDIO_MODE_READ)
-		{
-			content |= mdio_data;
-			printf ("0x%08x: 0x%08x\n", address, content);
-		}
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"a:d:hei:qv",
-		"[device] [...]",
-		"Qualcomm Atheros 32-bit MDIO Register Editor",
-		"a n\taddress is (n) [0x00000000]",
-		"d n\tcontent is (n) [0x00000000]",
-		"e\tredirect stderr to stdout",
-		"h\tsend high-order data before low-order data",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-	flag_t flags = (flag_t)(0);
-	uint8_t mode = MDIO_MODE_READ;
-	uint32_t address = 0;
-	uint32_t content = 0;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'a':
-			address = (uint32_t)(uintspec (optarg, 0, 0x0007FFFF));
-			if (address & 0x03)
-			{
-				error (1, 0, "address must be on an even 4 byte boundary");
-			}
-			break;
-		case 'd':
-			mode = MDIO_MODE_WRITE;
-			content = (uint32_t)(uintspec (optarg, 0, 0xFFFFFFFF));
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			break;
-		case 'r':
-			_setbits (flags, MDIO_FLAG_REVERSE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!argc)
-	{
-		function (&channel, mode, address, content, flags);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		function (&channel, mode, address, content, flags);
-		argv++;
-		argc--;
-	}
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6kmod.1.html b/docbook/int6kmod.1.html deleted file mode 100644 index 0e0cc1ad..00000000 --- a/docbook/int6kmod.1.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - int6kmod.1 - - - - - - - - - -
-int6kmod(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 int6kmod(1)
-
-NAME
-       int6kmod - Qualcomm Atheros Powerline Device Module Manager
-
-SYNOPSIS
-       int6kmod [options] [device] [device] [...]
-
-DESCRIPTION
-       Read or write Atheros custom powerline modules using VS_MODULE_OPERATION messages.  Modules may be read from a device and
-       written to a file or read from a file and written to a device.  Modules may have any of  several  formats  and  purposes.
-       Where the firmware permits, this program can now read modules in excess of 1400 bytes and can write multiple modules that
-       exceed 1400 bytes in one operation.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -d     Read the specified module from NVRAM and write to standard output in hexadecimal dump format.  The module is iden‐
-              tified by module and sub-module using options -t and -s.  Runtime firmware will report an error if the  module  is
-              not  available.   The  session identifier is not required for a module read operation and is ignored.  The largest
-              module that can be read is 1400 bytes.  This option and option -m are mutually exclusive.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -m filename
-              Read the specified module from NVRAM and write it to the named file.  The module is identified by module and  sub-
-              module  using  options -t and -s.  Runtime firmware will report an error if the module is not available.  The ses‐
-              sion identifier is not required for a module read operation and is ignored.  The largest module that can  be  read
-              is 1400 bytes.  This option and option -d are mutually exclusive.
-
-       -M filename
-              Read the named module file and download it to the named device and commit NVRAM.  The module is assigned to a mod‐
-              ule and sub-module identifier using options -t and -s.  Runtime firmware will reject modules having invalid module
-              and  sub-mocule  identifiers.   Module  files  must be a multiple of four bytes or an error will occur.  As imple‐
-              mented, int6kmod will reject files exceeding 1400 bytes but this restriction will be removed in later versions.
-
-       -q     Suppresses status messages on stderr.
-
-       -s sub-module-id
-              The sub-module identifier expressed as a 16-bit hexadecimal value with optional 0x prefix.  This identifier  indi‐
-              cates  a  specific module with the module class specified using option -t.  Any 16-bit value is permitted but only
-              certain values are accepted by device firmware depending on firmware type and  revision.   The  default  value  is
-              0x0000.
-
-       -S session-id
-              The  session  identifier  expressed as a 32-bit hexadecimal value with optional 0x prefix.  The session identifier
-              value is arbitrary and so any 32-bit value is permitted but 0x00000000 and 0xFFFFFFFF are illegal.  The 0x  prefix
-              is optional for this argument.  The default session-id is 0x78563412.
-
-       -t module-id
-              The  module identifier expressed as a 16-bit hexadecimal value with optional 0x prefix.  This identifier indicates
-              the module type or class.  Option -s indicates the specific member of a module class.  Any 16-bit value is permit‐
-              ted but only certain values will be accepted by device firmware.  The default value is 0x0000.
-
-       -v     Print  additional information on stdout.  In particular, this option dumps incoming and outgoing packets which can
-              be saved as text files for reference.
-
-       -w     Write settings to the device instead of reading settings from the device.  If omitted then settings are read  from
-              the device and displayed.  If present, the user should specify all settings to avoid writing default values to the
-              device.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -?,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The MAC address of some powerline device.  More than one address may be specified on the command  line.   If  more
-              than one address is specified then operations are performed on each device in turn.  The default address is local.
-              See DEVICES for information.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information is not available.  Qualcomm Atheros reserves the right to modify message structure
-       or content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       The following command reads module file abc.bin and writes it to the local device.  The module  identifier  0x1000  indi‐
-       cates  that  it  is  an MDIO Init module.  The sub-module identifer defaults to 0x0000 because option -s is omitted.  The
-       session identifier defaults to 0x78563412 because option -S is omitted.  The operation takes place in three  steps.   The
-       last step may take 2 or 3 seconds to complete.
-
-          # int6kmod -M abc.bin -t 0x1000
-          eth1 00:B0:52:00:00:01 Request Session
-          eth1 00:B0:52:BE:EF:03 Request Granted
-          eth1 00:B0:52:00:00:01 Write abc.bin
-          eth1 00:B0:52:BE:EF:03 Written
-          eth1 00:B0:52:00:00:01 Commit Modules
-          eth1 00:B0:52:BE:EF:03 Committed
-
-       The next example does the same thing but writes module file def.bin to remote device 00:B0:52:BA:BE:02.  The module iden‐
-       tifier 0x4000 indicates that it is an Advanced Power Management uC module.  The session identifier  used  is  0xA5A5A5A5.
-       The sub-module identifer defaults to 0x0000 because option -s is omitted.
-
-          # int6kmod -M def.bin -t 0x4000 -S A5A5A5A5 00:B0:52:BA:BE:02
-          eth1 00:B0:52:00:00:01 Request Session
-          eth1 00:B0:52:BE:EF:03 Request Granted
-          eth1 00:B0:52:00:00:01 Write abc.bin
-          eth1 00:B0:52:BE:EF:03 Written
-          eth1 00:B0:52:00:00:01 Commit Modules
-          eth1 00:B0:52:BE:EF:03 Committed
-
-       The next example reads back the module written in the first example and saves it in file zyx.bin.
-
-          # int6kmod -m xyz.bin -t 0x1000
-          eth1 00:B0:52:00:00:01 Read zyx.bin
-          eth1 00:B0:52:BE:EF:03 Read
-
-SEE ALSO
-       plc(1), int6kmdio(1), int6kmdio2(1), mdioblock(1), mdioblock2(1), mdiodump(1), mdiogen(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                 int6kmod(1)
-
- - - diff --git a/docbook/int6kmod.c.html b/docbook/int6kmod.c.html deleted file mode 100644 index 2cb19d55..00000000 --- a/docbook/int6kmod.c.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - int6kmod.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *
- *    int6kmod.c -
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Devices.c"
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Request.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/ModuleCommit.c"
-#include "../plc/ModuleRead.c"
-#include "../plc/ModuleDump.c"
-#include "../plc/ModuleSpec.c"
-#include "../plc/ModuleSession.c"
-#include "../plc/ModuleWrite.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/basespec.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexview.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/strfbits.c"
-#include "../tools/synonym.c"
-#include "../tools/typename.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *
- *   void Manager (struct plc * plc, uint16_t ModuleID, uint16_t ModuleSubID);
- *
- *   read a custom modul from flash memory or write a suceom module
- *   to flash memory using the VS_MODULE_OPERATION message; read and
- *   save the old module before writing and commiting the new module;
- *
- *   ModuleDump () and ModuleRead () are called with argument source
- *   set to VS_MODULE_FLASH because this function operates on modules
- *   in flash memory only;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void Manager (struct plc * plc, uint16_t ModuleID, uint16_t ModuleSubID)
-
-{
-	if (_anyset (plc->flags, PLC_DUMP_MODULE))
-	{
-		ModuleDump (plc, PLC_MOD_OP_READ_FLASH, ModuleID, ModuleSubID);
-		return;
-	}
-	if (_anyset (plc->flags, PLC_READ_MODULE))
-	{
-		ModuleRead (plc, &plc->nvm, PLC_MOD_OP_READ_FLASH, ModuleID, ModuleSubID);
-	}
-	if (_anyset (plc->flags, PLC_WRITE_MODULE))
-	{
-		struct vs_module_spec vs_module_spec;
-		vs_module_spec.MODULE_ID = ModuleID;
-		vs_module_spec.MODULE_SUB_ID = ModuleSubID;
-		ModuleSpec (&plc->NVM, &vs_module_spec);
-		ModuleSession (plc, 1, &vs_module_spec);
-		ModuleWrite (plc, &plc->NVM, 0, &vs_module_spec);
-		ModuleCommit (plc, (PLC_COMMIT_FORCE));
-		return;
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"dei:m:M:qs:S:t:vx",
-		"device [device] [...]",
-		"Qualcomm Atheros Powerline Device Module Manager",
-		"d\tdump module in hexadecimal format",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"m f\tread module from NVRAM to file (f)",
-		"M f\twrite module file (f) to flash memory",
-		"s n\tmodule sub-ID [" LITERAL (PLC_SUBMODULEID) "]",
-		"S n\tsession ID [" LITERAL (PLCSESSION) "]",
-		"t n\tmodule ID [" LITERAL (PLC_MODULEID) "]",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	struct vs_module_spec vs_module_spec;
-	uint16_t ModuleID = 0;
-	uint16_t ModuleSubID = 0;
-	signed c;
-	memset (&vs_module_spec, 0, sizeof (vs_module_spec));
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'C':
-			_setbits (plc.flags, PLC_COMMIT_MODULE);
-			break;
-		case 'd':
-			if (_anyset (plc.flags, PLC_READ_MODULE))
-			{
-				error (1, EINVAL, "Options -d and -m are mutually exclusive");
-			}
-			_setbits (plc.flags, PLC_DUMP_MODULE);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'M':
-			_setbits (plc.flags, PLC_WRITE_MODULE);
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", plc.NVM.name);
-			}
-			if (ModuleSpec (&plc.NVM, &vs_module_spec) == -1)
-			{
-				error (1, errno, "%s", optarg);
-			}
-			break;
-		case 'm':
-			if (_anyset (plc.flags, PLC_DUMP_MODULE))
-			{
-				error (1, EINVAL, "Options -d and -m are mutually exclusive");
-			}
-			_setbits (plc.flags, PLC_READ_MODULE);
-			if (!checkfilename (optarg))
-			{
-				error (1, EINVAL, "%s", optarg);
-			}
-			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", plc.nvm.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			break;
-		case 't':
-			ModuleID = (uint16_t)(basespec (optarg, 16, sizeof (ModuleID)));
-			break;
-		case 's':
-			ModuleSubID = (uint16_t)(basespec (optarg, 16, sizeof (ModuleSubID)));
-			break;
-		case 'S':
-			plc.cookie = (uint32_t)(basespec (optarg, 16, sizeof (plc.cookie)));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc != 1)
-	{
-		if (plc.nvm.file != -1)
-		{
-			error (1, ECANCELED, PLC_NODEVICE);
-		}
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		Manager (&plc, ModuleID, ModuleSubID);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		Manager (&plc, ModuleID, ModuleSubID);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6krate.1.html b/docbook/int6krate.1.html deleted file mode 100644 index ec9a6562..00000000 --- a/docbook/int6krate.1.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - int6krate.1 - - - - - - - - - -
-int6krate(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6krate(1)
-
-NAME
-       int6krate - Qualcomm Atheros INT6x00 PHY Rate Monitor
-
-SYNOPSIS
-       int6krate [options] [device] [device] [...]
-
-DESCRIPTION
-       The  Atheros  PHY  Rate Utility polls one or more devices and prints the average transmit and receive PHY rates between a
-       device and each neighboring network device.  Output is column-oriented and suitable for loading  into  a  spreadsheet  or
-       being read by a simple program.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -c     Display coded PHY rates.  Coded PHY rates are displayed by default so this option is redundant  but  it  has  been
-              kept for backword compatibility.  This option and option -u are mutually exclusive.
-
-       -d seconds
-              Traffic  duration in seconds per connection.  Directional traffic is systematically sent between each pair of pow‐
-              erline network devices for this period of time.  Consequently, the total time needed to generate  traffic  between
-              all network devices will be approximately n! times this value, so don''t get carried away.  The minimum value is 1
-              second and the maximum value is 60 seconds.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -n     Reads the average transmit and receive PHY rate for wach device using VS_NW_INFO and prints it  on  stdout.   Each
-              output  line  displays  the  ethernet  interface,  source  address, destination address and either the transmit or
-              receive PHY rate.
-
-       -o milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is shown in brackets on the program menu.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -r     Reads device hardware and software revision information using VS_SW_VER and prints it on stdout.
-
-       -R     Resets the device using VS_RS_DEV.
-
-       -t     Generate  powerline traffic between the local device and each remote device on each powerline network connected to
-              the host.  It does not generate any traffic between remote powerline device pairs.  This option is especially use‐
-              ful  when  remote  powerline  devices are not connected to Ethernet devices capable of sending traffic back to the
-              host.
-
-       -T     Generate powerline traffic between all devices on each powerline network connected to the host.   This  option  is
-              similar  to  option  -t  but it takes much longer because traffic is systematically generated between each pair of
-              powerline devices.  Consequently, the time to complete will increase factorially as the number of network  devices
-              increases.  Such complete traffic path coverage is not always needed.
-
-       -u     Display  un-coded  PHY  rates.   Coded PHY rates are displayed by default.  This option and option -c are mutually
-              exclusive.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -x     Exit program on first error with a non-zero exit code.  This option allows  shell  scripts  to  detect  failed  or
-              incomplete operations and take the appropriate action.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
-              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
-              information about symbolic device addresses.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
-              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The  following  example  displays  the  average  transmit and receive PHY rates from each of two devices.  One is a local
-       device connected to interface eth2 and the other is a remote device at the far end of the powerline.  In this case,  they
-       are the only two devices on the powerline network.  Observe the recipricol rates shown.
-
-          # int6krate -ni eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB TX 163 mbps
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB RX 176 mbps
-          eth2 00:B0:52:00:00:BB 00:B0:52:00:00:AA TX 176 mbps
-          eth2 00:B0:52:00:00:BB 00:B0:52:00:00:AA RX 163 mbps
-
-       The  following  example  generates powerline traffic between the local device and each remote device because option -t is
-       present.  It then displays the PHY rate read from the local device.
-
-          # int6krate -tni eth2
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB TX 163 mbps
-          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB RX 176 mbps
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-SEE ALSO
-       plc(1), int6krule(1), int6kstat(1), int6ktone(1)
-
-CREDITS
-        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6krate(1)
-
- - - diff --git a/docbook/int6krate.c.html b/docbook/int6krate.c.html deleted file mode 100644 index 1273adf8..00000000 --- a/docbook/int6krate.c.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - int6krate.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6krate.c - Atheros INT6x00 PHY Rate monitor
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Devices.c"
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/Antiphon.c"
-#include "../plc/LocalDevices.c"
-#include "../plc/ResetDevice.c"
-#include "../plc/VersionInfo1.c"
-#include "../plc/StationRole.c"
-#include "../plc/PhyRates1.c"
-#include "../plc/Traffic1.c"
-#include "../plc/Transmit.c"
-#include "../plc/NetworkTraffic1.c"
-#include "../plc/WaitForStart.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/checksum32.c"
-#include "../tools/error.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/hexstring.c"
-#include "../tools/synonym.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define INT6KRATE_WAIT 0
-#define INT6KRATE_LOOP 1
-
-/*====================================================================*
- *
- *   void manager (struct plc * plc, signed count, signed pause);
- *
- *   perform operations in logical order despite any order specfied
- *   on the command line; for example, read PIB before writing PIB;
- *
- *   operation order is controlled by the order of "if" statements
- *   shown here; the entire operation sequence can be repeated with
- *   an optional pause between each iteration;
- *
- *
- *--------------------------------------------------------------------*/
-
-void manager (struct plc * plc, signed count, signed pause)
-
-{
-	while (count--)
-	{
-		if (_anyset (plc->flags, PLC_VERSION))
-		{
-			VersionInfo1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_LOCAL_TRAFFIC))
-		{
-			Traffic1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK_TRAFFIC))
-		{
-			NetworkTraffic1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK))
-		{
-			PhyRates1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_RESET_DEVICE))
-		{
-			ResetDevice (plc);
-		}
-		sleep (pause);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"cd:ei:l:o:nqrRtTuvw:x",
-		"device [device] [...]",
-		"Qualcomm Atheros INT6x00 PHY Rate Monitor",
-		"c\tdisplay coded PHY rates",
-		"d n\ttraffic duration is (n) seconds per leg [" LITERAL (PLC_ECHOTIME) "]",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"l n\tloop (n) times [" LITERAL (INT6KRATE_LOOP) "]",
-		"n\tnetwork TX/RX information",
-		"o n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"q\tquiet mode",
-		"r\trequest device information",
-		"R\treset device with VS_RS_DEV",
-		"t\tgenerate network traffic (one-to-many)",
-		"T\tgenerate network traffic (many-to-many)",
-		"u\tdisplay uncoded PHY rates",
-		"v\tverbose mode",
-		"w n\twait (n) seconds [" LITERAL (INT6KRATE_WAIT) "]",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed loop = INT6KRATE_LOOP;
-	signed wait = INT6KRATE_WAIT;
-	signed c;
-	optind = 1;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	plc.timer = PLC_ECHOTIME;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'c':
-			_clrbits (plc.flags, PLC_UNCODED_RATES);
-			break;
-		case 'd':
-			plc.timer = (unsigned)(uintspec (optarg, 1, 60));
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'l':
-			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'n':
-			_setbits (plc.flags, PLC_NETWORK);
-			break;
-		case 'o':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'q':
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_VERSION);
-			break;
-		case 'R':
-			_setbits (plc.flags, PLC_RESET_DEVICE);
-			break;
-		case 't':
-			_setbits (plc.flags, PLC_LOCAL_TRAFFIC);
-			break;
-		case 'T':
-			_setbits (plc.flags, PLC_NETWORK_TRAFFIC);
-			break;
-		case 'u':
-			_setbits (plc.flags, PLC_UNCODED_RATES);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'w':
-			wait = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (_allclr (plc.flags, (PLC_VERSION | PLC_LOCAL_TRAFFIC | PLC_NETWORK_TRAFFIC | PLC_RESET_DEVICE)))
-	{
-		_setbits (plc.flags, PLC_NETWORK);
-	}
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		manager (&plc, loop, wait);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		manager (&plc, loop, wait);
-		argv++;
-		argc--;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6krule.1.html b/docbook/int6krule.1.html deleted file mode 100644 index 039b7ca4..00000000 --- a/docbook/int6krule.1.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - int6krule.1 - - - - - - - - - -
-int6krule(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6krule(1)
-
-NAME
-       int6krule - Stream Classification Utility
-
-SYNOPSIS
-       int6krule [options] action operand condition [condition] [condition] control volatility [device] [device] [...]
-
-       where condition is a field operator value sequence.
-
-DESCRIPTION
-       Format  and  send  stream  classification rules to one or more devices.  Rules specify an action to be taken when a frame
-       satisfies selection criteria.  Selection criteria consists of one, two or three conditions where any  or  all  conditions
-       must  be satisfied.  Each condition consists of a field type, a relational operator and a value.  Rules may be added to a
-       device, or removed from a device, so that they have permanent or temporary effect.
-
-       Classification rules are cumulative.  If a new rule set is identical to an old rule set then an error will  occur  unless
-       it  contains a different Transmission Action.  In that case the old rule will be replaced.  Identical classification rule
-       sets are permitted if one of the sets is associated with a VLAN tag action.  Classification  is  based  on  the  original
-       frame before is is altered by VLAN Tag insertion or removal.
-
-       Classification  is  multi-dimensional  and  the  terminology  used here may seem strange at first.  Refer to the Qualcomm
-       Atheros Firmware Techncial Reference Manual description of the VS_CLASSIFICATION management message for a  full  explana‐
-       tion.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -r     Read rules from a device and display them on stdout.
-
-       -q     Suppresses status messages on stderr.
-
-       -s     Print a list of program keywords on stdout.  This option over-rides all others, except -? and -!, and the  program
-              will terminate without further action.
-
-       -t milliseconds
-              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
-              response.  The default is shown in brackets on the program menu.  -T tag The VLAN tag to be inserted  into  frames
-              before  they  are transmitted.  The tag is a 32-bit hexadecimal integer with optional "0x" prefix.  This option is
-              required for action TagTX and must be omitted for all other actions.
-
-       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
-              be saved as text files for reference.
-
-       -V version
-              The  CSPEC  version  number  expressed  as a small decimal integer.  This option is required (and should be 2) for
-              action TagTX and must be omitted for all other actions.
-
-       -?,--help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       action The action to be taken for frames that meet any (or  all)  selection  criteria.   Valid  actions  are  listed  and
-              described under ACTIONS.
-
-       operand
-              The  operand  specifies the logical relationship between conditions before the action to be taken.  Valid operands
-              are listed and described under OPERANDS.
-
-       condition
-              A conditional expression consisting of a field, operator and value.  See CONDITIONS for more information.
-
-       control
-              The control specifies the action to be taken by the device upon receipt of the rule.  The basic actions are to add
-              it to, or remove it from, the list of existing rules.  Valid controls are listed and described under CONTROLS.
-
-       volatility
-              The  volatility  specifies  the  effective lifetime of the rule.  Temoprary rules are stored in SDRAM and are lost
-              then the device is reset.  Permanent rules are stored in NVRAM and are restored after the device is reset.   Valid
-              volatilities are listed and described under VOLATILITY.
-
-       device The  MAC  address  of some powerline device.  More than one address may be specified on the command line.  If more
-              than one address is specified then operations are performed on each  device  in  turn.   The  default  address  is
-              "local".  See DEVICES for more information.
-
-ACTIONS
-       Actions  indcate  the  disposition  of frames that match selection criteria.  They are expressed as discrete alphanumeric
-       strings entered in upper, lower or mixed character case.  They are position sensitive.  Failure to enter a  known  action
-       will results in an error message that lists permitted actions.
-
-       CAP0,CAP1,CAP2,CAP3
-              Assign a specific Channel Access Priority to frames.
-
-       Drop,DropTX
-              Do not forward frames over powerline.
-
-       DropRX Do not forward frames to host.
-
-       Boost  Boost frame priority to CAP3 for MMEs only.  At least one condition must be "MME".
-
-       StripTX
-              Remove  the  VLAN Tag from frames before transmission over powerline.  This option checks for a VLAN Tag even when
-              there are no VLAN related conditions.
-
-       StripRX
-              Remove the VLAN Tag from frames before forwarding to host.  This option checks for a VLAN Tag even when there  are
-              no VLAN related conditions.
-
-       TagTX  Insert a given VLAN Tag into frames before transmission over powerline.  This action requires option -T to specify
-              the tag and option -V to specify the CSPEC version.
-
-OPERANDS
-       The operand indicates the logical relationship that must exist between conditions in the rule set before  the  action  is
-       applied  to  a frame.  Operands are expressed as discrete alphanumeric strings entered in upper, lower or mixed character
-       case.  Failure to enter a known operand will result in an error message that lists permitted operands.  They are  positon
-       sensitive.  One operand is allowed and it must appear after the action and before any condition.
-
-       Any    Apply the action to frames that satisfy any of the conditions.  This is equivalent to the logical or operation.
-
-       All    Apply the action to frames that satisfy all of the conditions.  This is equivalent to the logical and operation.
-
-       Always Apply the action to all frames.  All conditions are ignored.
-
-CONDITIONS
-       A  condition consists of a field, an operator and a value.  One condition is required but three are permitted.  Condition
-       order is not important but all conditions must appear after the operand and before the control.
-
-       field  The field is the part of the Ethernet frame to be examined.  Some fields are not valid for some actions  but  this
-              program  does not enforce such rules since validation is performed by runtime firmware on each device.  Recognized
-              fields are listed and described under FIELDS.
-
-       operator
-              The operator specifies the relationsip that must exist between the field and value in order for the  condition  to
-              evaluate  True.  Currently, only equality operators are supported.  Valid operators are listed and described under
-              OPERATORS.
-
-       value  The value must be appropriate to the field type.  Some fields are MAC or IP addresses, some are integers, some are
-              bitmaps  and  others  are states.  Integers and bitmaps may be expressed in binary, decimal or hexadecimal format.
-              Binary values staRt with 0b.  Hexadecimal values start with 0x.  States are expressed using keywords.   Users  are
-              responsible  for  knowing  how many bits are significant for each type of value.  Valid values are described along
-              with fields under FIELDS.
-
-FIELDS
-       Fields indicate the portion of the frame that is inspected during selection and the size and format of the value permited
-       in the condition statement.  They are expressed as discrete alphanumeric strings entered in upper, lower or mixed charac‐
-       ter case.  Failure to enter a known field will result in an error message that lists permitted fields.
-
-       ET     A 16-bit Ethertype expressed in hexadecimal with optional "0x" prefix.  The format is described in  IEEE  Standard
-              802-2001 [4].
-
-       EthDA  A  48-bit Ethernet destination address expressed in hexadecimal.  Octets may be separated with optional colons for
-              clarity.  The format is described in IEEE Standard 802-2001 [4].
-
-       EthSA  A 48-bit Ethernet source address expressed in hexadecimal.  Octets may be separated with optional colons for clar‐
-              ity.  The format is described in IEEE Standard 802-2001 [4].
-
-       IPSP   A  16-bit  IP  source  port  expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
-              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
-
-       IPDP   A 16-bit IP destination port expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
-              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
-
-       IPV4TOS
-              An 8-bit Type-of-Service code where the format is defined in the RFC 791 (Internet Protocol) [14].
-
-       IPV4PROT
-              An 8-bit Ethernet protocol code.  The format is defined in the RFC 791 (Internet Protocol) [14].
-
-       IPV4SA A 32-bit Internet Protocol source address expressed in dotted-decimal notation.  The official format is defined in
-              RFC 791 (Internet Protocol) [14].  Our implementation permits empty octets and leading zeros within  fields.   For
-              example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
-
-       IPV4DA A  32-bit  Internet  Protocol  destination  address  expressed  in dotted-decimal notation. The official format is
-              defined in RFC 791 (internet Protocol) [14]. Our implementation permits empty  octets  and  leading  zeros  within
-              fields. For example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
-
-       IPV6TC An 8-bit Internet Protocol V6 traffic class expressed as defined in RFC 2460 (Internet Protocol Version 6) [17].
-
-       IPV6FL A  24-bit  IPV6  flow label where the lower 20 bits are the IPv6 Flow Label defined in RFC 2460 (Internat Protocol
-              Version 6) [17].  The upper 4 bits should be zero.  The value can be entered either as a decimal,  binary  or  hex
-              integer.
-
-       IPV6SA A  128-bit IPV6 source address expressed as colon-separated hexadecmial quartets (octet pairs).  The official for‐
-              mat is defined in RFC 2460 (Internet Protocol Version 6) [17].  Our implementation permits multiple empty  fields,
-              abreviated  fields  and  leading zeros within fields.  When multiple empty fields appear, the right-most occurance
-              expands     to     multiple     zeros.      For     example,     "AAAA::BBBB::CCCC"     is      equivalent      to
-              "AAAA:0000:BBBB:0000:0000:0000:0000:CCCC".
-
-       IPV6DA A  128-bit IPV6 destination address expressed as colon-separated hexadecimal quartets (octet pairs).  The official
-              format is defined in RFC 2460 (Internet Protocol Version 6)  [17].   Our  implementation  permits  multiple  empty
-              fields,  abbreviated  fields  and  leading zeros within fields.  When multiple empty fields appear, the right-most
-              occurance expands to zeros.  For example, ":1::2" is equivalent to "0000:0001:0000:0000:0000:0000:0000:0002".
-
-       MME    A 24-bit Atheros HomePlugAV Management Message type expressed as a hex byte stream.  For clarity,  the  recommeded
-              format  it  "xx:xxxx".   The  first  byte is the MMV.  The next two bytes are the MMTYPE.  Both are defined in the
-              HomePlug AV Specification.  The MMTYPE will match all  MME  variants,  such  as  Request,  Confirm,  Indicate  and
-              Response because the lower two bits are ignored.  This field is only valid for action "Boost".
-
-       TCPAck The  string  "True"  or "False" to indicate that the frame is (or is not) a TCP Acknowledgement.  Double negatives
-              are allowed so "Is True" is equvalent to "Not False" and "Is False" is equivalent to "Not True".
-
-       TCPSP  A 16-bit TCP source port as a decimal integer.  The format is defined in RFC 793  (Transmission  Control  Protocol
-              [15]).
-
-       TCPDP  A 16-bit TCP destination port expressed as a decimal integer.  The format is defined in RFC 793 (Transmission Con‐
-              trol Protocol [15]).
-
-       UDPSP  A 16-bit UDP source port expressed as a decimal integer.  The format is defined in RFC 768 (User Datagram Protocol
-              [13]).
-
-       UDPDP  A  16-bit  UDP  destination  port expressed as a decimal integer.  The format is defined in RFC 768 (User Datagram
-              Protocol [13]).
-
-       VLANID A 16-bit VLAN identifier where the lower 12 bits are the VLAN Identifier (VID) defined  in  IEEE  Std  802.1Q-1998
-              (Virtual Bridged Local Area Networks) [11].  The upper 4 bits should be zero.
-
-       VLANUP An  8-bit  Ethernet  VLAN tag where the lower 3 bits are the User Priority sub-field of a VLAN Tag defined in IEEE
-              Std 802.1Q-1998 (Virtual Bridged Local Area Networks) [11].  The upper 5 bits should be zero.
-
-       VLANTag
-              The string "Present" or "Missing" to indicate the presence (or absence) of one or more VLAN Tags within  a  frame.
-              This  classifier  is  essentially  equivalent  to "ET Is 0x8100".  Double negatives are allowed so "Is Present" is
-              equivalent to "Not Missing" and "Is Missing" is equivalent to "Not Present".
-
-OPERATORS
-       An operator indicates an equality between a field and a value.  An operator is an alphanumeric string entered  in  upper,
-       lower  or  mixed  character case.  Failure to enter a known operator will result in an error message that lists permitted
-       operators.  Operators are position sensitive and must appear between each field and value.
-
-       Is     Indicates that the frame field must equal the associated value for the condition to evaluate true.
-
-       Not    Indicates that the frame field must not equal the associated value for the condition to evaluate true.
-
-STATES
-       A state is a special case of value.
-
-       True,On,Yes,Present
-              Indicates a positive state or presence of some entity.  All are equivalent and can be used interchangeably.   Dou‐
-              ble negatives are permitted so "Is True" is equvalent to "Not False".
-
-       False,Off,No,Missing
-              Indicates a negative state or absence of some entity.  All are equivalent and can be used interchangeably.  Double
-              negatives are permitted so "Is False" is equvalent to "Not True".
-
-CONTROLS
-       The control determines how the devices will handle the rule after it  is  validated.   It  is  expressed  as  a  discrete
-       alphanumeric  string entered in upper, lower or mixed character case.  Failure to enter a known control will result in an
-       error message that lists permitted controls.  The control is position sensitive and must occur after condition and before
-       volatility.
-
-       Add    Adds the rule to the current list of rules unless a violation occurs.  In some cases, a rule may replace an exist‐
-              ing rule instead of being added.
-
-       Rem,Remove
-              Remove the rule from the current list of rules unless a violation occurs.
-
-VOLATILITY
-       The volatility determines which device rule set will be affected by the action.  It is expressed as a  discrete  alphanu‐
-       meric  string  entered  in  upper,  lower or mixed character case.  Failure to enter a known volatility will result in an
-       error message that lists permitted volatilities.  The volatility is position sensitive and must occur after control.
-
-       Temp   The temporary rule set will be modified.  The temporary rule set resides in the working PIB stored in SDRAM.
-
-       Perm   The permanent rule set will be modified.  The permanent rule set resides in the user PIB stored in NVRAM.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
-              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
-              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
-       USA.  Consequently, public information is not available.  Qualcomm Atheros reserves the right to modify message structure
-       or content in future firmware releases without any obligation to notify or compensate users of this program.
-
-EXAMPLES
-       This command adds a temporary classification rule to the classification table on  device  B00:B0:52:BA:BE:01.   The  rule
-       instructs  the device to drop frames that match either (any) of two conditions.  The first condition states that the IPv4
-       source address is 192.168.99.2.  The second conditon states that the IPv4 destination address is 192.168.99.100.
-
-          # int6krule drop any IPv4SA is 192.168.99.2 IPv4DA is 192.168.99.100 add temp 00:B0:52:BA:BE:01
-
-       Observe that the action, operand and conditions come first then the control and volatility then the affected devices.  Up
-       to three conditions may be specified.  Keyword order is important.  Character case is not important.
-
-       The  following  example  prints  a  list of programmed keywords on stdout for reference.  The example shown here has been
-       abbreviate due to formatting limitations.
-
-          # int6krule -s
-
-            Controls are 'Add'|'Rem'|'Remove'
-            Volatilities are 'Temp'|'Perm'
-            Actions are 'CAP0'|'CAP1'|'CAP2'|'CAP3'|'Boost'|...|'StripTX'|'StripRX'|'TagRX'
-            Operands are 'All'|'Any'|'Always'
-            Fields are 'EthDA'|'EthSA'|'VLANUP'|'VLANID'|'IPv4TOS'|...|'TCPAck'|'VLANTag'
-            Operators are 'Is'|'Not'
-
-       More example follow:
-
-       Ethernet Address Rules
-
-       Ethernet address rules have the following general format:
-
-          | CAP0 | ANY | EthSA | IS  | xx:xx:xx:xx:xx:xx | ADD    | TEMP | xx:xx:xx:xx:xx:xx
-          | CAP1 | ALL | EthDA | NOT |                   | REMOVE | PERM |
-          | CAP2 |
-          | CAP3 |
-          | DROP |
-
-       For example, instruct device 00:B0:52:BA:BE:FF to temporarily add a rule to  forward  frames  from  00:2B:FE:CA:FE:BA  at
-       CAP3.  Observe Ethernet hardware addresses are used both in the condition and for the affected powerline devices.
-
-          # int6krule cap3 any ethsa is 00:2b:fe:ca:fe:ba add temp 00:b0;52:ba:be:ff
-
-       IP Address Rules
-
-       IP address rules have the following general format:
-
-          | CAP0 | ANY | IPv4SA | IS  | ddd.ddd.ddd.ddd | ADD    | TEMP | xx:xx:xx:xx:xx:xx
-          | CAP1 | ALL | IPv4DA | NOT |                 | REMOVE | PERM |
-          | CAP2 |
-          | CAP3 |
-          | DROP |
-
-       For  example,  instruct  device  00:B0:52:BA:BE:FF  to  permanently remove the rule that drops packets from 192.168.99.1.
-       Notice that the IP address is specified in dotted decimal format but the device address is specified in hexadecimal octet
-       format.   Dotted decimal format permits empty and variable length octets but octet delimiters are mandatory.  Hexadecimal
-       octet format requires fixed length octets but octet delimiters are optional.
-
-          # int6krule drop any ipv4sa is 192.168.99.1 remove perm 00:b0:52:ba:be:ff
-
-       IP Protocol Rules
-
-       IP protocol rules have the following general format:
-
-          | CAP0 | ANY | IPv4PROT | IS  | xxxx | ADD    | TEMP | xx:xx:xx:xx:xx:xx
-          | CAP1 | ALL |          | NOT |      | REMOVE | PERM |
-          | CAP2 |
-          | CAP3 |
-          | DROP |
-
-       For example, to instruct device 00:B0:52:BA:BE:FF to permanently add a rule to forward non-IP packets at CAP2.   In  this
-       example, delmiters have been omitted from the device Ethernet address.
-
-          # int6krule CAP2 all ipv4prot not 0x0800 add perm 00b052babeff
-
-SEE ALSO
-       plc(1), int6krate(1), int6kstat(1), int6ktone(7)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6krule(1)
-
- - - diff --git a/docbook/int6krule.c.html b/docbook/int6krule.c.html deleted file mode 100644 index 58518fcf..00000000 --- a/docbook/int6krule.c.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - - - int6krule.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6krule.c - Qualcomm Atheros Message MakeRule Utility;
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-#include "../plc/rules.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/basespec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/bytespec.c"
-#include "../tools/ipv4spec.c"
-#include "../tools/ipv6spec.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#include "../tools/synonym.c"
-#include "../tools/assist.c"
-#include "../tools/lookup.c"
-#include "../tools/codelist.c"
-#include "../tools/memout.c"
-#include "../tools/reword.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#include "../plc/rules.c"
-#include "../plc/ParseRule.c"
-#include "../plc/PrintRule.c"
-#include "../plc/MakeRule.c"
-#include "../plc/ReadRules.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/channel.c"
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define INT6KRULE_CSPEC_VERSION 0
-#define INT6KRULE_VLAN_TAG 0x00000000
-#define COMMA ","
-#define QUOTE "''"
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ei:qrst:T:vV:",
-		"action operand condition [...] control volatility [device] [...]\n\n          where a condition is: field operator value",
-		"Qualcomm Atheros Stream MakeRule Utility",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"r\tread rules from device",
-		"s\tdisplay symbol tables",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"T x\tinserted vlan tag is x [" LITERAL (INT6KRULE_VLAN_TAG) "]",
-		"v\tverbose mode",
-		"V n\tcspec version is n [" LITERAL (INT6KRULE_CSPEC_VERSION) "]",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	struct cspec cspec;
-	struct MMERule rule;
-	signed c;
-	memset (& rule, 0, sizeof (rule));
-	memset (& cspec, 0, sizeof (cspec));
-	cspec.VLAN_TAG = INT6KRULE_VLAN_TAG;
-	cspec.CSPEC_VERSION = INT6KRULE_CSPEC_VERSION;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_ANALYSE);
-			break;
-		case 's':
-			printf ("\n");
-			printf (" Controls are ");
-			codelist (controls, SIZEOF (controls), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Volatilities are ");
-			codelist (volatilities, SIZEOF (volatilities), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Actions are ");
-			codelist (actions, SIZEOF (actions), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Operands are ");
-			codelist (operands, SIZEOF (operands), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Fields are ");
-			codelist (fields, SIZEOF (fields), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" Operators are ");
-			codelist (operators, SIZEOF (operators), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf (" States are ");
-			codelist (states, SIZEOF (states), COMMA, QUOTE, stdout);
-			printf (".\n");
-			printf ("\n");
-			return (0);
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'T':
-			cspec.VLAN_TAG = (uint32_t)(basespec (optarg, 16, sizeof (cspec.VLAN_TAG)));
-			cspec.VLAN_TAG = htonl (cspec.VLAN_TAG);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'V':
-			cspec.CSPEC_VERSION = (uint16_t)(basespec (optarg, 10, sizeof (cspec.CSPEC_VERSION)));
-			cspec.CSPEC_VERSION = HTOLE16 (cspec.CSPEC_VERSION);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (_allclr (plc.flags, PLC_ANALYSE))
-	{
-		if (ParseRule (& argc, & argv, & rule, & cspec) == -1)
-		{
-			error (1, 0, "invalid rule");
-		}
-	}
-	openchannel (& channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		if (_anyset (plc.flags, PLC_ANALYSE))
-		{
-			ReadRules (& plc);
-		}
-		else
-		{
-			MakeRule (& plc, & rule);
-		}
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		if (_anyset (plc.flags, PLC_ANALYSE))
-		{
-			ReadRules (& plc);
-		}
-		else
-		{
-			MakeRule (& plc, & rule);
-		}
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (& channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6kstat.1.html b/docbook/int6kstat.1.html deleted file mode 100644 index 0023d0b2..00000000 --- a/docbook/int6kstat.1.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - int6kstat.1 - - - - - - - - - -
-int6kstat(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6kstat(1)
-
-NAME
-       int6kstat - Qualcomm Atheros INT6x00 Link Statistics
-
-SYNOPSIS
-       int6kstat [options] [device] [device] [...]
-
-DESCRIPTION
-       The  Atheros  Device Statistics Utility polls a device and prints network and link statistics in various formats suitable
-       for use by other programs.  This is a work in progress so usr feedback is encouraged.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
-       instructions.
-
-OPTIONS
-       -C     Clear  device link statistics using VS_LNK_STATS.  Statistics are read and cleared then displayed.  The statistics
-              that are read and displayed depend on options -d, -p and -s but all link statistics are cleared.
-
-       -d direction
-              Return statistics for the specified direction using VS_LNK_STATS.  Direction can be 0=tx, 1=rx,  2=both  or  "rx",
-              "tx" or "both".
-
-       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i     Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
-              interface.  This option then takes precedence over either default.
-
-       -l count
-              Define the number of times that the command will be repeated for each device specified.  Normally, you will repeat
-              operations on one device only.
-
-       -m     Displays network membership information, as seen by one device, using VS_NW_INFO.  Use option -t for complete net‐
-              work topology seen by the local host.
-
-       -p peernode
-              Ethernet  hardware  address  of  the  peer  node for VS_LNK_STATS.  This option is required for all Link ID values
-              except 0xFC.  The default is 00:00:00:00:00:00.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -s linkid
-              The Link ID for VS_LNK_STATS.  Link ID values range from 0 through 255 but not all  values  are  accepted  by  the
-              device  firmware.   Values may be expressed in decimal, binary prefixed with "0b" or hexadecimal prefixed by "0x".
-              Many valid values can be expressed by name.  Valid values are listed and explained under LINKID.  The default Link
-              ID is 0xFC.
-
-       -t     Display  network  topology  using VS_SW_VER and VS_NW_INFO messages.  This option is similar to option -m but pro‐
-              vides complete network topology plus device hardware and firmware version.  Topology is  always  relative  to  the
-              local  host,  or  local hosts if present.  Powerline devices that appear on the command line are not used for this
-              operation.  PHY rates displaye by this option may saturate at 255 mbps.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -w seconds
-              Defines the number of seconds to wait before repeating command line options.  This option  has  no  effect  unless
-              option -l is also specified with a non-zero value.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
-              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
-              information about symbolic device addresses.
-
-LINKID
-       0x00,CSMA-CAP0
-              Display  CSMA  statistics  for CAP0 traffic using a single peer node.  The peer node MAC address must be specified
-              using option -p.
-
-       0x01,CSMA-CAP1
-              Display CSMA statistics for CAP1 traffic using a single peer node.  The peer node MAC address  must  be  specified
-              using option -p.
-
-       0x02,CSMA-CAP2
-              Display  CSMA  statistics  for CAP2 traffic using a single peer node.  The peer node MAC address must be specified
-              using option -p.
-
-       0x03,CSMA-CAP3
-              Display CSMA statistics for CAP3 traffic using a single peer node.  The peer node MAC address  must  be  specified
-              using option -p.
-
-       0xF8,CSMA-PEER
-              Display  CSMA  statistics  for all traffic using a single  peer node.  The peer node MAC address must be specified
-              using option -p.
-
-       0xFC,CSMA-ALL
-              Display CSMA statistics for all traffic with all peer nodes.  A peer node MAC address is not needed  and  will  be
-              ignored if provided.  This value is the default for option -s.
-
-DEVICES
-       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
-       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
-       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
-
-       The following MAC addresses are special and may be entered by name instead of number.
-
-       all    Same as "broadcast".
-
-       broadcast
-              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
-              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
-              A foreign device is any device not manufactured by Atheros.
-
-       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
-              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
-              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-EXAMPLES
-       None.
-
-SEE ALSO
-       plc(1), int6krate(1), int6krule(1), int6ktone(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6kstat(1)
-
- - - diff --git a/docbook/int6kstat.c.html b/docbook/int6kstat.c.html deleted file mode 100644 index 7b97e871..00000000 --- a/docbook/int6kstat.c.html +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - int6kstat.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kstat.c - Atheros INT6x00 Link Statistics
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/LinkStatistics.c"
-#include "../plc/LocalDevices.c"
-#include "../plc/NetworkInformation1.c"
-#include "../plc/Topology1.c"
-#include "../plc/Devices.c"
-#include "../plc/chipset.c"
-#include "../plc/Platform.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/error.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/synonym.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#include "../mme/MMECode.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define INT6KSTAT_LOOP 1
-#define INT6KSTAT_WAIT 0
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-static const struct _term_ linkids [] =
-
-{
-	{
-		"CSMA-ALL",
-		"0xFC"
-	},
-	{
-		"CSMA-CAP0",
-		"0x00"
-	},
-	{
-		"CSMA-CAP1",
-		"0x01"
-	},
-	{
-		"CSMA-CAP2",
-		"0x02"
-	},
-	{
-		"CSMA-CAP3",
-		"0x03"
-	},
-	{
-		"CSMA-PEER",
-		"0xF8"
-	},
-};
-
-static const struct _term_ directions [] =
-
-{
-	{
-		"both",
-		"2"
-	},
-	{
-		"rx",
-		"1"
-	},
-	{
-		"tx",
-		"0"
-	}
-};
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define LINKIDS 	(sizeof (linkids) / sizeof (struct _term_))
-#define DIRECTIONS 	(sizeof (directions) / sizeof (struct _term_))
-
-/*====================================================================*
- *
- *   void manager (struct plc * plc);
- *
- *   perform operations in logical order despite any order specfied
- *   on the command line; for example read PIB before writing PIB;
- *
- *   operation order is controlled by the order of "if" statements
- *   shown here; the entire operation sequence can be repeated with
- *   an optional pause between each iteration;
- *
- *
- *--------------------------------------------------------------------*/
-
-void manager (struct plc * plc, signed count, signed pause)
-
-{
-	while (count--)
-	{
-		if (_anyset (plc->flags, PLC_ANALYSE))
-		{
-			Topology1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_NETWORK))
-		{
-			NetworkInformation1 (plc);
-		}
-		if (_anyset (plc->flags, PLC_LINK_STATS))
-		{
-			LinkStatistics (plc);
-		}
-		sleep (pause);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"Cd:ei:l:mp:qs:tvw:",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros INT6x00 Powerline Link Statistics",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"C\tclear statistics without reading using VS_LNK_STATS",
-		"d n\tdirection (0=tx, 1=rx, 2=both) for VS_LNK_STATS",
-		"e\tredirect stderr to stdout",
-		"l n\tloop n times [" LITERAL (INT6KSTAT_LOOP) "]",
-		"s n\tLink ID for VS_LNK_STATS",
-		"m\tprint network membership information using VS_NW_INFO",
-		"p x\tpeer node address for options -s",
-		"q\tquiet mode",
-		"t\tprint network topology using VS_NW_INFO with VS_SW_VER",
-		"v\tverbose mode",
-		"w n\twait n seconds [" LITERAL (INT6KSTAT_WAIT) "]",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed loop = INT6KSTAT_LOOP;
-	signed wait = INT6KSTAT_WAIT;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	plc.pushbutton = 0;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'C':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			plc.pushbutton = 1;
-			break;
-		case 'd':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			plc.module = (uint8_t)(uintspec (synonym (optarg, directions, DIRECTIONS), 0, UCHAR_MAX));
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'm':
-			_setbits (plc.flags, PLC_NETWORK);
-			break;
-		case 'p':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			if (!hexencode (plc.RDA, sizeof (plc.RDA), (char const *)(optarg)))
-			{
-				error (1, errno, PLC_BAD_MAC, optarg);
-			}
-			break;
-		case 'l':
-			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_LINK_STATS);
-			plc.action = (uint8_t)(uintspec (synonym (optarg, linkids, LINKIDS), 0, UCHAR_MAX));
-			break;
-		case 't':
-			_setbits (plc.flags, PLC_ANALYSE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'w':
-			wait = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		manager (&plc, loop, wait);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		manager (&plc, loop, wait);
-		argc--;
-		argv++;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6ktest.1.html b/docbook/int6ktest.1.html deleted file mode 100644 index 8704a515..00000000 --- a/docbook/int6ktest.1.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - int6ktest.1 - - - - - - - - - -
-int6ktest(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6ktest(1)
-
-NAME
-       int6ktest - Qualcomm Atheros Test Applet Loader
-
-SYNOPSIS
-       int6ktest [options] [file] [file] [...]
-
-DESCRIPTION
-       Download  and  execute  one or more test applets on the local powerline device.  An applet is a small firmware image that
-       can be started by the bootloader and that returns to the bootloader when done.
-
-       An Atheros image file can contain one or more firmware images.  Each image is preceded by a  header  that  specifies  the
-       image  size, load address and start address.  int6ktest sequentially dowloads and executes each image found in each image
-       file specified as a command line argument.  It waits for each image to complete before it will download and  execute  the
-       next image.  The program terminates once all images in all image files have been executed or some image fails to complete
-       within 60 seconds.
-
-       Most applets return to the Bootloader on successful completion so that another applet can  be  downloaded  and  executed.
-       This  allows  applet  chains  to  be  executed  using one command.  A chain may consist of one image file containing many
-       applets or several image files containing one applet each or any combination.  The chain will break, after a timeout,  if
-       any applet in the chain fails to return to the Bootloader.
-
-       The  toolkit  contains  a  set  of useful applets in folder applets.  Most, if not all, are as single applet image files.
-       Program chknvm can be used to inspect image files and programs nvmmerge and nvmsplit can be used to assemble  and  disas‐
-       semble multi-applet image files.  This allows custom applet chains to be created and kept together in one file.  The num‐
-       ber and quality of available applets will probably increase with time.
-
-       Users should take the time to understand the applets they attempt to execute or confusion may result.  Each applet should
-       have  an associated man page to explain what it does and how it works.  Most applets execute and return to the bootloader
-       within seconds but some loop indefinitely or stop on failure.  Newer applets print test progress and outcomes on the con‐
-       sole but older applets merely flash device LEDs to indicate test progress and outcomes.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-COMMENTS
-       This program is an alternative to program amptest but is deprecated.  In the  future,  applet  designers  should  develop
-       applets for amptest instead of this program.
-
-OPTIONS
-       -c count
-              The  number  of times the program will poll the device before declaring an event failure.  The program will wait a
-              fixed period of time between each poll attempt.  Overall wait time is count/frequency where count can be  modified
-              using  option  -c.   Overall  wait  time is always approximate since operating system overhead and latency are not
-              taken into account.  The default count is 60.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -i interface
-              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -l     Sequentially execute and re-execute all applets in all files on the command line until the program  is  terminated
-              with ^C.
-
-       -p frequency
-              The  polling  frequency  expressed in polls-per-second.  For example, 1 means one poll per second and 10 means ten
-              polls per second.  Overall wait time is count/frequency where count may be modified using option -c.  Overall wait
-              time  is  always  approximate since operating system overhead and latency are not taken into account.  The default
-              frequency is 5.
-
-       -q     Suppresses normal progress and status messages.
-
-       -t milliseconds
-              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
-              response.  The default is shown in brackets on the program menu.
-
-       -v     Print additional information on stdout.  Specifically, this option prints incoming and outgoing frames in hexadec‐
-              imal format on stdout.  Output can be directed to a text file for analysis.
-
-       -x     Cause the program to exit on the first error instead of moving on to the next applet.  Error exits return  a  non-
-              zero value to the shell.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       file   The  name of an Atheros image file.  The image file may contain one or more images.  Each image will be downloaded
-              and executed in turn until all images are executed or an image fails to return the device to the Bootloader within
-              1 hour for some reason.
-
-EXAMPLES
-       The  following example sequentially downloads then executes each image in file abc.nvm in turn.  Each image must complete
-       and return to the bootloader before the next one downloads.  Observe that no device address  is  needed  because  Atheros
-       powerline devices all use address 00:b0:52:00:00:01 when in bootloader mode.
-
-          # int6ktest abc.nvm
-
-       The  following  example  will  sequentially  download and execute the images in each file abc.nvm, def.nvm and ghi.nvm in
-       turn.
-
-          # int6ktest abc.nvm def.nvm ghi.nvm
-
-DISCLAIMER
-       Atheros image file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public informa‐
-       tion  is  not  available.   Qualcomm  Atheros  reserves  the right to change file structure or content in future firmware
-       releases without any obligation to notify or compensate users of this program.  This  program  is  reserved  for  use  by
-       Atheros Field Engineers.  Use of this program may void some contractual obligations made by Atheros.
-
-SEE ALSO
-       chknvm(1), chknvm2(1), amptest(1), nvmsplit(1), nvmmerge(1), plctest(1), setnvm(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6ktest(1)
-
- - - diff --git a/docbook/int6ktest.c.html b/docbook/int6ktest.c.html deleted file mode 100644 index 6a3388fd..00000000 --- a/docbook/int6ktest.c.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - - int6ktest.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6ktest.c - Atheros Test Applet Loader;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *      Matthieu Poullet <m.poullet@avm.de>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-#include <errno.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../ether/channel.h"
-#include "../ram/nvram.h"
-#include "../ram/sdram.h"
-#include "../nvm/nvm.h"
-#include "../pib/pib.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/chipset.c"
-#include "../plc/Confirm.c"
-#include "../plc/Devices.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/WriteFirmware1.c"
-#include "../plc/StartFirmware1.c"
-#include "../plc/WaitForStart.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/checkfilename.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/hexdump.c"
-#include "../tools/checksum32.c"
-#include "../tools/fdchecksum32.c"
-#include "../tools/error.c"
-#include "../tools/strfbits.c"
-#include "../tools/typename.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../nvm/nvmfile1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *
- *   signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE);
- *
- *   plc.h
- *
- *   this is a custom version of ReadMME that intercepts VS_ARPC
- *   messages and print them on the console in human readable format;
- *
- *   this implementation was an early attempt the does not take full
- *   advantage of the VS_ARPC structure and so messages are printed
- *   in a format that is incompatible with the Windows Device Manager;
- *   program amptest corrects this problem by calling ARPCPrint;
- *
- *   this function is maintained for legacy purposes only and will be
- *   deleted at some point in the future;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	static qualcomm_hdr header_arpc =
-	{
-		0,
-		VS_ARPC | MMTYPE_IND,
-		{
-			0x00,
-			0xB0,
-			0x52
-		}
-	};
-	struct __packed vs_arpc_ind
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint16_t RDATALENGTH;
-		uint8_t RDATAOFFSET;
-		uint8_t RDATA [1];
-	}
-	* indicate = (struct vs_arpc_ind *)(plc->message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	while ((plc->packetsize = readpacket (channel, message, sizeof (* message))) > 0)
-	{
-
-#if 1
-
-/*
- *	Normally this block of code would be replaced by function FirmwareMessage () but due to an
- *	ARPC implmenetation error on early diagnostic applets we need to use this code instead;
- */
-
-		header_arpc.MMTYPE = HTOLE16 (header_arpc.MMTYPE);
-		if (!memcmp (&indicate->qualcomm, &header_arpc, sizeof (header_arpc)))
-		{
-			indicate->RDATA [indicate->RDATALENGTH - indicate->RDATAOFFSET] = (char)(0);
-			Display (plc, "0x%02X %s", indicate->RDATA [0], &indicate->RDATA [5]);
-			continue;
-		}
-
-#endif
-
-		if (UnwantedMessage (message, plc->packetsize, 0, MMTYPE))
-		{
-			continue;
-		}
-		break;
-	}
-	return (plc->packetsize);
-}
-
-/*====================================================================*
- *
- *   signed sequence (struct plc * plc);
- *
- *   plc.h
- *
- *   sequentially download and execute all modules found in a .nvm
- *   file regardless of module type; users must ensure that modules
- *   are executable or results may be unpredictable;
- *
- *   DO NOT USE THIS FUNCTION TO DOWNBOOT AND EXECUTE RUNTIME FIRMWARE;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-static signed sequence (struct plc * plc)
-
-{
-	struct nvm_header1 nvm_header;
-	unsigned module = 0;
-	do
-	{
-		if (read (plc->NVM.file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (0, errno, NVM_HDR_CANTREAD, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (0, 0, NVM_HDR_VERSION, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
-		{
-			if (_allclr (plc->flags, PLC_SILENCE))
-			{
-				error (0, 0, NVM_HDR_CHECKSUM, plc->NVM.name, module);
-			}
-			return (-1);
-		}
-		if (WriteFirmware1 (plc, module, &nvm_header))
-		{
-			return (-1);
-		}
-		if (StartFirmware1 (plc, module, &nvm_header))
-		{
-			return (-1);
-		}
-		if (_anyset (plc->flags, PLC_QUICK_FLASH))
-		{
-			break;
-		}
-		while (!ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND)));
-		module++;
-	}
-	while (nvm_header.NEXTHEADER);
-	return (0);
-}
-
-/*====================================================================*
- *
- *   void function (struct plc * plc, int argc, char const * argv);
- *
- *   execute all applets in each file on the command line; return no
- *   value; this function may be called repeatedly;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void function (struct plc * plc, int argc, char const * argv [])
-
-{
-	while ((argc) && (* argv))
-	{
-		if ((plc->NVM.file = open (plc->NVM.name = * argv, O_BINARY|O_RDONLY)) == -1)
-		{
-			error (0, errno, "%s", plc->NVM.name);
-		}
-		else if (nvmfile1 (&plc->NVM))
-		{
-			error (0, errno, "Won't load %s", plc->NVM.name);
-		}
-		else if (sequence (plc))
-		{
-			error (0, errno, "Abandoning %s", plc->NVM.name);
-		}
-		close (plc->NVM.file);
-		argc--;
-		argv++;
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary when asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	char firmware [PLC_VERSION_STRING];
-	static char const * optv [] =
-	{
-		"c:ei:lp:qt:vx",
-		"file [file] [...]",
-		"Qualcomm Atheros Test Applet Loader",
-		"e\tredirect stderr to stdout",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"l\tloop until program is terminated",
-		"q\tquiet mode",
-		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'l':
-			_setbits (plc.flags, PLC_FOREVER);
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 't':
-			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (WaitForStart (&plc, firmware, sizeof (firmware)))
-	{
-		error (1, ECANCELED, PLC_NODETECT);
-	}
-	if (strcmp (firmware, "BootLoader"))
-	{
-		error (1, ECANCELED, "BootLoader must be running");
-	}
-	do
-	{
-		function (&plc, argc, argv);
-	}
-	while (_anyset (plc.flags, PLC_FOREVER));
-	free (plc.message);
-	closechannel (&channel);
-	return (plc.state);
-}
-
-
-
- - - diff --git a/docbook/int6ktone.1.html b/docbook/int6ktone.1.html deleted file mode 100644 index c017843f..00000000 --- a/docbook/int6ktone.1.html +++ /dev/null @@ -1,1050 +0,0 @@ - - - - - - int6ktone.1 - - - - - - - - - -
-int6ktone(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6ktone(1)
-
-NAME
-       int6ktone - Qualcomm Atheros Tone Map Dump Utility
-
-SYNOPSIS
-       int6ktone [options] device peer [>stdout]
-
-DESCRIPTION
-       Collect and print device tone map information on stdout.
-
-       Powerline  devices  cannot  compute tone map values unless until some data has passed through them, either to or from the
-       powerline.  In most cases, the ping utility will generate enough traffic to create a usable tone map.  To get  a  respon‐
-       sive tonemap, one must send more traffic at higher data rates, possibly using ttcp or iperf or similar utility.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -h     Print histogram of mean-square time slot values for each carrier.  The histogram facilitates visual identification
-              of signals that interfere with powerline data transmission.  These signals normally appear as a parabolic  dip  in
-              otherwise uniform data.  Thie option is ignored when option -s is present.
-
-       -i     Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -s     Compute and display signal-to-noise ratios.  Average SNR is computed for each slot then an overall average SNR  is
-              computed.  ACG and GIL values for each slot are also displayed.  This option suppresses tone map output and causes
-              option -h to be ignored.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The MAC address of the primary device.
-
-       peer   The MAC address of the peer device.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-EXAMPLES
-       The following example prints tone map information computed by device 00B05200CA0D on stdout.  The information relates  to
-       channel  estimation  with  peer device 00B05200CA0C.  We requested a histogram with option -h and suppressed the progress
-       messages with option -q.  Output consists of 917 lines of tone map modulation data.
-
-       Each line of tone map data consists of 8 columns.  The first column is the offset.  The next 6 columns are time slot mod‐
-       ulation data.  The last column is the computed mean-square of the time slot modulation data.  Devices operating on a 50hz
-       powerline have modulation data in all 6 time slot columns.  Devices operating on a 60hz powerline have modulation data in
-       only 5 of the 6 columns.
-
-          # int6ktone -qh 00B05200CA0D 00B05200CA0C
-          0000,05,04,04,05,04,00,19 ###################
-          0001,05,04,04,05,04,00,19 ###################
-          0002,05,04,04,05,04,00,19 ###################
-          0003,05,04,04,05,05,00,21 #####################
-          0004,05,04,04,05,05,00,21 #####################
-          0005,05,04,04,05,05,00,21 #####################
-          0006,05,04,04,05,05,00,21 #####################
-          0007,05,04,05,05,05,00,23 #######################
-          0008,05,04,05,05,05,00,23 #######################
-          0009,05,04,04,05,05,00,21 #####################
-          0010,05,05,05,05,05,00,25 #########################
-          0011,05,05,05,05,05,00,25 #########################
-          0012,05,05,04,05,05,00,23 #######################
-          0013,05,05,05,05,05,00,25 #########################
-          0014,05,05,05,05,05,00,25 #########################
-          0015,05,05,05,05,05,00,25 #########################
-          0016,05,05,04,05,05,00,23 #######################
-          0017,05,05,04,05,05,00,23 #######################
-          0018,05,05,05,05,05,00,25 #########################
-          0019,05,05,05,05,05,00,25 #########################
-          0020,05,05,05,05,05,00,25 #########################
-          0021,05,05,05,05,05,00,25 #########################
-          0022,05,05,05,05,05,00,25 #########################
-          0023,05,05,05,05,05,00,25 #########################
-          0024,05,05,05,05,05,00,25 #########################
-          0025,05,05,05,05,05,00,25 #########################
-          0026,05,05,05,05,05,00,25 #########################
-          0027,05,05,05,05,05,00,25 #########################
-          0028,05,05,05,05,05,00,25 #########################
-          0029,05,05,05,05,05,00,25 #########################
-          0030,05,05,05,05,05,00,25 #########################
-          0031,05,05,05,05,05,00,25 #########################
-          0032,05,05,05,05,05,00,25 #########################
-          0033,05,05,05,05,05,00,25 #########################
-          0034,05,05,05,05,05,00,25 #########################
-          0035,05,04,04,04,05,00,19 ###################
-          0036,05,04,04,04,05,00,19 ###################
-          0037,04,03,03,04,04,00,13 #############
-          0038,03,02,03,02,04,00,08 ########
-          0039,02,01,02,02,03,00,04 ####
-          0040,02,01,02,01,02,00,02 ##
-          0041,02,00,02,01,02,00,02 ##
-          0042,02,01,02,01,02,00,02 ##
-          0043,02,01,02,02,03,00,04 ####
-          0044,03,02,03,03,03,00,08 ########
-          0045,03,03,03,04,03,00,10 ##########
-          0046,05,04,04,04,05,00,19 ###################
-          0047,05,05,04,05,05,00,23 #######################
-          0048,05,05,05,05,05,00,25 #########################
-          0049,06,05,05,06,06,00,31 ###############################
-          0050,06,05,05,06,06,00,31 ###############################
-          0051,06,05,05,06,06,00,31 ###############################
-          0052,06,05,05,06,06,00,31 ###############################
-          0053,06,05,05,06,06,00,31 ###############################
-          0054,07,06,06,06,06,00,38 ######################################
-          0055,06,06,06,06,06,00,36 ####################################
-          0056,07,06,06,06,06,00,38 ######################################
-          0057,06,06,06,06,06,00,36 ####################################
-          0058,06,06,06,06,06,00,36 ####################################
-          0059,06,06,06,06,06,00,36 ####################################
-          0060,07,06,06,06,07,00,41 #########################################
-          0061,07,06,06,06,07,00,41 #########################################
-          0062,07,06,06,06,07,00,41 #########################################
-          0063,07,06,06,06,07,00,41 #########################################
-          0064,07,06,06,06,07,00,41 #########################################
-          0065,07,06,06,06,07,00,41 #########################################
-          0066,07,06,06,07,07,00,43 ###########################################
-          0067,07,06,06,07,07,00,43 ###########################################
-          0068,07,06,06,07,07,00,43 ###########################################
-          0069,07,06,07,07,07,00,46 ##############################################
-          0070,07,07,07,07,07,00,49 #################################################
-          0071,07,07,07,07,07,00,49 #################################################
-          0072,07,07,07,07,07,00,49 #################################################
-          0073,07,07,07,07,07,00,49 #################################################
-          0074,07,07,07,07,07,00,49 #################################################
-          0075,07,07,07,07,07,00,49 #################################################
-          0076,07,06,07,07,07,00,46 ##############################################
-          0077,07,06,07,07,07,00,46 ##############################################
-          0078,07,06,07,07,07,00,46 ##############################################
-          0079,07,06,07,07,07,00,46 ##############################################
-          0080,07,06,07,07,07,00,46 ##############################################
-          0081,07,06,07,07,07,00,46 ##############################################
-          0082,07,06,06,07,07,00,43 ###########################################
-          0083,07,06,06,07,07,00,43 ###########################################
-          0084,07,06,07,07,07,00,46 ##############################################
-          0085,07,07,06,07,07,00,46 ##############################################
-          0086,07,07,07,07,07,00,49 #################################################
-          0087,07,07,07,07,07,00,49 #################################################
-          0088,07,07,07,07,07,00,49 #################################################
-          0089,07,07,07,07,07,00,49 #################################################
-          0090,07,07,07,07,07,00,49 #################################################
-          0091,07,07,07,07,07,00,49 #################################################
-          0092,07,07,07,07,07,00,49 #################################################
-          0093,07,07,07,07,07,00,49 #################################################
-          0094,07,07,07,07,07,00,49 #################################################
-          0095,07,06,07,07,07,00,46 ##############################################
-          0096,07,06,07,07,07,00,46 ##############################################
-          0097,07,06,07,07,07,00,46 ##############################################
-          0098,07,06,07,07,07,00,46 ##############################################
-          0099,07,06,07,07,07,00,46 ##############################################
-          0100,07,06,07,07,07,00,46 ##############################################
-          0101,07,07,07,07,07,00,49 #################################################
-          0102,07,07,07,07,07,00,49 #################################################
-          0103,07,07,07,07,07,00,49 #################################################
-          0104,07,07,07,07,07,00,49 #################################################
-          0105,07,07,07,07,07,00,49 #################################################
-          0106,07,06,07,07,07,00,46 ##############################################
-          0107,07,06,07,07,07,00,46 ##############################################
-          0108,07,06,07,07,07,00,46 ##############################################
-          0109,07,06,07,07,07,00,46 ##############################################
-          0110,07,07,07,07,07,00,49 #################################################
-          0111,07,07,07,07,07,00,49 #################################################
-          0112,07,07,07,07,07,00,49 #################################################
-          0113,07,07,07,07,07,00,49 #################################################
-          0114,07,07,07,07,07,00,49 #################################################
-          0115,07,07,07,07,07,00,49 #################################################
-          0116,07,07,07,07,07,00,49 #################################################
-          0117,07,07,07,07,07,00,49 #################################################
-          0118,07,07,07,07,07,00,49 #################################################
-          0119,07,06,07,07,07,00,46 ##############################################
-          0120,07,06,06,07,07,00,43 ###########################################
-          0121,07,06,06,07,07,00,43 ###########################################
-          0122,06,06,06,07,06,00,38 ######################################
-          0123,06,06,06,07,06,00,38 ######################################
-          0124,06,06,06,07,07,00,41 #########################################
-          0125,07,06,06,07,07,00,43 ###########################################
-          0126,07,06,06,07,07,00,43 ###########################################
-          0127,07,06,06,07,07,00,43 ###########################################
-          0128,07,07,07,07,07,00,49 #################################################
-          0129,07,07,07,07,07,00,49 #################################################
-          0130,07,07,07,07,07,00,49 #################################################
-          0131,07,07,07,07,07,00,49 #################################################
-          0132,07,07,07,07,07,00,49 #################################################
-          0133,07,07,07,07,07,00,49 #################################################
-          0134,07,07,07,07,07,00,49 #################################################
-          0135,07,07,07,07,07,00,49 #################################################
-          0136,07,07,07,07,07,00,49 #################################################
-          0137,07,07,07,07,07,00,49 #################################################
-          0138,07,07,07,07,07,00,49 #################################################
-          0139,07,07,07,07,07,00,49 #################################################
-          0140,07,07,07,07,07,00,49 #################################################
-          0141,07,07,07,07,07,00,49 #################################################
-          0142,07,07,07,07,07,00,49 #################################################
-          0143,07,07,07,07,07,00,49 #################################################
-          0144,07,07,07,07,07,00,49 #################################################
-          0145,07,07,07,07,07,00,49 #################################################
-          0146,07,07,07,07,07,00,49 #################################################
-          0147,07,07,07,07,07,00,49 #################################################
-          0148,07,07,07,07,07,00,49 #################################################
-          0149,07,07,07,07,07,00,49 #################################################
-          0150,07,07,07,07,07,00,49 #################################################
-          0151,07,07,07,07,07,00,49 #################################################
-          0152,07,07,07,07,07,00,49 #################################################
-          0153,07,07,07,07,07,00,49 #################################################
-          0154,07,07,07,07,07,00,49 #################################################
-          0155,07,07,07,07,07,00,49 #################################################
-          0156,07,07,07,07,07,00,49 #################################################
-          0157,07,07,07,07,07,00,49 #################################################
-          0158,06,06,06,06,06,00,36 ####################################
-          0159,06,06,06,06,06,00,36 ####################################
-          0160,06,06,06,06,06,00,36 ####################################
-          0161,07,06,06,06,07,00,41 #########################################
-          0162,07,07,07,07,07,00,49 #################################################
-          0163,07,07,07,07,07,00,49 #################################################
-          0164,07,07,07,07,07,00,49 #################################################
-          0165,07,07,07,07,07,00,49 #################################################
-          0166,07,07,07,07,07,00,49 #################################################
-          0167,07,07,07,07,07,00,49 #################################################
-          0168,07,07,07,07,07,00,49 #################################################
-          0169,07,07,07,07,07,00,49 #################################################
-          0170,07,07,07,07,07,00,49 #################################################
-          0171,07,07,07,07,07,00,49 #################################################
-          0172,07,07,07,07,07,00,49 #################################################
-          0173,07,07,07,07,07,00,49 #################################################
-          0174,07,07,07,07,07,00,49 #################################################
-          0175,07,07,07,07,07,00,49 #################################################
-          0176,07,07,07,07,07,00,49 #################################################
-          0177,07,07,07,07,07,00,49 #################################################
-          0178,07,07,07,07,07,00,49 #################################################
-          0179,07,07,07,07,07,00,49 #################################################
-          0180,07,07,07,07,07,00,49 #################################################
-          0181,07,07,07,07,07,00,49 #################################################
-          0182,07,07,07,07,07,00,49 #################################################
-          0183,07,07,07,07,07,00,49 #################################################
-          0184,07,07,07,07,07,00,49 #################################################
-          0185,07,07,07,07,07,00,49 #################################################
-          0186,07,07,07,07,07,00,49 #################################################
-          0187,07,07,07,07,07,00,49 #################################################
-          0188,07,07,07,07,07,00,49 #################################################
-          0189,07,07,07,07,07,00,49 #################################################
-          0190,07,07,07,07,07,00,49 #################################################
-          0191,07,07,07,07,07,00,49 #################################################
-          0192,07,07,07,07,07,00,49 #################################################
-          0193,07,07,07,07,07,00,49 #################################################
-          0194,07,07,07,07,07,00,49 #################################################
-          0195,07,07,07,07,07,00,49 #################################################
-          0196,07,07,07,07,07,00,49 #################################################
-          0197,07,07,07,07,07,00,49 #################################################
-          0198,07,07,07,07,07,00,49 #################################################
-          0199,07,07,07,07,07,00,49 #################################################
-          0200,07,07,07,07,07,00,49 #################################################
-          0201,07,07,07,07,07,00,49 #################################################
-          0202,07,07,07,07,07,00,49 #################################################
-          0203,07,07,07,07,07,00,49 #################################################
-          0204,07,07,07,07,07,00,49 #################################################
-          0205,07,07,07,07,07,00,49 #################################################
-          0206,07,07,07,07,07,00,49 #################################################
-          0207,07,07,07,07,07,00,49 #################################################
-          0208,07,07,07,07,07,00,49 #################################################
-          0209,07,07,07,07,07,00,49 #################################################
-          0210,07,07,07,07,07,00,49 #################################################
-          0211,07,07,07,07,07,00,49 #################################################
-          0212,07,07,07,07,07,00,49 #################################################
-          0213,07,07,07,07,07,00,49 #################################################
-          0214,07,07,07,07,07,00,49 #################################################
-          0215,07,07,07,07,07,00,49 #################################################
-          0216,07,07,07,07,07,00,49 #################################################
-          0217,07,07,07,07,07,00,49 #################################################
-          0218,07,07,07,07,07,00,49 #################################################
-          0219,07,07,07,07,07,00,49 #################################################
-          0220,07,07,07,07,07,00,49 #################################################
-          0221,07,07,07,07,07,00,49 #################################################
-          0222,07,07,07,07,07,00,49 #################################################
-          0223,07,07,07,07,07,00,49 #################################################
-          0224,07,07,07,07,07,00,49 #################################################
-          0225,07,07,07,07,07,00,49 #################################################
-          0226,07,07,07,07,07,00,49 #################################################
-          0227,07,07,07,07,07,00,49 #################################################
-          0228,07,07,07,07,07,00,49 #################################################
-          0229,07,07,07,07,07,00,49 #################################################
-          0230,07,07,07,07,07,00,49 #################################################
-          0231,07,07,07,07,07,00,49 #################################################
-          0232,07,07,07,07,07,00,49 #################################################
-          0233,07,07,07,07,07,00,49 #################################################
-          0234,07,07,06,07,07,00,46 ##############################################
-          0235,07,07,07,07,07,00,49 #################################################
-          0236,07,07,06,07,07,00,46 ##############################################
-          0237,07,07,06,07,07,00,46 ##############################################
-          0238,07,07,07,07,07,00,49 #################################################
-          0239,07,07,07,07,07,00,49 #################################################
-          0240,07,06,07,07,07,00,46 ##############################################
-          0241,07,06,07,07,07,00,46 ##############################################
-          0242,07,07,07,07,07,00,49 #################################################
-          0243,07,07,07,07,07,00,49 #################################################
-          0244,07,07,07,07,07,00,49 #################################################
-          0245,07,07,07,06,07,00,46 ##############################################
-          0246,07,07,07,07,07,00,49 #################################################
-          0247,07,07,06,07,07,00,46 ##############################################
-          0248,07,07,06,06,07,00,43 ###########################################
-          0249,07,07,07,06,07,00,46 ##############################################
-          0250,07,07,07,07,07,00,49 #################################################
-          0251,07,07,07,06,07,00,46 ##############################################
-          0252,07,07,07,06,07,00,46 ##############################################
-          0253,07,07,07,07,07,00,49 #################################################
-          0254,07,07,07,06,07,00,46 ##############################################
-          0255,07,07,07,06,07,00,46 ##############################################
-          0256,07,07,07,07,07,00,49 #################################################
-          0257,07,07,07,07,07,00,49 #################################################
-          0258,07,06,06,07,07,00,43 ###########################################
-          0259,07,06,06,07,07,00,43 ###########################################
-          0260,07,06,06,07,07,00,43 ###########################################
-          0261,07,06,06,07,07,00,43 ###########################################
-          0262,07,06,06,06,07,00,41 #########################################
-          0263,07,06,06,06,07,00,41 #########################################
-          0264,07,06,06,06,07,00,41 #########################################
-          0265,07,06,06,07,07,00,43 ###########################################
-          0266,07,06,06,07,07,00,43 ###########################################
-          0267,07,06,06,06,07,00,41 #########################################
-          0268,07,06,06,06,07,00,41 #########################################
-          0269,07,06,07,06,07,00,43 ###########################################
-          0270,07,06,07,06,07,00,43 ###########################################
-          0271,07,06,07,06,07,00,43 ###########################################
-          0272,07,06,07,06,07,00,43 ###########################################
-          0273,07,06,06,06,07,00,41 #########################################
-          0274,07,06,06,06,07,00,41 #########################################
-          0275,07,06,06,06,07,00,41 #########################################
-          0276,07,06,06,07,07,00,43 ###########################################
-          0277,07,06,06,07,07,00,43 ###########################################
-          0278,07,06,06,06,07,00,41 #########################################
-          0279,07,06,06,06,07,00,41 #########################################
-          0280,07,06,06,07,07,00,43 ###########################################
-          0281,07,06,06,06,07,00,41 #########################################
-          0282,07,06,06,07,07,00,43 ###########################################
-          0283,07,06,06,07,07,00,43 ###########################################
-          0284,07,06,06,07,07,00,43 ###########################################
-          0285,07,06,06,06,07,00,41 #########################################
-          0286,06,06,06,06,07,00,38 ######################################
-          0287,06,06,06,06,07,00,38 ######################################
-          0288,07,06,06,06,07,00,41 #########################################
-          0289,07,06,06,06,07,00,41 #########################################
-          0290,07,06,06,07,07,00,43 ###########################################
-          0291,07,06,06,07,07,00,43 ###########################################
-          0292,07,06,07,07,07,00,46 ##############################################
-          0293,07,06,07,07,07,00,46 ##############################################
-          0294,07,06,06,07,07,00,43 ###########################################
-          0295,07,06,06,07,07,00,43 ###########################################
-          0296,07,06,06,07,07,00,43 ###########################################
-          0297,07,06,06,07,07,00,43 ###########################################
-          0298,07,06,06,07,06,00,41 #########################################
-          0299,07,06,06,07,06,00,41 #########################################
-          0300,07,06,06,06,07,00,41 #########################################
-          0301,07,06,06,07,07,00,43 ###########################################
-          0302,07,06,06,06,07,00,41 #########################################
-          0303,07,06,06,07,07,00,43 ###########################################
-          0304,07,06,06,07,07,00,43 ###########################################
-          0305,07,06,06,07,07,00,43 ###########################################
-          0306,07,06,06,07,06,00,41 #########################################
-          0307,07,06,06,06,06,00,38 ######################################
-          0308,06,06,06,06,06,00,36 ####################################
-          0309,06,06,06,06,06,00,36 ####################################
-          0310,06,06,06,06,06,00,36 ####################################
-          0311,06,06,06,06,06,00,36 ####################################
-          0312,06,06,06,06,06,00,36 ####################################
-          0313,06,06,06,06,06,00,36 ####################################
-          0314,07,06,06,06,06,00,38 ######################################
-          0315,07,06,06,06,06,00,38 ######################################
-          0316,07,06,06,06,06,00,38 ######################################
-          0317,06,06,06,06,06,00,36 ####################################
-          0318,06,06,06,06,06,00,36 ####################################
-          0319,06,06,06,06,06,00,36 ####################################
-          0320,06,06,06,06,06,00,36 ####################################
-          0321,06,06,06,06,06,00,36 ####################################
-          0322,06,06,06,06,06,00,36 ####################################
-          0323,06,06,06,06,06,00,36 ####################################
-          0324,06,06,06,06,06,00,36 ####################################
-          0325,06,06,06,06,06,00,36 ####################################
-          0326,06,06,06,06,06,00,36 ####################################
-          0327,06,06,06,06,06,00,36 ####################################
-          0328,06,06,06,06,06,00,36 ####################################
-          0329,06,06,06,06,06,00,36 ####################################
-          0330,06,06,06,06,06,00,36 ####################################
-          0331,06,06,06,06,06,00,36 ####################################
-          0332,06,06,06,06,06,00,36 ####################################
-          0333,06,06,06,06,06,00,36 ####################################
-          0334,06,06,06,06,06,00,36 ####################################
-          0335,06,06,06,06,06,00,36 ####################################
-          0336,06,06,06,06,06,00,36 ####################################
-          0337,06,06,06,06,06,00,36 ####################################
-          0338,06,06,06,06,06,00,36 ####################################
-          0339,06,06,06,06,06,00,36 ####################################
-          0340,06,06,06,06,06,00,36 ####################################
-          0341,06,06,06,06,06,00,36 ####################################
-          0342,06,06,06,06,06,00,36 ####################################
-          0343,06,06,06,06,06,00,36 ####################################
-          0344,06,06,06,06,06,00,36 ####################################
-          0345,06,06,06,06,06,00,36 ####################################
-          0346,06,06,06,06,06,00,36 ####################################
-          0347,06,06,06,06,06,00,36 ####################################
-          0348,06,06,06,06,06,00,36 ####################################
-          0349,06,06,06,06,06,00,36 ####################################
-          0350,06,06,06,06,06,00,36 ####################################
-          0351,06,06,06,06,06,00,36 ####################################
-          0352,06,06,06,06,06,00,36 ####################################
-          0353,06,06,06,06,06,00,36 ####################################
-          0354,06,06,06,06,06,00,36 ####################################
-          0355,06,06,06,06,06,00,36 ####################################
-          0356,06,06,06,06,06,00,36 ####################################
-          0357,06,06,06,06,06,00,36 ####################################
-          0358,06,06,06,06,06,00,36 ####################################
-          0359,06,06,06,06,06,00,36 ####################################
-          0360,06,06,06,06,06,00,36 ####################################
-          0361,06,06,06,06,06,00,36 ####################################
-          0362,06,06,06,06,06,00,36 ####################################
-          0363,06,06,06,06,06,00,36 ####################################
-          0364,06,06,06,06,06,00,36 ####################################
-          0365,06,06,06,06,06,00,36 ####################################
-          0366,06,06,06,06,06,00,36 ####################################
-          0367,06,06,06,06,06,00,36 ####################################
-          0368,06,06,06,06,06,00,36 ####################################
-          0369,06,06,06,06,06,00,36 ####################################
-          0370,06,06,06,06,06,00,36 ####################################
-          0371,06,06,06,06,06,00,36 ####################################
-          0372,06,06,06,06,06,00,36 ####################################
-          0373,06,06,06,06,06,00,36 ####################################
-          0374,06,06,06,06,06,00,36 ####################################
-          0375,06,06,06,06,06,00,36 ####################################
-          0376,07,06,06,06,06,00,38 ######################################
-          0377,07,06,06,06,06,00,38 ######################################
-          0378,07,06,06,06,06,00,38 ######################################
-          0379,07,06,06,06,06,00,38 ######################################
-          0380,07,06,06,06,06,00,38 ######################################
-          0381,07,06,06,06,06,00,38 ######################################
-          0382,07,06,06,06,06,00,38 ######################################
-          0383,06,06,06,06,07,00,38 ######################################
-          0384,06,06,06,06,07,00,38 ######################################
-          0385,06,06,06,06,07,00,38 ######################################
-          0386,06,06,06,06,07,00,38 ######################################
-          0387,06,06,06,06,07,00,38 ######################################
-          0388,06,06,06,06,07,00,38 ######################################
-          0389,06,06,06,06,07,00,38 ######################################
-          0390,06,06,06,06,06,00,36 ####################################
-          0391,06,06,06,06,06,00,36 ####################################
-          0392,06,06,06,06,06,00,36 ####################################
-          0393,06,06,06,06,06,00,36 ####################################
-          0394,06,06,06,06,06,00,36 ####################################
-          0395,06,06,06,06,06,00,36 ####################################
-          0396,06,06,06,06,06,00,36 ####################################
-          0397,06,06,06,06,06,00,36 ####################################
-          0398,06,06,06,06,06,00,36 ####################################
-          0399,06,06,06,06,06,00,36 ####################################
-          0400,06,06,06,06,06,00,36 ####################################
-          0401,06,06,06,06,06,00,36 ####################################
-          0402,06,06,06,06,06,00,36 ####################################
-          0403,06,06,06,06,06,00,36 ####################################
-          0404,06,06,06,06,06,00,36 ####################################
-          0405,06,06,06,06,06,00,36 ####################################
-          0406,06,06,06,06,06,00,36 ####################################
-          0407,06,06,06,06,06,00,36 ####################################
-          0408,06,06,06,06,06,00,36 ####################################
-          0409,06,06,06,06,06,00,36 ####################################
-          0410,06,06,06,06,06,00,36 ####################################
-          0411,06,06,06,06,06,00,36 ####################################
-          0412,06,06,06,06,06,00,36 ####################################
-          0413,06,06,06,06,06,00,36 ####################################
-          0414,06,06,06,06,06,00,36 ####################################
-          0415,06,06,06,06,06,00,36 ####################################
-          0416,06,06,06,06,06,00,36 ####################################
-          0417,06,06,06,06,06,00,36 ####################################
-          0418,06,06,06,06,06,00,36 ####################################
-          0419,06,06,06,06,06,00,36 ####################################
-          0420,06,06,06,06,06,00,36 ####################################
-          0421,06,06,06,06,06,00,36 ####################################
-          0422,06,06,06,06,06,00,36 ####################################
-          0423,06,06,06,06,06,00,36 ####################################
-          0424,06,06,06,06,06,00,36 ####################################
-          0425,06,06,06,06,06,00,36 ####################################
-          0426,06,06,06,06,06,00,36 ####################################
-          0427,06,06,06,06,06,00,36 ####################################
-          0428,06,06,06,06,06,00,36 ####################################
-          0429,06,06,06,06,06,00,36 ####################################
-          0430,06,06,05,06,06,00,33 #################################
-          0431,06,05,05,06,06,00,31 ###############################
-          0432,06,05,05,06,06,00,31 ###############################
-          0433,06,05,05,06,06,00,31 ###############################
-          0434,06,05,05,06,06,00,31 ###############################
-          0435,06,05,05,06,06,00,31 ###############################
-          0436,06,05,05,06,06,00,31 ###############################
-          0437,06,05,05,06,06,00,31 ###############################
-          0438,06,05,05,06,06,00,31 ###############################
-          0439,06,05,05,06,06,00,31 ###############################
-          0440,06,05,05,06,06,00,31 ###############################
-          0441,06,05,05,06,06,00,31 ###############################
-          0442,06,05,05,06,06,00,31 ###############################
-          0443,06,05,05,06,06,00,31 ###############################
-          0444,06,05,05,05,06,00,29 #############################
-          0445,06,05,05,05,06,00,29 #############################
-          0446,05,05,05,05,06,00,27 ###########################
-          0447,05,05,05,05,06,00,27 ###########################
-          0448,05,05,05,06,06,00,29 #############################
-          0449,05,05,05,05,05,00,25 #########################
-          0450,05,05,05,05,05,00,25 #########################
-          0451,05,05,05,05,05,00,25 #########################
-          0452,05,05,05,05,05,00,25 #########################
-          0453,05,05,05,05,05,00,25 #########################
-          0454,05,05,05,05,05,00,25 #########################
-          0455,05,05,05,05,05,00,25 #########################
-          0456,05,05,05,05,05,00,25 #########################
-          0457,05,05,05,05,05,00,25 #########################
-          0458,05,05,05,06,05,00,27 ###########################
-          0459,05,05,05,06,05,00,27 ###########################
-          0460,05,05,05,05,05,00,25 #########################
-          0461,05,05,05,05,05,00,25 #########################
-          0462,05,05,05,05,05,00,25 #########################
-          0463,05,05,05,05,05,00,25 #########################
-          0464,05,05,05,05,05,00,25 #########################
-          0465,05,05,05,05,05,00,25 #########################
-          0466,06,05,05,05,05,00,27 ###########################
-          0467,05,05,05,05,05,00,25 #########################
-          0468,06,05,05,05,05,00,27 ###########################
-          0469,06,05,05,05,05,00,27 ###########################
-          0470,06,05,05,06,05,00,29 #############################
-          0471,06,05,05,06,05,00,29 #############################
-          0472,05,05,05,06,05,00,27 ###########################
-          0473,05,05,05,06,05,00,27 ###########################
-          0474,05,05,05,05,05,00,25 #########################
-          0475,05,05,05,05,05,00,25 #########################
-          0476,05,05,05,05,05,00,25 #########################
-          0477,05,05,05,05,05,00,25 #########################
-          0478,05,05,05,05,05,00,25 #########################
-          0479,05,05,05,05,05,00,25 #########################
-          0480,05,05,05,05,05,00,25 #########################
-          0481,05,05,05,05,05,00,25 #########################
-          0482,05,05,05,05,05,00,25 #########################
-          0483,05,05,05,05,05,00,25 #########################
-          0484,05,05,05,05,05,00,25 #########################
-          0485,05,05,05,05,05,00,25 #########################
-          0486,05,05,05,05,05,00,25 #########################
-          0487,05,05,05,05,05,00,25 #########################
-          0488,05,05,05,05,05,00,25 #########################
-          0489,05,05,05,05,05,00,25 #########################
-          0490,05,05,05,05,05,00,25 #########################
-          0491,05,05,05,05,05,00,25 #########################
-          0492,05,05,05,05,05,00,25 #########################
-          0493,05,05,05,05,05,00,25 #########################
-          0494,05,05,05,05,05,00,25 #########################
-          0495,05,05,05,05,05,00,25 #########################
-          0496,05,04,05,05,05,00,23 #######################
-          0497,05,04,05,05,05,00,23 #######################
-          0498,05,04,05,05,05,00,23 #######################
-          0499,05,04,05,05,05,00,23 #######################
-          0500,05,04,05,05,05,00,23 #######################
-          0501,05,05,05,05,05,00,25 #########################
-          0502,05,05,05,05,05,00,25 #########################
-          0503,05,05,05,05,05,00,25 #########################
-          0504,05,05,05,05,05,00,25 #########################
-          0505,05,05,05,05,05,00,25 #########################
-          0506,05,05,05,05,05,00,25 #########################
-          0507,05,05,05,05,05,00,25 #########################
-          0508,05,05,05,05,05,00,25 #########################
-          0509,05,05,05,05,05,00,25 #########################
-          0510,05,05,05,05,05,00,25 #########################
-          0511,05,05,05,05,05,00,25 #########################
-          0512,05,05,05,05,05,00,25 #########################
-          0513,05,05,05,05,05,00,25 #########################
-          0514,05,05,05,05,05,00,25 #########################
-          0515,05,05,05,05,05,00,25 #########################
-          0516,05,05,05,05,05,00,25 #########################
-          0517,05,05,05,05,05,00,25 #########################
-          0518,05,05,05,05,05,00,25 #########################
-          0519,05,05,05,05,05,00,25 #########################
-          0520,05,05,05,05,05,00,25 #########################
-          0521,05,04,04,05,05,00,21 #####################
-          0522,05,04,04,05,05,00,21 #####################
-          0523,05,04,04,05,05,00,21 #####################
-          0524,05,04,04,05,05,00,21 #####################
-          0525,05,05,04,05,05,00,23 #######################
-          0526,05,05,04,05,05,00,23 #######################
-          0527,05,05,04,05,05,00,23 #######################
-          0528,05,05,04,05,05,00,23 #######################
-          0529,05,05,04,05,05,00,23 #######################
-          0530,05,05,04,05,05,00,23 #######################
-          0531,05,05,04,05,05,00,23 #######################
-          0532,05,04,04,05,05,00,21 #####################
-          0533,05,04,04,05,05,00,21 #####################
-          0534,05,04,04,05,05,00,21 #####################
-          0535,05,04,04,05,05,00,21 #####################
-          0536,05,04,04,05,05,00,21 #####################
-          0537,05,04,04,05,05,00,21 #####################
-          0538,05,04,04,05,05,00,21 #####################
-          0539,05,04,04,05,05,00,21 #####################
-          0540,05,04,04,05,05,00,21 #####################
-          0541,05,04,04,05,05,00,21 #####################
-          0542,05,04,04,05,05,00,21 #####################
-          0543,05,04,04,05,05,00,21 #####################
-          0544,05,04,04,05,05,00,21 #####################
-          0545,05,04,04,05,05,00,21 #####################
-          0546,05,04,04,05,04,00,19 ###################
-          0547,04,04,04,05,04,00,17 #################
-          0548,04,04,04,05,04,00,17 #################
-          0549,04,04,04,04,04,00,16 ################
-          0550,04,04,04,05,04,00,17 #################
-          0551,04,04,04,05,05,00,19 ###################
-          0552,05,04,04,05,04,00,19 ###################
-          0553,05,04,04,04,04,00,17 #################
-          0554,05,04,04,04,04,00,17 #################
-          0555,04,04,04,04,04,00,16 ################
-          0556,04,04,04,04,04,00,16 ################
-          0557,04,04,04,04,04,00,16 ################
-          0558,04,04,04,04,04,00,16 ################
-          0559,04,04,04,04,04,00,16 ################
-          0560,04,04,04,04,04,00,16 ################
-          0561,04,04,04,04,04,00,16 ################
-          0562,04,04,04,04,04,00,16 ################
-          0563,04,04,04,04,04,00,16 ################
-          0564,04,04,04,04,04,00,16 ################
-          0565,04,04,04,04,04,00,16 ################
-          0566,04,04,04,04,04,00,16 ################
-          0567,04,04,04,04,04,00,16 ################
-          0568,04,04,04,04,04,00,16 ################
-          0569,04,04,04,04,04,00,16 ################
-          0570,04,04,04,04,04,00,16 ################
-          0571,04,04,04,04,05,00,17 #################
-          0572,04,04,04,04,05,00,17 #################
-          0573,04,04,04,04,04,00,16 ################
-          0574,04,04,04,04,04,00,16 ################
-          0575,04,04,04,04,04,00,16 ################
-          0576,04,04,04,04,04,00,16 ################
-          0577,04,04,04,04,04,00,16 ################
-          0578,04,04,04,04,04,00,16 ################
-          0579,04,04,04,04,04,00,16 ################
-          0580,04,04,04,04,04,00,16 ################
-          0581,04,04,04,04,04,00,16 ################
-          0582,04,04,04,04,04,00,16 ################
-          0583,04,04,04,04,04,00,16 ################
-          0584,04,04,04,04,04,00,16 ################
-          0585,04,04,04,04,04,00,16 ################
-          0586,04,04,04,04,04,00,16 ################
-          0587,04,04,04,04,04,00,16 ################
-          0588,04,04,04,04,04,00,16 ################
-          0589,04,04,04,04,04,00,16 ################
-          0590,04,04,04,04,04,00,16 ################
-          0591,04,04,04,04,04,00,16 ################
-          0592,04,04,04,04,04,00,16 ################
-          0593,04,04,04,04,04,00,16 ################
-          0594,04,04,04,04,04,00,16 ################
-          0595,04,04,04,04,04,00,16 ################
-          0596,04,04,04,04,04,00,16 ################
-          0597,04,04,04,04,04,00,16 ################
-          0598,04,04,04,04,04,00,16 ################
-          0599,04,04,04,04,04,00,16 ################
-          0600,04,04,04,04,04,00,16 ################
-          0601,04,04,04,04,04,00,16 ################
-          0602,04,04,04,04,04,00,16 ################
-          0603,04,04,04,04,04,00,16 ################
-          0604,04,04,04,04,04,00,16 ################
-          0605,04,04,04,04,04,00,16 ################
-          0606,04,04,04,04,04,00,16 ################
-          0607,04,04,04,04,04,00,16 ################
-          0608,04,04,04,04,04,00,16 ################
-          0609,04,04,04,04,04,00,16 ################
-          0610,04,04,04,04,04,00,16 ################
-          0611,04,04,04,04,04,00,16 ################
-          0612,04,04,04,04,04,00,16 ################
-          0613,04,04,04,04,04,00,16 ################
-          0614,04,04,04,04,04,00,16 ################
-          0615,04,04,04,04,04,00,16 ################
-          0616,04,04,04,04,04,00,16 ################
-          0617,04,04,04,04,04,00,16 ################
-          0618,04,04,04,04,04,00,16 ################
-          0619,04,04,04,04,04,00,16 ################
-          0620,04,04,04,04,04,00,16 ################
-          0621,04,04,04,04,04,00,16 ################
-          0622,04,04,04,04,04,00,16 ################
-          0623,04,04,04,04,04,00,16 ################
-          0624,04,04,04,04,04,00,16 ################
-          0625,04,04,04,04,04,00,16 ################
-          0626,04,04,04,04,04,00,16 ################
-          0627,04,04,04,04,04,00,16 ################
-          0628,04,04,04,04,04,00,16 ################
-          0629,04,04,04,04,04,00,16 ################
-          0630,04,04,04,04,04,00,16 ################
-          0631,04,04,04,04,04,00,16 ################
-          0632,04,04,04,04,04,00,16 ################
-          0633,04,04,04,04,04,00,16 ################
-          0634,04,04,04,04,04,00,16 ################
-          0635,04,04,03,04,04,00,14 ##############
-          0636,04,04,03,04,04,00,14 ##############
-          0637,04,04,03,03,04,00,13 #############
-          0638,03,03,03,03,04,00,10 ##########
-          0639,03,03,03,03,04,00,10 ##########
-          0640,03,03,02,03,04,00,09 #########
-          0641,03,03,02,02,03,00,07 #######
-          0642,03,03,02,02,03,00,07 #######
-          0643,03,03,02,02,03,00,07 #######
-          0644,03,03,02,03,03,00,08 ########
-          0645,03,03,02,03,03,00,08 ########
-          0646,03,03,03,03,03,00,09 #########
-          0647,03,03,03,04,03,00,10 ##########
-          0648,03,03,03,04,03,00,10 ##########
-          0649,04,03,03,04,04,00,13 #############
-          0650,04,03,03,04,04,00,13 #############
-          0651,04,03,03,04,04,00,13 #############
-          0652,04,03,03,04,04,00,13 #############
-          0653,04,03,03,04,04,00,13 #############
-          0654,04,03,03,04,04,00,13 #############
-          0655,04,03,03,04,04,00,13 #############
-          0656,03,03,03,03,03,00,09 #########
-          0657,03,03,03,03,03,00,09 #########
-          0658,03,03,02,03,03,00,08 ########
-          0659,03,03,02,03,03,00,08 ########
-          0660,03,03,02,03,03,00,08 ########
-          0661,03,02,02,02,03,00,06 ######
-          0662,03,02,02,02,02,00,05 #####
-          0663,03,02,02,02,02,00,05 #####
-          0664,02,02,02,02,02,00,04 ####
-          0665,02,01,02,02,02,00,03 ###
-          0666,02,02,02,02,03,00,05 #####
-          0667,02,01,02,02,03,00,04 ####
-          0668,03,01,02,03,03,00,06 ######
-          0669,03,01,02,02,03,00,05 #####
-          0670,02,01,02,02,02,00,03 ###
-          0671,02,01,02,02,02,00,03 ###
-          0672,02,01,02,02,02,00,03 ###
-          0673,02,01,02,01,02,00,02 ##
-          0674,02,01,02,02,02,00,03 ###
-          0675,02,01,02,02,03,00,04 ####
-          0676,03,02,02,02,03,00,06 ######
-          0677,03,02,02,03,03,00,07 #######
-          0678,03,02,02,03,03,00,07 #######
-          0679,02,02,02,03,03,00,06 ######
-          0680,02,02,02,03,03,00,06 ######
-          0681,02,02,02,03,03,00,06 ######
-          0682,02,01,02,04,03,00,06 ######
-          0683,02,01,02,04,03,00,06 ######
-          0684,02,01,02,04,03,00,06 ######
-          0685,02,01,02,04,03,00,06 ######
-          0686,03,01,02,04,03,00,07 #######
-          0687,03,02,03,04,03,00,09 #########
-          0688,03,02,03,04,03,00,09 #########
-          0689,03,02,03,04,03,00,09 #########
-          0690,03,02,03,04,03,00,09 #########
-          0691,04,02,03,04,04,00,12 ############
-          0692,04,02,03,04,04,00,12 ############
-          0693,03,02,03,04,04,00,10 ##########
-          0694,04,02,03,04,04,00,12 ############
-          0695,04,02,03,04,04,00,12 ############
-          0696,04,02,03,04,04,00,12 ############
-          0697,04,02,03,04,04,00,12 ############
-          0698,04,02,03,04,04,00,12 ############
-          0699,04,02,03,04,04,00,12 ############
-          0700,04,02,03,04,04,00,12 ############
-          0701,04,03,03,04,04,00,13 #############
-          0702,04,02,03,04,04,00,12 ############
-          0703,04,02,04,04,04,00,13 #############
-          0704,04,02,04,04,04,00,13 #############
-          0705,04,02,04,04,04,00,13 #############
-          0706,04,02,04,04,04,00,13 #############
-          0707,04,03,04,04,04,00,14 ##############
-          0708,04,03,04,04,04,00,14 ##############
-          0709,04,03,04,04,04,00,14 ##############
-          0710,04,03,04,04,04,00,14 ##############
-          0711,04,03,04,04,04,00,14 ##############
-          0712,04,03,04,04,04,00,14 ##############
-          0713,04,03,04,04,04,00,14 ##############
-          0714,04,03,04,04,04,00,14 ##############
-          0715,04,03,04,04,04,00,14 ##############
-          0716,04,03,04,04,04,00,14 ##############
-          0717,04,02,04,04,04,00,13 #############
-          0718,04,02,04,04,04,00,13 #############
-          0719,04,02,04,04,04,00,13 #############
-          0720,04,02,04,04,04,00,13 #############
-          0721,03,01,04,04,04,00,11 ###########
-          0722,03,01,03,04,04,00,10 ##########
-          0723,03,01,04,04,04,00,11 ###########
-          0724,02,01,04,04,04,00,10 ##########
-          0725,02,01,04,04,04,00,10 ##########
-          0726,02,01,04,04,04,00,10 ##########
-          0727,02,02,04,04,04,00,11 ###########
-          0728,02,02,04,04,04,00,11 ###########
-          0729,02,02,03,04,03,00,08 ########
-          0730,02,01,03,04,03,00,07 #######
-          0731,02,02,03,04,03,00,08 ########
-          0732,02,02,03,04,03,00,08 ########
-          0733,02,02,03,04,03,00,08 ########
-          0734,02,02,03,04,03,00,08 ########
-          0735,02,02,03,04,03,00,08 ########
-          0736,02,03,03,04,03,00,09 #########
-          0737,02,03,03,04,03,00,09 #########
-          0738,02,03,03,04,03,00,09 #########
-          0739,02,03,03,04,03,00,09 #########
-          0740,02,03,03,04,03,00,09 #########
-          0741,02,03,03,04,03,00,09 #########
-          0742,02,04,03,03,03,00,09 #########
-          0743,02,03,03,03,03,00,08 ########
-          0744,02,04,03,03,03,00,09 #########
-          0745,02,04,03,03,03,00,09 #########
-          0746,02,04,02,03,03,00,08 ########
-          0747,02,04,02,03,03,00,08 ########
-          0748,02,04,02,02,04,00,08 ########
-          0749,02,04,02,02,04,00,08 ########
-          0750,03,04,02,02,04,00,09 #########
-          0751,03,04,02,02,04,00,09 #########
-          0752,03,04,02,02,04,00,09 #########
-          0753,03,04,02,02,04,00,09 #########
-          0754,04,04,02,02,04,00,11 ###########
-          0755,04,04,02,02,04,00,11 ###########
-          0756,04,04,02,02,04,00,11 ###########
-          0757,04,04,02,02,04,00,11 ###########
-          0758,04,04,02,02,04,00,11 ###########
-          0759,04,04,03,02,04,00,12 ############
-          0760,04,05,03,02,04,00,14 ##############
-          0761,04,04,03,03,04,00,13 #############
-          0762,04,04,03,03,05,00,15 ###############
-          0763,04,04,03,03,05,00,15 ###############
-          0764,04,05,04,04,05,00,19 ###################
-          0765,04,05,04,04,05,00,19 ###################
-          0766,04,05,04,04,05,00,19 ###################
-          0767,04,05,04,04,05,00,19 ###################
-          0768,04,05,04,04,05,00,19 ###################
-          0769,04,05,04,04,05,00,19 ###################
-          0770,04,05,04,04,05,00,19 ###################
-          0771,04,05,04,04,05,00,19 ###################
-          0772,05,05,04,04,05,00,21 #####################
-          0773,05,05,04,04,05,00,21 #####################
-          0774,05,05,04,04,05,00,21 #####################
-          0775,05,05,05,04,05,00,23 #######################
-          0776,05,05,05,04,05,00,23 #######################
-          0777,05,05,05,05,05,00,25 #########################
-          0778,05,05,05,05,05,00,25 #########################
-          0779,05,05,05,05,05,00,25 #########################
-          0780,05,05,05,05,05,00,25 #########################
-          0781,05,05,05,05,05,00,25 #########################
-          0782,05,05,05,05,05,00,25 #########################
-          0783,05,05,05,05,05,00,25 #########################
-          0784,05,05,05,05,05,00,25 #########################
-          0785,05,05,05,05,05,00,25 #########################
-          0786,05,05,05,05,05,00,25 #########################
-          0787,05,05,05,05,05,00,25 #########################
-          0788,05,05,05,05,05,00,25 #########################
-          0789,05,05,05,05,05,00,25 #########################
-          0790,05,05,05,05,05,00,25 #########################
-          0791,05,05,05,05,05,00,25 #########################
-          0792,05,05,05,05,05,00,25 #########################
-          0793,05,05,05,05,05,00,25 #########################
-          0794,05,05,05,05,05,00,25 #########################
-          0795,05,05,05,05,05,00,25 #########################
-          0796,05,05,05,05,06,00,27 ###########################
-          0797,05,05,05,05,06,00,27 ###########################
-          0798,05,05,05,05,06,00,27 ###########################
-          0799,05,05,05,05,06,00,27 ###########################
-          0800,05,05,05,05,06,00,27 ###########################
-          0801,06,05,05,06,06,00,31 ###############################
-          0802,06,05,06,06,06,00,33 #################################
-          0803,06,05,05,06,06,00,31 ###############################
-          0804,06,05,06,06,06,00,33 #################################
-          0805,06,05,06,06,06,00,33 #################################
-          0806,06,05,06,06,06,00,33 #################################
-          0807,06,05,06,06,06,00,33 #################################
-          0808,06,06,06,06,06,00,36 ####################################
-          0809,06,06,06,06,06,00,36 ####################################
-          0810,06,06,06,06,06,00,36 ####################################
-          0811,06,06,06,06,06,00,36 ####################################
-          0812,06,06,06,06,06,00,36 ####################################
-          0813,06,05,06,06,06,00,33 #################################
-          0814,06,06,06,06,06,00,36 ####################################
-          0815,06,06,06,06,06,00,36 ####################################
-          0816,06,06,06,06,06,00,36 ####################################
-          0817,06,06,06,06,06,00,36 ####################################
-          0818,06,06,06,06,06,00,36 ####################################
-          0819,06,06,06,06,06,00,36 ####################################
-          0820,06,06,06,06,06,00,36 ####################################
-          0821,06,05,06,06,06,00,33 #################################
-          0822,06,06,06,06,06,00,36 ####################################
-          0823,06,05,06,06,06,00,33 #################################
-          0824,06,05,05,06,06,00,31 ###############################
-          0825,06,05,05,06,06,00,31 ###############################
-          0826,06,06,05,06,06,00,33 #################################
-          0827,06,06,06,06,06,00,36 ####################################
-          0828,06,06,06,06,06,00,36 ####################################
-          0829,06,06,06,06,06,00,36 ####################################
-          0830,06,06,06,06,06,00,36 ####################################
-          0831,06,06,06,06,06,00,36 ####################################
-          0832,06,06,06,06,06,00,36 ####################################
-          0833,06,06,06,06,06,00,36 ####################################
-          0834,06,06,06,06,06,00,36 ####################################
-          0835,06,06,06,06,06,00,36 ####################################
-          0836,06,06,06,06,06,00,36 ####################################
-          0837,06,06,06,06,06,00,36 ####################################
-          0838,06,06,06,06,06,00,36 ####################################
-          0839,06,06,06,06,06,00,36 ####################################
-          0840,06,06,06,06,06,00,36 ####################################
-          0841,06,06,06,06,06,00,36 ####################################
-          0842,06,06,06,06,06,00,36 ####################################
-          0843,06,06,06,06,06,00,36 ####################################
-          0844,06,06,06,06,06,00,36 ####################################
-          0845,06,06,06,06,06,00,36 ####################################
-          0846,06,06,06,06,06,00,36 ####################################
-          0847,06,06,06,06,06,00,36 ####################################
-          0848,06,06,06,06,06,00,36 ####################################
-          0849,06,06,06,06,06,00,36 ####################################
-          0850,06,06,06,06,06,00,36 ####################################
-          0851,06,06,06,06,06,00,36 ####################################
-          0852,06,06,06,06,06,00,36 ####################################
-          0853,06,06,06,06,06,00,36 ####################################
-          0854,06,06,06,06,06,00,36 ####################################
-          0855,06,06,06,06,06,00,36 ####################################
-          0856,06,05,06,06,06,00,33 #################################
-          0857,06,05,06,06,06,00,33 #################################
-          0858,06,05,05,06,06,00,31 ###############################
-          0859,06,05,05,06,06,00,31 ###############################
-          0860,06,05,05,06,06,00,31 ###############################
-          0861,06,05,05,06,06,00,31 ###############################
-          0862,06,05,05,06,06,00,31 ###############################
-          0863,06,05,06,06,06,00,33 #################################
-          0864,06,06,06,06,06,00,36 ####################################
-          0865,06,06,06,06,06,00,36 ####################################
-          0866,06,06,06,06,06,00,36 ####################################
-          0867,06,06,06,06,06,00,36 ####################################
-          0868,06,06,06,06,06,00,36 ####################################
-          0869,06,06,06,06,06,00,36 ####################################
-          0870,06,06,06,06,06,00,36 ####################################
-          0871,06,06,06,06,06,00,36 ####################################
-          0872,06,06,06,06,06,00,36 ####################################
-          0873,06,06,06,06,06,00,36 ####################################
-          0874,06,06,06,06,06,00,36 ####################################
-          0875,06,06,06,06,06,00,36 ####################################
-          0876,06,06,06,06,06,00,36 ####################################
-          0877,06,06,06,06,06,00,36 ####################################
-          0878,06,06,06,06,06,00,36 ####################################
-          0879,06,06,06,06,06,00,36 ####################################
-          0880,06,06,06,06,06,00,36 ####################################
-          0881,06,06,06,06,06,00,36 ####################################
-          0882,06,06,06,06,06,00,36 ####################################
-          0883,06,06,06,06,06,00,36 ####################################
-          0884,06,06,06,06,06,00,36 ####################################
-          0885,06,06,06,06,06,00,36 ####################################
-          0886,06,06,06,06,06,00,36 ####################################
-          0887,06,06,06,06,06,00,36 ####################################
-          0888,06,06,06,06,06,00,36 ####################################
-          0889,06,06,06,06,06,00,36 ####################################
-          0890,06,06,06,06,07,00,38 ######################################
-          0891,06,06,06,06,06,00,36 ####################################
-          0892,06,06,06,06,06,00,36 ####################################
-          0893,06,06,06,06,06,00,36 ####################################
-          0894,06,06,06,06,06,00,36 ####################################
-          0895,06,06,06,06,06,00,36 ####################################
-          0896,06,06,06,06,07,00,38 ######################################
-          0897,06,06,06,06,07,00,38 ######################################
-          0898,06,06,06,06,07,00,38 ######################################
-          0899,06,06,06,06,06,00,36 ####################################
-          0900,06,06,06,06,07,00,38 ######################################
-          0901,07,06,06,06,07,00,41 #########################################
-          0902,06,06,06,06,06,00,36 ####################################
-          0903,07,06,06,06,06,00,38 ######################################
-          0904,07,06,06,06,07,00,41 #########################################
-          0905,07,06,06,06,06,00,38 ######################################
-          0906,07,06,06,06,06,00,38 ######################################
-          0907,07,06,06,06,07,00,41 #########################################
-          0908,07,06,06,06,07,00,41 #########################################
-          0909,06,06,06,06,07,00,38 ######################################
-          0910,06,06,06,06,06,00,36 ####################################
-          0911,06,06,06,06,06,00,36 ####################################
-          0912,06,06,06,06,06,00,36 ####################################
-          0913,06,06,06,06,06,00,36 ####################################
-          0914,06,06,06,06,06,00,36 ####################################
-          0915,06,06,06,06,06,00,36 ####################################
-          0916,06,06,06,06,06,00,36 ####################################
-
-       The  mean-square value in column 8 determines the length of the hash line that follows when option -h is selected.  Lower
-       mean-square values indicate lower data handling capacity for that carrier frequency while higher values  indicate  higher
-       data  handling  capacity.   Mean-square values can range from 0 through 49.  For example, the distinct parabolic dip near
-       offset 41 indicates reduced data capacity at that frequency.  There is another near offset 673.  The actual carrier  fre‐
-       quencies  cannot  be  determined  without the corresponding amplitude map.  See the man page for program psnotch for more
-       information.
-
-       This program can be used to detect the presence of powerline interference when electronic test equipment  is  not  avail‐
-       able.  Although the frequency cannot be determined, the presence or absence of severe interferrence can be detected.
-
-       The  following  example  computes average signal-to-noise ratios (SNR) for each time slot and the entire tone map because
-       option -s is selected.  The AGC and GIL values for each slot are also displayed.  Option -s also suppresses tone map out‐
-       put.
-
-          # int6ktone -qs 000B3B00AAFA 00B05200CA0C
-           SNR   24.398   24.398   24.398   24.398   24.398   24.398
-           ATN  -35.602  -35.602  -35.602  -35.602  -35.602  -35.602
-           BPC    8.799      nan    8.799    8.799    8.799    8.799
-           AGC 04 04 04 04 04
-           GIL 00 00 00 00 00
-
-       The  SNR  values  shown  above are for a very clean and stable connection.  Once a tone map is computed it remains stable
-       unless the attenuation changes or noise is introduced while data is being transfered.  With no  data  transfer,  the  map
-       will automatically update after some (long) period, perhaps a minute, based on a number of interrelated factors.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-SEE ALSO
-       plc(1), int6krate(1), int6krule(1), int6kstat(1), pibnotch(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6ktone(1)
-
- - - diff --git a/docbook/int6ktone.c.html b/docbook/int6ktone.c.html deleted file mode 100644 index 627d051a..00000000 --- a/docbook/int6ktone.c.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - int6ktone.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6ktone.c - Atheros INT6x00 Tone Map Dump Utility
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../plc/Devices.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/SendMME.c"
-#include "../plc/SignalToNoise1.c"
-#include "../plc/ToneMaps1.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../tools/error.c"
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/hexstring.c"
-#include "../tools/todigit.c"
-#include "../tools/synonym.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ehi:qsvx",
-		"node peer [> stdout]",
-		"Qualcomm Atheros INT6x00 Tone Map Dump Utility",
-		"e\tredirect stderr to stdout",
-		"h\tprint mean-square histogram",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"q\tquiet mode",
-		"s\tcompute signal-to-noise and bits-per-carrier ratios",
-		"v\tverbose mode",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	signed (* function)(struct plc *) = ToneMaps1;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'h':
-			_setbits (plc.flags, PLC_GRAPH);
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_ANALYSE);
-			function = SignalToNoise1;
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (!argc || !argv)
-	{
-		error (1, ECANCELED, "No node address given");
-	}
-	if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-	{
-		error (1, errno, PLC_BAD_MAC, * argv);
-	}
-	argc--;
-	argv++;
-	if (!argc || !argv)
-	{
-		error (1, ECANCELED, "No peer address given");
-	}
-	if (!hexencode (plc.RDA, sizeof (plc.RDA), synonym (* argv, devices, SIZEOF (devices))))
-	{
-		error (1, errno, PLC_BAD_MAC, * argv);
-	}
-	argc--;
-	argv++;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	function (&plc);
-	free (plc.message);
-	closechannel (&channel);
-	return (0);
-}
-
-
-
- - - diff --git a/docbook/int6kuart.1.html b/docbook/int6kuart.1.html deleted file mode 100644 index e2585ce2..00000000 --- a/docbook/int6kuart.1.html +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - int6kuart.1 - - - - - - - - - -
-int6kuart(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6kuart(1)
-
-NAME
-       int6kuart - Qualcomm Atheros Serial Line Device Manager
-
-SYNOPSIS
-       int6kuart [options] [...]
-
-DESCRIPTION
-       Perform powerline device management operations over serial line interface.
-
-       Serial  line  commands  are  7-bit  ASCII character strings sent to the local powerline device over the host serial port.
-       They can be sent using any terminal emulator but this program will, in many cases, reduce typing and simplify  scripting.
-       It is especially useful for downloading device parameters and uploading device parameters or firmware because those oper‐
-       ations involve large volumes of data.  Also, this program permits decimal integer  arguments  in  many  cases  where  the
-       serial line commands require hexadecimal integer values.  See the COMMANDS section (below) for a list of supported serial
-       line commands.
-
-       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
-       instructions.
-
-COMMENTS
-       This  program  does not configure or reconfigure host serial port settings by default because most operating systems have
-       their own serial port configuration utility.  Be sure to configure host serial port settings before  using  this  program
-       because  other programs may change them before or after use.  Atheros factory default settings for UART-enabled powerline
-       devices are 115200 baud, 8 data bits, 1 stop bit, no parity and no flow control.  See option -b for a quick way to  match
-       host serial port settings the Qualcomm Atheros default settings.
-
-       On  Windows, use the DOS mode command.  The general form of this command is mode,baud,parity,databits,stopbits.  The fol‐
-       lowing example will set a Windows host to the default serial settings used by Atheros powerline devices.
-
-          # mode com3:115200,n,8,1
-
-       On Linux, use the stty utility to inspect and set serial port parameters.  The following  Linux  command  will  configure
-       serial  device  /dev/ttyS0 speed to 115200 baud with 8 data bits, 1 stop bit, no parity bit and no flow control.  Consult
-       the stty man page for an explanation of these and other options.
-
-          # stty -F /dev/ttyS0 115200 cs8 cstopb -parenb -ixon
-
-       On Linux, you can also use the minicom terminal emulator  to  communicate  using  the  underlying  serial  line  commands
-       described  in  the  COMMANDS  section.   The  minicom  program  reads default settings from configuration file /etc/mini‐
-       com/minirc.dfl if present on startup.  A basic configuration file looks like this:
-
-          pu port             /dev/ttyUSB0
-          pu baudrate         115200
-          pu bits             8
-          pu parity           N
-          pu stopbits         1
-          pu rtscts           No
-
-OPTIONS
-       -b     Set host serial port to the default settings mentioned above.  The original host  serial  port  settings  are  not
-              restored  when  the  program  terminates.  You must restore them manually or by other means.  Changing host serial
-              port settings will break serial communications with the local powerline device if the device is not using the same
-              settings.
-
-       -c command
-              Send  a custom serial line command to the local powerline device over the host serial interface.  Argument command
-              is sent as specified but will be terminated with a carriage return.  The command must be enclosed in quotes if  it
-              contains  spaces  or  special  characters.  This option can be used to send serial line commands that are not sup‐
-              ported by this program.
-
-       -C module
-              Commit downloaded parameters and/or firmware to NVM using the ATWNV serial line command.  Argument module  is  one
-              hexadecimal octet.  The low-order nibble contains the module number.  The high-order nibble contains optional con‐
-              trol bits.  Acceptable module values are 0x01=Firmware, 0x02=Parameters, 0x10=Force Flash and 0x20=Do Not  Reboot.
-              The default value is 0x00 which has no effect.  The 0x prefix is optional.
-
-       -d     Read  and  display  the destination device address using the ATDST serial line command.  This option is similar to
-              option -D but substitutes ? for the device address.
-
-       -D address
-              Set the destination device address for Transparent Mode using the ATDST serial line command.   This  address  will
-              supercede the default destination device address, stored in the PIB, until the device is reset.  Multicast address
-              values are not permitted by the device.  Argument address  is  six  hexadecimal  octets  optionally  separated  by
-              colons.
-
-       -F filename
-              Read  the named frame description file and send it over powerline as an Atheros vendor-specific management message
-              using the ATM serial line command.  Unlike program efsu, only the first file frame is sent.  Any subsequent frames
-              defined in the file are ignored.
-
-       -H     Exit Command Mode and enter High Speed Command Mode using the ATHSC serial line command.
-
-       -i     Get  and  display  network  information using the ATNI serial line command.  The information includes the TEI, MAC
-              address, receive rate and transmit rate for each remote device on the network.
-
-       -I     Get and display the PIB version and device MAC address using the ATRPM serial line command.
-
-       -m     Read and display the Network Membership Key of the local powerline device using  the  ATSK  serial  line  command.
-              This option is similar to option -M but substitutes ? for the membership key.
-
-       -M key Set the Network Membership Key of the local powerline device using the ATSK serial line command.  The key consists
-              of 16 hexadecimal octets optionally separated by colons.
-
-       -N filename
-              Open the named firmware file on the local host and write it to the local device using multiple ATWPF  serial  line
-              commands.  There is no default filename or extension.  The file is assumed to contain a valid firmware image.
-
-       -O     Exit  Command  Mode  and enter Transparent Mode using the ATO serial line command.  Subsequent serial data will be
-              transmitted over the powerline to the destination device address as raw data.  Use option -d to set  the  destina‐
-              tion device address.
-
-       -p filename
-              Read  the  parameter  block from the local powerline device and write it to the named file on the local host using
-              multiple ATRP serial line commands.  Required length and offset values are automatically computed for each  serial
-              line command sent.  There is no default filename or extention.
-
-       -P filename
-              Open  the  parameter file on the local host and write it to the local powerline device using multiple ATWPF serial
-              line commands.  Required length and offset values are automatically computed for each serial  line  command  sent.
-              There is no default filename or extention.  The named file is assumed to contain a valid parameter block.
-
-       -q     Suppress progress and error information on stderr.
-
-       -r     Read  and display the local powerline device hardware identifier and firmware version string using the ATRV serial
-              line command.
-
-       -R     Reset the local device using the ATZ serial line command
-
-       -s tty Communicate with the local powerline device over the named serial  interface  on  the  local  host.   The  program
-              default is "/dev/ttyUSB0" for Linux and "com1:" for Windows.  The program default is replaced if environment vari‐
-              able PLCUART is defined.  This option over-rides those default settings.
-
-       -S     Place the local power line device in Power Save Mode using the ATPS serial line command.
-
-       -t     Test device using the AT serial line command.  The device will respond with "OK" when in Command Mode.
-
-       -T     Restore factory defaults on the local power line device using the ATFD serial line command.  Among  other  things,
-              this will restore the destination device address stored in the factory PIB.  Any destination device address previ‐
-              ously set using option -d will be lost.
-
-       -u     Force default host port settings to match the default setting for UART-enabled  Atheros  powerline  devices.   The
-              setting  are  115200 baud, 8 data bits, no parity bits and 1 stop bit.  These settings will remain active when the
-              program terminates and will not change unless changed by some other means, perhaps by another  application.   This
-              option  is  an easy means of establishg an initial serial connection with a powerline device, unless it's settings
-              have been changed.
-
-       -v     Display actual serial line commands and responses on stdout.
-
-       -w     Place the local powerline device in Command Mode using the +++ serial line command. The device will remain in com‐
-              mand mode until it is reset or forced into Transparaent Mode or High Speed Command Mode.
-
-       -W timeout
-              Set the Transparent Mode aggregation timeout using the ATTO serial line command. The timeout is expressed in deci‐
-              mal milliseconds. Valid values are 1 through 2000.
-
-       -z     Get the Transparent Mode buffer size using the ATBSZ serial line command. This option is similar to option -B  but
-              substitutes ? for the buffer size.
-
-       -Z size
-              Set  the Transparent Mode buffer size using the ATBSZ serial line command. The size in bytes is specified in deci‐
-              mal here and converted to hexadecimal for transmission. Valid values range from 46 to 1500.  The  default  is  500
-              bytes.
-
-       -?,--help
-              Print program help summary on stdout. This option takes precedence over other options on the command line.
-
-       -!,--version
-              Print  program version information on stdout. This option takes precedence over other options on the command line.
-              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       None.
-
-COMMANDS
-       This  section  lists  serial  line  commands  recognized by local powerline devices when in Command Mode. Commands can be
-       issued interactively using a terminal emulator, like minicom on Linux or HyperTerminal on Windows or stored as  text  and
-       copied  to the serial port using system utilities, like cat on Linux or type on Windows. This program merely converts the
-       command line options and arguments described above into one or more of the serial line commands shown below.
-
-       +++    Exit Transparent Mode and enter Command Mode. See option -w above.
-
-       AT     Test for Command Mode by doing nothing, successfully. See option -t above.
-
-       ATBRmode,baudrate,databits,parity,stopbits,flowctrl
-              Set serial line parameters on the local powerline device. Beware that this will break the existing serial  connec‐
-              tion when the new parameters differ from those of the local host.
-
-       ATBSZ? Get Transparent Mode buffer size. See option -z above.
-
-       ATBSZsize
-              Set Transparent Mode buffer size. See option -Z above.
-
-       ATDST? Get Transparent Mode destination device address. See option -d above.
-
-       ATDSTaddress
-              Set Transparent Mode destination device address. See option -D above.
-
-       ATFD   Reset local device to factory defaults. See option -T above.
-
-       ATHSC  Exit  Command Mode and enter High Speed Command Mode. Once the OK response is received, the local host should send
-              commands to the device at successively higher speeds until a valid response is received.
-
-       ATMmessage
-              Send an Atheros vendor-specific management message over powerline. The message is expressed as a series  of  hexa‐
-              decimal digits.
-
-       ATNI?  Read  nework information and store the information internally. Return the number of associated stations and infor‐
-              mation about the first associated station. The information includes the peer station device address, TX  rate  and
-              RX rate.
-
-       ATNIstation
-              Extract and display previously stored network information for a specific peer station. The information returned is
-              that previosly stored using a ATNI serial line command query.
-
-       ATO    Exit Command Mode and enter Transparent Mode. Successful switch requires a valid destination MAC  address,  buffer
-              size  and aggregation timeout value. Use serial line commands ATDST and ATBSZ to get and/or set the first two val‐
-              ues. Use serial line command ATTO to set the timeout value.
-
-       ATPStime
-              Place the device in Power Save Mode for a specified time in seconds. Valid  values  are  1  to  384  seconds.  The
-              default time is A seconds.
-
-       ATRPlength,offset
-              Read  and  display  a  parameter block segment where length is the number of bytes read and offset is the relative
-              position, in bytes, from the start of the parameter block. Valid length values are 0 through 400 hexadecimal.  See
-              option -p above to read and save an entire parameter block.
-
-       ATRPM  Get PIB version and device MAC address.
-
-       ATRV   Get hardware and firmware revision. See option -r above.
-
-       ATSK?  Get device Network Membership Key. See option -m above.
-
-       ATSKkey
-              Set device Network Membership Key. See option -M above.
-
-       ATTO?  Get the Transparent Mode aggregation timeout in milliseconds.
-
-       ATTOtimeout
-              Set the Transparent Mode aggregation timeout in milliseconds. See option -W above.
-
-       ATWNVmodule
-              Update NVM with PIB and/or Firmware module. See option -C above.
-
-       ATWPFmodule,length,offset,checksum,data
-              Write  a  parameter block or firmware segment to the local powerline device where module is the module identifier,
-              length is the number of bytes to write, offset is the relative position from the start of the module, checksum  is
-              the  1's  complement of the data and data is the data to be written.  Valid module identifiers are 1=FW and 2=PIB.
-              Valid length values are 0 up to 400 hexadecimal.  See options -N and -P above to write an entire  parameter  block
-              or firmware images.
-
-       ATZ    Reset device.  See option -R above.
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros  serial line commands are proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
-       available.  Qualcomm Atheros reserves the right to modify command line syntax or command functionality in future firmware
-       releases without any obligation to notify or compensate product or program users.
-
-EXAMPLES
-       The  following example places the device in Command Mode (wakeup).  Serial line commands are ignored unless the device is
-       in this mode so this is often the first command issued.
-
-          # int6kuart -w
-
-       The next example sets the destination device address on the local powerline  device  to  00B052BABE12.   The  destination
-       device can be any remote powerline device on the same logical network as the local device.
-
-          # int6kuart -D 00:B0:52:BA:BE:12
-
-       The next example places the device in Transparent Mode where serial line output is sent over powerline to the destination
-       powerline device and forwarded the remote host connected to it.
-
-          # int6kuart -O
-
-       The next example sends the serial line command "ATSK?" to the local powerline device.
-
-          # int6kuart -c "ATSK?"
-
-SEE ALSO
-       amp(1), int6kbaud(1), ttysig(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6kuart(1)
-
- - - diff --git a/docbook/int6kuart.c.html b/docbook/int6kuart.c.html deleted file mode 100644 index 50b205b0..00000000 --- a/docbook/int6kuart.c.html +++ /dev/null @@ -1,1411 +0,0 @@ - - - - - - int6kuart.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kuart.c - Atheros Serial Line Device Manager;
- *
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *	Mathieu Olivari <mathieu@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined (WIN32)
-#	include <net/ethernet.h>
-#elif defined (__linux__)
-#	include <net/ethernet.h>
-#elif defined (__APPLE__)
-#	include <net/ethernet.h>
-#elif defined (__OpenBSD__)
-#	include <sys/socket.h>
-#	include <net/if.h>
-#	include <net/if_arp.h>
-#	include <netinet/in.h>
-#	include <netinet/if_ether.h>
-#else
-#error "Unknown Environment"
-#endif
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/number.h"
-#include "../tools/memory.h"
-#include "../tools/endian.h"
-#include "../tools/files.h"
-#include "../tools/flags.h"
-#include "../tools/error.h"
-#include "../tools/types.h"
-#include "../serial/serial.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/basespec.c"
-#include "../tools/synonym.c"
-#include "../tools/todigit.c"
-#include "../tools/error.c"
-#include "../tools/checksum32.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexstring.c"
-#include "../tools/hexdecode.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../serial/openport.c"
-#include "../serial/closeport.c"
-#include "../serial/serial.c"
-#endif
-
-/*====================================================================*
- *   program constants;
- *--------------------------------------------------------------------*/
-
-#define FRAME_MIN_CHAR 120
-#define FRAME_MAX_CHAR 1496
-
-/*====================================================================*
- *   program variables;
- *--------------------------------------------------------------------*/
-
-typedef struct uart
-
-{
-	struct _file_ port;
-	struct _file_ pib;
-	struct _file_ nvm;
-	struct _file_ eth;
-	char const * string;
-	char PIBVersion [3];
-	char IMGVersion [128];
-	byte MACAddress [ETHER_ADDR_LEN];
-	char NMKDigest [16];
-	byte NMKNumber;
-	byte module;
-	uint16_t bfsize;
-	uint16_t snooze;
-	uint16_t timeout;
-	unsigned flags;
-}
-
-uart;
-
-/*====================================================================*
- *
- *   void at_writenvm (struct uart * uart);
- *
- *   read firmware image from file and send to device using command
- *   "ATWPF"; the file descriptor is "nvm" member of struct uart;
- *
- *--------------------------------------------------------------------*/
-
-static void at_writenvm (struct uart * uart)
-
-{
-	extern struct command command;
-	byte memory [UART_BLOCKSIZE];
-	signed mblock = sizeof (memory);
-	uint16_t mlength = 0;
-	uint32_t moffset = 0;
-	uint32_t mchksum;
-	uint16_t olength = 0;
-	uint32_t ooffset = 0;
-	uint32_t ochksum;
-	while ((mblock = read (uart->nvm.file, memory, mblock)) > 0)
-	{
-		clearcommand ();
-		insert ('A');
-		insert ('T');
-		insert ('W');
-		insert ('P');
-		insert ('F');
-		insert ('1');
-		insert (',');
-		mchksum = checksum32 (memory, (size_t)(mblock), 0);
-		mlength = (uint16_t)(mblock);
-		mlength = HTOBE16 (mlength);
-		decode (&mlength, sizeof (mlength));
-		mlength = BE16TOH (mlength);
-		insert (',');
-		moffset = HTOBE32 (moffset);
-		decode (&moffset, sizeof (moffset));
-		moffset = BE32TOH (moffset);
-		insert (',');
-		mchksum = HTOBE32 (mchksum);
-		decode (&mchksum, sizeof (mchksum));
-		mchksum = BE32TOH (mchksum);
-		insert (',');
-		decode (memory, mlength);
-		insert ('\r');
-		sendcommand (&uart->port, uart->flags);
-		readcommand (&uart->port, uart->flags);
-		mustbe ('O');
-		mustbe ('K');
-		mustbe ('1');
-		mustbe (',');
-		olength = (uint16_t)(hextoint (sizeof (olength)));
-		if (olength != mlength)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: expected length %X", command.buffer, mlength);
-		}
-		mustbe (',');
-		ooffset = (uint32_t)(hextoint (sizeof (ooffset)));
-		if (ooffset != moffset)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: expected offset %X", command.buffer, moffset);
-		}
-		mustbe (',');
-		ochksum = (uint32_t)(hextoint (sizeof (ochksum)));
-		if (ochksum != mchksum)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: expected checksum %X (%X)", command.buffer, mchksum, ochksum);
-		}
-		mustbe (',');
-		encode (memory, mblock);
-		mustbe ('\r');
-		moffset += mlength;
-		if (_allclr (uart->flags, (UART_VERBOSE | UART_SILENCE)))
-		{
-			write (STDOUT_FILENO, ".", 1);
-		}
-	}
-
-#ifndef WIN32
-
-	if (_allclr (uart->flags, (UART_VERBOSE | UART_SILENCE)))
-	{
-		write (STDOUT_FILENO, "\n", 1);
-	}
-
-#endif
-
-	return;
-}
-
-/*====================================================================*
- *
- *   void at_writepib (struct uart * uart);
- *
- *   read parameter block file and send to device using command
- *   "ATWPF"; the file descriptor is "pib" member of struct uart;
- *
- *--------------------------------------------------------------------*/
-
-static void at_writepib (struct uart * uart)
-
-{
-	extern struct command command;
-	byte memory [UART_BLOCKSIZE];
-	signed mblock = sizeof (memory);
-	uint16_t mlength = 0;
-	uint16_t moffset = 0;
-	uint32_t mchksum;
-	uint16_t olength = 0;
-	uint16_t ooffset = 0;
-	uint32_t ochksum;
-	while ((mblock = read (uart->pib.file, memory, mblock)) > 0)
-	{
-		clearcommand ();
-		insert ('A');
-		insert ('T');
-		insert ('W');
-		insert ('P');
-		insert ('F');
-		insert ('2');
-		insert (',');
-		mchksum = checksum32 (memory, (size_t)(mblock), 0);
-		mlength = (uint16_t)(mblock);
-		mlength = HTOBE16 (mlength);
-		decode (&mlength, sizeof (mlength));
-		mlength = BE16TOH (mlength);
-		insert (',');
-		moffset = HTOBE16 (moffset);
-		decode (&moffset, sizeof (moffset));
-		moffset = BE16TOH (moffset);
-		insert (',');
-		mchksum = HTOBE32 (mchksum);
-		decode (&mchksum, sizeof (mchksum));
-		mchksum = BE32TOH (mchksum);
-		insert (',');
-		decode (memory, mlength);
-		insert ('\r');
-		sendcommand (&uart->port, uart->flags);
-		readcommand (&uart->port, uart->flags);
-		mustbe ('O');
-		mustbe ('K');
-		mustbe ('2');
-		mustbe (',');
-		olength = (uint16_t)(hextoint (sizeof (olength)));
-		if (olength != mlength)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: expected length %X", command.buffer, mlength);
-		}
-		mustbe (',');
-		ooffset = (uint16_t)(hextoint (sizeof (ooffset)));
-		if (ooffset != moffset)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: expected offset %X", command.buffer, moffset);
-		}
-		mustbe (',');
-		ochksum = (uint32_t)(hextoint (sizeof (ochksum)));
-		if (ochksum != mchksum)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: expected checksum %X (%X)", command.buffer, mchksum, ochksum);
-		}
-		mustbe (',');
-		encode (memory, mblock);
-		mustbe ('\r');
-		moffset += mlength;
-		if (_allclr (uart->flags, (UART_VERBOSE | UART_SILENCE)))
-		{
-			write (STDOUT_FILENO, ".", 1);
-		}
-	}
-
-#ifndef WIN32
-
-	if (_allclr (uart->flags, (UART_VERBOSE | UART_SILENCE)))
-	{
-		write (STDOUT_FILENO, "\n", 1);
-	}
-
-#endif
-
-	return;
-}
-
-/*====================================================================*
- *
- *   void at_readpib (struct uart * uart);
- *
- *   read parameter block from device and save to file using command
- *   "ATRP"; the file descriptor is "pib" member of struct uart;
- *
- *--------------------------------------------------------------------*/
-
-static void at_readpib (struct uart * uart)
-
-{
-	extern struct command command;
-	byte memory [UART_BLOCKSIZE];
-	signed mblock = sizeof (memory);
-	uint16_t mextent = 0;
-	uint16_t mlength = 0;
-	uint16_t moffset = 0;
-	uint16_t olength = 0;
-	uint16_t ooffset = 0;
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('R');
-	insert ('P');
-	insert ('2');
-	insert (',');
-	insert ('4');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('2');
-	mustbe (',');
-	mustbe ('4');
-	mustbe (',');
-	encode (&mextent, sizeof (mextent));
-	mextent = LE16TOH (mextent);
-	mustbe ('\r');
-	while (mextent)
-	{
-		clearcommand ();
-		insert ('A');
-		insert ('T');
-		insert ('R');
-		insert ('P');
-		if (mblock > mextent)
-		{
-			mblock = mextent;
-		}
-		mlength = (uint16_t)(mblock);
-		mlength = HTOBE16 (mlength);
-		decode (&mlength, sizeof (mlength));
-		mlength = BE16TOH (mlength);
-		insert (',');
-		moffset = HTOBE16 (moffset);
-		decode (&moffset, sizeof (moffset));
-		moffset = BE16TOH (moffset);
-		insert ('\r');
-		sendcommand (&uart->port, uart->flags);
-		readcommand (&uart->port, uart->flags);
-		mustbe ('O');
-		mustbe ('K');
-		olength = (uint16_t)(hextoint (sizeof (olength)));
-		if (olength != mlength)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: have %d bytes but wanted %d", command.buffer, olength, mlength);
-		}
-		mustbe (',');
-		ooffset = (uint16_t)(hextoint (sizeof (ooffset)));
-		if (ooffset != moffset)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, EINVAL, "[%s]: expected offset %X", command.buffer, moffset);
-		}
-		mustbe (',');
-		encode (memory, mblock);
-		if (write (uart->pib.file, memory, mblock) < mblock)
-		{
-			command.buffer [command.offset] = (char)(0);
-			error (1, errno, "[%s]: expected length %d", command.buffer, mblock);
-		}
-		mustbe ('\r');
-		moffset += mblock;
-		mextent -= mblock;
-		if (_allclr (uart->flags, (UART_VERBOSE | UART_SILENCE)))
-		{
-			write (STDOUT_FILENO, ".", 1);
-		}
-	}
-
-#ifndef WIN32
-
-	if (_allclr (uart->flags, (UART_VERBOSE | UART_SILENCE)))
-	{
-		write (STDOUT_FILENO, "\n", 1);
-	}
-
-#endif
-
-	return;
-}
-
-/*====================================================================*
- *
- *   void at_wake (struct uart * uart);
- *
- *   send wake command "+++" to enter command mode;
- *
- *--------------------------------------------------------------------*/
-
-static void at_wake (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('+');
-	insert ('+');
-	insert ('+');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void at_command (struct uart * uart);
- *
- *   send custom command; use this function to send any serial line
- *   command that may not be supported by this program;
- *
- *--------------------------------------------------------------------*/
-
-static void at_command (struct uart * uart)
-
-{
-	clearcommand ();
-	while (*uart->string)
-	{
-		insert (*uart->string++);
-	}
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	clearcommand ();
-	return;
-}
-
-/*====================================================================*
- *
- *   void at_respond (struct uart * uart);
- *
- *   send command "AT" to test command mode; this command does nothing
- *   but echo "OK";
- *
- *--------------------------------------------------------------------*/
-
-static void at_respond (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void atz (struct uart * uart);
- *
- *   send command "ATZ" to reset the device; no response is expected;
- *
- *--------------------------------------------------------------------*/
-
-static void atz (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('Z');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	return;
-}
-
-/*====================================================================*
- *
- *   void atrv (struct uart * uart);
- *
- *   read and display the firmware image version using command "ATRV";
- *   return the version string in IMGVersion member of struct uart;
- *
- *--------------------------------------------------------------------*/
-
-static void atrv (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('R');
-	insert ('V');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\"');
-	string (uart->IMGVersion);
-	mustbe ('\"');
-	mustbe ('\r');
-	printf ("%s\n", uart->IMGVersion);
-	return;
-}
-
-/*====================================================================*
- *
- *   void atrpm (struct uart * uart);
- *
- *   read and display the PIB version and MAC address using command
- *   "ATRPM"; return version string in PIBVersion member and address
- *   string in MACAddress member of struct
- *
- *
- *--------------------------------------------------------------------*/
-
-static void atrpm (struct uart * uart)
-
-{
-	char mac [ETHER_ADDR_LEN * 3];
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('R');
-	insert ('P');
-	insert ('M');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\"');
-	string (uart->PIBVersion);
-	mustbe ('\"');
-	mustbe (',');
-	encode (uart->MACAddress, sizeof (uart->MACAddress));
-	mustbe ('\r');
-	printf ("%s %s\n", uart->PIBVersion, hexstring (mac, sizeof (mac), uart->MACAddress, sizeof (uart->MACAddress)));
-	return;
-}
-
-/*====================================================================*
- *
- *   void atsk1 (struct uart * uart);
- *
- *   send Set Key command "ATSK"; ask device for NMK; encode returned
- *   key into uart-NMK;
- *
- *--------------------------------------------------------------------*/
-
-static void atsk1 (struct uart * uart)
-
-{
-	char key [48];
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('S');
-	insert ('K');
-	insert ('?');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	encode (uart->NMKDigest, sizeof (uart->NMKDigest));
-	mustbe ('\r');
-	printf ("%s\n", hexstring (key, sizeof (key), uart->NMKDigest, sizeof (uart->NMKDigest)));
-	return;
-}
-
-/*====================================================================*
- *
- *   void atsk2 (struct uart * uart);
- *
- *   send Set Key command "ATSK"; send device the NMK; encode returned
- *
- *--------------------------------------------------------------------*/
-
-static void atsk2 (struct uart * uart)
-
-{
-	char key [48];
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('S');
-	insert ('K');
-	decode (uart->NMKDigest, sizeof (uart->NMKDigest));
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	encode (uart->NMKDigest, sizeof (uart->NMKDigest));
-	mustbe ('\r');
-	printf ("%s\n", hexstring (key, sizeof (key), uart->NMKDigest, sizeof (uart->NMKDigest)));
-	return;
-}
-
-/*====================================================================*
- *
- *   void atdst1 (struct uart * uart);
- *
- *   read transparent mode destination MAC address command "ATDST?";
- *
- *--------------------------------------------------------------------*/
-
-static void atdst1 (struct uart * uart)
-
-{
-	char mac [ETHER_ADDR_LEN * 3];
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('D');
-	insert ('S');
-	insert ('T');
-	insert ('?');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	encode (uart->MACAddress, sizeof (uart->MACAddress));
-	mustbe ('\r');
-	printf ("%s\n", hexstring (mac, sizeof (mac), uart->MACAddress, sizeof (uart->MACAddress)));
-	return;
-}
-
-/*====================================================================*
- *
- *   void atdst2 (struct uart * uart);
- *
- *   read transparent mode destination MAC address command "ATDST?";
- *
- *--------------------------------------------------------------------*/
-
-static void atdst2 (struct uart * uart)
-
-{
-	char mac [ETHER_ADDR_LEN * 3];
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('D');
-	insert ('S');
-	insert ('T');
-	decode (uart->MACAddress, sizeof (uart->MACAddress));
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	encode (uart->MACAddress, sizeof (uart->MACAddress));
-	mustbe ('\r');
-	printf ("%s\n", hexstring (mac, sizeof (mac), uart->MACAddress, sizeof (uart->MACAddress)));
-	return;
-}
-
-/*====================================================================*
- *
- *   void atni (struct uart * uart);
- *
- *   reset device to factory default pib command "ATNI";
- *
- *--------------------------------------------------------------------*/
-
-static void atni (struct uart * uart)
-
-{
-	unsigned count;
-	unsigned index;
-	uint16_t rxrate;
-	uint16_t txrate;
-	byte address [ETHER_ADDR_LEN];
-	char mac [ETHER_ADDR_LEN * 3];
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('N');
-	insert ('I');
-	insert ('?');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	count = (unsigned)(hextoint (sizeof (unsigned)));
-	while (count--)
-	{
-		mustbe (',');
-		index = (unsigned)(hextoint (sizeof (index)));
-		mustbe (',');
-		encode (address, sizeof (address));
-		mustbe (',');
-		txrate = (uint16_t)(hextoint (sizeof (rxrate)));
-		mustbe (',');
-		rxrate = (uint16_t)(hextoint (sizeof (txrate)));
-		printf ("%d %s %3d RX %3d TX\n", index, hexstring (mac, sizeof (mac), address, sizeof (address)), rxrate, txrate);
-	}
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void atfd (struct uart * uart);
- *
- *   reset device to factory default pib command "ATFD";
- *
- *--------------------------------------------------------------------*/
-
-static void atfd (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('F');
-	insert ('D');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void atps (struct uart * uart);
- *
- *   etner power save mode command "ATPS";
- *
- *--------------------------------------------------------------------*/
-
-static void atps (struct uart * uart)
-
-{
-	extern struct command command;
-	uint16_t result;
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('P');
-	insert ('S');
-	uart->snooze = HTOBE16 (uart->snooze);
-	decode (&uart->snooze, sizeof (uart->snooze));
-	uart->snooze = BE16TOH (uart->snooze);
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	result = (uint16_t)(hextoint (sizeof (result)));
-	if (result != uart->snooze)
-	{
-		error (1, EINVAL, "[%s]: expected timeout %04X", command.buffer, uart->snooze);
-	}
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void ato (struct uart * uart);
- *
- *   exit command mode and enter tyransparent mode command "ATO";
- *
- *--------------------------------------------------------------------*/
-
-static void ato (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('O');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void athsc (struct uart * uart);
- *
- *   exit command mode; enter high speed command mode "ATHSC";
- *
- *--------------------------------------------------------------------*/
-
-static void athsc (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('H');
-	insert ('S');
-	insert ('C');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void atwnv (struct uart * uart);
- *
- *   write PIB and/or IMG to NVM "ATWNVx";
- *
- *--------------------------------------------------------------------*/
-
-static void atwnv (struct uart * uart)
-
-{
-	extern struct command command;
-	byte result;
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('W');
-	insert ('N');
-	insert ('V');
-	decode (&uart->module, sizeof (uart->module));
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	result = (byte)(hextoint (sizeof (result)));
-	if (result != uart->module)
-	{
-		error (1, EINVAL, "[%s]: expected module %d", command.buffer, uart->module);
-	}
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void atbsz1 (struct uart * uart);
- *
- *   get transparent mode buffer size "ATBSZ?";
- *
- *--------------------------------------------------------------------*/
-
-static void atbsz1 (struct uart * uart)
-
-{
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('B');
-	insert ('S');
-	insert ('Z');
-	insert ('?');
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	uart->bfsize = (uint16_t)(hextoint (sizeof (uart->bfsize)));
-	mustbe ('\r');
-	printf ("%d\n", uart->bfsize);
-	return;
-}
-
-/*====================================================================*
- *
- *   void atbsz2 (struct uart * uart);
- *
- *   set transparent mode buffer size "ATBSZn";
- *
- *--------------------------------------------------------------------*/
-
-static void atbsz2 (struct uart * uart)
-
-{
-	extern struct command command;
-	uint16_t result;
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('B');
-	insert ('S');
-	insert ('Z');
-	uart->bfsize = HTOBE16 (uart->bfsize);
-	decode (&uart->bfsize, sizeof (uart->bfsize));
-	uart->bfsize = BE16TOH (uart->bfsize);
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	result = (uint16_t)(hextoint (sizeof (result)));
-	if (result != uart->bfsize)
-	{
-		error (1, EINVAL, "[%s]: expected buffer size %04X", command.buffer, uart->bfsize);
-	}
-	mustbe ('\r');
-	printf ("%d\n", uart->bfsize);
-	return;
-}
-
-/*====================================================================*
- *
- *   void atto (struct uart * uart);
- *
- *   set transparent mode buffer timeout "ATTO";
- *
- *--------------------------------------------------------------------*/
-
-static void atto (struct uart * uart)
-
-{
-	extern struct command command;
-	uint16_t result;
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('T');
-	insert ('O');
-	uart->timeout = HTOBE16 (uart->timeout);
-	decode (&uart->timeout, sizeof (uart->timeout));
-	uart->timeout = BE16TOH (uart->timeout);
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	mustbe ('O');
-	mustbe ('K');
-	result = (uint16_t)(hextoint (sizeof (result)));
-	if (result != uart->timeout)
-	{
-		error (1, EINVAL, "[%s]: expected timeout %04X", command.buffer, uart->timeout);
-	}
-	mustbe ('\r');
-	return;
-}
-
-/*====================================================================*
- *
- *   void atm (struct uart * uart);
- *
- *
- *--------------------------------------------------------------------*/
-
-static void atm (struct uart * uart)
-
-{
-	extern struct command command;
-	uint8_t buffer [ETHER_MAX_LEN + ETHER_MAX_LEN + 512];
-	unsigned length = (unsigned)(readframe (uart->eth.file, buffer, sizeof (buffer)));
-	if (length < FRAME_MIN_CHAR)
-	{
-		error (1, ENOTSUP, "Frame specification of %d bytes less than %d minimum", (length >> 1), (FRAME_MIN_CHAR >> 1));
-	}
-	if (length > FRAME_MAX_CHAR)
-	{
-		error (1, ENOTSUP, "Frame specification of %d bytes more than %d maximum", (length >> 1), (FRAME_MAX_CHAR >> 1));
-	}
-	clearcommand ();
-	insert ('A');
-	insert ('T');
-	insert ('M');
-	memcpy (command.buffer + command.length, buffer, length);
-	command.length += (signed)(length);
-	insert ('\r');
-	sendcommand (&uart->port, uart->flags);
-	readcommand (&uart->port, uart->flags);
-	write (STDOUT_FILENO, command.buffer, command.length);
-	write (STDOUT_FILENO, "\n", sizeof (char));
-	return;
-}
-
-/*====================================================================*
- *
- *   void manager (struct uart * uart);
- *
- *   examine flagword in struct uart and perform requested operations
- *   in the order that bits are tested; the order that bits are tested
- *   may be changed as needed;
- *
- *--------------------------------------------------------------------*/
-
-static void manager (struct uart * uart)
-
-{
-	if (_anyset (uart->flags, UART_WAKE))
-	{
-		at_wake (uart);
-	}
-	if (_anyset (uart->flags, UART_COMMAND))
-	{
-		at_command (uart);
-	}
-	if (_anyset (uart->flags, UART_RESPOND))
-	{
-		at_respond (uart);
-	}
-	if (_anyset (uart->flags, UART_ATRV))
-	{
-		atrv (uart);
-	}
-	if (_anyset (uart->flags, UART_ATRPM))
-	{
-		atrpm (uart);
-	}
-	if (_anyset (uart->flags, UART_ATDST1))
-	{
-		atdst1 (uart);
-	}
-	if (_anyset (uart->flags, UART_ATDST2))
-	{
-		atdst2 (uart);
-	}
-	if (_anyset (uart->flags, UART_ATZ))
-	{
-		atz (uart);
-	}
-	if (_anyset (uart->flags, UART_ATFD))
-	{
-		atfd (uart);
-	}
-	if (_anyset (uart->flags, UART_ATPS))
-	{
-		atps (uart);
-	}
-	if (_anyset (uart->flags, UART_ATO))
-	{
-		ato (uart);
-	}
-	if (_anyset (uart->flags, UART_ATNI))
-	{
-		atni (uart);
-	}
-	if (_anyset (uart->flags, UART_ATHSC))
-	{
-		athsc (uart);
-	}
-	if (_anyset (uart->flags, UART_ATSK1))
-	{
-		atsk1 (uart);
-	}
-	if (_anyset (uart->flags, UART_ATSK2))
-	{
-		atsk2 (uart);
-	}
-	if (_anyset (uart->flags, UART_ATRP))
-	{
-		at_readpib (uart);
-	}
-	if (_anyset (uart->flags, UART_ATWPF1))
-	{
-		at_writenvm (uart);
-	}
-	if (_anyset (uart->flags, UART_ATWPF2))
-	{
-		at_writepib (uart);
-	}
-	if (_anyset (uart->flags, UART_ATWNV))
-	{
-		atwnv (uart);
-	}
-	if (_anyset (uart->flags, UART_ATBSZ1))
-	{
-		atbsz1 (uart);
-	}
-	if (_anyset (uart->flags, UART_ATBSZ2))
-	{
-		atbsz2 (uart);
-	}
-	if (_anyset (uart->flags, UART_ATM))
-	{
-		atm (uart);
-	}
-	if (_anyset (uart->flags, UART_ATTO))
-	{
-		atto (uart);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv []);
- *
- *
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	static char const * optv [] =
-	{
-		"bc:C:dD:F:HiImM:n:N:Op:P:qrRS:s:tTvwW:zZ:",
-		"",
-		"Atheros Serial Line Device Manager",
-		"b\tset default host baud rate",
-		"c s\tsend custom serial line command (s)",
-		"C x\tcommit module (x) to NVM [ATWNVx]",
-		"d\tget destination mac address [ATDST?]",
-		"D x\tset destination mac address [ATDSTx]",
-		"F f\tframe file is (s)",
-		"H\tplace device in High Speed Command Mode [ATHSC]",
-		"i\tget network information [ATNI]",
-		"I\tget PIB version and MAC address [ATRPM]",
-		"m\tget network membership key [ATSK?]",
-		"M x\tset network membership key [ATSKx]",
-		"N f\twrite NVM file (f) to SDRAM [ATWFP1]",
-		"O\tplace device in Transparent Mode [ATO]",
-		"p f\tread PIB from SDRAM to file (f) [ATRP]",
-		"P f\twrite PIB file (f) to SDRAM [ATWFP2]",
-		"q\tplace program in quiet mode",
-		"r\tget parameter/firmware revision [ATRV]",
-		"R\treset device [ATZ]",
-		"s f\tserial port is (f) [" DEVICE "]",
-		"S n\tenter power save mode for (n) seconds [ATPS]",
-		"t\ttest device [AT]",
-		"T\treset to factory defaults [ATFD]",
-		"v\tplace program verbose mode",
-		"w\tplace device in Command Mode [+++]",
-		"W x\tset Transparent Mode aggregation timeout [ATTO]",
-		"z\tget Transparent Mode buffer size [ATBSZ?]",
-		"Z n\tset Transparent Mode buffer size [ATBSZn]",
-		(char const *) (0)
-	};
-	struct uart uart =
-	{
-		{
-			0,
-			DEVICE
-		},
-		{
-			-1,
-			"nvmfile"
-		},
-		{
-			-1,
-			"pibfile"
-		},
-		{
-			-1,
-			"ethfile"
-		},
-		(char *)(0),
-		{
-			0
-		},
-		{
-			0
-		},
-		{
-			0
-		},
-		{
-			0
-		},
-		(uint8_t)(0),
-		(uint8_t)(0),
-		(uint16_t)(0),
-		(uint16_t)(0),
-		(uint16_t)(0),
-		(unsigned)(0)
-	};
-	signed c;
-	if (getenv (UART_PORT))
-	{
-		uart.port.name = strdup (getenv (UART_PORT));
-	}
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'b':
-			_setbits (uart.flags, UART_DEFAULT);
-			break;
-		case 'c':
-			_setbits (uart.flags, UART_COMMAND);
-			uart.string = optarg;
-			break;
-		case 'C':
-			_setbits (uart.flags, UART_ATWNV);
-			uart.module = (byte)(basespec (optarg, 16, sizeof (uart.module)));
-			break;
-		case 'd':
-			_setbits (uart.flags, UART_ATDST1);
-			break;
-		case 'D':
-			_setbits (uart.flags, UART_ATDST2);
-			if (!hexencode (uart.MACAddress, sizeof (uart.MACAddress), optarg))
-			{
-				error (1, errno, PLC_BAD_MAC, optarg);
-			}
-			break;
-		case 'F':
-			if ((uart.eth.file = open (uart.eth.name = optarg, O_BINARY | O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", uart.eth.name);
-			}
-			_setbits (uart.flags, UART_ATM);
-			break;
-		case 'H':
-			_setbits (uart.flags, UART_ATHSC);
-			break;
-		case 'i':
-			_setbits (uart.flags, UART_ATNI);
-			break;
-		case 'I':
-			_setbits (uart.flags, UART_ATRPM);
-			break;
-		case 'm':
-			_setbits (uart.flags, UART_ATSK1);
-			break;
-		case 'M':
-			_setbits (uart.flags, UART_ATSK2);
-			if (!hexencode (uart.NMKDigest, sizeof (uart.NMKDigest), optarg))
-			{
-				error (1, errno, PLC_BAD_NMK, optarg);
-			}
-			break;
-		case 'N':
-			if ((uart.nvm.file = open (uart.nvm.name = optarg, O_BINARY | O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", uart.nvm.name);
-			}
-			_setbits (uart.flags, UART_ATWPF1);
-			break;
-		case 'O':
-			_setbits (uart.flags, UART_ATO);
-			break;
-		case 'P':
-			if ((uart.pib.file = open (uart.pib.name = optarg, O_BINARY | O_RDONLY)) == -1)
-			{
-				error (1, errno, "%s", uart.pib.name);
-			}
-			_setbits (uart.flags, UART_ATWPF2);
-			break;
-		case 'p':
-			if ((uart.pib.file = open (uart.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
-			{
-				error (1, errno, "%s", uart.pib.name);
-			}
-
-#ifndef WIN32
-
-			chown (optarg, getuid (), getgid ());
-
-#endif
-
-			_setbits (uart.flags, UART_ATRP);
-			break;
-		case 'q':
-			_setbits (uart.flags, UART_SILENCE);
-			break;
-		case 'r':
-			_setbits (uart.flags, UART_ATRV);
-			break;
-		case 'R':
-			_setbits (uart.flags, UART_ATZ);
-			break;
-		case 'S':
-			_setbits (uart.flags, UART_ATPS);
-			uart.snooze = (uint16_t)(uintspec (optarg, 1, 900));
-			break;
-		case 's':
-			uart.port.name = optarg;
-			break;
-		case 'T':
-			_setbits (uart.flags, UART_ATFD);
-			break;
-		case 't':
-			_setbits (uart.flags, UART_RESPOND);
-			break;
-		case 'v':
-			_setbits (uart.flags, UART_VERBOSE);
-			break;
-		case 'w':
-			_setbits (uart.flags, UART_WAKE);
-			break;
-		case 'W':
-			_setbits (uart.flags, UART_ATTO);
-			uart.timeout = (unsigned)(uintspec (optarg, 1, 2000));
-			break;
-		case 'z':
-			_setbits (uart.flags, UART_ATBSZ1);
-			break;
-		case 'Z':
-			_setbits (uart.flags, UART_ATBSZ2);
-			uart.bfsize = (uint16_t)(uintspec (optarg, 1, 1500));
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	if (argc)
-	{
-		error (1, ENOTSUP, ERROR_TOOMANY);
-	}
-	openport (&uart.port, uart.flags);
-	manager (&uart);
-	closeport (&uart.port);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/int6kwait.1.html b/docbook/int6kwait.1.html deleted file mode 100644 index 39ffc570..00000000 --- a/docbook/int6kwait.1.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - int6kwait.1 - - - - - - - - - -
-int6kwait(1)                                 Qualcomm Atheros Open Powerline Toolkit                                int6kwait(1)
-
-NAME
-       int6kwait - Qualcomm Atheros INT6x00 Powerline Device Procrastinator
-
-SYNOPSIS
-       int6kwait [options] [device] [device] [...]
-
-DESCRIPTION
-       Poll  a  Qualcomm  Atheros powerline device, waiting for one or more events to occur before continuing or returning.  The
-       events include reset or power off, restart or power on and network association.  It is used to  pause  shell  scripts  at
-       critical points where a device must be in a known state before continuing.
-
-       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
-       instructions.
-
-OPTIONS
-       -a     Poll the device every few seconds using VS_NW_INFO messages until the device indicates that a networks exists  and
-              has  at  least  one  station.   This option can give false readings if other devices have dropped off-line and the
-              device bridging table still holds information about them.  The program always checks for this event last if  other
-              event options are specified.
-
-       -c count
-              The  number  of times the program will poll the device before declaring an event failure.  The program will wait a
-              fixed period of time between each poll attempt.  Overall wait time is count/frequency where count can be  modified
-              using  option  -c.   Overall  wait  time is always approximate since operating system overhead and latency are not
-              taken into account.  The default count is 300.
-
-       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
-              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
-
-       -f firmware
-              The identification string for firmware that should be running after the device starts.  This option can be used to
-              detect a failed firmware load.  If the actual identification string does not match this one once the device starts
-              then  an  error is reported.  If option -x is present then the program terminates with a non-zero exit code.  This
-              option   has   no   effect   unless   option   -s   is   present.    An   identification   string    looks    like
-              "INT6000-MAC-3-1-3143-1690-20071107-FINAL-B" and can be obtained using int6k -r.
-
-       -i     Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
-              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
-              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
-              interface.  This option then takes precedence over either default.
-
-       -p frequency
-              The polling frequency expressed in polls-per-second.  For example, 1 means one poll per second and  10  means  ten
-              polls per second.  Overall wait time is count/frequency where count may be modified using option -c.  Overall wait
-              time is always approximate since operating system overhead and latency are not taken into  account.   The  default
-              frequency is 5.
-
-       -q     Enter quiet mode.  Progress messages are suppressed.
-
-       -r     Poll  the  device  every  few  seconds  using VS_SW_VER messages until the bootloader or runtime firmware fails to
-              respond or the poll count exhausts.  The absence of a response indicates that the device either lost connection to
-              the  host,  lost  power or has reset.  The program always checks for this event first when other events are speci‐
-              fied.
-
-       -R     Reset the device then check return status.  Exit program on error if option -x is present; otherwise,  repeat  the
-              reset request until the device either accepts the request or the wait time is exceeded.
-
-       -s     Poll  the  device  every few seconds using VS_SW_VER messages until the bootloader or runtime firmware responds or
-              the poll count exhausts.  The presence of a response indicates that the device has either connected to  the  host,
-              received power or finished reboot.
-
-       -t     Display the actual time in seconds taken for successful completion, or waited for unsuccessful completion, of ecah
-              event.
-
-       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
-
-       -w seconds
-              Additional time to wait once all events have occured.  This wait does not occur if  any  of  the  events  timeout.
-              When  no  other  events  are specified this option is effectively equivalent to sleep.  This option can be used to
-              allow the device or the network to settle.  For example, a nominal 5 second wait is  recommended  after  a  device
-              successfully associates before attempting to transfer data.
-
-       -x     Exit  program  on  first  error  with  a non-zero exit code.  This option allows shell scripts to detect failed or
-              incomplete operations and take the appropriate action.
-
-       -?, --help
-              Print program help summary on stdout.  This option takes precedence over other options on the command line.
-
-       -!, --version
-              Print program version information on stdout.  This option takes precedence over other options on the command line.
-              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
-              the Linux Toolkit you are using.
-
-ARGUMENTS
-       device The Media Access Control (MAC) address of some device.  Addresses are 6 hexadecimal octets optionally separated by
-              colon.   For  example,  the  addresses  "00b052000001",  "00:b0:52:00:00:01" and "00b052:000001" are all valid and
-              equivalent.  For convenience, the symbolic address  "local"  resolves  to  "00:b0:52:00:00:01"  and  the  symbolic
-              addresses "all" and "broadcast" both resolve to "ff:ff:ff:ff:ff:ff".
-
-REFERENCES
-       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
-
-DISCLAIMER
-       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
-       gram.
-
-EXAMPLES
-       The following command polls the local device until firmware stops running then polls the  device  until  firmware  starts
-       running again.  This command can be inserted into a shell script at a point where the device must reset and reboot before
-       proceeding.  Observer that the program waits up to 60 seconds for each event, in turn.  The 60 seconds is the product  of
-       60 poll attempts spaced 1 second apart.
-
-          # int6kwait -rs
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
-
-       The  following  example specifies 5 poll attempts spaced 10 seconds apart.  Less frequent polling reduces network traffic
-       but makes the program less responsive to events.  Observe that the allotted time applies to each event in turn.
-
-          # int6kwait -rs -p 10 -c 5
-          eth0 00:B0:52:BA:BA:01 Allow 50 seconds for Reset
-          eth0 00:B0:52:BA:BA:01 Allow 50 seconds for Start
-
-       The next example reports the actual amount of time taken for each event to occur.  Observe that the  last  event,  device
-       association, did not occur within the allotted time.
-
-          # int6kwait -rsat
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
-          etho 00:B0:52:BA:BA:01 Waited 22 seconds to Reset
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
-          etho 00:B0:52:BA:BA:01 Waited 4 seconds to Start
-          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Assoc
-          etho 00:B0:52:BA:BA:01 Waited 60 seconds for Assoc
-          etho 00:B0:52:BA:BA:01 Device did not Assoc
-
-       The  following  example  illustrates use of the revision string to detect mismatched firmware.  In this example, we reset
-       the device first, using program int6k, then wait for it to reset then start up again.  There are also operation that  can
-       cause the device to reset.
-
-          # int6k -R
-          # int6kwait -xrsf INT6000-MAC-3-1-3143-1690-20071107-FINAL-B
-          eth0 00:B0:52:BA:BA:01 Device started wrong firmware
-
-       Immediately  after  a  reset we wait for the firmware to stop responding, with option -r, and then start responding, with
-       option -s, and then perform a string comparison against the actual firmware revision string,  with  option  -f.   If  the
-       strings  do  not  match then an error is reported.  In this case, the program will exit with a non-zero return code since
-       option -x is present.
-
-DISCLAIMER
-       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
-       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
-       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
-       gram.
-
-SEE ALSO
-       plc(1), int6k(1), int6kf(1), int6khost(1), int6kid(1), int6krate(1), int6krule(1), int6kstat(1)
-
-CREDITS
-        Charles Maier <cmaier@qca.qualcomm.com>
-
-open-plc-utils-0.0.3                                        Mar 2014                                                int6kwait(1)
-
- - - diff --git a/docbook/int6kwait.c.html b/docbook/int6kwait.c.html deleted file mode 100644 index b466932a..00000000 --- a/docbook/int6kwait.c.html +++ /dev/null @@ -1,800 +0,0 @@ - - - - - - int6kwait.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   int6kwait.c - Atheros Powerline Device Procrastinator;
- *
- *   wait for device events to start or finish before returning;
- *
- *
- *   Contributor(s):
- *      Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*"
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-#include <sys/time.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/getoptv.h"
-#include "../tools/putoptv.h"
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/symbol.h"
-#include "../tools/types.h"
-#include "../tools/flags.h"
-#include "../tools/files.h"
-#include "../tools/timer.h"
-#include "../tools/error.h"
-#include "../plc/plc.h"
-
-/*====================================================================*
- *   custom source files;
- *--------------------------------------------------------------------*/
-
-#ifndef MAKEFILE
-#include "../tools/getoptv.c"
-#include "../tools/putoptv.c"
-#include "../tools/version.c"
-#include "../tools/uintspec.c"
-#include "../tools/hexdump.c"
-#include "../tools/hexencode.c"
-#include "../tools/hexdecode.c"
-#include "../tools/todigit.c"
-#include "../tools/checkfilename.c"
-#include "../tools/synonym.c"
-#include "../tools/error.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../plc/Confirm.c"
-#include "../plc/Display.c"
-#include "../plc/Failure.c"
-#include "../plc/ReadMME.c"
-#include "../plc/Request.c"
-#include "../plc/SendMME.c"
-#include "../plc/Devices.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../ether/openchannel.c"
-#include "../ether/closechannel.c"
-#include "../ether/readpacket.c"
-#include "../ether/sendpacket.c"
-#include "../ether/channel.c"
-#endif
-
-#ifndef MAKEFILE
-#include "../mme/MMECode.c"
-#include "../mme/EthernetHeader.c"
-#include "../mme/QualcommHeader.c"
-#include "../mme/QualcommHeader1.c"
-#include "../mme/UnwantedMessage.c"
-#endif
-
-#define RETRY 300
-#define POLL 5
-
-/*====================================================================*
- *
- *   signed ResetAndWait (struct plc * plc);
- *
- *   plc.h
- *
- *   reset the device using a VS_RS_DEV Request message; continue to
- *   request resets each second until the device accepts the request
- *   or the wait period expires;
- *
- *--------------------------------------------------------------------*/
-
-signed ResetAndWait (struct plc * plc)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_rs_dev_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-	}
-	* request = (struct vs_rs_dev_request *) (message);
-	struct __packed vs_rs_dev_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-	}
-	* confirm = (struct vs_rs_dev_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Reset when Ready");
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_RS_DEV | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_RS_DEV | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (plc->packetsize)
-		{
-			if (!confirm->MSTATUS)
-			{
-				Confirm (plc, "Resetting ...");
-				return (0);
-			}
-		}
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed WaitForReset (struct plc * plc, char string [], size_t length);
- *
- *   plc.h
- *
- *   send and receive VS_SW_VER messages until a confirmation is not
- *   received within channel->timeout milliseconds to indicate that
- *   the device is inactive; return 0 if the device resets within
- *   plc->timer seconds; otherwise, return -1;
- *
- *   this function cannot distinguish between a software reset and
- *   hardware reset;
- *
- *--------------------------------------------------------------------*/
-
-signed WaitForReset (struct plc * plc, char string [], size_t length)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	memset (string, 0, length);
-	Request (plc, "Allow %d seconds for Reset", plc->timer);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (!plc->packetsize)
-		{
-			if (_allset (plc->flags, (PLC_WAITFORRESET | PLC_ANALYSE)))
-			{
-				Confirm (plc, "Waited %d seconds for Reset", timer);
-			}
-			memcpy (string, confirm->MVERSION, confirm->MVERLENGTH);
-			return (0);
-		}
-	}
-	if (_allset (plc->flags, (PLC_WAITFORRESET | PLC_ANALYSE)))
-	{
-		Confirm (plc, "Waited %d seconds for Reset", timer);
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed WaitForStart (struct plc * plc, char string [], size_t length);
- *
- *   plc.h
- *
- *   send VS_SW_VER messages until confirmation is received within
- *   channel->timeout milliseconds to indicate that the device is
- *   active; return 0 if the device responds within plc->timer
- *   seconds; otherwise, return -1;
- *
- *   poll the device using VS_SW_VER messages until it responds or
- *   the allotted time expires; return 0 if the device responds within
- *   the allotted time or -1 if it does not or if a transmission error
- *   occurs;
- *
- *--------------------------------------------------------------------*/
-
-signed WaitForStart (struct plc * plc, char string [], size_t length)
-
-{
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_sw_ver_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* request = (struct vs_sw_ver_request *) (message);
-	struct __packed vs_sw_ver_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_hdr qualcomm;
-		uint8_t MSTATUS;
-		uint8_t MDEVICEID;
-		uint8_t MVERLENGTH;
-		char MVERSION [PLC_VERSION_STRING];
-	}
-	* confirm = (struct vs_sw_ver_confirm *) (message);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Allow %d seconds for Start", plc->timer);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (plc->packetsize)
-		{
-			if (confirm->MSTATUS)
-			{
-				Failure (plc, PLC_WONTDOIT);
-				return (-1);
-			}
-			if (_allset (plc->flags, (PLC_WAITFORSTART | PLC_ANALYSE)))
-			{
-				Confirm (plc, "Waited %d seconds for Start", timer);
-			}
-			strncpy (string, confirm->MVERSION, length);
-			return (0);
-		}
-	}
-	if (_allset (plc->flags, (PLC_WAITFORSTART | PLC_ANALYSE)))
-	{
-		Confirm (plc, "Waited %d seconds for Start", timer);
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   signed WaitForAssoc (struct plc * plc);
- *
- *   plc.h
- *
- *   send and receive VS_NW_INFO messages until the device reports
- *   that a network exists and has at least one station; return 0 if
- *   a network forms within plc->timer seconds; otherwise, return
- *   -1;
- *
- *--------------------------------------------------------------------*/
-
-signed WaitForAssoc (struct plc * plc)
-
-{
-	extern const uint8_t broadcast [ETHER_ADDR_LEN];
-	struct channel * channel = (struct channel *)(plc->channel);
-	struct message * message = (struct message *)(plc->message);
-	struct timeval ts;
-	struct timeval tc;
-	unsigned timer = 0;
-
-#ifndef __GNUC__
-#pragma pack (push,1)
-#endif
-
-	struct __packed vs_nw_info_request
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-	}
-	* request = (struct vs_nw_info_request *)(message);
-	struct __packed vs_nw_info_confirm
-	{
-		struct ethernet_hdr ethernet;
-		struct qualcomm_fmi qualcomm;
-		uint8_t SUB_VERSION;
-		uint8_t Reserved;
-		uint16_t DATA_LEN;
-		uint8_t DATA [1];
-	}
-	* confirm = (struct vs_nw_info_confirm *)(message);
-	struct __packed station
-	{
-		uint8_t MAC [ETHER_ADDR_LEN];
-		uint8_t TEI;
-		uint8_t Reserved [3];
-		uint8_t BDA [ETHER_ADDR_LEN];
-		uint16_t AVGTX;
-		uint8_t COUPLING;
-		uint8_t Reserved3;
-		uint16_t AVGRX;
-		uint16_t Reserved4;
-	}
-	* station;
-	struct __packed network
-	{
-		uint8_t NID [7];
-		uint8_t Reserved1 [2];
-		uint8_t SNID;
-		uint8_t TEI;
-		uint8_t Reserved2 [4];
-		uint8_t ROLE;
-		uint8_t CCO_MAC [ETHER_ADDR_LEN];
-		uint8_t CCO_TEI;
-		uint8_t Reserved3 [3];
-		uint8_t NUMSTAS;
-		uint8_t Reserved4 [5];
-		struct station stations [1];
-	}
-	* network;
-	struct __packed networks
-	{
-		uint8_t Reserved;
-		uint8_t NUMAVLNS;
-		struct network networks [1];
-	}
-	* networks = (struct networks *) (confirm->DATA);
-
-#ifndef __GNUC__
-#pragma pack (pop)
-#endif
-
-	Request (plc, "Allow %d seconds for Assoc", plc->timer);
-	if (gettimeofday (&ts, NULL) == -1)
-	{
-		error (1, errno, CANT_START_TIMER);
-	}
-	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
-	{
-		memset (message, 0, sizeof (* message));
-		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
-		QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
-		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
-		if (SendMME (plc) <= 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
-			return (-1);
-		}
-		if (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) < 0)
-		{
-			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
-			return (-1);
-		}
-		if (gettimeofday (&tc, NULL) == -1)
-		{
-			error (1, errno, CANT_RESET_TIMER);
-		}
-		if (plc->packetsize)
-		{
-			network = (struct network *)(&networks->networks);
-			while (networks->NUMAVLNS--)
-			{
-				station = (struct station *)(&network->stations);
-				while (network->NUMSTAS--)
-				{
-					if (memcmp (station->MAC, broadcast, sizeof (broadcast)))
-					{
-						if (_allset (plc->flags, (PLC_WAITFORASSOC | PLC_ANALYSE)))
-						{
-							Confirm (plc, "Waited %d seconds for Assoc", timer);
-						}
-						return (0);
-					}
-					station++;
-				}
-				network = (struct network *)(station);
-			}
-		}
-	}
-	if (_allset (plc->flags, (PLC_WAITFORASSOC | PLC_ANALYSE)))
-	{
-		Confirm (plc, "Waited %d seconds for Assoc", timer);
-	}
-	return (-1);
-}
-
-/*====================================================================*
- *
- *   void function (struct plc * plc, char const * firmware);
- *
- *   perform operations in a logical order;
- *
- *
- *--------------------------------------------------------------------*/
-
-static void function (struct plc * plc, char const * firmware)
-
-{
-	char string [PLC_VERSION_STRING];
-	if (_anyset (plc->flags, PLC_RESET_DEVICE))
-	{
-		if (ResetAndWait (plc))
-		{
-			Failure (plc, "Device did not Reset.");
-		}
-	}
-	if (_anyset (plc->flags, PLC_WAITFORRESET))
-	{
-		if (WaitForReset (plc, string, sizeof (string)))
-		{
-			Failure (plc, "Device did not Reset.");
-		}
-	}
-	if (_anyset (plc->flags, PLC_WAITFORSTART))
-	{
-		if (WaitForStart (plc, string, sizeof (string)))
-		{
-			Failure (plc, "Device did not Start.");
-		}
-		if ((firmware) && (*firmware) && strcmp (firmware, string))
-		{
-			Failure (plc, "Started wrong firmware");
-		}
-	}
-	if (_anyset (plc->flags, PLC_WAITFORASSOC))
-	{
-		if (WaitForAssoc (plc))
-		{
-			Failure (plc, "Device did not Assoc.");
-		}
-	}
-	if (plc->sleep)
-	{
-		Request (plc, "Pause %d seconds", plc->sleep);
-		sleep (plc->sleep);
-	}
-	return;
-}
-
-/*====================================================================*
- *
- *   int main (int argc, char const * argv[]);
- *
- *   parse command line, populate plc structure and perform selected
- *   operations; show help summary if asked; see getoptv and putoptv
- *   to understand command line parsing and help summary display; see
- *   plc.h for the definition of struct plc;
- *
- *   the command line accepts multiple MAC addresses and the program
- *   performs the specified operations on each address, in turn; the
- *   address order is significant but the option order is not; the
- *   default address is a local broadcast that causes all devices on
- *   the local H1 interface to respond but not those at the remote
- *   end of the powerline;
- *
- *   the default address is 00:B0:52:00:00:01; omitting the address
- *   will automatically address the local device; some options will
- *   cancel themselves if this makes no sense;
- *
- *   the default interface is eth1 because most people use eth0 as
- *   their principle network connection; you can specify another
- *   interface with -i or define environment string PLC to make
- *   that the default interface and save typing;
- *
- *
- *--------------------------------------------------------------------*/
-
-int main (int argc, char const * argv [])
-
-{
-	extern struct channel channel;
-	static char const * optv [] =
-	{
-		"ac:ef:i:p:qrRstvxw:",
-		"device [device] [...] [> stdout]",
-		"Qualcomm Atheros INT6x00 Powerline Device Procrastinator",
-		"a\twait for device assoc",
-		"c n\tpolling retry count [" LITERAL (RETRY) "]",
-		"e\tredirect stderr to stdout",
-		"f s\tconfirm firmware is revision s",
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
-
-#else
-
-		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
-
-#endif
-
-		"p n\tpoll (n) times per second [" LITERAL (POLL) "]",
-		"q\tquiet mode",
-		"v\tverbose mode",
-		"R\treset device and wait",
-		"r\twait for device reset",
-		"s\twait for device start",
-		"t\tshow wait times",
-		"w n\twait n seconds",
-		"x\texit on error",
-		(char const *) (0)
-	};
-
-#include "../plc/plc.c"
-
-	char const * firmware = "";
-	unsigned retry = RETRY;
-	unsigned poll = POLL;
-	signed c;
-	if (getenv (PLCDEVICE))
-	{
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-		channel.ifindex = atoi (getenv (PLCDEVICE));
-
-#else
-
-		channel.ifname = strdup (getenv (PLCDEVICE));
-
-#endif
-
-	}
-	optind = 1;
-	while ((c = getoptv (argc, argv, optv)) != -1)
-	{
-		switch (c)
-		{
-		case 'a':
-			_setbits (plc.flags, PLC_WAITFORASSOC);
-			break;
-		case 'c':
-			retry = (unsigned)(uintspec (optarg, 1, UINT_MAX));
-			break;
-		case 'e':
-			dup2 (STDOUT_FILENO, STDERR_FILENO);
-			break;
-		case 'f':
-			firmware = optarg;
-			break;
-		case 'i':
-
-#if defined (WINPCAP) || defined (LIBPCAP)
-
-			channel.ifindex = atoi (optarg);
-
-#else
-
-			channel.ifname = optarg;
-
-#endif
-
-			break;
-		case 'p':
-			poll = (unsigned)(uintspec (optarg, 1, 50));
-			break;
-		case 'q':
-			_setbits (channel.flags, CHANNEL_SILENCE);
-			_setbits (plc.flags, PLC_SILENCE);
-			break;
-		case 'r':
-			_setbits (plc.flags, PLC_WAITFORRESET);
-			break;
-		case 'R':
-			_setbits (plc.flags, PLC_RESET_DEVICE);
-			break;
-		case 's':
-			_setbits (plc.flags, PLC_WAITFORSTART);
-			break;
-		case 't':
-			_setbits (plc.flags, PLC_ANALYSE);
-			break;
-		case 'v':
-			_setbits (channel.flags, CHANNEL_VERBOSE);
-			_setbits (plc.flags, PLC_VERBOSE);
-			break;
-		case 'w':
-			plc.sleep = (unsigned)(uintspec (optarg, 0, 3600));
-			break;
-		case 'x':
-			_setbits (plc.flags, PLC_BAILOUT);
-			break;
-		default:
-			break;
-		}
-	}
-	argc -= optind;
-	argv += optind;
-	plc.timer = retry / poll;
-	openchannel (&channel);
-	if (!(plc.message = malloc (sizeof (* plc.message))))
-	{
-		error (1, errno, PLC_NOMEMORY);
-	}
-	if (!argc)
-	{
-		function (&plc, firmware);
-	}
-	while ((argc) && (* argv))
-	{
-		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
-		{
-			error (1, errno, PLC_BAD_MAC, * argv);
-		}
-		function (&plc, firmware);
-		argv++;
-		argc--;
-	}
-	free (plc.message);
-	closechannel (&channel);
-	exit (0);
-}
-
-
-
- - - diff --git a/docbook/inttypes.h.html b/docbook/inttypes.h.html deleted file mode 100644 index 3183046a..00000000 --- a/docbook/inttypes.h.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - inttypes.h - - - - - - - - - -
-/*====================================================================*
- *      
- *   Copyright (c) 2013 by Qualcomm Atheros.
- *   
- *   Permission to use, copy, modify, and/or distribute this software 
- *   for any purpose with or without fee is hereby granted, provided 
- *   that the above copyright notice and this permission notice appear 
- *   in all copies.
- *   
- *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
- *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
- *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
- *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
- *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
- *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
- *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *   
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   inttypes.h - substitute inttypes.h file for Windows;
- *
- *   this is an important POSIX header that Microsoft ommits; 
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *	Mathieu Olivari <mathieu@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef INTTYPES_HEADER
-#define INTTYPES_HEADER
-
-#define PRId64 "I64d"
-
-#endif
-
-
-
- - - diff --git a/docbook/ip6_misc.h.html b/docbook/ip6_misc.h.html deleted file mode 100644 index 39558885..00000000 --- a/docbook/ip6_misc.h.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - ip6_misc.h - - - - - - - - - -
-/*
- * Copyright (c) 1993, 1994, 1997
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL)
- */
-
-/*
- * This file contains a collage of declarations for IPv6 from FreeBSD not present in Windows
- */
-
-#include <winsock2.h>
-
-#include <ws2tcpip.h>
-
-#ifndef __MINGW32__
-#define	IN_MULTICAST(a)		IN_CLASSD(a)
-#endif
-
-#define	IN_EXPERIMENTAL(a)	((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)
-
-#define	IN_LOOPBACKNET		127
-
-#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
-/* IPv6 address */
-struct in6_addr
-  {
-    union
-      {
-	u_int8_t		u6_addr8[16];
-	u_int16_t	u6_addr16[8];
-	u_int32_t	u6_addr32[4];
-      } in6_u;
-#define s6_addr			in6_u.u6_addr8
-#define s6_addr16		in6_u.u6_addr16
-#define s6_addr32		in6_u.u6_addr32
-#define s6_addr64		in6_u.u6_addr64
-  };
-
-#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
-#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
-#endif /* __MINGW32__ */
-
-#if (defined _MSC_VER) || (defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF))
-typedef unsigned short	sa_family_t;
-#endif
-
-#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
-
-#define	__SOCKADDR_COMMON(sa_prefix) \
-  sa_family_t sa_prefix##family
-
-/* Ditto, for IPv6.  */
-struct sockaddr_in6
-  {
-    __SOCKADDR_COMMON (sin6_);
-    u_int16_t sin6_port;		/* Transport layer port # */
-    u_int32_t sin6_flowinfo;	/* IPv6 flow information */
-    struct in6_addr sin6_addr;	/* IPv6 address */
-  };
-
-#define IN6_IS_ADDR_V4MAPPED(a) \
-	((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \
-	 (((u_int32_t *) (a))[2] == htonl (0xffff)))
-
-#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff)
-
-#define IN6_IS_ADDR_LINKLOCAL(a) \
-	((((u_int32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))
-
-#define IN6_IS_ADDR_LOOPBACK(a) \
-	(((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
-	 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
-#endif /* __MINGW32__ */
-
-#define ip6_vfc   ip6_ctlun.ip6_un2_vfc
-#define ip6_flow  ip6_ctlun.ip6_un1.ip6_un1_flow
-#define ip6_plen  ip6_ctlun.ip6_un1.ip6_un1_plen
-#define ip6_nxt   ip6_ctlun.ip6_un1.ip6_un1_nxt
-#define ip6_hlim  ip6_ctlun.ip6_un1.ip6_un1_hlim
-#define ip6_hops  ip6_ctlun.ip6_un1.ip6_un1_hlim
-
-#define nd_rd_type               nd_rd_hdr.icmp6_type
-#define nd_rd_code               nd_rd_hdr.icmp6_code
-#define nd_rd_cksum              nd_rd_hdr.icmp6_cksum
-#define nd_rd_reserved           nd_rd_hdr.icmp6_data32[0]
-
-/*
- *	IPV6 extension headers
- */
-#define IPPROTO_HOPOPTS		0	/* IPv6 hop-by-hop options	*/
-#define IPPROTO_IPV6		41  /* IPv6 header.  */
-#define IPPROTO_ROUTING		43	/* IPv6 routing header		*/
-#define IPPROTO_FRAGMENT	44	/* IPv6 fragmentation header	*/
-#define IPPROTO_ESP		50	/* encapsulating security payload */
-#define IPPROTO_AH		51	/* authentication header	*/
-#define IPPROTO_ICMPV6		58	/* ICMPv6			*/
-#define IPPROTO_NONE		59	/* IPv6 no next header		*/
-#define IPPROTO_DSTOPTS		60	/* IPv6 destination options	*/
-#define IPPROTO_PIM			103 /* Protocol Independent Multicast.  */
-
-#define	 IPV6_RTHDR_TYPE_0 0
-
-/* Option types and related macros */
-#define IP6OPT_PAD1		0x00	/* 00 0 00000 */
-#define IP6OPT_PADN		0x01	/* 00 0 00001 */
-#define IP6OPT_JUMBO		0xC2	/* 11 0 00010 = 194 */
-#define IP6OPT_JUMBO_LEN	6
-#define IP6OPT_ROUTER_ALERT	0x05	/* 00 0 00101 */
-
-#define IP6OPT_RTALERT_LEN	4
-#define IP6OPT_RTALERT_MLD	0	/* Datagram contains an MLD message */
-#define IP6OPT_RTALERT_RSVP	1	/* Datagram contains an RSVP message */
-#define IP6OPT_RTALERT_ACTNET	2 	/* contains an Active Networks msg */
-#define IP6OPT_MINLEN		2
-
-#define IP6OPT_BINDING_UPDATE	0xc6	/* 11 0 00110 */
-#define IP6OPT_BINDING_ACK	0x07	/* 00 0 00111 */
-#define IP6OPT_BINDING_REQ	0x08	/* 00 0 01000 */
-#define IP6OPT_HOME_ADDRESS	0xc9	/* 11 0 01001 */
-#define IP6OPT_EID		0x8a	/* 10 0 01010 */
-
-#define IP6OPT_TYPE(o)		((o) & 0xC0)
-#define IP6OPT_TYPE_SKIP	0x00
-#define IP6OPT_TYPE_DISCARD	0x40
-#define IP6OPT_TYPE_FORCEICMP	0x80
-#define IP6OPT_TYPE_ICMP	0xC0
-
-#define IP6OPT_MUTABLE		0x20
-
-#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
-#ifndef EAI_ADDRFAMILY
-struct addrinfo {
-	int	ai_flags;	/* AI_PASSIVE, AI_CANONNAME */
-	int	ai_family;	/* PF_xxx */
-	int	ai_socktype;	/* SOCK_xxx */
-	int	ai_protocol;	/* 0 or IPPROTO_xxx for IPv4 and IPv6 */
-	size_t	ai_addrlen;	/* length of ai_addr */
-	char	*ai_canonname;	/* canonical name for hostname */
-	struct sockaddr *ai_addr;	/* binary address */
-	struct addrinfo *ai_next;	/* next structure in linked list */
-};
-#endif
-#endif /* __MINGW32__ */
-
- - - diff --git a/docbook/ipv4spec.c.html b/docbook/ipv4spec.c.html deleted file mode 100644 index b36e070c..00000000 --- a/docbook/ipv4spec.c.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - ipv4spec.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t ipv4spec (char const *string,  void * memory);
- *
- *   memory.h
- *
- *   encode a 4-byte memory region with the equivalent of an IPv4
- *   dotted decimal string; all field delimiters must be present
- *   but individual fields may have leading zeros or be empty;
- *
- *      0.0.0.0		 0x00, 0x00, 0x00, 0x00
- *      127...1		 0x7F, 0x00, 0x00, 0x01
- *      192.168.099.000  0xC0, 0xA8, 0x63, 0x00
- *
- *.  released 2005 by charles maier associates ltd. for public use;
- *:  compiled on debian gnu/linux with gcc 2.95 compiler;
- *;  licensed under the gnu public license version two;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IPV4SPEC_SOURCE
-#define IPV4SPEC_SOURCE
-
-#include <ctype.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-size_t ipv4spec (char const * string, void * memory)
-
-{
-	char const * number = string;
-	byte * origin = (byte *)(memory);
-	byte * offset = (byte *)(memory);
-	byte * extent = offset + IPv4_LEN;
-	unsigned radix = RADIX_DEC;
-	unsigned digit = 0;
-	while ((*number) && (offset < extent))
-	{
-		unsigned value = 0;
-		if (offset > origin)
-		{
-			if (*number == DEC_EXTENDER)
-			{
-				number++;
-			}
-		}
-		while ((digit = todigit (*number)) < radix)
-		{
-			value *= radix;
-			value += digit;
-			if (value >> 8)
-			{
-				error (1, ERANGE, "IPv4 '%s' octet %d exceeds 8 bits", string, (unsigned)(offset - origin) + 1);
-			}
-			number++;
-		}
-		*offset++ = value;
-	}
-
-#if defined (WIN32)
-
-	while (isspace (*number))
-	{
-		number++;
-	}
-
-#endif
-
-	if (offset < extent)
-	{
-		error (1, EINVAL, "IPv4 '%s' has only %d octets", string, (unsigned)(offset - origin));
-	}
-	if (*number)
-	{
-		error (1, EINVAL, "IPv4 '%s' contains trash '%s'", string, number);
-	}
-	return (offset - origin);
-}
-
-/*====================================================================*
- *   demo/test program;
- *--------------------------------------------------------------------*/
-
-#if 0
-
-#include <stdio.h>
-
-char const * program_name = "ipv4spec";
-int main (int argc, char * argv [])
-
-{
-	byte memory [4];
-	char string [16];
-	while (*++argv)
-	{
-		ipv4spec (* argv, memory);
-		hexdecode (memory, sizeof (memory), string, sizeof (string));
-		printf ("%s %s\n", string, * argv);
-	}
-	return (0);
-}
-
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/ipv6spec.c.html b/docbook/ipv6spec.c.html deleted file mode 100644 index b8f21561..00000000 --- a/docbook/ipv6spec.c.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - ipv6spec.c - - - - - - - - - -
-/*====================================================================*
- *
- *   size_t ipv6spec (char const * string,  byte memory []);
- *
- *   memory.h
- *
- *   encode a 16-byte memory region with the binary equivalent of an
- *   ipv6 address string; ipv6 addresses are defined as 8 16-bit hex
- *   numbers separated with colons; two consecutive colons represent
- *   one or more 0000 fields;
- *
- *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- *   Copyright (c) 2001-2006 by Charles Maier Associates;
- *   Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
-
-#ifndef IPV6SPEC_SOURCE
-#define IPV6SPEC_SOURCE
-
-#include <memory.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "../tools/memory.h"
-#include "../tools/number.h"
-#include "../tools/error.h"
-
-size_t ipv6spec (char const * string, void * memory)
-
-{
-	char const * number = string;
-	byte * origin = (byte *)(memory);
-	byte * offset = (byte *)(memory);
-	byte * extent = offset + IPv6_LEN;
-	byte * marker = offset + IPv6_LEN;
-	unsigned radix = RADIX_HEX;
-	unsigned digit = 0;
-	while ((*number) && (offset < extent))
-	{
-		uint32_t value = 0;
-		if (offset > origin)
-		{
-			if (*number == HEX_EXTENDER)
-			{
-				number++;
-			}
-			if (*number == HEX_EXTENDER)
-			{
-				marker = offset;
-			}
-		}
-		while ((digit = todigit (*number)) < radix)
-		{
-			value *= radix;
-			value += digit;
-			if (value >> 16)
-			{
-				error (1, ERANGE, "IPv6 '%s' field %d exceeds 16 bits", string, 1 + ((unsigned)(offset - origin) >> 1));
-			}
-			number++;
-		}
-		*offset++ = (byte)(value >> 8);
-		*offset++ = (byte)(value >> 0);
-	}
-
-#if defined (WIN32)
-
-	while (isspace (*number))
-	{
-		number++;
-	}
-
-#endif
-
-	if (*number)
-	{
-		error (1, EINVAL, "IPv6 '%s' includes trash '%s'", string, number);
-	}
-	if (offset < extent)
-	{
-		while (offset > marker)
-		{
-			*--extent = *--offset;
-		}
-		while (extent > offset)
-		{
-			*--extent = 0;
-		}
-	}
-	if (offset < marker)
-	{
-		error (1, EINVAL, "IPv6 '%s' has only %d fields", string, (unsigned)(offset - origin) >> 1);
-	}
-	return (offset - origin);
-}
-
-/*====================================================================*
- *   demo/test program;
- *--------------------------------------------------------------------*/
-
-#if 0
-#include <stdio.h>
-
-char const * program_name = "ipv6spec";
-int main (int argc, char * argv [])
-
-{
-	byte memory [16];
-	char string [48];
-	while (*++argv)
-	{
-		ipv6spec (* argv, memory);
-		hexdecode (memory, sizeof (memory), string, sizeof (string));
-		printf ("%s %s\n", string, * argv);
-	}
-	return (0);
-}
-
-#endif
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/keys.c.html b/docbook/keys.c.html deleted file mode 100644 index a84ee12d..00000000 --- a/docbook/keys.c.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - keys.c - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-/*====================================================================*
- *
- *   keys.c - Encryption Key Data and Functions;
- *
- *   keys.h
- *
- *   Tabulate default Atheros pass phrases and their DAK, NMK and
- *   NID for search and conversion purposes;
- *
- *   Contributor(s):
- *	Charles Maier <cmaier@qca.qualcomm.com>
- *
- *--------------------------------------------------------------------*/
-
-#ifndef KEYS_SOURCE
-#define KEYS_SOURCE
-
-#include "../key/keys.h"
-
-struct key const keys [KEYS] =
-
-{
-	{
-		"none/secret",
-		{
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00
-		},
-		{
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00,
-			0x00
-		}
-	},
-	{
-		"HomePlugAV",
-		{
-			0x68,
-			0x9F,
-			0x07,
-			0x4B,
-			0x8B,
-			0x02,
-			0x75,
-			0xA2,
-			0x71,
-			0x0B,
-			0x0B,
-			0x57,
-			0x79,
-			0xAD,
-			0x16,
-			0x30
-		},
-		{
-			0x50,
-			0xD3,
-			0xE4,
-			0x93,
-			0x3F,
-			0x85,
-			0x5B,
-			0x70,
-			0x40,
-			0x78,
-			0x4D,
-			0xF8,
-			0x15,
-			0xAA,
-			0x8D,
-			0xB7
-		}
-	},
-	{
-		"HomePlugAV0123",
-		{
-			0xF0,
-			0x84,
-			0xB4,
-			0xE8,
-			0xF6,
-			0x06,
-			0x9F,
-			0xF1,
-			0x30,
-			0x0C,
-			0x9B,
-			0xDB,
-			0x81,
-			0x23,
-			0x67,
-			0xFF
-		},
-		{
-			0xB5,
-			0x93,
-			0x19,
-			0xD7,
-			0xE8,
-			0x15,
-			0x7B,
-			0xA0,
-			0x01,
-			0xB0,
-			0x18,
-			0x66,
-			0x9C,
-			0xCE,
-			0xE3,
-			0x0D
-		}
-	}
-};
-
-/*====================================================================*
- * device access key synonym table;
- *--------------------------------------------------------------------*/
-
-struct _term_ const daks [DAKS] =
-
-{
-	{
-		"key0",
-		DAK0
-	},
-	{
-		"key1",
-		DAK1
-	},
-	{
-		"key2",
-		DAK2
-	},
-	{
-		"none",
-		DAK0
-	},
-	{
-		"secret",
-		DAK0
-	},
-	{
-		"zero",
-		DAK0
-	}
-};
-
-/*====================================================================*
- * network membership key synonym table;
- *--------------------------------------------------------------------*/
-
-struct _term_ const nmks [NMKS] =
-
-{
-	{
-		"key0",
-		NMK0
-	},
-	{
-		"key1",
-		NMK1
-	},
-	{
-		"key2",
-		NMK2
-	},
-	{
-		"none",
-		NMK0
-	},
-	{
-		"zero",
-		NMK0
-	},
-};
-
-/*====================================================================*
- *  
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/keys.h.html b/docbook/keys.h.html deleted file mode 100644 index 1ccb45e5..00000000 --- a/docbook/keys.h.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - keys.h - - - - - - - - - -
-/*====================================================================*
- *
- *   Copyright (c) 2013 Qualcomm Atheros, Inc.
- *
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or 
- *   without modification, are permitted (subject to the limitations 
- *   in the disclaimer below) provided that the following conditions 
- *   are met:
- *
- *   * Redistributions of source code must retain the above copyright 
- *     notice, this list of conditions and the following disclaimer.
- *
- *   * Redistributions in binary form must reproduce the above 
- *     copyright notice, this list of conditions and the following 
- *     disclaimer in the documentation and/or other materials 
- *     provided with the distribution.
- *
- *   * Neither the name of Qualcomm Atheros nor the names of 
- *     its contributors may be used to endorse or promote products 
- *     derived from this software without specific prior written 
- *     permission.
- *
- *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
- *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
- *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
- *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
- *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
- *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
- *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
- *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
- *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
- *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
- *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
- *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
- *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
- *
- *--------------------------------------------------------------------*/
-
-/*====================================================================*
- *
- *   keys.h -
- *
- *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
- *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
- *;  For demonstration and evaluation only; Not for production use.
- *
- *--------------------------------------------------------------------*/
-
-#ifndef KEYS_HEADER
-#define KEYS_HEADER
-
-/*====================================================================*
- *   system header files;
- *--------------------------------------------------------------------*/
-
-#include <stdint.h>
-
-/*====================================================================*
- *   custom header files;
- *--------------------------------------------------------------------*/
-
-#include "../tools/types.h"
-#include "../key/HPAVKey.h"
-
-/*====================================================================*
- *   constants;
- *--------------------------------------------------------------------*/
-
-#define PASSWORD_SILENCE (1 << 0)
-#define PASSWORD_VERBOSE (1 << 1)
-
-#define DAK0 "00000000000000000000000000000000"
-#define DAK1 "689F074B8B0275A2710B0B5779AD1630"
-#define DAK2 "F084B4E8F6069FF1300C9BDB812367FF"
-
-#define NMK0 "00000000000000000000000000000000"
-#define NMK1 "50D3E4933F855B7040784DF815AA8DB7"
-#define NMK2 "B59319D7E8157BA001B018669CCEE30D"
-
-#define KEYS 3
-#define DAKS 6
-#define NMKS 5
-
-/*====================================================================*
- *   variables;
- *--------------------------------------------------------------------*/
-
-typedef struct key
-
-{
-	char const * phrase;
-	uint8_t DAK [HPAVKEY_DAK_LEN];
-	uint8_t NMK [HPAVKEY_NMK_LEN];
-}
-
-key;
-
-extern struct key const keys [KEYS];
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-extern struct _term_ const daks [DAKS];
-extern struct _term_ const nmks [NMKS];
-
-/*====================================================================*
- *   functions;
- *--------------------------------------------------------------------*/
-
-void MACPasswords (unsigned vendor, unsigned device, unsigned count, unsigned alpha, unsigned bunch, char space, flag_t flags);
-void RNDPasswords (unsigned vendor, unsigned device, unsigned count, unsigned alpha, unsigned bunch, char space, flag_t flags);
-char * strnpwd (char buffer [], unsigned length, unsigned count, unsigned group, char space);
-void putpwd (unsigned count, unsigned group, char space);
-
-/*====================================================================*
- *
- *--------------------------------------------------------------------*/
-
-#endif
-
-
-
- - - diff --git a/docbook/library.xml b/docbook/library.xml deleted file mode 100644 index 0ab8980f..00000000 --- a/docbook/library.xml +++ /dev/null @@ -1,1245 +0,0 @@ - - - Support Function Reference - -
- - Introduction - - - The Atheros Open Powerline Toolkit includes many functions that have application outside the Open Powerline Toolkit. They are distributed with the toolkit but may also appear in other Atheros applications or third party packages. Consequently, we describe them separately and store them in separate folders. - -
- -
- - tools/error.h - - - The functions in this group have general application beyond the Open Powerline Toolkit. In some cases, these functions may appear in other Atheros or Open Source software packages. In a few cases, the Toolkit may include complementary or supplementary support functions but only use one or two of them. For example, functions memincr and memdecr are both included but memdecr is not used. - -
- - alert - - - - void alert - const char *format - ... - - - - This function is similar to function printf but messages are prefixed with the program name and appear on stderr instead of stdout. It is equivalent to calling function error with argument exitcode set to 0 and argument errno set to 0. A typical use is to print progress messages. The function is declared in error.h and defined in alert.c. - -
-
- - error - - - - void error - intexitcode - errno_t number - const char * format - ... - - - - This function works like printf except that printed messages appear on stderr and are prefixed with the program name and error information. If argument errno is non-zero then messages are prefixed with the system error description. If argument exitcode is non-zero then function error exits the program with value exitcode after printing the message and does not return to the caller. The function is declared in error.h and defined in error.c. - -
-
- -
- - tools/files.h - -
- - checkfilename - - - - bool checkfilename - const char *filename - - - - Return logical true if the filename argument contains only letters, digits, slashes, periods, underscores and hyphens. This function can be used to detect cases where a user accidentally entered an Ethernet address in place of a filename on the command line. Ethernet address strings are, as it happens, also valid filenames. The function is declared in files.h and defined in checkfilename.c. - -
-
- - filepart - - - - const char * filepart - const char * pathname - - - - Return the address of the filename portion of a pathname string. The filename portion is everything after the rightmost path separator. If a path separator is not present then the address of the pathname string is returned. This function is similar to the POSIX basename function but it returns an empty string whenever the rightmost character is a path separator. The path separator can be either slash ('/') or backslash ('\\'). The function is declared in files.h and defined in filepart.c. - -
-
- - -
- - tools/format.h - -
- - strfbits - - - - size_t strfbits - char buffer [] - size_t length - const char *operands [] - const char *operator - unsigned flagword - - - - Encode a buffer with an enumerated list of the operands associated with the corresponding bits in flagword. separate enumerated operands with an operator string. For example, given const char *operands [] = { "loop", "wait", "busy" } and unsigned flagword = 0x05 then strfbits (buffer, length, operands, "|", flagword) would encode buffer with "loop|busy". Observe that each bit set in flagword appears in buffer as the corresponding string from operands. A typical application for this function is the enumeration of flagword states. The function is declared in tools.h and defined in strfbits.c. - -
-
- - -
- - tools/getoptv.h - -
- - getoptv - - - - int getoptv - int argc - const char * argv [] - const char * optv [] - - - - A custom version of the POSIX function getopt. It supports standard global variables optind, opterr, optopt and optarg and the non-standard variable optmin. It extracts the program name from argv[0] and posts it for use by functions alert, error and other functions using the global string pointer program_name. Options -? and --help both display program information on stdout. Options -! and --version both display program version information on stdout. String vector optv includes both the standard argument optstring and usage text found in many programs. The function is declared in getoptv.h and defined in getoptv.c. - -
-
- -
- - tools/memory.h - -
- - bytespec - - - - void bytespec - const char * string - byte memory [] - size_t extent - - - - Encode a memory region with the binary equivalent of a fixed-length hexadecimal string. Print an error message on stderr and exit the program with status 1 if a syntax error occurs or the number of octets does not equal extent. Hexadecimal octets may be separated by colons for readability but colons are not required. Empty octets are illegal. This function is typically used to enter fixed-length data, like hardware addresses and encryption keys, on the command line. The function is declared in memory.h and defined in bytespec.c. - -
-
- - checksum32 - - - - unint32_t checksum32 - const uint32_t memory [] - size_t length - uint32_t checksum - - - - Return the 32 bit checksum of a memory region. The checksum is the one's complement of the XOR of all 32 bit words in the region. Argument length is the region extent in 32 bit words. Argument checksum is the reference checksum. When the checksum argument is 0, the function value will be the computed checksum. When the checksum argument is the computed checksum, the function value will be 0 such that any other value indicates a checksum error. A typical use is to validate PIB and NVM files or compute new checksums when these files are created or modified. The function is declared in memory.h and defined in checksum32.c. - -
-
- - checksum_32 - - - - unint32_t checksum_32 - const void * memory - size_t extent - uint32_t checksum - - - - Return the 32 bit checksum of a memory region. The checksum is the one's complement of the XOR of all 32 bit words in the region. The region extent is specified in bytes but it will be rounded down to the nearest multiple of 4 bytes. Argument checksum is the reference checksum. The function will return the computed checksum when argument checksum is 0 and will return 0 if argument checksum equals the computed checksum. A typical use is to validate PIB and NVM files or compute new checksums when these files are created or modified. The function is declared in memory.h and defined in checksum_32.c. - - - This function is similar to function checksum32 however there is no need to cast memory to uint32_t and there is no need to round extent down to a multiple of 4 bytes before calling the function because both operations are performed internally. Also, there is no unecessary endian manipulation of the checksum. - -
-
- - decout - - - - void decout - const byte memory [] - size_t length - char c - FILE *fp - - - - Print a memory region as a series of decimal octets separated by character c. Normally, character c will be DEC_EXTENDER, defined in file number.h, but it could be any character value. For example, specifying c as '.' and length as 4 would produce output looking something like "192.168.099.001" where each octet is expressed as a decimal integer. A typical use might be to print an IP or MAC address in readable format. The function is declared in memory.h and defined in decout.c. - -
-
- - endian - - - - void endian - void * memory - size_t extent - - - - Reverse the byte order of a memory region. It is a variable length version of functions like _bswap_16, _bswap_32 and _bswap_64. The function is declared in memory.h and defined in endian.c. - -
-
- - hexdecode - - - - signed hexdecode - byte memory [] - size_t extent - const char buffer [] - size_t length - - - - Decode a memory region as a string of ASCII hexadecimal digits. Convert memory until the buffer or memory exhausts and return the string length. Allow three (3) string characters for each memory byte to be decoded. The number of bytes decoded will be the lesser of argument length divided by 3 or argument extent. The function is declared in memory.h and defined in hexdecode.c. - -
-
- - hexdump - - - - void hexdump - const void * memory - size_t offset - size_t extent - FILE * fp - - - - Print a full or partial memory region in hexadecimal format showing memory offsets, hexadecimal byte values and ASCII character values. Argument memory contains some memory region. Argument extent is the region length. Argument offset is the starting display location. Locations memory [offset] up to memory [extent] are displayed, allowing a partial dump of the memory region. An offset of 0 will display the entire region. The function is declared in memory.h and defined in hexdump.c. - - - This function is similar to but different from function hexview . - -
-
- - hexencode - - - - signed hexencode - byte memory [] - size_t extent - const char * string - - - - Encode a memory region with the binary equivalent of an ASCII hexadecimal string. Return the number of bytes encoded or 0 on error. The value of errno is set to EINVAL if the number of bytes encoded is less than extent or the entire string cannot be converted due to illegal digits or excessive digits. Ignore optional HEX_EXTENDER characters separating octets in argument string. Constant HEX_EXTENDER is defined in file number.h. The function is declared in memory.h and defined in hexencode.c. - -
-
- - hexin - - - - void hexin - const byte memory [] - size_t extent - FILE *fp - - - - This function is similar to hexencode but it reads from file, instead of a string, and ignores any non-hexadecimal text and comments embedded within the input stream. Incoming text is binary encoded and written to the specified memory region. Reading terminates on the next occurance of a semicolon or end of file. The actual number of bytes encoded is returned. The function is declared in memory.h and defined in hexin.c. - -
-
- - hexout - - - - void hexout - const byte memory [] - size_t length - char c - FILE *fp - - - - Print a memory region as a series of decimal octets separated by character c. Normally, character c will be HEX_EXTENDER, defined in file number.h, but it could be any character value. For example, specifying c as ':' and length as 6 would produce output looking something like "00:B0:52:DA:DA:01" where each octet is expressed as a hexadecimal integer. A typical use might be to print a MAC or Ethernet address in readable format. The function is declared in memory.h and defined in hexout.c. - -
-
- - hexstring - - - - char * hexstring - char buffer [] - size_t length - const byte memory [] - size_t extent - - - - Convert a memory region to a NUL terminated string and return the string address. This function is identical to function hexdecode but it return the string address instead of the number of characters decoded. The function is declared in memory.h and defined in hexstring.c. - -
-
- - hexview - - - - void hexview - const void * memory - size_t offset - size_t extent - FILE * fp - - - - Print a partial memory region in hexadecimal format showing memory offsets, hexadecimal byte values and ASCII character values. Argument memory contains part of a larger memory region, much like a file window. Argument extent is the window length. Argument offset is the relative offset of the window within the region. Locations memory [0] up to memory [extent] are displayed as a partial dump, providing a window into the region. The function is declared in memory.h and defined in hexview.c. - - This function is similar to but different from function hexdump. - -
-
- - ipv4spec - - - - size_t ipv4spec - const char * string - byte memory [] - - - - Encode a 4-byte memory region with an IPv4 dotted-decimal string and return the number of bytes encoded. Terminate the program with an error message and exitcode of 1 on conversion error. The value returned by this function is always 4 and memory is always encoded in network byte order. This function is typically used to convert IPv4 strings entered as command line arguments. The function is declared in memory.h and defined in ipv4spec.c. - - - Dotted-decimal format consists of decimal values in the range 0 through 255. Each value represents one octet or 8-bit value. IPv4 addresses require 4 such values separated by one decimal point. This function permits empty octets and leading zeros within octets. For example, ... is equivalent to 0.0.0.0 and 127.0.000.001 is equivalent to 127.0.0.1. The second example will encode memory as follows { 0x7F, 0x00, 0x00, 0x01 } which is in network byte order, or big endian. - -
-
- - ipv6spec - - - - size_t ipv6spec - const char * string - byte memory [] - - - - Encode a 16-byte memory region with an IPv6 colon-separated hexadecimal quartet string and return the number of bytes encoded. Terminate the program with an error message and exitcode of 1 on conversion error. The value returned by this function is always 16 and memory is always encoded in network byte order. This function is typically used to convert IPv6 strings entered as command line arguments. The function is declared in memory.h and defined in ipv6spec.c. - - - Colon-separated hexadecimal quartet notation consists of hexadecimal values in the range 0 through FFFF. Each value represents a quartet or a 32-bit value. IPv6 addresses require 8 quartets separated by one colon. By convention, an empty quartet expands with enough zeros to right-justify the remainder of the address. This function permits multiple empty quartets and leading zeros within quartets. When multiple empty quartets appear, only the right-most occurance expands to zeros. For example, AA12::BB34::CC56::DD78 is equivalent to AA12:0000:BB34:0000:CC56:0000:0000:DD78 because only the right-most empty field expands. This will encode memory as follows { 0xAA, 0x12, 0x00, 0x00, 0xBB, 0x34, 0x00, 0x00, 0xCC, 0x56, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x78 } which is in network byte order, or big-endian. - -
-
- - memdecr - - - - signed memdecr - byte memory [] - size_t length - - - - Decrement a multi-byte memory region. Return 0 on success or -1 if all bytes have decremented to 0x00. For example, { 0xFF, 0xFF, 0xFF } decrements to { 0xFF, 0xFF, 0xFE } and { 0xFF, 0x00, 0x00 } decrements to { 0xFE, 0xFF, 0xFF }. A typical use is to iterate through a range if IP or MAC address values. The function is declared in memory.h and defined in memdecr.c. - -
-
- - memincr - - - - signed memincr - byte memory [] - size_t length - - - - Increment a multi-byte memory region. Return 0 on success or -1 once all bytes have been incremented to 0xFF. For example { 0x00, 0x00, 0x00 } increments to { 0x00, 0x00, 0x01 } and { 0x00, 0xFF, 0xFF } increments to { 0x01, 0x00, 0x00 }. A typical use is to iterate through a range of IP or MAC address values. The function is declared in memory.h and defined in memincr.c. - -
-
- - memswap - - - - void memswap - void * buffer1 - void * buffer2 - size_t length - - - - Exchange the contents of one buffer with that of another. No provision is made for buffer overlap. No value is returned. A typical use might be to exchange source and destination addresses in an ethernet packet. The function is declared in memory.h and defined in memswap.c. - -
-
- - strdecr - - - - signed strdecr - byte memory [] - size_t length - byte min - byte max - - - - Decrement a multi-byte memory region using only ASCII character values in the range min through max. Return 0 on success or -1 once all characters have been decremented to the value of argument min. For example, if argument min is 'A' and argument max is 'Z' then { 'A', 'B', 'C' } decrements to { 'A', 'B', 'B' } and { 'B', 'Z', 'Z' } decrements to { 'A', 'A', 'A' }. A typical use is to generate a sequence of distinct character strings to seed encryption key functions. The function is declared in memory.h and defined in strdecr.c. - -
-
- - strincr - - - - signed strincr - byte memory [] - size_t length - byte min - byte max - - - - Increment a multi-byte memory region using only ASCII character values in the range min through max. Return 0 on success or -1 once all characters have been incremented to the value of argument max. For example, if argument min is 'A' and argument max is 'Z' then { 'A', 'B', 'C' } increments to { 'A', 'B', 'D' } and { 'A', 'Z', 'Z' } increments to { 'B', 'A', 'A' }. A typical use is to generate a sequence of distinct character strings to seed encryption key functions. The function is declared in memory.h and defined in strincr.c. - -
-
- - - -
- - tools/number.h - -
- - todigit - - - - unsigned todigit - unsigned c - - - - Return the integer value of character c interpreted as digit in the base 36 number system. It is called by many encode functions to support number base conversion. If the value of c is '0' through '9' then integer 0 through 9 is returned. If the value of c is 'A' through 'Z' or 'a' through 'z' then integer 10 through 35 is returned. The function is declared in number.h and defined in todogit.c. - -
-
- - basespec - - - - uint64_t basespec - const char * string - unsigned base - unsigned size - - - - Return the unsigned integer equivalent of a numeric string. Print an error message on stderr and exit the program with status 1 if a syntax error occurs or the result exceeds the capacity of the requested integer size in bytes. If base is 0, numeric values may be expressed in decimal, hexadecimal or binary notation where hexadecimal values start with "0x" and binary values start with "0b". When base is non-zero, the notation in string must conform to the corresponding number base rules. Applications should cast the return value to the appropriate data type prevent loss-of-data compiler warnings. This function is typically used to convert and length-check integers entered as command line arguments. The function is declared in number.h and defined in basespec.c. - - - Like function uintspec, this function both converts and range checks numeric string values, but the minimum and maximum value are implicit in the size of the integer. The minimum value is always 0 and the maximum value can be computed by ((1 << size << 3) - 1). - -
-
- - dataspec - - - - void dataspec - const char * string - byte memory [] - size_t extent - - - - Encode a memory region with the binary equivalent of a variable-length hexadecimal string. Print an error message on stderr and exit the program with the status 1 if a syntax error occurs or the number of octets exceeds extent. The number of octets may, however, be less than extent. Unlike function bytespec, hexadecimal octets may not be separated by colons. This function is typically used to enter variable-length data from the command line. The function is declared in memory.h and defined in dataspec.c. - -
-
- - uintspec - - - - uint64_t uintspec - const char * string - uint64_t minimum - uint64_t maximum - - - - Return the unsigned integer equivalent of a numeric string. Print an error message on stderr and exit the program with the value 1 when a syntax error occurs or the result exceeds the specified minimum or maximum value. Numeric values may be expressed in decimal, hexadecimal or binary notation where hexadecimal values start with "0x" and binary values start with "0b". Applications should cast the return value to the appropriate data type to avoid loss-of-data warnings on some compilers. This function is typically used to convert and range-check integer values entered as command-line arguments. The function is declared in number.h and defined in uintspec.c. - -
-
- - -
- - tools/symbol.h - -
- - assist - - - - void assist - const char * name - const char * type - const struct _code_ list [] - size_t size - FILE * fp - - - - Show why a symbolic name was rejected by function lookup or similar functions. Argument type contains a title for the class of names stored in list. This function prints an error message on file stream fp showing the program name, the type string, the symbolic name and all names stored in the list. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in assist.c. Function expect is used to print list names. - -
-
- - expect - - - - void expect - const struct _code_ list [] - size_t size - FILE * fp - - - - Display all names in argument list on file stream fp. This function is called by runction assist to print the list of symbolic names but other function may have use for it. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in expect.c. - -
-
- - lookup - - - - signed lookup - const char * name - const struct _code_ list [] - size_t size - - - - Lookup a symbolic name in a list and return an associated integer or -1 if the name does not appear in the list. A typical use is the translation of symbolic command line arguments to integer codes. For example, some Toolkit programs assign symbolic names to field codes so that users can enter names instead of numbers. This approach becomes more useful as the number of permitted codes increases. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in lookup.c. - - - This function offers two benefits: 1) multiple symbols can translate to one code and 2) names can be changed or new names added without affecting program logic. This function is similar to but different from function synonym which returns a character string instead of an integer. - -
-
- - synonym - - - - const char * synonym - const char * string - const struct _term_ list [] - size_t size - - - - Lookup a symbolic name in a list and return an associated string or the original string if the name does not appear in the list. A typical use is the translation of symbolic command line arguments to their equivalent numeric strings before encoding them. For example, many Toolkit programs convert the command line argument local to 00:B0:52:00:00:01 before encoding the device MAC address. The _term_ structure is declared in types.h. The function is declared in symbol.h and defined in synonym.c. - - - This function is similar to but different from function lookup which returns an integer instead of a character string. - -
-
- - typename - - - - const char * typename - const struct _type_ list [] - size_t size - type_t type - const char * name - - - - Return the name associated with a message type by searching a list arranged in ascending order by message type. Return argument name as the function value if the message type is not present in the list. Data types struct _type_ and type_t are defined in file types.h. A typical use might be to return the name of message based on the message type. The function is declared in tools.h and defined in typename.c. - -
-
- - - - -
- - tools/putoptv.h - -
- - putoptv - - - - void putoptv - const char * optv [] - - - - Print program information on stdout. Program information is stored in string vector optv. String indexes are defined in file putoptv.h. String optv[0] is the POSIX standard argument optstring. This function is called by function getoptv whenever option -? or --help is detected on the command line. There is virtually no need to call this function directly. The function is declared in putoptv.h and defined in putoptv.c. - -
-
- -
- - tools/version.h - -
- - version - - - - void version - - - - - Print package and program version information on stdout. This function is called by function getoptv whenever option -! or --version is detected on the command line. There is virtually no need to call this function directly. The function is declared in version.h and defined in version.c. Constants PACKAGE and VERSION define the information that is displayed. They are defined in file version.h and must be maintained by developers. - -
-
- -
- - mme/mme.h - -
- - MMECode - - - - const char *MMECode - uint16_t MMTYPE - uint8_t MSTATUS - - - - Return text that explains the status code for a given Atheros vendor-specific management message. Argument MMTYPE is an unsigned integer in the range 0xA000 through 0xAFFF and must exactly match the MMTYPE of the message returning the status code. For example, the CNF variant of a message is currently the only variant that has an MSTATUS field and so other variants return a default string. The function is declared in mme.h and defined in MMECode.c. - - - Inclusion of this function can increase application size by 3kb because the text associated with all Atheros vendor-specific management messages and errors are included whether needed or not. Conditional compilation statements are provided internally to suppress the full table with a terse substitute. - - - Although the Bootloader and firmware share some common Vendor Specific Management Messages, the two programs may return different codes for a given message and error condition. Where there are conflicts, Bootloader codes take precedence over firmware codes because it is unlikely that users will .issue the same messages to a device running firmware. - -
-
- - MMEMode - - - - const char *MMEMode - uint16_t MMTYPE - - - - Return the mode of a given management message type as a string. The mode is determined by the two least significant bits of argument MMTYPE. The mode string will be one of REQ, CNF, IND or RSP. The function is declared in ihp.h and defined in MMEMode.c. - - - Most management messages have a request and a confirmation variant while a few have an indication and a response variant. Requests originate from the host and are acknolwedged by a confirmation from the device. Indications originate from a device and are acknowledged by a response from the host. - -
-
- - MMEName - - - - const char *MMEName - uint16_t MMTYPE - - - - Return the name associated with a given management message type. The name is the mnemonic used to distinguish one message type from another in the HomePlug AV Specification or Atheros Firwmare Technical Reference Manual. Argument MMTYPE is an unsigned integer in the range 0x0000 through 0xAFFF. The request, confirmation, indication and response variants of a management message will all return the same message name. The function is declared in mme.h and defined in MMEName.c. - -
-
- - MMEPeek - - - - void MMEPeek - const byte memory [] - size_t length - size_t length, FILE *fp - - - - Prints an Atheros vendor-specific management message to stream fp in human readable format. Argument buffer is the message address and argument length is the message length in bytes. Output consists of a formatted header showing decoded header. The function is declared in mme.h and defined in MMEPeek.c. - -
-
- - -
- - crypt/keys.h - -
- - MACPasswords - - - - void MACPasswords - uint32_tvendor - uint32_tdevice - uint32_tnumber - unsigned count - unsigned bunch - unsigned space - flag_t flags - - - - Print a range of device addresses and user passwords on stdout. The calling application must split the starting device address into a three-byte OUI and three-byte device number and pass them as the unsigned 32-bit integers vendor and device, respectively. Argument device is the first device number in the range and number is the final device number. Argument count is the number of uppercase letters comprising a password. Passwords contain this many letters but the letters are grouped for easy reading. Letter groups are separated by hyphens. Argument bunch defines how many letters form each group. Argument space is the character used to separate groups of letters. Argument flags enables or disables function features such as insertion of a used flag for use by the Atheros Production Test System or the omission of the device address on output. The output of this function is similar to that produced by the DB Builder utility distributed with the PTS. This function is declared in keys.h and defined in MACPasswords.c. -
-
- - -
- - crypt/HPAVKey.h - -
- - HPAVKeyDAK - - - - void HPAVKeyDAK - byte DAK [] - const char string - - - - Encode buffer DAK with the Device Access Key (DAK) derived from the NUL terminated string. The string is salted, hashed and re-hashed using the SHA256 algorithm. The DAK is always HPAVKEY_DAK_LEN bytes, defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyDAK.c. - -
-
- - HPAVKeyNMK - - - - void HPAVKeyNMK - byte digest [] - const char string - - - - Encode buffer NMK with the Network Membership Key (NMK) derived from the NUL terminated string. The string is salted, hashed and re-hashed using the SHA256 algorithm. The DAK is always HPAVKEY_NMK_LEN bytes, as defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyNMK.c. - -
-
- - HPAVKeyNID - - - - void HPAVKeyNID - byte NID [] - const byte NMK [] - signed level - - - - Encode buffer NID with the Network Identification Key (NID) derived from the 16-byte Network Membership Key (NMK). The NMK is hashed and re-hashed using the SHA256 algorithm then encoded with the security level. The NID is always HPAVKEY_NID_LEN bytes, as defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyNID.c. - -
-
- - HPAVKeyOut - - - - void HPAVKeyOut - const byte digest [] - size_t length - const char * phrase - flag_t flags - - - - Decode and print up to length bytes from buffer digest on stdout. Print NUL terminated phrase on the same line following the digest when bit HPAVKEY_VERBOSE, defined in HPAVKey.h, is set in flags. This procedure prints keys and phrases in a standard column-oriented format that other applications can easily read and use. This function is declared in HPAVKey.h and defined in HPAVKeyOut.c. - -
-
-
- - crypt/SHA256.h - -
- - SHA256Block - - - - void SHA256Block - struct sha256 *sha256 - const byte buffer [] - - - - Merge one 64 byte block of information into the current SHA256 digest. This function performs the core computations required by the SHA256 algoithm. It is called by function SHA256Fetch and there is no reason to call this function directly. This function is declared in SHA256.h and defined in SHA256Block.c. The sha256 structure is defined in SHA256.h. - -
-
- - SHA256Fetch - - - - void SHA256Fetch - struct sha256 *sha256 - byte digest [] - - - - Conclude SHA256 computation and copy the result to the specified 32-byte digest buffer. The digest is always 32 bytes long regardless of the amount of information written using function SHA256Write. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Fetch.c. - -
-
- - SHA256Ident - - - - void SHA256Ident - int fd - byte digest [] - - - - Compute the SHA256 digest from the content of a file. The digest serves as the file fingerprint and can be used to identify identical content despite filename changes. File descriptor fd is the subject file which must be positioned to the start befor calling this function. Buffer digest will be written with the computed 256-digest and must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Ident.c. - -
-
- - SHA256Match - - - - void SHA256Match - int fd - const byte digest [] - - - - Search a registry file for a known SHA256 digest. Return true on success or false on failure. File descriptor fd is the registry file which must be positioned to the start before calling this function. Buffer digest contains the known 256-bit digest and must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h. A registry file consists of 64-digit hexadecimal strings that represent SHA256 digest values. Optional text may be appear between the digest and newline to document digest significance. This function ignores such text. This function is declared in SHA256.h and defined in SHA256Match.c. - -
-
- - SHA256Print - - - - void SHA256Print - const byte digest [] - const char * string - - - - Print an SHA256 digest and optional string on stdout. Buffer digest must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h, which results in 64 hexadecimal digits on output. Variable length string is NUL terminated but may be NULL. If string is not NULL and is not empty then a space is inserted between the digest and the string on output. This function may be used to print SHA256 digests and optional strings in standard format, such as a registry file. This function is declared in SHA256.h and defined in SHA256Print.c. - -
-
- - SHA256Reset - - - - void SHA256Reset - struct sha256 *sha256 - - - - Initialize a sha256 structure before computing a new SHA256 digest. This function should be called once before calling SHA256Write for the first time for a given digest. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Reset.c. - -
-
- - SHA256Write - - - - void SHA256Write - struct sha256 *sha256 - const byte buffer [] - size_t length - - - - Writes a variable-length block of information to the current SHA256 digest contained in an sha256 structure. An application may call this function any number of times to concatinate multiple blocks of information before fetching the digest with function SHA256Fetch. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Write.c. - -
-
- - - -
- - nodes/node.h - -
- - xmledit - - - - signed xmledit - struct node *node - byte buffer [] - size_t length - - - - Write data into buffer based on offset and length values defined in XML parse tree, node. This function will not apply modifications having malformed structure or having an invalid or an illegal offset, length or data value. Use function xmlschema to print the current schema. The function is declared in node.h and defined in xmledit.c. The node structure is defined in node.h. - -
-
- - xmlfree - - - - void xmlfree - struct node *node - - - - Release memory associated with an XML parse tree. The function is declared in node.h and defined in xmlfree.c. The node structure is defined in node.h. - - - The text member if the parse tree root node points to memory allocated by xmlscan to store the original XML string. The application must either deallocate that memory before calling this function or store the text address and deallocate that memory after calling this function; otherwise, memory leaks will result. - -
-
- - xmlnode - - - - struct node *xmlnode - struct node *node - - - - Create an empty node blow the specified node and return a pointer to it. A typical application can be seen in function xmlscan.c. The function is declared in node.h and defined in xmlnode.c. The node structure is defined in node.h. - -
-
- - xmlopen - - - - struct node *xmlopen - const char *filename - - - - Open the named XML file, parse it and return the XML parse tree. The parse tree contains, among other things, all XML elements, attributes and values specified in the file. The function is declared in node.h and defined in xmlopen.c. The node structure is defined in node.h. - - - The returned parse tree is ready to traverse using struct node members above, below, prior and after. Each node has a line, type and test member. This function calls function xmlscan to parse the file and generate the tree. The parse tree can be inspected by passing the root node to function xmltree. - -
-
- - xmlscan - - - - signed xmlscan - struct node *node - - - - Scan the XML string attached to the specified node and create a parse tree below it. Return 0 if parsing is successrul or -1 if not. The function is declared in node.h and defined in xmlscan.c. The node structure is defined in node.h. - - - The application must point the text member to a copy of the XML string before calling this function because parsing is destructive and requires write access to the string. The application can search and manipulate the tree on return. The application should deallocate string memory before calling xmlfree. - - - - XML Source File - - - The following is sample input to function xmlscan. The element and attribute names shown are for illustration and were selected to that they can be easily identified in the output. The parse tree from this file can be seen in the example for function xmltree. - - - - - - 1234567890 - - - The quick brown fox jumped over the lazy dog. - - - - - - - The quick brown - fox jumped over - the lazy dog. - - - - - - - value2 - - - -]]> - -
-
- - xmlschema - - - - void xmlschema - - - - - Print an XML schema that supports function xmledit on stdout. This function has no argument. The schema produced by this function is guaranteed to support the parse logic implemented by function xmledit. Scheme element names are defined as constants in node.h so that they can be referenced by applications that create their own XML edit instructions. The function is declared in node.h and defined in xmlschema.c. - - - The text member in the parse tree root node points to memory allocated by xmlscan to store the original XML string. The application must either deallocate that memory before calling this function or store the text address and deallocate that memory after calling this function; otherwise, memory leaks will result. - - - - XML Edit Schema - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]> - - The schema shown above was produced by function xmlschema. It is should be used to validate XML edit instructions before submitting them to program pxe. - - -
-
- - xmltree - - - - void xmltree - struct node *node - - - - Print the XML parse tree on stdout. The function is declared in node.h and defined in xmltree.c. - - - - XML Parse Tree - - - The following is sample output from function xmltree. The XML source is shown in the example for function xmlscan . The numbers appearing down the left margin indicate the input line number from the XML source file parsed by function xmlscan . The character codes indicate the node type and are defined in node.h. The node structure is defined in node.h. - -] [1234567890] -006 [/] [attribute] -007 [<] [attribute] -007 [ ] [name] -007 [=] [Attribute2] -008 [>] [The quick brown fox jumped over the lazy dog.] -009 [/] [attribute] -010 [/] [element] -011 [<] [element] -011 [ ] [name] -011 [=] [Element2] -012 [<] [attribute] -012 [ ] [name] -012 [=] [Attribute1] -013 [/] [attribute] -014 [<] [attribute] -014 [ ] [name] -014 [=] [Attribute2] -015 [>] [The quick brown fox jumped over the lazy dog.azy] -018 [/] [attribute] -019 [/] [element] -020 [!] [-- comments can go anywhere --] -021 [<] [element] -021 [ ] [name] -021 [=] [Element2] -022 [<] [attribute] -022 [ ] [name] -022 [=] [Attribute1] -023 [<] [attribute] -023 [ ] [name] -023 [=] [Attribute2] -024 [>] [value2] -025 [/] [attribute] -026 [/] [element] -027 [/] [xmlfile] -]]> - -
-
-
- - scan/scan.h - -
- - scaninput - - - - void scaninput - struct scan * content - const char buffer [] - signed length - - - - Initializes a SCAN structure for scanning by pointing the structure a buffer of given length, resetting intermmediate pointers and clearing the token class code. - -
-
-
diff --git a/docbook/lists.xsl b/docbook/lists.xsl deleted file mode 100644 index 072a3499..00000000 --- a/docbook/lists.xsl +++ /dev/null @@ -1,1087 +0,0 @@ - - - - - - - - -
- - - - - - - - -
    - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - circle - disc - square - - - - - - -
  • - - - list-style-type: - - - - - - - - - - - -
    - -
    -
    - - - -
    -
  • -
    - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - 1 - a - i - A - I - - - - Unexpected numeration: - - - - - - - -
    - - - - - - - - - -
      - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - -
  • - - - - - - - - - - - - - -
    - -
    -
    - - - -
    -
  • -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - , - - - - - - - - - - - - - -
    - -
    -
    - - - -
    -
    - - - - - - - - - - - - - - 1 - - - -
    -
    - - - - - - - - - - - - - - - - - - 1 - - - -
    -
    - - - - - - - - - - - 1 - - - -
    -
    - - - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - 1 - 1 - - 1 - - - - - - - - -   - - - - - - - - - - - - - - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - 1 - 1 - - 1 - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - before - - - - - - - - - -
    - - - - 0 - 1 - - - - - - - - - - - - -
      - -
    -
    - -
      - - - - -
    -
    -
    - - - - -
    -
    - - - - - - - - - - - - -
      - -
    -
    - - -
  • - - -
  • -
    - - - -
      - -
    -
    - - -

    - - - -

    -
    - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - -
    -
    - - -
    - -
    -
    - - - - - - - - - -
    - - -
    -
    - - - - - - - - -
    - - - - : - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - -
    -
    - -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ??? - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ??? - - - - - - -
    - diff --git a/docbook/lookup.c.html b/docbook/lookup.c.html deleted file mode 100644 index 67a51979..00000000 --- a/docbook/lookup.c.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - lookup.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   signed lookup (char const * name, struct _code_ const list [], size_t size);
    - *
    - *   symbol.h
    - *
    - *   search a name list and return the associated name; return the
    - *   corresponding code on success or -1 on failure; the search is
    - *   case insensitive;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef LOOKUP_SOURCE
    -#define LOOKUP_SOURCE
    -
    -#include <unistd.h>
    -#include <string.h>
    -
    -#include "../tools/symbol.h"
    -
    -signed lookup (char const * name, struct _code_ const list [], size_t size)
    -
    -{
    -	struct _code_ const * item = list;
    -	if ((name) && (*name)) while ((unsigned)(item - list) < size)
    -	{
    -		if (!strcasecmp (item->name, name))
    -		{
    -			return (item->code);
    -		}
    -		item++;
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/mac2pw.1.html b/docbook/mac2pw.1.html deleted file mode 100644 index cdefddb5..00000000 --- a/docbook/mac2pw.1.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - mac2pw.1 - - - - - - - - - -
    -mac2pw(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   mac2pw(1)
    -
    -NAME
    -       mac2pw - Qualcomm Atheros Ethernet Device Password Generator
    -
    -SYNOPSIS
    -       mac2pw [options] address [address] [...]
    -
    -DESCRIPTION
    -       Print  a  range  of  consecutive  Ethernet addresses and passwords on stdout such that each device has a unique password.
    -       Program output is suitable as input to the Qualcomm Atheros HomePlug AV Production Test System or may be used  in  custom
    -       production  systems.   A  starting  address and an address range are specified.  Computed passwords consist of upper case
    -       letters and digits with optional group separators.  Output consists of address/password pairs in text format.
    -
    -       This program is designed to generate passwords for a large number of consecutive device addresses.  It  complements  pro‐
    -       gram mac2pwd which generates passwords for non-consecutive device addresses occurring in unspecified order.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -CAVEATS
    -       Atheros provides this program as a simple means of generating unique device passwords for  a  large  volume  of  Ethernet
    -       devices.  Two different password algorithms are implemented but neither one is required for HomePlug AV compliance.  Ven‐
    -       dors are free to use other methods to generate their own device passwords and are encouraged to do so.
    -
    -       Random Method
    -              Generate passwords based on system entropy.  A different set of passwords is generated for a given  address  range
    -              with  each  program execution.  There is no correlation at between addresses and passwords.  This method is secure
    -              but requires care when programming and labelling devices at the factory.  It may be necessary to maintain a  data‐
    -              base if regular device maintenance and firmware upgrade are needed.
    -
    -       Device Method
    -              Generate passwords based on device address.  The same set of passwords will be generated for a given address range
    -              with each program execution.  This method may be appropriate on system  where  regular  maintenance  and  firmware
    -              updates  are  required.   This  method is not secure because device addresses can be determined using a variety of
    -              network management programs.  Anyone having access to this program, or the algorithm,  could  compute  the  device
    -              password  and gain access to device features reserved for privileged users.  This program does provide features to
    -              mitigate the risks of using this method.
    -
    -OPTIONS
    -       -b bunch
    -              The password bunching factor.  Passwords consists of count uppercase letters and digits  optionally  displayed  in
    -              groups  separated by hyphens.  The bunching factor specifies the number of letters and digits in each group.  When
    -              bunch is 0 or greater than count, bunching is suppressed.  Separating hyphens increase  overall  password  length.
    -              The minimum is 0 and the maximum is 255.  The default is 0 which suppresses bunching.
    -
    -       -e     Compute  passwords  based on host system entropy.  Passwords consist of uppercase letters [A-Z] optionally grouped
    -              using option -b.  This method produces a non-repeatable set of unique passwords over a given address range.   This
    -              method is the default and is secure.
    -
    -       -l count
    -              The  number  of  letters  in  the password string.  Overall password length is the sum of count plus the number of
    -              delimiters implied by bunch.  The minimum is 12 and the maximum is 64.  The default is 16.
    -
    -       -m     Compute passwords based on target device address.  Passwords consist of uppercase letters [A-Z].  This method pro‐
    -              duces a repeatable set of unique passwords over a given address range.  This method is not secure.
    -
    -       -n number
    -              The  number  of  consecutive  addresses  and  passwords to compute and print.  The minimum is 0 and the maximum is
    -              1677215 or 0xFFFFFF.  The default is 1.  In addition, number cannot exceed the remaining  available  addresses  in
    -              the  vendor  range.  For example, given start address 00:B0:52:FF:FF:00, there are only 255 remaining addresses in
    -              the 00:B0:52 vendor range so it would be an error to request more than that number.
    -
    -       -q     Quiet mode.  Exclude the device address on output.  This option can be used in  scripts  to  return  the  password
    -              associated with a given device address.
    -
    -       -v     Verbose mode.  Prefix each line with a '0' column.  The Atheros Production Test System (PTS) uses the first column
    -              of a password database file to indicate which addresses and passwords have already been used.
    -
    -       -?,--help
    -              Print program help information on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       address
    -              The first Ethernet address expressed as 12 consecutive hexadecimal digits.  Puncutation  is  not  permitted.   The
    -              final  address of the range is computed by adding number to this address.  This argument is required.  There is no
    -              default address.  If more than one device address is specified then an address/password series  will  be  computed
    -              for each.
    -
    -EXAMPLES
    -       The  following  example  prints  the  given  device address and a random password string on stdout.  The default password
    -       length is 25 characters long but the length can be changes using option -l.
    -
    -          # mac2pw 00B052000001
    -          00B052000001 5KAXCQFQNN4PPNC76XN2YUWMS
    -
    -       Repeating the command will generate a new password string.  This is the default behaviour and is the same  as  specifying
    -       option -e for "entropy".
    -
    -          # mac2pw 00B052000001
    -          00B052000001 CA35TM5JLG4S6XBKSM3HSU6J4
    -
    -       This example ommits the device address.  Repeating the command produces a new password string.
    -
    -          # mac2pw 00B052000001 -q
    -          2LJ6P5JPEHE6V63GZWC337Q8E
    -          # mac2pw 00B052000001 -q
    -          5Z8J7EGGL2HJDKMZ978W8V94W
    -
    -       The  next  example shows how to generate passwords for three different devices with one command.  The program generates a
    -       password for each device address specified on the command line.
    -
    -          # mac2pw 00B052000001 00B05200BABE 00B05200DEAD
    -          00B052000001 NJHWXEFRPVVW87C9J4BQEHYYE
    -          00B05200BABE 5PT9Z64Z4TVRPEJCK8LR2XFMR
    -          00B05200DEAD 7R2LJYGJB42329AS4NM29H8V4
    -
    -       The next example prints 10 consecutive device addresses and random passwords on stdout.  The starting device  address  is
    -       given and option -n specifies the number of addresses to print.  Output can be piped to a file or another process.
    -
    -          # mac2pw 00B052000001 -n 10
    -          00B052000001 LEKWS42VX92YR3LLL6KBD5RCG
    -          00B052000002 BHYKXG3VEVXNZ7CF2UERCU4G6
    -          00B052000003 UBP87NFZMMW5WY8KK5GJFAWS3
    -          00B052000004 CU7Y7JKFNASS6E4GQ3XL3HWGZ
    -          00B052000005 9RN3WTXAQUXV8THZUB898ZGB3
    -          00B052000006 HCXNPW2CM9JVHBJN2TZVRVDU6
    -          00B052000007 DFD5QY5HATC5NFC5SF3AWL2PD
    -          00B052000008 837GAN4HSG9U6TTRCPRXMG84T
    -          00B052000009 HBLZHG32FSZKQ8TANGK5U8DS9
    -          00B05200000A KEY9D3DW66HX68AWZRCD4VPD9
    -
    -       The  following  example prints 10 consecutive device addresses and passwords but inserts a 0 at the start of each line to
    -       indicate that the address and password have not been used.  The Qualcomm Atheros Production Test System  (PTS)  will  set
    -       the 0 to 1 after it programs a device.  This format is simlar to PTS DBBuilder Utility output.
    -
    -          # mac2pw 00B052000006 -n 10 -v
    -          0 00B052000006 VZNKWJUHAV2687NV6EJYUVQ4D
    -          0 00B052000007 RENKKWRNFLU4ZNZ3P6K4SZ4PG
    -          0 00B052000008 NEL6LL2V2YZAL2Q27E2DJ25BG
    -          0 00B052000009 MYX2T5HM68T5JCK7YYJNDWH2P
    -          0 00B05200000A 6UY4MPYP43GXSD39VLTNZCJEZ
    -          0 00B05200000B MD47KPFZLSNL9XRLJTN3MKJ5N
    -          0 00B05200000C BKVTVYE47LE4DKMUNQPPXR7HL
    -          0 00B05200000D RBJ8DA5DB48TZUTAQXZ9CPFTM
    -          0 00B05200000E HSK6N9ZGZPGV4T5YXST4DH3W8
    -          0 00B05200000F BLW8QQ4JMEVSQJYHRPBDGG5RS
    -
    -       The next example prints 10 consecutive device addresses and passwords, as before, but changes password length and charac‐
    -       ter bunching.  Option -l specifies 12 characters and option -b specifies a bunching factor of three.
    -
    -          # mac2pw 00B052000001 -n 10 -l 12 -b 3
    -          00B052000001 S2J-V4B-NB6-37M
    -          00B052000002 QEX-292-CYF-AVV
    -          00B052000003 5VH-2KR-FYP-EVH
    -          00B052000004 NYU-TPB-ZK3-6H6
    -          00B052000005 MGX-GB7-P2P-42B
    -          00B052000006 DDM-UD8-8NS-BZA
    -          00B052000007 MLZ-86G-F4G-MS8
    -          00B052000008 DTY-U8D-DT8-3G2
    -          00B052000009 6BY-WVU-GB9-UEB
    -          00B05200000A TX3-NUS-TKM-LVL
    -
    -       The next example prints 10 consecutive device addresses and passwords, as before, but  starts  from  a  different  device
    -       address.   We  specified  option -m so that passwords are generated based on the MAC address.  This ensures that the same
    -       password is generated each time for a given device address.  We also specified password length  or  16  characters  using
    -       option -l and bunching factor of 4 with option -b.
    -
    -          # mac2pw 00B052000001 -m -l 16 -b 4 -n 10
    -          00B052000001 HBXY-FVHN-COML-MVLY
    -          00B052000002 KYCC-KFFD-BHCN-CSUL
    -          00B052000003 LQXF-TULV-IOQB-SKJI
    -          00B052000004 SOBX-FRNC-EIHL-KBPW
    -          00B052000005 XPAC-KESG-MDYY-OFPQ
    -          00B052000006 SFTQ-DWEF-GHYC-VOWW
    -          00B052000007 NNZQ-FCTW-VQLG-ESBV
    -          00B052000008 SEPC-KYYS-JZEO-HHVT
    -          00B052000009 OYPS-DSDV-QILZ-JYOV
    -          00B05200000A HQYV-FIWJ-CJDZ-XPNZ
    -
    -       The following example prints 10 consecutive device addresses and passwords, as before, but starts from a different device
    -       address.  The address range here overlaps the range shown above but identical device addresses have identical  passwords.
    -       Address based passwords may be of interest on large private networks requireing frequent firmware upgrades or device con‐
    -       figuration.
    -
    -          # mac2pw 00B052000006 -m -l 16 -b 4 -n 10
    -          00B052000006 SFTQ-DWEF-GHYC-VOWW
    -          00B052000007 NNZQ-FCTW-VQLG-ESBV
    -          00B052000008 SEPC-KYYS-JZEO-HHVT
    -          00B052000009 OYPS-DSDV-QILZ-JYOV
    -          00B05200000A HQYV-FIWJ-CJDZ-XPNZ
    -          00B05200000B MQIG-KUKM-YQSJ-KPRM
    -          00B05200000C VTLW-DAVK-JCMU-JQLU
    -          00B05200000D PIQB-OITS-RFCY-PUVE
    -          00B05200000E IWAV-KYJM-JBEM-GPMR
    -          00B05200000F LQJY-DSEX-WDHE-FVMB
    -
    -DISCLAIMER
    -       Qualcomm Atheros reserves the right to modify program names, functionality, input format or output format in future tool‐
    -       kit releases without any obligation to notify or compensate toolkit users.
    -
    -SEE ALSO
    -       hpavkey(1), hpavkeys(1), keys(1), mac2pwd(1), rkey(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        Pouyan Sepehrdad <pouyans@qti.qualcomm.com>
    -        Ning Shang <nshang@qti.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   mac2pw(1)
    -
    - - - diff --git a/docbook/mac2pw.c.html b/docbook/mac2pw.c.html deleted file mode 100644 index d8e08d54..00000000 --- a/docbook/mac2pw.c.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - mac2pw.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define _GETOPT_H
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <string.h>
    -#include <limits.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -#include "../key/keys.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/todigit.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/MACPasswords.c"
    -#include "../key/RNDPasswords.c"
    -#include "../key/putpwd.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef ETHER_ADDR_LEN
    -#define ETHER_ADDR_LEN 6 
    -#endif
    -
    -/*====================================================================*
    - *   program functions;
    - *--------------------------------------------------------------------*/
    -
    -void (* generate)(unsigned, unsigned, unsigned, unsigned, unsigned, char, flag_t) = RNDPasswords;
    -
    -/*====================================================================*
    - *
    - *   void function (const char * string, unsigned range, unsigned alpha, unsigned bunch, unsigned space, flag_t flags)
    - *
    - *   parse an Ethernet hardware address string into vendor and device
    - *   ID substrings; print a specified number of consecutive addresses
    - *   and password strings having a defined letter count and grouping;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (const char * string, unsigned range, unsigned alpha, unsigned bunch, unsigned space, flag_t flags)
    -
    -{
    -	extern void (* generate)(unsigned, unsigned, unsigned, unsigned, unsigned, char, flag_t);
    -	const char * offset = string;
    -	unsigned vendor = 0;
    -	unsigned device = 0;
    -	unsigned radix = 0x10;
    -	unsigned width;
    -	unsigned digit;
    -	for (width = 0; width < ETHER_ADDR_LEN; width++)
    -	{
    -		if ((digit = todigit (*offset)) < radix)
    -		{
    -			vendor *= radix;
    -			vendor += digit;
    -			offset++;
    -			continue;
    -		}
    -		error (1, EINVAL, "Bad MAC Address: %s", string);
    -	}
    -	if (!vendor)
    -	{
    -		error (1, EPERM, "Vendor ID can't be zero");
    -	}
    -	for (width = 0; width < ETHER_ADDR_LEN; width++)
    -	{
    -		if ((digit = todigit (*offset)) < radix)
    -		{
    -			device *= radix;
    -			device += digit;
    -			offset++;
    -			continue;
    -		}
    -		error (1, EINVAL, "Bad MAC Address: %s", string);
    -	}
    -	if (!device)
    -	{
    -		error (1, EPERM, "Device ID can't be zero");
    -	}
    -	if (*offset)
    -	{
    -		error (1, EINVAL, "Bad MAC address: %s", string);
    -	}
    -	if (range > (0x00FFFFFF - device))
    -	{
    -		error (1, ERANGE, "Want %d passwords but only %d left in range", range, (0x00FFFFFF - device));
    -	}
    -	generate (vendor, device, range, alpha, bunch, space, flags);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, const char * argv []);
    - *
    - *   generate unique password strings for a range of device hardware
    - *   addresses; print paired addresses and passwords on stdout;
    - *
    - *   Many Atheros programs expect the user to enter a password to
    - *   access a device; the password is encoded to produce the 16-bit
    - *   Device Access Key (DAK) stored in the PIB;
    - *
    - *   Vendors must publish the device password so that end users can
    - *   reproduce the same 16-byte hexadecimal value later; a password
    - *   is more user-friendly than a 16-byte hexadecimal value;
    - *
    - *   given a range of MAC address, this program will produce unique
    - *   passwords so vendors can program devices and print labels that
    - *   ship devices;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define DEFAULT_RANGE 1
    -#define DEFAULT_ALPHA 25
    -#define DEFAULT_BUNCH 0
    -
    -int main (int argc, const char * argv [])
    -
    -{
    -	extern void (* generate)(unsigned, unsigned, unsigned, unsigned, unsigned, char, flag_t);
    -	static const char * optv [] =
    -	{
    -		"b:el:mn:qv",
    -		"address [address] [...]",
    -		"Atheros device password generator",
    -		"b n\tbunching factor [" LITERAL (DEFAULT_BUNCH) "]",
    -		"e\tbase passwords on host system entropy (more secure)",
    -		"l n\tpassword letters [" LITERAL (DEFAULT_ALPHA) "]",
    -		"m\tbase passwords on MAC addresses (non-secure)",                     
    -		"n n\tgenerate n consecutive passwords [" LITERAL (DEFAULT_RANGE) "]",
    -		"q\tomit device address on output",
    -		"v\tprepend PTS flag on output",
    -		(const char *)(0)
    -	};
    -	unsigned range = DEFAULT_RANGE;
    -	unsigned alpha = DEFAULT_ALPHA;
    -	unsigned bunch = DEFAULT_BUNCH;
    -	unsigned space = '-';
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char)(c))
    -		{
    -		case 'b':
    -			bunch = uintspec (optarg, 0, UCHAR_MAX);
    -			break;
    -		case 'e':
    -			generate = RNDPasswords;
    -			break;
    -		case 'l':
    -			alpha = uintspec (optarg, 12, 64);
    -			break;
    -		case 'm':
    -			generate = MACPasswords;
    -			break;
    -		case 'n':
    -			range = uintspec (optarg, 0, 0x00FFFFFF);
    -			break;
    -		case 'q':
    -			_setbits (flags, PASSWORD_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PASSWORD_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argv) && (* argv))
    -	{
    -		function (* argv, range, alpha, bunch, space, flags);
    -		argc--;
    -		argv++;
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/mac2pwd.1.html b/docbook/mac2pwd.1.html deleted file mode 100644 index 368ff249..00000000 --- a/docbook/mac2pwd.1.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - mac2pwd.1 - - - - - - - - - -
    -mac2pwd(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  mac2pwd(1)
    -
    -NAME
    -       mac2pwd - Qualcomm Atheros Ethernet Device Password Generator
    -
    -SYNOPSIS
    -       mac2pwd [options] file [file] [ ... ]
    -
    -DESCRIPTION
    -       Read Ethernet MAC addresses from one or more files and print a unique password for each address.  Program output is suit‐
    -       able as input to the Qualcomm Atheros HomePlug AV Production Test System or may be used  in  custom  production  systems.
    -       Input  addresses  can  appear in any order and need not be consecutive.  Computed passwords consist of upper case letters
    -       and digits with optional group separators.  Output consists of address/password pairs in text format.
    -
    -       This program may be used to generate passwords for large numbers of non-consecutive MAC addresses that occur in  unspeci‐
    -       fied  order.   It  complements program mac2pw which generates passwords for consecutive MAC addresses over a given range.
    -       Options exist to modify the password algorithm, password length and character bunching.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -CAVEATS
    -       Atheros  provides  this program as a simple means of generating unique and apparently random device passwords for a large
    -       volume of Ethernet devices.  Two different password algorithms are implemented but neither one is required  for  HomePlug
    -       AV compliance.  Vendors are free to use other methods to generate their own device passwords and are encouraged to do so.
    -
    -       Random Method
    -              Generate  random passwords based on system entropy.  A different set of passwords is generated for a given address
    -              range with each program execution.  There is no correlation at  between  addresses  and  passwords.   This  method
    -              secure but requires care when programming and labelling devices at the factory.  It may be necessary to maintain a
    -              database if regular device maintenance and firmware upgrade are needed.
    -
    -       Device Method
    -              Generate apparently random passwords based on device address.  The same set of passwords will be generated  for  a
    -              given  address  range with each program execution.  This method may be appropriate on system where regular mainte‐
    -              nance and firmware updates are required.  This method is not secure because device  addresses  can  be  determined
    -              using  a  variety  of  network management programs.  Anyone having access to this program, or the algorithm, could
    -              compute the device password and gain access to device features reserved for privileged users.  This  program  does
    -              provide features to mitigate the risks of using this method.
    -
    -OPTIONS
    -       -b bunch
    -              The  password  bunching  factor.  Passwords consists of count uppercase letters and digits optionally displayed in
    -              groups separated by hyphens.  The bunching factor specifies the number of letters and digits in each group.   When
    -              bunch  is  0  or greater than count, bunching is suppressed.  Separating hyphens increase overall password length.
    -              The minimum is 0 and the maximum is 255.  The default is 0 which suppresses bunching.
    -
    -       -e     Compute passwords based on host system entropy.  Passwords consist of uppercase letters [A-Z]  optionally  grouped
    -              using  option -b.  This method produces a non-repeatable set of unique passwords over a given address range.  This
    -              method is the default and is secure.
    -
    -       -l count
    -              The number of letters in the password string.  The default count is 16.  Overall password length  is  the  sum  of
    -              count plus the number of delimiters implied by bunch.
    -
    -       -m     Compute passwords based on target device address.  Passwords consist of uppercase letters [A-Z].  This method pro‐
    -              duces a repeatable set of unique passwords over a given address range.  This method is not secure.
    -
    -       -q     Quiet mode.  Exclude the MAC address on output.  This option can be used in scripts to return the password associ‐
    -              ated with a given MAC address.
    -
    -       -v     Verbose mode.  Prefix each line with a '0' column.  The Atheros Production Test System (PTS) uses the first column
    -              of a password database file to indicate which addresses and passwords have already been used.
    -
    -       -?,--help
    -              Print program help information on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The name of a file that contains Ethernet address strings.  Individual address strings consist of  12  consecutive
    -              hexadecimal digits.  Addresses are seperated by whites space.  This allows multiple addresses on a line.  There is
    -              no line length limit.  Punctuation is not permitted; however, a hash ('#') or semicolon (';') in any column starts
    -              comment  text  that  continues to the end of that line.  An error in any input file terminates the program with an
    -              error message.
    -
    -EXAMPLES
    -       An example input file, mac.txt, is shown below.  Comment lines document the file.  Blank lines are permitted and multiple
    -       addresses appear on one line.  This file contains 5 MAC addresses.  Punctuation is not permitted within a MAC address.
    -
    -          # =================================
    -          # unused MAC addresses;
    -          # ---------------------------------
    -          00b052000004
    -          00b052BABE33
    -          00b052BABE34 00b052CAFE05
    -          00b052CAFE01
    -
    -       Another  example  input  file,  mac2.txt,  appears  below.  A hash ('#') and a semi-colon (';') are used to hide selected
    -       addresses.  Hidden addresses are ignored because they are comments.  This file contains 7 addresses but only  5  will  be
    -       recognized.
    -
    -          002b88ffff00
    -          002b887fff00
    -          # 002b88660066
    -          002b88660067
    -          002b88660063 ; 002b8800FFFF
    -          002b88660066
    -
    -       The  next  example  reads the two files shown above and prints 10 addresses, 5 from each file, with associated passwords.
    -       Output appears on the console but may be piped to a file or another process.
    -
    -          # mac2pwd mac.txt more.mac
    -          00B052000004 8C69GFCXATB8RA9SF52LK79UD
    -          00B052BABE33 MMKGF5SP5DP23KHY27BSLRV2A
    -          00B052BABE34 CVBG6QHJFQVVCYSACPAPBZT79
    -          00B052CAFE05 MCXUABFPC33CPMXWFWYX5N2KC
    -          00B052CAFE01 5GHUWD9YDEL8TCAGEZJ8ESRCC
    -          002B88FFFF00 CJCW4VB2HZ37DAK2XE9CGCWZZ
    -          002B887FFF00 W2W9AQU5TE8K4ZLH7R3K5C6X4
    -          002B88660067 2LWQ5LGBUCDFDYSZYQ2XZSPJ2
    -          002B88660063 62NKW6RM87UBZG34KH87AXXEY
    -          002B88660066 KNQAGGFH9G9XQGR96GR4HK4SS
    -
    -       The next example does the the two files, as before but shortens password length and groups password  character.   Overall
    -       password  length  includes password characters plus delimiters.  Option -l sets password length to 16 characters.  Option
    -       -b sets bunching to 4 characters.
    -
    -          # mac2pwd mac.txt more.mac -l 16 -b 4
    -          00B052000004 R5YH-E6XG-TECA-24R8
    -          00B052BABE33 WBQJ-77PC-VQTX-63Q5
    -          00B052BABE34 4M2X-GVUY-6PYH-H5V7
    -          00B052CAFE05 Z8JA-A2MV-49JF-WJZZ
    -          00B052CAFE01 5L7Z-ZXZP-NUFS-RBKE
    -          002B88FFFF00 3RAD-HQPN-92G2-HJKA
    -          002B887FFF00 7YD7-9NJJ-39S7-8ZGF
    -          002B88660067 HZ6K-SBG5-ZL8S-K2DK
    -          002B88660063 MX5K-W7PF-T823-38MJ
    -          002B88660066 PDXL-84QH-GKUN-KVEE
    -
    -       The next example is the same but prints output suitable for input to the Qualcomm Atheros PTS because option -v is speci‐
    -       fied.  The output format is similar to that produced by the Qualcomm Atheros DB Builder Utility for Windows.
    -
    -          # mac2pwd -v mac.txt more.mac
    -          0 00B052000004 ZZYBQP7EAZKBNWWCKKC4HX3AW
    -          0 00B052BABE33 LG7XD97UPSBUHA6F7CU28P3WW
    -          0 00B052BABE34 8BF288CZN4NTBUFSJAQLUYYNF
    -          0 00B052CAFE05 RTK4XHMWKWWD654QRBQGW5UNH
    -          0 00B052CAFE01 EE5YLRXD2EGKS6TSGZZK7ES74
    -          0 002B88FFFF00 BRYJDWYGP79GFWZN8ZU8ZQ3GN
    -          0 002B887FFF00 KEULLGC6PYFAM3FE89TYTSMP6
    -          0 002B88660067 H4STMXB67QR22J39MAZQRHHA5
    -          0 002B88660063 HKF32QX2GCZKGR3XYTMQCWTRB
    -          0 002B88660066 STKF28Q2JXYEMAQZVQSFVTKFB
    -
    -       The next example omits the MAC address.  This may used to generate random passwords for other purposes.
    -
    -          # mac2pwd -q mac.txt more.mac
    -          W6QXL6KDY4SZLL538CAMWSH8N
    -          PMYLFYMNA5TKYU2S6LBJS6QCR
    -          B2P58XQ2L4JSNR6SXEZ6BSVSN
    -          GYG6MS8NFEVH8EFBPD483WWCJ
    -          44TQ6FYCVSGP9GLS6YSYRTWFQ
    -          GUGPUJ6284X22ZU4RKXAX5T65
    -          LGSV6L9Y9398DFY3Z2TUFBCAJ
    -          H95A2FYV3LNT7BBFSLCLHXEH8
    -          JXSY7TMKK6CP3LDWNE3M74G87
    -          V4TEAG2ZX3J3NJHPAJMMQTQNT
    -
    -DISCLAIMER
    -       Qualcomm Atheros reserves the right to modify program names, functionality, input format or output format in future tool‐
    -       kit releases without any obligation to notify or compensate toolkit users.
    -
    -SEE ALSO
    -       hpavkey(1), hpavkeys(1), keys(1), mac2pw(1), rkey(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        Pouyan Sepehrdad <pouyans@qti.qualcomm.com>
    -        Ning Shang <nshang@qti.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  mac2pwd(1)
    -
    - - - diff --git a/docbook/mac2pwd.c.html b/docbook/mac2pwd.c.html deleted file mode 100644 index 36b62ba0..00000000 --- a/docbook/mac2pwd.c.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - mac2pwd.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define _GETOPT_H
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <ctype.h>
    -#include <errno.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -#include "../key/keys.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/todigit.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/MACPasswords.c"
    -#include "../key/RNDPasswords.c"
    -#include "../key/putpwd.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef ETHER_ADDR_LEN
    -#define ETHER_ADDR_LEN 6
    -#endif
    -
    -/*====================================================================*
    - *   program functions;
    - *--------------------------------------------------------------------*/
    -
    -void (* generate)(unsigned, unsigned, unsigned, unsigned, unsigned, char, flag_t) = RNDPasswords;
    -
    -/*====================================================================*
    - *
    - *   void function (const char * file, unsigned alpha, unsigned bunch, flag_t flags)
    - *
    - *   read Ethernet hardware address strings from a file and print 
    - *   address passwords pairs on stdout;
    - *
    - *   parse an Ethernet hardware address string into vendor and device
    - *   ID substrings; print a specified number of consecutive addresses
    - *   and password strings having a defined letter count and grouping;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (const char * file, unsigned alpha, unsigned bunch, unsigned space, flag_t flags)
    -
    -{
    -	extern void (* generate)(unsigned, unsigned, unsigned, unsigned, unsigned, char, flag_t);
    -	unsigned line = 1;
    -	unsigned radix = 0x10;
    -	unsigned width;
    -	unsigned digit;
    -	signed c = getc (stdin);
    -	while (c != EOF)
    -	{
    -		uint32_t vendor = 0;
    -		uint32_t device = 0;
    -		while (isspace (c))
    -		{
    -			if (c == '\n')
    -			{
    -				line++;
    -			}
    -			c = getc (stdin);
    -		}
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while ((c != '\n') && (c != EOF));
    -			continue;
    -		}
    -		for (width = 0; width < ETHER_ADDR_LEN; width++)
    -		{
    -			if ((digit = todigit (c)) < radix)
    -			{
    -				vendor *= radix;
    -				vendor += digit;
    -				c = getc (stdin);
    -				continue;
    -			}
    -			error (1, EINVAL, "%s: line %d: Illegal vendor", file, line);
    -		}
    -		if (!vendor)
    -		{
    -			error (1, EPERM, "%s: line %d: Vendor can't be zero", file, line);
    -		}
    -		for (width = 0; width < ETHER_ADDR_LEN; width++)
    -		{
    -			if ((digit = todigit (c)) < radix)
    -			{
    -				device *= radix;
    -				device += digit;
    -				c = getc (stdin);
    -				continue;
    -			}
    -			error (1, EINVAL, "%s: line %d: Illegal device", file, line);
    -		}
    -		if (!device)
    -		{
    -			error (1, EPERM, "%s: line %d: Device can't be zero", file, line);
    -		}
    -		while (isspace (c))
    -		{
    -			if (c == '\n')
    -			{
    -				line++;
    -			}
    -			c = getc (stdin);
    -		}
    -		generate (vendor, device, 1, alpha, bunch, space, flags);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, const char * argv []);
    - *
    - *   read one or more text files containing device address strings
    - *   and print a stream of address/password pairs; device addresses
    - *   must be separated by white space;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define DEFAULT_ALPHA 25
    -#define DEFAULT_BUNCH 0
    -
    -int main (int argc, const char * argv [])
    -
    -{
    -	extern void (* generate)(unsigned, unsigned, unsigned, unsigned, unsigned, char, flag_t);
    -	static const char * optv [] =
    -	{
    -		"b:el:mqv",
    -		PUTOPTV_S_FUNNEL,
    -		"Atheros device password generator",
    -		"b n\tbunching factor [" LITERAL (DEFAULT_BUNCH) "]",
    -		"e\tbase passwords on host system entropy (more secure)",
    -		"l n\tpassword letters [" LITERAL (DEFAULT_ALPHA) "]",
    -		"m\tbase passwords on MAC addresses (non-secure)",
    -		"q\tomit device address on output",
    -		"v\tprepend PTS flag on output",
    -		(const char *)(0)
    -	};
    -	unsigned alpha = DEFAULT_ALPHA;
    -	unsigned bunch = DEFAULT_BUNCH;
    -	unsigned space = '-';
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char)(c))
    -		{
    -		case 'b':
    -			bunch = uintspec (optarg, 0, UCHAR_MAX);
    -			break;
    -		case 'e':
    -			generate = RNDPasswords;
    -			break;
    -		case 'l':
    -			alpha = uintspec (optarg, 12, 64);
    -			break;
    -		case 'm':
    -			generate = MACPasswords;
    -			break;
    -		case 'q':
    -			_setbits (flags, PASSWORD_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PASSWORD_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (!argc)
    -	{
    -		function ("stdin", alpha, bunch, space, flags);
    -	}
    -	while ((argv) && (* argv))
    -	{
    -		if (!freopen (* argv, "rb", stdin))
    -		{
    -			error (1, EINVAL, "Can't open %s", * argv);
    -		}
    -		function (* argv, alpha, bunch, space, flags);
    -		argc--;
    -		argv++;
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/management.xml b/docbook/management.xml deleted file mode 100644 index 3a7f7bb3..00000000 --- a/docbook/management.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - Remote Management - -
    - - Introduction - - - The Atheros Open Powerline Toolkit includes several example applications that perform basic powerline device management from a remote host. Each example implements a different network protocol, such as HTTP, SNMP or TR-069. These applications merely demonstrate the underlying concepts but none perform full network device management. That is left to our customers because their needs vary. - - - All examples are proxy implementations where a local host communicates with one powerline device over Ethernet. That device then communicates with other devices over powerline or coax. All management functionality is programmed into the local host but other hosts are able to request information or services from it over Ethernet. The local host could be either part of the local powerline device or an external workstation. - -
    -
    - - HTTP Protocol - -
    - - Overview - - - HTTP provides a simple means for one device to interact with one or more remote hosts. The device merely needs requires a basic web server with Common Gateway Interface (CGI) support. With CGI support, one can write programs that read structured data from their standard input and write HTML to their standard output. Generally, the HTML output is a form that the user can complete and submit for subsequent processing by some application on device. - - - The basic chain of events looks something like this: - - - - - A user connects the client (some remote computer) to the server (some powerline device) using a web browser. - - - - - The server executes the application (some CGI program) designated as the default Uniform Resource Locator (URL) and passes any associated data to the application. Initially there is no data to pass. - - - - - The application sees there is no data on stdin and prints an HTML form on stdout. The form contains one or more submit buttons and assigns some URL as the ultimate recipient of form data. - - - - - The server forwards the form to the requesting client. - - - - - The client displays the form. - - - - - The user completes the form and presses one of the submit buttons. This creates some data for the application to process. - - - - - The client forwards the form to the URL designated by the application. Often, this URL is an application on the originating server but it could be an application on another server. - - - - - The server executes the application designated by the URL and passes the associated data to the application. - - - - - The application reads the form data from stdin, processes it and writes new HTML to stdout. This could be the same form with new data or new fields or new submit buttons or a different form. - - - - - The chain of events described above is the same even for scripting languages such as PHP, ASP and JSP. The only difference is the nature of the application. In our case, the application is a compiled C Language program because we do not want the overhead of a full scripting language. We also elected of have one application process all forms to minimize the number of files that must be distributed and maintained. - - - One design consideration is the method used to store information from one data exchange to the next. We cannot store the information in memory because the application does not run continuously. Consequently, we defined a data structure to hold all the required information then write the structure directly to a file in binary format on exit and read it back on start up. This data structure is known as a session variable and the process of reading and writing it in binary is known as serialization. - - - - - Read session state from a file. - - - - - Read form data from stdin and parse it. Update the session state based on the form data. For example, record which submit button was pressed by the user. Store the content of form fields changed by the user. - - - - - Inspect the session state and perform any tasks indicated. Update the session state based on task results. - - - - - Write new HTML to stdout. Indicate the new session state for the user to see. This could include new data in form fields, new form fields, a new form or new submit buttons. - - - - - Save the session state to a file. - - - - - Terminate the application. - - - -
    -
    - - Installation - -
    -
    -
    - - SNMP Protocol - -
    -
    - - TR-069 Protocol - -
    -
    diff --git a/docbook/manifest.c.html b/docbook/manifest.c.html deleted file mode 100644 index b907a261..00000000 --- a/docbook/manifest.c.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - manifest.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed manifest (void const * memory, size_t extent);
    - *
    - *   print manifest contents on stdout in human readable format;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MANIFEST_SOURCE
    -#define MANIFEST_SOURCE
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <errno.h>
    -
    -#include "../tools/format.h"
    -#include "../tools/memory.h"
    -#include "../tools/endian.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../tools/tlv.h"
    -#include "../nvm/nvm.h"
    -
    -/*
    - *   strings must appear in order of hardware types;
    - */
    -
    -static char const * compatibility [] =
    -
    -{
    -	"QCA7420",
    -	(char const *) (0)
    -};
    -
    -/*
    - *   strings must appear in order of field type; the last string is the error string;
    - */
    -
    -static char const * nvm_fields [] =
    -
    -{
    -	"Signature",
    -	"Hardware Compatibility",
    -	"Chain Major Version",
    -	"Chain Minor Version",
    -	"Chain Type",
    -	"Build Major Version",
    -	"Build Minor Version",
    -	"Build Type",
    -	"Manifest Version",
    -	"Build Number",
    -	"Build Date",
    -	"Build Time",
    -	"Device Type",
    -	"Build Hostname",
    -	"Build Username",
    -	"Build Description",
    -	"Build Version String",
    -	"Build Sustaining Release",
    -	"Build Major Subversion",
    -	"Generic Identifier 0",
    -	"Generic Identifier 1",
    -	"Softloader Major Version",
    -	"Softloader Minor Version",
    -	"Manifest Free Space",
    -	"Unknown Type"
    -};
    -
    -/*
    - *   strings must appear in order of chain type;
    - */
    -
    -static char const * nvm_chains [] =
    -
    -{
    -	"Softloader",
    -	"Firmware",
    -	"Parameter Block",
    -	"CustomModule"
    -};
    -
    -/*====================================================================*
    - *
    - *   char * myitoa (unsigned number, char buffer [], size_t length);
    - *
    - *   non-standard version of itoa () where buffer is packed right-
    - *   to-left to avoid reversing digits; ensure buffer is longer
    - *   than needed;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * myitoa (unsigned number, char buffer [], size_t length)
    -
    -{
    -	buffer [-- length] = (char) (0);
    -	do
    -	{
    -		buffer [-- length] = '0' +  (number % 10);
    -		number /= 10;
    -	}
    -	while (number);
    -	return (buffer);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed manifest (void const * memory, size_t extent);
    - *
    - *   nvm.h
    - *
    - *   walk through a manifest and print known values, when present;
    - *   known values are those defined in nvm.h and named here;
    - *
    - *   the TLVNode data structure used here is not the same a that in
    - *   the firmware headers; our structure assumes values are 32-bit
    - *   integers and treats strings are exceptions to that rule;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed manifest (void const * memory, size_t extent)
    -
    -{
    -	uint8_t * offset = (uint8_t *) (memory);
    -	uint32_t length = (uint32_t) (extent);
    -	char string [1024];
    -	while (length > 0)
    -	{
    -		struct TLVNode * node = (struct TLVNode *) (offset);
    -		uint32_t type = LE32TOH (node->type);
    -		uint32_t size = LE32TOH (node->size);
    -		uint32_t data = LE32TOH (node->data);
    -
    -		switch (type)
    -		{
    -		case NVM_FIELD_SIGNATURE:
    -		case NVM_FIELD_BUILD_DATE:
    -			printf ("\t%s: %08X\n", nvm_fields [type], data);
    -			break;
    -		case NVM_FIELD_BUILD_TIME:
    -			printf ("\t%s: %06X\n", nvm_fields [type], data);
    -			break;
    -		case NVM_FIELD_DEVICE_TYPE:
    -			printf ("\t%s: %04X\n", nvm_fields [type], data);
    -			break;
    -		case NVM_FIELD_CHAIN_TYPE:
    -			printf ("\t%s: %s\n", nvm_fields [type], data < SIZEOF (nvm_chains)? nvm_chains [data]: myitoa (data, string, sizeof (string)));
    -			break;
    -		case NVM_FIELD_BUILD_HOSTNAME:
    -		case NVM_FIELD_BUILD_USERNAME:
    -		case NVM_FIELD_BUILD_DESCRIPTION:
    -		case NVM_FIELD_BUILD_VERSION_STRING:
    -		case NVM_FIELD_BUILD_TYPE:
    -			printf ("\t%s: %s\n", nvm_fields [type], (char const *) (& node->data));
    -			break;
    -		case NVM_FIELD_HARDWARE_COMPAT:
    -			strfbits (string, sizeof (string), compatibility, "|", data);
    -			printf ("\t%s: %s\n", nvm_fields [type], string);
    -			break;
    -		case NVM_FIELD_MANIFEST_VERSION:
    -		case NVM_FIELD_CHAIN_MAJOR_VERSION:
    -		case NVM_FIELD_CHAIN_MINOR_VERSION:
    -		case NVM_FIELD_BUILD_NUMBER:
    -		case NVM_FIELD_BUILD_MAJOR_VERSION:
    -		case NVM_FIELD_BUILD_MINOR_VERSION:
    -		case NVM_FIELD_BUILD_MAJOR_SUBVERSION:
    -		case NVM_FIELD_BUILD_SUSTAINING_RELEASE:
    -		case NVM_FIELD_GENERIC_ID0:
    -		case NVM_FIELD_GENERIC_ID1:
    -		case NVM_FIELD_SL_MAJOR_VERSION:
    -		case NVM_FIELD_SL_MINOR_VERSION:
    -			printf ("\t%s: %d\n", nvm_fields [type], data);
    -			break;
    -		case NVM_FIELD_FREE_SPACE:
    -			printf ("\t%s: %d/" SIZE_T_SPEC " bytes\n", nvm_fields [type], size, extent);
    -			break;
    -		default:
    -			error (0, 0, "%s: %d", nvm_fields [sizeof (nvm_fields) / sizeof (const char *) - 1], type);
    -			break;
    -		}
    -
    -		length -= sizeof (* node) - sizeof (node->size) +  LE32TOH (node->size);
    -		offset += sizeof (* node) - sizeof (node->size) +  LE32TOH (node->size);
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/manifetch.c.html b/docbook/manifetch.c.html deleted file mode 100644 index 602e572e..00000000 --- a/docbook/manifetch.c.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - manifetch.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void * manifetch (void const * memory, size_t extent);
    - *
    - *   nvm.h
    - *
    - *   search an nvm manifest for a given variable type and return a
    - *   void pointer to the value, if present, or NULL if not; users
    - *   must apply the correct type cast to the pointer to access the
    - *   value;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MANIFETCH_SOURCE
    -#define MANIFETCH_SOURCE
    -
    -#include <stdio.h>
    -#include <stdint.h>
    -
    -#include "../tools/endian.h"
    -#include "../tools/tlv.h"
    -
    -void * manifetch (void const * memory, size_t extent, uint32_t type)
    -
    -{
    -	uint8_t * offset = (uint8_t *) (memory);
    -	while (extent)
    -	{
    -		struct TLVNode * node = (struct TLVNode *) (offset);
    -		if (LE32TOH (node->type) == type)
    -		{ 
    -			return ((void *) (& node->data));
    -		} 
    -		extent -= TLVSPAN (node);
    -		offset += TLVSPAN (node);
    -	}
    -	return ((void *) (0));
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/manuals b/docbook/manuals deleted file mode 100755 index 7869b6c8..00000000 --- a/docbook/manuals +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# file: docbook/manuals - -# ==================================================================== -# -# -------------------------------------------------------------------- - -# unset LANG -export MANWIDTH=132 -TOOLS=/usr/local/bin/cmassoc -INDEX=toolkit.html -STYLE=toolkit.css - -# ==================================================================== -# -# -------------------------------------------------------------------- - -if [ ! -d ${TOOLS} ]; then - echo "You do not have Motley Tools installed. Bye!" - exit 1 -fi - -# ==================================================================== -# -# -------------------------------------------------------------------- - -cp ../pib/piboffset.* . -for file in ../*/*.1; do echo ${file}; ${TOOLS}/mp -s open-plc-utils ${file}; man ${file} > $(basename ${file}); done -for file in ../scripts/*.sh; do cp ${file} .; done -${TOOLS}/purge -vr ../t.c -${TOOLS}/import -r . '../*.h' '../*.c' - -# ==================================================================== -# -# -------------------------------------------------------------------- - -${TOOLS}/catalog -s ${STYLE} -gdp ${INDEX} -c 4 *.1 > manual.txt -${TOOLS}/catalog -s ${STYLE} -gdp ${INDEX} -c 4 *.h > header.txt -${TOOLS}/catalog -s ${STYLE} -gdp ${INDEX} -c 4 *.c > source.txt -${TOOLS}/catalog -s ${STYLE} -gdp ${INDEX} -c 4 *.sh > script.txt -cat part0.txt part1.txt manual.txt part2.txt header.txt part4.txt source.txt part6.txt script.txt part8.txt > ${INDEX} -rm -f manual.txt header.txt source.txt script.txt - diff --git a/docbook/mdio.h.html b/docbook/mdio.h.html deleted file mode 100644 index 34a240e2..00000000 --- a/docbook/mdio.h.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - mdio.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   mdio.h - mdio related definitions and declarations;
    - *
    - *.  Atheros Powerline Toolkit for HomePlug AV;
    - *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MDIO_HEADER
    -#define MDIO_HEADER
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MDIO_VERBOSE (1 << 0)
    -#define MDIO_SILENCE (1 << 1)
    -
    -#define MDIO16_USE(x)           (((x) & 0x0001) << 0)
    -#define MDIO16_RSVD(x)          (((x) & 0x001F) << 1)
    -#define MDIO16_CNT(x)           (((x) & 0x03FF) << 6)
    -#define MDIO16_START(use,rsvd,cnt)      (MDIO16_USE (use) | MDIO16_RSVD (rsvd) | MDIO16_CNT (cnt))
    -
    -#define MDIO16_SRT(x)           (((x) & 0x0003) << 0)
    -#define MDIO16_OP(x)            (((x) & 0x0003) << 2)
    -#define MDIO16_PHY(x)           (((x) & 0x001F) << 4)
    -#define MDIO16_REG(x)           (((x) & 0x001F) << 9)
    -#define MDIO16_TA(x)            (((x) & 0x0003) << 14)
    -#define MDIO16_INSTR(srt,op,phy,reg,ta) (MDIO16_SRT (srt) | MDIO16_OP (op) | MDIO16_PHY (phy) | MDIO16_REG (reg) | MDIO16_TA (ta))
    -
    -#define MDIO32_HI_ADDR_SHIFT 9
    -#define MDIO32_LO_ADDR_SHIFT 1
    -#define MDIO32_HI_ADDR_MASK (0x000003FF << MDIO32_HI_ADDR_SHIFT)
    -#define MDIO32_LO_ADDR_MASK 0x000001FC
    -
    -#define MDIO32_CODE_SHIFT 3
    -#define MDIO32_CODE_MASK (0x03 << CODE_SHIFT)
    -#define MDIO32_CODE_HI_ADDR 0x03
    -#define MDIO32_CODE_LO_ADDR 0x02
    -
    -#define MDIO32_HI_ADDR(a) ((a & MDIO32_HI_ADDR_MASK) >> MDIO32_HI_ADDR_SHIFT)
    -#define MDIO32_LO_ADDR(a) ((a & MDIO32_LO_ADDR_MASK) >> MDIO32_LO_ADDR_SHIFT)
    -
    -#define MDIO32_INSTR(addr, data, mask) MDIO16_INSTR (1, 1, (MDIO32_CODE_HI_ADDR << MDIO32_CODE_SHIFT), 0x00, 2), MDIO32_HI_ADDR (addr), 0xFFFF, MDIO16_INSTR (1, 1, (MDIO32_CODE_LO_ADDR << MDIO32_CODE_SHIFT) | ((MDIO32_LO_ADDR (addr) & 0xE0) >> 5), MDIO32_LO_ADDR (addr) & 0x1F, 2), (data & 0x0000FFFF), mask & 0x0000FFFF, MDIO16_INSTR (1, 1, (MDIO32_CODE_LO_ADDR << MDIO32_CODE_SHIFT) | ((MDIO32_LO_ADDR (addr) & 0xE0) >> 5), (MDIO32_LO_ADDR (addr) & 0x1F) | 0x01, 2), (data & 0xFFFF0000) >> 16, (mask & 0xFFFF0000) >> 16
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/mdioblock.1.html b/docbook/mdioblock.1.html deleted file mode 100644 index 922678af..00000000 --- a/docbook/mdioblock.1.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - mdioblock.1 - - - - - - - - - -
    -mdioblock(1)                                 Qualcomm Atheros Open Powerline Toolkit                                mdioblock(1)
    -
    -NAME
    -       mdioblock - Qualcomm Atheros Clause 22 MDIO Instruction Block Assembler
    -
    -SYNOPSIS
    -       mdioblock [options] file [file] [...]  [>stdout]
    -
    -       mdioblock [options] [<stdin] [>stdout]
    -
    -DESCRIPTION
    -       Assemble  an  Atheros MDIO instruction block from hexadecimal register instructions.  MDIO instruction blocks are written
    -       to Atheros powerline devices as modules using the VS_MOD_OP message type.  Alternately, program int6kmod can be used.
    -
    -       Atheros MDIO modules consists of a 16-bit header followed by one or more MDIO communication frames  with  register  masks
    -       and  padded  to  the nearest multiple of 32-bits for download purposes.  MDIO instructions are specified here using 802.3
    -       Clause 22 (or phy, reg, data and mask) format.  See program mdioblock2 for a similar program that accepts instructions in
    -       802.3ae Clause 45 (or address, data and mask) format.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -q     Quiet mode.  Suppresses error messages caused by instruction syntax errors.
    -
    -       -v     Verbose mode.  Prints instructions on stderr as they are processed.
    -
    -       -?,--help
    -              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
    -              line except version information.
    -
    -       -!,--version
    -              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       file   A text files contining one or more generic MDIO register intructions consisting of  a  phy,  reg,  data  and  mask
    -              fields.  Fields are seperated by whitespace and instructions are terminated with semicolon.  Multiple instructions
    -              may appear on a single line or a single instruction can span multiple lines.  Script-style comments are  permitted
    -              between instructions but not between fields.
    -
    -REFERENCES
    -       See the Qualcomm Atheros AR7x00 Firmware Technical Reference Manual section on the Module Operation message type for more
    -       information on MDIO Block format.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       The following command reads register instructions from file mdio.txt and writes them as an MDIO  program  block  to  file
    -       mdio.bin.  In this example, the program acts as a filter.
    -
    -          # mdioblock < mdio.txt > mdio.bin
    -
    -       The following command reads register instructions from files physetup.dat, flowctl.dat and misc.ins and write them all as
    -       one MDIO block to file mdio.bin.  The previous contents of file mdio.bin is overwritten.
    -
    -          # mdioblock physetup.dat flowctl.dat misc.ins > mdio.bin
    -
    -       An example register instruction file might look like this.  The first two lines consist  of  one  instruction  each.   An
    -       instruction  has phy, reg, data and mask fields.  Instruction fields are separated by whitespace.  Instructions are sepa‐
    -       rated by a semicolon.  Multiple instruction may appear on one line and one instruction can span multiple lines.   Script-
    -       style comments are permitted between instructions but not between instruction fields.
    -
    -          18 00 0000 FFFF;
    -          10 16 003F FFFF;
    -
    -          # multiple instructions on one line;
    -
    -          10 17 7E3F FFFF; 18 00 0000 FFFF;
    -
    -          # one instruction on multiple lines;
    -
    -          10
    -
    -          02
    -
    -          0700
    -
    -          FFFF;
    -
    -          10 03 0000 FFFF;
    -          18 00 0000 FFFF;
    -          14 00 007D FFFF;
    -          14 01 0000 FFFF;
    -
    -       A  16-bit  hexdump  of  the MDIO block will look like this on little-endian hosts.  The block consists of a 16-bit header
    -       followed by a variable number of 16-bit triplets.  The header indicates the number of triplets that follow.  Each triplet
    -       specifies  a 16-bit operation, a 16-bit data value and a 16-bit data mask.  The application of these fields is beyond the
    -       scope of this man page.  Consult the IEEE standards for more information.
    -
    -          # hexdump mdio.bin
    -          0000000 0241 8185 0000 ffff ad05 003f ffff af05
    -          0000010 7e3f ffff 8185 0000 ffff 8505 0700 ffff
    -          0000020 8705 0000 ffff 8185 0000 ffff 8145 007d
    -          0000030 ffff 8345 0000 ffff
    -
    -       An 8-bit dump of the MDIO block will look like this on all hosts since the MDIO block is always  distributed  in  little-
    -       endian format.
    -          # hexdmp mdio.bin
    -          00000000  41 02 85 81 00 00 FF FF 05 AD 3F 00 FF FF 05 AF  A.........?.....
    -          00000010  3F 7E FF FF 85 81 00 00 FF FF 05 85 00 07 FF FF  ?~..............
    -          00000020  05 87 00 00 FF FF 85 81 00 00 FF FF 45 81 7D 00  ............E.}.
    -          00000030  FF FF 45 83 00 00 FF FF                          ..E.....
    -
    -SEE ALSO
    -       amp(1), int6kmod(1), int6kmdio(1), int6kmdio2(1), mdioblock2(1), mdiodump(1), mdiogen(1)
    -
    -CREDITS
    -       Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                mdioblock(1)
    -
    - - - diff --git a/docbook/mdioblock.c.html b/docbook/mdioblock.c.html deleted file mode 100644 index c62a90bf..00000000 --- a/docbook/mdioblock.c.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - mdioblock.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   mdioblock.c
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <ctype.h>
    -#include <unistd.h>
    -#include <fcntl.h>
    -#include <sys/stat.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/endian.h"
    -#include "../tools/number.h"
    -#include "../tools/chars.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../mdio/mdio.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/todigit.c"
    -#endif
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static signed c;
    -static unsigned row = 1;
    -static unsigned col = 1;
    -static uint16_t count = 0;
    -static uint16_t instr = 0;
    -static uint16_t addr;
    -static uint16_t data;
    -static uint16_t mask;
    -static uint16_t phy;
    -static uint16_t reg;
    -
    -/*====================================================================*
    - *
    - *   signed mygetc ();
    - *
    - *   fetch next character from stdin and update the file cursor;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed mygetc ()
    -
    -{
    -	signed c = getc (stdin);
    -	if (c == '\n')
    -	{
    -		row++;
    -		col = 0;
    -	}
    -	else if (~c)
    -	{
    -		col++;
    -	}
    -	return (c);
    -}
    -
    -/*====================================================================*
    - *
    - *   uint16_t integer (unsigned radix);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static uint16_t integer (unsigned radix)
    -
    -{
    -	extern signed c;
    -	uint16_t value = 0;
    -	unsigned digit = 0;
    -	while ((digit = todigit (c)) < radix)
    -	{
    -		value *= radix;
    -		value += digit;
    -		c = mygetc ();
    -	}
    -	while (isspace (c))
    -	{
    -		c = mygetc ();
    -	}
    -	return (value);
    -}
    -
    -/*====================================================================*
    - *
    - *   void assemble (flag_t flags);
    - *
    - *   read stdin and write stdout; convert hexadecimal input to binary
    - *   MDIO register instructions;
    - *
    - *   the input file consists of zero or more hexadecimal instructions
    - *   consisting of a phy address, register address, register data and
    - *   register mask; instructions are terminated with semicolon; fields
    - *   are separated by white space; scriptstyle comments are permitted
    - *   between instructions but not between instruction fields;
    - *
    - *   the output file will consist of one 16-bit program header plus
    - *   one 16-bit MDIO instructions for each input instruction; the
    - *   output is padded to the nearest multiple of 32-bits;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void assemble (flag_t flags)
    -
    -{
    -	extern signed c;
    -	c = mygetc ();
    -	while (c != EOF)
    -	{
    -		if (isspace (c))
    -		{
    -			do
    -			{
    -				c = mygetc ();
    -			}
    -			while (isspace (c));
    -			continue;
    -		}
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = mygetc ();
    -			}
    -			while (nobreak (c));
    -			continue;
    -		}
    -		phy = integer (16);
    -		reg = integer (16);
    -		data = integer (16);
    -		mask = integer (16);
    -		instr = MDIO16_INSTR (1, 1, phy, reg, 2);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		data = HTOLE16 (data & 0xFFFF);
    -		write (STDOUT_FILENO, &data, sizeof (data));
    -		mask = HTOLE16 (mask & 0xFFFF);
    -		write (STDOUT_FILENO, &mask, sizeof (mask));
    -		count++;
    -		if (_anyset (flags, MDIO_VERBOSE))
    -		{
    -			fprintf (stderr, "INSTR=0x%04X DATA=0x%04X MASK=0x%04X\n", instr, data, mask);
    -		}
    -		if ((c == ';') || (c == EOF))
    -		{
    -			c = mygetc ();
    -			continue;
    -		}
    -		if (_allclr (flags, MDIO_SILENCE))
    -		{
    -			error (1, 0, "Illegal character or missing terminator: line %d col %d", row, col);
    -		}
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, const char * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, const char * argv [])
    -
    -{
    -	static const char * optv [] =
    -	{
    -		"qv",
    -		"file [ file ] [ ...] > file",
    -		"Atheros Clause 22 MDIO Instruction Block Assembler",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(const char *) (0)
    -	};
    -	flag_t flags = (flag_t)(0);
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'q':
    -			_setbits (flags, MDIO_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, MDIO_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (isatty (STDOUT_FILENO))
    -	{
    -		error (1, ECANCELED, "stdout must be a file or pipe");
    -	}
    -
    -#if defined (WIN32)
    -
    -	setmode (STDOUT_FILENO, O_BINARY);
    -
    -#endif
    -
    -	instr = MDIO16_START (1, 0, count);
    -	write (STDOUT_FILENO, &instr, sizeof (instr));
    -	if (!argc)
    -	{
    -		assemble (flags);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!freopen (* argv, "rb", stdin))
    -		{
    -			error (1, errno, "%s", * argv);
    -		}
    -		assemble (flags);
    -		argc--;
    -		argv++;
    -	}
    -	instr = MDIO16_START (1, 0, count);
    -	addr = count * sizeof (instr) + sizeof (instr);
    -	if ((addr % sizeof (uint32_t)))
    -	{
    -		uint32_t pad = 0;
    -		write (STDOUT_FILENO, &pad, sizeof (pad) - addr % sizeof (pad));
    -	}
    -	if (!lseek (STDOUT_FILENO, 0, SEEK_SET))
    -	{
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -	}
    -	if (_anyset (flags, MDIO_VERBOSE))
    -	{
    -		fprintf (stderr, "%d instructions\n", count);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/mdioblock2.1.html b/docbook/mdioblock2.1.html deleted file mode 100644 index 3dd57cbc..00000000 --- a/docbook/mdioblock2.1.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - mdioblock2.1 - - - - - - - - - -
    -mdioblock2(1)                                Qualcomm Atheros Open Powerline Toolkit                               mdioblock2(1)
    -
    -NAME
    -       mdioblock2 - Qualcomm Atheros Clause 45 MDIO Instruction Block Assembler
    -
    -SYNOPSIS
    -       mdioblock2 [options] file [file] [...]  [>stdout]
    -
    -       mdioblock2 [options] [<stdin] [>stdout]
    -
    -DESCRIPTION
    -       Assemble  an  Atheros MDIO instruction block from hexadecimal register instructions.  MDIO instruction blocks are written
    -       to Atheros powerline devices as modules using the VS_MOD_OP message type.  Alternately, program int6kmod can be used.
    -
    -       Atheros MDIO modules consists of a 16-bit header followed by one or more MDIO communication frames  with  register  masks
    -       and  padded  to  the nearest multiple of 32-bits for download purposes.  MDIO instructions are entered here using 802.3ae
    -       Clause 45 (or addr, data and mask) format.  See program mdioblock for a similar  program  that  accepts  instructions  in
    -       802.3 Clause 22 (or phy, reg, data and mask) format.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -q     Quiet mode.  Suppresses error messages caused by instruction syntax errors.
    -
    -       -v     Verbose mode.  Prints instructions on stderr as they are processed.
    -
    -       -?,--help
    -              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
    -              line except version information.
    -
    -       -!,--version
    -              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       file   A text files contining one or more generic MDIO register intructions  consisting  of  a  address,  data  and  mask
    -              fields.   Fields  are separated by whitespace.  Instructions are terminated with semicolon.  Multiple instructions
    -              may appear on one line and one instruction may span multiple lines.  Script-style comments are  permitted  between
    -              instructions but not between instruction fields.
    -
    -REFERENCES
    -       See the Qualcomm Atheros AR7x00 Firmware Technical Reference Manual section on the Module Operation message type for more
    -       information on MDIO Block format.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       The following command reads register instructions from text file mdio.txt and writes binary file mdio.bin.  In this exam‐
    -       ple,  the  program  acts as a filter, reading from stdin and writing to stdout.  Progress and error messages, if any, are
    -       written to stderr.
    -
    -          # mdioblock2 < mdio.txt > mdio.bin
    -
    -       The following command reads register instructions from files physetup.dat then flowctl.dat then misc.ins and  writes  one
    -       binary MDIO block to file mdio.bin.  The previous contents of file mdio.bin are overwritten.
    -
    -          # mdioblock2 physetup.dat flowctl.dat misc.ins > mdio.bin
    -
    -       An  example  register  instruction file might look like this.  Instructions have addr, data and mask fields.  Instruction
    -       fields are separated by whitespace and instructions are terminate by a semicolon.  Multiple instructions  can  appear  on
    -       one  line  or  one instruction can span multiple lines.  Script-style comments are permitted between instructions but not
    -       between instruction fields.
    -
    -          2c 7e3f003f ffffffff;
    -          8 500 ffffffff;
    -          100 7d ffffffff; 30 19f005f2 ffffffff;
    -          200
    -               7d
    -                   ffffffff;
    -          300 7d ffffffff;
    -          # Hello World
    -          400 7d ffffffff;
    -          500 7d ffffffff;
    -
    -SEE ALSO
    -       amp(1), int6kmod(1), int6kmdio(1), int6kmdio2(1), mdioblock(1), mdiodump(1), mdiogen(1)
    -
    -CREDITS
    -       Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                               mdioblock2(1)
    -
    - - - diff --git a/docbook/mdioblock2.c.html b/docbook/mdioblock2.c.html deleted file mode 100644 index f2b54cfa..00000000 --- a/docbook/mdioblock2.c.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - mdioblock2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   mdioblock2.c
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <ctype.h>
    -#include <unistd.h>
    -#include <fcntl.h>
    -#include <sys/stat.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/endian.h"
    -#include "../tools/number.h"
    -#include "../tools/chars.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../mdio/mdio.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/todigit.c"
    -#endif
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static signed c;
    -static unsigned row = 1;
    -static unsigned col = 1;
    -static uint16_t count = 0;
    -static uint16_t instr = 0;
    -static uint32_t addr;
    -static uint32_t data;
    -static uint32_t mask;
    -
    -/*====================================================================*
    - *
    - *   signed mygetc ();
    - *
    - *   return next input character after updating the cursor position;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed mygetc ()
    -
    -{
    -	extern unsigned row;
    -	extern unsigned col;
    -	signed c = getc (stdin);
    -	if (c == '\n')
    -	{
    -		row++;
    -		col = 0;
    -	}
    -	else if (~c)
    -	{
    -		col++;
    -	}
    -	return (c);
    -}
    -
    -/*====================================================================*
    - *
    - *   uint32_t integer (unsigned radix);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static uint32_t integer (unsigned radix)
    -
    -{
    -	uint32_t value = 0;
    -	unsigned digit = 0;
    -	while ((digit = todigit (c)) < radix)
    -	{
    -		value *= radix;
    -		value += digit;
    -		c = mygetc ();
    -	}
    -	while (isspace (c))
    -	{
    -		c = mygetc ();
    -	}
    -	return (value);
    -}
    -
    -/*====================================================================*
    - *
    - *   void assemble (flag_t flags);
    - *
    - *   read stdin and write stdout; convert hexadecimal input to binary
    - *   MDIO register instructions;
    - *
    - *   the input file consists of zero or more hexadecimal instructions
    - *   consisting of register address, register data and register mask;
    - *   instructions are terminated with semicolon; fields are separated
    - *   by white space; scriptstyle comments are permitted between
    - *   instructions but not between instruction fields;
    - *
    - *   the output file will consist of one 16-bit program header plus
    - *   nine 16-bit MDIO instructions for each input instruction; the
    - *   output is padded to the nearest multiple of 32-bits;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void assemble (flag_t flags)
    -
    -{
    -	c = mygetc ();
    -	while (c != EOF)
    -	{
    -		if (isspace (c))
    -		{
    -			do
    -			{
    -				c = mygetc ();
    -			}
    -			while (isspace (c));
    -			continue;
    -		}
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = mygetc ();
    -			}
    -			while (nobreak (c));
    -			continue;
    -		}
    -		addr = integer (16);
    -		data = integer (16);
    -		mask = integer (16);
    -		instr = MDIO16_INSTR (1, 1, (0x03 << 3), 0, 2);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		instr = HTOLE16 ((addr >> 9) & 0x03FF);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		instr = HTOLE16 (0xFFFF);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		count++;
    -		instr = MDIO16_INSTR (1, 1, (0x02 << 3) | ((MDIO32_LO_ADDR (addr) & 0xE0) >> 5), MDIO32_LO_ADDR (addr) & 0x1F, 2);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		instr = HTOLE16 (data & 0xFFFF);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		instr = HTOLE16 (mask & 0xFFFF);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		count++;
    -		instr = MDIO16_INSTR (1, 1, (0x02 << 3) | ((MDIO32_LO_ADDR (addr) & 0xE0) >> 5), (MDIO32_LO_ADDR (addr) & 0x1F) | 0x01, 2);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		instr = HTOLE16 ((data >> 16) & 0xFFFF);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		instr = HTOLE16 ((mask >> 16) & 0xFFFF);
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -		count++;
    -		if (_anyset (flags, MDIO_VERBOSE))
    -		{
    -			fprintf (stderr, "REG=0x%08X DATA=0x%08X MASK=0x%08X\n", addr, data, mask);
    -		}
    -		if ((c == ';') || (c == EOF))
    -		{
    -			c = mygetc ();
    -			continue;
    -		}
    -		if (_allclr (flags, MDIO_SILENCE))
    -		{
    -			error (1, 0, "Illegal character or missing terminator: line %d col %d", row, col);
    -		}
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, const char * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, const char * argv [])
    -
    -{
    -	static const char * optv [] =
    -	{
    -		"qv",
    -		"file [ file ] [ ...] > file",
    -		"Atheros Clause 45 MDIO Instruction Block Assembler",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(const char *) (0)
    -	};
    -	flag_t flags = (flag_t)(0);
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'q':
    -			_setbits (flags, MDIO_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, MDIO_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (isatty (STDOUT_FILENO))
    -	{
    -		error (1, ECANCELED, "stdout must be a file or pipe");
    -	}
    -
    -#if defined (WIN32)
    -
    -	setmode (STDOUT_FILENO, O_BINARY);
    -
    -#endif
    -
    -	instr = MDIO16_START (1, 0, count);
    -	write (STDOUT_FILENO, &instr, sizeof (instr));
    -	if (!argc)
    -	{
    -		assemble (flags);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!freopen (* argv, "rb", stdin))
    -		{
    -			error (1, errno, "%s", * argv);
    -		}
    -		assemble (flags);
    -		argc--;
    -		argv++;
    -	}
    -	instr = MDIO16_START (1, 0, count);
    -	addr = count * sizeof (instr) + sizeof (instr);
    -	if ((addr % sizeof (uint32_t)))
    -	{
    -		uint32_t pad = 0;
    -		write (STDOUT_FILENO, &pad, sizeof (pad) - addr % sizeof (pad));
    -	}
    -	if (!lseek (STDOUT_FILENO, 0, SEEK_SET))
    -	{
    -		write (STDOUT_FILENO, &instr, sizeof (instr));
    -	}
    -	if (_anyset (flags, MDIO_VERBOSE))
    -	{
    -		fprintf (stderr, "%d instructions\n", count);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/mdiodump.1.html b/docbook/mdiodump.1.html deleted file mode 100644 index 9a3aa2b7..00000000 --- a/docbook/mdiodump.1.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - mdiodump.1 - - - - - - - - - -
    -mdiodump(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 mdiodump(1)
    -
    -NAME
    -       mdiodump - Qualcomm Atheros MDIO Custom Module Analyser
    -
    -SYNOPSIS
    -       mdiodump [options] file [file] [...]
    -
    -DESCRIPTION
    -       Read  one  or  more binary MDIO program files and output MDIO instructions on stdout.  These instructions are suitable as
    -       input to program mdioblock which outputs MDIO programs.  See the mdioblock manpage for more information.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the PLC man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -s     Print summary information on stdout instead of MDIO instructions.
    -
    -       -t phy_type
    -              Specify the PHY chipset that this MDIO module will be used with.  The only supported option arguments are "ar8236"
    -              and "generic".  Argument "ar8236" indicates that the MDIO register instructions are Atheros AR8236 specific.   The
    -              AR8236  supports  special  MDIO registers and instructions in addition to generic MDIO registers and instructions.
    -              The default is "generic" which displays instructions as standard MDIO instructions.  This option and option -b are
    -              mutually exclusive.
    -
    -       -v     Prints additional information on stdout.  In particular, this option causes mdiodump to display every MDIO command
    -              present instead of just the simulation summary.
    -
    -       -?,--help
    -              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
    -              line except version information.
    -
    -       -!,--version
    -              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       file   The MDIO custom module file to operate on.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for  information  about  generic  MDIO  register
    -       instruction.   See  the  Qualcomm  Atheros AR8236 Six-Port Fast Ethernet Switch Data Sheet for detailed information about
    -       AR8236 specific MDIO registers and instructions.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       None.
    -
    -SEE ALSO
    -       amp(1), int6kmod(1), int6kmdio(1), int6kmdio2(1), mdioblock(1), mdioblock2(1), mdiogen(1), plcmdio16(1), plcmdio32(1)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        Marc Bertola <marc.bertola@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                 mdiodump(1)
    -
    - - - diff --git a/docbook/mdiodump.c.html b/docbook/mdiodump.c.html deleted file mode 100644 index 3c6abcf2..00000000 --- a/docbook/mdiodump.c.html +++ /dev/null @@ -1,741 +0,0 @@ - - - - - - mdiodump.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   mdiodump.c - Atheros MDIO Custom Module Analyser
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Marc Bertola <mbertola@qti.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define _GETOPT_H
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <errno.h>
    -#include <fcntl.h>
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <unistd.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../tools/endian.h"
    -#include "../tools/symbol.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/codelist.c"
    -#include "../tools/error.c"
    -#include "../tools/lookup.c"
    -#include "../tools/assist.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MDIODUMP_SUMMARY (1 << 0)
    -#define MDIODUMP_VERBOSE (1 << 1)
    -
    -#define MDIO32_NORMAL 0x00
    -#define MDIO32_ACCESS_USING_HIGH 0x02
    -#define MDIO32_SET_HIGH 0x03
    -
    -/*====================================================================*
    - *   supported PHY types;
    - *--------------------------------------------------------------------*/
    -
    -#define PHY_GENERIC 0
    -#define PHY_AR8236  1
    -
    -struct _code_ switches [] =
    -
    -{
    -	{
    -		PHY_GENERIC,
    -		"generic"
    -	},
    -	{
    -		PHY_AR8236,
    -		"ar8236"
    -	}
    -};
    -
    -/*====================================================================*
    - *   command structure;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -struct __packed command
    -
    -{
    -	uint16_t ctrl;
    -	uint16_t data;
    -	uint16_t mask;
    -};
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   register & memmap struction
    - *--------------------------------------------------------------------*/
    -
    -#define PHY_REGISTER 0
    -#define GBL_REGISTER 1
    -
    -struct reg
    -
    -{
    -	uint32_t address;
    -	uint8_t phy;
    -	uint8_t reg;
    -	uint32_t content;
    -	uint8_t type;
    -};
    -
    -struct memmap
    -
    -{
    -	unsigned size;
    -	unsigned used;
    -	struct reg * reg;
    -};
    -
    -/*====================================================================*
    - *
    - *   signed write_phy_reg (struct memmap * memmap, uint8_t phy, uint8_t reg, uint16_t data, uint16_t mask);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed write_phy_reg (struct memmap * memmap, uint8_t phy, uint8_t reg, uint16_t data, uint16_t mask)
    -
    -{
    -	unsigned i;
    -	for (i = 0; i < memmap->used; ++i)
    -	{
    -		if (memmap->reg [i].type != PHY_REGISTER)
    -		{
    -			continue;
    -		}
    -		if (memmap->reg [i].phy != phy)
    -		{
    -			continue;
    -		}
    -		if (memmap->reg [i].reg == reg)
    -		{
    -			continue;
    -		}
    -		memmap->reg [i].content &= mask;
    -		memmap->reg [i].content |= mask & data;
    -		return (0);
    -	}
    -	if (memmap->used < memmap->size)
    -	{
    -		memmap->reg [i].phy = phy;
    -		memmap->reg [i].reg = reg;
    -		memmap->reg [i].content = mask & data;
    -		memmap->reg [i].type = PHY_REGISTER;
    -		memmap->used++;
    -		return (0);
    -	}
    -	error (1, 0, "not enough registers to run simulation");
    -	return (-1);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed write_gbl_reg (struct memmap *memmap, uint32_t address, uint8_t upper, uint16_t data, uint16_t mask);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed write_gbl_reg (struct memmap * memmap, uint32_t address, uint8_t upper, uint16_t data, uint16_t mask)
    -
    -{
    -	unsigned i;
    -	for (i = 0; i < memmap->used; ++i)
    -	{
    -		if (memmap->reg [i].type != GBL_REGISTER)
    -		{
    -			continue;
    -		}
    -		if (memmap->reg [i].address != address)
    -		{
    -			continue;
    -		}
    -		if (upper)
    -		{
    -			memmap->reg [i].content &= (mask << 16) | 0x0000FFFF;
    -			memmap->reg [i].content |= (mask & data) << 16;
    -		}
    -		else
    -		{
    -			memmap->reg [i].content &= mask | 0xFFFF0000;
    -			memmap->reg [i].content |= mask & data;
    -		}
    -		return (0);
    -	}
    -	if (memmap->used < memmap->size)
    -	{
    -		memmap->reg [i].address = address;
    -		memmap->reg [i].content = mask & data;
    -		if (upper)
    -		{
    -			memmap->reg [i].content <<= 16;
    -		}
    -		memmap->reg [i].type = GBL_REGISTER;
    -		memmap->used++;
    -		return (0);
    -	}
    -	error (1, 0, "not enough registers to run simulation");
    -	return (-1);
    -}
    -
    -#if 0
    -
    -/*====================================================================*
    - *
    - *   signed read_phy_reg (struct memmap * memmap, uint8_t phy, uint8_t reg, uint32_t * data);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed read_phy_reg (struct memmap * memmap, uint8_t phy, uint8_t reg, uint32_t * data)
    -
    -{
    -	unsigned i;
    -	for (i = 0; i < memmap->used; ++i)
    -	{
    -		if (memmap->reg [i].type != PHY_REGISTER)
    -		{
    -			continue;
    -		}
    -		if (memmap->reg [i].phy != phy)
    -		{
    -			continue;
    -		}
    -		if (memmap->reg [i].reg != reg)
    -		{
    -			continue;
    -		}
    -		*data = memmap->reg [i].content;
    -		return (0);
    -	}
    -	return (-1);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed read_gbl_reg (struct memmap * memmap, uint32_t address, uint32_t * content);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed read_gbl_reg (struct memmap * memmap, uint32_t address, uint32_t * content)
    -
    -{
    -	unsigned i;
    -	for (i = 0; i < memmap->used; ++i)
    -	{
    -		if (memmap->reg [i].type != GBL_REGISTER)
    -		{
    -			continue;
    -		}
    -		if (memmap->reg [i].address != address)
    -		{
    -			continue;
    -		}
    -		* content = memmap->reg [i].content;
    -		return (0);
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void print_memmap (struct memmap *memmap);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void print_memmap (struct memmap * memmap)
    -
    -{
    -	unsigned i;
    -	for (i = 0; i < memmap->used; ++i)
    -	{
    -		if (memmap->reg [i].type == PHY_REGISTER)
    -		{
    -			printf ("phy 0x%02x, reg 0x%02x: 0x%04x\n", memmap->reg [i].phy, memmap->reg [i].reg, memmap->reg [i].content);
    -		}
    -		if (memmap->reg [i].type == GBL_REGISTER)
    -		{
    -			printf ("0x%08x: 0x%08x\n", memmap->reg [i].address, memmap->reg [i].content);
    -		}
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void print_command (struct command *command);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void print_command (struct command * command)
    -
    -{
    -	union __packed
    -	{
    -		uint16_t data;
    -		struct __packed
    -		{
    -			uint16_t start: 2;
    -			uint16_t operation: 2;
    -			uint16_t phy_address: 5;
    -			uint16_t reg_address: 5;
    -			uint16_t turnaround: 2;
    -		}
    -		bits;
    -	}
    -	ctrl;
    -	ctrl.data = command->ctrl;
    -	printf ("%02x %02x %04x %04x;\n", ctrl.bits.phy_address, ctrl.bits.reg_address, command->data, command->mask);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   signed init_memmap (unsigned count, struct memmap * memmap);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed init_memmap (unsigned count, struct memmap * memmap)
    -
    -{
    -	memmap->reg = calloc (count, sizeof (struct reg));
    -	if (memmap->reg == NULL)
    -	{
    -		error (1, errno, "could not allocate reg memory");
    -	}
    -	memmap->size = count;
    -	memmap->used = 0;
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   void free_memmap (struct memmap * memmap);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void free_memmap (struct memmap * memmap)
    -
    -{
    -	free (memmap->reg);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   signed phy_ar8236 (char const * filename, unsigned commands, flag_t flags);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed phy_ar8236 (char const * filename, unsigned commands, flag_t flags)
    -
    -{
    -	struct command command;
    -	struct memmap memmap;
    -	signed ar8236_code;
    -	signed set_high_addr = 0;
    -	uint16_t high_addr = 0;
    -	uint32_t address;
    -	uint16_t low_address;
    -	if (init_memmap (commands, &memmap))
    -	{
    -		error (1, 0, "could not allocate memory for simulation");
    -	}
    -	while (commands--)
    -	{
    -		if (read (STDIN_FILENO, &command, sizeof (struct command)) != sizeof (struct command))
    -		{
    -			error (0, errno, FILE_CANTREAD, filename);
    -			return (-1);
    -		}
    -		command.ctrl = LE16TOH (command.ctrl);
    -		command.data = LE16TOH (command.data);
    -		command.mask = LE16TOH (command.mask);
    -		ar8236_code = (command.ctrl & 0x180) >> 7;
    -		switch (ar8236_code)
    -		{
    -		case MDIO32_NORMAL:
    -			if (_anyset (flags, MDIODUMP_VERBOSE))
    -			{
    -				printf ("Normal MDIO Operation:\n");
    -				printf ("\tPhy Address: 0x%02x\n", (command.ctrl & 0x1F0) >> 4);
    -				printf ("\tRegister Address: 0x%02x\n", (command.ctrl & 0x3E00) >> 9);
    -			}
    -			if ((command.ctrl & 0x0C) >> 2 == 0x01)
    -			{
    -				write_phy_reg (&memmap, (command.ctrl & 0x1F0) >> 4, (command.ctrl & 0x3E00) >> 9, command.data, command.mask);
    -			}
    -			break;
    -		case MDIO32_SET_HIGH:
    -			set_high_addr = 1;
    -			high_addr = command.data & 0x3FF & command.mask;
    -			if ((command.ctrl & 0x0C) >> 2 == 0x01)
    -			{
    -				if (_anyset (flags, MDIODUMP_VERBOSE))
    -				{
    -					printf ("Set High Address to 0x%03x:\n", high_addr);
    -				}
    -			}
    -			else
    -			{
    -				if (_anyset (flags, MDIODUMP_VERBOSE))
    -				{
    -					printf ("Read High Address:\n");
    -				}
    -			}
    -			break;
    -		case MDIO32_ACCESS_USING_HIGH:
    -			if (!set_high_addr)
    -			{
    -				error (0, 0, "warning: high address bits not set when attempting to do a 32 bit read, assuming high address bits are 0");
    -				high_addr = 0;
    -			}
    -			low_address = (command.ctrl & 0x3E00) >> 9;
    -			low_address |= (command.ctrl & 0x070) << 1;
    -			address = high_addr << 9;
    -			address |= (low_address << 1) & 0xFFFFFFFC;
    -			if (low_address & 0x01)
    -			{
    -				if (_anyset (flags, MDIODUMP_VERBOSE))
    -				{
    -					printf ("Access bits 31:16 using address 0x%08x:\n", address);
    -				}
    -				write_gbl_reg (&memmap, address, 1, command.data, command.mask);
    -			}
    -			else
    -			{
    -				if (_anyset (flags, MDIODUMP_VERBOSE))
    -				{
    -					printf ("Access bits 15:0 using address 0x%08x:\n", address);
    -				}
    -				write_gbl_reg (&memmap, address, 0, command.data, command.mask);
    -			}
    -			break;
    -		}
    -		if ((command.ctrl & 0x03) != 0x01)
    -		{
    -			error (1, ECANCELED, "start command must be 0x01");
    -		}
    -		if (_anyset (flags, MDIODUMP_VERBOSE))
    -		{
    -			printf ("\tStart: 0x%02x\n", command.ctrl & 0x03);
    -			printf ("\tOperation: 0x%02x (%s)\n", (command.ctrl & 0x0C) >> 2, ((command.ctrl & 0x0C) >> 2 == 0x01)? "write": "read");
    -			printf ("\tTurnaround: 0x%02x\n", (command.ctrl & 0xC000) >> 14);
    -			printf ("\tData: 0x%04x\n", command.data);
    -			printf ("\tMask: 0x%04x\n", command.mask);
    -			printf ("\n");
    -		}
    -	}
    -	if (_anyset (flags, MDIODUMP_SUMMARY))
    -	{
    -		printf ("Memory after execution:\n");
    -		print_memmap (&memmap);
    -	}
    -	free_memmap (&memmap);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed phy_generic (char const * filename, unsigned commands, flag_t flags);
    - *
    - *   assume instructions are 16-bit and display them in human readable
    - *   format on stdout;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed phy_generic (char const * filename, unsigned commands, flag_t flags)
    -
    -{
    -	struct command command;
    -	struct memmap memmap;
    -	if (init_memmap (commands, &memmap))
    -	{
    -		error (1, 0, "could not allocate memory for simulation");
    -	}
    -	while (commands--)
    -	{
    -		if (read (STDIN_FILENO, &command, sizeof (command)) != sizeof (command))
    -		{
    -			error (0, errno, FILE_CANTREAD, filename);
    -			return (-1);
    -		}
    -		command.ctrl = LE16TOH (command.ctrl);
    -		command.data = LE16TOH (command.data);
    -		command.mask = LE16TOH (command.mask);
    -		if ((command.ctrl & 0x03) != 0x01)
    -		{
    -			error (1, ECANCELED, "start command must be 0x01");
    -		}
    -		if (_anyset (flags, MDIODUMP_VERBOSE))
    -		{
    -			printf ("Start: 0x%02x\n", command.ctrl & 0x03);
    -			printf ("Operation: 0x%02x (%s)\n", (command.ctrl & 0x0C) >> 2, ((command.ctrl & 0x0C) >> 2 == 0x01)? "write": "read");
    -			printf ("Phy Address: 0x%02x\n", (command.ctrl & 0x1F0) >> 4);
    -			printf ("Register Address: 0x%02x\n", (command.ctrl & 0x3E00) >> 9);
    -			printf ("Turnaround: 0x%02x\n", (command.ctrl & 0xC000) >> 14);
    -			printf ("Data: 0x%04x\n", command.data);
    -			printf ("Mask: 0x%04x\n", command.mask);
    -			printf ("\n");
    -			continue;
    -		}
    -		if ((command.ctrl & 0x0C) >> 2 == 0x01)
    -		{
    -			if (_anyset (flags, MDIODUMP_SUMMARY))
    -			{
    -				write_phy_reg (&memmap, (command.ctrl & 0x1F0) >> 4, (command.ctrl & 0x3E00) >> 9, command.data, command.mask);
    -				continue;
    -			}
    -			print_command (&command);
    -			continue;
    -		}
    -	}
    -	if (_anyset (flags, MDIODUMP_SUMMARY))
    -	{
    -		printf ("Memory after execution:\n");
    -		print_memmap (&memmap);
    -	}
    -	free_memmap (&memmap);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed function (char const * filename, unsigned phy_code, flag_t flags);
    - *
    - *   read the MDIO block header to determine the number of MDIO
    - *   instructions in the program block; call appropriate function
    - *   to interpret instructions and display them in human readable
    - *   format;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed function (char const * filename, unsigned phy_code, flag_t flags)
    -
    -{
    -	uint16_t mdio_header;
    -	unsigned commands;
    -	if (read (STDIN_FILENO, &mdio_header, sizeof (mdio_header)) != sizeof (mdio_header))
    -	{
    -		error (0, errno, FILE_CANTREAD, filename);
    -		return (-1);
    -	}
    -	mdio_header = LE16TOH (mdio_header);
    -	commands = (mdio_header & 0xFFC0) >> 6;
    -	printf ("# ------- %s -------\n", filename);
    -	if (_anyset (flags, MDIODUMP_SUMMARY))
    -	{
    -		printf ("Enabled: %s\n", (mdio_header & 0x0001)? "yes": "no");
    -		printf ("Number of Commands: %d\n", commands);
    -	}
    -	if (phy_code == PHY_GENERIC)
    -	{
    -		return (phy_generic (filename, commands, flags));
    -	}
    -	if (phy_code == PHY_AR8236)
    -	{
    -		return (phy_ar8236 (filename, commands, flags));
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, const char * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, const char * argv [])
    -
    -{
    -	static const char *optv [] =
    -	{
    -		"st:v",
    -		"file [file] [...]",
    -		"Atheros MDIO Custom Module Analyser",
    -		"s\tprint summary information",
    -		"t s\tinterpret MDIO commands for phy type (s) [generic]",
    -		"v\tprint complete module dump, not just the summary",
    -		(const char *) (0)
    -	};
    -	unsigned phy_code = PHY_GENERIC;
    -	flag_t flags = (flag_t)(0);
    -	signed state = 0;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 's':
    -			_setbits (flags, MDIODUMP_SUMMARY);
    -			break;
    -		case 't':
    -			if ((c = lookup (optarg, switches, SIZEOF (switches))) == -1)
    -			{
    -				assist (optarg, "type", switches, SIZEOF (switches));
    -			}
    -			_setbits (flags, MDIODUMP_SUMMARY);
    -			phy_code = (unsigned)(c);
    -			break;
    -		case 'b':
    -			_clrbits (flags, MDIODUMP_SUMMARY);
    -			break;
    -		case 'v':
    -			_setbits (flags, MDIODUMP_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (!argc)
    -	{
    -		function ("stdin", phy_code, flags);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!freopen (* argv, "rb", stdin))
    -		{
    -			error (0, errno, "%s", * argv);
    -			state = 1;
    -			errno = 0;
    -		}
    -		else if (function (* argv, phy_code, flags))
    -		{
    -			state = 1;
    -		}
    -		argc--;
    -		argv++;
    -	}
    -	return (state);
    -}
    -
    -
    -
    - - - diff --git a/docbook/mdiogen.c.html b/docbook/mdiogen.c.html deleted file mode 100644 index 3c08a738..00000000 --- a/docbook/mdiogen.c.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - mdiogen.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   mdiogen.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <unistd.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -#include <sys/stat.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/number.h"
    -#include "../tools/memory.h"
    -#include "../tools/endian.h"
    -#include "../tools/error.h"
    -#include "../mdio/mdio.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -const char * program_name;
    -
    -/*====================================================================*
    - *
    - *   void regview (void const * memory, uint16_t offset, uint16_t length, FILE *fp);
    - *
    - *   memory.h
    - *
    - *   print memory as a binary dump showing absolute memory offsets and
    - *   16-bit binary register maps; sample output looks like:
    - *
    - *      ADDR DATA 5432-1098-7654-3210
    - *      0000 0000 0000-0000-0000-0000
    - *      0002 0000 0000-0000-0000-0000
    - *      0004 0000 0000-0000-0000-0000
    - *      0008 0000 0000-0000-0000-0000
    - *      0010 0000 0000-0000-0000-0000
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void regview (void const * memory, uint16_t offset, uint16_t extent, FILE *fp)
    -
    -{
    -	uint16_t * origin = (uint16_t *)(memory);
    -	printf ("ADDR DATA 5432-1098-7654-3210\n");
    -	while (extent >= sizeof (* origin))
    -	{
    -		signed bit = sizeof (* origin) << 3;
    -		printf ("%04u ", offset);
    -		printf ("%04X ", LE16TOH (*origin));
    -		while (bit--)
    -		{
    -			putc (((* origin >> bit) & 1)? '1': '0', fp);
    -			if ((bit) && !(bit%4))
    -			{
    -				putc ('-', fp);
    -			}
    -		}
    -		putc ('\n', fp);
    -		offset += sizeof (* origin);
    -		extent -= sizeof (* origin);
    -		origin++;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, const char * argv []);
    - *
    - *   this is a basic program that produces an MDIO program block
    - *   using macros defined in mdio.h; the output filename is fixed;
    - *
    - *   declare your MDIO program by editing array program [] based on
    - *   the MDIO program rules defined in the Atheros PLC Firmware TRM
    - *   under the description of the VS_MOD_OP;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define MDIO_PROGRAM "mdio.bin"
    -
    -int main (int argc, const char * argv [])
    -
    -{
    -	uint16_t program [] =
    -	{
    -
    -#if 1
    -
    -		MDIO16_START (1, 0, 9),
    -		MDIO16_INSTR (1, 1, 0x18, 0x00, 2),
    -		0x0000,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x10, 0x16, 2),
    -		0x003F,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x10, 0x17, 2),
    -		0x7E3F,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x18, 0x00, 2),
    -		0x0000,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x10, 0x02, 2),
    -		0x0700,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x10, 0x03, 2),
    -		0x0000,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x18, 0x00, 2),
    -		0x0000,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x14, 0x00, 2),
    -		0x007D,
    -		0xFFFF,
    -		MDIO16_INSTR (1, 1, 0x14, 0x01, 2),
    -		0x0000,
    -		0xFFFF,
    -
    -#else
    -
    -		MDIO16_START (1, 0, 24),
    -		MDIO32_INSTR (0x2c, 0x7e3f003f, 0xffffffff),
    -		MDIO32_INSTR (0x8, 0x500, 0xffffffff),
    -		MDIO32_INSTR (0x100, 0x7d, 0xffffffff),
    -		MDIO32_INSTR (0x30, 0x19f005f2, 0xffffffff),
    -		MDIO32_INSTR (0x200, 0x7d, 0xffffffff),
    -		MDIO32_INSTR (0x300, 0x7d, 0xffffffff),
    -		MDIO32_INSTR (0x400, 0x7d, 0xffffffff),
    -		MDIO32_INSTR (0x500, 0x7d, 0xffffffff),
    -
    -#endif
    -
    -	};
    -	signed fd;
    -	program_name = * argv;
    -	if (--argc)
    -	{
    -		error (1, ECANCELED, "Too many command line arguments");
    -	}
    -	regview (&program, 0, sizeof (program), stdout);
    -	if ((fd = open (MDIO_PROGRAM, O_CREAT|O_WRONLY|O_TRUNC, S_IRWXU | S_IRGRP | S_IROTH)) == -1)
    -	{
    -		error (1, errno, "Can't open %s", MDIO_PROGRAM);
    -	}
    -	if (write (fd, program, sizeof (program)) != sizeof (program))
    -	{
    -		unlink (MDIO_PROGRAM);
    -		error (1, errno, "Can't write %s", MDIO_PROGRAM);
    -	}
    -	if (sizeof (program) % sizeof (uint32_t))
    -	{
    -		uint32_t zeros = 0;
    -		ssize_t count = sizeof (uint32_t) - sizeof (program) % sizeof (uint32_t);
    -		if (write (fd, &zeros, count) != count)
    -		{
    -			unlink (MDIO_PROGRAM);
    -			error (1, errno, "Can't write %s", MDIO_PROGRAM);
    -		}
    -	}
    -	close (fd);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/mdustats.1.html b/docbook/mdustats.1.html deleted file mode 100644 index 5a9d87b4..00000000 --- a/docbook/mdustats.1.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - mdustats.1 - - - - - - - - - -
    -mdustats(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 mdustats(1)
    -
    -NAME
    -       mdustats
    -
    -SYNOPSIS
    -       mdustats [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       Collect and display MDU traffic statisitcs using the Qualcomm Atheros vendor specific VS_MDU_TRAFFIC_STATS message.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -c command
    -              An integer indicating the type of statistics to be collected and reported.  Permitted values  are  0  through  255
    -              decimal  but only 4 through 15 are valid at this time.  This option is mandatory because the default value of 0 is
    -              invalid.
    -               4 - retrieve traffic statistics on the slave side
    -               5 - retrieve traffic statistics (master TX/RX) collected on the master side
    -               6 - retrieve traffic statistics (slave TX/RX) collected on the master side
    -               7 - retrieve traffic statistics (master/slave TX/RX) collected on the master side
    -               8 - clear traffic statistics on the slave side
    -               9 - clear traffic statistics (master TX/RX) colleted on the master side
    -               10 - clear traffic statistics (slave TX/RX) collected on the master side
    -               11 - clear traffic statistics (master/slave TX/RX) collected on the master side
    -               12 - retrieve then clear traffic statistics collected on the slave side
    -               13 - retrieve then clear traffic statistics (master TX/RX) collected on the master side
    -               14 - retrieve then clear traffic statistics (slave TX/RX) collected on the master side
    -               15 - retrieve then clear traffic statistics (master/slave TX/RX) collected on the master side
    -
    -       -s session
    -              The session identifier used to associate request/confirm message pairs.  Valid identifiers are 0 through 255.  The
    -              default is 0.
    -
    -       -t milliseconds
    -              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -u unit
    -              The slave unit number.  This is the same as the slave Terminal Equipment Identifier or TEI.   Valid  unit  numbers
    -              are  0  through  255.   Unit  0 is the default.  This option is ignored when option -c specified any of the "slave
    -              side" commands 4, 8 or 12.
    -
    -       -v     Print additional information on stdout.
    -
    -       -x     Cause the program to exit on the first error instead  of  continuing  with  remaining  iterations,  operations  or
    -              devices.   Normally,  the program reports errors and moves on to the next operation, iteration or device depending
    -              on the command line.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The Ethernet hardware address of some powerline device.  More than one address may be  specified  on  the  command
    -              line.   If  more  than one address is specified then operations are performed on each device in turn.  The default
    -              address is local.  as explained in the DEVICES section.
    -
    -DEVICES
    -       Powerline devices use Ethernet hardware, or Media Access Control (MAC), addresses.  Device addresses are expressed as  12
    -       hexadecimal digits (0123456789ABCDEFabcdef) in upper, lower or mixed case.  Individual octets may be separated by colons,
    -       for  clarity,  but  not  all  octets  need  to  be  seperated.   For  example,  "00b052000001",  "00:b0:52:00:00:01"  and
    -       "00b052:000001" are valid and equivalent.
    -
    -       These symbolic addresses are recognized by this program and may be used instead of the actual address value.
    -
    -       all    Equivalent to "broadcast", described next.
    -
    -       broadcast
    -              A  synonym  for the standard Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or
    -              foreign will respond to this address.
    -
    -       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
    -              Atheros  devices  will  recognize  this  address  but remote and foreign devices will not.  A remote device is any
    -              device at the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros Powerline Firmware Technical Reference Manual for more information about MDU powerline  configu‐
    -       ration and the VS_MDU_TRAFFIC_STATS message type.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.  Consequently, public information may not be available.  Qualcomm Atheros  reserves  the  right  to  modify  message
    -       structure or content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       The  following  example collects and displays MDU traffic statistics on the slave side of the local device because option
    -       -c is 4.  The local device is implicit because no device is specified on the command line.
    -
    -          # mdustats -c 4
    -
    -       The next example collects and displays MDU traffic statistics for slave 2 on the master side of device  00:b0:52:9F:E0:14
    -       because option -c is 5 and option -s is 2.  The master device is explicit in this example.
    -
    -          # mdustats -c 5 -u 2 00b0529FE014
    -
    -SEE ALSO
    -       plc(1), int6kstat(1), sada(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                 mdustats(1)
    -
    - - - diff --git a/docbook/mdustats.c.html b/docbook/mdustats.c.html deleted file mode 100644 index a0c3585b..00000000 --- a/docbook/mdustats.c.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - mdustats.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   mdustats.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Display.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/MDUTrafficStats.c"
    -#include "../plc/Devices.c"
    -#include "../plc/chipset.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/error.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/set32bitmap.c"
    -#include "../tools/synonym.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MDUSTATS_COMMAND 4
    -#define MDUSTATS_SESSION 255
    -#define MDUSTATS_SLAVE 0
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"c:ei:qs:t:u:v",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros INT6x00 Powerline Link Statistics",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"c n\tcommand [" LITERAL (MDUSTATS_COMMAND) "]",
    -		"e\tredirect stderr to stdout",
    -		"q\tquiet mode",
    -		"s n\tsession identifier [" LITERAL (MDUSTATS_SESSION) "]",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"u n\tslave unit number [" LITERAL (MDUSTATS_SLAVE) "]",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	uint8_t command = MDUSTATS_COMMAND;
    -	uint8_t session = MDUSTATS_SESSION;
    -	uint8_t slave = MDUSTATS_SLAVE;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'c':
    -			command = (uint8_t)(uintspec (optarg, 0, 255));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 's':
    -			session = (uint8_t)(uintspec (optarg, 0, 255));
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'u':
    -			slave = (uint8_t)(uintspec (optarg, 0, 255));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		MDUTrafficStats (&plc, command, session, slave);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		MDUTrafficStats (&plc, command, session, slave);
    -		argc--;
    -		argv++;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/memdecr.c.html b/docbook/memdecr.c.html deleted file mode 100644 index 3eebdeea..00000000 --- a/docbook/memdecr.c.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - memdecr.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   signed memdecr (void * memory, size_t extent);
    - *
    - *   memory.h
    - *
    - *   decrement a multi-byte memory region; start at 0xff and reset
    - *   at 0x00; return -1 if all bytes are 0x00;
    - *
    - *   for example:
    - *
    - *      0x00 0x00 0x00 --> 0x00 0x00 0x01
    - *      0xFF 0x00 0xFF --> 0xFF 0x01 0x00
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MEMDECR_SOURCE
    -#define MEMDECR_SOURCE
    -
    -#include "../tools/memory.h"
    -
    -signed memdecr (void * memory, register size_t extent)
    -
    -{
    -	register byte * offset = (byte *)(memory);
    -	while (extent--)
    -	{
    -		if (-- offset [extent] != 0xFF)
    -		{
    -			return (0);
    -		}
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/memencode.c.html b/docbook/memencode.c.html deleted file mode 100644 index a746f1dd..00000000 --- a/docbook/memencode.c.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - memencode.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   unsigned memencode (void * memory, size_t extent, char const * format, char const * string);
    - *
    - *   memory.h
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MEMENCODE_SOURCE
    -#define MEMENCODE_SOURCE
    -
    -#include <string.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../pib/pib.h"
    -
    -static size_t memstring (void * memory, size_t extent, char const * format, char const * string, size_t length)
    -
    -{
    -	if (extent < length)
    -	{
    -		error (1, ECANCELED, "Overflow at %s %s", format, string);
    -	}
    -	memset (memory, 0, length);
    -	strncpy (memory, string, length-1);
    -	return (length);
    -}
    -
    -size_t memencode (void * memory, size_t extent, char const * format, char const * string)
    -
    -{
    -	if (!strcmp (format, "byte"))
    -	{
    -		uint8_t * number = (uint8_t *)(memory);
    -		if (extent < sizeof (* number))
    -		{
    -			error (1, ECANCELED, "Overflow at %s %s", format, string);
    -		}
    -		* number = (uint8_t)(basespec (string, 0, sizeof (* number)));
    -		return (sizeof (* number));
    -	}
    -	if (!strcmp (format, "word"))
    -	{
    -		uint16_t * number = (uint16_t *)(memory);
    -		if (extent < sizeof (* number))
    -		{
    -			error (1, ECANCELED, "Overflow at %s %s", format, string);
    -		}
    -		* number = (uint16_t)(basespec (string, 0, sizeof (* number)));
    -		* number = HTOLE16 (* number);
    -		return (sizeof (* number));
    -	}
    -	if (!strcmp (format, "long"))
    -	{
    -		uint32_t * number = (uint32_t *)(memory);
    -		if (extent < sizeof (* number))
    -		{
    -			error (1, ECANCELED, "Overflow at %s %s", format, string);
    -		}
    -		* number = (uint32_t)(basespec (string, 0, sizeof (* number)));
    -		* number = HTOLE32 (* number);
    -		return (sizeof (* number));
    -	}
    -	if (!strcmp (format, "huge"))
    -	{
    -		uint64_t * number = (uint64_t *)(memory);
    -		if (extent < sizeof (* number))
    -		{
    -			error (1, ECANCELED, "Overflow at %s %s", format, string);
    -		}
    -		* number = (uint64_t)(basespec (string, 0, sizeof (* number)));
    -		* number = HTOLE64 (* number);
    -		return (sizeof (* number));
    -	}
    -	if (!strcmp (format, "text"))
    -	{
    -		extent = (unsigned)(strlen (string));
    -		memcpy (memory, string, extent);
    -		return (extent);
    -	}
    -	if (!strcmp (format, "data"))
    -	{
    -		extent = (unsigned)(dataspec (string, memory, extent));
    -		return (extent);
    -	}
    -	if (!strcmp (format, "fill"))
    -	{
    -		extent = (unsigned)(uintspec (string, 0, extent));
    -		memset (memory, ~0, extent);
    -		return (extent);
    -	}
    -	if (!strcmp (format, "zero"))
    -	{
    -		extent = (unsigned)(uintspec (string, 0, extent));
    -		memset (memory, 0, extent);
    -		return (extent);
    -	}
    -	if (!strcmp (format, "skip"))
    -	{
    -		extent = (unsigned)(uintspec (string, 0, extent));
    -		return (extent);
    -	}
    -
    -#if 1
    -
    -/*
    - *   tr-069 specific fields that don't really belong in the PIB;
    - */
    -
    -	if (!strcmp (format, "adminusername") || !strcmp (format, "adminpassword") || !strcmp (format, "accessusername"))
    -	{
    -		return (memstring (memory, extent, format, string, PIB_NAME_LEN + 1));
    -	}
    -	if (!strcmp (format, "accesspassword"))
    -	{
    -		return (memstring (memory, extent, format, string, PIB_HFID_LEN + 1));
    -	}
    -	if (!strcmp (format, "username") || !strcmp (format, "password") || !strcmp (format, "url"))
    -	{
    -		return (memstring (memory, extent, format, string, PIB_TEXT_LEN + 1));
    -	}
    -
    -#endif
    -
    -#if 1
    -
    -/*
    - *   HPAV specific fields that belong in the PIB;
    - */
    -
    -	if (!strcmp (format, "hfid"))
    -	{
    -		return (memstring (memory, extent, format, string, PIB_HFID_LEN));
    -	}
    -	if (!strcmp (format, "mac"))
    -	{
    -		return (bytespec (string, memory, ETHER_ADDR_LEN));
    -	}
    -	if (!strcmp (format, "key"))
    -	{
    -		return (bytespec (string, memory, PIB_KEY_LEN));
    -	}
    -
    -#endif
    -
    -	error (1, ENOTSUP, "%s", format);
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/memincr.c.html b/docbook/memincr.c.html deleted file mode 100644 index 7ef6fabc..00000000 --- a/docbook/memincr.c.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - memincr.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   signed memincr (void * memory, size_t  extent);
    - *
    - *   memory.h
    - *
    - *   increment a multi-byte memory region; start at 0x00 and reset
    - *   at 0xFF; return -1 if all bytes are 0xFF;
    - *
    - *   for example,
    - *
    - *      0x00 0x00 0x00 --> 0x00 0x00 0x01
    - *      0xFF 0x00 0xFF --> 0xFF 0x01 0x00
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MEMINCR_SOURCE
    -#define MEMINCR_SOURCE
    -
    -#include "../tools/memory.h"
    -
    -signed memincr (void * memory, register size_t extent)
    -
    -{
    -	register byte * offset = (byte *)(memory);
    -	while (extent--)
    -	{
    -		if (++ offset [extent] != 0x00)
    -		{
    -			return (0);
    -		}
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/memory.h.html b/docbook/memory.h.html deleted file mode 100644 index 8460b40e..00000000 --- a/docbook/memory.h.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - memory.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   memory.h - memory encode/decode definitions and delcaration;
    - *
    - *   this file is a subset of the original that includes only those
    - *   definitions and declaration needed for toolkit programs;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MEMORY_HEADER
    -#define MEMORY_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <unistd.h>
    -#include <stdint.h>
    -#include <netinet/in.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -#include "../tools/endian.h"
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define IPv4_LEN 4
    -#define IPv6_LEN 16
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef offset
    -#define offset(struct, member) (signed)(&struct.member)-(signed)(&struct)
    -#endif
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define HEXSTRING(string, memory) hexstring (string, sizeof (string), memory, sizeof (memory)) 
    -#define HEXDUMP_HEADER "-------- 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ----------------\n"
    -#define REGVIEW32_HEADER "REGISTER CONTENTS 31----24 23----16 15----08 07----00\n"
    -#define REGVIEW16_HEADER "ADDR DATA 5432 1098 7654 3210\n"
    -#define ADDRSIZE 8
    -
    -/*====================================================================*
    - *   macro expansions;
    - *--------------------------------------------------------------------*/
    -
    -#define NEW(object) (object *)(emalloc(sizeof(object)))
    -#define STR(length) (char *)(emalloc((length)+1))
    -
    -/*====================================================================*
    - *   memory increment/decrement functions;
    - *--------------------------------------------------------------------*/
    -
    -signed strincr (void * memory, size_t extent, byte min, byte max);
    -signed strdecr (void * memory, size_t extent, byte min, byte max);
    -signed memincr (void * memory, size_t extent);
    -signed memdecr (void * memory, size_t extent);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -bool memseek (void const * memory, size_t extent, void const * buffer, size_t length);
    -
    -/*====================================================================*
    - *   memory allocation functions;
    - *--------------------------------------------------------------------*/
    -
    -void * emalloc (size_t length);
    -
    -/*====================================================================*
    - *   memory movement functions;
    - *--------------------------------------------------------------------*/
    -
    -void memswap (void *, void *, size_t extent);
    -void reverse (void * memory, size_t extent);
    -
    -/*====================================================================*
    - *   memory validation functions (deprecated);
    - *--------------------------------------------------------------------*/
    -
    -uint32_t checksum_32 (const uint32_t memory [], size_t extent, uint32_t checksum);
    -uint32_t fdchecksum_32 (int fd, size_t extent, uint32_t checksum);
    -
    -/*====================================================================*
    - *   memory validation functions;
    - *--------------------------------------------------------------------*/
    -
    -uint32_t checksum32 (void const * memory, size_t extent, uint32_t checksum);
    -uint32_t fdchecksum32 (int fd, size_t extent, uint32_t checksum);
    -
    -/*====================================================================*
    - *   memory encode functions;
    - *--------------------------------------------------------------------*/
    -
    -size_t memencode (void * memory, size_t extent, char const * format, char const * string);
    -size_t hexencode (void * memory, size_t extent, char const * string);
    -size_t hexcopy (void * memory, size_t extent, char const * string);
    -size_t decencode (void * memory, size_t extent, char const * string);
    -size_t memdecode (void const * memory, size_t extent, char const * format, char const * string);
    -size_t hexdecode (void const * memory, size_t extent, char buffer [], size_t length);
    -size_t decdecode (void const * memory, size_t extent, char buffer [], size_t length);
    -char * hexstring (char buffer [], size_t length, void const * memory, size_t extent);
    -char * decstring (char buffer [], size_t length, void const * memory, size_t extent);
    -char * hexoffset (char buffer [], size_t length, off_t offset);
    -size_t bytespec (char const * string, void * memory, size_t extent);
    -size_t dataspec (char const * string, void * memory, size_t extent);
    -size_t ipv4spec (char const * string, void * memory);
    -size_t ipv6spec (char const * string, void * memory);
    -
    -/*====================================================================*
    - *   memory input functions;
    - *--------------------------------------------------------------------*/
    -
    -size_t hexload (void * memory, size_t extent, FILE *fp);
    -
    -/*====================================================================*
    - *   memory output functions;
    - *--------------------------------------------------------------------*/
    -
    -void hexwrite (signed fd, void const * memory, size_t extent);
    -void hexsave (void const * memory, size_t extent, size_t column, FILE *fp);
    -void hexdump (void const * memory, size_t offset, size_t extent, FILE *fp);
    -void bindump (void const * memory, size_t offset, size_t extent, FILE *fp);
    -void hexview (void const * memory, size_t offset, size_t extent, FILE *fp);
    -void hexpeek (void const * memory, size_t origin, size_t offset, size_t extent, size_t window, FILE * fp);
    -void regview16 (void const * memory, size_t offset, size_t extent, FILE *fp);
    -void regview32 (void const * memory, size_t offset, size_t extent, FILE *fp);
    -void hexout (void const * memory, size_t extent, char c, char e, FILE *fp);
    -void decout (void const * memory, size_t extent, char c, char e, FILE *fp);
    -void binout (void const * memory, size_t extent, char c, char e, FILE *fp);
    -void chrout (void const * memory, size_t extent, char c, char e, FILE *fp);
    -void memout (void const * memory, size_t extent, char const * format, unsigned group, char c, char e, FILE *fp);
    -
    -/*====================================================================*
    - *   end definitions;
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/memout.c.html b/docbook/memout.c.html deleted file mode 100644 index c1294bc0..00000000 --- a/docbook/memout.c.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - memout.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void memout (void const  * memory, size_t extent, char const * format, unsigned group, char c, char e, FILE * fp)
    - *
    - *   memory.h
    - *
    - *   print memory as a series of octets formatted by format string fmt,
    - *   seperated by character c every mod prints;
    - *
    - *   for example, memout (memory, IPv4_LEN, "%d", 1, '.', stdout) would print:
    - *
    - *      192.168.1.1
    - *
    - *   another example, memout (memory, IPv6_LEN, "%02x", 2, ':', stdout) would print:
    - *
    - *     0032:0045:0000:0000:0000:0000:1123:4456
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MEMOUT_SOURCE
    -#define MEMOUT_SOURCE
    -
    -#include <stdio.h>
    -#include <stddef.h>
    -
    -#include "../tools/memory.h"
    -
    -void memout (void const * memory, size_t extent, char const * format, unsigned group, char c, char e, FILE * fp)
    -
    -{
    -	byte * origin = (byte *) (memory);
    -	byte * offset = (byte *) (memory);
    -	while (extent--)
    -	{
    -		ptrdiff_t count = (offset - origin) + 1;
    -		fprintf (fp, format, * offset);
    -		if ((count % group) == 0 && extent)
    -		{
    -			putc (c, fp);
    -		}
    -		offset++;
    -	}
    -	if (e)
    -	{
    -		putc (c, fp);
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/memswap.c.html b/docbook/memswap.c.html deleted file mode 100644 index b6af8542..00000000 --- a/docbook/memswap.c.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - memswap.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void memswap (void * memory1,  void * memory2, size_t extent);
    - *
    - *   memory.h
    - *
    - *   exchange the contents of one memory region with that of another;
    - *   return no value;
    - *
    - *   one application for this function is to exchange the source and
    - *   destination addresses in an Ethernet frame to form a response
    - *   message;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MEMSWAP_SOURCE
    -#define MEMSWAP_SOURCE
    -
    -#include "../tools/memory.h"
    -
    -void memswap (void * memory1, void * memory2, size_t extent)
    -
    -{
    -	register byte * byte1 = (byte *)(memory1);
    -	register byte * byte2 = (byte *)(memory2);
    -	if (memory1 != memory2) while (extent--)
    -	{
    -		byte byte = *byte1;
    -		*byte1++ = *byte2;
    -		*byte2++ = byte;
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/mme.1.html b/docbook/mme.1.html deleted file mode 100644 index 516809df..00000000 --- a/docbook/mme.1.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - mme.1 - - - - - - - - - -
    -mme(1)                                       Qualcomm Atheros Open Powerline Toolkit                                      mme(1)
    -
    -NAME
    -       mme - Qualcomm Atheros vendor-specific message enumerator
    -
    -SYNOPSIS
    -       mme [options]
    -
    -DESCRIPTION
    -       Print  Atheros  vendor-specific  message  types  and names with associated error codes and text on stdout.  Output can be
    -       printed in various formats such as HTML, CSV and plain text.  The plain text format is ideal for searching using a  util‐
    -       ity like grep.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -c     Output in Comma Separated Value (CSV) format.  This format is suitable for import into a spreadsheet or database.
    -
    -       -h     Output in Hypertext Markup Language (HTML) format.  This format is suitable for inclusion on a basic webpage.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.  See the HomePlug AV Specification for a description of all HomePlug  AV  message
    -              types.   See  the  Qualcomm Atheros INT6000 Firmware Reference Manual for a description of Atheros Vendor Specific
    -              message types.
    -
    -EXAMPLES
    -       The following example prints Atheros vendor-specific message codes and names, along with associated error codes and text,
    -       on stdout.  The output format is plain text because no formatting options were specified on the command line.
    -
    -          # mme
    -          0xA005 VS_WR_MEM.CNF       0x14 "Bad Checksum"
    -          0xA005 VS_WR_MEM.CNF       0x1C "Bad Length"
    -          0xA005 VS_WR_MEM.CNF       0x38 "Bad Address"
    -          0xA005 VS_WR_MEM.CNF       0x3C "Bad Data Alignment"
    -          0xA009 VS_RD_MEM.CNF       0x10 "Bad Offset"
    -          0xA009 VS_RD_MEM.CNF       0x14 "Bad Length"
    -          0xA00D VS_ST_MAC.CNF       0x10 "Bad Module ID"
    -          0xA00D VS_ST_MAC.CNF       0x14 "Bad Image Checksum"
    -          0xA00D VS_ST_MAC.CNF       0x1C "Bad Image Length"
    -          0xA00D VS_ST_MAC.CNF       0x38 "Bad Image Load Address"
    -          0xA00D VS_ST_MAC.CNF       0x3C "Bad Data Alignment"
    -          0xA00D VS_ST_MAC.CNF       0x40 "Bad Start Address"
    -          0xA011 VS_GET_NVM.CNF      0x10 "No NVRAM"
    -          0xA01D VS_RS_DEV.CNF       0x01 "Device Failed to Reset"
    -          0xA01D VS_RS_DEV.CNF       0x02 "Device Busy"
    -          0xA021 VS_WR_MOD.CNF       0x10 "Bad Module"
    -          0xA021 VS_WR_MOD.CNF       0x12 "Bad Length"
    -          0xA021 VS_WR_MOD.CNF       0x14 "Bad Checksum"
    -          0xA021 VS_WR_MOD.CNF       0x20 "Bad Offset"
    -          0xA021 VS_WR_MOD.CNF       0x40 "Operation Blocked"
    -          0xA021 VS_WR_MOD.CNF       0x50 "Fail to lock NVM"
    -          0xA025 VS_RD_MOD.CNF       0x10 "Bad Module"
    -          0xA025 VS_RD_MOD.CNF       0x12 "Bad Length"
    -          0xA025 VS_RD_MOD.CNF       0x14 "Bad Checksum"
    -          ......
    -
    -       The  next example does the same thing but output is piped into the grep utility which selects only those lines containing
    -       the substring "0x40".  The result shows that this error code is used by two different Atheros vendor-specific messages.
    -
    -          # mme | grep "0x40"
    -          0xA00D VS_ST_MAC.CNF       0x40 "Bad Start Address"
    -          0xA021 VS_WR_MOD.CNF       0x40 "Operation Blocked"
    -          ......
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public information is not available.  Qualcomm Atheros reserves the right to modify management mes‐
    -       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
    -       gram.
    -
    -SEE ALSO
    -       amp(1), efsu(1), hpav(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                      mme(1)
    -
    - - - diff --git a/docbook/mme.c.html b/docbook/mme.c.html deleted file mode 100644 index a185b28a..00000000 --- a/docbook/mme.c.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - mme.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   mme.c - Atheros vendor-specific message code and name printer;
    - *
    - *   print vendor-specific mesage codes and names and with associated
    - *   error codes and error text on stdout in various formats; options
    - *   are HTML, CSV and plain text;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/format.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/output.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMEName.c"
    -#include "../mme/MMEMode.c"
    -#endif
    -
    -#include "../mme/MMECode.c"
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MME_VERBOSE	(1 << 0)
    -#define MME_SILENCE	(1 << 1)
    -#define MME_TOCSV	(1 << 2)
    -#define MME_TOHTML	(1 << 3)
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char * argv[]);
    - *
    - *   print vendor-specific message codes and names with associated
    - *   error codes and text on stdout; output options are HTML, CSV
    - *   and plain text;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define DEFAULT_COLUMN 40
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"cht:",
    -		PUTOPTV_S_DIVINE,
    -		"Atheros vendor-specific message enumerator",
    -		"c\toutput CSV table",
    -		"h\toutput HTML table",
    -		"t n\ttab to column (n) [" LITERAL (DEFAULT_COLUMN) "]",
    -		(char const *) (0)
    -	};
    -	signed column = DEFAULT_COLUMN;
    -	signed index;
    -	uint16_t type;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'c':
    -			_setbits (flags, MME_TOCSV);
    -			break;
    -		case 'h':
    -			_setbits (flags, MME_TOHTML);
    -			break;
    -		case 't':
    -			column = (signed)(uintspec (optarg, 0, 255));
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -	if (_anyset (flags, MME_TOHTML))
    -	{
    -		signed margin = 2;
    -		output (margin++, "<table class='mme'>");
    -		output (margin++, "<tr class='mme'>");
    -		output (margin, "<th class='type'>Type</th>");
    -		output (margin, "<th class='name'>Name</th>");
    -		output (margin, "<th class='code'>Code</th>");
    -		output (margin, "<th class='text'>Text</th>");
    -		output (margin--, "</tr>");
    -		for (index = 0; index < (signed)(SIZEOF (mme_codes)); index++)
    -		{
    -			type = mme_codes [index].type;
    -			output (margin++, "<tr class='mme'>");
    -			output (margin, "<td class='type'>0x%04X</td>", type);
    -			output (margin, "<td class='name'>%s.%s</td>", MMEName (type), MMEMode (type));
    -			output (margin, "<td class='code'>0x%02X</td>", mme_codes [index].code);
    -			output (margin, "<td class='text'>%s</td>", mme_codes [index].text);
    -			output (margin--, "</tr>");
    -		}
    -		output (margin--, "</table>");
    -		return (0);
    -	}
    -	if (_anyset (flags, MME_TOCSV))
    -	{
    -		printf ("Name,Type,Code,Text\n");
    -		for (index = 0; index < (signed)(SIZEOF (mme_codes)); index++)
    -		{
    -			type = mme_codes [index].type;
    -			printf ("0x%04X,", type);
    -			printf ("%s.%s,", MMEName (type), MMEMode (type));
    -			printf ("0x%02X,", mme_codes [index].code);
    -			printf ("\"%s\"\n", mme_codes [index].text);
    -		}
    -		return (0);
    -	}
    -	for (index = 0; index < (signed)(SIZEOF (mme_codes)); index++)
    -	{
    -		signed indent = column;
    -		type = mme_codes [index].type;
    -		indent -= printf ("0x%04X ", type);
    -		indent -= printf ("%s.%s ", MMEName (type), MMEMode (type));
    -		while (indent-- > 0)
    -		{
    -			putc (' ', stdout);
    -		}
    -		printf ("0x%02X ", mme_codes [index].code);
    -		printf ("\"%s\"\n", mme_codes [index].text);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/mme.h.html b/docbook/mme.h.html deleted file mode 100644 index 88d125ab..00000000 --- a/docbook/mme.h.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - mme.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   mme.h -
    - *
    - *   message header definitions and function declarations;
    - *
    - *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
    - *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Matthieu Poullet <m.poullet@avm.de>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MME_HEADER
    -#define MME_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdint.h>
    -#include <unistd.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../ether/ether.h"
    -#include "../ether/channel.h"
    -#include "../mme/homeplug.h"
    -#include "../mme/qualcomm.h"
    -
    -/*====================================================================*
    - *   manage cross-platform structure packing;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __packed
    -#ifdef __GNUC__
    -#define __packed __attribute__ ((packed))
    -#else
    -#define __packed
    -#endif
    -#endif
    -
    -/*====================================================================*
    - *   Ethernet, HomePlug and Qualcomm Frame headers;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed ethernet_hdr
    -
    -{
    -	uint8_t ODA [ETHER_ADDR_LEN];
    -	uint8_t OSA [ETHER_ADDR_LEN];
    -	uint16_t MTYPE;
    -}
    -
    -ethernet_hdr;
    -typedef struct __packed homeplug_hdr
    -
    -{
    -	uint8_t MMV;
    -	uint16_t MMTYPE;
    -}
    -
    -homeplug_hdr;
    -typedef struct __packed homeplug_fmi
    -
    -{
    -	uint8_t MMV;
    -	uint16_t MMTYPE;
    -	uint8_t FMSN;
    -	uint8_t FMID;
    -}
    -
    -homeplug_fmi;
    -typedef struct __packed qualcomm_hdr
    -
    -{
    -	uint8_t MMV;
    -	uint16_t MMTYPE;
    -	uint8_t OUI [ETHER_ADDR_LEN >> 1];
    -}
    -
    -qualcomm_hdr;
    -typedef struct __packed qualcomm_fmi
    -
    -{
    -	uint8_t MMV;
    -	uint16_t MMTYPE;
    -	uint8_t FMSN;
    -	uint8_t FMID;
    -	uint8_t OUI [ETHER_ADDR_LEN >> 1];
    -}
    -
    -qualcomm_fmi;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   Composite message formats;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed message
    -
    -{
    -	struct ethernet_hdr ethernet;
    -	uint8_t content [ETHERMTU];
    -}
    -
    -MESSAGE;
    -typedef struct __packed homeplug
    -
    -{
    -	struct ethernet_hdr ethernet;
    -	struct homeplug_fmi homeplug;
    -	uint8_t content [ETHERMTU - sizeof (struct homeplug_fmi)];
    -}
    -
    -HOMEPLUG;
    -typedef struct __packed qualcomm
    -
    -{
    -	struct ethernet_hdr ethernet;
    -	struct qualcomm_fmi qualcomm;
    -	uint8_t content [ETHERMTU - sizeof (struct qualcomm_fmi)];
    -}
    -
    -QUALCOMM;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -void MMEPeek (void const * memory, size_t extent, FILE * fp);
    -void ARPCPeek (void const * memory, size_t extent, FILE * fp);
    -void ARPCWrite (signed fd, void const * memory, size_t extent);
    -void ARPCPrint (FILE * fp, void const * memory, size_t extent);
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -char const * MMEName (uint16_t MMTYPE);
    -char const * MMEMode (uint16_t MMTYPE);
    -char const * MMECode (uint16_t MMTYPE, uint8_t MSTATUS);
    -
    -/*====================================================================*
    - *   header encode functions;
    - *--------------------------------------------------------------------*/
    -
    -signed EthernetHeader (void * memory, const uint8_t peer [], const uint8_t host [], uint16_t protocol);
    -signed HomePlugHeader (struct homeplug_hdr *, uint8_t MMV, uint16_t MMTYPE);
    -signed QualcommHeader (struct qualcomm_hdr *, uint8_t MMV, uint16_t MMTYPE);
    -signed HomePlugHeader1 (struct homeplug_fmi *, uint8_t MMV, uint16_t MMTYPE);
    -signed QualcommHeader1 (struct qualcomm_fmi *, uint8_t MMV, uint16_t MMTYPE);
    -
    -/*====================================================================*
    - *   header decode functions;
    - *--------------------------------------------------------------------*/
    -
    -signed UnwantedMessage (void const * memory, size_t extent, uint8_t MMV, uint16_t MMTYPE);
    -signed FirmwareMessage (void const * memory);
    -
    -/*====================================================================*
    - *   intermmediate level Ethernet send/receive functions;
    - *--------------------------------------------------------------------*/
    -
    -ssize_t sendmessage (struct channel const *, struct message *, ssize_t length);
    -ssize_t readmessage (struct channel const *, struct message *, uint8_t MMV, uint16_t MMTYPE);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/modpib.1.html b/docbook/modpib.1.html deleted file mode 100644 index ac9583b7..00000000 --- a/docbook/modpib.1.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - modpib.1 - - - - - - - - - -
    -modpib(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   modpib(1)
    -
    -NAME
    -       modpib - Qualcomm Atheros PIB File Editor
    -
    -SYNOPSIS
    -       modpib [options] filename
    -
    -DESCRIPTION
    -       Change  device  identity  parameters in a PIB file and update the checksum.  Device identity parameters are the MAC, DAK,
    -       NMK and the Manufacturer, Network and User HFID.  Collectively, they establish the device network identity.
    -
    -       This program is the safe way to edit identity parameters since only valid PIB files can be edited and only selected  val‐
    -       ues changed.  In addition, critical cross-parameter updates are automatically applied.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -C mode
    -              Set Central Coordinator Selection mode.  Permitted values for mode are 0=Auto, 1=Never,  2=Always,  3=UserAssigned
    -              and 4=Covert.
    -
    -       -D xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
    -              The  new Device Access Key (DAK).  This key will replace the original DAK.  Keys are 16 hex octet strings.  Octets
    -              may be seperated by optional colons.  The symbol none, key1 or key2 may be specified in  place  of  a  hexadecimal
    -              string, for convenience.  Use program hpavkey to compute the DAK for a specific password, if required.
    -
    -       -L level
    -              Set  security  level.   The  security level is written into the PreferredNID.  Level 0 enables pushbutton pairing.
    -              Level 1 disables it.  The default secutity level is 0.
    -
    -       -M xx:xx:xx:xx:xx:xx
    -              The new Media Access Control (MAC) address.  This  address  will  replace  the  original  address,  if  specified.
    -              Addresses  are  6  hex  octet  strings.   Octets  may be seperated by optional colons.  Qualcomm Atheros powerline
    -              devices derive their MAC address from their PIB and each device on a network  must  have  a  unique  address.   To
    -              facilitate  the  assignement  of  unique  addresses, substituting the word "auto", "next" or "plus" will cause the
    -              original MAC address to be incremented before a new checksum is calculated.  Successive uses of this  option  will
    -              continue to increment the stored address.  You can inspect the stored MAC address with "chkpib -v pibfile".
    -
    -       -N xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
    -              The new Network Membership Key (NMK).  This key will replace the original NMK, create a new PreferredNID and clear
    -              the AVLNMembership bit.  Keys are 16 hex octets.  Optionally, octets may be seperated colons.  The symbol key1  or
    -              key2  can  be specified in place of a hexadecimal string, for convenience.  Use program hpavkey to compute the NMK
    -              from a specific password, if required.
    -
    -       -P filename
    -              The specified file is loaded from disk and written into the prescaler section of the PIB.  This file  must  be  in
    -              the format used by the Qualcomm Atheros Windows Device Manager, which is a two column file, each column consisting
    -              of 8 ASCII alpha-numeric characters.  The first column corresponds to the  array  index  value  (00000000  through
    -              00001155,  decimal),  and  the second column is the value stored at that position in the prescaler array (00000000
    -              through 000000ff, hexadecimal).  The two columns may be separated by any whitespace  characters  when  using  this
    -              tool.  However, for full compatibility with the Windows Device Manager it is advised to use a single space between
    -              the columns.  The '#' character may also be used at the start of a line to denote a comment.
    -
    -       -S string
    -              The new manufacturing string.  The maximum length is 63 characters.
    -
    -       -T string
    -              The new network name string.  The maximum length is 63 character.
    -
    -       -U string
    -              The new username string.  The maximum length is 63 characters.
    -
    -       -q     Enable quiet mode.  This option has no effect at present.
    -
    -       -v     Print PIB identity parameters on stdout after changes have been applied.  This option helps  verify  that  changes
    -              have been applied correctly.  It can also be used, without changes, to merely inspect existing parameters.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Qualcomm Atheros Technical Support so that they  know  exactly  which
    -              version of the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       filename
    -              The  name  of  the PIB file to be modified.  No assumptions are made based on filename and no filename conventions
    -              are enforced.
    -
    -KEYS
    -       Encryption keys are long, tedious to type and prone to error.  For convenience, symbolic names may be used to specify the
    -       key for options -D and -N.  Symbolic name "none" translates to zeros.  Symbolic name "key1" translates to the HomePlug AV
    -       compliant key for pass phrase "HomePlugAV".  Symbolic name "key2" translates to the HomePlug AV compliant  key  for  pass
    -       phrase "HomePlugAV0123".  The actual key that is generated for key1 or key2 will differ depending on context.
    -
    -EXAMPLES
    -       The  following example replaces the MAC address in pib file abc.pib and computes a new checksum.  The input file is over-
    -       written.  A command like this one can be used to establish the start MAC address when downloading a series of PIBs.
    -
    -          # modpib -M 00:b0:52:DA:DA:FF abc.pib
    -
    -       The following example increments the MAC address in pib file abc.pib and computes a new checksum.  The word auto, next or
    -       plus,  in  place of a MAC address, will increment the old address each time the command is executed.  This command can be
    -       used to ensure that unique and consecutive MAC addresses are used each time a PIB is downloaded.
    -
    -          # modpib -M auto abc.pib
    -
    -       The following command updates pib file abc.pib with the DAK and NMK read from the device connected to eth0.   In  similar
    -       fashion, program rkey can be used to compute random key values from a keyfile.
    -
    -          # modpib -D $(int6kid -Di eth0) -N $(rkey secret.key -M) abc.pib
    -
    -       The  following  example  displays  the  current value of keys and strings stored in pib file abc.pib because option -v is
    -       present.  This can be used to verify PIB identity settings before or after an edit.
    -
    -          # modpib -v abc.pib
    -                  PIB 4-4 15560 bytes
    -                  MAC 00:B0:52:00:00:01
    -                  DAK 68:9F:07:4B:8B:02:75:A2:71:0B:0B:57:79:AD:16:30 (HomePlugAV)
    -                  NMK 50:D3:E4:93:3F:85:5B:70:40:78:4D:F8:15:AA:8D:B7 (HomePlugAV)
    -                  NID B0:F2:E6:95:66:6B:03
    -                  NET Qualcomm Atheros Enabled Network
    -                  MFG Qualcomm Atheros HomePlug AV Device
    -                  USR Qualcomm Atheros Enabled Product
    -                  CCo Auto
    -                  MDU N/A
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -SEE ALSO
    -       chkpib(7), chkpib2(7), getpib(7), modpib(1), pib2xml(1), pibcomp(1), pibdump(1), setpib(1), xml2pib(1)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   modpib(1)
    -
    - - - diff --git a/docbook/modpib.c.html b/docbook/modpib.c.html deleted file mode 100644 index b2147e11..00000000 --- a/docbook/modpib.c.html +++ /dev/null @@ -1,649 +0,0 @@ - - - - - - modpib.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   modpib.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <unistd.h>
    -#include <ctype.h>
    -#include <errno.h>
    -#include <sys/stat.h>
    -#include <netinet/in.h>
    -#include <arpa/inet.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../tools/chars.h"
    -#include "../plc/plc.h"
    -#include "../key/HPAVKey.h"
    -#include "../key/keys.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/memincr.c"
    -#include "../tools/synonym.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile.c"
    -#include "../pib/pibfile1.c"
    -#include "../pib/pibfile2.c"
    -#include "../pib/pibpeek1.c"
    -#include "../pib/pibpeek2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/HPAVKeyNID.c"
    -#include "../key/SHA256Reset.c"
    -#include "../key/SHA256Write.c"
    -#include "../key/SHA256Block.c"
    -#include "../key/SHA256Fetch.c"
    -#include "../key/keys.c"
    -#endif
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MEMBERSHIP_OFFSET 0x00001E8C
    -#define MEMBERSHIP_STATUS 0x00000000
    -
    -/*====================================================================*
    - *
    - *   signed pibimage1 (struct _file_ * file, simple_pib *sample_pib, signed level, flag_t flags);
    - *
    - *   modify selected PIB header values and compute a new checksum;
    - *   this function assumes that the file is open and positioned to
    - *   the start of the parameter block;
    - *
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibimage1 (struct _file_ * file, simple_pib * sample_pib, signed level, flag_t flags)
    -
    -{
    -	struct simple_pib simple_pib;
    -	memset (&simple_pib, 0, sizeof (simple_pib));
    -	if (read (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTREAD, file->name);
    -	}
    -	if (_anyset (flags, PIB_MAC))
    -	{
    -		memcpy (simple_pib.MAC, sample_pib->MAC, sizeof (simple_pib.MAC));
    -	}
    -	if (_anyset (flags, PIB_MACINC))
    -	{
    -		memincr (simple_pib.MAC, sizeof (simple_pib.MAC));
    -	}
    -	if (_anyset (flags, PIB_DAK))
    -	{
    -		memcpy (simple_pib.DAK, sample_pib->DAK, sizeof (simple_pib.DAK));
    -	}
    -	if (_anyset (flags, PIB_NMK))
    -	{
    -		memcpy (simple_pib.NMK, sample_pib->NMK, sizeof (simple_pib.NMK));
    -	}
    -	if (_anyset (flags, PIB_NETWORK))
    -	{
    -		memcpy (simple_pib.NET, sample_pib->NET, sizeof (simple_pib.NET));
    -	}
    -	if (_anyset (flags, PIB_MFGSTRING))
    -	{
    -		memcpy (simple_pib.MFG, sample_pib->MFG, sizeof (simple_pib.MFG));
    -	}
    -	if (_anyset (flags, PIB_USER))
    -	{
    -		memcpy (simple_pib.USR, sample_pib->USR, sizeof (simple_pib.USR));
    -	}
    -	if (_anyset (flags, PIB_CCO_MODE))
    -	{
    -		simple_pib.CCoSelection = sample_pib->CCoSelection;
    -	}
    -	if (_anyset (flags, PIB_NMK | PIB_NID))
    -	{
    -
    -#if 0
    -
    -/*
    - *	clear the AVLNMembership bit whenever the NMK or NID change; this is an important
    - *	step because it prevents false network association;
    - */
    -
    -		if (BE16TOH (simple_pib.PIBVERSION) > 0x0200)
    -		{
    -			uint32_t membership = MEMBERSHIP_STATUS;
    -			if (lseek (file->file, MEMBERSHIP_OFFSET, SEEK_SET) != MEMBERSHIP_OFFSET)
    -			{
    -				error (1, errno, FILE_CANTHOME, file->name);
    -			}
    -			if (write (file->file, &membership, sizeof (membership)) != sizeof (membership))
    -			{
    -				error (1, errno, FILE_CANTSAVE, file->name);
    -			}
    -		}
    -
    -#endif
    -
    -		if (_allclr (flags, PIB_NID))
    -		{
    -			level = simple_pib.PreferredNID [HPAVKEY_NID_LEN-1] >> 4;
    -		}
    -		HPAVKeyNID (simple_pib.PreferredNID, simple_pib.NMK, level & 1);
    -	}
    -	if (lseek (file->file, (off_t)(0) - sizeof (simple_pib), SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (write (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTSAVE, file->name);
    -	}
    -	if (lseek (file->file, (off_t)(0) - sizeof (simple_pib), SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	simple_pib.CHECKSUM = fdchecksum32 (file->file, LE16TOH (simple_pib.PIBLENGTH), simple_pib.CHECKSUM);
    -	if (lseek (file->file, (off_t)(0) - LE16TOH (simple_pib.PIBLENGTH), SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (write (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTSAVE, file->name);
    -	}
    -	if (_anyset (flags, PIB_VERBOSE))
    -	{
    -		pibpeek1 (&simple_pib);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed pibimage2 (struct _file_ * file, simple_pib *sample_pib, signed level, flag_t flags);
    - *
    - *   modify selected PIB header values but do not compute a checksum;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibimage2 (struct _file_ * file, simple_pib * sample_pib, signed level, flag_t flags)
    -
    -{
    -	struct simple_pib simple_pib;
    -	memset (&simple_pib, 0, sizeof (simple_pib));
    -	if (read (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTREAD, file->name);
    -	}
    -	if (_anyset (flags, PIB_MAC))
    -	{
    -		memcpy (simple_pib.MAC, sample_pib->MAC, sizeof (simple_pib.MAC));
    -	}
    -	if (_anyset (flags, PIB_MACINC))
    -	{
    -		memincr (simple_pib.MAC, sizeof (simple_pib.MAC));
    -	}
    -	if (_anyset (flags, PIB_DAK))
    -	{
    -		memcpy (simple_pib.DAK, sample_pib->DAK, sizeof (simple_pib.DAK));
    -	}
    -	if (_anyset (flags, PIB_NMK))
    -	{
    -		memcpy (simple_pib.NMK, sample_pib->NMK, sizeof (simple_pib.NMK));
    -	}
    -	if (_anyset (flags, PIB_NETWORK))
    -	{
    -		memcpy (simple_pib.NET, sample_pib->NET, sizeof (simple_pib.NET));
    -	}
    -	if (_anyset (flags, PIB_MFGSTRING))
    -	{
    -		memcpy (simple_pib.MFG, sample_pib->MFG, sizeof (simple_pib.MFG));
    -	}
    -	if (_anyset (flags, PIB_USER))
    -	{
    -		memcpy (simple_pib.USR, sample_pib->USR, sizeof (simple_pib.USR));
    -	}
    -	if (_anyset (flags, PIB_CCO_MODE))
    -	{
    -		simple_pib.CCoSelection = sample_pib->CCoSelection;
    -	}
    -	if (_anyset (flags, PIB_NMK | PIB_NID))
    -	{
    -
    -#if 0
    -
    -/*
    - *	clear the AVLNMembership bit whenever the NMK or NID change; this is an important
    - *	step because it prevents false network association;
    - */
    -
    -		if (BE16TOH (simple_pib.PIBVERSION) > 0x0200)
    -		{
    -			uint32_t membership = MEMBERSHIP_STATUS;
    -			if (lseek (file->file, MEMBERSHIP_OFFSET, SEEK_SET) != MEMBERSHIP_OFFSET)
    -			{
    -				error (1, errno, FILE_CANTHOME, file->name);
    -			}
    -			if (write (file->file, &membership, sizeof (membership)) != sizeof (membership))
    -			{
    -				error (1, errno, FILE_CANTSAVE, file->name);
    -			}
    -		}
    -
    -#endif
    -
    -		if (_allclr (flags, PIB_NID))
    -		{
    -			level = simple_pib.PreferredNID [HPAVKEY_NID_LEN-1] >> 4;
    -		}
    -		HPAVKeyNID (simple_pib.PreferredNID, simple_pib.NMK, level & 1);
    -	}
    -	if (lseek (file->file, (off_t)(0) - sizeof (simple_pib), SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (write (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTSAVE, file->name);
    -	}
    -	if (lseek (file->file, (off_t)(0) - sizeof (simple_pib), SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (_anyset (flags, PIB_VERBOSE))
    -	{
    -		pibpeek2 (&simple_pib);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed pibchain2 (struct _file_ * file, simple_pib * sample_pib, signed level, flag_t flags);
    - *
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibchain2 (struct _file_ * file, simple_pib * sample_pib, signed level, flag_t flags)
    -
    -{
    -	unsigned module = 0;
    -	struct nvm_header2 nvm_header;
    -	uint32_t prev = ~0;
    -	uint32_t next = 0;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, NVM_IMG_CHECKSUM, file->name, module);
    -	}
    -	do
    -	{
    -		if (read (file->file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, file->name, module);
    -		}
    -		if (LE16TOH (nvm_header.MajorVersion) != 1)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, file->name, module);
    -		}
    -		if (LE16TOH (nvm_header.MinorVersion) != 1)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, file->name, module);
    -		}
    -		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -		{
    -			error (1, errno, NVM_HDR_CHECKSUM, file->name, module);
    -		}
    -		if (LE32TOH (nvm_header.PrevHeader) != prev)
    -		{
    -			error (1, errno, NVM_HDR_LINK, file->name, module);
    -		}
    -		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_PIB)
    -		{
    -			pibimage2 (file, sample_pib, level, flags);
    -			nvm_header.ImageChecksum = fdchecksum32 (file->file, LE32TOH (nvm_header.ImageLength), 0);
    -			if (lseek (file->file, (off_t)(0) - LE32TOH (nvm_header.ImageLength), SEEK_CUR) == -1)
    -			{
    -				error (1, errno, FILE_CANTHOME, file->name);
    -			}
    -			nvm_header.HeaderChecksum = checksum32 (&nvm_header, sizeof (nvm_header), nvm_header.HeaderChecksum);
    -			if (lseek (file->file, (off_t)(0) - sizeof (nvm_header), SEEK_CUR) == -1)
    -			{
    -				error (1, errno, FILE_CANTHOME, file->name);
    -			}
    -			if (write (file->file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -			{
    -				error (1, errno, FILE_CANTSAVE, file->name);
    -			}
    -			if (lseek (file->file, (off_t)(0) - sizeof (nvm_header), SEEK_CUR) == -1)
    -			{
    -				error (1, errno, FILE_CANTHOME, file->name);
    -			}
    -			break;
    -		}
    -		if (fdchecksum32 (file->file, LE32TOH (nvm_header.ImageLength), nvm_header.ImageChecksum))
    -		{
    -			error (1, errno, NVM_IMG_CHECKSUM, file->name, module);
    -		}
    -		prev = next;
    -		next = LE32TOH (nvm_header.NextHeader);
    -		module++;
    -	}
    -	while (~nvm_header.NextHeader);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed function (char const * filename, struct simple_pib * simple_pib, unsigned level, flag_t flags);
    - *
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed function (char const * filename, struct simple_pib * sample_pib, unsigned level, flag_t flags)
    -
    -{
    -	uint32_t version;
    -	signed status;
    -	struct _file_ file;
    -	file.name = filename;
    -	if ((file.file = open (file.name, O_BINARY|O_RDWR, FILE_FILEMODE)) == -1)
    -	{
    -		if (_allclr (flags, PIB_SILENCE))
    -		{
    -			error (0, errno, FILE_CANTOPEN, file.name);
    -		}
    -		return (-1);
    -	}
    -	if (read (file.file, &version, sizeof (version)) != sizeof (version))
    -	{
    -		if (_allclr (flags, PIB_SILENCE))
    -		{
    -			error (0, errno, FILE_CANTREAD, file.name);
    -		}
    -		return (-1);
    -	}
    -	if (lseek (file.file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file.name);
    -	}
    -	if (LE32TOH (version) == 0x00010001)
    -	{
    -		status = pibchain2 (&file, sample_pib, level, flags);
    -	}
    -	else
    -	{
    -		status = pibimage1 (&file, sample_pib, level, flags);
    -	}
    -	close (file.file);
    -	return (status);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv [])
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct _term_ const daks [];
    -	extern struct _term_ const nmks [];
    -	static char const * optv [] =
    -	{
    -		"C:D:L:M:N:S:T:U:v",
    -		"file [file] [...]",
    -		"modify selected PIB parameters and update checksum",
    -		"C n\tCCo Selection is n",
    -		"D x\tDAK as xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx",
    -		"L n\tsecurity level is n",
    -		"M x\tMAC as xx:xx:xx:xx:xx:xx",
    -		"N x\tNMK as xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx",
    -		"S s\tMFG string is s",
    -		"T s\tNET string is s",
    -		"U s\tUSR string is s",
    -		"v\tverbose messages",
    -		(char const *) (0)
    -	};
    -	struct simple_pib sample_pib;
    -	signed level = 0;
    -	signed state = 0;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	memset (&sample_pib, 0, sizeof (sample_pib));
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		char const * sp;
    -		switch ((char) (c))
    -		{
    -		case 'C':
    -			_setbits (flags, PIB_CCO_MODE);
    -			sample_pib.CCoSelection = (uint8_t)(uintspec (optarg, 0, 4));
    -			break;
    -		case 'D':
    -			if (!hexencode (sample_pib.DAK, sizeof (sample_pib.DAK), synonym (optarg, daks, SIZEOF (daks))))
    -			{
    -				error (1, errno, PLC_BAD_DAK, optarg);
    -			}
    -			_setbits (flags, PIB_DAK);
    -			break;
    -		case 'L':
    -			level = (uint8_t)(uintspec (optarg, 0, 1));
    -			_setbits (flags, PIB_NID);
    -			break;
    -		case 'M':
    -			if (!strcmp (optarg, "auto"))
    -			{
    -				_setbits (flags, PIB_MACINC);
    -				break;
    -			}
    -			if (!strcmp (optarg, "next"))
    -			{
    -				_setbits (flags, PIB_MACINC);
    -				break;
    -			}
    -			if (!strcmp (optarg, "plus"))
    -			{
    -				_setbits (flags, PIB_MACINC);
    -				break;
    -			}
    -			if (!hexencode (sample_pib.MAC, sizeof (sample_pib.MAC), optarg))
    -			{
    -				error (1, errno, PLC_BAD_MAC, optarg);
    -			}
    -			_setbits (flags, PIB_MAC);
    -			break;
    -		case 'N':
    -			if (!hexencode (sample_pib.NMK, sizeof (sample_pib.NMK), synonym (optarg, nmks, SIZEOF (nmks))))
    -			{
    -				error (1, errno, PLC_BAD_NMK, optarg);
    -			}
    -			_setbits (flags, PIB_NMK);
    -			break;
    -		case 'S':
    -			for (sp = optarg; isprint (*sp); ++sp);
    -			if (*sp)
    -			{
    -				error (1, EINVAL, "NMK contains illegal characters");
    -			}
    -			if ((sp - optarg) > (signed)(sizeof (sample_pib.MFG) - 1))
    -			{
    -				error (1, 0, "Manufacturing string is at most %u chars", (unsigned)(sizeof (sample_pib.MFG) - 1));
    -			}
    -			memcpy (sample_pib.MFG, optarg, strlen (optarg));
    -			_setbits (flags, PIB_MFGSTRING);
    -			break;
    -		case 'T':
    -			for (sp = optarg; isprint (*sp); ++sp);
    -			if (*sp)
    -			{
    -				error (1, EINVAL, "NMK contains illegal characters");
    -			}
    -			if ((sp - optarg) > (signed)(sizeof (sample_pib.NET) - 1))
    -			{
    -				error (1, 0, "NET string is at most %u chars", (unsigned)(sizeof (sample_pib.NET) - 1));
    -			}
    -			memcpy (sample_pib.NET, optarg, strlen (optarg));
    -			_setbits (flags, PIB_NETWORK);
    -			break;
    -		case 'U':
    -			for (sp = optarg; isprint (*sp); ++sp);
    -			if (*sp)
    -			{
    -				error (1, EINVAL, "NMK contains illegal characters");
    -			}
    -			if ((sp - optarg) > (signed)(sizeof (sample_pib.USR) - 1))
    -			{
    -				error (1, 0, "USR string is at most %u chars", (unsigned)(sizeof (sample_pib.USR) - 1));
    -			}
    -			memcpy (sample_pib.USR, optarg, strlen (optarg));
    -			_setbits (flags, PIB_USER);
    -			break;
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argc) && (* argv))
    -	{
    -		if (function (* argv, &sample_pib, level, flags))
    -		{
    -			state = 1;
    -		}
    -		argc--;
    -		argv++;
    -	}
    -	exit (state);
    -}
    -
    -
    -
    - - - diff --git a/docbook/namedb.h.html b/docbook/namedb.h.html deleted file mode 100644 index c89a4503..00000000 --- a/docbook/namedb.h.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - namedb.h - - - - - - - - - -
    -/*
    - * Copyright (c) 1994, 1996
    - *	The Regents of the University of California.  All rights reserved.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - * 1. Redistributions of source code must retain the above copyright
    - *    notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - *    notice, this list of conditions and the following disclaimer in the
    - *    documentation and/or other materials provided with the distribution.
    - * 3. All advertising materials mentioning features or use of this software
    - *    must display the following acknowledgement:
    - *	This product includes software developed by the Computer Systems
    - *	Engineering Group at Lawrence Berkeley Laboratory.
    - * 4. Neither the name of the University nor of the Laboratory may be used
    - *    to endorse or promote products derived from this software without
    - *    specific prior written permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    - * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    - * SUCH DAMAGE.
    - *
    - * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL)
    - */
    -
    -#ifndef lib_pcap_namedb_h
    -#define lib_pcap_namedb_h
    -
    -#ifdef __cplusplus
    -extern "C" {
    -#endif
    -
    -/*
    - * As returned by the pcap_next_etherent()
    - * XXX this stuff doesn't belong in this interface, but this
    - * library already must do name to address translation, so
    - * on systems that don't have support for /etc/ethers, we
    - * export these hooks since they'll
    - */
    -struct pcap_etherent {
    -	u_char addr[6];
    -	char name[122];
    -};
    -#ifndef PCAP_ETHERS_FILE
    -#define PCAP_ETHERS_FILE "/etc/ethers"
    -#endif
    -struct	pcap_etherent *pcap_next_etherent(FILE *);
    -u_char *pcap_ether_hostton(const char*);
    -u_char *pcap_ether_aton(const char *);
    -
    -bpf_u_int32 **pcap_nametoaddr(const char *);
    -#ifdef INET6
    -struct addrinfo *pcap_nametoaddrinfo(const char *);
    -#endif
    -bpf_u_int32 pcap_nametonetaddr(const char *);
    -
    -int	pcap_nametoport(const char *, int *, int *);
    -int	pcap_nametoportrange(const char *, int *, int *, int *);
    -int	pcap_nametoproto(const char *);
    -int	pcap_nametoeproto(const char *);
    -int	pcap_nametollc(const char *);
    -/*
    - * If a protocol is unknown, PROTO_UNDEF is returned.
    - * Also, pcap_nametoport() returns the protocol along with the port number.
    - * If there are ambiguous entried in /etc/services (i.e. domain
    - * can be either tcp or udp) PROTO_UNDEF is returned.
    - */
    -#define PROTO_UNDEF		-1
    -
    -/* XXX move these to pcap-int.h? */
    -int __pcap_atodn(const char *, bpf_u_int32 *);
    -int __pcap_atoin(const char *, bpf_u_int32 *);
    -u_short	__pcap_nametodnaddr(const char *);
    -
    -#ifdef __cplusplus
    -}
    -#endif
    -
    -#endif
    -
    - - - diff --git a/docbook/nics.1.html b/docbook/nics.1.html deleted file mode 100644 index 81aa080c..00000000 --- a/docbook/nics.1.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - nics.1 - - - - - - - - - -
    -nics(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     nics(1)
    -
    -NAME
    -       nics - Host Network Interface Enumerator
    -
    -SYNOPSIS
    -       nics
    -
    -DESCRIPTION
    -       Search  host  for  Ethernet  interfaces and display the interface index, hardware address, IP address, interface name and
    -       interface description on stdout.  This provides a simple, consistent,  cross-platform  format  for  presenting  interface
    -       information to scripts and user applications.
    -
    -COMMENTS
    -       This  program  illustrates  use  of basic Atheros Ethernet interface C functions.  See program ifs for an alternative C++
    -       implementation.
    -
    -OPTIONS
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Intellon Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       None.
    -
    -EXAMPLES
    -       The following example searches a Linux host and displays information about available interfaces.
    -
    -          # nics
    -          2 00:50:04:A5:D8:98 000.000.000.000 eth4 eth4
    -          3 00:0F:EA:4B:98:CB 192.168.172.239 eth3 eth3
    -
    -       The following example searches a MacOSX host and displays information about available interfaces.  Observe that interface
    -       names are varied.
    -
    -          # nics
    -          4 00:26:BB:52:DD:A8 192.168.172.149 en0 en0
    -          6 04:1E:64:F0:FB:EC 000.000.000.000 en1 en1
    -
    -SEE ALSO
    -       amp(1), ifs(1), nics(1), pcapdevs(1), plcnets(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                     nics(1)
    -
    - - - diff --git a/docbook/nics.c.html b/docbook/nics.c.html deleted file mode 100644 index 0f0d1219..00000000 --- a/docbook/nics.c.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - nics.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   nics.c - network interface enumerator;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <memory.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/error.h"
    -#include "../tools/memory.h"
    -#include "../ether/ether.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/decdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/decstring.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/hostnics.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void enumerate ();
    - *
    - *   enumerate host interface details on stdout;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void enumerate ()
    -
    -{
    -	struct nic nics [16];
    -	struct nic * nic;
    -	unsigned count = hostnics (nics, sizeof (nics) / sizeof (struct nic));
    -	for (nic = nics; count--; nic++)
    -	{
    -		byte memory [ETHER_ADDR_LEN];
    -		char string [ETHER_ADDR_LEN * 3];
    -		memset (memory, 0x00, sizeof (memory));
    -		if (!memcmp (memory, nic->ethernet, sizeof (memory)))
    -		{
    -			continue;
    -		}
    -		memset (memory, 0xFF, sizeof (memory));
    -		if (!memcmp (memory, nic->ethernet, sizeof (memory)))
    -		{
    -			continue;
    -		}
    -		printf (" %d", nic->ifindex);
    -		printf (" %s", hexstring (string, sizeof (string), nic->ethernet, sizeof (nic->ethernet)));
    -		printf (" %s", decstring (string, sizeof (string), nic->internet, sizeof (nic->internet)));
    -		printf (" %s", nic->ifname);
    -		printf (" %s", nic->ifdesc);
    -		printf ("\n");
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"",
    -		PUTOPTV_S_DIVINE,
    -		"Atheros Ethernet Interface Enumerator",
    -		(char const *) (0)
    -	};
    -	signed c;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ECANCELED, ERROR_TOOMANY);
    -	}
    -	enumerate ();
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/node.h.html b/docbook/node.h.html deleted file mode 100644 index 22c73076..00000000 --- a/docbook/node.h.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - node.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   node.h - document node definitions and declarations;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NODE_HEADER
    -#define NODE_HEADER
    -
    -/*====================================================================*
    - *   system headers;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   custom headers;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define ISO_CHARSET "iso-8859-1"
    -#define ISO_CONTENT "text/html"
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define W3C_STD "-//W3C//DTD XHTML 1.0 Strict//EN"
    -#define W3C_DTD "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define XML_VERSION "1.0"
    -#define XML_NAMESPACE "http://www.w3.org/2001/XMLSchema-instance"
    -#define XML_CHARSET ISO_CHARSET
    -#define XML_LANGUAGE "en-us"
    -#define XML_SCHEMA "http://www.w3.org/2001/XMLSchema"
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define NODE_ELEM '<'
    -#define NODE_SGML '!'
    -#define NODE_INST '?'
    -#define NODE_ATTR ' '
    -#define NODE_VALU '='
    -#define NODE_ETAG '/'
    -#define NODE_DATA '>'
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define DATA_SCHEMA "piboffset.xsd"
    -#define DATA_NAME "name"
    -#define DATA_TEXT "text"
    -#define DATA_OBJECT "pib"
    -#define DATA_MEMBER "object"
    -#define DATA_OFFSET "offset"
    -#define DATA_LENGTH "length"
    -#define DATA_STRUCT "array"
    -#define DATA_STRING "dataString"
    -#define DATA_MEMORY "dataHex"
    -#define DATA_HUGE "dataHuge"
    -#define DATA_LONG "dataLong"
    -#define DATA_WORD "dataWord"
    -#define DATA_BYTE "dataByte"
    -
    -/*====================================================================*
    - *   variables;
    - *--------------------------------------------------------------------*/
    -
    -typedef struct node
    -
    -{
    -	struct node * above;
    -	struct node * prior;
    -	struct node * after;
    -	struct node * below;
    -	unsigned line;
    -	unsigned type;
    -	char * text;
    -}
    -
    -NODE;
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -char const * xmlselect (NODE const *, char const * element, char const * attribute);
    -signed xmlread (NODE *, char const * filename);
    -signed xmlscan (NODE *);
    -signed xmledit (NODE const *, void * memory, size_t extent);
    -NODE * xmlopen (char const * filename);
    -NODE * xmlnode (NODE *);
    -NODE const * xmlelement (NODE const *, char const * name);
    -NODE const * xmlattribute (NODE const *, char const * name);
    -NODE const * xmlvalue (NODE const *);
    -NODE const * xmldata (NODE const *);
    -void xmlschema ();
    -void xmltree (NODE const *);
    -void xmlfree (NODE *);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/number.h.html b/docbook/number.h.html deleted file mode 100644 index 8a4f36cc..00000000 --- a/docbook/number.h.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - number.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   number.h - numeric conversion definitions and declarations;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NUMBER_HEADER
    -#define NUMBER_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdint.h>
    -#include <stddef.h>
    -
    -/*====================================================================*
    - *   numeric converson sizes and limits;
    - *--------------------------------------------------------------------*/
    -
    -#define RADIX_BIN 2
    -#define RADIX_OCT 8
    -#define RADIX_DEC 10
    -#define RADIX_HEX 16
    -
    -#define RADIX_MIN 2
    -#define RADIX_MAX 36
    -
    -#define BIN_DIGITS 8
    -#define DEC_DIGITS 3
    -#define OCT_DIGITS 3
    -#define HEX_DIGITS 2
    -
    -#define IPv4_SIZE 4
    -#define IPv6_SIZE 16
    -
    -/*====================================================================*
    - *   numeric conversion strings;
    - *--------------------------------------------------------------------*/
    -
    -#define DIGITS_BIN "01"
    -#define DIGITS_OCT "01234567"
    -#define DIGITS_DEC "0123456789"
    -#define DIGITS_HEX "0123456789ABCDEF"
    -#define DIGITS_ALL "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    -
    -/*====================================================================*
    - *   numeric string extenders;
    - *--------------------------------------------------------------------*/
    -
    -#define BIN_EXTENDER '-'
    -#define DEC_EXTENDER '.'
    -#define HEX_EXTENDER ':'
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define isodd(n)  (((n)&(1)) != 0)
    -#define iseven(n) (((n)&(1)) == 0)
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -uint64_t QCASRand (uint32_t seed);
    -uint32_t QCARand ();
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -uint64_t basespec (char const * string, unsigned base, unsigned size);
    -uint64_t uintspec (char const * string, uint64_t minimum, uint64_t maximum);
    -uint64_t tonumber (char const * string, uint64_t minimum, uint64_t maximum, uint64_t nominal);
    -signed sintspec (char const *string, signed number);
    -unsigned totruth (char const *string, signed fail);
    -unsigned todigit (unsigned c);
    -
    -/*====================================================================*
    - *   end definitions;
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvm.c.html b/docbook/nvm.c.html deleted file mode 100644 index f60e8fac..00000000 --- a/docbook/nvm.c.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - nvm.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   nvm.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVM_SOURCE
    -#define NVM_SOURCE
    -
    -#include "../nvm/nvm.h"
    -
    -char const * nvm_platforms [NVM_PLATFORMS] =
    -
    -{
    -	"INT6000",
    -	"INT6300",
    -	"INT6400",
    -	"AR7400",
    -	"AR7420"
    -};
    -
    -char const * nvm_imagetypes [NVM_IMAGETYPES] =
    -
    -{
    -	"Generic Image",
    -	"Synopsis Configuration",
    -	"Denali Configuration",
    -	"Denali Applet",
    -	"Runtime Firmware",
    -	"OAS Client",
    -	"Custom Image",
    -	"Memory Control Applet",
    -	"Power Management Applet",
    -	"OAS Client IP Stack",
    -	"OAS Client TR069",
    -	"SoftLoader",
    -	"Flash Layout",
    -	"Unknown13",
    -	"Chain Manifest",
    -	"Runtime Parameters",
    -	"Custom Module In Scratch",
    -	"Custom Module Update Applet"
    -};
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvm.h.html b/docbook/nvm.h.html deleted file mode 100644 index a82b9515..00000000 --- a/docbook/nvm.h.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - nvm.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   nvm.h - nvm file format definitions and declarations;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVM_HEADER
    -#define NVM_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -
    -/*====================================================================*
    - *   nvm program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_IMAGETYPES 18
    -#define NVM_PLATFORMS 5
    -
    -/*====================================================================*
    - *   nvm program flags;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_SILENCE     (1 << 0)
    -#define NVM_VERBOSE     (1 << 1)
    -#define NVM_MANIFEST    (1 << 2)
    -#define NVM_FIRMWARE    (1 << 3)
    -#define NVM_IDENTITY    (1 << 4)
    -#define NVM_SDRAM       (1 << 5)
    -
    -/*====================================================================*
    - *   nvm header execute masks;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_IGNORE_MASK_INT6000         (1 << 0)
    -#define NVM_IGNORE_MASK_INT6300         (1 << 1)
    -#define NVM_IGNORE_MASK_INT6400         (1 << 2)
    -#define NVM_IGNORE_MASK_AR7400          (1 << 4)
    -#define NVM_IGNORE_MASK_QCA7420         (1 << 8)
    -
    -/*====================================================================*
    - *   image chain types;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_CHAIN_SOFTLOADER            0
    -#define NVM_CHAIN_FIRMWARE              1
    -#define NVM_CHAIN_PIB                   2
    -#define NVM_CHAIN_CUSTOM_MODULE         3
    -#define NVM_CHAIN_MODULE_OP_SESSION     4
    -
    -/*====================================================================*
    - *   nvm build types;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_BUILD_NIGHTLY               0
    -#define NVM_BUILD_RELEASE               1
    -#define NVM_BUILD_CUSTOM                2
    -
    -/*====================================================================*
    - *   nvm image types;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_IMAGE_GENERIC               0x0000
    -#define NVM_IMAGE_CONFIG_SYNOPSIS       0x0001
    -#define NVM_IMAGE_CONFIG_DENALI         0x0002
    -#define NVM_IMAGE_APPLET_DENALI         0x0003
    -#define NVM_IMAGE_FIRMWARE              0x0004
    -#define NVM_IMAGE_OASCLIENT             0x0005
    -#define NVM_IMAGE_CUSTOM                0x0006
    -#define NVM_IMAGE_MEMCTL                0x0007
    -#define NVM_IMAGE_ADVPWRMGMT            0x0008
    -#define NVM_IMAGE_OAS_CLIENT_IP_STK     0x0009
    -#define NVM_IMAGE_OAS_CLIENT_TR069      0x000A
    -#define NVM_IMAGE_NVM_SOFTLOADER        0x000B
    -#define NVM_IMAGE_FLASH_LAYOUT          0x000C
    -#define NVM_IMAGE_MANIFEST              0x000E
    -#define NVM_IMAGE_PIB                   0x000F
    -
    -/*====================================================================*
    - *   manifest field types;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_FIELD_SIGNATURE             0
    -#define NVM_FIELD_HARDWARE_COMPAT       1
    -#define NVM_FIELD_CHAIN_MAJOR_VERSION   2
    -#define NVM_FIELD_CHAIN_MINOR_VERSION   3
    -#define NVM_FIELD_CHAIN_TYPE            4
    -#define NVM_FIELD_BUILD_MAJOR_VERSION   5
    -#define NVM_FIELD_BUILD_MINOR_VERSION   6
    -#define NVM_FIELD_BUILD_TYPE            7
    -#define NVM_FIELD_MANIFEST_VERSION      8
    -#define NVM_FIELD_BUILD_NUMBER          9
    -#define NVM_FIELD_BUILD_DATE            10
    -#define NVM_FIELD_BUILD_TIME            11
    -#define NVM_FIELD_DEVICE_TYPE           12
    -#define NVM_FIELD_BUILD_HOSTNAME        13
    -#define NVM_FIELD_BUILD_USERNAME        14
    -#define NVM_FIELD_BUILD_DESCRIPTION     15
    -#define NVM_FIELD_BUILD_VERSION_STRING  16
    -#define NVM_FIELD_BUILD_SUSTAINING_RELEASE 17
    -#define NVM_FIELD_BUILD_MAJOR_SUBVERSION 18
    -#define NVM_FIELD_GENERIC_ID0           19
    -#define NVM_FIELD_GENERIC_ID1           20
    -#define NVM_FIELD_SL_MAJOR_VERSION      21
    -#define NVM_FIELD_SL_MINOR_VERSION      22
    -#define NVM_FIELD_FREE_SPACE            23
    -
    -/*====================================================================*
    - *   toolkit nvm error messages;
    - *--------------------------------------------------------------------*/
    -
    -#define NVM_HDR_VERSION "%s found bad NVM header version in %s module %d", __func__
    -#define NVM_HDR_CHECKSUM "%s found bad NVM header checksum in %s module %d", __func__
    -#define NVM_HDR_LINK "%s found bad NVM header link in %s module %d", __func__
    -#define NVM_IMG_CHECKSUM "%s found bad image checksum in %s module %d", __func__
    -#define NVM_HDR_CANTREAD "%s can't read image header in %s module %d", __func__
    -#define NVM_HDR_CANTSAVE "%s can't save image header in %s module %d", __func__
    -#define NVM_IMG_CANTREAD "%s can't read image in %s module %d", __func__
    -#define NVM_IMG_CANTSAVE "%s can't save image in %s module %d", __func__
    -#define NVM_IMG_RUN "%s applet %d is still running"
    -
    -/*====================================================================*
    - *   old nvm image header (44 bytes);
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed nvm_header1
    -
    -{
    -	uint32_t HEADERVERSION;
    -	uint32_t IMAGEROMADDR;
    -	uint32_t IMAGEADDRESS;
    -	uint32_t IMAGELENGTH;
    -	uint32_t IMAGECHECKSUM;
    -	uint32_t ENTRYPOINT;
    -	uint8_t HEADERMINORVERSION;
    -	uint8_t IMAGETYPE;
    -	uint16_t IGNOREMASK;
    -	uint32_t MODULEID;
    -	uint32_t MODULESUBID;
    -	uint32_t NEXTHEADER;
    -	uint32_t HEADERCHECKSUM;
    -}
    -
    -nvm_header1;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   new nvm image header (96 bytes);
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed nvm_header2
    -
    -{
    -	uint16_t MajorVersion;
    -	uint16_t MinorVersion;
    -	uint32_t ExecuteMask;
    -	uint32_t ImageNvmAddress;
    -	uint32_t ImageAddress;
    -	uint32_t ImageLength;
    -	uint32_t ImageChecksum;
    -	uint32_t EntryPoint;
    -	uint32_t NextHeader;
    -	uint32_t PrevHeader;
    -	uint32_t ImageType;
    -	uint16_t ModuleID;
    -	uint16_t ModuleSubID;
    -	uint16_t AppletEntryVersion;
    -	uint16_t Reserved0;
    -	uint32_t Reserved1;
    -	uint32_t Reserved2;
    -	uint32_t Reserved3;
    -	uint32_t Reserved4;
    -	uint32_t Reserved5;
    -	uint32_t Reserved6;
    -	uint32_t Reserved7;
    -	uint32_t Reserved8;
    -	uint32_t Reserved9;
    -	uint32_t Reserved10;
    -	uint32_t Reserved11;
    -	uint32_t HeaderChecksum;
    -}
    -
    -nvm_header2;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   nvm functions;
    - *--------------------------------------------------------------------*/
    -
    -signed manifest (void const * memory, size_t extent);
    -void * manifetch (void const * memory, size_t extent, uint32_t type);
    -signed nvmfile (struct _file_ const *);
    -signed nvmfile1 (struct _file_ const *);
    -signed nvmfile2 (struct _file_ const *);
    -signed fdmanifest (signed fd, char const * filename, struct nvm_header2 *, unsigned module);
    -signed nvmseek1 (signed fd, char const * filename, struct nvm_header1 *, uint32_t imagetype);
    -signed nvmseek2 (signed fd, char const * filename, struct nvm_header2 *, uint32_t imagetype);
    -void nvmpeek (void const *);
    -void nvmpeek1 (void const *);
    -void nvmpeek2 (void const *);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmfile.c.html b/docbook/nvmfile.c.html deleted file mode 100644 index c057f702..00000000 --- a/docbook/nvmfile.c.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - nvmfile.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed nvmfile (struct _file_ const * file);
    - *
    - *   nvm.h
    - *
    - *   open an NVM file and validate it by walking the header and image
    - *   chain and validating all checksums; rewind valid files; return a
    - *   file descriptor on success or terminate the program on error;
    - *
    - *   the checksum of the entire header, including header checksum, is
    - *   always 0 for valid headers; similarly, the checksum of the image
    - *   and image checksum is always 0 for valid images;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMFILE_SOURCE
    -#define NVMFILE_SOURCE
    -
    -#include "../tools/endian.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../nvm/nvm.h"
    -
    -signed nvmfile (struct _file_ const * file)
    -
    -{
    -	uint32_t version;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (read (file->file, &version, sizeof (version)) != sizeof (version))
    -	{
    -		error (1, errno, FILE_CANTREAD, file->name);
    -	}
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (LE32TOH (version) == 0x60000000)
    -	{
    -		return (nvmfile1 (file));
    -	}
    -	return (nvmfile2 (file));
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmfile1.c.html b/docbook/nvmfile1.c.html deleted file mode 100644 index 55e3b0da..00000000 --- a/docbook/nvmfile1.c.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - nvmfile1.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed nvmfile1 (struct _file_ const * file);
    - *
    - *   validate a Thunderbolt/Lightning firmware image file;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMFILE1_SOURCE
    -#define NVMFILE1_SOURCE
    -
    -#include <memory.h>
    -#include <errno.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../nvm/nvm.h"
    -
    -signed nvmfile1 (struct _file_ const * file)
    -
    -{
    -	unsigned module = 0;
    -	struct nvm_header1 nvm_header;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	do
    -	{
    -		if (read (file->file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, file->name, module);
    -		}
    -		if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, file->name, module);
    -		}
    -		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -		{
    -			error (1, errno, NVM_HDR_CHECKSUM, file->name, module);
    -		}
    -		if (fdchecksum32 (file->file, LE32TOH (nvm_header.IMAGELENGTH), nvm_header.IMAGECHECKSUM))
    -		{
    -			error (1, errno, NVM_IMG_CHECKSUM, file->name, module);
    -		}
    -		module++;
    -	}
    -	while (nvm_header.NEXTHEADER);
    -	if (lseek (file->file, 0, SEEK_CUR) != lseek (file->file, 0, SEEK_END))
    -	{
    -		error (1, errno, NVM_HDR_LINK, file->name, module);
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmfile2.c.html b/docbook/nvmfile2.c.html deleted file mode 100644 index cf8c85f8..00000000 --- a/docbook/nvmfile2.c.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - nvmfile2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed nvmfile2 (struct _file_ const * file);
    - *
    - *   validate a Panther/Lynx firmware module file;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMFILE2_SOURCE
    -#define NVMFILE2_SOURCE
    -
    -#include <memory.h>
    -#include <errno.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../nvm/nvm.h"
    -
    -signed nvmfile2 (struct _file_ const * file)
    -
    -{
    -	unsigned module = 0;
    -	struct nvm_header2 nvm_header;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	do
    -	{
    -		if (read (file->file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, file->name, module);
    -		}
    -		if (LE16TOH (nvm_header.MajorVersion) != 1)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, file->name, module);
    -		}
    -		if (LE16TOH (nvm_header.MinorVersion) != 1)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, file->name, module);
    -		}
    -		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -		{
    -			error (1, errno, NVM_HDR_CHECKSUM, file->name, module);
    -		}
    -		if (fdchecksum32 (file->file, LE32TOH (nvm_header.ImageLength), nvm_header.ImageChecksum))
    -		{
    -			error (1, errno, NVM_IMG_CHECKSUM, file->name, module);
    -		}
    -		module++;
    -	}
    -	while (~nvm_header.NextHeader);
    -	if (lseek (file->file, 0, SEEK_CUR) != lseek (file->file, 0, SEEK_END))
    -	{
    -		error (1, errno, NVM_HDR_LINK, file->name, module);
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmlock2.c.html b/docbook/nvmlock2.c.html deleted file mode 100644 index a8b75f8f..00000000 --- a/docbook/nvmlock2.c.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - nvmlock2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void nvmlock2 (struct nvm_header2 * header);
    - *
    - *   example function to update an NVM image header after the image
    - *   had been modified; this assumes that the updated image follows
    - *   the header in memory.
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMLOCK2_SOURCE
    -#define NVMLOCK2_SOURCE
    -
    -#include "../tools/memory.h"
    -#include "../nvm/nvm.h"
    -
    -void nvmlock2 (struct nvm_header2 * header)
    -
    -{
    -	header->ImageChecksum = checksum32 ((char *)(header) + sizeof (* header), LE32TOH (header->ImageLength), 0);
    -	header->HeaderChecksum = checksum32 (header, sizeof (* header), header->HeaderChecksum);
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmmerge.1.html b/docbook/nvmmerge.1.html deleted file mode 100644 index f6cb5f20..00000000 --- a/docbook/nvmmerge.1.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - nvmmerge.1 - - - - - - - - - -
    -nvmmerge(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 nvmmerge(1)
    -
    -NAME
    -       nvmmerge - Qualcomm Atheros PLC Firmware Image File Splicer
    -
    -SYNOPSIS
    -       nvmmerge [options] file [file] [...]  [>stdout]
    -
    -DESCRIPTION
    -       Combine multiple binary image files into a single Qualcomm Atheros binary image file, leaving the original files intact.
    -
    -       Qualcomm Atheros image files consist of a chain of image headers, each followed by an image block.  Image blocks can con‐
    -       tain data, applets or programs.  Atheros software reads the header chain and decides which images to download and execute
    -       based on information in image headers.  Tampering with image headers or images may void some contractual obligations made
    -       by Atheros.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -q     Suppresses printing of routine messages.  This option has no efect.
    -
    -       -v     Print input file names on stderr as they are merged.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The  name of  a Qualcomm Atheros image file.  By convention, these image files have a .nvm file extension but this
    -              program does not enforce that convention.  Invalid image files will be rejected causing the output  to  be  incom‐
    -              plete.
    -
    -EXAMPLES
    -       The  following example combines three files, abc-00.nvm, abc-01.nvm and abc-06.nvm into one file abc.nvm.  Option -v dis‐
    -       plays the input file names as they are merged.  Program output is in binary format and so output should be directed to  a
    -       file or pipe and not the console.
    -
    -          # nvmmerge -v abc-00.nvm abc-01.nvm abc-06.nvm > abc.nvm
    -          nvmmerge: abc-00.nvm
    -          nvmmerge: abc-01.nvm
    -          nvmmerge: abc-06.nvm
    -
    -DISCLAIMER
    -       Atheros image file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public informa‐
    -       tion is not available.  Qualcomm Atheros reserves the right to change  file  structure  or  content  in  future  firmware
    -       releases without any obligation to notify or compensate users of this program.  This program is reserved for use by Qual‐
    -       comm Atheros Field Engineers.  Use of this program may void certain contractual obligations made by Qualcomm Atheros.
    -
    -SEE ALSO
    -       ampboot(1), amptest(1), amptool(1), chknvm(1), chknvm2(1), int6k(1), int6kf(1),  int6ktest(1),  nvmsplit(1),  plcboot(1),
    -       plctest(1), plctool(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                 nvmmerge(1)
    -
    - - - diff --git a/docbook/nvmmerge.c.html b/docbook/nvmmerge.c.html deleted file mode 100644 index 0c1d3842..00000000 --- a/docbook/nvmmerge.c.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - nvmmerge.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   nvmmerge.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <unistd.h>
    -#include <string.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../nvm/nvm.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void copyimage (struct _file_ * file, signed extent, signed image)
    - *
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void copyimage (struct _file_ * file, signed extent, signed image)
    -
    -{
    -	char buffer [1024];
    -	signed length = sizeof (buffer);
    -	while (extent)
    -	{
    -		if (length > extent)
    -		{
    -			length = extent;
    -		}
    -		if (read (file->file, buffer, length) < length)
    -		{
    -			error (1, errno, NVM_IMG_CANTREAD, file->name, image);
    -		}
    -		if (write (STDOUT_FILENO, buffer, length) < length)
    -		{
    -			error (1, errno, NVM_IMG_CANTSAVE, file->name, image);
    -		}
    -		extent -= length;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function1 (char const * filename, signed index, flag_t flags);
    - *
    - *   concatenate Atheros image files having the older header format;
    - *
    - *   the major and minor header version must be 0x6000 and 0x0000
    - *   and both header links must be 0x00000000;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function1 (struct _file_ * file, signed index, flag_t flags)
    -
    -{
    -	static signed image = 0;
    -	static uint32_t offset = 0;
    -	struct nvm_header1 nvm_header;
    -	if (read (file->file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -	{
    -		error (1, errno, NVM_HDR_CANTREAD, file->name, image);
    -	}
    -	if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
    -	{
    -		error (1, 0, NVM_HDR_VERSION, file->name, image);
    -	}
    -	if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -	{
    -		error (1, 0, NVM_HDR_CHECKSUM, file->name, image);
    -	}
    -	if (nvm_header.NEXTHEADER)
    -	{
    -		error (1, 0, NVM_HDR_LINK, file->name, image);
    -	}
    -	if (index)
    -	{
    -		offset += sizeof (nvm_header);
    -		offset += LE32TOH (nvm_header.IMAGELENGTH);
    -		nvm_header.NEXTHEADER = HTOLE32 (offset);
    -	}
    -	nvm_header.HEADERCHECKSUM = 0;
    -	nvm_header.HEADERCHECKSUM = checksum32 (&nvm_header, sizeof (nvm_header), 0);
    -	if (write (STDOUT_FILENO, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -	{
    -		error (1, errno, NVM_HDR_CANTSAVE, file->name, image);
    -	}
    -	copyimage (file, LE32TOH (nvm_header.IMAGELENGTH), image);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function2 (char const * filename, signed index, flag_t flags);
    - *
    - *   concatenate Atheros image files having the newer header format;
    - *
    - *   the manor and minor header version must be 0x0001 and 0x0001
    - *   and both header links must be 0xFFFFFFFF;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function2 (struct _file_ * file, signed index, flag_t flags)
    -
    -{
    -	static signed image = 0;
    -	static signed origin = ~0;
    -	static signed offset = 0;
    -	struct nvm_header2 nvm_header;
    -	if (read (file->file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -	{
    -		error (1, errno, NVM_HDR_CANTREAD, file->name, image);
    -	}
    -	if (LE16TOH (nvm_header.MajorVersion) != 1)
    -	{
    -		error (1, 0, NVM_HDR_VERSION, file->name, image);
    -	}
    -	if (LE16TOH (nvm_header.MinorVersion) != 1)
    -	{
    -		error (1, 0, NVM_HDR_VERSION, file->name, image);
    -	}
    -	if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -	{
    -		error (1, 0, NVM_HDR_CHECKSUM, file->name, image);
    -	}
    -	if (~nvm_header.PrevHeader)
    -	{
    -		error (1, 0, NVM_HDR_LINK, file->name, image);
    -	}
    -	if (~nvm_header.NextHeader)
    -	{
    -		error (1, 0, NVM_HDR_LINK, file->name, image);
    -	}
    -	nvm_header.PrevHeader = HTOLE32 (origin);
    -	origin = offset;
    -	if (index)
    -	{
    -		offset += sizeof (nvm_header);
    -		offset += LE32TOH (nvm_header.ImageLength);
    -		nvm_header.NextHeader = HTOLE32 (offset);
    -	}
    -	nvm_header.HeaderChecksum = 0;
    -	nvm_header.HeaderChecksum = checksum32 (&nvm_header, sizeof (nvm_header), 0);
    -	if (write (STDOUT_FILENO, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -	{
    -		error (1, errno, NVM_HDR_CANTSAVE, file->name, image);
    -	}
    -	copyimage (file, LE32TOH (nvm_header.ImageLength), image);
    -	image++;
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function (char const * filename, signed count, flag_t flags);
    - *
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (char const * filename, signed index, flag_t flags)
    -
    -{
    -	uint32_t version;
    -	struct _file_ file =
    -	{
    -		-1,
    -		filename
    -	};
    -	if (_anyset (flags, NVM_VERBOSE))
    -	{
    -		error (0, 0, "%s", file.name);
    -	}
    -	if ((file.file = open (file.name, O_BINARY|O_RDONLY)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, file.name);
    -	}
    -	if (read (file.file, &version, sizeof (version)) != sizeof (version))
    -	{
    -		error (1, errno, FILE_CANTREAD, file.name);
    -	}
    -	if (lseek (file.file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file.name);
    -	}
    -	if (LE32TOH (version) == 0x60000000)
    -	{
    -		function1 (&file, index, flags);
    -	}
    -	else
    -	{
    -		function2 (&file, index, flags);
    -	}
    -	close (file.file);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"qv",
    -		"file [file] [...] [> file]",
    -		"Qualcomm Atheros PLC Firmware Image File Splicer",
    -		"q\tsuppress messages",
    -		"v\tverbose messages",
    -		(char const *) (0)
    -	};
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'q':
    -			_setbits (flags, NVM_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, NVM_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -
    -#ifdef WIN32
    -
    -	setmode (fileno (stdin), O_BINARY);
    -	setmode (fileno (stdout), O_BINARY);
    -
    -#endif
    -
    -	while ((argc) && (* argv))
    -	{
    -		function (* argv, argc-1, flags);
    -		argv++;
    -		argc--;
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/nvmpeek.c.html b/docbook/nvmpeek.c.html deleted file mode 100644 index fcf6f96e..00000000 --- a/docbook/nvmpeek.c.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - nvmpeek.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void nvmpeek (void const * memory);
    - *
    - *   nvm.h
    - *
    - *   assume memory points to a Qualcomm Atheros .nvm file header and
    - *   call the appropriate function to display it based on the header
    - *   version number;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMPEEK_SOURCE
    -#define NVMPEEK_SOURCE
    -
    -#include "../tools/memory.h"
    -#include "../nvm/nvm.h"
    -
    -void nvmpeek (void const * memory)
    -
    -{
    -	if (LE32TOH (*(uint32_t *)(memory)) == 0x60000000)
    -	{
    -		nvmpeek1 (memory);
    -		return;
    -	}
    -	nvmpeek2 (memory);
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmpeek1.c.html b/docbook/nvmpeek1.c.html deleted file mode 100644 index 3c434f3e..00000000 --- a/docbook/nvmpeek1.c.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - nvmpeek1.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void nvmpeek1 (void const * memory);
    - *
    - *   print a memory resident firmware image header on stdout;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMPEEK1_SOURCE
    -#define NVMPEEK1_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/format.h"
    -#include "../nvm/nvm.h"
    -
    -void nvmpeek1 (void const * memory)
    -
    -{
    -	extern char const * nvm_imagetypes [];
    -	extern char const * nvm_platforms [];
    -	struct nvm_header1 * nvm_header = (struct nvm_header1 *)(memory);
    -	char const * string = "Unknown";
    -	char platform [100];
    -	printf ("\tHeader Version = 0x%08X-%02X\n", LE32TOH (nvm_header->HEADERVERSION), nvm_header->HEADERMINORVERSION);
    -	printf ("\tHeader Checksum = 0x%08X\n", LE32TOH (nvm_header->HEADERCHECKSUM));
    -	printf ("\tHeader Next = 0x%08X\n", LE32TOH (nvm_header->NEXTHEADER));
    -	printf ("\tFlash Address = 0x%08X\n", LE32TOH (nvm_header->IMAGEROMADDR));
    -	printf ("\tImage Address = 0x%08X\n", LE32TOH (nvm_header->IMAGEADDRESS));
    -	printf ("\tEntry Address = 0x%08X\n", LE32TOH (nvm_header->ENTRYPOINT));
    -	printf ("\tImage Checksum = 0x%08X\n", LE32TOH (nvm_header->IMAGECHECKSUM));
    -	printf ("\tImage Size = 0x%08X (%d)\n", LE32TOH (nvm_header->IMAGELENGTH), LE32TOH (nvm_header->IMAGELENGTH));
    -	if (LE32TOH (nvm_header->IMAGETYPE) < NVM_IMAGETYPES)
    -	{
    -		string = nvm_imagetypes [LE32TOH (nvm_header->IMAGETYPE)];
    -	}
    -	printf ("\tImage Type = %s\n", string);
    -	strfbits (platform, sizeof (platform), nvm_platforms, "|", LE16TOH (nvm_header->IGNOREMASK));
    -	printf ("\tImage Omit = %s\n", platform);
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmpeek2.c.html b/docbook/nvmpeek2.c.html deleted file mode 100644 index 85c2f5fc..00000000 --- a/docbook/nvmpeek2.c.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - nvmpeek2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void nvmpeek2 (void const * memory);
    - *
    - *   print a memory resident firmware image header on stdout;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMPEEK2_SOURCE
    -#define NVMPEEK2_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/format.h"
    -#include "../nvm/nvm.h"
    -
    -void nvmpeek2 (void const * memory)
    -
    -{
    -	extern char const * nvm_imagetypes [];
    -	extern char const * nvm_platforms [];
    -	struct nvm_header2 * nvm_header = (struct nvm_header2 *)(memory);
    -	char const * string = "Unknown";
    -	char platform [100];
    -	printf ("\tHeader Version = 0x%04x-0x%04x\n", LE16TOH (nvm_header->MajorVersion), nvm_header->MinorVersion);
    -	printf ("\tHeader Checksum = 0x%08X\n", LE32TOH (nvm_header->HeaderChecksum));
    -	printf ("\tHeader Next = 0x%08X\n", LE32TOH (nvm_header->NextHeader));
    -	printf ("\tHeader Prev = 0x%08X\n", LE32TOH (nvm_header->PrevHeader));
    -	printf ("\tFlash Address = 0x%08X\n", LE32TOH (nvm_header->ImageNvmAddress));
    -	printf ("\tImage Address = 0x%08X\n", LE32TOH (nvm_header->ImageAddress));
    -	printf ("\tEntry Address = 0x%08X\n", LE32TOH (nvm_header->EntryPoint));
    -	printf ("\tEntry Version = 0x%04X\n", LE16TOH (nvm_header->AppletEntryVersion));
    -	printf ("\tImage Checksum = 0x%08X\n", LE32TOH (nvm_header->ImageChecksum));
    -	printf ("\tImage ModuleID = 0x%04X\n", LE32TOH (nvm_header->ModuleID));
    -	printf ("\tImage ModuleSubID = 0x%04X\n", LE32TOH (nvm_header->ModuleSubID));
    -	printf ("\tImage Size = 0x%08X (%d)\n", LE32TOH (nvm_header->ImageLength), LE32TOH (nvm_header->ImageLength));
    -	if (LE32TOH (nvm_header->ImageType) < NVM_IMAGETYPES)
    -	{
    -		string = nvm_imagetypes [LE32TOH (nvm_header->ImageType)];
    -	}
    -	printf ("\tImage Type = %s\n", string);
    -	strfbits (platform, sizeof (platform), nvm_platforms, "|", LE16TOH (nvm_header->ExecuteMask));
    -	printf ("\tImage Exec = %s\n", platform);
    -
    -#if 0
    -
    -	printf ("\tReserved = 0x%04X\n", LE16TOH (nvm_header->Reserved0));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved1));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved2));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved3));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved4));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved5));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved6));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved7));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved8));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved9));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved10));
    -	printf ("\tReserved = 0x%08X\n", LE32TOH (nvm_header->Reserved11));
    -
    -#endif
    -
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmseek1.c.html b/docbook/nvmseek1.c.html deleted file mode 100644 index 8e1bb2b1..00000000 --- a/docbook/nvmseek1.c.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - nvmseek1.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed nvmseek1 (signed fd, char const * filename, struct nvm_header1 * nvm_header, uint32_t imagetype);
    - *
    - *   nvm.h
    - *
    - *   search a thunderbolt/lightning PIB file for the next image of a
    - *   given type; return 0 on success or -1 on failure to find another
    - *   image of the given type;
    - *
    - *   the call must provide an image header strucuture for use while
    - *   searching; on success, that structure will contain information
    - *   about the image and file will be positioned to the start of
    - *   the image;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMSEEK1_SOURCE
    -#define NVMSEEK1_SOURCE
    -
    -#include <unistd.h>
    -
    -#include "../tools/endian.h"
    -#include "../tools/error.h"
    -#include "../pib/pib.h"
    -#include "../nvm/nvm.h"
    -
    -signed nvmseek1 (signed fd, char const * filename, struct nvm_header1 * nvm_header, uint32_t imagetype)
    -
    -{
    -	unsigned module = 0;
    -	do
    -	{
    -		if (read (fd, nvm_header, sizeof (* nvm_header)) != sizeof (* nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, filename, module);
    -		}
    -		if (LE32TOH (nvm_header->HEADERVERSION) != 0x60000000)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, filename, module);
    -		}
    -		if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
    -		{
    -			error (1, 0, NVM_HDR_CHECKSUM, filename, module);
    -		}
    -		if (nvm_header->IMAGETYPE == imagetype)
    -		{
    -			return (0);
    -		}
    -		if (fdchecksum32 (fd, LE32TOH (nvm_header->IMAGELENGTH), nvm_header->IMAGECHECKSUM))
    -		{
    -			error (1, ECANCELED, NVM_IMG_CHECKSUM, filename, module);
    -		}
    -		module++;
    -	}
    -	while (~nvm_header->NEXTHEADER);
    -	if (lseek (fd, 0, SEEK_CUR) != lseek (fd, 0, SEEK_END))
    -	{
    -		error (1, errno, NVM_HDR_LINK, filename, module);
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmseek2.c.html b/docbook/nvmseek2.c.html deleted file mode 100644 index 6d4ae061..00000000 --- a/docbook/nvmseek2.c.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - nvmseek2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed nvmseek2 (signd fd, char const * filename, struct nvm_header2 * nvm_header, uint32_t imagetype);
    - *
    - *   nvm.h
    - *
    - *   search a panther/lynx PIB file for the next image of a given
    - *   type; return 0 on success or -1 on failure to find another
    - *   image of the given type;
    - *
    - *   the call must provide an image header strucuture for use while
    - *   searching; on success, that structure will contain information
    - *   about the image and file will be positioned to the start of
    - *   the image;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVMSEEK2_SOURCE
    -#define NVMSEEK2_SOURCE
    -
    -#include <unistd.h>
    -
    -#include "../tools/endian.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../pib/pib.h"
    -#include "../nvm/nvm.h"
    -
    -signed nvmseek2 (signed fd, char const * filename, struct nvm_header2 * nvm_header, uint32_t imagetype)
    -
    -{
    -	unsigned module = 0;
    -	uint32_t origin = ~0;
    -	uint32_t offset = 0;
    -	do
    -	{
    -		if (read (fd, nvm_header, sizeof (* nvm_header)) != sizeof (* nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, filename, module);
    -		}
    -		if (LE16TOH (nvm_header->MajorVersion) != 1)
    -		{
    -			error (1, 0, "(0) " NVM_HDR_VERSION , filename, module);
    -		}
    -		if (LE16TOH (nvm_header->MinorVersion) != 1)
    -		{
    -			error (1, 0, "(1) " NVM_HDR_VERSION, filename, module);
    -		}
    -		if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
    -		{
    -			error (1, 0, NVM_HDR_CHECKSUM, filename, module);
    -		}
    -		if (LE32TOH (nvm_header->PrevHeader) != origin)
    -		{
    -			error (1, 0, NVM_HDR_LINK, filename, module);
    -		}
    -		if (LE32TOH (nvm_header->ImageType) == imagetype)
    -		{
    -			return (0);
    -		}
    -		if (fdchecksum32 (fd, LE32TOH (nvm_header->ImageLength), nvm_header->ImageChecksum))
    -		{
    -			error (1, ECANCELED, NVM_IMG_CHECKSUM, filename, module);
    -		}
    -		origin = offset;
    -		offset = LE32TOH (nvm_header->NextHeader);
    -		module++;
    -	}
    -	while (~nvm_header->NextHeader);
    -	if (lseek (fd, 0, SEEK_CUR) != lseek (fd, 0, SEEK_END))
    -	{
    -		error (1, errno, NVM_HDR_LINK, filename, module);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvmsplit.1.html b/docbook/nvmsplit.1.html deleted file mode 100644 index f4ded4a1..00000000 --- a/docbook/nvmsplit.1.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - nvmsplit.1 - - - - - - - - - -
    -nvmsplit(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 nvmsplit(1)
    -
    -NAME
    -       nvmsplit - Qualcomm Atheros PLC Firmware Image File Slicer
    -
    -SYNOPSIS
    -       nvmsplit [options] file [file] [...]
    -
    -DESCRIPTION
    -       Extract  all  images  from  an  Atheros binary image file, leaving the original files intact.  Extracted images appear in
    -       files having the input file basename with sequence numbers indicating the relative position of the image within the orig‐
    -       inal  file.   For  example,  image file abc.nvm might result in files abc-00.nvm, abc-01.nvm, abc-02.nvm and so on.  Each
    -       output file is a valid, single-image file and so they can be combined using program nvmmerge.
    -
    -       Atheros image files consist of a chain of image headers, each followed by an image block.  Image blocks can contain data,
    -       applets  or  programs.  Atheros software reads the header chain and decides which images to download and execute based on
    -       information in the image headers.  Tampering with image headers or images may void some contractual obligations  made  by
    -       Atheros.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -q     Suppress routine messages.  This option has no effect at this time.
    -
    -       -v     Print component file names on stderr as they are created.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The name of an Atheros image file.  By convention, Atheros Image files have a .nvm file extension but this program
    -              does not enforce this convention.  Invalid image files will be rejected causing the output to be incomplete.
    -
    -EXAMPLES
    -       The  following  example  reads  Atheros  image file abc.nvm and creates one or more output files.  Each file contains one
    -       image with associated header.
    -
    -          # nvmsplit abc.nvm -v
    -          nvmsplit: abc.nvm --> abc-00.nvm
    -          nvmsplit: abc.nvm --> abc-01.nvm
    -          nvmsplit: abc.nvm --> abc-02.nvm
    -          nvmsplit: abc.nvm --> abc-03.nvm
    -
    -DISCLAIMER
    -       Atheros image file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public informa‐
    -       tion  is  not  available.   Qualcomm  Atheros  reserves  the right to change file structure or content in future firmware
    -       releases without any obligation to notify or compensate users of this program.  This  program  is  reserved  for  use  by
    -       Atheros Field Engineers.  Use of this program may void some contractual obligations made by Atheros.
    -
    -SEE ALSO
    -       chknvm(1), int6k(1), int6kf(1), int6ktest(1), nvmmerge(1), setnvm(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                 nvmsplit(1)
    -
    - - - diff --git a/docbook/nvmsplit.c.html b/docbook/nvmsplit.c.html deleted file mode 100644 index 3497f42d..00000000 --- a/docbook/nvmsplit.c.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - nvmsplit.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   nvmsplit.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <unistd.h>
    -#include <string.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../nvm/nvm.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void function1 (char const * filename, flag_t flags);
    - *
    - *   open an Atheros Qualcomm PLC firmware image file and write each
    - *   component as an independent image file;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function1 (char const * filename, flag_t flags)
    -
    -{
    -	struct nvm_header1 nvm_header;
    -	char savename [FILENAME_MAX];
    -	byte buffer [BUFSIZ];
    -	signed image = 0;
    -	signed offset = 0;
    -	signed ifd;
    -	signed ofd;
    -	char * sp;
    -	char * cp;
    -	memset (&nvm_header, 0, sizeof (nvm_header));
    -	for (sp = cp = strcpy (savename, filename); *cp; cp++)
    -	{
    -		if (*cp == FILE_C_EXTENDER)
    -		{
    -			sp = cp;
    -		}
    -	}
    -	if (sp == savename)
    -	{
    -		sp = cp;
    -	}
    -	if ((ifd = open (filename, O_BINARY|O_RDONLY)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, filename);
    -	}
    -	do
    -	{
    -		signed extent;
    -		signed length;
    -		if (lseek (ifd, 0, SEEK_CUR) != offset)
    -		{
    -			error (1, errno, NVM_HDR_LINK, filename, image);
    -		}
    -		if (read (ifd, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, filename, image);
    -		}
    -		if (LE32TOH (nvm_header.HEADERVERSION) != 0x60000000)
    -		{
    -			error (1, 0, NVM_HDR_VERSION, filename, image);
    -		}
    -		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -		{
    -			error (1, 0, NVM_HDR_CHECKSUM, filename, image);
    -		}
    -
    -#if defined (WIN32)
    -
    -		sprintf (sp, "-%02d.nvm", image);
    -
    -#else
    -
    -		snprintf (sp, savename + sizeof (savename) - sp, "-%02d.nvm", image);
    -
    -#endif
    -
    -		if ((ofd = open (savename, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -		{
    -			error (1, errno, FILE_CANTOPEN, savename);
    -		}
    -		if (_anyset (flags, NVM_VERBOSE))
    -		{
    -			error (0, 0, "%s", savename);
    -		}
    -		offset = LE32TOH (nvm_header.NEXTHEADER);
    -		nvm_header.NEXTHEADER = 0;
    -		nvm_header.HEADERCHECKSUM = 0;
    -		nvm_header.HEADERCHECKSUM = checksum32 (&nvm_header, sizeof (nvm_header), 0);
    -		if (write (ofd, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, FILE_CANTSAVE, savename);
    -		}
    -		extent = LE32TOH (nvm_header.IMAGELENGTH);
    -		length = sizeof (buffer);
    -		while (extent)
    -		{
    -			if (length > extent)
    -			{
    -				length = extent;
    -			}
    -			if (read (ifd, buffer, length) < length)
    -			{
    -				error (1, errno, NVM_IMG_CANTREAD, filename, image);
    -			}
    -			if (write (ofd, buffer, length) < length)
    -			{
    -				error (1, errno, NVM_IMG_CANTSAVE, savename, image);
    -			}
    -			extent -= length;
    -		}
    -		close (ofd);
    -		image++;
    -	}
    -	while (offset);
    -	close (ifd);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function2 (char const * filename, flag_t flags);
    - *
    - *   open an Atheros Qualcomm PLC firmware image file and write each
    - *   component as an independent image file;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function2 (char const * filename, flag_t flags)
    -
    -{
    -	struct nvm_header2 nvm_header;
    -	char savename [FILENAME_MAX];
    -	byte buffer [BUFSIZ];
    -	signed image = 0;
    -	signed offset = 0;
    -	signed ifd;
    -	signed ofd;
    -	char * sp;
    -	char * cp;
    -	memset (&nvm_header, 0, sizeof (nvm_header));
    -	for (sp = cp = strcpy (savename, filename); *cp; cp++)
    -	{
    -		if (*cp == FILE_C_EXTENDER)
    -		{
    -			sp = cp;
    -		}
    -	}
    -	if (sp == savename)
    -	{
    -		sp = cp;
    -	}
    -	if ((ifd = open (filename, O_BINARY|O_RDONLY)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, filename);
    -	}
    -	do
    -	{
    -		signed extent;
    -		signed length;
    -		if (lseek (ifd, 0, SEEK_CUR) != offset)
    -		{
    -			error (1, errno, NVM_HDR_LINK, filename, image);
    -		}
    -		if (read (ifd, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, filename, image);
    -		}
    -		if (LE16TOH (nvm_header.MinorVersion) != 1)
    -		{
    -			error (1, 0, NVM_HDR_VERSION, filename, image);
    -		}
    -		if (LE16TOH (nvm_header.MajorVersion) != 1)
    -		{
    -			error (1, 0, NVM_HDR_VERSION, filename, image);
    -		}
    -		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -		{
    -			error (1, 0, NVM_HDR_CHECKSUM, filename, image);
    -		}
    -
    -#if defined (WIN32)
    -
    -		sprintf (sp, "-%02d.nvm", image);
    -
    -#else
    -
    -		snprintf (sp, savename + sizeof (savename) - sp, "-%02d.nvm", image);
    -
    -#endif
    -
    -		if ((ofd = open (savename, O_BINARY|O_WRONLY|O_CREAT|O_TRUNC, FILE_FILEMODE)) == -1)
    -		{
    -			error (1, errno, FILE_CANTOPEN, savename);
    -		}
    -		if (_anyset (flags, NVM_VERBOSE))
    -		{
    -			error (0, 0, "%s --> %s", filename, savename);
    -		}
    -		offset = LE32TOH (nvm_header.NextHeader);
    -		nvm_header.NextHeader = ~0;
    -		nvm_header.PrevHeader = ~0;
    -		nvm_header.HeaderChecksum = 0;
    -		nvm_header.HeaderChecksum = checksum32 (&nvm_header, sizeof (nvm_header), 0);
    -		if (write (ofd, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTSAVE, savename, image);
    -		}
    -		extent = LE32TOH (nvm_header.ImageLength);
    -		length = sizeof (buffer);
    -		while (extent)
    -		{
    -			if (length > extent)
    -			{
    -				length = extent;
    -			}
    -			if (read (ifd, buffer, length) < length)
    -			{
    -				error (1, errno, NVM_IMG_CANTREAD, filename, image);
    -			}
    -			if (write (ofd, buffer, length) < length)
    -			{
    -				error (1, errno, NVM_IMG_CANTSAVE, savename, image);
    -			}
    -			extent -= length;
    -		}
    -		close (ofd);
    -		image++;
    -	}
    -	while (~offset);
    -	close (ifd);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function (struct _file_ * file, flag_t flags);
    - *
    - *   open an Atheros Qualcomm PLC firmware image file and write each
    - *   component as an independent, single-image firmware file;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (char const * filename, flag_t flags)
    -
    -{
    -	uint32_t version;
    -	signed ifd;
    -	if ((ifd = open (filename, O_BINARY|O_RDONLY)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, filename);
    -	}
    -	if (read (ifd, &version, sizeof (version)) != sizeof (version))
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	close (ifd);
    -	if (LE32TOH (version) == 0x60000000)
    -	{
    -		function1 (filename, flags);
    -	}
    -	else
    -	{
    -		function2 (filename, flags);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"qv",
    -		"file [file] [...]",
    -		"Qualcomm Atheros PLC Firmware Image File Slicer",
    -		"q\tsuppress messages",
    -		"v\tverbose messages",
    -		(char const *) (0)
    -	};
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'q':
    -			_setbits (flags, NVM_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, NVM_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argc) && (* argv))
    -	{
    -		function (* argv, flags);
    -		argc--;
    -		argv++;
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/nvram.c.html b/docbook/nvram.c.html deleted file mode 100644 index db0ead31..00000000 --- a/docbook/nvram.c.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - nvram.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   nvram.c - NVRAM type information;
    - *
    - *   nvram.h
    - *
    - *   nvram codes for display purposes;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVRAM_SOURCE
    -#define NVRAM_SOURCE
    -
    -#include "../tools/types.h"
    -#include "../tools/symbol.h"
    -#include "../ram/nvram.h"
    -
    -#define NVRAM_TYPES (sizeof (nvram_types) / sizeof (struct _type_))
    -
    -static const struct _type_ nvram_types [] =
    -
    -{
    -	{
    -		0x00000005,
    -		"500KB"
    -	},
    -	{
    -		0x00000010,
    -		"1MB"
    -	},
    -	{
    -		0x00000011,
    -		"M25P20"
    -	},
    -	{
    -		0x00000012,
    -		"M25P40"
    -	},
    -	{
    -		0x00000013,
    -		"M25P80"
    -	},
    -	{
    -		0x00000014,
    -		"M25P16_ES"
    -	},
    -	{
    -		0x00000015,
    -		"M25P32_ES"
    -	},
    -	{
    -		0x00000016,
    -		"M25P64_ES"
    -	},
    -	{
    -		0x00000046,
    -		"AT26DF161"
    -	},
    -	{
    -		0x00000146,
    -		"AT26DF161A"
    -	},
    -	{
    -		0x00001020,
    -		"M25P05A"
    -	},
    -	{
    -		0x00001120,
    -		"M25P10A"
    -	},
    -	{
    -		0x00001402,
    -		"S25FL016AOLMFI01"
    -	},
    -	{
    -		0x00001420,
    -		"M25P80"
    -	},
    -	{
    -		0x00001520,
    -		"M25P16"
    -	},
    -	{
    -		0x00001532,
    -		"FM25S16/FM25Q16"
    -	},
    -	{
    -		0x00001571,
    -		"M25PX16"
    -	},
    -	{
    -		0x00001620,
    -		"M25P32"
    -	},
    -	{
    -		0x00001632,
    -		"FM25Q32"
    -	},
    -	{
    -		0x00001720,
    -		"M25P64"
    -	},
    -	{
    -		0x00004125,
    -		"SST25VF016B"
    -	}
    -};
    -
    -char const * NVRAMName (uint16_t NVRAMTYPE)
    -
    -{
    -	return (typename (nvram_types, NVRAM_TYPES, NVRAMTYPE, "Unknown NVRAM Type"));
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvram.h.html b/docbook/nvram.h.html deleted file mode 100644 index 7c4edafb..00000000 --- a/docbook/nvram.h.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - nvram.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   nvnvm.h - nvram definitions and declarations;
    - *
    - *   The Boot ROM reads a linked list of NVM headers containing
    - *   information about the size, location and execution address
    - *   of various software images;
    - *
    - *   See INT6300 Boot ROM Software Design Specification for more
    - *   information; the document may not be available to some
    - *   customers so don't push it;
    - *
    - *.  Qualcomm Atheros HomePlug AV Powerline Toolkit;
    - *:  Copyright (c) 2006-2010 by Intellon Corporation; ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVRAM_HEADER
    -#define NVRAM_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define NVRAM_500KB         0x00000005
    -#define NVRAM_1MB           0x00000010
    -#define NVRAM_2MB           0x00000011
    -#define NVRAM_4MB           0x00000012
    -#define NVRAM_8MB           0x00000013
    -#define NVRAM_16MB          0x00000014
    -#define NVRAM_32MB          0x00000015
    -
    -#define NVRAM_M25P20 =      0x00000011;
    -#define NVRAM_M25P40 =      0x00000012;
    -#define NVRAM_M25P80 =      0x00000013;
    -#define NVRAM_M25P16_ES =   0x00000014;
    -#define NVRAM_M25P32_ES =   0x00000015;
    -#define NVRAM_M25P64_ES =   0x00000016;
    -#define NVRAM_AT26DF161 =   0x00000046;
    -#define NVRAM_AT26DF161A =  0x00000146;
    -#define NVRAM_M25P05A =     0x00001020;
    -#define NVRAM_M25P10A =     0x00001120;
    -#define NVRAM_M25P16 =      0x00001520;
    -#define NVRAM_M25PX16 =     0x00001571;
    -#define NVRAM_M25P32 =      0x00001620;
    -#define NVRAM_M25P64 =      0x00001720;
    -#define NVRAM_FM25S16 =     0x00001532;
    -#define NVRAM_FM25Q16 =     0x00001532;
    -#define NVRAM_FM25Q32 =     0x00001632;
    -#define NVRAM_SST25VF016B = 0x00004125;
    -
    -/*====================================================================*
    - *   variables;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed config_nvram
    -
    -{
    -	uint32_t NVRAMTYPE;
    -	uint32_t NVRAMPAGE;
    -	uint32_t NVRAMBLOCK;
    -	uint32_t NVRAMSIZE;
    -}
    -
    -config_nvram;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -void nvrampeek (struct config_nvram *);
    -char const * NVRAMName (uint16_t nvramtype);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/nvrampeek.c.html b/docbook/nvrampeek.c.html deleted file mode 100644 index e75574f3..00000000 --- a/docbook/nvrampeek.c.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - nvrampeek.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void nvrampeek(struct config_nvram * config_nvram);
    - *
    - *   nvram.h
    - *
    - *   print an nvram configuration block;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef NVRAMPEEK_SOURCE
    -#define NVRAMPEEK_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../ram/nvram.h"
    -#include "../tools/memory.h"
    -#include "../tools/symbol.h"
    -
    -void nvrampeek (struct config_nvram * config_nvram)
    -
    -{
    -	printf ("TYPE=0x%02X ", LE32TOH (config_nvram->NVRAMTYPE));
    -	printf ("(%s) ", NVRAMName (LE32TOH (config_nvram->NVRAMTYPE)));
    -	printf ("PAGE=0x%04X ", LE32TOH (config_nvram->NVRAMPAGE));
    -	printf ("BLOCK=0x%04X ", LE32TOH (config_nvram->NVRAMBLOCK));
    -	printf ("SIZE=0x%04X ", LE32TOH (config_nvram->NVRAMSIZE));
    -	printf ("(%d) ", LE32TOH (config_nvram->NVRAMSIZE));
    -	printf ("\n");
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/open-plc-utils.xml b/docbook/open-plc-utils.xml deleted file mode 100644 index 33fac96c..00000000 --- a/docbook/open-plc-utils.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - Qualcomm Atheros Open Powerline Toolkit - - - - Qualcomm Atheros, Ocala FL USA - - - - Charles - - - Maier - - - - - Andrew Barnes <abarnes@qca.qualcomm.com> - - - - - Marc Bertola <mbertola@qti.qualcomm.com> - - - - - Florian Fainelli <f.fainelli@gmail.com> - - - - - Nate Houghton <nhoughto@qca.qualcomm.com> - - - - - Mathieu Poullet <m.poullet@avm.de> - - - - - Stefan Wahren <stefan.wahren@i2se.com> - - - - - Bill Wike <bwike@qca.qualcomm.com> - - - - - Alejandro Vasquez <avasquez@qca.qualcomm.com> - - - - - NOV 2013 - - - open-plc-utils-0.0.4 - - - - This document is the manual for the Qualcomm Atheros Open Powerline Toolkit. New users should read the first chapter before starting using the toolkit because it will answer many questions about toolkit installation, structure, content and application. New users may want to add this page and toolkit.html to their browser favorites for later reference. - - - HomePlug AV is a registered trademark of the HomePlug Powerline Alliance. Linux is a trademark of Linus Tovalds. Windows is a registered trademark of Microsoft Corporation. INT6000, INT6300, INT6400, AR6410, QCA7000, AR7400 and AR7420 are powerline products from Qualcomm Atheros. - - - - Intellon - Atheros - Qualcomm - HomePlug - powerline - communications - INT6000 - INT6300 - INT6400 - AR7400 - AR7420 - - - &overview; - &hardware; - &software; - &firmware; - &procedures; - &scripting; - &support; - &driver1; - diff --git a/docbook/openchannel.c.html b/docbook/openchannel.c.html deleted file mode 100644 index f7a81205..00000000 --- a/docbook/openchannel.c.html +++ /dev/null @@ -1,541 +0,0 @@ - - - - - - openchannel.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed openchannel (struct channel * channel);
    - *
    - *   channel.h
    - *
    - *   open a raw ethernet channel;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef OPENCHANNEL_SOURCE
    -#define OPENCHANNEL_SOURCE
    -
    -#include <unistd.h>
    -#include <memory.h>
    -#include <errno.h>
    -
    -#if defined (__linux__)
    -#	include <net/if_arp.h>
    -#	include <netpacket/packet.h>
    -#	include <sys/ioctl.h>
    -#elif defined (__APPLE__)
    -#	include <sys/ioctl.h>
    -#	include <sys/stat.h>
    -#	include <fcntl.h>
    -#	include <stdlib.h>
    -#elif defined (__OpenBSD__)
    -#	include <sys/ioctl.h>
    -#	include <sys/stat.h>
    -#	include <sys/types.h>
    -#	include <fcntl.h>
    -#	include <stdlib.h>
    -#elif defined (WINPCAP)
    -#	include <string.h>
    -#else
    -#error "Unknown environment"
    -#endif
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -
    -#if defined (__APPLE__) || defined (__OpenBSD__)
    -#	include "../ether/gethwaddr.c"
    -#endif
    -
    -signed openchannel (struct channel * channel)
    -
    -{
    -
    -#if defined (__linux__)
    -
    -	struct ifreq ifreq;
    -	struct sockaddr_ll sockaddr_ll =
    -	{
    -		PF_PACKET,
    -		0x0000,
    -		0x0000,
    -		ARPHRD_ETHER,
    -		PACKET_HOST,
    -		ETHER_ADDR_LEN,
    -		{
    -			0x00,
    -			0x00,
    -			0x00,
    -			0x00,
    -			0x00,
    -			0x00,
    -			0x00,
    -			0x00
    -		}
    -	};
    -
    -/*
    - *      raw packets require root privileges on linux; one does not have to be
    - *      root when this program is installed setuid using 'chown root:root' and
    - *      'chmod 4555';
    - */
    -
    -	if (geteuid ())
    -	{
    -		error (1, EPERM, ERROR_NOTROOT);
    -	}
    -
    -	memset (&ifreq, 0, sizeof (ifreq));
    -	sockaddr_ll.sll_protocol = htons (channel->type);
    -	if ((channel->fd = socket (sockaddr_ll.sll_family, SOCK_RAW, sockaddr_ll.sll_protocol)) == -1)
    -	{
    -		error (1, errno, "%s", channel->ifname);
    -	}
    -	memcpy (ifreq.ifr_name, channel->ifname, sizeof (ifreq.ifr_name));
    -	if (ioctl (channel->fd, SIOCGIFINDEX, &ifreq) == -1)
    -	{
    -		error (1, errno, "%s", ifreq.ifr_name);
    -	}
    -	channel->ifindex = sockaddr_ll.sll_ifindex = ifreq.ifr_ifindex;
    -	if (ioctl (channel->fd, SIOCGIFHWADDR, &ifreq) == -1)
    -	{
    -		error (1, errno, "%s", ifreq.ifr_name);
    -	}
    -	memcpy (sockaddr_ll.sll_addr, ifreq.ifr_ifru.ifru_hwaddr.sa_data, sizeof (sockaddr_ll.sll_addr));
    -	if (bind (channel->fd, (struct sockaddr *) (&sockaddr_ll), sizeof (sockaddr_ll)) == -1)
    -	{
    -		error (1, errno, "%s", ifreq.ifr_name);
    -	}
    -	memcpy (channel->host, sockaddr_ll.sll_addr, sizeof (channel->host));
    -	if (ioctl (channel->fd, SIOCGIFFLAGS, &ifreq) == -1)
    -	{
    -		error (1, errno, "%s", ifreq.ifr_name);
    -	}
    -	channel->ifstate = ifreq.ifr_flags;
    -	_setbits (ifreq.ifr_flags, (IFF_UP | IFF_BROADCAST | IFF_MULTICAST));
    -	_clrbits (ifreq.ifr_flags, (IFF_ALLMULTI | IFF_PROMISC));
    -	if (ioctl (channel->fd, SIOCSIFFLAGS, &ifreq) == -1)
    -	{
    -		error (1, errno, "%s", ifreq.ifr_name);
    -	}
    -
    -#else
    -
    -	struct bpf_program bpf_program;
    -	static struct bpf_insn bpf_insn [] =
    -	{
    -		{
    -			BPF_LD + BPF_H + BPF_ABS,
    -			0,
    -			0,
    -			12
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			18,
    -			0
    -		},
    -		{
    -			BPF_LD + BPF_B + BPF_ABS,
    -			0,
    -			0,
    -			0
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			10,
    -			0
    -		},
    -		{
    -			BPF_LD + BPF_B + BPF_ABS,
    -			0,
    -			0,
    -			1
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			8,
    -			0
    -		},
    -		{
    -			BPF_LD + BPF_B + BPF_ABS,
    -			0,
    -			0,
    -			2
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			6,
    -			0
    -		},
    -		{
    -			BPF_LD + BPF_B + BPF_ABS,
    -			0,
    -			0,
    -			3
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			4,
    -			0
    -		},
    -		{
    -			BPF_LD + BPF_B + BPF_ABS,
    -			0,
    -			0,
    -			4
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			2,
    -			0
    -		},
    -		{
    -			BPF_LD + BPF_B + BPF_ABS,
    -			0,
    -			0,
    -			5
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			4,
    -			0,
    -			0
    -		},
    -		{
    -			BPF_LD + BPF_W + BPF_ABS,
    -			0,
    -			0,
    -			0
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			4,
    -			0xFFFFFFFF
    -		},
    -		{
    -			BPF_LD + BPF_H + BPF_ABS,
    -			0,
    -			0,
    -			4
    -		},
    -		{
    -			BPF_JMP + BPF_JEQ + BPF_K,
    -			0,
    -			2,
    -			0xFFFF
    -		},
    -		{
    -			BPF_LD + BPF_W + BPF_LEN,
    -			0,
    -			0,
    -			0
    -		},
    -		{
    -			BPF_RET + BPF_A,
    -			0,
    -			0,
    -			0
    -		},
    -		{
    -			BPF_RET + BPF_K,
    -			0,
    -			0,
    -			0
    -		}
    -	};
    -
    -#if defined (__APPLE__) || defined (__OpenBSD__)
    -
    -	struct ifreq ifreq;
    -	struct timeval timeval;
    -	struct bpf * bpf;
    -	char filename [sizeof (CHANNEL_BPFDEVICE) + 1];
    -	unsigned count;
    -	unsigned state;
    -	int stat_errno = 0;
    -	int open_errno = 0;
    -	for (count = 0; count < 100; count++)
    -	{
    -		struct stat st;
    -		snprintf (filename, sizeof (filename), CHANNEL_BPFDEVICE, count);
    -		if (stat(filename, &st) == -1)
    -		{
    -			stat_errno = errno;
    -			continue;
    -		}
    -		if ((channel->fd = open (filename, O_RDWR)) != -1)
    -		{
    -			break;
    -		}
    -		else
    -		{
    -			open_errno = errno;
    -		}
    -	}
    -	if (channel->fd == -1)
    -	{
    -		if (open_errno)
    -		{
    -			error (1, open_errno, "Could not open bpf device");
    -		}
    -		else
    -		{
    -			error (1, stat_errno, "No bpf device found");
    -		}
    -	}
    -	memcpy (ifreq.ifr_name, channel->ifname, sizeof (ifreq.ifr_name));
    -	if (ioctl (channel->fd, BIOCSETIF, &ifreq) == -1)
    -	{
    -		error (1, errno, "%s", ifreq.ifr_name);
    -	}
    -	channel->bpf = bpf = malloc (sizeof (* bpf));
    -	if (ioctl (channel->fd, BIOCGBLEN, &bpf->bpf_length) == -1)
    -	{
    -		error (1, errno, "Can't determine buffer length: %s", ifreq.ifr_name);
    -	}
    -	bpf->bpf_bp = bpf->bpf_buffer = malloc (bpf->bpf_length);
    -	if (bpf->bpf_buffer == NULL)
    -	{
    -		error (1, errno, "Can't allocate receive buffer");
    -	}
    -
    -#if defined (__APPLE__)
    -
    -	state = 0;
    -	if (ioctl (channel->fd, BIOCSSEESENT, &state) == -1)
    -	{
    -		error (1, errno, "Can't hide outgoing frames: %s", ifreq.ifr_name);
    -	}
    -
    -#elif defined (__OpenBSD__)
    -
    -	state = BPF_DIRECTION_OUT;
    -	if (ioctl (channel->fd, BIOCSDIRFILT, &state) == -1)
    -	{
    -		error (0, errno, "Can't hide outgoing frames");
    -	}
    -
    -#else
    -#error "Abandon all hope"
    -#endif
    -
    -	if (channel->capture > 1000)
    -	{
    -		timeval.tv_sec = channel->capture / 1000;
    -		timeval.tv_usec = 0;
    -	}
    -	else
    -	{
    -
    -#if defined (__MAC_10_6)
    -
    -/*
    - *	accommodate known bug in BPF on MAC OS X 10.6; shorter times cause socket read
    - *	operations to block indefinitely if no frames are waiting because tv_usec gets
    - *      clobbered;
    - */
    -
    -		timeval.tv_sec = 1;
    -		timeval.tv_usec = 0;
    -
    -#else
    -
    -		timeval.tv_sec = 0;
    -		timeval.tv_usec = channel->capture * 1000;
    -
    -#endif
    -
    -	}
    -	if (ioctl (channel->fd, BIOCSRTIMEOUT, &timeval) == -1)
    -	{
    -		error (1, errno, "Can't set channel timeout: %s", ifreq.ifr_name);
    -	}
    -	state = 1;
    -	if (ioctl (channel->fd, BIOCIMMEDIATE, &state) == -1)
    -	{
    -		error (1, errno, "Can't set immediate mode: %s", ifreq.ifr_name);
    -	}
    -
    -#if 1
    -
    -	state = 1;
    -	if (ioctl (channel->fd, BIOCSHDRCMPLT, &state) == -1)
    -	{
    -		error (1, errno, "Can't set header complete mode: %s", ifreq.ifr_name);
    -	}
    -
    -#endif
    -
    -#if 1
    -
    -	gethwaddr (channel->host, channel->ifname);
    -
    -#else
    -
    -	if (ioctl (channel->fd, SIOCGIFADDR, &ifreq) > 0)
    -	{
    -		error (1, errno, "%s", ifreq.ifr_name);
    -	}
    -	memcpy (channel->host, LLADDR (ifreq.ifr_ifru.ifru_addr), sizeof (channel->host));
    -
    -#endif
    -
    -	bpf_program.bf_len = sizeof (bpf_insn) / sizeof (struct bpf_insn);
    -	bpf_program.bf_insns = bpf_insn;
    -	if (channel->type == ETH_P_802_2)
    -	{
    -		bpf_insn [1].code = BPF_JMP + BPF_JGT + BPF_K;
    -		bpf_insn [1].jt = 18;
    -		bpf_insn [1].jf = 0;
    -		bpf_insn [1].k = ETHERMTU;
    -	}
    -	else
    -	{
    -		bpf_insn [1].code = BPF_JMP + BPF_JEQ + BPF_K;
    -		bpf_insn [1].jt = 0;
    -		bpf_insn [1].jf = 18;
    -		bpf_insn [1].k = channel->type;
    -	}
    -	bpf_insn [3].k = channel->host [0];
    -	bpf_insn [5].k = channel->host [1];
    -	bpf_insn [7].k = channel->host [2];
    -	bpf_insn [9].k = channel->host [3];
    -	bpf_insn [11].k = channel->host [4];
    -	bpf_insn [13].k = channel->host [5];
    -	if (ioctl (channel->fd, BIOCSETF, &bpf_program) == -1)
    -	{
    -		error (1, errno, "Can't store filter: %s", channel->ifname);
    -	}
    -
    -#elif defined (WINPCAP) || defined (LIBPCAP)
    -
    -	channel->ifname = getifname (channel->ifindex);
    -	gethwaddr (channel->host, channel->ifname);
    -	channel->socket = pcap_open_live (channel->ifname, 65536, 0, channel->capture, channel->errbuf);
    -	snprintf ((char *)(channel->ifname), strlen (channel->ifname), "nic%d", channel->ifindex);
    -	if (!channel->socket)
    -	{
    -		error (1, errno, "Can't open interface: %s", channel->ifname);
    -	}
    -	bpf_program.bf_len = sizeof (bpf_insn)/sizeof (struct bpf_insn);
    -	bpf_program.bf_insns = bpf_insn;
    -	if (channel->type == ETH_P_802_2)
    -	{
    -		bpf_insn [1].code = BPF_JMP + BPF_JGT + BPF_K;
    -		bpf_insn [1].jt = 18;
    -		bpf_insn [1].jf = 0;
    -		bpf_insn [1].k = ETHERMTU;
    -	}
    -	else
    -	{
    -		bpf_insn [1].code = BPF_JMP + BPF_JEQ + BPF_K;
    -		bpf_insn [1].jt = 0;
    -		bpf_insn [1].jf = 18;
    -		bpf_insn [1].k = channel->type;
    -	}
    -	bpf_insn [3].k = channel->host [0];
    -	bpf_insn [5].k = channel->host [1];
    -	bpf_insn [7].k = channel->host [2];
    -	bpf_insn [9].k = channel->host [3];
    -	bpf_insn [11].k = channel->host [4];
    -	bpf_insn [13].k = channel->host [5];
    -	if (pcap_setfilter (channel->socket, &bpf_program) < 0)
    -	{
    -		error (1, errno, "Can't store filter: %s", channel->ifname);
    -	}
    -	if (pcap_setmintocopy (channel->socket, ETHER_MIN_LEN) < 0)
    -	{
    -		error (1, errno, "Can't set pcap mintocopy: %s", channel->ifname);
    -	}
    -
    -#else
    -#error "Unknown Environment"
    -#endif
    -#endif
    -
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/openport.c.html b/docbook/openport.c.html deleted file mode 100644 index 880b3232..00000000 --- a/docbook/openport.c.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - openport.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void openport (struct _file_ * port, flag_t flags);
    - *
    - *   open the serial port named by port->name and set file descriptor
    - *   port->file; datatype struct _file_ is define in tools/types.h;
    - *
    - *   this function no longer initializes port settings because there
    - *   are too many differences in constants, variables and functions
    - *   between Linux, OpenBSD, MacOSX and Windows to cleanly implement
    - *   a single approach to serial port configuration; this means that
    - *   users should manually configure a port and then leave it alone;
    - *
    - *   use stty on Linux systems and the Control Panel on Windows;
    - *
    - *   port configuration code for Linux and Windows can be enabled if
    - *   needed by defining SERIAL_CONFIG at compile time; this will not
    - *   restore original port setting when the port is closed;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Mathieu Olivari <mathieu@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef OPENPORT_SOURCE
    -#define OPENPORT_SOURCE
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <errno.h>
    -
    -#if defined (WIN32)
    -#	include <windows.h>
    -#elif defined (__linux__)
    -#	include <termios.h>
    -#elif defined (__APPLE__)
    -#	include <termios.h>
    -#	include <net/ethernet.h>
    -#elif defined (__OpenBSD__)
    -#	include <termios.h>
    -#else
    -#error "Unknown Environment"
    -#endif
    -
    -#include "../tools/types.h"
    -#include "../tools/files.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -#include "../serial/serial.h"
    -
    -void openport (struct _file_ * port, flag_t flags)
    -
    -{
    -
    -#if defined (WIN32)
    -
    -	HANDLE hSerial;
    -	COMMTIMEOUTS timeouts;
    -	hSerial = CreateFile (port->name, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
    -	if (hSerial == INVALID_HANDLE_VALUE)
    -	{
    -		error (1, errno, "%s", port->name);
    -	}
    -	if (_anyset (flags, UART_DEFAULT))
    -	{
    -		DCB dcbSerial =
    -		{
    -			0
    -		};
    -		dcbSerial.DCBlength = sizeof (dcbSerial);
    -		if (!GetCommState (hSerial, &dcbSerial))
    -		{
    -			error (1, errno, "Can't read state: %s", port->name);
    -		}
    -		if (_anyset (flags, UART_VERBOSE))
    -		{
    -			printf ("getting %s ", port->name);
    -			printf ("Baud %6d ", dcbSerial.BaudRate);
    -			printf ("Data %d ", dcbSerial.ByteSize);
    -			printf ("Stop %d ", dcbSerial.StopBits);
    -			printf ("Parity %d\n", dcbSerial.Parity);
    -		}
    -		dcbSerial.BaudRate = CBR_115200;
    -		dcbSerial.ByteSize = DATABITS_8;
    -		dcbSerial.StopBits = ONESTOPBIT;
    -		dcbSerial.Parity = NOPARITY;
    -		if (_anyset (flags, UART_VERBOSE))
    -		{
    -			printf ("setting %s ", port->name);
    -			printf ("Baud %6d ", dcbSerial.BaudRate);
    -			printf ("Data %d ", dcbSerial.ByteSize);
    -			printf ("Stop %d ", dcbSerial.StopBits);
    -			printf ("Parity %d\n", dcbSerial.Parity);
    -		}
    -		if (!SetCommState (hSerial, &dcbSerial))
    -		{
    -			error (1, errno, "Can't save state: %s", port->name);
    -		}
    -	}
    -	timeouts.ReadIntervalTimeout = 10;
    -	timeouts.ReadTotalTimeoutConstant = 50;
    -	timeouts.ReadTotalTimeoutMultiplier = 10;
    -	timeouts.WriteTotalTimeoutConstant = 50;
    -	timeouts.WriteTotalTimeoutMultiplier = 10;
    -	if (!SetCommTimeouts (hSerial, &timeouts))
    -	{
    -		error (1, errno, "Can't set timeouts: %s", port->name);
    -	}
    -	CloseHandle (hSerial);
    -	if ((port->file = open (port->name, O_BINARY|O_RDWR)) == -1)
    -	{
    -		error (1, errno, "%s", port->name);
    -	}
    -
    -#else
    -
    -	if ((port->file = open (port->name, O_BINARY|O_RDWR)) == -1)
    -	{
    -		error (1, errno, "%s", port->name);
    -	}
    -	if (_anyset (flags, UART_DEFAULT))
    -	{
    -		struct termios termios;
    -
    -#if 1
    -
    -/*
    - *	POSIX generic code;
    - */
    -
    -		tcgetattr (port->file, &termios);
    -		cfmakeraw (&termios);
    -		termios.c_cflag |= CS8;
    -		termios.c_cflag &= ~(CSTOPB);
    -		cfsetospeed (&termios, B115200);
    -
    -#else
    -
    -/*
    - *	Linux specific code;
    - */
    -
    -		termios.c_cflag = B115200 | CS8 | CLOCAL | CREAD;
    -		termios.c_iflag = IGNPAR;
    -		termios.c_oflag = 0;
    -		termios.c_lflag = 0;
    -		termios.c_cc [VTIME] = 0;
    -		termios.c_cc [VMIN] = 5;
    -
    -#endif
    -
    -		tcsetattr (port->file, TCSANOW, &termios);
    -	}
    -
    -#endif
    -
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/output.c.html b/docbook/output.c.html deleted file mode 100644 index 2713b4ca..00000000 --- a/docbook/output.c.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - output.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void output (signed indent, char const * format, ...);
    - *
    - *   format.h
    - *
    - *   print an indented and formatted string on stdout;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef OUTPUT_SOURCE
    -#define OUTPUT_SOURCE
    -
    -#include <stdio.h>
    -#include <stdarg.h>
    -#include <unistd.h>
    -
    -#include "../tools/format.h"
    -
    -#ifdef __GNUC__
    -
    -__attribute__ ((format (printf, 2, 3)))
    -
    -#endif
    -
    -void output (signed indent, char const * format, ...)
    -
    -{
    -	static char tab = '\t';
    -	static char end = '\n';
    -	while (indent-- > 0)
    -	{
    -		putc (tab, stdout);
    -	}
    -	if ((format) && (*format))
    -	{
    -		va_list arglist;
    -		va_start (arglist, format);
    -		vprintf (format, arglist);
    -		va_end (arglist);
    -	}
    -	putc (end, stdout);
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/overview.xml b/docbook/overview.xml deleted file mode 100644 index 411b6f05..00000000 --- a/docbook/overview.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - Overview - -
    - - Introduction - - - The Open Powerline Toolkit (vanilla version) may be downloaded from https://github.com/qca/open-plc-utils.git by any interested party. An advanced version (chocolate version) may be downloaded from the Qualcomm Atheros Customer FTP site by parties having permission to do so. The chocolate version includes special programs that perform advanced engineering, production and maintenance tasks. Within this document, we refer to both versions, collectively, as the toolkit. - - - The toolkit contains C Language source code and GNU makefiles to compile many useful programs. It also includes Linux shell scripts that use these programs, in various ways, to interrogate, control and manage Qualcomm Atheros INT6000, INT6300, INT6400, AR7400 and later powerline devices. Qualcomm Atheros also provides a similar, but less extensive, toolkit for INT5500 powerline devices. - - - The toolkit is intended for hardware engineers, verification engineers, field engineers and embedded software developers, consequently, programs are simple and compact. It is not intended for computer novices or retail users. Many customers embed a subset of toolkit programs in products for troubleshooting purposes. - - - The toolkit includes extensive HTML documentation and online man pages for users who cannot access installed man pages. HTML documentation starts with file docbook/index.html. Online man pages start with file docbook/toolkit.html. Qualcomm Atheros recommends that you add these two pages to your browser favorites for later reference. - - - All toolkit programs are written in C and have command line intefaces. The source code essentially conforms to ISO/IEC9899:1999. The source tree cleanly compiles using gcc or pcc on Ubuntu, OpenBSD and MacOSX. It also compiles under Microsoft C with the inclusion of special header files. The command line interface conforms to Section 12.2 Utility Syntax Guidelines of The Open Group Base Specification Issue 6 ( -IEEE Std 1003.1, 2004 Edition). - - - The toolkit includes Microsoft Visual Studio .NET project files and solutions files to compile toolkit programs, plus the executable version (.exe) of each program and a set of Microsoft installation file (.msi) so that the toolkit package comes ready to install and run on any Windows host; however, Qualcomm Atheros does not provide support for Microsoft windows version of this toolkit. Toolkit documentation does provide Windows developers with special guidance on setting up their own Visual Studio projects and solutions, should they want to do that. - -
    -
    - - Background - - - HomePlug AV is an industry standard protocol for powerline communications developed by the HomePlug Powerline Alliance. Qualcomm Atheros manufactures a family of chipsets that conform to that standard and have MII, UART and SPI host interfaces. The INT6x00 and AR7x00 series are flagship members of that chipset family. The principle difference between the chipsets is their boot method, cost and speed. The INT6000 requires onboard NVRAM but the INT6300, INT6400 and AR7400 do not. - - - The HomePlug AV protocol is based on IEEE-802.3, has ethertype 0x88E1 and uses special message formats. A subset of those message formats is reserved for each chipset vendor to define their own message formats. Qualcomm Atheros uses this vendor-specific subset to communicate between host processors and Qualcomm Atheros devices. This toolkit uses Qualcomm Atheros vendor-specific message formats to communicates with Qualcomm Atheros devices. It also understands Qualcomm Atheros firmware and configuration file formats. - - - This toolkit sends and receives Qualcomm Atheros vendor-specific messages but not generic HomePlug AV messages. Qualcomm Atheros vendor-specific management message formats are described in the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual. If you do not have a copy of this document then you may request one from Qualcomm Atheros. - -
    -
    - - Toolkit Distribution - - - The Qualcomm Atheros Open Powerline Toolkit is distributed using compressed tape archive files named open-plc-utils-x.x.x.tar.gz and open-plc-utils-x.x.x.tar.bz2 and standard compressed archive file named open-plc-utils-x.x.x.zip, where x.x.x is the version number. Archive files ending in .gz can be decompressed with the Linux gzip utility. Archive files ending in .bz2 can be decompressed with the Linux bzip2 utility. Archive files ending in .zip can be decompressed using the Linux unzip utility or the Windows WinZip utility. The contents of decompressed archives can be extracted using the Linux tar utility. Recent versions of the Linux tar utility allow decompression and extraction in one operation. The WinZip or 7-zip program may be used to decompress archives and extract contents on Microsoft Windows platforms. - - - Some Windows network administrators enable security software that removes .exe and other executable files from .zip archives in transit or in-situ. In that case, Windows user may want to download the *.tar.gz archive and use a program like 7zip to unpack the archive file. - - - The toolkit includes source code, build scripts, documentation and pre-compiled programs for Microsoft Windows. Some third party libraries may also be included to support Microsoft platforms. Although the Microsoft Windows versions of toolkit programs are pre-compiled and ready-to-run, they are not supported because this package is designed for use on Linux platforms. - - - The Windows installer included in this version of the toolkit needs Microsoft .NET 1.1. Windows versions of toolkit programs that communicate with powerline devices need WinPcap 4.1.2 or later. A copy of Microsoft .NET 1.1 and WinPcap 4.1.2 is included in the support folder. - -
    - &install; - &programs; - &folders; -
    - - Packages - - - The following table lists programs and the release packages that contains them. Packages contain programs of interest to various customer and engineering groups based on the activities that they normally perform. Some groups may need multiple packages. Some packages are restricted. - - &packages; -
    -
    - - Toolkit Support - - - Contact the Qualcomm Atheros System Application Engineering Team if you have questions concerning the content, operation, application or direction of this toolkit on GNU/Linux systems. If you are having trouble communicating with Qualcomm Atheros powerline devices using the toolkit, try following the troubleshooting procedure found later in this document. - -
    -
    diff --git a/docbook/packages.xml b/docbook/packages.xml deleted file mode 100644 index 9d4427b7..00000000 --- a/docbook/packages.xml +++ /dev/null @@ -1,3381 +0,0 @@ - - - Program/Package Matrix - - - The toolkit is divided into 5 groups loosely based on chipset family, intended audience, network security, intellectual property, code maturity and other criteria. Some individual programs may be hard to classify and so their placement may be subject to some debate. - - - - - amp-utils - - - Tools developed for INT6000, INT6300, INT6400 and AR7400 chipsets. -Some are obsolete but most are still useful. -This package is a candidate for public distribution under a permissive open source license. - - - - - plc-utils - - - Tools developed for QCA6410, QCA7000 and AR7420 chipsets. -These tools handle the newer files formats, hardware boot conventsions and flash memory layouts for chipsets having fixed internal SRAM. -This package is a candidate for public distribution under a permissive open source license. - - - - - nda-utils - - - Tools designed to manipulate parameter blocks or access reserved or restricted features on powerline devices. -Most are useful during powerline product development and production but are not needed for proper product operation or maintenance. -This package is reserved for Qualcomm Atheros customers who sign a non-disclosure agreement covering Qualcomm Atheros intellectual property. -Parts of this package are candidates for some sort of restrictive license. - - - - - key-utils - - - Tools that generate HomePlug AV compliant keys from device MAC address or user passwords. -This package is reserved for Qualcomm Atheros customers who sign a non-disclosure agreement related to Qualcomm Atheros powerline intellectual property. -Parts of this package are candidates for some sort of restrictive license. - - - - - qca-utils - - - Tools that perform restricted or experiemental operations on active powerline devices or parameter information blocks. -Some of these tools here are one-of-a-kind or could present security risks to active powerline networks. -This package not not released to customers. It is reserved for Qualcomm Atheros PLC Engineering use. -Most of this package is a candidate for restrictive license. - - - - - Matrix - - - - - - - - - - - - - - Program - - - amp-utils - - - plc-utils - - - nda-utils - - - key-utils - - - qca-utils - - - source-only - - - deprecated - - - - - - - CMEncrypt - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - adccap - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - ampagc - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - ampboot - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - amphost - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - ampinit - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - ampID - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - amplist - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - amprate - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - ampsnr - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - ampstat - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - amptest - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - amptone - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - amptool - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - ampwait - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - arpc - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - arpc1 - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - chknvm - - - amp-utils - - - plc-utils - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - chknvm2 - - - amp-utils - - - plc-utils - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - chkpib - - - amp-utils - - - plc-utils - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - chkpib2 - - - amp-utils - - - plc-utils - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - config2cfg - - -   - - -   - - -   - - -   - - -   - - - source-only - - -   - - - - - coqos_add - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - coqos_info - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - coqos_man - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - coqos_mod - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - coqos_rel - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - dlinkug - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - edru - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - edsu - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - efbu - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - efeu - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - efru - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - efsu - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - fetchpib - - -   - - -   - - -   - - -   - - -   - - - source-only - - -   - - - - - getpib - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - grab - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - hpav - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - hpavkey - - -   - - -   - - - nda-utils - - - key-utils - - - qca-utils - - -   - - -   - - - - - hpavkeys - - -   - - -   - - - nda-utils - - - key-utils - - - qca-utils - - -   - - -   - - - - - int64host - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6k - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kbaud - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kboot - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kdetect - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kecho - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - int6keth - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - int6khost - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - - deprecated - - - - - int6kid - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6klist - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6klog - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kmdio - - - amp-utils - - -   - - -   - - -   - - -   - - -   - - - deprecated - - - - - int6kmdio2 - - - amp-utils - - -   - - -   - - -   - - -   - - -   - - - deprecated - - - - - int6kmod - - - amp-utils - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - int6kp - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - int6kpair - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kprobe - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - int6krate - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6krule - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kstat - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6ktest - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6ktone - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kuart - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kug - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - int6kwait - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - mac2pw - - -   - - -   - - - nda-utils - - - key-utils - - - qca-utils - - -   - - -   - - - - - mac2pwd - - -   - - -   - - - nda-utils - - - key-utils - - - qca-utils - - -   - - -   - - - - - mdioblock - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - mdioblock2 - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - mdiodump - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - mdustats - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - mme - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - modpib - - - amp-utils - - - plc-utils - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - mrgpib - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - netifs - - - amp-utils - - - plc-utils - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - nvmmerge - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - nvmsplit - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - odc - - -   - - -   - - -   - - -   - - -   - - -   - - - deprecated - - - - - odd - - -   - - -   - - -   - - -   - - -   - - -   - - - deprecated - - - - - odx - - -   - - -   - - -   - - -   - - -   - - -   - - - deprecated - - - - - pcapdevs - - - amp-utils - - - plc-utils - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - pib2xml - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - pibcomp - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - pibdump - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - pibruin - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - pibrump - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - plcboot - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcecho - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - plcfwd - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcget - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plchost - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcId - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcinit - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - plclist - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcm - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcmmcinfo - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - plcmdio16 - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcmdio32 - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcmod - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - plcnets - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcrate - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcrule - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcset - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcstat - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcsnif - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plctest - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plctone - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plctool - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - plcwait - - -   - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - po1 - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - po2 - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - -   - - - - - psgen - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - psin - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - pskey - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - psnotch - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - psout - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - ptsctl - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - pxe - - -   - - -   - - -   - - -   - - -   - - -   - - - deprecated - - - - - rkey - - -   - - -   - - - nda-utils - - - key-utils - - - qca-utils - - -   - - -   - - - - - sada - - - amp-utils - - - plc-utils - - -   - - -   - - - qca-utils - - -   - - -   - - - - - sdram - - - amp-utils - - -   - - -   - - -   - - - qca-utils - - -   - - - deprecated - - - - - setpib - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - slac - - -   - - -   - - -   - - -   - - - qca-utils - - -   - - - deprecated - - - - - throwpib - - -   - - -   - - -   - - -   - - -   - - - source-only - - -   - - - - - weeder - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - - xml2pib - - -   - - -   - - - nda-utils - - -   - - - qca-utils - - -   - - -   - - - - -
    diff --git a/docbook/param.xsl b/docbook/param.xsl deleted file mode 100644 index 2f061581..00000000 --- a/docbook/param.xsl +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - - - -images/ - - margin-left: 0.5in; margin-right: 0.5in; - - - - - - - -. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -::= - - - - - -DocBook Online Help Sample -com.example.help -Example provider - - - - - - - - -figure before -example before -equation before -table before -procedure before -task before - - -ansi - -1 - - - - - - - -appendix toc,title -article/appendix nop -article toc,title -book toc,title,figure,table,example,equation -chapter toc,title -part toc,title -preface toc,title -qandadiv toc -qandaset toc -reference toc,title -sect1 toc -sect2 toc -sect3 toc -sect4 toc -sect5 toc -section toc -set toc,title - - - - - - - - - - - - - - - - -docbook.css -text/css - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -images/ -1 - - - - - - - -no - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -number - - - - - - - - - - - - - - - - - 0 - #E0E0E0 - - -1 -0 - - -0 -0 -0 - - - - - - - - - - - - - - - - - - - -dl -2 -8 - - - - - - - - - - -: - - -no - - - 0px - 0px - 0px - - - - -1 - - - - - - - - - - - -lr-tb - - - diff --git a/docbook/part0.txt b/docbook/part0.txt deleted file mode 100644 index 32fb53ec..00000000 --- a/docbook/part0.txt +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Qualcomm Atheros Open Powerline Toolkit - - - - - -

    - Qualcomm Atheros Open Powerline Toolkit -

    -

    The following is an alphabetical index of the manual pages, header files, source files, scripts and applets that comprise the Qualcomm Atheros Open Powerline Toolkit. It is provided for those who do not have access to on-line manual pages or want to browse through the software.

    diff --git a/docbook/part1.txt b/docbook/part1.txt deleted file mode 100644 index eb23c150..00000000 --- a/docbook/part1.txt +++ /dev/null @@ -1,3 +0,0 @@ -

    - Manual Pages -

    diff --git a/docbook/part2.txt b/docbook/part2.txt deleted file mode 100644 index f807e294..00000000 --- a/docbook/part2.txt +++ /dev/null @@ -1,3 +0,0 @@ -

    - Header Files -

    diff --git a/docbook/part3.txt b/docbook/part3.txt deleted file mode 100644 index 755f6dea..00000000 --- a/docbook/part3.txt +++ /dev/null @@ -1,3 +0,0 @@ -

    - Header Files -

    diff --git a/docbook/part4.txt b/docbook/part4.txt deleted file mode 100644 index 37d8f586..00000000 --- a/docbook/part4.txt +++ /dev/null @@ -1,3 +0,0 @@ -

    - Source Files -

    diff --git a/docbook/part5.txt b/docbook/part5.txt deleted file mode 100644 index 0c251027..00000000 --- a/docbook/part5.txt +++ /dev/null @@ -1,3 +0,0 @@ -

    - Source Files -

    diff --git a/docbook/part6.txt b/docbook/part6.txt deleted file mode 100644 index aed96025..00000000 --- a/docbook/part6.txt +++ /dev/null @@ -1,3 +0,0 @@ -

    - Script Files -

    diff --git a/docbook/part7.txt b/docbook/part7.txt deleted file mode 100644 index 752c7850..00000000 --- a/docbook/part7.txt +++ /dev/null @@ -1,3 +0,0 @@ -

    - Applet Files -

    diff --git a/docbook/part8.txt b/docbook/part8.txt deleted file mode 100644 index 6ff2f47d..00000000 --- a/docbook/part8.txt +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/docbook/pcap-bpf.h.html b/docbook/pcap-bpf.h.html deleted file mode 100644 index e10a3d73..00000000 --- a/docbook/pcap-bpf.h.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - pcap-bpf.h - - - - - - - - - -
    -/*-
    - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
    - *	The Regents of the University of California.  All rights reserved.
    - *
    - * This code is derived from the Stanford/CMU enet packet filter,
    - * (net/enet.c) distributed as part of 4.3BSD, and code contributed
    - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 
    - * Berkeley Laboratory.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - * 1. Redistributions of source code must retain the above copyright
    - *    notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - *    notice, this list of conditions and the following disclaimer in the
    - *    documentation and/or other materials provided with the distribution.
    - * 3. All advertising materials mentioning features or use of this software
    - *    must display the following acknowledgement:
    - *      This product includes software developed by the University of
    - *      California, Berkeley and its contributors.
    - * 4. Neither the name of the University nor the names of its contributors
    - *    may be used to endorse or promote products derived from this software
    - *    without specific prior written permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    - * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    - * SUCH DAMAGE.
    - *
    - * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.50 2007/04/01 21:43:55 guy Exp $ (LBL)
    - */
    -
    -/*
    - * For backwards compatibility.
    - *
    - * Note to OS vendors: do NOT get rid of this file!  Some applications
    - * might expect to be able to include <pcap-bpf.h>.
    - */
    -#include <pcap/bpf.h>
    -
    - - - diff --git a/docbook/pcap-int.h.html b/docbook/pcap-int.h.html deleted file mode 100644 index 6172dca1..00000000 --- a/docbook/pcap-int.h.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - pcap-int.h - - - - - - - - - -
    -/*
    - * Copyright (c) 1994, 1995, 1996
    - *	The Regents of the University of California.  All rights reserved.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - * 1. Redistributions of source code must retain the above copyright
    - *    notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - *    notice, this list of conditions and the following disclaimer in the
    - *    documentation and/or other materials provided with the distribution.
    - * 3. All advertising materials mentioning features or use of this software
    - *    must display the following acknowledgement:
    - *	This product includes software developed by the Computer Systems
    - *	Engineering Group at Lawrence Berkeley Laboratory.
    - * 4. Neither the name of the University nor of the Laboratory may be used
    - *    to endorse or promote products derived from this software without
    - *    specific prior written permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    - * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    - * SUCH DAMAGE.
    - *
    - * @(#) $Header: /home/cvs/plc-utils/VisualStudioNET/include/pcap-int.h,v 1.1.1.1 2011-08-27 15:30:16 cmaier Exp $ (LBL)
    - */
    -
    -#ifndef pcap_int_h
    -#define pcap_int_h
    -
    -#ifdef __cplusplus
    -
    -extern "C" 
    -
    -{
    -
    -#endif
    -
    -#include <pcap.h>
    -
    -#ifdef WIN32
    -#include <Packet32.h>
    -#endif /* WIN32 */
    -
    -#ifdef MSDOS
    -#include <fcntl.h>
    -#include <io.h>
    -#endif
    -
    -/*
    - * Savefile
    - */
    -
    -	typedef enum 
    -	{
    -		NOT_SWAPPED,
    -		SWAPPED,
    -		MAYBE_SWAPPED 
    -	}
    -	swapped_type_t;
    -	struct pcap_sf 
    -	{
    -		FILE *rfile;
    -		int swapped;
    -		int hdrsize;
    -		swapped_type_t lengths_swapped;
    -		int version_major;
    -		int version_minor;
    -		u_char *base;
    -	};
    -	struct pcap_md 
    -	{
    -		struct pcap_stat stat;
    -
    -/*XXX*/
    -
    -		int use_bpf;
    -
    -/* using kernel filter */
    -
    -		u_long TotPkts;
    -
    -/* can't oflow for 79 hrs on ether */
    -
    -		u_long TotAccepted;
    -
    -/* count accepted by filter */
    -
    -		u_long TotDrops;
    -
    -/* count of dropped packets */
    -
    -		long TotMissed;
    -
    -/* missed by i/f during this run */
    -
    -		long OrigMissed;
    -
    -/* missed by i/f before this run */
    -
    -		char *device;
    -
    -/* device name */
    -
    -#ifdef linux
    -
    -		int sock_packet;
    -
    -/* using Linux 2.0 compatible interface */
    -
    -		int timeout;
    -
    -/* timeout specified to pcap_open_live */
    -
    -		int clear_promisc;
    -
    -/* must clear promiscuous mode when we close */
    -
    -		int cooked;
    -
    -/* using SOCK_DGRAM rather than SOCK_RAW */
    -
    -		int ifindex;
    -
    -/* interface index of device we're bound to */
    -
    -		int lo_ifindex;
    -
    -/* interface index of the loopback device */
    -
    -		struct pcap *next;
    -
    -/* list of open promiscuous sock_packet pcaps */
    -
    -		u_int packets_read;
    -
    -/* count of packets read with recvfrom() */
    -
    -#endif
    -
    -#ifdef HAVE_DAG_API
    -#ifdef HAVE_DAG_STREAMS_API
    -
    -		u_char *dag_mem_bottom;
    -
    -/* DAG card current memory bottom pointer */
    -
    -		u_char *dag_mem_top;
    -
    -/* DAG card current memory top pointer */
    -
    -#else
    -
    -		void *dag_mem_base;
    -
    -/* DAG card memory base address */
    -
    -		u_int dag_mem_bottom;
    -
    -/* DAG card current memory bottom offset */
    -
    -		u_int dag_mem_top;
    -
    -/* DAG card current memory top offset */
    -
    -#endif /* HAVE_DAG_STREAMS_API */
    -
    -		int dag_fcs_bits;
    -
    -/* Number of checksum bits from link layer */
    -
    -		int dag_offset_flags;
    -
    -/* Flags to pass to dag_offset(). */
    -
    -		int dag_stream;
    -
    -/* DAG stream number */
    -
    -		int dag_timeout;
    -
    -/* timeout specified to pcap_open_live.
    - * Same as in linux above, introduce
    - * generally? */
    -
    -#endif /* HAVE_DAG_API */
    -
    -#ifdef HAVE_REMOTE
    -
    -/*!
    - *   There is really a mess with previous variables, and it seems to me that they are not used
    - *   (they are used in pcap_pf.c only). I think we have to start using them.
    - *   The meaning is the following:
    - *   
    - *   - TotPkts: the amount of packets received by the bpf filter, *before* applying the filter
    - *   - TotAccepted: the amount of packets that satisfies the filter
    - *   - TotDrops: the amount of packet that were dropped into the kernel buffer because of lack of space
    - *   - TotMissed: the amount of packets that were dropped by the physical interface; it is basically 
    - *   the value of the hardware counter into the card. This number is never put to zero, so this number
    - *   takes into account the *total* number of interface drops starting from the interface power-on.
    - *   - OrigMissed: the amount of packets that were dropped by the interface *when the capture begins*.
    - *   This value is used to detect the number of packets dropped by the interface *during the present
    - *   capture*, so that (ps_ifdrops= TotMissed - OrigMissed).
    - */
    -
    -		unsigned int TotNetDrops;
    -
    -//!< keeps the number of packets that have been dropped by the network
    -/*!
    - *   \brief It keeps the number of packets that have been received by the application.
    - *   
    - *   Packets dropped by the kernel buffer are not counted in this variable. The variable is always 
    - *   equal to (TotAccepted - TotDrops), exept for the case of remote capture, in which we have also
    - *   packets in fligh, i.e. that have been transmitted by the remote host, but that have not been 
    - *   received (yet) from the client. In this case, (TotAccepted - TotDrops - TotNetDrops) gives a
    - *   wrong result, since this number does not corresponds always to the number of packet received by 
    - *   the application. For this reason, in the remote capture we need another variable that takes
    - *   into account of the number of packets actually received by the application.
    - */
    -
    -		unsigned int TotCapt;
    -
    -#endif /* HAVE_REMOTE */
    -
    -	};
    -
    -/*
    - * Ultrix, DEC OSF/1^H^H^H^H^H^H^H^H^HDigital UNIX^H^H^H^H^H^H^H^H^H^H^H^H
    - * Tru64 UNIX, and NetBSD pad to make everything line up on a nice boundary.
    - */
    -
    -#if defined(ultrix) || defined(__osf__) || (defined(__NetBSD__) && __NetBSD_Version__ > 106000000)
    -#define       PCAP_FDDIPAD 3
    -#endif
    -
    -	struct pcap 
    -	{
    -
    -#ifdef WIN32
    -
    -		ADAPTER *adapter;
    -		LPPACKET Packet;
    -		int timeout;
    -		int nonblock;
    -
    -#else
    -
    -		int fd;
    -		int selectable_fd;
    -		int send_fd;
    -
    -#endif /* WIN32 */
    -
    -		int snapshot;
    -		int linktype;
    -		int tzoff;
    -
    -/* timezone offset */
    -
    -		int offset;
    -
    -/* offset for proper alignment */
    -
    -		int break_loop;
    -
    -/* flag set to force break from packet-reading loop */
    -
    -#ifdef PCAP_FDDIPAD
    -
    -		int fddipad;
    -
    -#endif
    -
    -#ifdef MSDOS
    -
    -		int inter_packet_wait;
    -
    -/* offline: wait between packets */
    -
    -		void (*wait_proc)(void);
    -
    -/*          call proc while waiting */
    -
    -#endif
    -
    -		struct pcap_sf sf;
    -		struct pcap_md md;
    -
    -/*
    - * Read buffer.
    - */
    -
    -		int bufsize;
    -		u_char *buffer;
    -		u_char *bp;
    -		int cc;
    -
    -/*
    - * Place holder for pcap_next().
    - */
    -
    -		u_char *pkt;
    -
    -/* We're accepting only packets in this direction/these directions. */
    -
    -		pcap_direction_t direction;
    -
    -/*
    - * Methods.
    - */
    -
    -		int (*read_op)(pcap_t *, int cnt, pcap_handler, u_char *);
    -		int (*inject_op)(pcap_t *, const void *, size_t);
    -		int (*setfilter_op)(pcap_t *, struct bpf_program *);
    -		int (*setdirection_op)(pcap_t *, pcap_direction_t);
    -		int (*set_datalink_op)(pcap_t *, int);
    -		int (*getnonblock_op)(pcap_t *, char *);
    -		int (*setnonblock_op)(pcap_t *, int, char *);
    -		int (*stats_op)(pcap_t *, struct pcap_stat *);
    -		void (*close_op)(pcap_t *);
    -
    -/*
    - * Placeholder for filter code if bpf not in kernel.
    - */
    -
    -		struct bpf_program fcode;
    -		char errbuf [PCAP_ERRBUF_SIZE + 1];
    -		int dlt_count;
    -		u_int *dlt_list;
    -		struct pcap_pkthdr pcap_header;
    -
    -/* This is needed for the pcap_next_ex() to work */
    -
    -#ifdef HAVE_REMOTE
    -#ifndef WIN32	// Win32 already defines 'timeout'
    -
    -		int timeout;
    -
    -//!< timeout to be used in the pcap_open()
    -
    -#endif
    -
    -/*! \brief '1' if we're the network client; needed by several functions (like pcap_setfilter() ) to know if 
    - *   they have to use the socket or they have to open the local adapter. */
    -
    -		int rmt_clientside;
    -		SOCKET rmt_sockctrl;
    -
    -//!< socket ID of the socket used for the control connection
    -
    -		SOCKET rmt_sockdata;
    -
    -//!< socket ID of the socket used for the data connection
    -
    -		int rmt_flags;
    -
    -//!< we have to save flags, since they are passed by the pcap_open_live(), but they are used by the pcap_startcapture()
    -
    -		int rmt_capstarted;
    -
    -//!< 'true' if the capture is already started (needed to knoe if we have to call the pcap_startcapture()
    -
    -		struct pcap_samp rmt_samp;
    -
    -//!< Keeps the parameters related to the sampling process.
    -
    -		char *currentfilter;
    -
    -//!< Pointer to a buffer (allocated at run-time) that stores the current filter. Needed when flag PCAP_OPENFLAG_NOCAPTURE_RPCAP is turned on.
    -
    -#endif /* HAVE_REMOTE */
    -
    -	};
    -
    -/*
    - * This is a timeval as stored in a savefile.
    - * It has to use the same types everywhere, independent of the actual
    - * `struct timeval'; `struct timeval' has 32-bit tv_sec values on some
    - * platforms and 64-bit tv_sec values on other platforms, and writing
    - * out native `struct timeval' values would mean files could only be
    - * read on systems with the same tv_sec size as the system on which
    - * the file was written.
    - */
    -
    -	struct pcap_timeval 
    -	{
    -		bpf_int32 tv_sec;
    -
    -/* seconds */
    -
    -		bpf_int32 tv_usec;
    -
    -/* microseconds */
    -
    -	};
    -
    -/*
    - * This is a `pcap_pkthdr' as actually stored in a savefile.
    - *
    - * Do not change the format of this structure, in any way (this includes
    - * changes that only affect the length of fields in this structure),
    - * and do not make the time stamp anything other than seconds and
    - * microseconds (e.g., seconds and nanoseconds).  Instead:
    - *
    - *	introduce a new structure for the new format;
    - *
    - *	send mail to "tcpdump-workers@tcpdump.org", requesting a new
    - *	magic number for your new capture file format, and, when
    - *	you get the new magic number, put it in "savefile.c";
    - *
    - *	use that magic number for save files with the changed record
    - *	header;
    - *
    - *	make the code in "savefile.c" capable of reading files with
    - *	the old record header as well as files with the new record header
    - *	(using the magic number to determine the header format).
    - *
    - * Then supply the changes to "patches@tcpdump.org", so that future
    - * versions of libpcap and programs that use it (such as tcpdump) will
    - * be able to read your new capture file format.
    - */
    -
    -	struct pcap_sf_pkthdr 
    -	{
    -		struct pcap_timeval ts;
    -
    -/* time stamp */
    -
    -		bpf_u_int32 caplen;
    -
    -/* length of portion present */
    -
    -		bpf_u_int32 len;
    -
    -/* length this packet (off wire) */
    -
    -	};
    -
    -/*
    - * How a `pcap_pkthdr' is actually stored in savefiles written
    - * by some patched versions of libpcap (e.g. the ones in Red
    - * Hat Linux 6.1 and 6.2).
    - *
    - * Do not change the format of this structure, in any way (this includes
    - * changes that only affect the length of fields in this structure).
    - * Instead, introduce a new structure, as per the above.
    - */
    -
    -	struct pcap_sf_patched_pkthdr 
    -	{
    -		struct pcap_timeval ts;
    -
    -/* time stamp */
    -
    -		bpf_u_int32 caplen;
    -
    -/* length of portion present */
    -
    -		bpf_u_int32 len;
    -
    -/* length this packet (off wire) */
    -
    -		int index;
    -		unsigned short protocol;
    -		unsigned char pkt_type;
    -	};
    -	int yylex (void);
    -
    -#ifndef min
    -#define min(a, b) ((a) > (b) ? (b) : (a))
    -#endif
    -
    -/* XXX should these be in pcap.h? */
    -
    -	int pcap_offline_read (pcap_t *, int, pcap_handler, u_char *);
    -	int pcap_read (pcap_t *, int cnt, pcap_handler, u_char *);
    -
    -#ifndef HAVE_STRLCPY
    -#define strlcpy(x, y, z) \
    -	(strncpy ((x), (y), (z)), \ ((z) <= 0? 0: ((x)[(z) - 1] = '\0')), \ strlen ((y))) 
    -
    -#endif
    -
    -#include <stdarg.h>
    -
    -#if !defined(HAVE_SNPRINTF)
    -#define snprintf pcap_snprintf
    -
    -	extern int snprintf (char *, size_t, const char *, ...);
    -
    -#endif
    -
    -#if !defined(HAVE_VSNPRINTF)
    -#define vsnprintf pcap_vsnprintf
    -
    -	extern int vsnprintf (char *, size_t, const char *, va_list ap);
    -
    -#endif
    -
    -/*
    - * Routines that most pcap implementations can use for non-blocking mode.
    - */
    -
    -#if !defined(WIN32) && !defined(MSDOS)
    -
    -	int pcap_getnonblock_fd (pcap_t *, char *);
    -	int pcap_setnonblock_fd (pcap_t *p, int, char *);
    -
    -#endif
    -
    -	void pcap_close_common (pcap_t *);
    -
    -/*
    - * Internal interfaces for "pcap_findalldevs()".
    - *
    - * "pcap_platform_finddevs()" is a platform-dependent routine to
    - * add devices not found by the "standard" mechanisms (SIOCGIFCONF,
    - * "getifaddrs()", etc..
    - *
    - * "pcap_add_if()" adds an interface to the list of interfaces.
    - */
    -
    -	int pcap_platform_finddevs (pcap_if_t **, char *);
    -	int add_addr_to_iflist (pcap_if_t **, const char *, u_int, struct sockaddr *, size_t, struct sockaddr *, size_t, struct sockaddr *, size_t, struct sockaddr *, size_t, char *);
    -	int pcap_add_if (pcap_if_t **, const char *, u_int, const char *, char *);
    -	struct sockaddr *dup_sockaddr (struct sockaddr *, size_t);
    -	int add_or_find_if (pcap_if_t **, pcap_if_t **, const char *, u_int, const char *, char *);
    -
    -#ifdef WIN32
    -
    -	char *pcap_win32strerror (void);
    -
    -#endif
    -
    -	int install_bpf_program (pcap_t *, struct bpf_program *);
    -	int pcap_strcasecmp (const char *, const char *);
    -
    -#ifdef __cplusplus
    -
    -}
    -
    -#endif
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pcap-stdinc.h.html b/docbook/pcap-stdinc.h.html deleted file mode 100644 index 88af4cce..00000000 --- a/docbook/pcap-stdinc.h.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - pcap-stdinc.h - - - - - - - - - -
    -/*
    - * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
    - * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California)
    - * All rights reserved.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - *
    - * 1. Redistributions of source code must retain the above copyright
    - * notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - * notice, this list of conditions and the following disclaimer in the
    - * documentation and/or other materials provided with the distribution.
    - * 3. Neither the name of the Politecnico di Torino nor the names of its
    - * contributors may be used to endorse or promote products derived from
    - * this software without specific prior written permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    - *
    - * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL)
    - */
    -
    -#define SIZEOF_CHAR 1
    -#define SIZEOF_SHORT 2
    -#define SIZEOF_INT 4
    -#ifndef _MSC_EXTENSIONS
    -#define SIZEOF_LONG_LONG 8
    -#endif
    -
    -/*
    - * Avoids a compiler warning in case this was already defined      
    - * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
    - * to prevent it from including 'winsock.h')
    - */
    -#ifdef _WINSOCKAPI_
    -#undef _WINSOCKAPI_
    -#endif
    -#include <winsock2.h>
    -
    -#include <fcntl.h>
    -
    -#include "bittypes.h"
    -#include <time.h>
    -#include <io.h>
    -
    -#ifndef __MINGW32__
    -#include "IP6_misc.h"
    -#endif
    -
    -#define caddr_t char*
    -
    -#if _MSC_VER < 1500
    -#define snprintf _snprintf
    -#define vsnprintf _vsnprintf
    -#define strdup _strdup
    -#endif
    -
    -#define inline __inline 
    -
    -#ifdef __MINGW32__
    -#include <stdint.h>
    -#else /*__MINGW32__*/
    -/* MSVC compiler */
    -#ifndef _UINTPTR_T_DEFINED
    -#ifdef  _WIN64
    -typedef unsigned __int64    uintptr_t;
    -#else
    -typedef _W64 unsigned int   uintptr_t;
    -#endif
    -#define _UINTPTR_T_DEFINED
    -#endif
    -
    -#ifndef _INTPTR_T_DEFINED
    -#ifdef  _WIN64
    -typedef __int64    intptr_t;
    -#else
    -typedef _W64 int   intptr_t;
    -#endif
    -#define _INTPTR_T_DEFINED
    -#endif 
    -
    -#endif /*__MINGW32__*/
    -
    - - - diff --git a/docbook/pcap.h.html b/docbook/pcap.h.html deleted file mode 100644 index 949059eb..00000000 --- a/docbook/pcap.h.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - pcap.h - - - - - - - - - -
    -/*
    - * Copyright (c) 1993, 1994, 1995, 1996, 1997
    - *	The Regents of the University of California.  All rights reserved.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - * 1. Redistributions of source code must retain the above copyright
    - *    notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - *    notice, this list of conditions and the following disclaimer in the
    - *    documentation and/or other materials provided with the distribution.
    - * 3. All advertising materials mentioning features or use of this software
    - *    must display the following acknowledgement:
    - *	This product includes software developed by the Computer Systems
    - *	Engineering Group at Lawrence Berkeley Laboratory.
    - * 4. Neither the name of the University nor of the Laboratory may be used
    - *    to endorse or promote products derived from this software without
    - *    specific prior written permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    - * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    - * SUCH DAMAGE.
    - *
    - * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL)
    - */
    -
    -/*
    - * For backwards compatibility.
    - *
    - * Note to OS vendors: do NOT get rid of this file!  Many applications
    - * expect to be able to include <pcap.h>, and at least some of them
    - * go through contortions in their configure scripts to try to detect
    - * OSes that have "helpfully" moved pcap.h to <pcap/pcap.h> without
    - * leaving behind a <pcap.h> file.
    - */
    -#include <pcap/pcap.h>
    -*/
    -
    -#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
    -#include <pcap/bpf.h>
    -#endif
    -
    -#include <stdio.h>
    -
    -#ifdef HAVE_REMOTE
    -	// We have to define the SOCKET here, although it has been defined in sockutils.h
    -	// This is to avoid the distribution of the 'sockutils.h' file around
    -	// (for example in the WinPcap developer's pack)
    -	#ifndef SOCKET
    -		#ifdef WIN32
    -			#define SOCKET unsigned int
    -		#else
    -			#define SOCKET int
    -		#endif
    -	#endif
    -#endif
    -
    -#ifdef __cplusplus
    -extern "C" {
    -#endif
    -
    -#define PCAP_VERSION_MAJOR 2
    -#define PCAP_VERSION_MINOR 4
    -
    -#define PCAP_ERRBUF_SIZE 256
    -
    -/*
    - * Compatibility for systems that have a bpf.h that
    - * predates the bpf typedefs for 64-bit support.
    - */
    -#if BPF_RELEASE - 0 < 199406
    -typedef	int bpf_int32;
    -typedef	u_int bpf_u_int32;
    -#endif
    -
    -typedef struct pcap pcap_t;
    -typedef struct pcap_dumper pcap_dumper_t;
    -typedef struct pcap_if pcap_if_t;
    -typedef struct pcap_addr pcap_addr_t;
    -
    -/*
    - * The first record in the file contains saved values for some
    - * of the flags used in the printout phases of tcpdump.
    - * Many fields here are 32 bit ints so compilers won't insert unwanted
    - * padding; these files need to be interchangeable across architectures.
    - *
    - * Do not change the layout of this structure, in any way (this includes
    - * changes that only affect the length of fields in this structure).
    - *
    - * Also, do not change the interpretation of any of the members of this
    - * structure, in any way (this includes using values other than
    - * LINKTYPE_ values, as defined in "savefile.c", in the "linktype"
    - * field).
    - *
    - * Instead:
    - *
    - *	introduce a new structure for the new format, if the layout
    - *	of the structure changed;
    - *
    - *	send mail to "tcpdump-workers@lists.tcpdump.org", requesting
    - *	a new magic number for your new capture file format, and, when
    - *	you get the new magic number, put it in "savefile.c";
    - *
    - *	use that magic number for save files with the changed file
    - *	header;
    - *
    - *	make the code in "savefile.c" capable of reading files with
    - *	the old file header as well as files with the new file header
    - *	(using the magic number to determine the header format).
    - *
    - * Then supply the changes as a patch at
    - *
    - *	http://sourceforge.net/projects/libpcap/
    - *
    - * so that future versions of libpcap and programs that use it (such as
    - * tcpdump) will be able to read your new capture file format.
    - */
    -struct pcap_file_header {
    -	bpf_u_int32 magic;
    -	u_short version_major;
    -	u_short version_minor;
    -	bpf_int32 thiszone;	/* gmt to local correction */
    -	bpf_u_int32 sigfigs;	/* accuracy of timestamps */
    -	bpf_u_int32 snaplen;	/* max length saved portion of each pkt */
    -	bpf_u_int32 linktype;	/* data link type (LINKTYPE_*) */
    -};
    -
    -/*
    - * Macros for the value returned by pcap_datalink_ext().
    - * 
    - * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro
    - * gives the FCS length of packets in the capture.
    - */
    -#define LT_FCS_LENGTH_PRESENT(x)	((x) & 0x04000000)
    -#define LT_FCS_LENGTH(x)		(((x) & 0xF0000000) >> 28)
    -#define LT_FCS_DATALINK_EXT(x)		((((x) & 0xF) << 28) | 0x04000000)
    -
    -typedef enum {
    -       PCAP_D_INOUT = 0,
    -       PCAP_D_IN,
    -       PCAP_D_OUT
    -} pcap_direction_t;
    -
    -/*
    - * Generic per-packet information, as supplied by libpcap.
    - *
    - * The time stamp can and should be a "struct timeval", regardless of
    - * whether your system supports 32-bit tv_sec in "struct timeval",
    - * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit
    - * and 64-bit applications.  The on-disk format of savefiles uses 32-bit
    - * tv_sec (and tv_usec); this structure is irrelevant to that.  32-bit
    - * and 64-bit versions of libpcap, even if they're on the same platform,
    - * should supply the appropriate version of "struct timeval", even if
    - * that's not what the underlying packet capture mechanism supplies.
    - */
    -struct pcap_pkthdr {
    -	struct timeval ts;	/* time stamp */
    -	bpf_u_int32 caplen;	/* length of portion present */
    -	bpf_u_int32 len;	/* length this packet (off wire) */
    -};
    -
    -/*
    - * As returned by the pcap_stats()
    - */
    -struct pcap_stat {
    -	u_int ps_recv;		/* number of packets received */
    -	u_int ps_drop;		/* number of packets dropped */
    -	u_int ps_ifdrop;	/* drops by interface XXX not yet supported */
    -#ifdef HAVE_REMOTE
    -	u_int ps_capt;		/* number of packets that are received by the application; please get rid off the Win32 ifdef */
    -	u_int ps_sent;		/* number of packets sent by the server on the network */
    -	u_int ps_netdrop;	/* number of packets lost on the network */
    -#endif /* HAVE_REMOTE */
    -};
    -
    -#ifdef MSDOS
    -/*
    - * As returned by the pcap_stats_ex()
    - */
    -struct pcap_stat_ex {
    -       u_long  rx_packets;        /* total packets received       */
    -       u_long  tx_packets;        /* total packets transmitted    */
    -       u_long  rx_bytes;          /* total bytes received         */
    -       u_long  tx_bytes;          /* total bytes transmitted      */
    -       u_long  rx_errors;         /* bad packets received         */
    -       u_long  tx_errors;         /* packet transmit problems     */
    -       u_long  rx_dropped;        /* no space in Rx buffers       */
    -       u_long  tx_dropped;        /* no space available for Tx    */
    -       u_long  multicast;         /* multicast packets received   */
    -       u_long  collisions;
    -
    -       /* detailed rx_errors: */
    -       u_long  rx_length_errors;
    -       u_long  rx_over_errors;    /* receiver ring buff overflow  */
    -       u_long  rx_crc_errors;     /* recv'd pkt with crc error    */
    -       u_long  rx_frame_errors;   /* recv'd frame alignment error */
    -       u_long  rx_fifo_errors;    /* recv'r fifo overrun          */
    -       u_long  rx_missed_errors;  /* recv'r missed packet         */
    -
    -       /* detailed tx_errors */
    -       u_long  tx_aborted_errors;
    -       u_long  tx_carrier_errors;
    -       u_long  tx_fifo_errors;
    -       u_long  tx_heartbeat_errors;
    -       u_long  tx_window_errors;
    -     };
    -#endif
    -
    -/*
    - * Item in a list of interfaces.
    - */
    -struct pcap_if {
    -	struct pcap_if *next;
    -	char *name;		/* name to hand to "pcap_open_live()" */
    -	char *description;	/* textual description of interface, or NULL */
    -	struct pcap_addr *addresses;
    -	bpf_u_int32 flags;	/* PCAP_IF_ interface flags */
    -};
    -
    -#define PCAP_IF_LOOPBACK	0x00000001	/* interface is loopback */
    -
    -/*
    - * Representation of an interface address.
    - */
    -struct pcap_addr {
    -	struct pcap_addr *next;
    -	struct sockaddr *addr;		/* address */
    -	struct sockaddr *netmask;	/* netmask for that address */
    -	struct sockaddr *broadaddr;	/* broadcast address for that address */
    -	struct sockaddr *dstaddr;	/* P2P destination address for that address */
    -};
    -
    -typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *,
    -			     const u_char *);
    -
    -/*
    - * Error codes for the pcap API.
    - * These will all be negative, so you can check for the success or
    - * failure of a call that returns these codes by checking for a
    - * negative value.
    - */
    -#define PCAP_ERROR			-1	/* generic error code */
    -#define PCAP_ERROR_BREAK		-2	/* loop terminated by pcap_breakloop */
    -#define PCAP_ERROR_NOT_ACTIVATED	-3	/* the capture needs to be activated */
    -#define PCAP_ERROR_ACTIVATED		-4	/* the operation can't be performed on already activated captures */
    -#define PCAP_ERROR_NO_SUCH_DEVICE	-5	/* no such device exists */
    -#define PCAP_ERROR_RFMON_NOTSUP		-6	/* this device doesn't support rfmon (monitor) mode */
    -#define PCAP_ERROR_NOT_RFMON		-7	/* operation supported only in monitor mode */
    -#define PCAP_ERROR_PERM_DENIED		-8	/* no permission to open the device */
    -#define PCAP_ERROR_IFACE_NOT_UP		-9	/* interface isn't up */
    -
    -/*
    - * Warning codes for the pcap API.
    - * These will all be positive and non-zero, so they won't look like
    - * errors.
    - */
    -#define PCAP_WARNING			1	/* generic warning code */
    -#define PCAP_WARNING_PROMISC_NOTSUP	2	/* this device doesn't support promiscuous mode */
    -
    -char	*pcap_lookupdev(char *);
    -int	pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *);
    -
    -pcap_t	*pcap_create(const char *, char *);
    -int	pcap_set_snaplen(pcap_t *, int);
    -int	pcap_set_promisc(pcap_t *, int);
    -int	pcap_can_set_rfmon(pcap_t *);
    -int	pcap_set_rfmon(pcap_t *, int);
    -int	pcap_set_timeout(pcap_t *, int);
    -int	pcap_set_buffer_size(pcap_t *, int);
    -int	pcap_activate(pcap_t *);
    -
    -pcap_t	*pcap_open_live(const char *, int, int, int, char *);
    -pcap_t	*pcap_open_dead(int, int);
    -pcap_t	*pcap_open_offline(const char *, char *);
    -#if defined(WIN32)
    -pcap_t  *pcap_hopen_offline(intptr_t, char *);
    -#if !defined(LIBPCAP_EXPORTS)
    -#define pcap_fopen_offline(f,b) \
    -	pcap_hopen_offline(_get_osfhandle(_fileno(f)), b)
    -#else /*LIBPCAP_EXPORTS*/
    -static pcap_t *pcap_fopen_offline(FILE *, char *);
    -#endif
    -#else /*WIN32*/
    -pcap_t	*pcap_fopen_offline(FILE *, char *);
    -#endif /*WIN32*/
    -
    -void	pcap_close(pcap_t *);
    -int	pcap_loop(pcap_t *, int, pcap_handler, u_char *);
    -int	pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
    -const u_char*
    -	pcap_next(pcap_t *, struct pcap_pkthdr *);
    -int 	pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
    -void	pcap_breakloop(pcap_t *);
    -int	pcap_stats(pcap_t *, struct pcap_stat *);
    -int	pcap_setfilter(pcap_t *, struct bpf_program *);
    -int 	pcap_setdirection(pcap_t *, pcap_direction_t);
    -int	pcap_getnonblock(pcap_t *, char *);
    -int	pcap_setnonblock(pcap_t *, int, char *);
    -int	pcap_inject(pcap_t *, const void *, size_t);
    -int	pcap_sendpacket(pcap_t *, const u_char *, int);
    -const char *pcap_statustostr(int);
    -const char *pcap_strerror(int);
    -char	*pcap_geterr(pcap_t *);
    -void	pcap_perror(pcap_t *, char *);
    -int	pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
    -	    bpf_u_int32);
    -int	pcap_compile_nopcap(int, int, struct bpf_program *,
    -	    const char *, int, bpf_u_int32);
    -void	pcap_freecode(struct bpf_program *);
    -int	pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *,
    -	    const u_char *);
    -int	pcap_datalink(pcap_t *);
    -int	pcap_datalink_ext(pcap_t *);
    -int	pcap_list_datalinks(pcap_t *, int **);
    -int	pcap_set_datalink(pcap_t *, int);
    -void	pcap_free_datalinks(int *);
    -int	pcap_datalink_name_to_val(const char *);
    -const char *pcap_datalink_val_to_name(int);
    -const char *pcap_datalink_val_to_description(int);
    -int	pcap_snapshot(pcap_t *);
    -int	pcap_is_swapped(pcap_t *);
    -int	pcap_major_version(pcap_t *);
    -int	pcap_minor_version(pcap_t *);
    -
    -/* XXX */
    -FILE	*pcap_file(pcap_t *);
    -int	pcap_fileno(pcap_t *);
    -
    -pcap_dumper_t *pcap_dump_open(pcap_t *, const char *);
    -pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp);
    -FILE	*pcap_dump_file(pcap_dumper_t *);
    -long	pcap_dump_ftell(pcap_dumper_t *);
    -int	pcap_dump_flush(pcap_dumper_t *);
    -void	pcap_dump_close(pcap_dumper_t *);
    -void	pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *);
    -
    -int	pcap_findalldevs(pcap_if_t **, char *);
    -void	pcap_freealldevs(pcap_if_t *);
    -
    -const char *pcap_lib_version(void);
    -
    -/* XXX this guy lives in the bpf tree */
    -u_int	bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
    -int	bpf_validate(const struct bpf_insn *f, int len);
    -char	*bpf_image(const struct bpf_insn *, int);
    -void	bpf_dump(const struct bpf_program *, int);
    -
    -#if defined(WIN32)
    -
    -/*
    - * Win32 definitions
    - */
    -
    -int pcap_setbuff(pcap_t *p, int dim);
    -int pcap_setmode(pcap_t *p, int mode);
    -int pcap_setmintocopy(pcap_t *p, int size);
    -
    -#ifdef WPCAP
    -/* Include file with the wpcap-specific extensions */
    -#include <Win32-Extensions.h>
    -#endif /* WPCAP */
    -
    -#define MODE_CAPT 0
    -#define MODE_STAT 1
    -#define MODE_MON 2
    -
    -#elif defined(MSDOS)
    -
    -/*
    - * MS-DOS definitions
    - */
    -
    -int  pcap_stats_ex (pcap_t *, struct pcap_stat_ex *);
    -void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait);
    -u_long pcap_mac_packets (void);
    -
    -#else /* UN*X */
    -
    -/*
    - * UN*X definitions
    - */
    -
    -int	pcap_get_selectable_fd(pcap_t *);
    -
    -#endif /* WIN32/MSDOS/UN*X */
    -
    -#ifdef HAVE_REMOTE
    -/* Includes most of the public stuff that is needed for the remote capture */
    -#include <remote-ext.h>
    -#endif	 /* HAVE_REMOTE */
    -
    -#ifdef __cplusplus
    -}
    -#endif
    -
    -#endif
    -
    - - - diff --git a/docbook/pcap_freenameindex.c.html b/docbook/pcap_freenameindex.c.html deleted file mode 100644 index 6d1915d3..00000000 --- a/docbook/pcap_freenameindex.c.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - pcap_freenameindex.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void pcap_freenameindex (struct if_nameindex *)
    - *
    - *   ether.h
    - *
    - *   a WinPcap version of POSIX if_freenameindex function;
    - *
    - *   see The Open Group Base Specifications Issue 6 IEEE Std 1003.1,
    - *   2004 Edition for a description of this function;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PCAP_FREENAMEINDEX_SOURCE
    -#define PCAP_FREENAMEINDEX_SOURCE
    -
    -#include <pcap.h>
    -#include <stdlib.h>
    -
    -#include "../ether/ether.h"
    -
    -void pcap_freenameindex (struct if_nameindex * if_nameindex)
    -
    -{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -	struct if_nameindex * ifp = if_nameindex;
    -	while (ifp->if_index)
    -	{
    -		free (ifp->if_name);
    -	}
    -	free (if_nameindex);
    -
    -#endif
    -
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pcap_indextoname.c.html b/docbook/pcap_indextoname.c.html deleted file mode 100644 index 19895731..00000000 --- a/docbook/pcap_indextoname.c.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - pcap_indextoname.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   char * pcap_indextoname (unsigned ifindex, char * ifname);
    - *
    - *   ether.h
    - *
    - *   a WinPcap version of POSIX if_indextoname function; return error
    - *   in non-pcap environments; set errno to ENXIO on error on MacOSX;
    - *
    - *   see The Open Group Base Specifications Issue 6 IEEE Std 1003.1,
    - *   2004 Edition for a description of this function;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PCAP_INDEXTONAME_SOURCE
    -#define PCAP_INDEXTONAME_SOURCE
    -
    -#include <pcap.h>
    -#include <string.h>
    -#include <errno.h>
    -
    -#include "../ether/ether.h"
    -
    -char * pcap_indextoname (unsigned ifindex, char * ifname)
    -
    -{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -	char buffer [PCAP_ERRBUF_SIZE];
    -	pcap_if_t * devices = (pcap_if_t *)(0);
    -	pcap_if_t * device;
    -	if ((index--) && (pcap_findalldevs (&devices, buffer) != -1))
    -	{
    -		for (device = devices; device; device = device->next)
    -		{
    -			if (!index--)
    -			{
    -				memcpy (ifname, device->name, strlen (device->name));
    -				pcap_freealldevs (devices);
    -				return (ifname);
    -			}
    -		}
    -		pcap_freealldevs (devices);
    -	}
    -
    -#endif
    -#if defined (__APPLE__)
    -
    -	errno = ENXIO;
    -
    -#endif
    -
    -	return ((char *)(0));
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pcap_nameindex.c.html b/docbook/pcap_nameindex.c.html deleted file mode 100644 index c731b1f9..00000000 --- a/docbook/pcap_nameindex.c.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - pcap_nameindex.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   struct if_nameindex * pcap_nameindex (void)
    - *
    - *   ether.h
    - *
    - *   a WinPcap version of POSIX if_nameindex function; return error
    - *   in non-pcap environments;
    - *
    - *   see The Open Group Base Specifications Issue 6 IEEE Std 1003.1,
    - *   2004 Edition for a description of this function;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PCAP_NAMEINDEX_SOURCE
    -#define PCAP_NAMEINDEX_SOURCE
    -
    -#include <pcap.h>
    -#include <string.h>
    -#include <stdlib.h>
    -
    -#include "../ether/ether.h"
    -
    -struct if_nameindex * pcap_nameindex (void)
    -
    -{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -	char buffer [PCAP_ERRBUF_SIZE];
    -	pcap_if_t * devices = (pcap_if_t *)(0);
    -	pcap_if_t * device;
    -	if (pcap_findalldevs (&devices, buffer) != -1)
    -	{
    -		struct if_nameindex * ifs;
    -		struct if_nameindex * ifp;
    -		unsigned count = 1;
    -		for (device = devices; device; device = device->next)
    -		{
    -			count++;
    -		}
    -		ifp = ifs = (struct if_nameindex *)(malloc (count * sizeof (struct if_nameindex)));
    -		if (ifs) for (device = devices; device; device = device->next)
    -		{
    -			ifp->if_index = device->index;
    -			ifp->if_name = strdup (device->name);
    -			ifp++;
    -		}
    -		memset (ifp, 0, sizeof (* ifp));
    -		pcap_freealldevs (devices);
    -		return (ifs);
    -	}
    -
    -#endif
    -
    -	return ((struct if_nameindex *)(0));
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pcap_nametoindex.c.html b/docbook/pcap_nametoindex.c.html deleted file mode 100644 index 4ab9332d..00000000 --- a/docbook/pcap_nametoindex.c.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - pcap_nametoindex.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   unsigned pcap_nametoindex (char const * name);
    - *
    - *   ether.h
    - *
    - *   a WinPcap version of POSIX if_nametoindex function; return error
    - *   in non-pcap environments;
    - *
    - *   see The Open Group Base Specifications Issue 6 IEEE Std 1003.1,
    - *   2004 Edition for a description of this function;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PCAP_NAMETOINDEX_SOURCE
    -#define PCAP_NAMETOINDEX_SOURCE
    -
    -#include <pcap.h>
    -#include <string.h>
    -#include <errno.h>
    -
    -#include "../ether/ether.h"
    -
    -unsigned pcap_nametoindex (char const * name)
    -
    -{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -	char buffer [PCAP_ERRBUF_SIZE];
    -	pcap_if_t * devices = (pcap_if_t *)(0);
    -	pcap_if_t * device;
    -	if (pcap_findalldevs (&devices, buffer) != -1)
    -	{
    -		unsigned index = 1;
    -		for (device = devices; device; device = device->next)
    -		{
    -			if (!strcmp (name, device->name))
    -			{
    -				index++;
    -				continue;
    -			}
    -			pcap_freealldevs (devices);
    -			return (index);
    -		}
    -		pcap_freealldevs (devices);
    -	}
    -
    -#endif
    -#if defined (__APPLE__)
    -
    -	errno = ENXIO;
    -
    -#endif
    -
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pcapdevs.1.html b/docbook/pcapdevs.1.html deleted file mode 100644 index 53cc33be..00000000 --- a/docbook/pcapdevs.1.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - pcapdevs.1 - - - - - - - - - -
    -pcapdevs(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 pcapdevs(1)
    -
    -NAME
    -       pcapdevs - Qualcomm Atheros PCAP Device Enumerator
    -
    -SYNOPSIS
    -       pcapdevs [options]
    -
    -DESCRIPTION
    -       The pcapdevs program enumerates available libpcap or winpcap devices on stdout.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for compilation and installation
    -       instructions.
    -
    -COMMENTS
    -       This program is only compiled in the Windows version of the toolkit because it is not needed on other platforms.  It  can
    -       be  compiled,  possibly  with  some  modifications,  on  Linux or OpenBSD systems where libpcap development libraries are
    -       installed.
    -
    -BACKGROUND
    -       The Atheros Powerline Toolkit uses the libpcap or winpcap package to enable raw socket operations on systems that have no
    -       native  raw  packet  support.  Unfortunately, libpcap and winpcap reference available network interfaces by number rather
    -       than by name.  Consequently, users need some way to determine what network interfaces are  available  and  determine  the
    -       number associated with each one.  This utility does that.
    -
    -OPTIONS
    -       -h     Print  bash  compatible variable definitions on stdout.  The definitions enumerate available devices and their MAC
    -              addresses.  This is merely a convenience to minimze typing errors and, consequently, some editing may be required.
    -              The output is a generous start when creating file hardware.sh.
    -
    -       -q     Suppresses printing of progress messages.
    -
    -       -v     Print additional information.
    -
    -EXAMPLES
    -       The following command enumerates available libpcap devices for a Linux host.  Users should note the interface numbers and
    -       use them when specifying a network interfaces on libpcap  enabled  programs  in  this  toolkit.   The  Ethernet  hardware
    -       addresses shown may be useful when writing scripts.
    -
    -          # pcapdevs
    -          1 00:60:97:05:97:0C eth0
    -          2 00:0F:EA:10:D5:1C eth1
    -          3 00:0F:EA:10:D5:1C any (Pseudo-device that captures on all interfaces)
    -          4 00:00:00:00:00:00 lo
    -
    -       The  next  example  enumaerates available winpcap devices on a Windows hosts.  Observe that device names and descriptions
    -       are much longer than on Linux.
    -
    -          # pcapdevs
    -          1 00:00:00:00:00:00 \Device\NPF_GenericDialupAdapter     (Adapter for generic dialup and VPN capture)
    -          2 00:0E:2E:03:5F:B8 \Device\NPF_{4CFAABD5-C929-4942-914B-BDFE72B13611} (Realtek RTL8139 Family)
    -          3 00:C0:49:D5:CB:14 \Device\NPF_{73E0D2EF-6069-4831-B379-507025F2BDCD} (Realtek RTL8139 Family)
    -          4 00:0C:76:87:3E:3D \Device\NPF_{86B96905-3AA7-46F1-969A-6C23E3BBBA8B} (Broadcom NetXtreme Gigabit)
    -
    -       Assuming that we have compiled and installed the Linux Toolkit with libpcap or winpcap  support,  we  can  use  int6k  to
    -       request  revision  information  on  all  devices connected to interface 2 with the following command.  Interface 2 is the
    -       default interface when the toolkit is comipled with either libpcap or winpcap and so option -i could have been omitted in
    -       this case.
    -
    -          # int6k -i 2 -r
    -
    -       Most  example Atheros scripts include file hardware.sh that defines symbolic Ethernet interfaces, NIC1 and NIC2 and their
    -       respective hardware addresses, MAC1 and MAC2.  These symbols are referenced by scripts when needed, providing a degree of
    -       host  independence.   The following example illustrates some typical output for a Windows environment.  The output can be
    -       used with the Cygwin bash shell, for example.
    -
    -          # pcapdevs -h > hardware.sh
    -          # cat hardware.sh
    -          NIC1=1 # Adapter for generic dialup and VPN capture
    -          NIC2=2 # Realtek RTL8139 Family Fast Ethernet Adapter (Microsoft's Packet Scheduler)
    -          NIC3=3 # Realtek RTL8139 Family Fast Ethernet Adapter (Microsoft's Packet Scheduler)
    -          NIC4=4 # Broadcom NetXtreme Gigabit Ethernet Driver
    -          MAC1=00:00:00:00:00:00 # Adapter for generic dialup and VPN capture
    -          MAC2=00:0E:2E:03:5F:B8 # Realtek RTL8139 Family Fast Ethernet Adapter (Microsoft's Packet Scheduler)
    -          MAC3=00:C0:49:D5:CB:14 # Realtek RTL8139 Family Fast Ethernet Adapter (Microsoft's Packet Scheduler)
    -          MAC4=00:0C:76:87:3E:3D # Broadcom NetXtreme Gigabit Ethernet Driver
    -
    -       The previous example creats a basic hardware.sh file but some editing is still required.  You should add a bang  path  at
    -       the top, delete definitions of NIC1 and MAC and renumber the remaining symbols.  You may also want to add other host-spe‐
    -       cific definitions.
    -
    -SEE ALSO
    -       amp(1), ifs(1), plcnets(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                 pcapdevs(1)
    -
    - - - diff --git a/docbook/pcapdevs.c.html b/docbook/pcapdevs.c.html deleted file mode 100644 index 6dd2b8df..00000000 --- a/docbook/pcapdevs.c.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - pcapdevs.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pcapdevs.c - pcap device enumerator;
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <errno.h>
    -#include <string.h>
    -#include <pcap.h>
    -
    -#if defined (__linux__)
    -#elif defined (__APPLE__)
    -#elif defined (__OpenBSD__)
    -#	include <sys/types.h>
    -#	include <sys/socket.h>
    -#	include <net/if.h>
    -#	include <netinet/in.h>
    -#	include <netinet/if_ether.h>
    -#elif defined (WINPCAP) || defined (LIBPCAP)
    -#else
    -#error "Unknown environment"
    -#endif
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/memory.h"
    -#include "../tools/flags.h"
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../ether/ether.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/hexdecode.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PCAP_VERBOSE (1 << 0)
    -#define PCAP_SILENCE (1 << 1)
    -#define PCAP_DEVICES (1 << 2)
    -#define PCAP_NICS (1 << 3)
    -#define PCAP_MACS (1 << 4)
    -
    -/*====================================================================*
    - *
    - *   void pcap_enum (flag_t flags);
    - *
    - *   pcap_enum available pcap devices on stdout;
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -void pcap_enum (flag_t flags)
    -
    -{
    -	char report [PCAP_ERRBUF_SIZE];
    -	char string [ETHER_ADDR_LEN * 3];
    -	byte number [ETHER_ADDR_LEN];
    -	pcap_if_t * device;
    -	pcap_if_t * devices = (pcap_if_t *)(0);
    -	unsigned index;
    -	if (pcap_findalldevs (&devices, report) == -1)
    -	{
    -		error (1, 0, "Can't enumerate interfaces");
    -	}
    -	if (!devices)
    -	{
    -		error (1, 0, "No interfaces available");
    -	}
    -	if (_anyset (flags, PCAP_DEVICES))
    -	{
    -		for (device = devices, index = 1; device; device = device->next, index++)
    -		{
    -			gethwaddr (number, device->name);
    -			hexdecode (number, sizeof (number), string, sizeof (string));
    -			printf ("%2d %s %s", index, string, device->name);
    -			if (device->description)
    -			{
    -				printf ("\t(%s)", device->description);
    -			}
    -			printf ("\n");
    -		}
    -	}
    -	if (_anyset (flags, PCAP_NICS))
    -	{
    -		for (device = devices, index = 1; device; device = device->next, index++)
    -		{
    -
    -#if defined (WIN32)
    -
    -			printf ("ETH%d=%d", index, index);
    -
    -#else
    -
    -			printf ("ETH%d=%s", index, device->name);
    -
    -#endif
    -
    -			if (device->description)
    -			{
    -				printf ("\t# %s", device->description);
    -			}
    -			printf ("\n");
    -		}
    -		printf ("\n");
    -	}
    -	if (_anyset (flags, PCAP_MACS))
    -	{
    -		for (device = devices, index = 1; device; device = device->next, index++)
    -		{
    -			gethwaddr (number, device->name);
    -			hexdecode (number, sizeof (number), string, sizeof (string));
    -			printf ("NIC%d=%s", index, string);
    -			if (device->description)
    -			{
    -				printf ("\t# %s", device->description);
    -			}
    -			printf ("\n");
    -		}
    -		printf ("\n");
    -	}
    -	pcap_freealldevs (devices);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv [])
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"hqv",
    -		"",
    -		"enumerate available pcap devices on stdout",
    -		"h\tprint host definitions for scripting",
    -		"q\tquiet",
    -		"v\tverbose messages",
    -		(char const *) (0)
    -	};
    -	flag_t flags = PCAP_DEVICES;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'h':
    -			_clrbits (flags, (PCAP_DEVICES));
    -			_setbits (flags, (PCAP_NICS | PCAP_MACS));
    -			break;
    -		case 'q':
    -			_setbits (flags, PCAP_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PCAP_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ECANCELED, ERROR_TOOMANY);
    -	}
    -	pcap_enum (flags);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pev.1.html b/docbook/pev.1.html deleted file mode 100644 index df1f796e..00000000 --- a/docbook/pev.1.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - pev.1 - - - - - - - - - -
    -pev(1)                                       Qualcomm Atheros Open Powerline Toolkit                                      pev(1)
    -
    -NAME
    -       pev - Qualcomm Atheros Plug-in Electric Vehicle Emulator
    -
    -SYNOPSIS
    -       pev [options]
    -
    -DESCRIPTION
    -       Emulate  the  PEV  part  of  the  HomePlug AV Signal Level Attentuation Characterization (SLAC) protocol where a PEV is a
    -       "Plug-in Electric Vehicle" and an EVSE is an "Electric Vehicle Supply Equipment" or charging station.  This program  will
    -       remain  active  until  it  detects  and  connects  to an available EVSE-HLE on the powerline network.  Once connected, it
    -       charges a virtual vehicle for about 10 seconds then disconnects and terminates.  See the HomePlug Green PHY Specification
    -       Release Version 1.1 for more information on this protocol.
    -
    -       Signal  Level  Attenuation  Characterization  (SLAC) enables a station to measure the signal level of its transmission at
    -       other stations in the network.  It is designed for automotive applications  where  there  are  multiple  plug-in  vehicle
    -       (PEVs)  and  electric vehicle supply equipment (EVSE) on the network.  The PEV signal level is measured at multiple EVSEs
    -       to determine which EVSE the PEV is actually plugged into.  The process leading to this determination is called "Green PHY
    -       PEV-EVSE Association" (GreenPPEA).
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -c     Print the PEV-HLE configuration profile on stdout.  The configuration profile specifies program defaults in a for‐
    -              mat that you, as a user, can edit and save.  Use options -p and -s to read named profiles and sections.
    -
    -       -d     Print  the  contents of the PEV-HLE session variable on stdout.  The session variable is an program data structure
    -              that stores information passed between the PEV-HLE and EVSE-HLE during SLAC association.  This option is  used  to
    -              inspect  and  veriify  information  relevant to the process.  If the program was compiled with variable SLAC_DEBUG
    -              defined then this option also prints MME message fields before messages are  sent  or  after  they  are  received.
    -              Interested parties can follow along in the source code.
    -
    -       -i     Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -p profile
    -              The PEV-HLE configuration profile name.  The program will supply default values for missing profile elements.  See
    -              the example profile shown below.  The default profile name is "pev.ini".
    -
    -       -q     Enter quiet mode.  Progress messages are suppressed.
    -
    -       -s section
    -              The  configuration profile section name.  The program will supply default values for missing configuration profile
    -              elements.  See the example profile shown below.  The default section name is "default".
    -
    -       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -PROFILES
    -       The default configuration profile for this program is "pev.ini".  The default profile section is  "default".   Users  may
    -       create  addition profiles and reference them with option -p or add additional sections to an existing profiles and refer‐
    -       ence them with option -s.
    -
    -       Attenuation Theshold
    -              The average attenuation above which the PEV will not connect to an EVSE.  The default value is 10db.
    -
    -       MSound Pause
    -              The time in milliseconds between each MSound sent by the PEV-HLE to the EVSE-HLE.  Sending MSounds too  frequently
    -              overloads  the EVSE-PLC.  Sending them too infrequently wastes time.  This value is derived and does not appear in
    -              the HPGP specification.  The default pause is 10 milliseconds.
    -
    -       Vehicle Identifier
    -              Vehicle identification.  The 17-byte Vehicle Identification Number to  be  placed  in  CM_MNBC_SOUND.IND.SenderID.
    -              This value is not used but is can be changed here so that the field is easy to spot within network message traces.
    -
    -       Network Membership Key
    -              The  16-byte Network Memberhip Key (NMK) for the PEV-PLC device.  This program uses CM_SET_KEY to sets the PEV-PLC
    -              NMK to this value after disconnecting.  The default value is the key for Network Password "HomePlugAV".
    -
    -       Network Identifier
    -              The 7-byte Network Identifier (NID) for the PEV-PLC device.  This program uses CM_SET_KEY to sets the PEV-PLC  NID
    -              to this value after disconnecting.  The default value is the same as that for Network Password "HomePlugAV".
    -
    -REFERENCES
    -       See  the Qualcomm Atheros AR7420, QCA6410 IEEE 1901, HomePlug AV and QCA7000 HomePlug Green PHY PLC Chipset Programmer''s
    -       Guide or the HomePlug Green PHY Specification Release Version 1.1 for more information on this protocol.
    -
    -EXAMPLES
    -       The following example starts a PEV session on interface eth0 and wait up to 2000 milliseconds (or 2 seconds) for the EVSE
    -       to respond during any given exchange.
    -
    -          # pev -ieth0 -w2000
    -
    -       The default PEV-HLE configuration profile, "pev.ini", looks something like this but it can be changed using a normal text
    -       editor.  Use option -P to produce a template profile, if one is needed.
    -
    -          # file: pev.ini
    -          # ====================================================================
    -          # PEV-HLE initialization;
    -          # --------------------------------------------------------------------
    -          [default]
    -          attenuation threshold = 10
    -          msound pause = 10
    -          vehicle identifier = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    -          network membership key = 50D3E4933F855B7040784DF815AA8DB7
    -          network identifier = B0F2E695666B03
    -
    -SEE ALSO
    -       plc(1), evse(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                      pev(1)
    -
    - - - diff --git a/docbook/pev.c.html b/docbook/pev.c.html deleted file mode 100644 index f9227e9f..00000000 --- a/docbook/pev.c.html +++ /dev/null @@ -1,559 +0,0 @@ - - - - - - pev.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pev.c - QCA Plug-in Electric Vehicle Emulator;
    - *
    - *   This program, in the current state, is not a finished product;
    - *   It has been released so that interested parties can begin to 
    - *   see how the SLAC protocol might be implemented;
    - *
    - *   Some key design features are:
    - *
    - *   1) the use of a channel variable to abstract ISO Layer 2 I/O;
    - *      the variable is used by functions openchannel, readmessage,
    - *      sendmessage and closechannel;
    - *
    - *   2) the use of a message variable to represent an IEEE 802.3 
    - *      Ethernet frame; the variable allows one frame to be used
    - *      and re-used throughout the program but supports multiple
    - *      frame buffers if needed;
    - *
    - *   3) the use of a session variable to support multiple PEV-EVSE
    - *      interactions without using threads or subrocesses; this has
    - *      not demonstrated in this version of the program; some more
    - *      work is needed;
    - *
    - *   4) the absence of threads or subprocesses so that the  program 
    - *      can be ported to hosts without a multi-tasking operating 
    - *      system;
    - *
    - *   5) lots of debugging messages; these can be suppressed or 
    - *      deleted if not wanted;
    - *
    - *   6) simplified state machine;
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <string.h>
    -#include <errno.h>
    -#include <time.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../tools/config.h"
    -#include "../ether/channel.h"
    -#include "../iso15118/slac.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/decdecode.c"
    -#include "../tools/decstring.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/config.c"
    -#include "../tools/memincr.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/Devices.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/HomePlugHeader1.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/readmessage.c"
    -#include "../mme/sendmessage.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/channel.c"
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/readpacket.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../iso15118/slac_session.c"
    -#include "../iso15118/slac_connect.c"
    -#include "../iso15118/slac_debug.c"
    -#include "../iso15118/pev_cm_slac_param.c"
    -#include "../iso15118/pev_cm_start_atten_char.c"
    -#include "../iso15118/pev_cm_atten_char.c"
    -#include "../iso15118/pev_cm_mnbc_sound.c"
    -#include "../iso15118/pev_cm_slac_match.c"
    -#include "../iso15118/pev_cm_set_key.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCDEVICE "PLC"
    -#define PROFILE "pev.ini"
    -#define SECTION "default"   
    -
    -#define PEV_STATE_DISCONNECTED 1
    -#define PEV_STATE_UNMATCHED 2
    -#define PEV_STATE_MATCHED 3
    -
    -#define PEV_VID "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" // VehicleIdentifier
    -#define PEV_NMK "50D3E4933F855B7040784DF815AA8DB7"   // HomePlugAV
    -#define PEV_NID "B0F2E695666B03"		     // HomePlugAV
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -unsigned state = 0; 
    -
    -/*====================================================================*
    - *
    - *   static void configure ();
    - *
    - *   print template PEV-HLE configuration file on stdout so that 
    - *   profile, section and element names match;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void configure () 
    -
    -{ 
    -	printf ("# file: %s\n", PROFILE); 
    -	printf ("# ====================================================================\n"); 
    -	printf ("# PEV-HLE initialization;\n"); 
    -	printf ("# --------------------------------------------------------------------\n"); 
    -	printf ("[%s]\n", SECTION); 
    -	printf ("vehicle identifier = %s\n", PEV_VID); 
    -	printf ("network membership key = %s\n", PEV_NMK); 
    -	printf ("network identifier = %s\n", PEV_NID); 
    -	printf ("attenuation threshold = %d\n", SLAC_LIMIT); 
    -	printf ("msound pause = %d\n", SLAC_PAUSE); 
    -	printf ("charge time = %d\n", SLAC_CHARGETIME); 
    -	printf ("settle time = %d\n", SLAC_SETTLETIME); 
    -	return; 
    -} 
    -
    -/*====================================================================*
    - *
    - *   void initialize (struct session * session, char const * profile, char const * section);
    - *
    - *   read PEV-HLE configuration profile; initialize session variable;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void initialize (struct session * session, char const * profile, char const * section) 
    -
    -{ 
    -	session->next = session->prev = session; 
    -	hexencode (session->PEV_ID, sizeof (session->PEV_ID), configstring (profile, section, "VehicleIdentifier", PEV_VID)); 
    -	hexencode (session->NMK, sizeof (session->NMK), configstring (profile, section, "NetworkMembershipKey", PEV_NMK)); 
    -	hexencode (session->NID, sizeof (session->NID), configstring (profile, section, "NetworkIdentifier", PEV_NID)); 
    -	session->limit = confignumber_range (profile, section, "AttenuationThreshold", SLAC_LIMIT, 0, UINT_MAX); 
    -	session->pause = confignumber_range (profile, section, "MSoundPause", SLAC_PAUSE, 0, UINT_MAX); 
    -	session->settletime = confignumber_range (profile, section, "SettleTime", SLAC_SETTLETIME, 0, UINT_MAX); 
    -	session->chargetime = confignumber_range (profile, section, "ChargeTime", SLAC_CHARGETIME, 0, UINT_MAX); 
    -	session->state = PEV_STATE_DISCONNECTED; 
    -	memcpy (session->original_nmk, session->NMK, sizeof (session->original_nmk)); 
    -	memcpy (session->original_nid, session->NID, sizeof (session->original_nid)); 
    -	slac_session (session); 
    -	return; 
    -} 
    -
    -/*====================================================================*
    - *
    - *   signed identifier (struct session * session, struct channel * channel);
    - *
    - *   generate the run identifier and store in session variable;
    - *
    - *   copy channel host address to session PEV MAC address; set session
    - *   PEV identifier to zeros;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed identifier (struct session * session, struct channel * channel) 
    -
    -{ 
    -	time_t now; 
    -	time (& now); 
    -	memset (session->RunID, 0, sizeof (session->RunID)); 
    -	memcpy (session->RunID, channel->host, ETHER_ADDR_LEN); 
    -	memcpy (session->PEV_MAC, channel->host, sizeof (session->PEV_MAC)); 
    -	return (0); 
    -} 
    -
    -/*====================================================================*
    - *
    - *   void DisconnectedState (struct session * session, struct channel * channel, struct message * message);
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void DisconnectedState (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	slac_session (session); 
    -	slac_debug (session, 0, __func__, "Probing ..."); 
    -	memincr (session->RunID, sizeof (session->RunID)); 
    -	while (pev_cm_slac_param (session, channel, message)); 
    -	session->state = PEV_STATE_UNMATCHED; 
    -	return; 
    -} 
    -
    -/*====================================================================*
    - *
    - *   void MatchingState (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   The PEV-EVSE perform GreenPPEA protocol in this state;
    - *
    - *   the cm_start_atten_char and cm_mnbc_sound messages are sent
    - *   broadcast; the application may receive multiple cm_atten_char
    - *   messages before sending the cm_slac_match message;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void UnmatchedState (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	slac_session (session); 
    -	slac_debug (session, 0, __func__, "Sounding ..."); 
    -	if (pev_cm_start_atten_char (session, channel, message)) 
    -	{ 
    -		session->state = PEV_STATE_DISCONNECTED; 
    -		return; 
    -	} 
    -	if (pev_cm_mnbc_sound (session, channel, message)) 
    -	{ 
    -		session->state = PEV_STATE_DISCONNECTED; 
    -		return; 
    -	} 
    -	if (pev_cm_atten_char (session, channel, message)) 
    -	{ 
    -		session->state = PEV_STATE_DISCONNECTED; 
    -		return; 
    -	} 
    -	if (slac_connect (session)) 
    -	{ 
    -		session->state = PEV_STATE_DISCONNECTED; 
    -		return; 
    -	} 
    -	slac_debug (session, 0, __func__, "Matching ..."); 
    -	if (pev_cm_slac_match (session, channel, message)) 
    -	{ 
    -		session->state = PEV_STATE_DISCONNECTED; 
    -		return; 
    -	} 
    -	session->state = PEV_STATE_MATCHED; 
    -	return; 
    -} 
    -
    -/*====================================================================*
    - *
    - *   void MatchedState (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   charge vehicle; restore original NMK/NID and disconnect; loop
    - *   if SLAC_CONTINUE is set;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void MatchedState (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	slac_session (session); 
    -	slac_debug (session, 0, __func__, "Connecting ..."); 
    -
    -#if SLAC_AVLN_EVSE
    -
    -	slac_debug (session, 0, __func__, "waiting for evse to settle ..."); 
    -	sleep (session->settletime); 
    -
    -#endif
    -#if SLAC_AVLN_PEV
    -
    -	if (pev_cm_set_key (session, channel, message)) 
    -	{ 
    -		session->state = PEV_STATE_DISCONNECTED; 
    -		return; 
    -	} 
    -	sleep (session->settletime); 
    -
    -#endif
    -
    -	slac_debug (session, 0, __func__, "Charging (%d) ...\n\n", session->counter++); 
    -	sleep (session->chargetime); 
    -	slac_debug (session, 0, __func__, "Disconnecting ..."); 
    -
    -#if SLAC_AVLN_EVSE
    -
    -	slac_debug (session, 0, __func__, "waiting for evse to settle ..."); 
    -	sleep (session->settletime); 
    -
    -#endif
    -
    -#if SLAC_AVLN_PEV
    -
    -	memcpy (session->NMK, session->original_nmk, sizeof (session->NMK)); 
    -	memcpy (session->NID, session->original_nid, sizeof (session->NID)); 
    -	if (pev_cm_set_key (session, channel, message)) 
    -	{ 
    -		session->state = PEV_STATE_DISCONNECTED; 
    -		return; 
    -	} 
    -	sleep (session->settletime); 
    -
    -#endif
    -
    -	session->state = state; 
    -	return; 
    -} 
    -
    -/*====================================================================*
    - *   
    - *   int main (int argc, char * argv[]);
    - *   
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv []) 
    -
    -{ 
    -	extern struct channel channel; 
    -	static char const * optv [] = 
    -	{ 
    -		"cCdi:lp:qs:t:vx", 
    -		"", 
    -		"Plug-in Electric Vehicle Emulator", 
    -		"c\tprint template configuration file on stdout", 
    -		"C\tstop on count mismatch", 
    -		"d\tdisplay debug information", 
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]", 
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]", 
    -
    -#endif
    -
    -		"l\tloop indefinitely", 
    -		"p s\tconfiguration profile is (s) [" LITERAL (PROFILE) "]", 
    -		"q\tsuppress normal output", 
    -		"s s\tconfiguration section is (s) [" LITERAL (SECTION) "]", 
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (SLAC_TIMEOUT) "]", 
    -		"v\tverbose messages on stdout", 
    -		"x\texit on error", 
    -		(char const *) (0)
    -	}; 
    -	struct session session; 
    -	struct message message; 
    -	char const * profile = PROFILE; 
    -	char const * section = SECTION; 
    -	signed c; 
    -	memset (& session, 0, sizeof (session)); 
    -	memset (& message, 0, sizeof (message)); 
    -	channel.timeout = SLAC_TIMEOUT; 
    -	if (getenv (PLCDEVICE)) 
    -	{ 
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE)); 
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE)); 
    -
    -#endif
    -
    -	} 
    -	optind = 1; 
    -	while (~ (c = getoptv (argc, argv, optv))) 
    -	{ 
    -		switch (c) 
    -		{ 
    -		case 'c': 
    -			configure (); 
    -			return (0); 
    -		case 'C': 
    -			_setbits (session.flags, SLAC_COMPARE); 
    -			break; 
    -		case 'd': 
    -			_setbits (session.flags, (SLAC_VERBOSE | SLAC_SESSION)); 
    -			break; 
    -		case 'i': 
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg); 
    -
    -#else
    -
    -			channel.ifname = optarg; 
    -
    -#endif
    -
    -			break; 
    -		case 'l': 
    -			state = PEV_STATE_DISCONNECTED; 
    -			break; 
    -		case 'p': 
    -			profile = optarg; 
    -			break; 
    -		case 's': 
    -			section = optarg; 
    -			break; 
    -		case 'q': 
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (session.flags, SLAC_SILENCE);
    -			break; 
    -		case 't': 
    -			channel.timeout = (unsigned) (uintspec (optarg, 0, UINT_MAX)); 
    -			break; 
    -		case 'v': 
    -			_setbits (channel.flags, CHANNEL_VERBOSE); 
    -			break; 
    -		case 'x': 
    -			session.exit = session.exit? 0: 1; 
    -			break; 
    -		default: 
    -			break; 
    -		} 
    -	} 
    -	argc -= optind; 
    -	argv += optind; 
    -	if (argc) 
    -	{ 
    -		slac_debug (& session, 1, __func__, ERROR_TOOMANY); 
    -	} 
    -	openchannel (& channel); 
    -	identifier (& session, & channel); 
    -	initialize (& session, profile, section); 
    -	if (pev_cm_set_key (& session, & channel, & message)) 
    -	{ 
    -		slac_debug (& session, 1, __func__, "Can't set key"); 
    -	} 
    -	sleep (session.settletime); 
    -	while (session.state) 
    -	{ 
    -		if (session.state == PEV_STATE_DISCONNECTED) 
    -		{ 
    -			DisconnectedState (& session, & channel, & message); 
    -			continue; 
    -		} 
    -		if (session.state == PEV_STATE_UNMATCHED) 
    -		{ 
    -			UnmatchedState (& session, & channel, & message); 
    -			continue; 
    -		} 
    -		if (session.state == PEV_STATE_MATCHED) 
    -		{ 
    -			MatchedState (& session, & channel, & message); 
    -			continue; 
    -		} 
    -		slac_debug (& session, 1, __func__, "Illegal state!"); 
    -	} 
    -	closechannel (& channel); 
    -	return (0); 
    -} 
    -
    -
    -
    - - - diff --git a/docbook/pev_cm_atten_char.c.html b/docbook/pev_cm_atten_char.c.html deleted file mode 100644 index 5f22242d..00000000 --- a/docbook/pev_cm_atten_char.c.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - pev_cm_atten_char.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pev_cm_atten_char (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   slac.h
    - *
    - *   PEV-HLE waits for CM_ATTEN_CHAR.IND from EVSE-HLE and responds
    - *   to indicate the data was received in good order; this response
    - *   does not mean that PEV-HLE will mate with EVSE-HLE;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PEV_CM_ATTEN_CHAR_SOURCE
    -#define PEV_CM_ATTEN_CHAR_SOURCE
    -
    -#include <string.h>
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../iso15118/slac.h"
    -
    -signed pev_cm_atten_char (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	struct cm_atten_char_indicate * indicate = (struct cm_atten_char_indicate *) (message); 
    -	struct cm_atten_char_response * response = (struct cm_atten_char_response *) (message); 
    -	while (readmessage (channel, message, HOMEPLUG_MMV, (CM_ATTEN_CHAR | MMTYPE_IND)) > 0) 
    -	{ 
    -		if (! memcmp (session->RunID, indicate->ACVarField.RunID, sizeof (session->RunID))) 
    -		{ 
    -			slac_debug (session, 0, __func__, "<-- CM_ATTEN_CHAR.IND"); 
    -			memcpy (session->EVSE_MAC, indicate->ethernet.OSA, sizeof (session->EVSE_MAC)); 
    -			session->NUM_SOUNDS = indicate->ACVarField.NUM_SOUNDS; 
    -			session->NumGroups = indicate->ACVarField.ATTEN_PROFILE.NumGroups; 
    -			memcpy (session->AAG, indicate->ACVarField.ATTEN_PROFILE.AAG, indicate->ACVarField.ATTEN_PROFILE.NumGroups); 
    -
    -#if SLAC_DEBUG
    -
    -			if (_anyset (session->flags, SLAC_VERBOSE)) 
    -			{ 
    -				char string [256]; 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.APPLICATION_TYPE %d", indicate->APPLICATION_TYPE); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.SECURITY_TYPE %d", indicate->SECURITY_TYPE); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.SOURCE_ADDRESS %s", HEXSTRING (string, indicate->ACVarField.SOURCE_ADDRESS)); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.RunID %s", HEXSTRING (string, indicate->ACVarField.RunID)); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.SOURCE_ID %s", HEXSTRING (string, indicate->ACVarField.SOURCE_ID)); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.RESP_ID %s", HEXSTRING (string, indicate->ACVarField.RESP_ID)); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.NUM_SOUNDS %d", indicate->ACVarField.NUM_SOUNDS); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.ATTEN_PROFILE.NumGroups %d", indicate->ACVarField.ATTEN_PROFILE.NumGroups); 
    -				slac_debug (session, 0, __func__, "CM_ATTEN_CHAR.IND.ACVarField.ATTEN_PROFILE.AAG %s", hexstring (string, sizeof (string), indicate->ACVarField.ATTEN_PROFILE.AAG, indicate->ACVarField.ATTEN_PROFILE.NumGroups)); 
    -			} 
    -
    -#endif
    -
    -			slac_debug (session, 0, __func__, "--> CM_ATTEN_CHAR.RSP"); 
    -			memset (message, 0, sizeof (* message)); 
    -			EthernetHeader (& response->ethernet, session->EVSE_MAC, channel->host, channel->type); 
    -			HomePlugHeader1 (& response->homeplug, HOMEPLUG_MMV, (CM_ATTEN_CHAR | MMTYPE_RSP)); 
    -			response->APPLICATION_TYPE = session->APPLICATION_TYPE; 
    -			response->SECURITY_TYPE = session->SECURITY_TYPE; 
    -			memcpy (response->ACVarField.SOURCE_ADDRESS, session->PEV_MAC, sizeof (response->ACVarField.SOURCE_ADDRESS)); 
    -			memcpy (response->ACVarField.RunID, session->RunID, sizeof (response->ACVarField.RunID)); 
    -			memset (response->ACVarField.SOURCE_ID, 0, sizeof (response->ACVarField.SOURCE_ID)); 
    -			memset (response->ACVarField.RESP_ID, 0, sizeof (response->ACVarField.RESP_ID)); 
    -			response->ACVarField.Result = 0; 
    -			if (sendmessage (channel, message, sizeof (* response)) <= 0) 
    -			{ 
    -				return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -			} 
    -			return (0); 
    -		} 
    -	} 
    -	return (slac_debug (session, session->exit, __func__, "<-- CM_ATTEN_CHAR.IND ?")); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pev_cm_mnbc_sound.c.html b/docbook/pev_cm_mnbc_sound.c.html deleted file mode 100644 index e4f37e20..00000000 --- a/docbook/pev_cm_mnbc_sound.c.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - pev_cm_mnbc_sound.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pev_cm_mnbc_sound (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   slac.h
    - *
    - *   As HLE-PEV send cm_mnbc_sound indications unicast to the
    - *   MSOUND_TARGET address recorded in the session variable;
    - *
    - *   a brief delay of a few milliseconds is needed between msounds 
    - *   so that EVSE-PLC has time to forward CM_MNBC_SOUND.IND and
    - *   CM_ATTEN_PROFILE.IND to EVSE-HLE; session.timer controls this
    - *   delay;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PEV_CM_MNBC_SOUND_SOURCE
    -#define PEV_CM_MNBC_SOUND_SOURCE
    -
    -#include <string.h>
    -#include <errno.h>
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/timer.h"
    -#include "../iso15118/slac.h"
    -
    -signed pev_cm_mnbc_sound (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	struct cm_mnbc_sound_indicate * indicate = (struct cm_mnbc_sound_indicate *) (message); 
    -	signed sound = session->NUM_SOUNDS; 
    -	while (sound--) 
    -	{ 
    -		slac_debug (session, 0, __func__, "--> CM_MNBC_SOUND.IND"); 
    -		memset (message, 0, sizeof (* message)); 
    -		EthernetHeader (& indicate->ethernet, session->MSOUND_TARGET, channel->host, channel->type); 
    -		HomePlugHeader1 (& indicate->homeplug, HOMEPLUG_MMV, (CM_MNBC_SOUND | MMTYPE_IND)); 
    -		indicate->APPLICATION_TYPE = session->APPLICATION_TYPE; 
    -		indicate->SECURITY_TYPE = session->SECURITY_TYPE; 
    -		memcpy (indicate->MSVarField.SenderID, session->PEV_ID, sizeof (indicate->MSVarField.SenderID)); 
    -		indicate->MSVarField.CNT = sound; 
    -		memcpy (indicate->MSVarField.RunID, session->RunID, sizeof (indicate->MSVarField.RunID)); 
    -		memset (indicate->MSVarField.RND, 0, sizeof (indicate->MSVarField.RND)); 
    -		if (sendmessage (channel, message, sizeof (* indicate)) <= 0) 
    -		{ 
    -			return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -		} 
    -		SLEEP (session->pause); 
    -	} 
    -	return (0); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pev_cm_set_key.c.html b/docbook/pev_cm_set_key.c.html deleted file mode 100644 index b240d75e..00000000 --- a/docbook/pev_cm_set_key.c.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - pev_cm_set_key.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pev_cm_set_key (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   slac.h
    - *
    - *   PEV-HLE sets the NMK and NID on PEV-PLC using CM_SET_KEY.REQ; 
    - *   the NMK and NID must match those provided by EVSE-HLE using 
    - *   CM_SLAC_MATCH.CNF;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PEV_CM_SET_KEY_SOURCE
    -#define PEV_CM_SET_KEY_SOURCE
    -
    -#include <string.h>
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../mme/qualcomm.h"
    -#include "../mme/homeplug.h"
    -#include "../iso15118/slac.h"
    -
    -signed pev_cm_set_key (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -
    -#ifndef __GNUC__
    -#pragma pack(push,1)
    -#endif
    -
    -	struct __packed cm_set_key_request 
    -	{ 
    -		struct ethernet_hdr ethernet; 
    -		struct homeplug_fmi homeplug; 
    -		uint8_t KEYTYPE; 
    -		uint32_t MYNOUNCE; 
    -		uint32_t YOURNOUNCE; 
    -		uint8_t PID; 
    -		uint16_t PRN; 
    -		uint8_t PMN; 
    -		uint8_t CCOCAP; 
    -		uint8_t NID [SLAC_NID_LEN]; 
    -		uint8_t NEWEKS; 
    -		uint8_t NEWKEY [SLAC_NMK_LEN]; 
    -		uint8_t RSVD [3]; 
    -	} 
    -	* request = (struct cm_set_key_request *) (message); 
    -	struct __packed cm_set_key_confirm 
    -	{ 
    -		struct ethernet_hdr ethernet; 
    -		struct homeplug_fmi homeplug; 
    -		uint8_t RESULT; 
    -		uint32_t MYNOUNCE; 
    -		uint32_t YOURNOUNCE; 
    -		uint8_t PID; 
    -		uint16_t PRN; 
    -		uint8_t PMN; 
    -		uint8_t CCOCAP; 
    -		uint8_t RSVD [27]; 
    -	} 
    -	* confirm = (struct cm_set_key_confirm *) (message); 
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message)); 
    -	slac_debug (session, 0, __func__, "--> CM_SET_KEY.REQ"); 
    -	EthernetHeader (& request->ethernet, channel->peer, channel->host, channel->type); 
    -	HomePlugHeader1 (& request->homeplug, HOMEPLUG_MMV, (CM_SET_KEY | MMTYPE_REQ)); 
    -	request->KEYTYPE = SLAC_CM_SETKEY_KEYTYPE; 
    -	memset (& request->MYNOUNCE, 0xAA, sizeof (request->MYNOUNCE)); 
    -	memset (& request->YOURNOUNCE, 0x00, sizeof (request->YOURNOUNCE)); 
    -	request->PID = SLAC_CM_SETKEY_PID; 
    -	request->PRN = HTOLE16 (SLAC_CM_SETKEY_PRN); 
    -	request->PMN = SLAC_CM_SETKEY_PMN; 
    -	request->CCOCAP = SLAC_CM_SETKEY_CCO; 
    -	memcpy (request->NID, session->NID, sizeof (request->NID)); 
    -	request->NEWEKS = SLAC_CM_SETKEY_EKS; 
    -	memcpy (request->NEWKEY, session->NMK, sizeof (request->NEWKEY)); 
    -
    -#if SLAC_DEBUG
    -
    -	if (_anyset (session->flags, SLAC_VERBOSE)) 
    -	{ 
    -		char string [1024]; 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.KEYTYPE %d", request->KEYTYPE); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.MYNOUNCE %s", hexstring (string, sizeof (string), & request->MYNOUNCE, sizeof (request->MYNOUNCE))); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.YOURNOUNCE %s", hexstring (string, sizeof (string), & request->YOURNOUNCE, sizeof (request->MYNOUNCE))); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.PID %d", request->PID); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.PRN %d", LE32TOH (request->PRN)); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.PMN %d", request->PMN); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.CCoCAP %d", request->CCOCAP); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.NID %s", HEXSTRING (string, request->NID)); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.NEWEKS %d", request->NEWEKS); 
    -		slac_debug (session, 0, __func__, "CM_SET_KEY.NEWKEY %s", HEXSTRING (string, request->NEWKEY)); 
    -	} 
    -
    -#endif
    -
    -	if (sendpacket (channel, request, sizeof (* request)) <= 0) 
    -	{ 
    -		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -	} 
    -	while (readpacket (channel, confirm, sizeof (* confirm)) > 0) 
    -	{ 
    -		if (ntohs (confirm->ethernet.MTYPE) != ETH_P_HPAV) 
    -		{ 
    -			slac_debug (session, session->exit, __func__, "Ignore MTYPE 0x%04X", htons (confirm->ethernet.MTYPE)); 
    -			continue; 
    -		} 
    -		if (confirm->homeplug.MMV != HOMEPLUG_MMV) 
    -		{ 
    -			slac_debug (session, session->exit, __func__, "Ignore MMV 0x%02X", confirm->homeplug.MMV); 
    -			continue; 
    -		} 
    -		if (LE32TOH (confirm->homeplug.MMTYPE) != (CM_SET_KEY | MMTYPE_CNF)) 
    -		{ 
    -			slac_debug (session, session->exit, __func__, "Ignore MMTYPE 0x%04X", LE32TOH (confirm->homeplug.MMTYPE)); 
    -			continue; 
    -		} 
    -		slac_debug (session, 0, __func__, "<-- CM_SET_KEY.CNF"); 
    -		if (! confirm->RESULT) 
    -		{ 
    -			return (slac_debug (session, session->exit, __func__, "Can't set keys")); 
    -		} 
    -
    -#if SLAC_DEBUG
    -
    -		if (_anyset (session->flags, SLAC_VERBOSE)) 
    -		{ 
    -			char string [1024]; 
    -			slac_debug (session, 0, __func__, "CM_SET_KEY.RESULT %d", confirm->RESULT); 
    -			slac_debug (session, 0, __func__, "CM_SET_KEY.MYNOUNCE %s", hexstring (string, sizeof (string), & confirm->MYNOUNCE, sizeof (confirm->MYNOUNCE))); 
    -			slac_debug (session, 0, __func__, "CM_SET_KEY.YOURNOUNCE %s", hexstring (string, sizeof (string), & confirm->YOURNOUNCE, sizeof (confirm->MYNOUNCE))); 
    -			slac_debug (session, 0, __func__, "CM_SET_KEY.PID %d", confirm->PID); 
    -			slac_debug (session, 0, __func__, "CM_SET_KEY.PRN %d", LE32TOH (confirm->PRN)); 
    -			slac_debug (session, 0, __func__, "CM_SET_KEY.PMN %d", confirm->PMN); 
    -			slac_debug (session, 0, __func__, "CM_SET_KEY.CCoCAP %d", confirm->CCOCAP); 
    -		} 
    -
    -#endif
    -
    -		return (0); 
    -	} 
    -	return (slac_debug (session, session->exit, __func__, "<-- CM_SET_KEY.CNF ?")); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pev_cm_slac_match.c.html b/docbook/pev_cm_slac_match.c.html deleted file mode 100644 index 07056450..00000000 --- a/docbook/pev_cm_slac_match.c.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - pev_cm_slac_match.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pev_cm_slac_match (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   slac.h
    - *
    - *   send CM_SLAC_MATCH.REQ and receive CM_SLAC_MATCH.CNF; store NMK
    - *   and NID in the session variable so that PEV-HLE can configure 
    - *   PEV-PLC to form a network with EVSE-PLC;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PEV_CM_SLAC_MATCH_SOURCE
    -#define PEV_CM_SLAC_MATCH_SOURCE
    -
    -#include <string.h>
    -#include <errno.h>
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../iso15118/slac.h"
    -
    -signed pev_cm_slac_match (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	struct cm_slac_match_request * request = (struct cm_slac_match_request *) (message); 
    -	struct cm_slac_match_confirm * confirm = (struct cm_slac_match_confirm *) (message); 
    -	slac_debug (session, 0, __func__, "--> CM_SLAC_MATCH.REQ"); 
    -	memset (message, 0, sizeof (* message)); 
    -	EthernetHeader (& request->ethernet, session->EVSE_MAC, channel->host, channel->type); 
    -	HomePlugHeader1 (& request->homeplug, HOMEPLUG_MMV, (CM_SLAC_MATCH | MMTYPE_REQ)); 
    -	request->APPLICATION_TYPE = session->APPLICATION_TYPE; 
    -	request->SECURITY_TYPE = session->SECURITY_TYPE; 
    -	request->MVFLength = HTOLE16 (sizeof (request->MatchVarField)); 
    -	memcpy (request->MatchVarField.PEV_ID, session->PEV_ID, sizeof (request->MatchVarField.PEV_ID)); 
    -	memcpy (request->MatchVarField.PEV_MAC, session->PEV_MAC, sizeof (request->MatchVarField.PEV_MAC)); 
    -	memcpy (request->MatchVarField.RunID, session->RunID, sizeof (request->MatchVarField.RunID)); 
    -	if (sendmessage (channel, message, sizeof (* request)) <= 0) 
    -	{ 
    -		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -	} 
    -	if (readmessage (channel, message, HOMEPLUG_MMV, (CM_SLAC_MATCH | MMTYPE_CNF)) > 0) 
    -	{ 
    -		if (! memcmp (session->RunID, confirm->MatchVarField.RunID, sizeof (session->RunID))) 
    -		{ 
    -			slac_debug (session, 0, __func__, "<-- CM_SLAC_MATCH.CNF"); 
    -
    -#if SLAC_DEBUG
    -
    -			if (_anyset (session->flags, SLAC_VERBOSE)) 
    -			{ 
    -				char string [256]; 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.APPLICATION_TYPE %d", confirm->APPLICATION_TYPE); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.SECURITY_TYPE %d", confirm->SECURITY_TYPE); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MVFLength %d", LE16TOH (confirm->MVFLength)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MatchVarField.PEV_ID %s", HEXSTRING (string, confirm->MatchVarField.PEV_ID)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MatchVarField.PEV_MAC %s", HEXSTRING (string, confirm->MatchVarField.PEV_MAC)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MatchVarField.EVSE_ID %s", HEXSTRING (string, confirm->MatchVarField.EVSE_ID)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MatchVarField.EVSE_MAC %s", HEXSTRING (string, confirm->MatchVarField.EVSE_MAC)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MatchVarField.RunID %s", HEXSTRING (string, confirm->MatchVarField.RunID)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MatchVarField.NID %s", HEXSTRING (string, confirm->MatchVarField.NID)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_MATCH.CNF.MatchVarField.NMK %s", HEXSTRING (string, confirm->MatchVarField.NMK)); 
    -			} 
    -
    -#endif
    -
    -			memcpy (session->EVSE_ID, confirm->MatchVarField.EVSE_ID, sizeof (session->EVSE_ID)); 
    -			memcpy (session->EVSE_MAC, confirm->MatchVarField.EVSE_MAC, sizeof (session->EVSE_MAC)); 
    -			memcpy (session->NMK, confirm->MatchVarField.NMK, sizeof (session->NMK)); 
    -			memcpy (session->NID, confirm->MatchVarField.NID, sizeof (session->NID)); 
    -			return (0); 
    -		} 
    -	} 
    -	return (slac_debug (session, session->exit, __func__, "<-- CM_SLAC_MATCH.CNF ?")); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pev_cm_slac_param.c.html b/docbook/pev_cm_slac_param.c.html deleted file mode 100644 index 2d10e517..00000000 --- a/docbook/pev_cm_slac_param.c.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - pev_cm_slac_param.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pev_cm_slac_param (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   slac.h
    - *
    - *   PEV-HLE broadcasts cm_slac_param requests until at least one
    - *   matching cm_slac_param confirm is received; matching confirm 
    - *   has the same run identifier; EVSE-HLE returns information to 
    - *   the PEV-HLE;
    - *
    - *   return 0 on success, -1 on error and 1 on timeout;
    - *
    - *   this interaction effectivey synchronizes the PEV-HLE and one
    - *   or more EVSE-HLEs by initiating the SLAC protocol sequence;
    - *
    - *   MSOUND-TARGET will be FF:FF:FF:FF:FF:FF for SLAC;
    - *   NUM_SOUNDS will be 8 for SLAC;
    - *   TIME_OUT will be 10 for SLAC;
    - *   RESP_TYPE will be 00 for SLAC (???);
    - *   FORWARDING_STA will be 00:00:00:00:00:00 for SLAC when RESP_TYPE=0;
    - *   APPLICATION_TYPE will be 0 for SLAC;
    - *   SECUTITY_TYPE will be 0 for this application;
    - *   RunID will be that defined by PEV-HLE;
    - *
    - *   send cm_slac_param request then wait up to channel.timeout 
    - *   milliseconds for a cm_slac_param confirm having the same 
    - *   RunID as the request; the application type and security 
    - *   type should be the same as in the request; 
    - *
    - *   save the msound target, forwarding station, number of sounds, 
    - *   sounding timeout and response type for use later in the session; 
    - *
    - *   the forwarding stations is a vague concept; the specification 
    - *   authors say it should be FF:FF:FF:FF:FF:FF but here, the EVSE-HLE
    - *   will set it to the PEV MAC;
    - *   
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PEV_CM_SLAC_PARAM_SOURCE
    -#define PEV_CM_SLAC_PARAM_SOURCE
    -
    -#include <string.h>
    -#include <errno.h>
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../iso15118/slac.h"
    -
    -signed pev_cm_slac_param (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	extern byte const broadcast [ETHER_ADDR_LEN]; 
    -	struct cm_slac_param_request * request = (struct cm_slac_param_request *) (message); 
    -	struct cm_slac_param_confirm * confirm = (struct cm_slac_param_confirm *) (message); 
    -	slac_debug (session, 0, __func__, "--> CM_SLAC_PARAM.REQ"); 
    -	memset (message, 0, sizeof (* message)); 
    -	EthernetHeader (& request->ethernet, broadcast, channel->host, channel->type); 
    -	HomePlugHeader1 (& request->homeplug, HOMEPLUG_MMV, (CM_SLAC_PARAM | MMTYPE_REQ)); 
    -	request->APPLICATION_TYPE = session->APPLICATION_TYPE; 
    -	request->SECURITY_TYPE = session->SECURITY_TYPE; 
    -	memcpy (request->RunID, session->RunID, sizeof (request->RunID)); 
    -	request->CipherSuite [0] = HTOLE16 ((uint16_t) (session->counter)); 
    -	if (sendmessage (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0) 
    -	{ 
    -		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -	} 
    -	while (readmessage (channel, message, HOMEPLUG_MMV, (CM_SLAC_PARAM | MMTYPE_CNF)) > 0) 
    -	{ 
    -		if (! memcmp (session->RunID, confirm->RunID, sizeof (session->RunID))) 
    -		{ 
    -			slac_debug (session, 0, __func__, "<-- CM_SLAC_PARAM.CNF"); 
    -			if (confirm->APPLICATION_TYPE != session->APPLICATION_TYPE) 
    -			{ 
    -				slac_debug (session, session->exit, __func__, "Unexpected APPLICATION_TYPE"); 
    -			} 
    -			if (confirm->SECURITY_TYPE != session->SECURITY_TYPE) 
    -			{ 
    -				slac_debug (session, session->exit, __func__, "Unexpected SECURITY_TYPE"); 
    -			} 
    -			if (_anyset (session->flags, SLAC_COMPARE)) 
    -			{ 
    -				if (LE16TOH (confirm->CipherSuite) != (uint16_t) (session->counter)) 
    -				{ 
    -					slac_debug (session, session->exit, __func__, "session->counter mismatch! PEV=(%d) EVSE=(%d)", LE16TOH (confirm->CipherSuite), session->counter); 
    -				} 
    -			} 
    -
    -#if SLAC_DEBUG
    -
    -			if (_anyset (session->flags, SLAC_VERBOSE)) 
    -			{ 
    -				char string [256]; 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.MSOUND_TARGET %s", HEXSTRING (string, confirm->MSOUND_TARGET)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.NUM_SOUNDS %d", confirm->NUM_SOUNDS); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.TIME_OUT %d", confirm->TIME_OUT); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.RESP_TYPE %d", confirm->RESP_TYPE); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.FORWARDING_STA %s", HEXSTRING (string, confirm->FORWARDING_STA)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.APPLICATION_TYPE %d", confirm->APPLICATION_TYPE); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.SECURITY_TYPE %d", confirm->SECURITY_TYPE); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.RunID %s", HEXSTRING (string, confirm->RunID)); 
    -				slac_debug (session, 0, __func__, "CM_SLAC_PARAM.CNF.CipherSuite %d", confirm->CipherSuite); 
    -			} 
    -
    -#endif
    -
    -			memcpy (session->FORWARDING_STA, confirm->FORWARDING_STA, sizeof (session->FORWARDING_STA)); 
    -			memcpy (session->MSOUND_TARGET, confirm->MSOUND_TARGET, sizeof (session->MSOUND_TARGET)); 
    -			session->NUM_SOUNDS = confirm->NUM_SOUNDS; 
    -			session->TIME_OUT = confirm->TIME_OUT; 
    -			session->RESP_TYPE = confirm->RESP_TYPE; 
    -			return (0); 
    -		} 
    -	} 
    -	return (slac_debug (session, 0, __func__, "<-- CM_SLAC_PARAM.CNF ?")); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pev_cm_start_atten_char.c.html b/docbook/pev_cm_start_atten_char.c.html deleted file mode 100644 index e0835d3e..00000000 --- a/docbook/pev_cm_start_atten_char.c.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - pev_cm_start_atten_char.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pev_cm_start_atten_char (struct session * session, struct channel * channel, struct message * message);
    - *
    - *   slac.h
    - *   
    - *   the PEV-HLE broadcasts a CM_START_ATTEN_CHAR.IND to initiate a 
    - *   SLAC session; we broadcast three times per HPGP specification;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PEV_CM_START_ATTEN_CHAR_SOURCE
    -#define PEV_CM_START_ATTEN_CHAR_SOURCE
    -
    -#include <sys/time.h>
    -#include <memory.h>
    -#include <errno.h>
    -
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../ether/channel.h"
    -#include "../iso15118/slac.h"
    -
    -signed pev_cm_start_atten_char (struct session * session, struct channel * channel, struct message * message) 
    -
    -{ 
    -	struct cm_start_atten_char_indicate * indicate = (struct cm_start_atten_char_indicate *) (message); 
    -	slac_debug (session, 0, __func__, "--> CM_START_ATTEN_CHAR.IND"); 
    -	memset (message, 0, sizeof (* message)); 
    -	EthernetHeader (& indicate->ethernet, session->MSOUND_TARGET, channel->host, channel->type); 
    -	HomePlugHeader1 (& indicate->homeplug, HOMEPLUG_MMV, (CM_START_ATTEN_CHAR | MMTYPE_IND)); 
    -	indicate->APPLICATION_TYPE = session->APPLICATION_TYPE; 
    -	indicate->SECURITY_TYPE = session->SECURITY_TYPE; 
    -	indicate->ACVarField.NUM_SOUNDS = session->NUM_SOUNDS; 
    -	indicate->ACVarField.TIME_OUT = session->TIME_OUT; 
    -	indicate->ACVarField.RESP_TYPE = session->RESP_TYPE; 
    -	memcpy (indicate->ACVarField.FORWARDING_STA, session->FORWARDING_STA, sizeof (indicate->ACVarField.FORWARDING_STA)); 
    -	memcpy (indicate->ACVarField.RunID, session->RunID, sizeof (indicate->ACVarField.RunID)); 
    -	if (sendmessage (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0) 
    -	{ 
    -		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -	} 
    -
    -#if 0
    -
    -/*	
    - *	the GreenPHY spec says to send CM_START_ATTEN.IND three times to ensure
    - *	that is is received;
    - */
    -
    -	if (sendmessage (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0) 
    -	{ 
    -		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -	} 
    -	if (sendmessage (channel, message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) <= 0) 
    -	{ 
    -		return (slac_debug (session, 1, __func__, CHANNEL_CANTSEND)); 
    -	} 
    -
    -#endif
    -
    -	return (0); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pib.h.html b/docbook/pib.h.html deleted file mode 100644 index 143a6b3a..00000000 --- a/docbook/pib.h.html +++ /dev/null @@ -1,836 +0,0 @@ - - - - - - pib.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pib.h - PIB version definitions and declarations;
    - *
    - *   The PIB undergoes periodic revision as new features are added;
    - *   versions are distiguished from one another by the first two bytes;
    - *
    - *   this file declares PIB header structure for PIBs released to
    - *   date; it does not define the position of all PIB information
    - *   because there must be some mystery to life;
    - *
    - *   call function pibpeek() to display a buffer holding an unkown
    - *   PIB structure;
    - *
    - *.  Qualcomm Atheros HomePlug AV Powerline Toolkit;
    - *:  Copyright (c) 2006-2010 by Intellon Corporation; ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIB_HEADER
    -#define PIB_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdint.h>
    -#include <errno.h>
    -
    -#ifndef ETHER_ADDR_LEN
    -#define ETHER_ADDR_LEN 6 /* normally defined in ethernet.h or if_ether.h */
    -#endif
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -#include "../tools/memory.h"
    -#include "../key/HPAVKey.h"
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PIB_NAME_LEN 32
    -#define PIB_HFID_LEN 64
    -#define PIB_TEXT_LEN 256
    -#define PIB_KEY_LEN 16
    -
    -#define PIB_SILENCE     (1 << 0)
    -#define PIB_VERBOSE     (1 << 1)
    -#define PIB_MANIFEST    (1 << 2)
    -#define PIB_MAC         (1 << 3)
    -#define PIB_MACINC      (1 << 4)
    -#define PIB_NMK         (1 << 5)
    -#define PIB_DAK         (1 << 6)
    -#define PIB_MFGSTRING   (1 << 7)
    -#define PIB_USER        (1 << 8)
    -#define PIB_NETWORK     (1 << 9)
    -#define PIB_CCO_MODE    (1 << 10)
    -#define PIB_NID         (1 << 11)
    -#define PIB_CHECKED     (1 << 12)
    -
    -#define INT_PRESCALER_OFFSET 0x0A10
    -#define INT_PRESCALER_LENGTH (1155 * sizeof (uint32_t))
    -#define AMP_PRESCALER_OFFSET 0x0A30
    -#define AMP_PRESCALER_LENGTH ((2880 * 5) / sizeof (uint32_t))
    -#define PLC_PRESCALER_OFFSET 0x0F2B
    -#define PLC_PRESCALER_LENGTH (1345 / sizeof (uint32_t))
    -#define QCA_PRESCALER_OFFSET 0x12E8
    -#define QCA_PRESCALER_LENGTH 1345
    -
    -#define INDEX_TO_FREQ(index) ((float)((index)+74)/40.96)
    -#define FREQ_TO_INDEX(freq)  ((unsigned)(40.96*(freq))-74)
    -
    -/*====================================================================*
    - *   standard PIB message formats;
    - *--------------------------------------------------------------------*/
    -
    -#define PIB_BADVERSION "%s found bad PIB version in %s", __func__
    -#define PIB_BADCONTENT "%s found wrong PIB content in %s", __func__
    -#define PIB_BADLENGTH "%s found wrong PIB image length in %s", __func__
    -#define PIB_BADCHECKSUM "%s found wrong PIB image checksum in %s", __func__
    -#define PIB_BADNID "%s found wrong Preferred NID in %s", __func__
    -
    -/*====================================================================*
    - *   Basic PIB header;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed pib_header
    -
    -{
    -	uint8_t FWVERSION;
    -	uint8_t PIBVERSION;
    -	uint16_t RESERVED1;
    -	uint16_t PIBLENGTH;
    -	uint16_t RESERVED2;
    -	uint32_t CHECKSUM;
    -}
    -
    -pib_header;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   As of PIB 1.4 a generic structure evolved; this is the start;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed simple_pib
    -
    -{
    -	uint16_t PIBVERSION;
    -	uint16_t RESERVED1;
    -	uint16_t PIBLENGTH;
    -	uint16_t RESERVED2;
    -	uint32_t CHECKSUM;
    -	uint8_t MAC [ETHER_ADDR_LEN];
    -	uint8_t DAK [HPAVKEY_DAK_LEN];
    -	uint16_t RESERVED3;
    -	uint8_t MFG [PIB_HFID_LEN];
    -	uint8_t NMK [HPAVKEY_NMK_LEN];
    -	uint8_t USR [PIB_HFID_LEN];
    -	uint8_t NET [PIB_HFID_LEN];
    -	uint8_t CCoSelection;
    -	uint8_t CexistModeSelect;
    -	uint8_t PLFreqSelect;
    -	uint8_t RESERVED4;
    -	uint8_t PreferredNID [HPAVKEY_NID_LEN];
    -	uint8_t AutoFWUpgradeable;
    -	uint8_t MDUConfiguration;
    -	uint8_t MDURole;
    -	uint8_t RESERVED5 [10];
    -	uint8_t StaticNetworkConfiguration [128];
    -	uint8_t InterfaceConfiguration [64];
    -}
    -
    -simple_pib;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB1
    -
    -{
    -	uint8_t FWVersion;
    -	uint8_t PIBVersion;
    -	uint16_t Reserved1;
    -	uint16_t PIBLength;
    -}
    -
    -PIB1;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v1.2; this is deprecated;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB1_2
    -
    -{
    -	uint8_t FWVersion;
    -	uint8_t PIBVersion;
    -	uint16_t Reserved1;
    -	uint8_t DAK [HPAVKEY_DAK_LEN];
    -	uint8_t NMK [HPAVKEY_NMK_LEN];
    -	uint8_t MAC [ETHER_ADDR_LEN];
    -	uint32_t FLG;
    -}
    -
    -PIB1_2;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB Structure as of v1.3; this is deprecated;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB1_3
    -
    -{
    -	uint8_t FWVersion;
    -	uint8_t PIBVersion;
    -	uint16_t Reserved1;
    -	uint8_t MAC [ETHER_ADDR_LEN];
    -	uint8_t DAK [HPAVKEY_DAK_LEN];
    -	uint16_t Reserved2;
    -	uint8_t MFG [PIB_HFID_LEN];
    -	uint8_t NMK [HPAVKEY_NMK_LEN];
    -	uint8_t USR [PIB_HFID_LEN];
    -	uint8_t NET [PIB_HFID_LEN];
    -}
    -
    -PIB1_3;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB sub-structure introduced as of v1.4
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed VersionHeader
    -
    -{
    -	uint8_t FWVersion;
    -	uint8_t PIBVersion;
    -	uint16_t Reserved1;
    -	uint16_t PIBLength;
    -	uint16_t Reserved2;
    -	uint32_t Checksum;
    -}
    -
    -VersionHeader;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB Structure as of v1.4
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB1_4
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct __packed
    -	{
    -		uint8_t MAC [ETHER_ADDR_LEN];
    -		uint8_t DAK [HPAVKEY_DAK_LEN];
    -		uint16_t Reserved1;
    -		uint8_t MFG [PIB_HFID_LEN];
    -		uint8_t NMK [HPAVKEY_NMK_LEN];
    -		uint8_t USR [PIB_HFID_LEN];
    -		uint8_t NET [PIB_HFID_LEN];
    -		uint8_t CCoSelection;
    -		uint8_t CoexistModeSelection;
    -		uint8_t FreqSelection;
    -		uint8_t Reserved2;
    -	}
    -	LocalDeviceConfig;
    -}
    -
    -PIB1_4;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB sub-structures introduced as of v1.5;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed LocalDeviceConfig
    -
    -{
    -	uint8_t MAC [ETHER_ADDR_LEN];
    -	uint8_t DAK [HPAVKEY_DAK_LEN];
    -	uint16_t Reserved1;
    -	uint8_t MFG [PIB_HFID_LEN];
    -	uint8_t NMK [HPAVKEY_NMK_LEN];
    -	uint8_t USR [PIB_HFID_LEN];
    -	uint8_t NET [PIB_HFID_LEN];
    -	uint8_t CCoSelection;
    -	uint8_t CoexistModeSelect;
    -	uint8_t PLFreqSelection;
    -	uint8_t Reserved2;
    -	uint8_t PreferredNID [HPAVKEY_NID_LEN];
    -	uint8_t AutoFWUpgradeable;
    -	uint8_t MDUConfiguration;
    -	uint8_t MDURole;
    -	uint8_t Reserved3 [10];
    -}
    -
    -LocalDeviceConfig;
    -typedef struct __packed StaticNetworkConfig
    -
    -{
    -	uint8_t Reserved [128];
    -}
    -
    -StaticNetworkConfig;
    -typedef struct __packed InterfaceConfig
    -
    -{
    -	uint8_t Reserved [96];
    -}
    -
    -InterfaceConfig;
    -typedef struct __packed IGMPConfig
    -
    -{
    -	uint8_t Reserved [32];
    -}
    -
    -IGMPConfig;
    -typedef struct __packed QoSParameters
    -
    -{
    -	uint8_t UnicastPriority;
    -	uint8_t McastPriority;
    -	uint8_t IGMPPriority;
    -	uint8_t AVStreamPriority;
    -	uint32_t PriorityTTL [4];
    -	uint8_t EnableVLANOver;
    -	uint8_t EnableTOSOver;
    -	uint16_t Reserved1;
    -	uint32_t VLANPrioTOSPrecMatrix;
    -	uint8_t Reserved2 [2020];
    -}
    -
    -QoSParameters;
    -typedef struct __packed ToneNotchParameters
    -
    -{
    -	uint8_t Reserved [5120];
    -}
    -
    -ToneNotchParameters;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v1.5
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB1_5
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -}
    -
    -PIB1_5;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB sub-structures introduced as of v2.0
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed FeatureConfiguration
    -
    -{
    -	uint8_t Reserved [128];
    -}
    -
    -FeatureConfiguration;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v2.0
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB2_0
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -}
    -
    -PIB2_0;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB sub-structures introduced as of v3.0;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed V3_0Configuration
    -
    -{
    -	uint32_t AVLNMembership;
    -	uint32_t SimpleConnectTimeout;
    -	uint8_t EnableLEDThroughputIndicate;
    -	uint8_t MidLEDThroughputThreshold;
    -	uint8_t HighLEDThroughputThreshold;
    -	uint8_t Reserved1;
    -	uint32_t EnableUnicastQueriesToMembers;
    -	uint32_t DisableExpireGroupMulticastInterval;
    -	uint32_t DisableLEDTestLights;
    -	uint8_t GPIOMap [12];
    -	uint8_t Reserved [8];
    -}
    -
    -V3_0Configuration;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v3.0;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB3_0
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -	struct V3_0Configuration V3_0Configuration;
    -}
    -
    -PIB3_0;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB sub-structures introduced as of v3.1;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed V3_1Configuration
    -
    -{
    -	uint8_t Reserved [128];
    -}
    -
    -V3_1Configuration;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v3.1;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB3_1
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -	struct V3_0Configuration V3_0Configuration;
    -	struct V3_1Configuration V3_1Configuration;
    -}
    -
    -PIB3_1;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v3.2
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB3_2
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -	struct V3_0Configuration V3_0Configuration;
    -	struct V3_1Configuration V3_1Configuration;
    -}
    -
    -PIB3_2;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB sub-structure introduced as of v3.3;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed V3_3Configuration
    -
    -{
    -	uint8_t Reserved [64];
    -}
    -
    -V3_3Configuration;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v3.3
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB3_3
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -	struct V3_0Configuration V3_0Configuration;
    -	struct V3_1Configuration V3_1Configuration;
    -	struct V3_3Configuration V3_3Configuration;
    -}
    -
    -PIB3_3;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v3.4
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB3_4
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -	struct V3_0Configuration V3_0Configuration;
    -	struct V3_1Configuration V3_1Configuration;
    -	struct V3_3Configuration V3_3Configuration;
    -}
    -
    -PIB3_4;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB sub-structure introduced as of v3.5
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed FeatureGroupEnablement
    -
    -{
    -	uint8_t Reserved [16];
    -}
    -
    -FeatureGroupEnablement;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v3.5
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB3_5
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -	struct V3_0Configuration V3_0Configuration;
    -	struct V3_1Configuration V3_1Configuration;
    -	struct V3_3Configuration V3_3Configuration;
    -	struct FeatureGroupEnablement FeatureGroupEnablement;
    -}
    -
    -PIB3_5;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   PIB structure as of v3.6
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -typedef struct __packed PIB3_6
    -
    -{
    -	struct VersionHeader VersionHeader;
    -	struct LocalDeviceConfig LocalDeviceConfig;
    -	struct StaticNetworkConfig StaticNetworkConfig;
    -	struct InterfaceConfig InterfaceConfig;
    -	struct IGMPConfig IGMPConfig;
    -	struct QoSParameters QoSParameters;
    -	struct ToneNotchParameters ToneNotchParameters;
    -	struct FeatureConfiguration FeatureConfiguration;
    -	struct V3_0Configuration V3_0Configuration;
    -	struct V3_1Configuration V3_1Configuration;
    -	struct V3_3Configuration V3_3Configuration;
    -	struct FeatureGroupEnablement FeatureGroupEnablement;
    -}
    -
    -PIB3_6;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -signed pibseek (signed fd, char const * filename, flag_t flags);
    -signed pibfile (struct _file_ const * pib);
    -signed pibfile1 (struct _file_ const * pib);
    -signed pibfile2 (struct _file_ const * pib);
    -signed piblock (struct _file_ const * pib);
    -signed pibpeek1 (void const * memory);
    -signed pibpeek2 (void const * memory);
    -uint16_t pibscalers (struct _file_ * pib);
    -uint16_t psread (uint16_t values [], uint16_t limit, FILE * fp);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pib2xml.1.html b/docbook/pib2xml.1.html deleted file mode 100644 index d6f4de66..00000000 --- a/docbook/pib2xml.1.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - pib2xml.1 - - - - - - - - - -
    -pib2xml(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  pib2xml(1)
    -
    -NAME
    -       pib2xml - print object driven xml editior intructions
    -
    -SYNOPSIS
    -       pib2xml [options] file [file] [...]  [>stdout]
    -
    -DESCRIPTION
    -       Write XML editor instructions on stdout.  This requires an object definition file that contains the size and name of data
    -       regions and members within a binary object or file.  Individual data members are presented as XML instructions  that  can
    -       be used by program pxe to edit PIB files.
    -
    -OPTIONS
    -       -f definitions
    -              The  name  of  the  object definition file that contains the size, name and description of objects within a binary
    -              file.  The definition file is not modified.  This option is required.  There is no default file.
    -
    -       -s schema
    -              The url for the XML schema.  The default schema is piboffset.xsd for the Qualcomm Atheros Powerline Toolkit verion
    -              of this program.
    -
    -       -x     Print  an  XML  schema on stdout.  This schema defines the elements and attributes used to define data objects and
    -              members read from input files.  It can be used to validate XML files used with program pxe.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The name of a binary file.  The file must have either Thunderbolt/Lightning or Panther/Lynx format or output  will
    -              be incorrect.  The file is not modified by this program.  Only one such file is permitted on the command line.
    -
    -EXAMPLES
    -       The  following  is  an example object definition file that defines a standard ethernet frame and member fields within it.
    -       The comments and descriptions shown are optional.  The field lengths and field names are not.  Zero-length fields  denote
    -       arbitrary field groups and are used by program offset to print headings.
    -
    -          # ========================================
    -          #
    -          # ----------------------------------------
    -
    -          0 header
    -          6 ODA Own Destination Address
    -          6 OSA Own Source Address
    -          2 ET Ethertype or frame length
    -
    -          # ========================================
    -          #
    -          # ----------------------------------------
    -
    -          0 body
    -          1500 Payload
    -
    -          # ========================================
    -          #
    -          # ----------------------------------------
    -
    -          0 trailer
    -          4 CRC Cyclical Redundancy Check
    -
    -       The  following  command  uses  object  definition file ether.txt to identify and display member fields within binary file
    -       abc.bin as a set of xml instructions that can be used by program xde to edit other files.
    -
    -          # pib2xml -f ether.txt abc.bin
    -
    -       The next command writes the xml schema that defines the elements and attributes used in the  edit  instructions  to  file
    -       data.xsd.  This file can be used to validate xml edit instructions.
    -
    -          # pib2xml -x > data.xsd
    -
    -SEE ALSO
    -       chkpib(7), chkpib2(7), getpib(7), modpib(1), pibcomp(1), pibdump(1), setpib(1), xml2pib(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@cmassoc.net>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  pib2xml(1)
    -
    - - - diff --git a/docbook/pib2xml.c.html b/docbook/pib2xml.c.html deleted file mode 100644 index 208ffe79..00000000 --- a/docbook/pib2xml.c.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - pib2xml.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pib2xml.c
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <unistd.h>
    -#include <ctype.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/endian.h"
    -#include "../tools/format.h"
    -#include "../tools/files.h"
    -#include "../tools/chars.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../nodes/node.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/hexview.c"
    -#include "../tools/output.c"
    -#include "../tools/error.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmseek2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nodes/xmlschema.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void pibdump (signed fd, char const * filename, char const * schema, unsigned extent, flag_t flags);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void pibdump (signed fd, char const * filename, char const * schema, unsigned extent, flag_t flags)
    -
    -{
    -	unsigned offset = 0;
    -	signed indent = 0;
    -	signed length = 0;
    -	unsigned lineno = 1;
    -	char symbol [0x0100];
    -	char string [0x0400];
    -	char * sp;
    -	signed c;
    -	output (indent++, "<%s xmlns:xsi='%s' xsi:noNamespaceSchemaLocation='%s'>", DATA_OBJECT, XML_NAMESPACE, schema);
    -	while ((c = getc (stdin)) != EOF)
    -	{
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while (nobreak (c));
    -		}
    -		if (isspace (c))
    -		{
    -			if (c == '\n')
    -			{
    -				lineno++;
    -			}
    -			continue;
    -		}
    -		if (c == '+')
    -		{
    -			do { c = getc (stdin); } while (isblank (c));
    -		}
    -		length = 0;
    -		while (isdigit (c))
    -		{
    -			length *= 10;
    -			length += c - '0';
    -			c = getc (stdin);
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		sp = symbol;
    -		if (isalpha (c) || (c == '_'))
    -		{
    -			do
    -			{
    -				*sp++ = (char)(c);
    -				c = getc (stdin);
    -			}
    -			while (isident (c));
    -		}
    -		*sp = (char)(0);
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		if (c == '[')
    -		{
    -
    -#if 0
    -
    -			*sp++ = (char)(c);
    -
    -#endif
    -
    -			c = getc (stdin);
    -			while (isblank (c))
    -			{
    -				c = getc (stdin);
    -			}
    -			while (isdigit (c))
    -			{
    -
    -#if 0
    -
    -				*sp++ = (char)(c);
    -
    -#endif
    -
    -				c = getc (stdin);
    -			}
    -			while (isblank (c))
    -			{
    -				c = getc (stdin);
    -			}
    -			if (c != ']')
    -			{
    -				error (1, EINVAL, "Have '%c' but need ']'", c);
    -			}
    -
    -#if 0
    -
    -			*sp++ = (char)(c);
    -
    -#endif
    -
    -			c = getc (stdin);
    -		}
    -		*sp = (char)(0);
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		sp = string;
    -		while (nobreak (c))
    -		{
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -		}
    -		*sp = (char)(0);
    -		if (length > 0)
    -		{
    -
    -#if defined (WIN32)
    -
    -			byte * buffer = (byte *)(emalloc (length));
    -
    -#else
    -
    -			byte buffer [length];
    -
    -#endif
    -
    -			if (read (fd, buffer, length) == length)
    -			{
    -				output (indent++, "<%s name='%s'>", DATA_MEMBER, symbol);
    -
    -#if 0
    -
    -				if (*string)
    -				{
    -					output (indent++, "<text>");
    -					output (indent, "%s", string);
    -					output (indent--, "</text>");
    -				}
    -
    -#endif
    -
    -				output (indent++, "<%s>", DATA_OFFSET);
    -				output (indent, "%04X", offset);
    -				output (indent--, "</%s>", DATA_OFFSET);
    -				output (indent++, "<%s>", DATA_LENGTH);
    -				output (indent, "%d", length);
    -				output (indent--, "</%s>", DATA_LENGTH);
    -				output (indent++, "<%s>", DATA_MEMORY);
    -				for (c = 0; c < indent; c++)
    -				{
    -					printf ("\t");
    -				}
    -				for (c = 0; c < length; c++)
    -				{
    -					printf ("%02X", buffer [c]);
    -				}
    -				printf ("\n");
    -				output (indent--, "</%s>", DATA_MEMORY);
    -				output (indent--, "</%s>", DATA_MEMBER);
    -			}
    -
    -#if defined (WIN32)
    -
    -			free (buffer);
    -
    -#endif
    -
    -		}
    -		offset += length;
    -	}
    -	output (indent--, "</%s>", DATA_OBJECT);
    -	if (_allclr (flags, PIB_SILENCE))
    -	{
    -		if (offset != extent)
    -		{
    -			error (0, 0, "file %s is %d not %d bytes", filename, extent, offset);
    -		}
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"f:x",
    -		"file [file] [...]",
    -		"Qualcomm Atheros Parameter File XML Dump Utility",
    -		"f f\tobject definition file",
    -		"x\tprint XML schema on stdout and exit",
    -		(char const *)(0)
    -	};
    -	char const * schema = DATA_SCHEMA;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'f':
    -			if (!freopen (optarg, "rb", stdin))
    -			{
    -				error (1, errno, "Can't open %s", optarg);
    -			}
    -			break;
    -		case 'x':
    -			xmlschema ();
    -			return (0);
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc > 1)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -
    -#if defined (WIN32)
    -
    -	setmode (STDOUT_FILENO, O_BINARY);
    -
    -#endif
    -
    -	if ((argc) && (* argv))
    -	{
    -		signed fd;
    -		uint32_t version;
    -		if ((fd = open (*argv, O_BINARY | O_RDONLY)) == -1)
    -		{
    -			error (1, errno, "%s", *argv);
    -		}
    -		else if (read (fd, &version, sizeof (version)) != sizeof (version))
    -		{
    -			error (1, errno, "Can't read %s", *argv);
    -		}
    -		else if (lseek (fd, 0, SEEK_SET))
    -		{
    -			error (1, errno, "Can't home %s", *argv);
    -		}
    -		else if (LE32TOH (version) == 0x60000000)
    -		{
    -			error (1, errno, "Won't read %s", *argv);
    -		}
    -		else if (LE32TOH (version) == 0x00010001)
    -		{
    -			struct nvm_header2 nvm_header;
    -			if (!nvmseek2 (fd, *argv, &nvm_header, NVM_IMAGE_PIB))
    -			{
    -				pibdump (fd, *argv, schema, LE32TOH (nvm_header.ImageLength), flags);
    -			}
    -		}
    -		else
    -		{
    -			struct simple_pib pib_header;
    -			if (read (fd, &pib_header, sizeof (pib_header)) != sizeof (pib_header))
    -			{
    -				error (1, errno, "Can't read %s", *argv);
    -			}
    -			if (lseek (fd, 0, SEEK_SET))
    -			{
    -				error (1, errno, "Can't home %s", *argv);
    -			}
    -			pibdump (fd, *argv, schema, LE16TOH (pib_header.PIBLENGTH), flags);
    -		}
    -		close (fd);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pibcomp.1.html b/docbook/pibcomp.1.html deleted file mode 100644 index d29343e0..00000000 --- a/docbook/pibcomp.1.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - pibcomp.1 - - - - - - - - - -
    -pibcomp(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  pibcomp(1)
    -
    -NAME
    -       pibcomp - Qualcomm Atheros Parameter Block Compare Utility
    -
    -SYNOPSIS
    -       pibcomp [options] file file [>stdout]
    -
    -DESCRIPTION
    -       Read  and  compare  two Qualcomm Atheros powerline parameter block files and print only those objects that are different.
    -       It will detect and handle both old and new powerline parameter file formats.  This program is similar to program odc  but
    -       is  designed specifically for Qualcomm Atheros powerline parameter files.  Program odc is no longer supported and will be
    -       removed from future toolkit releases.
    -
    -       Object driven comparison requires an object definition file that lists the size and name of data data objects (ie;  inte‐
    -       gers, arrays or structures) within the parameter file.  Individual data members are presented as smaller, individual data
    -       dumps within a larger, overall data dump.  See program pibdump for more information of object definition file format.
    -
    -OPTIONS
    -       -f file
    -              The object definition file that lists the size, name and description of individual individual objects in order  of
    -              occurance.   If this option is omitted then object definitions are read from stdin.  The object definition file is
    -              not modified by this program.  See the pibdump man page for an example of an object definition file.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The name of a binary file.  Two binary files are needed for comparison and both should conform to the object defi‐
    -              nition file for the comarison to be meaningful.
    -
    -EXAMPLES
    -       The following example compares file abc.bin and def.bin and prints objects that are different in hexdump format.  Objects
    -       are defined in objects.txt and read using -f.
    -
    -          # pibcomp -f objects.txt abc.bin def.bin
    -
    -SEE ALSO
    -       chkpib(7), chkpib2(7), getpib(7), modpib(1), pib2xml(1), pibdump(1), setpib(1), xml2pib(1)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  pibcomp(1)
    -
    - - - diff --git a/docbook/pibcomp.c.html b/docbook/pibcomp.c.html deleted file mode 100644 index b4c0b215..00000000 --- a/docbook/pibcomp.c.html +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - pibcomp.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pibcomp.c - Qualcomm Atheros Parameter Information Block Compare Utility
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <ctype.h>
    -#include <errno.h>
    -#include <sys/stat.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../tools/chars.h"
    -#include "../tools/sizes.h"
    -#include "../tools/files.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/hexview.c"
    -#include "../tools/hexoffset.c"
    -#include "../tools/error.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmseek2.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void function (char const * filename [], flag_t flags);
    - *
    - *   read object definitions from stdin and use them to compare two
    - *   files; dump only those objects that differ on stdout;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (char const * filename [], flag_t flags)
    -
    -{
    -	unsigned file;
    -	unsigned object = 0;
    -	unsigned lineno = 1;
    -	signed fd [2];
    -	signed length = 0;
    -	off_t origin [2];
    -	off_t offset [2];
    -	off_t extent [2];
    -	char memory [_ADDRSIZE+1];
    -	char symbol [_NAMESIZE];
    -	char string [_LINESIZE];
    -	char * sp;
    -	signed c;
    -	for (file = 0; file < SIZEOF (fd); file++)
    -	{
    -		uint32_t version;
    -		if ((fd [file] = open (filename [file], O_BINARY|O_RDONLY)) == -1)
    -		{
    -			error (1, errno, "%s", filename [file]);
    -		}
    -		if (read (fd [file], &version, sizeof (version)) != sizeof (version))
    -		{
    -			error (1, errno, FILE_CANTREAD, filename [file]);
    -		}
    -		if ((extent [file] = lseek (fd [file], 0, SEEK_END)) == (off_t)(-1))
    -		{
    -			error (1, 0, FILE_CANTSIZE, filename [file]);
    -		}
    -		if ((origin [file] = lseek (fd [file], 0, SEEK_SET)))
    -		{
    -			error (1, errno, FILE_CANTHOME, filename [file]);
    -		}
    -		if (LE32TOH (version) == 0x60000000)
    -		{
    -			error (1, ENOTSUP, "%s is not a PIB file", filename [file]);
    -		}
    -		if (LE32TOH (version) == 0x00010001)
    -		{
    -			struct nvm_header2 nvm_header;
    -			if (nvmseek2 (fd [file], filename [file], &nvm_header, NVM_IMAGE_PIB))
    -			{
    -				error (1, ENOTSUP, "%s is not a PIB file", filename [file]);
    -			}
    -			origin [file] = lseek (fd [file], 0, SEEK_CUR);
    -		}
    -	}
    -	if (origin [0] != origin [1])
    -	{
    -		error (0, EINVAL, "PIBs have different offsets");
    -	}
    -	memset (offset, 0, sizeof (offset));
    -	while ((c = getc (stdin)) != EOF)
    -	{
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while (nobreak (c));
    -			lineno++;
    -			continue;
    -		}
    -		if (isspace (c))
    -		{
    -			if (c == '\n')
    -			{
    -				lineno++;
    -			}
    -			continue;
    -		}
    -		if (c == '+')
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while (isblank (c));
    -		}
    -		length = 0;
    -		while (isdigit (c))
    -		{
    -			length *= 10;
    -			length += c - '0';
    -			c = getc (stdin);
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		sp = symbol;
    -		if (isalpha (c) || (c == '_'))
    -		{
    -			do
    -			{
    -				*sp++ = (char)(c);
    -				c = getc (stdin);
    -			}
    -			while (isident (c));
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		if (c == '[')
    -		{
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -			while (isblank (c))
    -			{
    -				c = getc (stdin);
    -			}
    -			while (isdigit (c))
    -			{
    -				*sp++ = (char)(c);
    -				c = getc (stdin);
    -			}
    -			while (isblank (c))
    -			{
    -				c = getc (stdin);
    -			}
    -			*sp = (char)(0);
    -			if (c != ']')
    -			{
    -				error (1, EINVAL, "Have '%s' but need ']' on line %d", symbol, lineno);
    -			}
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -		}
    -		*sp = (char)(0);
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		sp = string;
    -		while (nobreak (c))
    -		{
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -		}
    -		*sp = (char)(0);
    -		if (length > 0)
    -		{
    -
    -#if defined (WIN32)
    -
    -			char * buffer [2];
    -			buffer [0] = (char *)(emalloc (length));
    -			buffer [1] = (char *)(emalloc (length));
    -
    -#else
    -
    -			byte buffer [2][length];
    -
    -#endif
    -
    -			if ((read (fd [0], buffer [0], length) == length) && (read (fd [1], buffer [1], length) == length))
    -			{
    -				if (memcmp (buffer [0], buffer [1], length))
    -				{
    -					if (!object++)
    -					{
    -						for (c = 0; c < _ADDRSIZE + 65; c++)
    -						{
    -							putc ('-', stdout);
    -						}
    -						putc ('\n', stdout);
    -					}
    -					printf ("%s %d %s\n", hexoffset (memory, sizeof (memory), offset [0]), length, symbol);
    -					for (c = 0; c < _ADDRSIZE; c++)
    -					{
    -						putc ('-', stdout);
    -					}
    -					printf (" %s\n", filename [0]);
    -					hexview (buffer [0], offset [0], length, stdout);
    -					for (c = 0; c < _ADDRSIZE; c++)
    -					{
    -						putc ('-', stdout);
    -					}
    -					printf (" %s\n", filename [1]);
    -					hexview (buffer [1], offset [1], length, stdout);
    -					for (c = 0; c < _ADDRSIZE + 65; c++)
    -					{
    -						putc ('-', stdout);
    -					}
    -					putc ('\n', stdout);
    -				}
    -			}
    -
    -#if defined (WIN32)
    -
    -			free (buffer [0]);
    -			free (buffer [1]);
    -
    -#endif
    -
    -		}
    -		offset [0] += length;
    -		offset [1] += length;
    -		lineno++;
    -	}
    -	if (_allclr (flags, PIB_SILENCE))
    -	{
    -		offset [0] += origin [0];
    -		offset [1] += origin [1];
    -		for (file = 0; file < SIZEOF (extent); file++)
    -		{
    -			if (offset [file] < extent [file])
    -			{
    -				error (0, 0, "%s exceeds definition by " OFF_T_SPEC " bytes", filename [file], extent [file] - offset [file]);
    -			}
    -			if (offset [file] > extent [file])
    -			{
    -				error (0, 0, "definition exceeds %s by " OFF_T_SPEC " bytes", filename [file], offset [file] - extent [file]);
    -			}
    -		}
    -		if (extent [0] > extent [1])
    -		{
    -			error (0, 0, "%s exceeds %s by " OFF_T_SPEC " bytes", filename [0], filename [1], extent [0] - extent [1]);
    -		}
    -		if (extent [1] > extent [0])
    -		{
    -			error (0, 0, "%s exceeds %s by " OFF_T_SPEC " bytes", filename [1], filename [0], extent [1] - extent [0]);
    -		}
    -	}
    -	close (fd [0]);
    -	close (fd [1]);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"f:qv",
    -		"file1 file2",
    -		"Qualcomm Atheros Parameter Information Block Compare Utility",
    -		"f f\tobject definition file",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *)(0)
    -	};
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'f':
    -			if (!freopen (optarg, "rb", stdin))
    -			{
    -				error (1, errno, "%s", optarg);
    -			}
    -			break;
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc != 2)
    -	{
    -		error (1, 0, "Need two files to compare.");
    -	}
    -	function (argv, flags);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pibdump.1.html b/docbook/pibdump.1.html deleted file mode 100644 index 71b40aa5..00000000 --- a/docbook/pibdump.1.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - pibdump.1 - - - - - - - - - -
    -pibdump(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  pibdump(1)
    -
    -NAME
    -       pibdump - Qualcomm Atheros Parameter Information Block Dump Utility
    -
    -SYNOPSIS
    -       pibdump [options] file [>stdout]
    -
    -DESCRIPTION
    -       Read a Qualcomm Atheros powerline parameter information block (PIB) file and print an object driven dump on stdout.  This
    -       program replaces program odd because it distinguishes between legacy and current PIB file formats.
    -
    -       An object driven dump requires an object definition file that lists the size and name  of  data  objects  (ie;  integers,
    -       arrays or structures) within the parameter file.  Individual data members are presented as smaller, individual data dumps
    -       within a larger, overall data dump.
    -
    -OPTIONS
    -       -f file
    -              The object definition file that lists the size, name and description of individual individual objects in order  of
    -              occurance.   If this option is omitted then object definitions are read from stdin.  The object definition file is
    -              not modified by this program.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The name of a binary file.  The file must have either Thunderbolt/Lightning or Panther/Lynx format or output  will
    -              be incorrect.  The file is not modified by this program.  Only one such file is permitted on the command line.
    -
    -EXAMPLES
    -       The  following is an example object definition file for an Ethernet frame.  Frame fields, like ODA, OSA and ETHTYPE,  are
    -       defined by length in order of their appears in the frame.  Array subscripts following object names are optional  but,  if
    -       present,  become  part  of the object name.  Fields having no length are headers and will be ignored.  Comments and blank
    -       lines are also ignored.
    -
    -          # ========================================
    -          #
    -          # ----------------------------------------
    -
    -          0 header
    -
    -          6 ODA[6] Own Destination Address
    -          6 OSA[6] Own Source Address
    -          2 ETHTYPE Ethertype or frame length
    -
    -          # ========================================
    -          #
    -          # ----------------------------------------
    -
    -          0 body
    -
    -          1500 Payload[1500]
    -
    -          # ========================================
    -          #
    -          # ----------------------------------------
    -
    -          0 trailer
    -
    -          4 CRC Cyclical Redundancy Check
    -
    -       The following command uses object definition file ether.txt to identify and display  member  fields  within  binary  file
    -       abc.bin in hexadecimal dump format.
    -
    -          # pibdump -f ether.txt abc.bin
    -
    -SEE ALSO
    -       chkpib(7), chkpib2(7), getpib(7), modpib(1), pib2xml(1), pibcomp(1), setpib(1), xml2pib(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  pibdump(1)
    -
    - - - diff --git a/docbook/pibdump.c.html b/docbook/pibdump.c.html deleted file mode 100644 index 162ee25a..00000000 --- a/docbook/pibdump.c.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - pibdump.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pibdump.c - Qualcomm Atheros Parameter Information Block Dump Utility
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <unistd.h>
    -#include <ctype.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/chars.h"
    -#include "../tools/flags.h"
    -#include "../tools/sizes.h"
    -#include "../tools/files.h"
    -#include "../pib/pib.h"
    -#include "../nvm/nvm.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/hexview.c"
    -#include "../tools/hexoffset.c"
    -#include "../tools/error.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmseek2.c"
    -#include "../nvm/nvm.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void pibdump (char const * filename, flag_t flags);
    - *
    - *   open the named file and determine if it is a Qualcomm Atheros
    - *   parameter information block based on file header information;
    - *   read object definitions from stdin and print an object driven
    - *   dump on stdout;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void pibdump (char const * filename, flag_t flags)
    -
    -{
    -	uint32_t version;
    -	unsigned object = 0;
    -	unsigned lineno = 0;
    -	off_t origin = 0;
    -	off_t offset = 0;
    -	off_t extent = 0;
    -	unsigned length = 0;
    -	char memory [_ADDRSIZE + 1];
    -	char symbol [_NAMESIZE];
    -	char string [_LINESIZE];
    -	char * sp;
    -	signed fd;
    -	signed c;
    -	if ((fd = open (filename, O_BINARY|O_RDONLY)) == -1)
    -	{
    -		error (1, errno, "%s", filename);
    -	}
    -	if (read (fd, &version, sizeof (version)) != sizeof (version))
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (LE32TOH (version) == 0x60000000)
    -	{
    -		error (1, 0, "%s is not a PIB file", filename);
    -	}
    -	else if (LE32TOH (version) == 0x00010001)
    -	{
    -		struct nvm_header2 nvm_header;
    -		if (nvmseek2 (fd, filename, &nvm_header, NVM_IMAGE_PIB))
    -		{
    -			error (1, 0, "%s is not a PIB file", filename);
    -		}
    -		extent = LE32TOH (nvm_header.ImageLength);
    -	}
    -	else
    -	{
    -		struct simple_pib pib_header;
    -		if (read (fd, &pib_header, sizeof (pib_header)) != sizeof (pib_header))
    -		{
    -			error (1, errno, FILE_CANTREAD, filename);
    -		}
    -		if (lseek (fd, 0, SEEK_SET))
    -		{
    -			error (1, errno, FILE_CANTHOME, filename);
    -		}
    -		extent = LE16TOH (pib_header.PIBLENGTH);
    -	}
    -	while ((c = getc (stdin)) != EOF)
    -	{
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while (nobreak (c));
    -			lineno++;
    -			continue;
    -		}
    -		if (isspace (c))
    -		{
    -			if (c == '\n')
    -			{
    -				lineno++;
    -			}
    -			continue;
    -		}
    -		if (c == '+')
    -		{
    -			do { c = getc (stdin); } while (isblank (c));
    -		}
    -		length = 0;
    -		while (isdigit (c))
    -		{
    -			length *= 10;
    -			length += c - '0';
    -			c = getc (stdin);
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		sp = symbol;
    -		if (isalpha (c) || (c == '_'))
    -		{
    -			do
    -			{
    -				*sp++ = (char)(c);
    -				c = getc (stdin);
    -			}
    -			while (isident (c));
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		if (c == '[')
    -		{
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -			while (isblank (c))
    -			{
    -				c = getc (stdin);
    -			}
    -			while (isdigit (c))
    -			{
    -				*sp++ = (char)(c);
    -				c = getc (stdin);
    -			}
    -			while (isblank (c))
    -			{
    -				c = getc (stdin);
    -			}
    -			*sp = (char)(0);
    -			if (c != ']')
    -			{
    -				error (1, EINVAL, "Have '%s' without ']' on line %d", symbol, lineno);
    -			}
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -		}
    -		*sp = (char)(0);
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		sp = string;
    -		while (nobreak (c))
    -		{
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -		}
    -		*sp = (char)(0);
    -		if (length)
    -		{
    -
    -#if defined (WIN32)
    -
    -			char * buffer = (char *)(emalloc (length));
    -
    -#else
    -
    -			byte buffer [length];
    -
    -#endif
    -
    -			if (read (fd, buffer, length) == (signed)(length))
    -			{
    -				if (!object++)
    -				{
    -					for (c = 0; c < _ADDRSIZE + 65; c++)
    -					{
    -						putc ('-', stdout);
    -					}
    -					putc ('\n', stdout);
    -				}
    -				printf ("%s %u %s\n", hexoffset (memory, sizeof (memory), offset), length, symbol);
    -				hexview (buffer, offset, length, stdout);
    -				for (c = 0; c < _ADDRSIZE + 65; c++)
    -				{
    -					putc ('-', stdout);
    -				}
    -				putc ('\n', stdout);
    -			}
    -
    -#if defined (WIN32)
    -
    -			free (buffer);
    -
    -#endif
    -
    -		}
    -		offset += length;
    -		lineno++;
    -	}
    -	offset += origin;
    -	if (_allclr (flags, PIB_SILENCE))
    -	{
    -		if (offset < extent)
    -		{
    -			error (0, 0, "file %s exceeds definition by " OFF_T_SPEC " bytes", filename, extent - offset);
    -		}
    -		if (offset > extent)
    -		{
    -			error (0, 0, "definition exceeds file %s by " OFF_T_SPEC " bytes", filename, offset - extent);
    -		}
    -		if (offset != extent)
    -		{
    -			error (0, 0, "file %s is " OFF_T_SPEC " bytes not " OFF_T_SPEC " bytes", filename, extent, offset);
    -		}
    -	}
    -	close (fd);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"f:qv",
    -		"file",
    -		"Qualcomm Atheros Parameter Information Block Dump Utility",
    -		"f f\tobject definition file",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *)(0)
    -	};
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'f':
    -			if (!freopen (optarg, "rb", stdin))
    -			{
    -				error (1, errno, "%s", optarg);
    -			}
    -			break;
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc > 1)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -	if ((argc) && (* argv))
    -	{
    -		pibdump (*argv, flags);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pibfile.c.html b/docbook/pibfile.c.html deleted file mode 100644 index 2ac76739..00000000 --- a/docbook/pibfile.c.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - pibfile.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pibfile (struct _file_ const * file);
    - *
    - *   pib.h
    - *
    - *   confirm that pib->file is a valid PIB file; determine if the
    - *   file is a panther/lynx image chain or flat file and call the
    - *   correct functions;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIBFILE_SOURCE
    -#define PIBFILE_SOURCE
    -
    -#include <stdio.h>
    -#include <stdint.h>
    -#include <unistd.h>
    -#include <memory.h>
    -#include <errno.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../pib/pib.h"
    -
    -signed pibfile (struct _file_ const * file)
    -
    -{
    -	uint32_t version;
    -	if (read (file->file, &version, sizeof (version)) != sizeof (version))
    -	{
    -		error (1, errno, FILE_CANTREAD, file->name);
    -	}
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (LE32TOH (version) == 0x60000000)
    -	{
    -		return (-1);
    -	}
    -	if (LE32TOH (version) == 0x00010001)
    -	{
    -		return (pibfile2 (file));
    -	}
    -	return (pibfile1 (file));
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pibfile1.c.html b/docbook/pibfile1.c.html deleted file mode 100644 index 243316ca..00000000 --- a/docbook/pibfile1.c.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - pibfile1.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pibfile1 (struct _file_ const * file);
    - *
    - *   pib.h
    - *
    - *   open a thunderbolt/lightning PIB file and validate it by
    - *   checking file size, checksum and selected internal parameters;
    - *   return a file descriptor on success; terminate the program on
    - *   error;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIBFILE1_SOURCE
    -#define PIBFILE1_SOURCE
    -
    -#include <unistd.h>
    -#include <errno.h>
    -
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../pib/pib.h"
    -
    -signed pibfile1 (struct _file_ const * file)
    -
    -{
    -	struct simple_pib simple_pib;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (read (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTREAD, file->name);
    -	}
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if ((simple_pib.RESERVED1) || (simple_pib.RESERVED2))
    -	{
    -		error (1, errno, PIB_BADCONTENT, file->name);
    -	}
    -	if (fdchecksum32 (file->file, LE16TOH (simple_pib.PIBLENGTH), 0))
    -	{
    -		error (1, errno, PIB_BADCHECKSUM, file->name);
    -	}
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pibfile2.c.html b/docbook/pibfile2.c.html deleted file mode 100644 index 86f94bf9..00000000 --- a/docbook/pibfile2.c.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - pibfile2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pibfile2 (struct _file_ const * file);
    - *
    - *   pib.h
    - *
    - *   open a panther/lynx PIB file and validate it by
    - *   checking file size, checksum and selected internal parameters;
    - *   return a file descriptor on success; terminate the program on
    - *   error;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIBFILE2_SOURCE
    -#define PIBFILE2_SOURCE
    -
    -#include <stdio.h>
    -#include <stdint.h>
    -#include <unistd.h>
    -#include <memory.h>
    -#include <errno.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -
    -signed pibfile2 (struct _file_ const * file)
    -
    -{
    -	struct nvm_header2 nvm_header;
    -	uint32_t origin = ~0;
    -	uint32_t offset = 0;
    -	unsigned module = 0;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	do
    -	{
    -		if (read (file->file, &nvm_header, sizeof (nvm_header)) != sizeof (nvm_header))
    -		{
    -			error (1, errno, NVM_HDR_CANTREAD, file->name, module);
    -		}
    -		if (LE16TOH (nvm_header.MajorVersion) != 1)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, file->name, module);
    -		}
    -		if (LE16TOH (nvm_header.MinorVersion) != 1)
    -		{
    -			error (1, errno, NVM_HDR_VERSION, file->name, module);
    -		}
    -		if (checksum32 (&nvm_header, sizeof (nvm_header), 0))
    -		{
    -			error (1, errno, NVM_HDR_CHECKSUM, file->name, module);
    -		}
    -		if (LE32TOH (nvm_header.PrevHeader) != origin)
    -		{
    -			error (1, errno, NVM_HDR_LINK, file->name, module);
    -		}
    -		if (LE32TOH (nvm_header.ImageType) == NVM_IMAGE_PIB)
    -		{
    -			if (fdchecksum32 (file->file, LE32TOH (nvm_header.ImageLength), nvm_header.ImageChecksum))
    -			{
    -				error (1, errno, NVM_IMG_CHECKSUM, file->name, module);
    -			}
    -			if (lseek (file->file, 0, SEEK_SET))
    -			{
    -				error (1, errno, FILE_CANTHOME, file->name);
    -			}
    -			return (0);
    -		}
    -		if (fdchecksum32 (file->file, LE32TOH (nvm_header.ImageLength), nvm_header.ImageChecksum))
    -		{
    -			error (1, errno, NVM_IMG_CHECKSUM, file->name, module);
    -		}
    -		origin = offset;
    -		offset = LE32TOH (nvm_header.NextHeader);
    -		module++;
    -	}
    -	while (~nvm_header.NextHeader);
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/piblock.c.html b/docbook/piblock.c.html deleted file mode 100644 index 1bedd6a1..00000000 --- a/docbook/piblock.c.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - piblock.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed piblock (struct _file_ const * pib);
    - *
    - *   recompute and update the checksum on a thunderbolt or lightning
    - *   PIB file where the checksum is located inside the PIB;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIBLOCK_SOURCE
    -#define PIBLOCK_SOURCE
    -
    -#include <unistd.h>
    -#include <errno.h>
    -
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../pib/pib.h"
    -
    -signed piblock (struct _file_ const * file)
    -
    -{
    -	struct simple_pib simple_pib;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, "1 " FILE_CANTHOME, file->name);
    -	}
    -	if (read (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTREAD, file->name);
    -	}
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	simple_pib.CHECKSUM = fdchecksum32 (file->file, LE16TOH (simple_pib.PIBLENGTH), simple_pib.CHECKSUM);
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, "2 " FILE_CANTHOME, file->name);
    -	}
    -	if (write (file->file, &simple_pib, sizeof (simple_pib)) != sizeof (simple_pib))
    -	{
    -		error (1, errno, FILE_CANTSAVE, file->name);
    -	}
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/piboffset.c.html b/docbook/piboffset.c.html deleted file mode 100644 index 9c2e4f68..00000000 --- a/docbook/piboffset.c.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - piboffset.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   uint32_t piboffset (struct _file_ * file)
    - *
    - *   The PIB is written to different SDRAM locations depending on
    - *   the chipset used; we use the PIN major/minor version here to
    - *   determine where to write the PIB but probably should switch
    - *   to using the hardware platform code derived from the
    - *   VS_SW_VER message;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#include <stdlib.h>
    -
    -#include "../plc/plc.h"
    -#include "../pib/pib.h"
    -
    -uint32_t piboffset (struct _file_ * file)
    -
    -{
    -	struct pib_header pib_header;
    -	uint32_t offset = 0;
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (read (file->file, &pib_header, sizeof (pib_header)) < sizeof (pib_header))
    -	{
    -		error (1, errno, FILE_CANTREAD, file->name);
    -	}
    -	if (lseek (file->file, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, file->name);
    -	}
    -	if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0305)
    -	{
    -		offset = LEGACY_PIBOFFSET;
    -	}
    -	else if (BE16TOH (*(uint16_t *)(&pib_header)) < 0x0500)
    -	{
    -		offset = INT6x00_PIBOFFSET;
    -	}
    -	else
    -	{
    -		offset = AR7x00_PIBOFFSET;
    -	}
    -	return (offset);
    -}
    -
    -
    -
    - - - diff --git a/docbook/piboffset.txt b/docbook/piboffset.txt deleted file mode 100644 index 59a9827c..00000000 --- a/docbook/piboffset.txt +++ /dev/null @@ -1,272 +0,0 @@ - 0 Untitled - 12 mReserved array[12] of uint8 - 6 mMACAddress CCMACAddress - 16 mDAK CCEncryptionKey - 2 mRSVD16 uint16 - 64 mHFID_Manufacturer CCHFID - 16 mNMK CCEncryptionKey - 64 mHFID_User CCHFID - 64 mHFID_AVLN CCHFID - 1 mCCoSelection uint8 - 1 mCoexistModeSelect uint8 - 1 mPLFreqSelection uint8 - 1 mRSVD8 uint8 - 6 mNIDByField_Byte array[6] of uint8 - 1 mHybridMode_mask 00C0 - 1 mAVLNMembership uint8 - 1 mMDUConfiguration uint8 - 1 mMDURole uint8 - 1 mSnifferEnabled uint8 - 6 mSnifferReturnMACAddress CCMACAddress - 1 mMemoryProfile uint8 - 1 mAuthorizedUpdateLevel uint8 - 1 mAuthorizedSimpleConnectEnabled uint8 - 16 mNVM_AuthorizationKey CCEncryptionKey - 4 mPIBReadCookie uint32 - 4 mChipSignatureId uint32 - 16 mProductIdString array[16] of char - 1 mBoardType uint8 - 1 mBoardRevisionNumber uint8 - 2 mReserved8 array[2] of uint8 - 84 mReserved32 array[2] of uint32 - 64 mCustomer_Rsvd array[64] of uint8 - 180 mQCA_Rsvd array[128] of uint8 - 1 mNumPorts uint8 - 160 mPortInfoArray array[32] of CCGenMultiPortInfo - 1 mOverrideDefaults uint8 - 4 mMaxFramesPerSec uint32 - 96 mPortConfigurations array[8] of CPortConfiguration - 1 mPhyAddressSelection uint8 - 1 mPhyAddressSelection_Data uint8 - 32 mProtocolId uint8 - 1 mProtocolId uint8 - 4 mBaudRate uint32 - 1 mDataLength uint8 - 1 mStopBits uint8 - 1 mParity uint8 - 1 mFlowControl uint8 - 23 mDivisorAdjustValue int8 - 1 mOverrideDefaults uint8 - 1 mIsEthernetEnabled uint8 - 1 mIsSpiSlaveEnabled uint8 - 53 mIsUartEnabled uint8 - 1 mOverrideDefaults uint8 - 1 mConfigFlags uint8 - 2 mReserved uint16 - 4 mMacAndIPv4NumberOfRulesForEachCategory array[4] of uint8 - 200 mMacAndIPv4RulesIntervalPairs array[10] of CCMACAndIPv4AddressIntervalPair - 4 mMacAndIPv6NumberOfRulesForEachCategory array[4] of uint8 - 556 mMacAndIPv6RulesIntervalPairs array[10] of CCMACAndIPv6AddressIntervalPair - 1 mUnicastPriority uint8 - 1 mMcastPriority uint8 - 1 mIGMPMLDPriority uint8 - 1 mAVStreamPriority uint8 - 16 mPriorityTTL_us array[4] of uint32 - 4 mMMETTL_us uint32 - 1 mEnableVLANOver uint8 - 1 mEnableTOSOver uint8 - 1 mEnableTrafficClass_DSCPOver uint8 - 1 mMinimumCapToPreserveForQos uint8 - 1 mPrio3_mask 0000 - 1 mPrio7_mask 0000 - 1 mPrec3_mask 0000 - 1 mPrec7_mask 0000 - 64 mTrafficClass_DSCPMatrices array[16] of CCTrafficClassMatrix - 4 mNumClassifierPriorityMaps uint32 - 4 mNumAutoConnections uint32 - 224 mClassifierPriorityMaps array[8] of CCClassifierPriorityMap_PIB -1600 mAutoConnections array[16] of CCAutoConnection_PIB - 1 mNumberOfConfigEntries uint8 - 16 mEntries array[8] of CAggregationConfigEntry - 103 Reserved_CustomAggregationParameters array[12] of uint32 - 4 mToneMaskType uint32 - 4 mEnabled uint32 - 4 mStartTone uint32 - 4 mEndTone uint32 - 12 mReserved array[3] of uint32 - 2 mPsdIndex uint16 - 2 mEnableDynamicPsd uint16 - 4 mPhySyncReference uint32 - 4 mTxPrescalerType uint32 -1348 mData array[337] of uint32 - 1 mMitigateEnabled uint8 - 4 mCorrelThreshold uint32 - 4 mScaledTxGain int32 - 1 mEnableIsolationChannelScanning_Selection uint8 - 8 mMasterIsolationChannelSelection_ChannelID uint64 - 1 mNumIsolationChannels uint8 - 384 mIsolationChannelConfiguration array[16] of CCIsolationChannelConfig - 1 mEnabled uint8 - 1 mDefaultHwCouplingState_LineNeutral uint8 - 1 mEnableToneMaskPhyLimitForSmartCoupler uint8 - 1 mReserved0 uint8 - 4 mCouplingControlGpioBitMask uint32 - 2 mAlternateCouplingMinImprovement_Percent uint16 - 2 mAlternateCouplingMinPhyRate_Mbps uint16 - 8 mReserved0 array[2] of uint32 - 4 mTimeoutForUnusedPrimaryChannel_ms uint32 - 4 mTimeoutForUnusedAlternateChannel_ms uint32 - 2 mMaxPhyRateScale_Percent uint16 - 2 mMinimumDropInUsedPhyRate_Mbps uint16 - 4 mMinTimeBetweenInitialSounding_ms uint32 - 4 mOverrideCouplingSelectTimeout_ms uint32 - 8 mReserved0 array[2] of uint32 - 32 mReserved1 array[8] of uint32 - 1 mEnableROBO_OnlyModeSelection uint8 - 1 mROBOModeSelection4UnicastData uint8 - 1 mROBOModeSelection4BroadcastData uint8 - 1 mROBOModeSelection4MMEs uint8 - 1 mSLAC_EnableMode uint8 - 4 mScaledTxGainAdjustment_LowAttenuationTone uint32 - 40 mScaledTxGainAdjustment_HighAttenuationTone uint32 - 4 mFeatureMapA uint32 - 4 mFeatureMapB uint32 - 4 mRsvdC uint32 - 4 mRsvdD uint32 - 1 mAllowNEKRotation uint8 - 1 mOverrideNEKRotationTimer uint8 - 2 mNEKRotationTime_Min uint16 - 4 mOverrideLocalNEK uint32 - 16 mLocalNEKToUse CCEncryptionKey - 1 mReserved0 uint8 - 1 mOverrideMinButtonPressHoldTime uint8 - 2 mMinButtonPressHoldTime uint16 - 1 mPBControlStatus uint8 - 1 mSTAMembershipMaskEnabled uint8 - 1 mExitDefaultEnabled uint8 - 1 mRejectDefaultEnabled uint8 - 1 mChainingEnabled uint8 - 1 mRSVD1 uint8 - 1 mRSVD2 uint8 - 16 mVendorSpecificNMK CCEncryptionKey - 4 mUplinkLimit_bps uint32 - 4 mDownlinkLimit_bps uint32 - 1 mMDUStaticSNID uint8 - 1 mOverrideBridgeTableAgingTime uint8 - 2 mLocalBridgeTableAgingTime_min uint16 - 2 mRemoteBridgeTableAgingTime_min uint16 - 47 mLocalMACAddressLimit uint8 - 4 mConfigFlags uint32 - 4 mTxToneMapExpiry_ms uint32 - 4 mRxToneMapExpiry_ms uint32 - 4 mTimeoutToResound_ms uint32 - 4 mMissingSackThresholdForUnplugDetection uint32 - 4 mUnplugTimeout_ms uint32 - 8 mContentionWindowTable array[4] of uint16 - 4 mBackoffDeferalCountTable array[4] of uint8 - 1 mGoodSoundCountThreshold uint8 - 1 mSoundCountThreshold_GoodSoundCountPass uint8 - 1 mSoundCountThreshold_GoodSoundCountFail uint8 - 1 mReserved1 uint8 - 1 mChannelAccessEnhancementControl uint8 - 3 mReserved0 array[3] of uint8 - 1 mChannelAccessEnhancementControl uint8 - 3 mReserved0 array[3] of uint8 - 1 mChannelAccessEnhancementControl uint8 - 3 mReserved0 array[3] of uint8 - 1 mChannelAccessEnhancementControl uint8 - 3 mReserved0 array[3] of uint8 - 1 mChannelAccessEnhancementControl uint8 - 3 mReserved0 array[3] of uint8 - 1 mChannelAccessEnhancementControl uint8 - 3 mReserved0 array[3] of uint8 - 64 mReserved array[2] of uint32 - 1 mOverrideDefaultLedEventBehavior uint8 - 1 mReportToHostConfig uint8 - 1 mNumBehaviors uint8 - 1 mNumEvents uint8 - 896 mBehaviorBlockArray array[32] of tBehaviorBlock - 384 mEventBlockArray array[48] of tEventBlock - 6 mPinToGpioNoMapping array[6] of uint8 - 2 mInputGpioMask uint16 - 2 mOutputGpioMask uint16 - 2 mControlGpioMask uint16 - 1 mData uint8 - 1 mData uint8 - 1 mRsvd_mask 00FC - 1 mData uint8 - 1 mPLLinkStatus_CCoDuration_sec uint8 - 1 mPLLinkStatus_StaDuration_sec uint8 - 1 mDefault_CCoPLLinkStatusOn uint8 - 1 mRsvd_mask 00F8 - 4 mLowLinkSpeed_kbps uint32 - 4 mHighLinkSpeed_kbps uint32 - 1 mReserved1 uint8 - 2 mSCID_MinHoldTime_ms uint16 - 2 mSCID_MaxHoldTime_ms uint16 - 2 mSCID_AddFailTimeout_ms uint16 - 2 mSCID_GpioMask uint16 - 4 mSCID_SCAdderTimeout_ms uint32 - 4 mSCID_SCJoinerTimeout_ms uint32 - 2 mSCID_SCTimeout_ms uint16 - 2 mSCID_JoinFailTimeout_ms uint16 - 2 mNMKRand_MinHoldTime_ms uint16 - 2 mNMKRand_MaxHoldTime_ms uint16 - 2 mNMKRand_GpioMask uint16 - 2 mReserved1 uint16 - 2 mRstFactDflt_MinHoldTime_ms uint16 - 2 mRstFactDflt_MaxHoldTime_ms uint16 - 2 mRstFactDflt_GpioMask uint16 - 2 mReserved1 uint16 - 2 mGPIOReportMME_MinHoldTime_ms uint16 - 2 mGPIOReportMME_MaxHoldTime_ms uint16 - 2 mGPIOReportMME_GpioMask uint16 - 2 mGPIOReportMME_Dest uint16 - 6 mGPIOReportMME_DestAddr CCMACAddress - 2 mReserved1 uint16 - 2 mGPIO_SCR_MME_MinHoldTime_ms uint16 - 2 mGPIO_SCR_MME_MaxHoldTime_ms uint16 - 2 mGPIO_SCR_MME_GpioMask uint16 - 2 mGPIO_SCR_MME_Dest uint16 - 6 mGPIO_SCR_MME_DestAddr CCMACAddress - 1 mGPIO_SCR_MME_UserEvt uint8 - 156 mGPIO_SCR_MME_StateCtrl uint8 - 2 mStandbyConfig uint16 - 4 mPowerSavePeriod tPowerSavePeriod - 4 mStandbyModeEnabledForStationRole uint32 - 1 mLedOnDutyCycle uint8 - 1 mbPowerLedEnabled bool - 4 mSignalingGpioAssignment array[4] of uint8 - 4 mProgrammingGpioAssignment array[5] of uint8 - 1 mNumberProgrammingGpios uint8 - 13 mMaxSize array[6] of uint32 - 1 mEnabled uint8 - 1 mPolarity uint8 - 1 mGpioNumber uint8 - 5 mReserved array[5] of uint8 - 8 mRSVD array[2] of uint32 - 120 mWakeEvents array[3] of CCAPMConcurrentEvents - 2 mNumberConcurrentWakeEvents uint16 - 120 mSleepEvents array[3] of CCAPMConcurrentEvents - 2 mNumberConcurrentSleepEvents uint16 - 4 mDurationB4Standby_ms uint32 - 4 mAwakeWindow tAwakeWindow - 4 mUnusedOptionBits_mask FFFC - 1 mEthPhyType uint8 - 1 mOptimizationType uint8 - 2 mRSVD1 array[2] of uint8 - 74 mRSVD2 array[2] of uint32 - 1 mStaticNetworkEnabled uint8 - 1 mLD_TEI uint8 - 6 mCCo_MACAdd CCMACAddress - 1 mSNID uint8 - 1 mNumPeerNodes uint8 - 14 mPeerNodes array[2] of CCPeerNodeX - 1 mContinuousRx uint8 - 1 mMaxPbsPerSymbol uint8 - 1 mMaxModulation uint8 - 1 mRsvd8 uint8 - 4 mRsvd32 uint32 - 96 mMmeDebugConfiguration uint32 - 1 mFeatureEnabled uint8 - 1 mLimitMme uint8 - 1 mLimitCap0 uint8 - 1 mReserved1 uint8 - 12 mReserved2 array[3] of uint32 - 1 mFeatureEnabled uint8 - 1 mPrimaryScalePercent uint8 - 1 mAlternateScalePercent uint8 - 1 mMaximumMissingReports uint8 - 4 mReportTimeInterval_ms uint32 - 4 mMinimumSymbolRate_s uint32 - 20 RSVD diff --git a/docbook/piboffset.xml b/docbook/piboffset.xml deleted file mode 100644 index f02762b9..00000000 --- a/docbook/piboffset.xml +++ /dev/null @@ -1,1344 +0,0 @@ - - - - 0000 - - - 1 - - - 03 - - - - - 0001 - - - 1 - - - 08 - - - - - 0002 - - - 2 - - - 0000 - - - - - 0004 - - - 2 - - - 0820 - - - - - 0006 - - - 2 - - - 0000 - - - - - 0008 - - - 4 - - - 400BBA60 - - - - - 000C - - - 6 - - - 00B052000001 - - - - - 0012 - - - 16 - - - 50D3E4933F855B7040784DF815AA8DB7 - - - - - 0022 - - - 2 - - - 0000 - - - - - 0024 - - - 64 - - - 496E74656C6C6F6E20486F6D65506C75672041562044657669636500000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 0064 - - - 16 - - - 50D3E4933F855B7040784DF815AA8DB7 - - - - - 0074 - - - 64 - - - 496E74656C6C6F6E20456E61626C65642050726F6475637400000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 00B4 - - - 64 - - - 496E74656C6C6F6E20456E61626C6564204E6574776F726B00000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 00F4 - - - 1 - - - 00 - - - - - 00F5 - - - 1 - - - 00 - - - - - 00F6 - - - 1 - - - 00 - - - - - 00F7 - - - 1 - - - 00 - - - - - 00F8 - - - 7 - - - B0F2E695666B03 - - - - - 00FF - - - 1 - - - 00 - - - - - 0100 - - - 1 - - - 00 - - - - - 0101 - - - 1 - - - 00 - - - - - 0102 - - - 1 - - - 00 - - - - - 0103 - - - 6 - - - 000000000000 - - - - - 0109 - - - 3 - - - 000000 - - - - - 010C - - - 1 - - - 00 - - - - - 010D - - - 1 - - - 00 - - - - - 010E - - - 6 - - - 000000000000 - - - - - 0114 - - - 1 - - - 00 - - - - - 0115 - - - 1 - - - 00 - - - - - 0116 - - - 56 - - - 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 014E - - - 62 - - - 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 018C - - - 1 - - - 00 - - - - - 018D - - - 1 - - - 00 - - - - - 018E - - - 1 - - - 00 - - - - - 018F - - - 1 - - - 00 - - - - - 0190 - - - 4 - - - 00000000 - - - - - 0194 - - - 1 - - - 00 - - - - - 0195 - - - 1 - - - 00 - - - - - 0196 - - - 1 - - - 00 - - - - - 0197 - - - 1 - - - 00 - - - - - 0198 - - - 1 - - - 00 - - - - - 0199 - - - 1 - - - 00 - - - - - 019A - - - 1 - - - 00 - - - - - 019B - - - 1 - - - 00 - - - - - 019C - - - 1 - - - 00 - - - - - 019D - - - 1 - - - 00 - - - - - 019E - - - 1 - - - 00 - - - - - 019F - - - 1 - - - 00 - - - - - 01A0 - - - 2 - - - 0000 - - - - - 01A2 - - - 2 - - - 0000 - - - - - 01A4 - - - 1 - - - 00 - - - - - 01A5 - - - 1 - - - 00 - - - - - 01A6 - - - 1 - - - 00 - - - - - 01A7 - - - 1 - - - 00 - - - - - 01A8 - - - 2 - - - 0000 - - - - - 01AA - - - 2 - - - 0000 - - - - - 01AC - - - 64 - - - 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 01EC - - - 1 - - - 00 - - - - - 01ED - - - 1 - - - 00 - - - - - 01EE - - - 1 - - - 00 - - - - - 01EF - - - 29 - - - 0000000000000000000000000000000000000000000000000000000000 - - - - - 020C - - - 1 - - - 01 - - - - - 020D - - - 1 - - - 01 - - - - - 020E - - - 1 - - - 03 - - - - - 020F - - - 1 - - - 02 - - - - - 0210 - - - 16 - - - 80841E0080841E00E0930400E0930400 - - - - - 0220 - - - 1 - - - 01 - - - - - 0221 - - - 1 - - - 00 - - - - - 0222 - - - 2 - - - 0000 - - - - - 0224 - - - 4 - - - 41FA41FA - - - - - 0228 - - - 1 - - - 00 - - - - - 0229 - - - 16 - - - 00000000000000000000000000000000 - - - - - 0239 - - - 384 - - - 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 03B9 - - - 1619 - - - 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 0A0C - - - 4 - - - 00000000 - - - - - 0A10 - - - 4620 - - - 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D0000000D1000000D1000000D1000000D1000000D1000000D1000000D1000000D2000000D2000000D2000000D2000000D2000000D3000000D3000000D3000000D3000000D3000000D4000000D4000000D4000000D4000000D4000000D5000000D5000000D5000000D5000000D5000000D5000000D5000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D6000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B4000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D7000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D8000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000D9000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DA000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DB000000DC000000DC000000DC000000DC000000DC000000DC000000DC000000DC000000DC000000DC000000DC000000DD000000DD000000DD000000DD000000DD000000DD000000DD000000DE00000000000000000000000000000000000000000000000000000000000000000000000000000000000000DF000000E0000000E0000000E0000000E0000000E0000000E1000000E1000000E1000000E1000000E1000000E2000000E2000000E2000000E2000000E3000000E3000000E3000000E3000000E4000000E4000000E4000000E4000000E5000000E5000000E5000000E5000000E6000000E6000000E6000000E6000000E7000000E7000000E7000000E7000000E8000000E8000000E8000000E8000000E9000000E9000000E9000000E9000000E9000000EA000000EA000000EA000000EA000000EA000000EB000000EB000000EB000000EB000000EB000000EC000000EC000000EC000000EC000000EC000000ED000000ED000000ED000000ED000000ED000000ED000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F1000000F1000000F1000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EB000000EC000000EC000000EC000000D2000000D2000000D2000000D2000000D2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ED000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000EE000000EE000000EE000000EE000000EE000000EE000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000F0000000F0000000F0000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EF000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000EE000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000ED000000EE000000EE000000EE000000EE000000EE000000EE000000EF000000EF000000EF000000EF000000EF000000F0000000F0000000F0000000F0000000F0000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F1000000F0000000F0000000F0000000F0000000EF000000EF000000EF000000EF000000EE000000EE000000EE000000EE000000ED000000ED000000ED000000ED000000EC000000EC000000EC000000EC000000EC000000EC000000EC000000EB000000EB000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ED000000ED000000ED000000EE000000EE000000EE000000EF000000EF000000EF000000EF000000F0000000F0000000F0000000F1000000F1000000F1000000F1000000F2000000F2000000F2000000F2000000F3000000F3000000F3000000F3000000F4000000F4000000F4000000F4000000F4000000F5000000F5000000F5000000F5000000F5000000F6000000F6000000F6000000F6000000F6000000F7000000F7000000F7000000F7000000F8000000F8000000F8000000F8000000F9000000F9000000F9000000F9000000FA000000FA000000FA000000FA000000FB000000FB000000FB000000FC000000FC000000FC000000FD000000FD000000FD000000FE000000FE000000FE000000FF000000FF00000000010000000100000001000001010000010100000101000002010000020100000201000003010000030100000301000004010000040100000401000005010000050100000501000006010000060100000601000006010000070100000701000007010000070100000801000008010000080100000801000009010000090100000901000009010000090100000A0100000A0100000A0100000A0100000A0100000A0100000A010000D8000000D8000000D8000000E100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 1C1C - - - 496 - - - 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 1E0C - - - 4 - - - 01000000 - - - - - 1E10 - - - 4 - - - 00000000 - - - - - 1E14 - - - 16 - - - 00000000000000000000000000000000 - - - - - 1E24 - - - 104 - - - 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - - - - - 1E8C - - - 4 - - - 00000000 - - - - - 1E90 - - - 4 - - - 78000000 - - - - - 1E94 - - - 1 - - - 00 - - - - - 1E95 - - - 1 - - - 50 - - - - - 1E96 - - - 1 - - - 64 - - - - - 1E97 - - - 1 - - - 00 - - - - - 1E98 - - - 1 - - - 00 - - - - - 1E99 - - - 1 - - - 00 - - - - - 1E9A - - - 2 - - - 0000 - - - - - 1E9C - - - 4 - - - 00000000 - - - - - 1EA0 - - - 4 - - - 00000000 - - - - - 1EA4 - - - 12 - - - 000102030405060708090A0B - - - - - 1EB0 - - - 8 - - - 0000000000000000 - - - - - 1EB8 - - - 1 - - - 00 - - - - - 1EB9 - - - 64 - - - 5555555555555555000000000000000000000000000000005555555555555555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - - - - - 1EF9 - - - 1 - - - 00 - - - - - 1EFA - - - 32 - - - 000B0009000800050008000A0008000B00FF00FF000900080004000400040004 - - - - - 1F1A - - - 4 - - - 00000000 - - - - - 1F1E - - - 4 - - - 00000000 - - - - - 1F22 - - - 22 - - - 00000000000000000000000000000000000000000000 - - - - - 1F38 - - - 4 - - - 06000000 - - - - - 1F3C - - - 4 - - - 00000000 - - - - - 1F40 - - - 4 - - - 00000000 - - - - - 1F44 - - - 4 - - - 00000000 - - - - - 1F48 - - - 4 - - - 00000000 - - - - - 1F4C - - - 1 - - - 00 - - - - - 1F4D - - - 4 - - - 00000000 - - - - - 1F51 - - - 4 - - - 00000000 - - - - - 1F55 - - - 1 - - - 00 - - - - - 1F56 - - - 4 - - - 14192D0A - - - - - 1F5A - - - 1 - - - 10 - - - - - 1F5B - - - 1 - - - 32 - - - - - 1F5C - - - 2 - - - 0000 - - - - - 1F5E - - - 4 - - - E8030000 - - - - - 1F62 - - - 4 - - - E8030000 - - - - - 1F66 - - - 4 - - - 88130000 - - - - - 1F6A - - - 14 - - - C03C160000000000000000000000 - - - - - 1F78 - - - 4 - - - 00000000 - - - - - 1F7C - - - 12 - - - 000000000000000000000000 - - - - - 1F88 - - - 4 - - - 00000000 - - - - - 1F8C - - - 4 - - - ABCDEF00 - - - diff --git a/docbook/piboffset.xsd b/docbook/piboffset.xsd deleted file mode 100644 index 9cae334f..00000000 --- a/docbook/piboffset.xsd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docbook/pibpeek1.c.html b/docbook/pibpeek1.c.html deleted file mode 100644 index 3dbf4f4e..00000000 --- a/docbook/pibpeek1.c.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - pibpeek1.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pibpeek1 (void const * memory);
    - *
    - *   pib.h
    - *
    - *   print PIB identity information on stdout;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIBPEEK1_SOURCE
    -#define PIBPEEK1_SOURCE
    -
    -#include <stdio.h>
    -#include <memory.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../key/HPAVKey.h"
    -#include "../key/keys.h"
    -#include "../pib/pib.h"
    -
    -static char const * CCoMode [] =
    -
    -{
    -	"Auto",
    -	"Never",
    -	"Always",
    -	"User",
    -	"Covert",
    -	"Unknown"
    -};
    -
    -static char const * MDURole [] =
    -
    -{
    -	"Slave",
    -	"Master"
    -};
    -
    -signed pibpeek1 (void const * memory)
    -
    -{
    -	extern const struct key keys [KEYS];
    -	extern char const * CCoMode [];
    -	extern char const * MDURole [];
    -	struct PIB1 * PIB = (struct PIB1 *)(memory);
    -	char buffer [HPAVKEY_SHA_LEN * 3];
    -	size_t key;
    -	if (PIB->FWVersion == 1)
    -	{
    -		if (PIB->PIBVersion == 2)
    -		{
    -			struct PIB1_2 * PIB = (struct PIB1_2 *)(memory);
    -			printf ("\tPIB %d-%d\n", PIB->FWVersion, PIB->PIBVersion);
    -			printf ("\tMAC %s\n", hexstring (buffer, sizeof (buffer), PIB->MAC, sizeof (PIB->MAC)));
    -			printf ("\tDAK %s", hexstring (buffer, sizeof (buffer), PIB->DAK, sizeof (PIB->DAK)));
    -			for (key = 0; key < KEYS; key++)
    -			{
    -				if (!memcmp (keys [key].DAK, PIB->DAK, HPAVKEY_DAK_LEN))
    -				{
    -					printf (" (%s)", keys [key].phrase);
    -					break;
    -				}
    -			}
    -			printf ("\n");
    -			printf ("\tNMK %s", hexstring (buffer, sizeof (buffer), PIB->NMK, sizeof (PIB->NMK)));
    -			for (key = 0; key < KEYS; key++)
    -			{
    -				if (!memcmp (keys [key].NMK, PIB->NMK, HPAVKEY_NMK_LEN))
    -				{
    -					printf (" (%s)", keys [key].phrase);
    -					break;
    -				}
    -			}
    -			printf ("\n");
    -			printf ("\tFLG %s\n", hexstring (buffer, sizeof (buffer), (uint8_t *)(&PIB->FLG), sizeof (PIB->FLG)));
    -			return (0);
    -		}
    -		else if (PIB->PIBVersion == 3)
    -		{
    -			struct PIB1_3 * PIB = (struct PIB1_3 *)(memory);
    -			printf ("\tPIB %d-%d\n", PIB->FWVersion, PIB->PIBVersion);
    -			printf ("\tMAC %s\n", hexstring (buffer, sizeof (buffer), PIB->MAC, sizeof (PIB->MAC)));
    -			printf ("\tDAK %s", hexstring (buffer, sizeof (buffer), PIB->DAK, sizeof (PIB->DAK)));
    -			for (key = 0; key < KEYS; key++)
    -			{
    -				if (!memcmp (keys [key].DAK, PIB->DAK, HPAVKEY_DAK_LEN))
    -				{
    -					printf (" (%s)", keys [key].phrase);
    -					break;
    -				}
    -			}
    -			printf ("\n");
    -			printf ("\tNMK %s", hexstring (buffer, sizeof (buffer), PIB->NMK, sizeof (PIB->NMK)));
    -			for (key = 0; key < KEYS; key++)
    -			{
    -				if (!memcmp (keys [key].NMK, PIB->NMK, HPAVKEY_NMK_LEN))
    -				{
    -					printf (" (%s)", keys [key].phrase);
    -					break;
    -				}
    -			}
    -			printf ("\n");
    -			printf ("\tNET \"%s\"\n", PIB->NET);
    -			printf ("\tMFG \"%s\"\n", PIB->MFG);
    -			printf ("\tUSR \"%s\"\n", PIB->USR);
    -			return (0);
    -		}
    -		else if (PIB->PIBVersion >= 4)
    -		{
    -			struct PIB1_4 * PIB = (struct PIB1_4 *)(memory);
    -			printf ("\tPIB %d-%d %d bytes\n", PIB->VersionHeader.FWVersion, PIB->VersionHeader.PIBVersion, LE16TOH (PIB->VersionHeader.PIBLength));
    -			printf ("\tMAC %s\n", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.MAC, sizeof (PIB->LocalDeviceConfig.MAC)));
    -			printf ("\tDAK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.DAK, sizeof (PIB->LocalDeviceConfig.DAK)));
    -			for (key = 0; key < KEYS; key++)
    -			{
    -				if (!memcmp (keys [key].DAK, PIB->LocalDeviceConfig.DAK, HPAVKEY_DAK_LEN))
    -				{
    -					printf (" (%s)", keys [key].phrase);
    -					break;
    -				}
    -			}
    -			printf ("\n");
    -			printf ("\tNMK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.NMK, sizeof (PIB->LocalDeviceConfig.NMK)));
    -			for (key = 0; key < KEYS; key++)
    -			{
    -				if (!memcmp (keys [key].NMK, PIB->LocalDeviceConfig.NMK, HPAVKEY_NMK_LEN))
    -				{
    -					printf (" (%s)", keys [key].phrase);
    -					break;
    -				}
    -			}
    -			printf ("\n");
    -			printf ("\tNET %s\n", PIB->LocalDeviceConfig.NET);
    -			printf ("\tMFG %s\n", PIB->LocalDeviceConfig.MFG);
    -			printf ("\tUSR %s\n", PIB->LocalDeviceConfig.USR);
    -			return (0);
    -		}
    -	}
    -	else if (PIB->FWVersion == 2)
    -	{
    -		struct PIB2_0 * PIB = (struct PIB2_0 *)(memory);
    -		printf ("\tPIB %d-%d %d bytes\n", PIB->VersionHeader.FWVersion, PIB->VersionHeader.PIBVersion, LE16TOH (PIB->VersionHeader.PIBLength));
    -		printf ("\tMAC %s\n", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.MAC, sizeof (PIB->LocalDeviceConfig.MAC)));
    -		printf ("\tDAK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.DAK, sizeof (PIB->LocalDeviceConfig.DAK)));
    -		for (key = 0; key < KEYS; key++)
    -		{
    -			if (!memcmp (keys [key].DAK, PIB->LocalDeviceConfig.DAK, HPAVKEY_DAK_LEN))
    -			{
    -				printf (" (%s)", keys [key].phrase);
    -				break;
    -			}
    -		}
    -		printf ("\n");
    -		printf ("\tNMK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.NMK, sizeof (PIB->LocalDeviceConfig.NMK)));
    -		for (key = 0; key < KEYS; key++)
    -		{
    -			if (!memcmp (keys [key].NMK, PIB->LocalDeviceConfig.NMK, HPAVKEY_NMK_LEN))
    -			{
    -				printf (" (%s)", keys [key].phrase);
    -				break;
    -			}
    -		}
    -		printf ("\n");
    -		printf ("\tNID %s\n", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.PreferredNID, sizeof (PIB->LocalDeviceConfig.PreferredNID)));
    -		printf ("\tNET %s\n", PIB->LocalDeviceConfig.NET);
    -		printf ("\tMFG %s\n", PIB->LocalDeviceConfig.MFG);
    -		printf ("\tUSR %s\n", PIB->LocalDeviceConfig.USR);
    -		return (0);
    -	}
    -	else if (PIB->FWVersion < 8)
    -	{
    -		struct PIB3_0 * PIB = (struct PIB3_0 *)(memory);
    -		printf ("\tPIB %d-%d %d bytes\n", PIB->VersionHeader.FWVersion, PIB->VersionHeader.PIBVersion, LE16TOH (PIB->VersionHeader.PIBLength));
    -		printf ("\tMAC %s\n", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.MAC, sizeof (PIB->LocalDeviceConfig.MAC)));
    -		printf ("\tDAK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.DAK, sizeof (PIB->LocalDeviceConfig.DAK)));
    -		for (key = 0; key < KEYS; key++)
    -		{
    -			if (!memcmp (keys [key].DAK, PIB->LocalDeviceConfig.DAK, HPAVKEY_DAK_LEN))
    -			{
    -				printf (" (%s)", keys [key].phrase);
    -				break;
    -			}
    -		}
    -		printf ("\n");
    -		printf ("\tNMK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.NMK, sizeof (PIB->LocalDeviceConfig.NMK)));
    -		for (key = 0; key < KEYS; key++)
    -		{
    -			if (!memcmp (keys [key].NMK, PIB->LocalDeviceConfig.NMK, HPAVKEY_NMK_LEN))
    -			{
    -				printf (" (%s)", keys [key].phrase);
    -				break;
    -			}
    -		}
    -		printf ("\n");
    -		printf ("\tNID %s\n", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.PreferredNID, sizeof (PIB->LocalDeviceConfig.PreferredNID)));
    -		printf ("\tNET %s\n", PIB->LocalDeviceConfig.NET);
    -		printf ("\tMFG %s\n", PIB->LocalDeviceConfig.MFG);
    -		printf ("\tUSR %s\n", PIB->LocalDeviceConfig.USR);
    -		printf ("\tCCo %s\n", CCoMode [PIB->LocalDeviceConfig.CCoSelection > SIZEOF (CCoMode)-1?SIZEOF (CCoMode)-1:PIB->LocalDeviceConfig.CCoSelection]);
    -		printf ("\tMDU %s\n", PIB->LocalDeviceConfig.MDUConfiguration? MDURole [PIB->LocalDeviceConfig.MDURole & 1]: "N/A");
    -		return (0);
    -	}
    -	printf ("\tPIB %d-%d %d (unsupported)\n", PIB->FWVersion, PIB->PIBVersion, LE16TOH (PIB->PIBLength));
    -	return (1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pibpeek2.c.html b/docbook/pibpeek2.c.html deleted file mode 100644 index afee06e5..00000000 --- a/docbook/pibpeek2.c.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - pibpeek2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   signed pibpeek2 (void const * memory);
    - *
    - *   pib.h
    - *
    - *   print Panther/Lynx PIB identity information on stdout;
    - *
    - *
    - *   Contributor(s):
    - *		Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIBPEEK2_SOURCE
    -#define PIBPEEK2_SOURCE
    -
    -#include <stdio.h>
    -#include <memory.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../key/HPAVKey.h"
    -#include "../key/keys.h"
    -#include "../pib/pib.h"
    -
    -static char const * CCoMode2 [] =
    -
    -{
    -	"Auto",
    -	"Never",
    -	"Always",
    -	"User",
    -	"Covert",
    -	"Unknown"
    -};
    -
    -static char const * MDURole2 [] =
    -
    -{
    -	"Slave",
    -	"Master"
    -};
    -
    -signed pibpeek2 (void const * memory)
    -
    -{
    -	extern const struct key keys [KEYS];
    -	extern char const * CCoMode2 [];
    -	extern char const * MDURole2 [];
    -	struct PIB3_0 * PIB = (struct PIB3_0 *)(memory);
    -	char buffer [HPAVKEY_SHA_LEN * 3];
    -	size_t key;
    -	printf ("\tPIB %d-%d %d bytes\n", PIB->VersionHeader.FWVersion, PIB->VersionHeader.PIBVersion, LE16TOH (PIB->VersionHeader.PIBLength));
    -	printf ("\tMAC %s\n", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.MAC, sizeof (PIB->LocalDeviceConfig.MAC)));
    -	printf ("\tDAK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.DAK, sizeof (PIB->LocalDeviceConfig.DAK)));
    -	for (key = 0; key < KEYS; key++)
    -	{
    -		if (!memcmp (keys [key].DAK, PIB->LocalDeviceConfig.DAK, HPAVKEY_DAK_LEN))
    -		{
    -			printf (" (%s)", keys [key].phrase);
    -			break;
    -		}
    -	}
    -	printf ("\n");
    -	printf ("\tNMK %s", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.NMK, sizeof (PIB->LocalDeviceConfig.NMK)));
    -	for (key = 0; key < KEYS; key++)
    -	{
    -		if (!memcmp (keys [key].NMK, PIB->LocalDeviceConfig.NMK, HPAVKEY_NMK_LEN))
    -		{
    -			printf (" (%s)", keys [key].phrase);
    -			break;
    -		}
    -	}
    -	printf ("\n");
    -	printf ("\tNID %s\n", hexstring (buffer, sizeof (buffer), PIB->LocalDeviceConfig.PreferredNID, sizeof (PIB->LocalDeviceConfig.PreferredNID)));
    -	printf ("\tNET %s\n", PIB->LocalDeviceConfig.NET);
    -	printf ("\tMFG %s\n", PIB->LocalDeviceConfig.MFG);
    -	printf ("\tUSR %s\n", PIB->LocalDeviceConfig.USR);
    -	printf ("\tCCo %s\n", CCoMode2 [PIB->LocalDeviceConfig.CCoSelection > SIZEOF (CCoMode2)-1?SIZEOF (CCoMode2)-1:PIB->LocalDeviceConfig.CCoSelection]);
    -	printf ("\tMDU %s\n", PIB->LocalDeviceConfig.MDUConfiguration? MDURole2 [PIB->LocalDeviceConfig.MDURole & 1]: "N/A");
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/pibruin.1.html b/docbook/pibruin.1.html deleted file mode 100644 index ed87d1c2..00000000 --- a/docbook/pibruin.1.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - pibruin.1 - - - - - - - - - -
    -pibruin(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  pibruin(1)
    -
    -NAME
    -       pibruin - Classification Rule Insert Utility
    -
    -SYNOPSIS
    -       pibruin [options] [<rules] file
    -
    -DESCRIPTION
    -       Read  a  set of classification rules from stdin and insert them directly into a PIB file.  This program is an alternative
    -       to program int6krule and a companion to program pibrump.  Although it is possible to ruin a PIB using this  command,  the
    -       name is short for "rule insert".
    -
    -       Atheros  recommends that users validate all classification rule sets used with this program before inserting them into an
    -       operational PIB.  Individual rules may be syntactically valid but they can still be technically invalid or conflict  with
    -       other.  This program does not perform any technical or cross-rule validation what-so-ever.
    -
    -       Cross-rule  validation  is  normally  done by runtime firmware when a rule arrives in a VS_CLASSIFIER management message.
    -       This validation prevents the insertion of meaningless or conflicting rules into the PIB.  It may be possible to commit  a
    -       PIB containing mis-configured classification rule sets thus causing the device to lockup or misbehave on reboot.
    -
    -       One  recommended  method of rule set validation is to program a device with individual rules using program int6krule then
    -       read the PIB and extract the rule set with program pibrump.  The rule set should be valid at that point.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -o offset
    -              Specify  an alternative PIB offset when inserting the classifier block.  Customers should not use this option.  It
    -              is provided to account for firmware changes that might occur in the future.  Improper use of this option can  ren‐
    -              der a PIB file unrecoverable.
    -
    -       -q     Suppresses progress messages.
    -
    -       -v     Print additional information on stdout.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The  name of a valid Atheros runtime parameter file.  The file is modified by this program only if the classifica‐
    -              tion rule file is syntactically correct.  See the DISCLAIMER section below.  No backup file is created.   By  con‐
    -              vention,  runtime  parameter  files  have a .pib extention but this program does not enforce that convention.  The
    -              file must exist and be a valid PIB file or errors will occur.
    -
    -       rules  The name of a valid classifier rule file.  The file is not modified by this program.  Classifier  rule  files  are
    -              standard ASCII text and may be created manually using a normal text editor or may be generated automatically using
    -              another program such as pubrump.  By convention, classifier rule files have a ..qos  extension  but  this  program
    -              does not enforce that convention.  If this file is omitted then rules are read from from the console, one rule per
    -              line.
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to change the file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -       This program is provided for convenience only.  It is possible to insert meaningless or confilicting rule sets into a PIB
    -       with  this  program  because  approved  cross-rule validation is not performed.  Incorrect application of perfectly valid
    -       rules may render a device ineffective or unusable on a powerline network.  Program users  are  responsible  for  ensuring
    -       that their rule sets are verified by other means before using this program to insert them into an operational PIB file.
    -
    -EXAMPLES
    -       The  following  is  an example set of classification rules stored in file rules.txt.  The file contains 5 rules, one rule
    -       per line.  The rules are identical to command line arguments expected by program int6krule and one could type  them,  one
    -       at  a  time,  into  int6krule  and  wait  for  the device to reset each time.  Alternately, we could insert all the rules
    -       directly into a PIB file at once then download and commit the PIB, resulting in only one reset.
    -
    -          # cat rules.txt
    -          Cap1 any VLANID is 20 add perm
    -          DropRX any VLANID is 25 add perm
    -          StripRx any VLANID is 5 VLANID is 10 VLANID is 15 add perm
    -          StripRx any VLANID is 20 add perm
    -          Cap1 any VLANID is 5 VLANID is 10 VLANID is 15 add perm
    -
    -       The following example reads file rules.txt from stdin and writes it into file def.pib.  This may be usefule if one wanted
    -       to distribute a known set of rules to other users or wanted to test various combinations of rules.  Sincd rule files are
    -
    -          # pibruin < rules.txt
    -
    -       The  next  example  reads  classification rules directly from file abc.pib using program pibrump and writes them directly
    -       into file def.pbi using program pibruin.  This is one means of transfering classification rules from one PIB to another.
    -
    -SEE ALSO
    -       int6krule(7), pibrump(7)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  pibruin(1)
    -
    - - - diff --git a/docbook/pibruin.c.html b/docbook/pibruin.c.html deleted file mode 100644 index 388f27d0..00000000 --- a/docbook/pibruin.c.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - pibruin.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pibruin.c - Atheros Classification Rule Insert Utility;
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <ctype.h>
    -#include <stdio.h>
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <string.h>
    -#include <netinet/in.h>
    -#include <arpa/inet.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/chars.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/rules.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/lookup.c"
    -#include "../tools/reword.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/memout.c"
    -#include "../tools/assist.c"
    -#include "../tools/bytespec.c"
    -#include "../tools/basespec.c"
    -#include "../tools/ipv4spec.c"
    -#include "../tools/ipv6spec.c"
    -#include "../tools/emalloc.c"
    -#include "../tools/todigit.c"
    -#include "../tools/codelist.c"
    -#include "../tools/getargv.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile1.c"
    -#include "../pib/piblock.c"
    -#if defined (PRINT_RULES) || defined (PRINT_CLASSIFIERS)
    -#include "../pib/ruledump.c"
    -#endif
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmseek2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/ParseRule.c"
    -#include "../plc/rules.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PIB_OFFSET1 0x0228
    -#define PIB_OFFSET2 0x0760
    -
    -/*====================================================================*
    - *
    - *   signed pibimage1 (signed fd, char const * filename, unsigned offset, struct PIBClassifiers * classifiers);
    - *
    - *   read thunderbolt/lightning parameter block into memory, edit it
    - *   and save it;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibimage1 (signed fd, char const * filename, unsigned offset, struct PIBClassifiers * classifiers)
    -
    -{
    -	struct pib_header * pib_header;
    -	off_t extent;
    -	void * memory;
    -	if ((extent = lseek (fd, 0, SEEK_END)) == -1)
    -	{
    -		error (1, errno, FILE_CANTSIZE, filename);
    -	}
    -	if (!(memory = malloc (extent)))
    -	{
    -		error (1, errno, FILE_CANTLOAD, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (read (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	memcpy ((byte *)(memory) + offset, classifiers, sizeof (*classifiers));
    -	pib_header = (struct pib_header *)(memory);
    -	pib_header->CHECKSUM = checksum32 (memory, extent, pib_header->CHECKSUM);
    -	if (write (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTSAVE, filename);
    -	}
    -	if (lseek (fd, (off_t)(0) - extent, SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	free (memory);
    -	close (fd);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed pibimage2 (signed fd, char const * filename, struct nvm_header2 * nvm_header, unsigned offset, struct PIBClassifiers * classifiers);
    - *
    - *   read panther/lynx parameter block into memory, edit it and save
    - *   it;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibimage2 (signed fd, char const * filename, struct nvm_header2 * nvm_header, unsigned offset, struct PIBClassifiers * classifiers)
    -
    -{
    -	void * memory;
    -	off_t extent = LE32TOH (nvm_header->ImageLength);
    -	if (!(memory = malloc (extent)))
    -	{
    -		error (1, errno, FILE_CANTLOAD, filename);
    -	}
    -	if (read (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	if (lseek (fd, (off_t)(0) - extent, SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	memcpy ((byte *)(memory) + offset, classifiers, sizeof (*classifiers));
    -	nvm_header->ImageChecksum = checksum32 (memory, extent, 0);
    -	if (write (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTSAVE, filename);
    -	}
    -	if (lseek (fd, (off_t)(0) - extent, SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	nvm_header->HeaderChecksum = checksum32 (nvm_header, sizeof (* nvm_header), nvm_header->HeaderChecksum);
    -	if (lseek (fd, (off_t)(0) - sizeof (* nvm_header), SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (write (fd, nvm_header, sizeof (* nvm_header)) != sizeof (* nvm_header))
    -	{
    -		error (1, errno, FILE_CANTSAVE, filename);
    -	}
    -	if (lseek (fd, (off_t)(0) - sizeof (* nvm_header), SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	free (memory);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   void make_rule (int argc, char const * argv [], struct PIBClassifiers * classifiers);
    - *
    - *   read argv [] and populate struct MMEClassifiers with QCA PLC
    - *   classifier rules; function ParseRule converts each rule to an
    - *   MMERule; we then convert that into one of two formats used to
    - *   store classifier rules in the PIB;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void make_rule (int argc, char const * argv [], struct PIBClassifiers * classifiers)
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"T:V:",
    -		"",
    -		"Atheros Classification Rule Insert Utility",
    -		"T\ttag",
    -		"V\tversion",
    -		(char const *) (0)
    -	};
    -	struct MMERule rule;
    -	struct cspec cspec;
    -	signed c;
    -	optind = 1;
    -	memset (&rule, 0, sizeof (rule));
    -	memset (&cspec, 0, sizeof (cspec));
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'T':
    -			cspec.VLAN_TAG = (uint32_t)(basespec (optarg, 16, sizeof (cspec.VLAN_TAG)));
    -			cspec.VLAN_TAG = htonl (cspec.VLAN_TAG);
    -			break;
    -		case 'V':
    -			cspec.CSPEC_VERSION = (uint16_t)(basespec (optarg, 10, sizeof (cspec.CSPEC_VERSION)));
    -			cspec.CSPEC_VERSION = HTOLE16 (cspec.CSPEC_VERSION);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -
    -#if defined (DUMP_RULE_ARGS)
    -
    -/*
    - *   print arguments on stdout;
    - */
    -
    -	for (c = 0; c < argc; c++)
    -	{
    -		printf ("argv [%d] = [%s]\n", c, argv [c]);
    -	}
    -
    -#endif
    -
    -	if ((argc) && (*argv))
    -	{
    -		ParseRule (&argc, &argv, &rule, &cspec);
    -
    -#if defined (PRINT_RULES)
    -
    -/*
    - *   print MMERule set on stdout in human readable format; these rules are populated by ParseRule but members
    - *   are not PIB ready; they are not properly grouped, byte-aligned or endian-ized;
    - */
    -
    -		MMERuleDump (&rule);
    -
    -#endif
    -
    -		if ((rule.NUM_CLASSIFIERS > 1) || (rule.MACTION == ACTION_STRIPTX) || (rule.MACTION == ACTION_STRIPRX) || (rule.MACTION == ACTION_TAGTX) || (classifiers->priority_count >= RULE_MAX_PRIORITY_MAPS))
    -		{
    -			struct auto_connection * auto_connection;
    -			if (classifiers->autoconn_count >= RULE_MAX_AUTOCONN)
    -			{
    -				error (1, ENOTSUP, "Too many auto connection rules");
    -			}
    -			auto_connection = &classifiers->auto_connection [classifiers->autoconn_count];
    -			auto_connection->MACTION = rule.MACTION;
    -			auto_connection->MOPERAND = rule.MOPERAND;
    -			auto_connection->NUM_CLASSIFIERS = HTOLE16 ((uint16_t)(rule.NUM_CLASSIFIERS));
    -			for (c = 0; c < RULE_MAX_CLASSIFIERS; c++)
    -			{
    -				auto_connection->CLASSIFIER [c].CR_PID = HTOLE32 ((uint32_t)(0xFF));
    -				auto_connection->CLASSIFIER [c].CR_OPERAND = HTOLE32 ((uint32_t)(0xFF));
    -			}
    -			for (c = 0; c < rule.NUM_CLASSIFIERS; c++)
    -			{
    -				auto_connection->CLASSIFIER [c].CR_PID = HTOLE32 ((uint32_t)(rule.CLASSIFIER [c].CR_PID));
    -				auto_connection->CLASSIFIER [c].CR_OPERAND = HTOLE32 ((uint32_t)(rule.CLASSIFIER [c].CR_OPERAND));
    -				memcpy (auto_connection->CLASSIFIER [c].CR_VALUE, rule.CLASSIFIER [c].CR_VALUE, sizeof (auto_connection->CLASSIFIER [c].CR_VALUE));
    -			}
    -			memcpy (&auto_connection->cspec, &rule.cspec, sizeof (auto_connection->cspec));
    -			classifiers->autoconn_count++;
    -		}
    -		else
    -		{
    -			struct classifier_priority_map * classifier_priority_map;
    -			if (classifiers->priority_count >= RULE_MAX_PRIORITY_MAPS)
    -			{
    -				error (1, ENOTSUP, "Too many priority map rules");
    -			}
    -			classifier_priority_map = &classifiers->classifier_priority_map [classifiers->priority_count];
    -			classifier_priority_map->Priority = HTOLE32 ((uint32_t)(rule.MACTION));
    -			classifier_priority_map->CLASSIFIER.CR_PID = HTOLE32 ((uint32_t)(rule.CLASSIFIER [0].CR_PID));
    -			classifier_priority_map->CLASSIFIER.CR_OPERAND = HTOLE32 ((uint32_t)(rule.CLASSIFIER [0].CR_OPERAND));
    -			memcpy (classifier_priority_map->CLASSIFIER.CR_VALUE, rule.CLASSIFIER [0].CR_VALUE, sizeof (classifier_priority_map->CLASSIFIER.CR_VALUE));
    -			classifiers->priority_count++;
    -		}
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"eo:qv",
    -		"pibfile < rules",
    -		"Atheros Classification Rule Insert Utility",
    -		"e\tredirect stderr messages to stdout",
    -		"o x\talternate offset is (x)",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	struct PIBClassifiers classifiers;
    -	char const * vector [24];
    -	uint32_t offset = 0;
    -	uint32_t version;
    -	signed fd;
    -	signed count;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'o':
    -			offset = (unsigned) (basespec (optarg, 16, sizeof (offset)));
    -			break;
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	memset (&classifiers, 0, sizeof (classifiers));
    -	while ((count = getargv (SIZEOF (vector), vector)))
    -	{
    -		make_rule (count, vector, &classifiers);
    -	}
    -	classifiers.priority_count = HTOLE32 (classifiers.priority_count);
    -	classifiers.autoconn_count = HTOLE32 (classifiers.autoconn_count);
    -
    -#if defined (PRINT_CLASSIFIERS)
    -
    -/*
    - *   print PIB-ready classification rules on stdout in human readable format; these rules are written
    - *   directly into the appropriate location in the PIB as a single block;
    - */
    -
    -	PIBClassifiersDump (&classifiers);
    -
    -#endif
    -
    -#if defined (WRITE_CLASSIFIERS)
    -
    -	write (STDOUT_FILENO, &classifiers, sizeof (classifiers));
    -
    -#endif
    -
    -	while ((argc) && (*argv))
    -	{
    -		if ((fd = open (*argv, O_BINARY|O_RDWR)) == -1)
    -		{
    -			error (0, errno, "%s", *argv);
    -		}
    -		else if (read (fd, &version, sizeof (version)) != sizeof (version))
    -		{
    -			error (0, errno, FILE_CANTREAD, *argv);
    -		}
    -		else if (lseek (fd, 0, SEEK_SET))
    -		{
    -			error (0, errno, FILE_CANTHOME, *argv);
    -		}
    -		else if (LE32TOH (version) == 0x00010001)
    -		{
    -			struct nvm_header2 nvm_header;
    -			if (!nvmseek2 (fd, *argv, &nvm_header, NVM_IMAGE_PIB))
    -			{
    -				pibimage2 (fd, *argv, &nvm_header, offset? offset: PIB_OFFSET2, &classifiers);
    -			}
    -		}
    -		else
    -		{
    -			pibimage1 (fd, *argv, offset? offset: PIB_OFFSET1, &classifiers);
    -		}
    -		close (fd);
    -		argc--;
    -		argv++;
    -	}
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pibruin1.c.html b/docbook/pibruin1.c.html deleted file mode 100644 index 203a0493..00000000 --- a/docbook/pibruin1.c.html +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - pibruin1.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pibruin1.c - Atheros Classification Rule Insert Utility;
    - *
    - *   This inserts classification rules into pib files from a rule
    - *   description file;
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <ctype.h>
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <string.h>
    -#include <netinet/in.h>
    -#include <arpa/inet.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/rules.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/lookup.c"
    -#include "../tools/reword.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/memout.c"
    -#include "../tools/assist.c"
    -#include "../tools/bytespec.c"
    -#include "../tools/basespec.c"
    -#include "../tools/ipv4spec.c"
    -#include "../tools/ipv6spec.c"
    -#include "../tools/endian.c"
    -#include "../tools/emalloc.c"
    -#include "../tools/todigit.c"
    -#include "../tools/codelist.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile1.c"
    -#include "../pib/piblock.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/rules.c"
    -#include "../plc/ParseRule.c"
    -#endif
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed classifier_pib
    -
    -{
    -	uint32_t CR_PID;
    -	uint32_t CR_OPERAND;
    -	uint8_t CR_VALUE [16];
    -}
    -
    -classifier_pib;
    -struct __packed auto_connection
    -
    -{
    -	uint8_t MACTION;
    -	uint8_t MOPERAND;
    -	uint16_t NUM_CLASSIFIERS;
    -	struct classifier_pib CLASSIFIER [3];
    -	struct cspec cspec;
    -	uint8_t RSVD [14];
    -}
    -
    -auto_connection;
    -struct __packed classifier_priority_map
    -
    -{
    -	uint32_t Priority;
    -	struct classifier_pib CLASSIFIER;
    -}
    -
    -classifier_priority_map;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PIB_MAX_AUTOCONN 16
    -#define PIB_MAX_PRIORITY_MAPS 8
    -
    -#define PIB_AUTOCONN_COUNT_OFFSET 0x22C
    -#define PIB_PRIORITY_COUNT_OFFSET 0x228
    -
    -#define PIB_AUTOCONN_OFFSET 0x310
    -#define PIB_PRIORITY_MAPS_OFFSET 0x230
    -
    -/*====================================================================*
    - *
    - *   signed handle_rule (char * str, int argc, struct auto_connection * autoconn, struct classifier_priority_map * priority_map, int * autoconn_count, int * priority_count);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed handle_rule (char * str, int argc, struct auto_connection * autoconn, struct classifier_priority_map * priority_map, int * autoconn_count, int * priority_count)
    -
    -{
    -	char const ** argv;
    -	char **mem;
    -	unsigned i;
    -	signed c;
    -	size_t len;
    -	struct rule rule;
    -	struct cspec cspec;
    -	static char const * optv [] =
    -	{
    -		"T:V:",
    -		"",
    -		"Atheros Classification Rule Insert Utility",
    -		"T\ttag",
    -		"V\tversion",
    -		(char const *) (0)
    -	};
    -	extern char const * program_name;
    -	mem = emalloc ((argc + 2) * sizeof (char *));
    -	argv = (char const **)(mem);
    -	* argv = program_name;
    -	++argv;
    -	* argv = str;
    -	++argv;
    -	len = strlen (str);
    -	for (i = 1; i < len; ++i)
    -	{
    -		if (str [i] == ' ')
    -		{
    -			str [i] = '\0';
    -			* argv = &str [i + 1];
    -			++argv;
    -		}
    -	}
    -	* argv = NULL;
    -	optind = 1;
    -	argv = (char const **)(mem);
    -	memset (&rule, 0, sizeof (rule));
    -	memset (&cspec, 0, sizeof (cspec));
    -	while ((c = getoptv (argc, (char const **)(argv), optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'T':
    -			cspec.VLAN_TAG = (uint32_t)(basespec (optarg, 16, sizeof (cspec.VLAN_TAG)));
    -			cspec.VLAN_TAG = htonl (cspec.VLAN_TAG);
    -			break;
    -		case 'V':
    -			cspec.CSPEC_VERSION = (uint16_t)(basespec (optarg, 10, sizeof (cspec.CSPEC_VERSION)));
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	ParseRule (&argc, (char const ***) &argv, &rule, &cspec);
    -
    -/* Now migrate the rule into the correct PIB structure. */
    -
    -	if (rule.NUM_CLASSIFIERS > 1 || rule.MACTION == ACTION_STRIPTX || rule.MACTION == ACTION_STRIPRX || rule.MACTION == ACTION_TAGTX || *priority_count >= PIB_MAX_PRIORITY_MAPS)
    -	{
    -		if (*autoconn_count >= PIB_MAX_AUTOCONN)
    -		{
    -			error (1, 0, "too many rules");
    -		}
    -		autoconn = &autoconn [*autoconn_count];
    -		autoconn->CLASSIFIER [0].CR_PID = 0xFF;
    -		autoconn->CLASSIFIER [1].CR_PID = 0xFF;
    -		autoconn->CLASSIFIER [2].CR_PID = 0xFF;
    -		autoconn->MACTION = rule.MACTION;
    -		autoconn->MOPERAND = rule.MOPERAND;
    -		autoconn->NUM_CLASSIFIERS = rule.NUM_CLASSIFIERS;
    -		for (i = 0; i < rule.NUM_CLASSIFIERS; ++i)
    -		{
    -			autoconn->CLASSIFIER [i].CR_PID = rule.CLASSIFIER [i].CR_PID;
    -			autoconn->CLASSIFIER [i].CR_OPERAND = rule.CLASSIFIER [i].CR_OPERAND;
    -			memcpy (&autoconn->CLASSIFIER [i].CR_VALUE, &rule.CLASSIFIER [i].CR_VALUE, sizeof (autoconn->CLASSIFIER [i].CR_VALUE));
    -		}
    -		memcpy (&autoconn->cspec, &rule.cspec, sizeof (autoconn->cspec));
    -		++(*autoconn_count);
    -	}
    -	else
    -	{
    -		if (*priority_count >= PIB_MAX_PRIORITY_MAPS)
    -		{
    -			error (1, 0, "too many rules");
    -		}
    -		priority_map = &priority_map [*priority_count];
    -		priority_map->Priority = rule.MACTION;
    -		priority_map->CLASSIFIER.CR_PID = rule.CLASSIFIER [0].CR_PID;
    -		priority_map->CLASSIFIER.CR_OPERAND = rule.CLASSIFIER [0].CR_OPERAND;
    -		memcpy (&priority_map->CLASSIFIER.CR_VALUE, &rule.CLASSIFIER [0].CR_VALUE, sizeof (priority_map->CLASSIFIER.CR_VALUE));
    -		++(*priority_count);
    -	}
    -	free (mem);
    -	return (0);
    -}
    -
    -static void read_rules (struct auto_connection auto_connection [], unsigned * autoconn_count, struct classifier_priority_map classifier_priority_map [], unsigned * priority_count)
    -
    -{
    -	int len = 0;
    -	int wc = 0;
    -	while ((c = getc (stdin)) != EOF)
    -	{
    -		if (isspace (c))
    -		{
    -			continue;
    -		}
    -		if (c == '#')
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while (nobreak (c));
    -			continue;
    -		}
    -		len = 0;
    -		wc = 0;
    -		do
    -		{
    -			if (isspace (c))
    -			{
    -				while (c != '\n' && (c = getc (stdin)) != EOF && isspace (c))
    -				{
    -					continue;
    -				}
    -				if (len > 0)
    -				{
    -					++wc;
    -				}
    -				if (c != '\n' && c != '#')
    -				{
    -					line [len++] = ' ';
    -					if (len == sizeof (line) - 1)
    -					{
    -						error (1, 0, "rule too long");
    -					}
    -				}
    -			}
    -			if (c == '\n' || c == '#')
    -			{
    -				line [len] = '\0';
    -				handle_rule (line, wc, auto_connection, classifier_priority_map, autoconn_count, priority_count);
    -				len = 0;
    -				wc = 0;
    -				if (c == '#')
    -				{
    -					ungetc (c, stdin);
    -				}
    -				break;
    -			}
    -			line [len++] = c;
    -			if (len == sizeof (line) - 1)
    -			{
    -				error (1, 0, "rule too long");
    -			}
    -		}
    -		while ((c = getc (stdin)) != EOF);
    -	}
    -	if (len > 0)
    -	{
    -		line [len] = '\0';
    -		handle_rule (line, wc, auto_connection, classifier_priority_map, autoconn_count, priority_count);
    -	}
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"eqv",
    -		"pibfile < rules",
    -		"Atheros Classification Rule Insert Utility",
    -		"e\tredirect stderr messages to stdout",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	struct auto_connection auto_connection [PIB_MAX_AUTOCONN];
    -	struct classifier_priority_map classifier_priority_map [PIB_MAX_PRIORITY_MAPS];
    -	unsigned autoconn_count = 0;
    -	unsigned priority_count = 0;
    -	flag_t flags = (flag_t)(0);
    -	struct _file_ pib;
    -	char line [1024];
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (!argc)
    -	{
    -		error (1, 0, "must specify PIB file");
    -	}
    -	memset (&auto_connection, 0, sizeof (auto_connection));
    -	memset (&classifier_priority_map, 0, sizeof (classifier_priority_map));
    -	read_rules (auto_connection, &autoconn_count, classifier_priority_map, &priority_count);
    -	pib.name = * argv;
    -	if ((pib.file = open (pib.name, O_BINARY|O_RDWR, FILE_FILEMODE)) == -1)
    -	{
    -		error (1, errno, "%s", pib.name);
    -	}
    -	if (pibfile1 (&pib))
    -	{
    -		error (1, errno, "Bad PIB file: %s", pib.name);
    -	}
    -	if (lseek (pib.file, PIB_AUTOCONN_OFFSET, SEEK_SET) != PIB_AUTOCONN_OFFSET)
    -	{
    -		error (1, errno, "could not seek to AutoConnections");
    -	}
    -	if (write (pib.file, &auto_connection, sizeof (auto_connection)) != sizeof (auto_connection))
    -	{
    -		error (1, errno, "could not write AutoConnections");
    -	}
    -	if (lseek (pib.file, PIB_AUTOCONN_COUNT_OFFSET, SEEK_SET) != PIB_AUTOCONN_COUNT_OFFSET)
    -	{
    -		error (1, errno, "could not seek to AutoConnection count");
    -	}
    -	if (write (pib.file, &autoconn_count, sizeof (autoconn_count)) != sizeof (autoconn_count))
    -	{
    -		error (1, errno, "could not write AutoConnection count");
    -	}
    -	if (lseek (pib.file, PIB_PRIORITY_MAPS_OFFSET, SEEK_SET) != PIB_PRIORITY_MAPS_OFFSET)
    -	{
    -		error (1, errno, "could not seek to Priority Map");
    -	}
    -	if (write (pib.file, &classifier_priority_map, sizeof (classifier_priority_map)) != sizeof (classifier_priority_map))
    -	{
    -		error (1, errno, "could not write Priority Map");
    -	}
    -	if (lseek (pib.file, PIB_PRIORITY_COUNT_OFFSET, SEEK_SET) != PIB_PRIORITY_COUNT_OFFSET)
    -	{
    -		error (1, errno, "could not seek to PriorityMaps count");
    -	}
    -	if (write (pib.file, &priority_count, sizeof (priority_count)) != sizeof (priority_count))
    -	{
    -		error (1, errno, "could not write PriorityMaps count");
    -	}
    -	piblock (&pib);
    -	close (pib.file);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pibrump.1.html b/docbook/pibrump.1.html deleted file mode 100644 index 35358fa2..00000000 --- a/docbook/pibrump.1.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - pibrump.1 - - - - - - - - - -
    -pibrump(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  pibrump(1)
    -
    -NAME
    -       pibrump - Classification Rule Dump Utility
    -
    -SYNOPSIS
    -       pibrump [options] file [file] [...]
    -
    -DESCRIPTION
    -       Read  classifier  rules stored in a PIB file and print them on stdout in a format similar to the command line for program
    -       int6krule.  The output can be read by program pibruin for insertion into another PIB file.  The program name is short for
    -       "rule dump".
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -q     Suppresses comments used to group classification rules.
    -
    -       -v     Print additional information on stdout.  Presently, this option has no effect.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The name of a valid Atheros runtime parameter file.  The file is not modified by  this  program.   The  file  must
    -              exist  and  be a valid runtime parameter file or errors will occur.  By convention, runtime parameter files have a
    -              .pib extention but this program does not enforce that convention.
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to change the file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       The following example prints the classifier rules stored in file abc.pib on stdout.  Individual rules are  printed  in  a
    -       format that is essentially the same as that used to enter rules using program int6krule.  Rules are grouped by their cat‐
    -       egory using comments.
    -
    -          > pibrump abc.pib
    -          # auto connection rules:
    -          StripRX Any VLANID Is 5 VLANID Is 10 VLANID Is 15 add perm
    -          StripRX Any VLANID Is 20 add perm
    -          CAP1 Any VLANID Is 5 VLANID Is 10 VLANID Is 15 add perm
    -          # priority mapping rules:
    -          CAP1 Any VLANID Is 20 add perm
    -          DropRX Any VLANID Is 25 add perm
    -
    -       The next example prints the classifier rules stored in file def.pib but output is a huge disappointment because there are
    -       no rules, much like a Rambo movie.
    -
    -          > pibrump def.pib
    -          # auto connection rules:
    -          # priority mapping rules:
    -
    -       The  next example shows a case where the the user has selected two rules from the first example and used them as input to
    -       program int6krule.  There is no PIB file involved here because an MME is sent directly to the device  with  each  command
    -       and the device will reset each time.  There are times when you may not want to set rules this way.
    -
    -          > int6krule StripRX Any VLANID Is 5 VLANID Is 10 VLANID Is 15 add perm
    -          # int6krule CAP1 Any VLANID Is 20 add perm
    -
    -       The  next  example  reads classification rules from file abc.pib and write them to file rules.txt instead of the console.
    -       The rules are then read from file rules.txt and written into file def.pib using program pibruin.  This procedure  can  be
    -       used to distribute a given rule set to other toolkit users.
    -
    -          > pibrump abc.def > rules.txt
    -          # pibruin < rules.txt def.pib
    -
    -       The  next  example reads classification rules directly from file abc.pib and writes them directly into file def.pib using
    -       program pibruin.
    -
    -          > pibrump abc.pib | pibruin def.pib
    -
    -SEE ALSO
    -       int6krule(7), pibruin(7)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  pibrump(1)
    -
    - - - diff --git a/docbook/pibrump.c.html b/docbook/pibrump.c.html deleted file mode 100644 index 5d5c98ab..00000000 --- a/docbook/pibrump.c.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - pibrump.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pibrump.c - Atheros Classification Rule Dump Utility;
    - *
    - *   This program read classification rules stored in a PIB file and
    - *   prints them on stdout in a format similar to int6krule commands;
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <string.h>
    -#include <netinet/in.h>
    -#include <arpa/inet.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../pib/pib.h"
    -#include "../plc/rules.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/lookup.c"
    -#include "../tools/reword.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/memout.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile1.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/rules.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PIB_MAX_AUTOCONN 16
    -#define PIB_MAX_PRIORITY_MAPS 8
    -
    -#define PIB_AUTOCONN_COUNT_OFFSET 0x22C
    -#define PIB_PRIORITY_COUNT_OFFSET 0x228
    -
    -#define PIB_AUTOCONN_OFFSET 0x310
    -#define PIB_PRIORITY_MAPS_OFFSET 0x230
    -
    -/*====================================================================*
    - *
    - *   signed Classifier (struct PIBClassifier * classifier);
    - *
    - *   plc.h
    - *
    - *   This function for program pibrump displays a single classifier;
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed Classifier (struct PIBClassifier * classifier)
    -
    -{
    -	char buffer [sizeof (classifier->CR_VALUE) * 3 + 1];
    -	uint32_t val32;
    -	uint16_t val16;
    -	uint8_t val8;
    -	printf ("%s %s", reword (classifier->CR_PID, fields, SIZEOF (fields)), reword (classifier->CR_OPERAND, operators, SIZEOF (operators)));
    -	switch (classifier->CR_PID)
    -	{
    -	case FIELD_ETH_SA:
    -	case FIELD_ETH_DA:
    -		printf (" %s", hexstring (buffer, sizeof (buffer), classifier->CR_VALUE, ETHER_ADDR_LEN));
    -		break;
    -	case FIELD_IPV4_SA:
    -	case FIELD_IPV4_DA:
    -		putchar (' ');
    -		memout (classifier->CR_VALUE, IPv4_LEN, "%d", 1, '.', 0, stdout);
    -		break;
    -	case FIELD_IPV6_SA:
    -	case FIELD_IPV6_DA:
    -		putchar (' ');
    -		memout (classifier->CR_VALUE, IPv6_LEN, "%02x", 2, ':', 0, stdout);
    -		break;
    -	case FIELD_VLAN_UP:
    -	case FIELD_IPV6_TC:
    -	case FIELD_IPV4_TOS:
    -	case FIELD_IPV4_PROT:
    -		memcpy (&val8, classifier->CR_VALUE, sizeof (val8));
    -		printf (" 0x%02X", val8);
    -		break;
    -	case FIELD_VLAN_ID:
    -	case FIELD_TCP_SP:
    -	case FIELD_TCP_DP:
    -	case FIELD_UDP_SP:
    -	case FIELD_UDP_DP:
    -	case FIELD_IP_SP:
    -	case FIELD_IP_DP:
    -		memcpy (&val16, classifier->CR_VALUE, sizeof (val16));
    -		val16 = ntohs (val16);
    -		printf (" %d", val16);
    -		break;
    -	case FIELD_ETH_TYPE:
    -		memcpy (&val16, classifier->CR_VALUE, sizeof (val16));
    -		printf (" 0x%04X", val16);
    -		break;
    -	case FIELD_IPV6_FL:
    -		memcpy (&val32, &classifier->CR_VALUE [0], sizeof (val32));
    -		val32 = ntohl (val32);
    -		printf (" 0x%08X", val32);
    -		break;
    -	case FIELD_HPAV_MME:
    -		memcpy (&val8, &classifier->CR_VALUE [0], sizeof (val8));
    -		memcpy (&val16, &classifier->CR_VALUE [1], sizeof (val16));
    -		printf (" %02x:%04x", val8, val16);
    -		break;
    -	case FIELD_TCP_ACK:
    -		{
    -			code_t val;
    -			memcpy (&val, classifier->CR_VALUE, sizeof (val));
    -			printf (" %s", reword (val, states, SIZEOF (states)));
    -		}
    -		break;
    -	case FIELD_VLAN_TAG:
    -		{
    -			code_t val;
    -			memcpy (&val, classifier->CR_VALUE, sizeof (val));
    -			printf (" %s", reword (val, states, SIZEOF (states)));
    -		}
    -		break;
    -	default:
    -		printf (" *****UNSUPPORTED CODE*****");
    -		break;
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed AutoConnection (struct auto_connection * auto_connection, flag_t flags)
    - *
    - *   plc.h
    - *
    - *   This function for program pibrump displays a single AutoConnection
    - *   structure;
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed AutoConnection (struct auto_connection * auto_connection)
    -
    -{
    -	int i;
    -	if (auto_connection->MACTION == ACTION_TAGTX)
    -	{
    -		printf ("-T 0x%08X -V %d ", ntohl (auto_connection->cspec.VLAN_TAG), LE16TOH (auto_connection->cspec.CSPEC_VERSION));
    -	}
    -	printf ("%s", reword (auto_connection->MACTION, actions, SIZEOF (actions)));
    -	printf (" %s ", reword (auto_connection->MOPERAND, operands, SIZEOF (operands)));
    -	for (i = 0; i < LE16TOH (auto_connection->NUM_CLASSIFIERS); ++i)
    -	{
    -		Classifier (&auto_connection->CLASSIFIER [i]);
    -		putchar (' ');
    -	}
    -	printf ("add perm\n");
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed ClassifierPriorityMap (struct classifier_priority_map * map)
    - *
    - *   plc.h
    - *
    - *   This function for program pibrump displays a single
    - *   ClassifierPriorityMap structure;
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed ClassifierPriorityMap (struct classifier_priority_map * map)
    -
    -{
    -	printf ("%s Any ", reword (LE32TOH (map->Priority), actions, SIZEOF (actions)));
    -	Classifier (&map->CLASSIFIER);
    -	printf (" add perm\n");
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"eqv",
    -		"pibfile",
    -		"Atheros Classification Rule Dump Utility",
    -		"e\tredirect stderr messages to stdout",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	struct auto_connection auto_connection [PIB_MAX_AUTOCONN];
    -	struct classifier_priority_map classifier_priority_map [PIB_MAX_PRIORITY_MAPS];
    -	uint32_t AutoConnection_count;
    -	uint32_t PriorityMaps_count;
    -	unsigned i;
    -	flag_t flags = (flag_t)(0);
    -	struct _file_ pib;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argc) && (* argv))
    -	{
    -		pib.name = * argv;
    -		if ((pib.file = open (pib.name, O_BINARY|O_RDONLY)) == -1)
    -		{
    -			error (1, errno, "%s", pib.name);
    -		}
    -		if (pibfile1 (&pib))
    -		{
    -			error (1, errno, "Bad PIB file: %s", pib.name);
    -		}
    -		if (lseek (pib.file, PIB_AUTOCONN_COUNT_OFFSET, SEEK_SET) != PIB_AUTOCONN_COUNT_OFFSET)
    -		{
    -			error (1, errno, "could not seek to AutoConnection count");
    -		}
    -		if (read (pib.file, &AutoConnection_count, sizeof (AutoConnection_count)) != sizeof (AutoConnection_count))
    -		{
    -			error (1, errno, "could not read AutoConnection count");
    -		}
    -		if (lseek (pib.file, PIB_AUTOCONN_OFFSET, SEEK_SET) != PIB_AUTOCONN_OFFSET)
    -		{
    -			error (1, errno, "could not seek to AutoConnections");
    -		}
    -		if (read (pib.file, &auto_connection, sizeof (auto_connection)) != sizeof (auto_connection))
    -		{
    -			error (1, errno, "could not read AutoConnections");
    -		}
    -		if (lseek (pib.file, PIB_PRIORITY_COUNT_OFFSET, SEEK_SET) != PIB_PRIORITY_COUNT_OFFSET)
    -		{
    -			error (1, errno, "could not seek to PriorityMaps count");
    -		}
    -		if (read (pib.file, &PriorityMaps_count, sizeof (PriorityMaps_count)) != sizeof (PriorityMaps_count))
    -		{
    -			error (1, errno, "could not read PriorityMaps count");
    -		}
    -		if (lseek (pib.file, PIB_PRIORITY_MAPS_OFFSET, SEEK_SET) != PIB_PRIORITY_MAPS_OFFSET)
    -		{
    -			error (1, errno, "could not seek to Priority Map");
    -		}
    -		if (read (pib.file, &classifier_priority_map, sizeof (classifier_priority_map)) != sizeof (classifier_priority_map))
    -		{
    -			error (1, errno, "could not read Priority Map");
    -		}
    -		close (pib.file);
    -		if (_allclr (flags, PIB_SILENCE))
    -		{
    -			printf ("# auto connection rules:\n");
    -		}
    -		for (i = 0; i < AutoConnection_count; ++i)
    -		{
    -			AutoConnection (&auto_connection [i]);
    -		}
    -		if (_allclr (flags, PIB_SILENCE))
    -		{
    -			printf ("# priority mapping rules:\n");
    -		}
    -		for (i = 0; i < PriorityMaps_count; ++i)
    -		{
    -			ClassifierPriorityMap (&classifier_priority_map [i]);
    -		}
    -		argv++;
    -		argc--;
    -	}
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pibscalers.c.html b/docbook/pibscalers.c.html deleted file mode 100644 index 2fb02d5d..00000000 --- a/docbook/pibscalers.c.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - pibscalers.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   uint16_t pibscalers (struct _file_ * pib);
    - *
    - *   return the number of scalers (carriers) based on the FWVERSION
    - *   stored in a .pib file; this function is a fix so that older
    - *   toolkit programs will work with newer chipsets;
    - *
    - *   chipsets with the following carriers are supported:
    - *     - 1155 carriers
    - *     - 1345 carriers
    - *     - 2880 carriers
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PIBSCALERS_SOURCE
    -#define PIBSCALERS_SOURCE
    -
    -#include <unistd.h>
    -#include <errno.h>
    -
    -#include "../plc/plc.h"
    -#include "../pib/pib.h"
    -#include "../tools/error.h"
    -
    -uint16_t pibscalers (struct _file_ * pib)
    -
    -{
    -	// TODO: improve chipset detection
    -
    -	struct pib_header pib_header;
    -	if (read (pib->file, &pib_header, sizeof (pib_header)) != sizeof (pib_header))
    -	{
    -		error (1, errno, "%s", pib->name);
    -	}
    -	if ((pib_header.FWVERSION  == 0x01) &&
    -		(pib_header.PIBVERSION == 0x00))
    -	{
    -		return (PLC_CARRIERS);
    -	}
    -	if (pib_header.FWVERSION < 0x05)
    -	{
    -		return (INT_CARRIERS);
    -	}
    -	return (AMP_CARRIERS);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/plc.1.html b/docbook/plc.1.html deleted file mode 100644 index 961508b9..00000000 --- a/docbook/plc.1.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - - - plc.1 - - - - - - - - - -
    -plc(1)                                       Qualcomm Atheros Open Powerline Toolkit                                      plc(1)
    -
    -NAME
    -       Qualcomm Atheros Powerline Toolkit
    -
    -SYNOPSIS
    -       Qualcomm  Atheros provides the Powerline Toolkit to customers free of charge.  The toolkit contains source code and make‐
    -       files to build many useful programs.  It also includes example shell scripts that use these programs, in various ways, to
    -       interrogate,  control  and  manage  QCA powerline devices.  The programs are intended for hardware engineers and software
    -       developers, consequently.  They are not intended for end users or computer novices.   Most  are  compact  and  simple  by
    -       design and can be included and executed on embedded platforms having few resources.
    -
    -INSTALLATION
    -       The  Powerline  Toolkit  is  distributed as a tarball named plc-utils-x.x.x.tar.gz or plc-utils-x.x.x.tar.bz2.  Users may
    -       unpack the tarball and change to the directory that it creates to inspect the source code and documentation.  To  compile
    -       the  source code, type "make".  To install the programs, type "make install".  To install man pages, type "make manuals".
    -       To uninstall programs and man pages, type "make uninstall".  To read about the Toolkit,  browse  file  docbook/index.html
    -       and  docbook/toolkit.html.   This  package  does  not automatically install scripts or html pages.  They must be manually
    -       copied to the preferred locations.
    -
    -       We recommend that you login as root before installing this package; otherwise, you will be prompted for the root password
    -       as  each  component  is  installed.   On  some  systems,  "sudo  make  install"  will  work.   Programs  are installed in
    -       /usr/local/bin.  Man pages are installed in /usr/share/man/man[1-9].  If these folders are not correct for  your  system,
    -       or  if  you want to install in other folders, then edit folder names defined in the Makefile in each package folder.  The
    -       package has been compiled in a variety of Linux distributions (debian, ubuntu, redhat, monta vista, amilda) and on MacOSX
    -       (10.5, 10.6).  It has also been cross-compiled for MIPS and Freescale iMX35 but QCA does not support general cross compi‐
    -       lation efforts.
    -
    -       Although this package has been compiled on several platforms, there is no guarantee that it will compile  without  errors
    -       or  warnings  on non-GNU/Linux platforms.  We continuously update the package but do not attempt to compile or test it on
    -       systems other than GNU/Linux and Microsoft VisualStudio .NET.  Some programs have been excluded from the Windows  instal‐
    -       lation for technical reasons.
    -
    -BACKGROUND
    -       HomePlug 1.0 and HomePlug AV are industry standard protocols for powerline communications.  Qualcomm Atheros manufactures
    -       a family of chipsets that conform to these standards and have various USB, PCI, Ethernet, MII, SPI and UART  host  inter‐
    -       faces.
    -
    -       The HomePlug 1.0 protocol is based on IEEE-802.3, has ethertype 0x887B and uses special message formats.
    -
    -       The  HomePlug  AV  protocol  is based on IEEE-802.3, has ethertype 0x88E1 and special message formats.  A subset of those
    -       message formats are left unspecified so that chipset vendors can define message formats for their own products.  QCA ven‐
    -       dor  specific  management  message formats are described in the QCA HomePlugAV Firmware Technical Reference Manual.  This
    -       toolkit uses these messages to communicate with QCA powerline devices.  Customers may use the toolkit to send these  mes‐
    -       sages, explore device behavior and develope their own applications.
    -
    -       Each  program  in  the  toolkit deals with a narrow aspect of QCA powerline device management but they can be called from
    -       shell scripts to perform complex tasks.  With them, one  can  identify  chipset  hardware  and  firmware  version,  reset
    -       devices,  flash  devices,  identify other QCA network devices, validate *.pib and *.nvm files, sniff HomePlug AV Ethernet
    -       frames, send generic Ethernet frames and so on.
    -
    -       The source code is designed to demonstrate and educate and may be modified without obligation to Qualcomm  Atheros.   The
    -       QCA Application Engineering Team would appreciate feedback concerning changes that improve the useability, reliability or
    -       efficiency.  Keep in mind that these tools are supposed to be small and simple.
    -
    -TOOLS
    -       There are many independent programs in this package.  Significant ones are listed below.  See html/overview.html for more
    -       information about the Atheros Powerline Toolkit.
    -
    -       ampboot
    -              A  command  line utility to start, and optionally flash, newer Atheros Powerline Devices.  It is an alternative to
    -              program int6kboot that may have additional options specific to the AR7400.
    -
    -       amphost
    -              A example embedded host emulator that responds to VS_HST_ACTION messages sent from a flash-less device to a  local
    -              host  processor.   It  can be used to investigate and verify device-to-host interaction.  The Atheros embedded API
    -              can perform similar functionality in a production environment.
    -
    -       ampsnif
    -              A command line utility to enable or disable sniffer mode on an Atheros Powerline Device.
    -
    -       amptest
    -              A command line utility to download and execute a sequence of test applets to the local powerline  device.   It  is
    -              not  for  general  use  because  there are no interlocks to prevent loading images designed for other platforms or
    -              loading images in illogical order.  It is an laternative to, and replacement for, program int6ktest.
    -
    -       amptool
    -              A basic device manager used to inspect and control Atheros powerline devices connected to the local host.   It  is
    -              similar to int6k but is specific to the AR7400 chipsets.
    -
    -       ampwait
    -              A  command  line  utility  used  to pause shell scripts at critical points where a device must be in a known state
    -              before proceeding.  Typical cases involve waiting for device power off or reset, power on or restart  and  network
    -              device association.
    -
    -       ar8236mdioblock
    -              Produce  an  MDIO block from Atheros AR8236 special register instructions.  The output is suitable for downloading
    -              to INT6x00 and AR7x00 powerline devices.
    -
    -       ar8236regedit
    -              Insert values into Atheros AR8236 special registers.
    -
    -       chknvm A command line utility that validates NVM files based on internal  header  information,  filesize,  checksums  and
    -              other  general characteristics.  Optionally, it can be used to display all image headers within an NVM file or the
    -              firmware revision contained in the file.
    -
    -       chkpib A command line utility that validates PIB files based on internal  header  information,  filesize,  checksum,  and
    -              other  general  characteristics.  It can also be used to produce a text catalog of PIB files contained in a direc‐
    -              tory.
    -
    -       coqos_add
    -              CoQoS stream utility.  No description.
    -
    -       coqos_info
    -              CoQoS stream utility.  No description.
    -
    -       coqos_man
    -              CoQoS stream utility.  No description.
    -
    -       coqos_mod
    -              CoQoS stream utility.  No description.
    -
    -       coqos_rel
    -              CoQoS stream utility.  No description.
    -
    -       efsu   A utility to send freeform Ethernet frames.  Frames are defined as text files containing  hexadecimal  byte  codes
    -              having  optional comments and whitespace.  Comments and white space are stripped from the input file and the hexa‐
    -              decimal byte codes are transmitted as Ethernet frames.
    -
    -       ethcat Send on or more files to a remote UART-enabled powerline device using IEEE  802.2  Ethernet  frames.   Transmitted
    -              frames are assembled into a serial data stream and forwarded to the local host by the remote device.
    -
    -       fp     A  command line utility that prints the SHA256 digest for one or more files based on their content.  Output can be
    -              used to compare files or identify files based soley on their content despite any filename changes.
    -
    -       getpib A command line utility for extracting data from a valid PIB file based on data offset, length and format.  It is a
    -              companion to program setpib.  Both programs are intended for use in shell scripts.  Users must have some knowledge
    -              about the data they are extracting.
    -
    -       hpav   An basic packet sniffer that displays incoming HomePlug AV protocol frames addressed to the host as  they  arrive.
    -              The program may be run in the background as a daemon.
    -
    -       hpavkey
    -              A HomePlug AV key generator.  HomePlug AV devices use has keys for various purposes.  This program converts one or
    -              more pass phrases, entered on the command line, to either DAKs, NMKs or NIDs.  It is similar to hpavkeys  but con‐
    -              verts a limited number of pass phrases at one time.
    -
    -       hpavkeys
    -              A  HomePlug  AV key generator.  This program is similar to hpavkey but converts large number of pass phrases, read
    -              from stdin, and converts them to either DAKs, NMKs or NIDs.
    -
    -       int6k  A basic device manager used to inspect and control Atheros INT6x00 devices connected to the  local  host.   It  is
    -              similar  to  amptool  and  plctool but is implemented for INT6000, INT6300 and INT6400 devices only.  Some options
    -              work on newer chipsets but otherd do not.
    -
    -       int6kbaud
    -              A command line utility to configurate UART settings on a UART-enabled Atheros  powerline  device  using  the  ATBR
    -              serial line command.
    -
    -       int6kboot
    -              A command line utility used to bootstrap powerline devices having no flash memory, blank flash memory or corrupted
    -              memory.  It interacts with the Atheros BootLoader to configure SDRAM then download runtime firmware  and  PIB  and
    -              start firmware execution.  It can also be used to force flash blank or corrupted flash memory.
    -
    -       int6keth
    -              A command line utility to read and write device Ethernet PHY settings.
    -
    -       int6kf A  basic  flash utility used to initialize INT6300 devices having no flash memory, blank flash memory or corrupted
    -              memory.  It interacts with the Atheros Boot Loader to download SDRAM configuration, runtime firmware and PIB.   It
    -              can also be used to force flash blank or corrupted flash memory.
    -
    -       int6khost
    -              A  example embedded host emulator that responds to VS_HST_ACTION messages sent from a flash-less device to a local
    -              host processor.  It can be used to investigate and verify device-to-host interaction.  The  Atheros  embedded  API
    -              can perform similar functionality in a production environment.
    -
    -       int6khost64
    -              An  updated  version of int6khost that omits the needed for an external SDRAM configuration file.  It takes advan‐
    -              tage of the memctl applet included in the newer *.nvm files.
    -
    -       int6kid
    -              A command line utility to print the DAK or NMK read from one or more devices.  It can be used in shell scripts  to
    -              dynamically obtain device key values and insert them on the command line of other programs.
    -
    -       int6km A  basic memory read utility used to inspect INT6x000 accessible SDRAM memory locations and mapped registers.  Not
    -              all locations or registers are accessible.
    -
    -       int6kmdio
    -              Insert values into MDIO PHY address registers using an VS_MDIO_COMMAND message.
    -
    -       int6kmod
    -              A command line utility that downloads raw modules using  a sequence of VS_MODULE_OPERATION messages.
    -
    -       int6kprobe
    -              A command line utility that detects and reports neighbor networks using the VS_DIAG_PROBE message.
    -
    -       int6krate
    -              A command line utility that reports computed PHY rates for a single device or all devices on  a  logical  network.
    -              Ouput is designed for import into a spread sheet.
    -
    -       int6krule
    -              A  command line utility used to format and send classification rules to a device.  Classification rules are speci‐
    -              fied using symbolic names for actions, options, conditons and frame fields.
    -
    -       int6kstat
    -              A command line utility that prints device link statistics on stdout in a relatively undecorated format.  Output is
    -              designed for easy interpretation by other programs.
    -
    -       int6ktest
    -              A  command line utility to download and execute a series of test applets to the local powerline device.  It is not
    -              for general use because there are no interlocks to prevent loading images designed for other platforms or  loading
    -              images in illogical order.
    -
    -       int6kuart
    -              A  command  line  utility  to  send serial line commands to a UART-enabled Atheros Powerline device.  This program
    -              elminates the need for terminal emulation software and can be used to download PIB and firmware files to a  device
    -              over the serial line interface.
    -
    -       int6kwait
    -              A  command  line  utility  used  to pause shell scripts at critical points where a device must be in a known state
    -              before proceeding.  Typical cases involve waiting for device power off or reset, power on or restart  and  network
    -              device association.
    -
    -       mac2pw A  device password generator that prints a range of MAC addresses and user passwords on stdout.  It is an alterna‐
    -              tive to the Atheros Production Test System (PTS) DBBuilder Utility.
    -
    -       mac2pwd
    -              A device password generator that reads MAC addresses from one or more input files and prints addresses  and  pass‐
    -              words on stdout.  It is an alternative to the Atheros Production Test System (PTS) DBBuilder utility.
    -
    -       mdioblock
    -              Produce  an MDIO block from generic MDIO register instructions.  The output is suitable for downloading to INT6x00
    -              and AR7x00 powerline devices.
    -
    -       mdiodump
    -              Display a binary MDIO program file in human readable form.
    -
    -       mdiogen
    -              Generate a binary MDIO program file from a series of instruction macros.  This program is for folks who know  what
    -              they are doing.  It has no man page or instructions for use.
    -
    -       mdustats
    -              Collect and display various MDU traffic statistics using the VS_MDU_TRAFFIC_STATS message.
    -
    -       modpib A  basic  command  line PIB editor used to change the MAC, DAK and/or NMK of an existing PIB file.  It can also be
    -              used to change the manufacturer string, network name and username strings.
    -
    -       mrgpib A command line utility to copy PIB settings from one PIB file to another where the PIB files  have  different  PIB
    -              versions.
    -
    -       nvmmerge
    -              A command line utility to merge multiple applets or NVM files into a single NVM file.
    -
    -       nvmsplit
    -              A  command  line utility to split an NVM file into multiple NVM files each containing one image.  The original NVM
    -              file is preserved.
    -
    -       odc    An offset-driven hex compare utility for analysing the difference between two files having a fixed structure.   An
    -              offset definition file is required for proper use.  This program has been superceded by program pibcomp.
    -
    -       odd    An  offset-driven  hex  dump utility for analyzing any binary file that has a fixed structured, such as an INT6000
    -              PIB file or an INT5500 CFG file.  An offset definition file is required for proper use.   This  program  has  been
    -              superceded by program pibdump.
    -
    -       odx    An  offset-driven XML generator used to convert an offset definition file, used by programs odc and odd, to an XML
    -              edit definition file used by program pxe.
    -
    -       pibdump
    -              Read a Qualcomm Atheros powerline parameter file and print an object driven dump on stdout.  This program requires
    -              an object definition file.
    -
    -       pibcomp
    -              Read  and  compare  two  Qualcomm  Atheros powerline parameter files and print an objec driver dump for only those
    -              object that are different.  This program requires and object definition file.
    -
    -       pibruin
    -              A classifier rule input utility used to insert multiple classifier rules into a pib file.  Use program pibrump  to
    -              read rules from another PIB file or create a rule file manually with any text editor.  This program is an alterna‐
    -              tive to program int6krule.
    -
    -       pibrump
    -              A classifier rule dump utility used to read rules from a PIB file and print them in a format similar to the  input
    -              for program int6krule.  The output can be read directly by program pibruin.
    -
    -       plcboot
    -              A  command line utility to start, and optionally flash, Qualcomm Atheros Powerline Devices.  It is a newer version
    -              of program ampboot having options specific to the QCA6410, QCA7000 and AR7420 chipsets.
    -
    -       plchost
    -              A example embedded host emulator that responds to VS_HST_ACTION messages sent from a flash-less device to a  local
    -              host  processor.   It  can be used to investigate and verify device-to-host interaction.  The Atheros embedded API
    -              can perform similar functionality in a production environment.
    -
    -       plcmod A command line utility that downloads raw modules using a sequence of VS_MODULE_OPERATION messages.  This  version
    -              can handle multiple module writes and modules exceeding 1400 bytes.
    -
    -       plcnets
    -              A  powerline  network  enumerator that searches all host network interfaces for powerline devices and their neigh‐
    -              bors.
    -
    -       plctool
    -
    -       plctest
    -              A command line utility to download and execute a sequence of test applets to the local powerline  device.   It  is
    -              not  for  general  use  because  there are no interlocks to prevent loading images designed for other platforms or
    -              loading images in illogical order.  It is a newer version of program amptest.
    -
    -       pskey  Print the SHA256 digest for the amplitude make stored in a PIB file.  The digest can be used as a  fingerprint  or
    -              signature for the prescaler set.
    -
    -       psin   Read a prescaler file from stdin and replace the amplitude map stored in a PIB file.
    -
    -       psout  Read a PIB file and print a prescaler file suitable for input using psin or the WIndows Device Manager.
    -
    -       rkey   A  command line utility to generate distinct HomePlug AV compliant keys from a user defined keyfile that seeds the
    -              hash algorithm.  It can be used to dynamically generate distinct keys inside shell scripts or create long lists of
    -              unique keys for use by other programs.
    -
    -       setnvm A  command  line  utility to modify slected header parameters for all image within a given NVM file.  This program
    -              can be used to translate legacy NVM files to contemporary NVM file and vice verse.
    -
    -       setpib A command line utility to insert arbitrary values into a PIB file based on data offset,  length  and  format  then
    -              compute  a  new  PIB checksum.  This program is a general purpose program intended for use in shell scripts but it
    -              requires detailed knowledge of PIB structure.
    -
    -       ttycat A command line utility to write one or more files to a serial device.  This program is a convenient tool for test‐
    -              ing Atheros UART-enabled powerline devices.
    -
    -       weeder A command line utility to set the programmable attenuators build into the Atheros Production Test System (PTS).
    -
    -       There may be other programs added, from time to time, that are not listed here.
    -
    -SEE ALSO
    -       amphost(1),   ampinit(1),  plcmod(1),  amptest(1),  amptool(1),  ar8236regedit(1),  chkpib(1),  chknvm(1),  coqos_add(1),
    -       coqos_info(1), coqos_man(1), coqos_mod(1), coqos_rel(1), efsu(1), efbu(1), getpib(1), hpav(1),  hpavkey(1),  hpavkeys(1),
    -       int6k(1),  int6kbaud(1),  int6kboot(1),  int6keth(1),  int6kf(1),  int6khost(1),  int6khost64(1),  int6kid(1), int6km(1),
    -       int6kmdio(1),  int6kmod(1),  int6kprobe(1),  int6krate(1),  int6krule(1),   int6kstat(1),   int6ktest(1),   int6kuart(1),
    -       int6kwait(1), mac2pw(1), mac2pwd(1), mdiodump(1), modpib(1), mrgpib(1), nvmmerge(1), nvmsplit(1), odc(1), odd(1), odx(1),
    -       pibdump(1), pibcomp(1), pibruin(1), pibrump(1), plcboot(1), plchost(1), plcmod(1),  plcinit(1),  plctest(1),  plctool(1),
    -       plcrate(1),  plcrate(1),  plcwait(1),  psin(1), pskey(1), psout(1), rkey(1), setnvm(1), setpib(1), ttycat(1), ttyrecv(1),
    -       ttysend(1), weeder(1)
    -
    -CREDITS
    -        Alex Vasquez <alex.vasques@qca.qualcomm.com>
    -        Andy Barnes <andy.barnes@qca.qualcomm.com>
    -        Bill Wike <bill.wike@qca.qualcomm.com>
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        John Byron <john.byron@qca.qualcomm.com>
    -        Mathieu Olivari <mathieu@qca.qualcomm.com>
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -        Marc Bertola <marc.bertola@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                      plc(1)
    -
    - - - diff --git a/docbook/plc.c.html b/docbook/plc.c.html deleted file mode 100644 index 1fd7b960..00000000 --- a/docbook/plc.c.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - plc.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plc.c - Qualcomm Atheros Powerline Data Structure;
    - *
    - *   this structure contains information needed to perform various
    - *   operations on Qualcomm Atheros powerline devices; it represents
    - *   one instance of a device and could easily be converted to an
    - *   object in the future;
    - *
    - *   this structure points to a channel and a message structure;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Alex Vasquez <avasquez@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PLC_SOURCE
    -#define PLC_SOURCE
    -
    -#include "../plc/plc.h"
    -#include "../ether/channel.h"
    -
    -struct plc plc =
    -
    -{
    -	(struct channel *) (& channel),
    -	(struct message *) (0),
    -	(void *) (0),
    -	0,
    -
    -/*
    - * Local Device Address (LDA) buffer needed by all operations;
    - */
    -
    -	{
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00
    -	},
    -
    -/*
    - * Remote Device Address (RDA) buffer needed by selected operations;
    - */
    -
    -	{
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00
    -	},
    -
    -/*
    - *   Network Membership Key (NMK) needed by VS_SET_KEY operations;
    - *   The default is an encrypted version of password "HomePlugAV";
    - */
    -
    -	{
    -		0x50,
    -		0xD3,
    -		0xE4,
    -		0x93,
    -		0x3F,
    -		0x85,
    -		0x5B,
    -		0x70,
    -		0x40,
    -		0x78,
    -		0x4D,
    -		0xF8,
    -		0x15,
    -		0xAA,
    -		0x8D,
    -		0xB7
    -	},
    -
    -/*
    - *   Device Access Key (DAK) needed for VS_SET_KEY operations;
    - *   The default is an encrypted version of password "HomePlugAV";
    - */
    -
    -	{
    -		0x68,
    -		0x9F,
    -		0x07,
    -		0x4B,
    -		0x8B,
    -		0x02,
    -		0x75,
    -		0xA2,
    -		0x71,
    -		0x0B,
    -		0x0B,
    -		0x57,
    -		0x79,
    -		0xAD,
    -		0x16,
    -		0x30
    -	},
    -
    -/*
    - * struct _file_ CFG; MAC software will be read from this file and
    - * written to RAM for each device specified on the command line;
    - * some tools use this file for the panther/lynx softloader;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ cfg; SDRAM configuration will be read from flash
    - * on the specified device and written to this file;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ SFT; softloader file to be written to flash
    - * memory;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ sft; softloader file to be read from flash
    - * memory;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ NVM; runtime firmware will be read from this file
    - * and written to RAM for each device specified on the command line;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ nvm; MAC software will be read from SDRAM on the
    - * specified device and written to this file; interlocks elsewhere
    - * in the code should prevent this file from being overwritten
    - * multiple times, by accident, and ensure that it is created before
    - * and new MAC software is written to device RAM;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ PIB; PIB information will be read from this file
    - * and written to RAM for each device specified on the command line;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ pib; PIB information will be read from SDRAM on
    - * the specified device and written to this file; interlocks elsewhere
    - * in the code should prevent this file from being overwritten
    - * multiple times, by accident, and ensure that it is created before
    - * any new PIB software is written to device RAM;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ XML; optional XML PIB edit instructions; this is an
    - * advanced feature;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ rpt; Watchdog Report data will be read from the device
    - * and written to this file;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - * struct _file_ socket;
    - */
    -
    -	{
    -		(file_t) (-1),
    -		(char const *) (0)
    -	},
    -
    -/*
    - *   miscellaneous small integers used as needed when arguments
    - *   are required for an MME;
    - */
    -
    -	HARDWAREID,
    -	SOFTWAREID,
    -	PLCSESSION,
    -	HOSTACTION,
    -	SECTORCODE,
    -	MODULECODE,
    -	PUSHBUTTON,
    -	READACTION,
    -	PLCOUPLING,
    -	FLASH_SIZE,
    -
    -/*
    - *   various boolean flags; bailout causes exit on first failure;
    - *   timeout indicates a real timeout; count is the loop counter;
    - *   pause is a loop wait timer; values are declared as constants
    - *   above;
    - */
    -
    -	PLC_STATE,
    -	PLC_TIMER,
    -	PLC_SLEEP,
    -	PLC_COUNT,
    -	PLC_INDEX,
    -	PLC_FLAGS,
    -	PLC_FLAGS
    -};
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/plc.h.html b/docbook/plc.h.html deleted file mode 100644 index eb569438..00000000 --- a/docbook/plc.h.html +++ /dev/null @@ -1,697 +0,0 @@ - - - - - - plc.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PLC_HEADER
    -#define PLC_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../ether/channel.h"
    -#include "../key/HPAVKey.h"
    -#include "../tools/types.h"
    -#include "../plc/chipset.h"
    -#include "../mme/mme.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   constants; these codes are returned in the DEVICEID field of the
    - *   firmware VS_SW_VER message;
    - *--------------------------------------------------------------------*/
    -
    -#define PLC_MODULE_SOFTLOADER           0x00
    -#define PLC_MODULE_FIRMWARE             (1 << 0)
    -#define PLC_MODULE_PARAMETERS           (1 << 1)
    -#define PLC_MODULE_NVM_PIB              (PLC_MODULE_PARAMETERS | PLC_MODULE_FIRMWARE)
    -#define PLC_MODULE_OPERATION            (1 << 3)
    -#define PLC_MODULE_UPGRADE              (PLC_MODULE_OPERATION | PLC_MODULE_PARAMETERS | PLC_MODULE_FIRMWARE)
    -#define PLC_MODULE_FORCE_FLASH          (1 << 4)
    -#define PLC_MODULE_DO_NOT_REBOOT        (1 << 5)
    -#define PLC_MODULE_ALTERNATE_SECTION    (1 << 6)
    -#define PLC_MODULE_FORCE_SECTION        (1 << 7)
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLC_VERSION_STRING 0xFF
    -#define PLC_RECORD_SIZE 1024
    -#define PLC_MODULE_SIZE 1400
    -#define PLC_SLOTS 6
    -
    -#define LEGACY_PIBOFFSET 0x01F00000
    -#define INT6x00_PIBOFFSET 0x01000000
    -#define AR7x00_PIBOFFSET 0x00200000
    -
    -#define INT_CARRIERS 1155
    -#define AMP_CARRIERS 2880
    -#define PLC_CARRIERS 1345
    -#define AMP_BITS 9
    -
    -/*====================================================================*
    - *   device manager flagword bits;
    - *--------------------------------------------------------------------*/
    -
    -/*
    - *   We reuse flagword bits in various programs to avoid proliferating
    - *   flagwords; make sure that one program does not use multiple names
    - *   ro refer to the same bit;
    - */
    -
    -#define PLC_BAILOUT           (1 << 0)
    -#define PLC_SILENCE           (1 << 1)
    -#define PLC_VERBOSE           (1 << 2)
    -#define PLC_ANALYSE           (1 << 3)
    -#define PLC_ERASE_DEVICE      PLC_ANALYSE /* ampinit, plcinit */
    -#define PLC_NEWLINE           PLC_ANALYSE /* ampID, plcID */
    -#define PLC_WAITFORRESET      (1 << 4)
    -#define PLC_WAITFORSTART      (1 << 5)
    -#define PLC_WAITFORASSOC      (1 << 6)
    -#define PLC_REMOTEHOSTS       PLC_WAITFORASSOC
    -#define PLC_RESET_DEVICE      (1 << 7)
    -#define PLC_RANDOM_ADDR       PLC_RESET_DEVICE
    -#define PLC_TIM_GARGRAVE      PLC_RESET_DEVICE
    -#define PLC_BRIDGE_LIST       PLC_RESET_DEVICE /* plclist, amplist */
    -#define PLC_FACTORY_DEFAULTS  (1 << 8)
    -#define PLC_FOREVER           PLC_FACTORY_DEFAULTS /* plctest */
    -#define PLC_GRAPH             PLC_FACTORY_DEFAULTS /* plctone */
    -#define PLC_DAEMON            PLC_FACTORY_DEFAULTS /* plchost */
    -#define PLC_REMOTE_LIST       PLC_FACTORY_DEFAULTS /* plclist, amplist */
    -#define PLC_BINARY            PLC_FACTORY_DEFAULTS /* ampsnif */
    -#define PLC_FORCE_FLASH       PLC_FACTORY_DEFAULTS /* plchost */
    -#define PLC_NETWORK           (1 << 9)
    -#define PLC_OPEN_SESSION      PLC_NETWORK /* plcmod */
    -#define PLC_MONITOR           PLC_NETWORK /* ampsnif */
    -#define PLC_XML_FORMAT        PLC_NETWORK /* int6klog */
    -#define PLC_VERSION           (1 << 10)
    -#define PLC_WRITE_MODULE      PLC_VERSION /* plcmod */
    -#define PLC_MANUFACTURER      (1 << 11)
    -#define PLC_READ_MODULE       PLC_MANUFACTURER /* plcmod */
    -#define PLC_READ_MAC          (1 << 12)
    -#define PLC_DUMP_MODULE       PLC_READ_MAC /* int6mod */
    -#define PLC_LOCAL_TRAFFIC     PLC_READ_MAC /* int6krate, amprate, plcrate */
    -#define PLC_READ_PIB          (1 << 13)
    -#define PLC_NETWORK_TRAFFIC   PLC_READ_PIB /* plcrate */
    -#define PLC_READ_IDENTITY     (1 << 14)
    -#define PLC_UNCODED_RATES     PLC_READ_IDENTITY /* plcrate */
    -#define PLC_WRITE_MAC         (1 << 15)
    -#define PLC_LINK_STATS        PLC_WRITE_MAC /* plcstat */
    -#define PLC_WRITE_PIB         (1 << 16)
    -#define PLC_TONE_MAP          PLC_WRITE_PIB /* plcstat */
    -#define PLC_FLASH_DEVICE      (1 << 17)
    -#define PLC_COMMIT_MODULE     PLC_FLASH_DEVICE /* plcmod */
    -#define PLC_QUICK_FLASH       (1 << 18)
    -#define PLC_SETLOCALKEY       (1 << 19)
    -#define PLC_RXONLY            PLC_SETLOCALKEY
    -#define PLC_SETREMOTEKEY      (1 << 20)
    -#define PLC_TXONLY            PLC_SETREMOTEKEY
    -#define PLC_SDRAM_INFO        (1 << 21)
    -#define PLC_SDRAM_CONFIG      (1 << 22)
    -#define PLC_CONFIGURE         PLC_SDRAM_CONFIG /* plcotst */
    -#define PLC_NVRAM_INFO        (1 << 23)
    -#define PLC_ATTRIBUTES        (1 << 24)
    -#define PLC_PUSH_BUTTON       (1 << 25)
    -#define PLC_READ_CFG          (1 << 26)
    -#define PLC_ERASE_SECTOR      PLC_READ_CFG
    -#define PLC_RD_MOD_WR_PIB     (1 << 27)
    -#define PLC_SNIFFER           PLC_RD_MOD_WR_PIB /* ampsnif */
    -#define PLC_READ_ALL          PLC_RD_MOD_WR_PIB /* ampinit */
    -#define PLC_WATCHDOG_REPORT   (1 << 28)
    -#define PLC_RESULTS           PLC_WATCHDOG_REPORT /* plcotst */
    -#define PLC_HOST_ACTION       (1 << 29)
    -#define PLC_LINK_STATUS       PLC_HOST_ACTION
    -#define PLC_MULTICAST_INFO    (1 << 30)
    -#define PLC_RX_TONEMAPS       PLC_HOST_ACTION /* plcstat */
    -
    -/*====================================================================*
    - *   message format strings;
    - *--------------------------------------------------------------------*/
    -
    -#define PLC_BADVALUE "Invalid or suspect data"
    -#define PLC_WONTDOIT "Device refused request"
    -#define PLC_NODEVICE "Need a device. Try 'local' or '00:B0:52:00:00:01'."
    -#define PLC_BADFRAME "Unexpected response"
    -#define PLC_NODETECT "Device must be connected"
    -#define PLC_NOMEMORY "Not enough memory"
    -#define PLC_NOTREADY "Function not implemented"
    -
    -#define PLC_ERR_OFFSET "Data offset error"
    -#define PLC_ERR_LENGTH "Data length error"
    -
    -#define PLC_BAD_MAC "Have '%s' instead of MAC address"
    -#define PLC_BAD_DAK "Have '%s' instead of DAK"
    -#define PLC_BAD_NMK "Have '%s' instead of NMK"
    -
    -#define PLC_EXIT(plc) ((signed) (plc->flags & PLC_BAILOUT))
    -
    -/*====================================================================*
    - *    program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCDEVICE "PLC"
    -
    -#define HARDWAREID 0
    -#define SOFTWAREID 0
    -#define PLCSESSION 0x78563412
    -#define HOSTACTION 0
    -#define SECTORCODE 0
    -#define PUSHBUTTON 1
    -#define MODULECODE (VS_MODULE_MAC | VS_MODULE_PIB)
    -#define READACTION 0
    -#define FLASH_SIZE 0x200000
    -#define PLCOUPLING 0
    -
    -#define PLC_STATE 0
    -#define PLC_TIMER 60
    -#define PLC_SLEEP 0
    -#define PLC_COUNT 1
    -#define PLC_INDEX 0
    -#define PLC_FLAGS 0
    -
    -#define PLC_MEMTYPE_AUTO 1
    -#define PLC_MEMTYPE_ITCM 2
    -#define PLC_MEMTYPE_DTCM 3
    -#define PLC_MEMTYPE_SRAM 4
    -#define PLC_MEMTYPE_SDRAM 5
    -
    -#define PLC_ECHOTIME 3
    -#define PLC_LONGTIME (unsigned)(~0)
    -
    -/*====================================================================*
    - *   common mac address names;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCDEVICES 3
    -
    -extern struct _term_ const devices [PLCDEVICES];
    -
    -/*====================================================================*
    - *
    - *   the plc structure holds everything needed to perform powerline
    - *   device management operations including a channel structure for
    - *   Ethernet interface management and a message structure for data
    - *   buffer management;
    - *
    - *   the channel structure holds information needed to open, read,
    - *   write and close a raw socket; it differs in detail depending
    - *   on constants WINPCAP and LIBPCAP;
    - *
    - *   character array address[] holds a decoded ethernet address for
    - *   display purposes because humans cannot read;
    - *
    - *   byte array LMA[] holds the Qualcomm Local Broadcast Address
    - *   because it is used in so many places;
    - *
    - *   byte arrays NMK[] and DAK[] hold encryption keys used by some
    - *   operations;
    - *
    - *   the socket _file_ structure holds the descriptor and interface
    - *   name of the host NIC where the name is eth0, eth1, ... or ethn;
    - *
    - *   the three _file_ structures, CFG, NVM, and PIB hold descriptors
    - *   and filenames for files written to the device;
    - *
    - *   the three _file_ structures cfg, nvm and pib hold
    - *   descriptors and filenames of files read from the device;
    - *
    - *   integers retry and timer are used by program plcwait;
    - *
    - *   integers index, count and pause control command line looping
    - *   and waiting;
    - *
    - *   flag_t flags contains bits that define program operations and
    - *   control utility program flow;
    - *
    - *--------------------------------------------------------------------*/
    -
    -typedef struct plc
    -
    -{
    -	struct channel * channel;
    -	struct message * message;
    -	void * content;
    -	ssize_t packetsize;
    -	uint8_t MAC [ETHER_ADDR_LEN];
    -	uint8_t RDA [ETHER_ADDR_LEN];
    -	uint8_t NMK [HPAVKEY_NMK_LEN];
    -	uint8_t DAK [HPAVKEY_DAK_LEN];
    -	struct _file_ CFG;
    -	struct _file_ cfg;
    -	struct _file_ SFT;
    -	struct _file_ sft;
    -	struct _file_ NVM;
    -	struct _file_ nvm;
    -	struct _file_ PIB;
    -	struct _file_ pib;
    -	struct _file_ XML;
    -	struct _file_ rpt;
    -	struct _file_ socket;
    -	uint32_t hardwareID;
    -	uint32_t softwareID;
    -	uint32_t cookie;
    -	uint8_t action;
    -	uint8_t sector;
    -	uint8_t module;
    -	uint8_t pushbutton;
    -	uint8_t readaction;
    -	uint8_t coupling;
    -	unsigned flash_size;
    -	unsigned state;
    -	unsigned timer;
    -	unsigned sleep;
    -	unsigned count;
    -	unsigned index;
    -	flag_t flags;
    -	flag_t flag2;
    -}
    -
    -PLC;
    -
    -/*====================================================================*
    - *  fixer-upper functions that compensate for errors and omissions;
    - *--------------------------------------------------------------------*/
    -
    -void chipset (void const * memory);
    -char const * chipsetname (uint8_t chipset);
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -signed Attributes (struct plc *);
    -signed Attributes1 (struct plc *);
    -signed Attributes2 (struct plc *);
    -signed BootDevice (struct plc *);
    -signed BootDevice1 (struct plc *);
    -signed BootDevice2 (struct plc *);
    -signed BootDeviceFirmware (struct plc *);
    -signed BootDeviceParameters (struct plc *);
    -signed BootFirmware1 (struct plc *);
    -signed BootFirmware2 (struct plc *);
    -signed BootParameters1 (struct plc *);
    -signed BootParameters2 (struct plc *);
    -signed ChangeIdent (struct plc *);
    -signed CrossTraffic (struct plc *);
    -signed CrossTrafficOne (struct plc *);
    -signed CrossTrafficTwo (struct plc *);
    -signed DeviceIdent (struct plc *);
    -signed EmulateHost (struct plc *);
    -signed EmulateHost64 (struct plc *);
    -signed EraseFlashSector (struct plc *);
    -signed ExecuteApplets (struct plc *);
    -signed ExecuteApplets1 (struct plc *);
    -signed ExecuteApplets2 (struct plc *);
    -signed FactoryDefaults (struct plc *);
    -signed FactoryReset (struct plc *);
    -signed FlashNVM (struct plc *);
    -signed FlashPTS (struct plc *);
    -signed FlashDevice (struct plc *);
    -signed FlashDevice0 (struct plc *);
    -signed FlashDevice1 (struct plc *);
    -signed FlashDevice2 (struct plc *, uint32_t options);
    -signed FlashFirmware (struct plc *, uint32_t options);
    -signed FlashParameters (struct plc *, uint32_t options);
    -signed FlashUpgrade (struct plc *, uint32_t options);
    -signed FlashNVM (struct plc *);
    -signed FlashSoftloader (struct plc *, uint32_t options);
    -signed HostActionResponse (struct plc *);
    -signed Identity (struct plc *);
    -signed Identity1 (struct plc *);
    -signed Identity2 (struct plc *);
    -signed InitDevice (struct plc *);
    -signed InitDevice1 (struct plc *);
    -signed InitDevice2 (struct plc *);
    -signed LinkStatistics (struct plc *);
    -signed LinkStatus (struct plc *);
    -signed ListLocalDevices (struct plc * plc, char const * space, char const * comma);
    -signed LocalTrafficSend (struct plc * plc);
    -signed Antiphon (struct plc * plc, uint8_t osa [], uint8_t oda []);
    -signed MDUTrafficStats (struct plc *, uint8_t command, uint8_t session, uint8_t slave);
    -signed MfgString (struct plc *);
    -signed MulticastInfo1 (struct plc *);
    -signed MulticastInfo2 (struct plc *);
    -signed NVMSelect (struct plc *, signed (struct plc *), signed (struct plc *));
    -signed NVRAMInfo (struct plc *);
    -signed NetInfo (struct plc *);
    -signed NetInfo1 (struct plc *);
    -signed NetInfo2 (struct plc *);
    -signed NetworkDevices (struct plc *, void * memory, size_t extent);
    -signed NetworkDevices1 (struct plc *, void * memory, size_t extent);
    -signed NetworkDevices2 (struct plc *, void * memory, size_t extent);
    -signed NetworkInfoStats (struct plc *);
    -signed NetworkInformation (struct plc *);
    -signed NetworkInformation1 (struct plc *);
    -signed NetworkInformation2 (struct plc *);
    -signed NetworkProbe (struct plc *);
    -signed NetworkTraffic (struct plc *);
    -signed NetworkTraffic1 (struct plc *);
    -signed NetworkTraffic2 (struct plc *);
    -signed PLCSelect (struct plc *, signed method1 (struct plc *), signed method2 (struct plc *));
    -signed PhyRates (struct plc *);
    -signed PhyRates1 (struct plc *);
    -signed PhyRates2 (struct plc *);
    -signed RxRates2 (struct plc *);
    -signed TxRates2 (struct plc *);
    -signed PushButton (struct plc *);
    -signed ReadFMI (struct plc *, uint8_t MMV, uint16_t MMTYPE);
    -signed ReadMFG (struct plc *, uint8_t MMV, uint16_t MMTYPE);
    -signed ReadMME (struct plc *, uint8_t MMV, uint16_t MMTYPE);
    -signed ReadFirmware (struct plc *);
    -signed ReadFirmware1 (struct plc *);
    -signed ReadFirmware2 (struct plc *);
    -signed ReadParameterBlock (struct plc *, void * memory, size_t extent);
    -signed ReadParameters (struct plc *);
    -signed ReadParameters1 (struct plc *);
    -signed ReadParameters2 (struct plc *);
    -signed ListRemoteDevices (struct plc *, char const * space, char const * comma);
    -signed ListRemoteDevices1 (struct plc *, char const * space, char const * comma);
    -signed ListRemoteDevices2 (struct plc *, char const * space, char const * comma);
    -signed RemoteHosts (struct plc *);
    -signed Reset (struct plc *);
    -signed ResetAndWait (struct plc *);
    -signed ResetDevice (struct plc *);
    -signed SDRAMInfo (struct plc *);
    -signed SendMME (struct plc *);
    -signed SetNMK (struct plc *);
    -signed SignalToNoise1 (struct plc *);
    -signed SignalToNoise2 (struct plc *);
    -signed SlaveMembership (struct plc *);
    -signed StartDevice (struct plc *);
    -signed StartDevice1 (struct plc *);
    -signed StartDevice2 (struct plc *);
    -signed StartFirmware (struct plc *, unsigned module, void const * header);
    -signed StartFirmware1 (struct plc *, unsigned module, const struct nvm_header1 *);
    -signed StartFirmware2 (struct plc *, unsigned module, const struct nvm_header2 *);
    -signed ToneMaps1 (struct plc *);
    -signed ToneMaps2 (struct plc *);
    -signed Topology (struct plc *);
    -signed Topology1 (struct plc *);
    -signed Topology2 (struct plc *);
    -signed Traffic (struct plc *);
    -signed Traffic1 (struct plc *);
    -signed Traffic2 (struct plc *);
    -signed Traffic3 (struct plc *);
    -signed Transmit (struct plc *, uint8_t osa [], uint8_t oda []);
    -signed UpgradeDevice1 (struct plc *);
    -signed MDUTrafficStats (struct plc *, uint8_t command, uint8_t session, uint8_t slave);
    -signed VersionInfo (struct plc *);
    -signed VersionInfo1 (struct plc *);
    -signed VersionInfo2 (struct plc *);
    -signed WaitForAssoc (struct plc *);
    -signed WaitForAssoc1 (struct plc *);
    -signed WaitForAssoc2 (struct plc *);
    -signed WaitForBootLoader (struct plc *);
    -signed WaitForReset (struct plc *, char buffer [], size_t length);
    -signed WaitForStart (struct plc *, char buffer [], size_t length);
    -signed WaitForRestart (struct plc *);
    -signed WatchdogReport (struct plc *);
    -signed WriteCFG (struct plc *);
    -signed WriteExecuteApplet2 (struct plc *, unsigned module, const struct nvm_header2 *);
    -signed WriteExecuteFirmware (struct plc *, unsigned module, void const * nvm_header);
    -signed WriteExecuteFirmware1 (struct plc *, unsigned module, const struct nvm_header1 *);
    -signed WriteExecuteFirmware2 (struct plc *, unsigned module, const struct nvm_header2 *);
    -signed WriteExecuteParameters (struct plc *, unsigned module, void const * nvm_header);
    -signed WriteExecuteParameters1 (struct plc *, unsigned module, const struct nvm_header1 *);
    -signed WriteExecuteParameters2 (struct plc *, unsigned module, const struct nvm_header2 *);
    -signed WriteExecutePIB (struct plc *, unsigned offset, struct pib_header *);
    -signed WriteFirmware (struct plc *, unsigned module, void const * nvm_header);
    -signed WriteFirmware1 (struct plc *, unsigned module, const struct nvm_header1 *);
    -signed WriteFirmware2 (struct plc *, unsigned module, const struct nvm_header2 *);
    -signed WriteMEM (struct plc *, struct _file_ *, unsigned module, uint32_t offset, uint32_t extent);
    -signed WriteMOD (struct plc *, uint8_t module, void const * memory, size_t extent);
    -signed WriteNVM (struct plc *);
    -signed WritePIB (struct plc *);
    -signed WriteParameters (struct plc *, unsigned module, void const * nvm_header);
    -signed WriteParameters1 (struct plc *, unsigned module, const struct nvm_header1 *);
    -signed WriteParameters2 (struct plc *, unsigned module, const struct nvm_header2 *);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define PLC_FORMAT_HEX 0
    -#define PLC_FORMAT_DEC 1
    -#define PLC_FORMAT_BIN 2
    -#define PLC_FORMAT_ASC 3
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -struct __packed plcproperty
    -
    -{
    -	uint8_t PROP_OPTION;
    -	uint8_t PROP_FORMAT;
    -	uint32_t PROP_NUMBER;
    -	uint32_t PROP_VERSION;
    -	uint32_t PROP_LENGTH;
    -	uint8_t PROP_BUFFER [128];
    -	uint8_t DATA_FORMAT;
    -	uint32_t DATA_LENGTH;
    -	uint8_t DATA_BUFFER [128];
    -}
    -
    -plcproperty;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed GetProperty (struct plc *, struct plcproperty *);
    -signed SetProperty (struct plc *, struct plcproperty *);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -typedef struct __packed plcstation
    -
    -{
    -	uint8_t LOC;
    -	uint8_t CCO;
    -	uint8_t TEI;
    -	uint8_t MAC [ETHER_ADDR_LEN];
    -	uint8_t BDA [ETHER_ADDR_LEN];
    -	uint16_t TX;
    -	uint16_t RX;
    -	char hardware [0x10];
    -	char firmware [0x80];
    -	char identity [0x40];
    -}
    -
    -plcstation;
    -typedef struct __packed plcnetwork
    -
    -{
    -	signed ifname;
    -	signed plcstations;
    -	struct plcstation plcstation [1];
    -}
    -
    -plcnetwork;
    -typedef struct __packed plctopology
    -
    -{
    -	signed plcnetworks;
    -	struct plcnetwork plcnetwork [1];
    -}
    -
    -pcltopology;
    -
    -/*====================================================================*
    - *   functions that use struct channel and struct message directly
    - *   instead of struct plc;
    - *--------------------------------------------------------------------*/
    -
    -signed FlashMOD (struct channel *, uint8_t module);
    -signed WriteModule (struct channel *, struct message *, void const * memory, size_t extent);
    -signed WriteMemory (struct channel *, struct message *, struct _file_ *, uint32_t offset, uint32_t extent);
    -unsigned LocalDevices (struct channel const *, struct message *, void * memory, size_t extent);
    -signed Platform (struct channel *, const byte device []);
    -signed PLCReadParameterBlock (struct channel *, struct message *, void * memory, size_t extent);
    -signed PLCReadFirmwareImage (struct channel *, struct message *, void * memory, size_t extent);
    -signed PLCTopology (struct channel *, struct message *, struct plctopology *);
    -signed PLCTopologyPrint (struct plctopology *);
    -
    -/*====================================================================*
    - *   vs_module_spec message;
    - *--------------------------------------------------------------------*/
    -
    -#define PLC_MODULE_EXECUTE   (1 << 0)
    -#define PLC_MODULE_ABSOLUTE (1 << 1)
    -#define PLC_MODULE_RELATIVE (0 << 1)
    -
    -#define PLC_MODULE_READ_TIMEOUT 5000
    -#define PLC_MODULE_REQUEST_TIMEOUT 60000
    -#define PLC_MODULE_WRITE_TIMEOUT 90000
    -
    -#define PLC_MOD_OP_READ_MEMORY 0x00
    -#define PLC_MOD_OP_READ_FLASH  0x01
    -#define PLC_MOD_OP_START_SESSION  0x10
    -#define PLC_MOD_OP_WRITE_MODULE   0x11
    -#define PLC_MOD_OP_CLOSE_SESSION  0x12
    -
    -#define PLC_MODULEID 0x0000
    -#define PLC_SUBMODULEID 0x0000
    -
    -#define PLC_MODULEID_MDIO_INIT  0x1000
    -#define PLC_MODULEID_UART_ASYNC 0x2000
    -#define PLC_MODULEID_ADDR_ENUM  0x3000
    -#define PLC_MODULEID_POWER_MGT  0x4000
    -#define PLC_MODULEID_TR069      0x4001
    -#define PLC_MODULEID_FORWARDCFG 0x7000
    -#define PLC_MODULEID_FIRMWARE   0x7001
    -#define PLC_MODULEID_PARAMETERS 0x7002
    -#define PLC_MODULEID_SOFTLOADER 0x7003
    -#define PLC_MODULEID_RESERVED1  0x7004
    -#define PLC_MODULEID_PIBMERGE   0x7005
    -#define PLC_MODULEID_RESERVED2  0x7006
    -
    -typedef struct __packed vs_module_spec
    -
    -{
    -	uint16_t MODULE_ID;
    -	uint16_t MODULE_SUB_ID;
    -	uint32_t MODULE_LENGTH;
    -	uint32_t MODULE_CHKSUM;
    -}
    -
    -vs_module_spec;
    -
    -#define PLC_COMMIT_FORCE   (1 << 0)
    -#define PLC_COMMIT_NORESET (1 << 1)
    -#define PLC_COMMIT_FACTPIB (1 << 31)
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -signed ModuleSpec (struct _file_ *, struct vs_module_spec *);
    -signed ModuleSession (struct plc *, unsigned modules, vs_module_spec *);
    -signed ModuleWrite (struct plc *, struct _file_ *, unsigned module, vs_module_spec *);
    -signed ModuleRead (struct plc *, struct _file_ *, uint16_t source, uint16_t module, uint16_t submodule);
    -signed ModuleDump (struct plc *, uint16_t source, uint16_t module, uint16_t submodule);
    -signed ModuleCommit (struct plc *, uint32_t flags);
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -#ifdef __GNUC__
    -
    -__attribute__ ((format (printf, 2, 3))) 
    -
    -#endif
    -
    -void Request (struct plc *, char const * format, ...);
    -
    -#ifdef __GNUC__
    -
    -__attribute__ ((format (printf, 2, 3))) 
    -
    -#endif
    -
    -void Confirm (struct plc *, char const * format, ...);
    -
    -#ifdef __GNUC__
    -
    -__attribute__ ((format (printf, 2, 3))) 
    -
    -#endif
    -
    -void Display (struct plc *, char const * format, ...);
    -
    -#ifdef __GNUC__
    -
    -__attribute__ ((format (printf, 2, 3))) 
    -
    -#endif
    -
    -void Failure (struct plc *, char const * format, ...);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/plcID.1.html b/docbook/plcID.1.html deleted file mode 100644 index d6e73ab4..00000000 --- a/docbook/plcID.1.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - plcID.1 - - - - - - - - - -
    -plcID(1)                                     Qualcomm Atheros Open Powerline Toolkit                                    plcID(1)
    -
    -NAME
    -       plcID - Echo Device Key
    -
    -SYNOPSIS
    -       plcID [options] [device] [device] [ ... ]
    -
    -DESCRIPTION
    -       This  program  prints  a single powerline device key or HFID on stdout.  It can be used to dynamically define environment
    -       variables or insert command line arguments in scripts at runtime.  It is intended to echo a specific key read from a sin‐
    -       gle  device  but  it  can be used to echo a specific key type read from several devices by specifying either the Qualcomm
    -       Atheros Local Management Address or a broadcast address.
    -
    -       This program is, in some sense, the inverse of modpib but it reads the key and HFID directly from  the  powerline  device
    -       instead of reading from a PIB file.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -A     Prints the Ethernet address (MAC) for each specified device.  This option and options -D, -M, -N, -S  and  -U  are
    -              mutually exclusive.
    -
    -       -D     Prints  the  Device Access Key (DAK) for each specified device.  This option and options -A, -M, -N, -S and -U are
    -              mutually exclusive.
    -
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -n     Append a newline to the end of each key.  Newlines are omitted by default so that program output can  be  used  as
    -              the raw input to another program.  If you want the newline then you must request it with this option.
    -
    -       -M     Prints  the Network Membership Key (NMK) for each specified device.  This option and options -A, -D, -N, -S and -U
    -              are mutually exclusive.
    -
    -       -N     Prints the network HFID string for each specified device.  This option and options -A, -D, -M, -S and -U are mutu‐
    -              ally exclusive.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -S     Prints  the manufacturer HFID string for each specified device.  This option and options -A, -D, -M, -N and -U are
    -              mutually exclusive.
    -
    -       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
    -              be saved as text files for reference.
    -
    -       -x     Cause  the  program  to  exit  on  the  first error instead of continuing with remaining iterations, operations or
    -              devices.  Normally, the program reports errors and moves on to the next operation, iteration or  device  depending
    -              on the command line.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
    -              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
    -              information about symbolic device addresses.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
    -              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
    -              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -DISCLAIMER
    -       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
    -       gram.
    -
    -EXAMPLES
    -       The following example prints the DAK of the local device on stdout.  The local device  is  interrogated  because  no  MAC
    -       address was specified.  The default interface, eth1 on Linux and 2 on Windows, is used unless environment variable PLC is
    -       defined.  The DAK is always printed by default.  Depending on your system, you may want to use option -n when using  this
    -       program interactively.
    -
    -          # plcID
    -          00:11:22:33:44:55:66:77:88:99:AA:DD:CC:DD:EE:FF
    -
    -       The  following example prints the NMK of device 00:B0:52:DA:DA:57 connected to interface eth2 on a Linux system.  Several
    -       devices could be specified but that is not a common request.
    -
    -          # DAK -Mi eth2 00:B0:52:DA:DA:57
    -          F4:23:71:4A:51:39:C2:2D:E5:EA:87:43:99:A1:37:81
    -
    -       The following example dynamically inserts the DAK and NMK of the previous device on the command line of another  program.
    -       In  this  example, we want to insert the DAK and NMK into PIB file abc.pib using program modpib.  See the modpib man page
    -       for an explanation of command line syntax.  See the GNU bash manuals for an explanation of why this works.
    -
    -          # modpib abc.pib -D $(plcID -Di eth2 00:B0:52:DA:DA:57) -N $(plcID -Mi eth2 00:B0:52:DA:DA:57)
    -
    -       The following example is an alternate way of accomplishing the same thing using shell script variables.  This method  may
    -       be easier to read and maintain.  Notice that we 'squished' all the options together for brevity.
    -
    -          # PLC=00:B0:52:DA:DA:57
    -          # DAK=$(plcID -Dieth2 ${PLC})
    -          # NMK=$(plcID -Mieth2 ${PLC})
    -          # modpib abc.pib -D ${DAK} -N ${NMK}
    -
    -SEE ALSO
    -       plc(1), plcboot(1), plcinit(1), plctool(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                    plcID(1)
    -
    - - - diff --git a/docbook/plcID.c.html b/docbook/plcID.c.html deleted file mode 100644 index 91dc61bc..00000000 --- a/docbook/plcID.c.html +++ /dev/null @@ -1,644 +0,0 @@ - - - - - - plcID.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plcID.c - Qualcomm Atheros Powerline Device Identity
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <string.h>
    -#include <ctype.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../mme/mme.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexout.c"
    -#include "../tools/error.c"
    -#include "../tools/synonym.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/Display.c"
    -#include "../plc/Devices.c"
    -#include "../plc/Failure.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/WaitForStart.c"
    -#include "../plc/chipset.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCID_DAK 0
    -#define PLCID_NMK 1
    -#define PLCID_MAC 2
    -#define PLCID_MFG 3
    -#define PLCID_USR 4
    -#define PLCID_NET 5
    -
    -/*====================================================================*
    - *
    - *   signed PLCSelect (struct plc * plc, signed old (struct plc *), signed new (struct plc *));
    - *
    - *   plc.h
    - *
    - *   wait for device to start in order to determine chipset then call
    - *   the approproate function based on chipset; unfortunately, chipset
    - *   detection and selection may not be this simple in the future;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed PLCSelect (struct plc * plc, signed old (struct plc *), signed new (struct plc *))
    -
    -{
    -	char firmware [PLC_VERSION_STRING];
    -	if (WaitForStart (plc, firmware, sizeof (firmware)))
    -	{
    -		Failure (plc, PLC_NODETECT);
    -		exit (1);
    -	}
    -	return ((plc->hardwareID < CHIPSET_QCA7420)? old (plc): new (plc));
    -}
    -
    -/*====================================================================*
    - *
    - *   signed ReadKey1 (struct plc * plc);
    - *
    - *   read the first block of the PIB from a device then echo one of
    - *   several parameters on stdout as a string; program output can be
    - *   used in scripts to define variables or compare strings;
    - *
    - *   this function is an abridged version of ReadParameters(); it reads only
    - *   the first 1024 bytes of the PIB then stops; most parameters of
    - *   general interest occur in that block;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed ReadKey1 (struct plc * plc)
    -
    -{
    -	static signed count = 0;
    -	struct channel * channel = (struct channel *) (plc->channel);
    -	struct message * message = (struct message *) (plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_rd_mod_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MODULEID;
    -		uint8_t RESERVED;
    -		uint16_t MLENGTH;
    -		uint32_t MOFFSET;
    -		uint8_t DAK [16];
    -	}
    -	* request = (struct vs_rd_mod_request *) (message);
    -	struct __packed vs_rd_mod_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t RESERVED1 [3];
    -		uint8_t MODULEID;
    -		uint8_t RESERVED2;
    -		uint16_t MLENGTH;
    -		uint32_t MOFFSET;
    -		uint32_t MCHKSUM;
    -		struct simple_pib pib;
    -	}
    -	* confirm = (struct vs_rd_mod_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (& request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (& request->qualcomm, 0, (VS_RD_MOD | MMTYPE_REQ));
    -	request->MODULEID = VS_MODULE_PIB;
    -	request->MLENGTH = HTOLE16 (PLC_RECORD_SIZE);
    -	request->MOFFSET = HTOLE32 (0);
    -	plc->packetsize = ETHER_MIN_LEN - ETHER_CRC_LEN;
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (1, errno, CHANNEL_CANTSEND);
    -	}
    -	while (ReadMME (plc, 0, (VS_RD_MOD | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->MSTATUS)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			return (-1);
    -		}
    -		if (count++ > 0)
    -		{
    -			putc (plc->coupling, stdout);
    -		}
    -		if (plc->action == PLCID_MAC)
    -		{
    -			hexout (confirm->pib.MAC, sizeof (confirm->pib.MAC), HEX_EXTENDER, 0, stdout);
    -		}
    -		else if (plc->action == PLCID_DAK)
    -		{
    -			hexout (confirm->pib.DAK, sizeof (confirm->pib.DAK), HEX_EXTENDER, 0, stdout);
    -		}
    -		else if (plc->action == PLCID_NMK)
    -		{
    -			hexout (confirm->pib.NMK, sizeof (confirm->pib.NMK), HEX_EXTENDER, 0, stdout);
    -		}
    -		else if (plc->action == PLCID_MFG)
    -		{
    -			confirm->pib.MFG [PIB_HFID_LEN -1] = (char) (0);
    -			printf ("%s", confirm->pib.MFG);
    -		}
    -		else if (plc->action == PLCID_USR)
    -		{
    -			confirm->pib.USR [PIB_HFID_LEN -1] = (char) (0);
    -			printf ("%s", confirm->pib.USR);
    -		}
    -		else if (plc->action == PLCID_NET)
    -		{
    -			confirm->pib.NET [PIB_HFID_LEN -1] = (char) (0);
    -			printf ("%s", confirm->pib.NET);
    -		}
    -	}
    -	if (plc->packetsize < 0)
    -	{
    -		error (1, errno, CHANNEL_CANTREAD);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed ReadKey2 (struct plc * plc);
    - *
    - *   plc.h
    - *
    - *   read start of parameter chain from the device using a single
    - *   VS_MODULE_OPERATION message; search parameter chain for PIB and
    - *   print requested plc->action on stdout;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed ReadKey2 (struct plc * plc)
    -
    -{
    -	static signed count = 0;
    -	struct channel * channel = (struct channel *) (plc->channel);
    -	struct message * message = (struct message *) (plc->message);
    -	struct nvm_header2 * nvm_header;
    -	uint32_t origin = ~ 0;
    -	uint32_t offset = 0;
    -	signed module = 0;
    -	char * filename = "device";
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_module_operation_read_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint32_t RESERVED;
    -		uint8_t NUM_OP_DATA;
    -		struct __packed
    -		{
    -			uint16_t MOD_OP;
    -			uint16_t MOD_OP_DATA_LEN;
    -			uint32_t MOD_OP_RSVD;
    -			uint16_t MODULE_ID;
    -			uint16_t MODULE_SUB_ID;
    -			uint16_t MODULE_LENGTH;
    -			uint32_t MODULE_OFFSET;
    -		}
    -		MODULE_SPEC;
    -	}
    -	* request = (struct vs_module_operation_read_request *) (message);
    -	struct __packed vs_module_operation_read_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint16_t MSTATUS;
    -		uint16_t ERR_REC_CODE;
    -		uint32_t RESERVED;
    -		uint8_t NUM_OP_DATA;
    -		struct __packed
    -		{
    -			uint16_t MOD_OP;
    -			uint16_t MOD_OP_DATA_LEN;
    -			uint32_t MOD_OP_RSVD;
    -			uint16_t MODULE_ID;
    -			uint16_t MODULE_SUB_ID;
    -			uint16_t MODULE_LENGTH;
    -			uint32_t MODULE_OFFSET;
    -		}
    -		MODULE_SPEC;
    -		uint8_t MODULE_DATA [PLC_MODULE_SIZE];
    -	}
    -	* confirm = (struct vs_module_operation_read_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (& request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (& request->qualcomm, 0, (VS_MODULE_OPERATION | MMTYPE_REQ));
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	request->NUM_OP_DATA = 1;
    -	request->MODULE_SPEC.MOD_OP = HTOLE16 (0);
    -	request->MODULE_SPEC.MOD_OP_DATA_LEN = HTOLE16 (sizeof (request->MODULE_SPEC));
    -	request->MODULE_SPEC.MOD_OP_RSVD = HTOLE32 (0);
    -	request->MODULE_SPEC.MODULE_ID = HTOLE16 (PLC_MODULEID_PARAMETERS);
    -	request->MODULE_SPEC.MODULE_SUB_ID = HTOLE16 (0);
    -	request->MODULE_SPEC.MODULE_LENGTH = HTOLE16 (PLC_MODULE_SIZE);
    -	request->MODULE_SPEC.MODULE_OFFSET = HTOLE32 (0);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (1, errno, CHANNEL_CANTSEND);
    -	}
    -	while (ReadMME (plc, 0, (VS_MODULE_OPERATION | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->MSTATUS)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			return (-1);
    -		}
    -		if (count++ > 0)
    -		{
    -			putc (plc->coupling, stdout);
    -		}
    -		do 
    -		{
    -			nvm_header = (struct nvm_header2 *) (& confirm->MODULE_DATA [offset]);
    -			if (LE16TOH (nvm_header->MajorVersion) != 1)
    -			{
    -				if (_allclr (plc->flags, PLC_SILENCE))
    -				{
    -					error (0, errno, NVM_HDR_VERSION, filename, module);
    -				}
    -				return (-1);
    -			}
    -			if (LE16TOH (nvm_header->MinorVersion) != 1)
    -			{
    -				if (_allclr (plc->flags, PLC_SILENCE))
    -				{
    -					error (0, errno, NVM_HDR_VERSION, filename, module);
    -				}
    -				return (-1);
    -			}
    -			if (LE32TOH (nvm_header->PrevHeader) != origin)
    -			{
    -				if (_allclr (plc->flags, PLC_SILENCE))
    -				{
    -					error (0, errno, NVM_HDR_LINK, filename, module);
    -				}
    -				return (-1);
    -			}
    -			if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
    -			{
    -				error (0, 0, NVM_HDR_CHECKSUM, filename, module);
    -				return (-1);
    -			}
    -			origin = offset;
    -			offset += sizeof (* nvm_header);
    -			if (LE32TOH (nvm_header->ImageType) == NVM_IMAGE_PIB)
    -			{
    -				struct simple_pib * pib = (struct simple_pib *) (& confirm->MODULE_DATA [offset]);
    -				if (plc->action == PLCID_MAC)
    -				{
    -					hexout (pib->MAC, sizeof (pib->MAC), HEX_EXTENDER, 0, stdout);
    -				}
    -				else if (plc->action == PLCID_DAK)
    -				{
    -					hexout (pib->DAK, sizeof (pib->DAK), HEX_EXTENDER, 0, stdout);
    -				}
    -				else if (plc->action == PLCID_NMK)
    -				{
    -					hexout (pib->NMK, sizeof (pib->NMK), HEX_EXTENDER, 0, stdout);
    -				}
    -				else if (plc->action == PLCID_MFG)
    -				{
    -					pib->MFG [PIB_HFID_LEN -1] = (char) (0);
    -					printf ("%s", pib->MFG);
    -				}
    -				else if (plc->action == PLCID_USR)
    -				{
    -					pib->USR [PIB_HFID_LEN -1] = (char) (0);
    -					printf ("%s", pib->USR);
    -				}
    -				else if (plc->action == PLCID_NET)
    -				{
    -					pib->NET [PIB_HFID_LEN -1] = (char) (0);
    -					printf ("%s", pib->NET);
    -				}
    -				break;
    -			}
    -			if (checksum32 (& confirm->MODULE_DATA [offset], LE32TOH (nvm_header->ImageLength), nvm_header->ImageChecksum))
    -			{
    -				if (_allclr (plc->flags, PLC_SILENCE))
    -				{
    -					error (0, errno, NVM_IMG_CHECKSUM, filename, module);
    -				}
    -				return (-1);
    -			}
    -			offset += LE32TOH (nvm_header->ImageLength);
    -			module++;
    -		}
    -		while (~ nvm_header->NextHeader);
    -	}
    -	if (plc->packetsize < 0)
    -	{
    -		error (1, errno, CHANNEL_CANTREAD);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"Ac:Dei:MnNqSUv",
    -		"device",
    -		"Qualcomm Atheros Powerline Device Identity",
    -		"A\tEthernet address (MAC)",
    -		"c c\tcharacter delimiter is (c)",
    -		"D\tDevice Access Key (DAK)",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"M\tNetwork Membership Key (NMK)",
    -		"n\tappend newline on output",
    -		"N\tnetwork HFID",
    -		"q\tquiet mode",
    -		"S\tmanufacturer HFID",
    -		"U\tuser HFID",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed c;
    -	plc.action = PLCID_DAK;
    -	plc.coupling = '\n';
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while (~ (c = getoptv (argc, argv, optv)))
    -	{
    -		switch (c)
    -		{
    -		case 'A':
    -			plc.action = PLCID_MAC;
    -			break;
    -		case 'c':
    -			plc.coupling = * optarg;
    -			break;
    -		case 'D':
    -			plc.action = PLCID_DAK;
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'M':
    -			plc.action = PLCID_NMK;
    -			break;
    -		case 'n':
    -			_setbits (plc.flags, PLC_NEWLINE);
    -			break;
    -		case 'N':
    -			plc.action = PLCID_NET;
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'S':
    -			plc.action = PLCID_MFG;
    -			break;
    -		case 'U':
    -			plc.action = PLCID_USR;
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		default: 
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (& channel);
    -	if (! (plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (! argc)
    -	{
    -		PLCSelect (& plc, ReadKey1, ReadKey2);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (! hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		PLCSelect (& plc, ReadKey1, ReadKey2);
    -		argv++;
    -		argc--;
    -	}
    -	if (_anyset (plc.flags, PLC_NEWLINE))
    -	{
    -		printf ("\n");
    -	}
    -	free (plc.message);
    -	closechannel (& channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcboot.1.html b/docbook/plcboot.1.html deleted file mode 100644 index ab0e3e99..00000000 --- a/docbook/plcboot.1.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - plcboot.1 - - - - - - - - - -
    -plcboot(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plcboot(1)
    -
    -NAME
    -       plcboot - Qualcomm Atheros Panther/Lynx Powerline Device Bootstrapper
    -
    -SYNOPSIS
    -       plcboot [options] -N file -P file [device] [device] [...]
    -
    -DESCRIPTION
    -       Download and start runtime firmware on a local powerline device when it is in bootloader mode.  A powerline device enters
    -       bootloader mode if it has not flash memory or cannot load firmware from flash memory for some reason.  You can  use  this
    -       progrm  to start the device and then, optionally, permanently write a softloader, parameters and firmware into flash mem‐
    -       ory.
    -
    -       Qualcomm Atheros introduced new boot methods with the Lightning chipset and new file formats and flash methods  with  the
    -       Panther  chipset.   This program supports the newer formats and methods.  It does not support the older formats and meth‐
    -       ods.  See programs int6kboot or ampboot to initialize earlier chipsets.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -e     Redirects stderr messages to stdout.  Normally, status and error messages are printed on stderr while primary pro‐
    -              gram output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -F[F]  Flash or Force Flash NVRAM using either VS_MOD_NVM or VS_MODULE_OPERATION.  Adding a second F here or  another  -F
    -              anywhere  on  the  command line will force-flash a blank or corrupted NVRAM.  Firmware loaded from NVRAM may treat
    -              force-flash as an error, depending of the firmware version.
    -
    -       -i interface
    -              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
    -              interface.  This option then takes precedence over either default.
    -
    -       -N filename
    -              The  file  containing the firmware chain used to boot and flash the device.  This option and argument are required
    -              when booting or flashing a device but may appear anywhere on the  command  line.   Invalid  image  files  will  be
    -              rejected.  No assumptions are made about this file based on filename and no filename conventions are enforced.
    -
    -       -P filename
    -              The  file  containing the firmware chain used to boot and flash the device.  This option and argument are required
    -              when booting or flashing a device but may appear anywhere on the  command  line.   Invalid  image  files  will  be
    -              rejected.  No assumptions are made about this file based on filename and no filename conventions are enforced.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -S filename
    -              The  file containing the softloader chain used to flash the device.  On prior versions of plcboot, the presence of
    -              this option indicated that flash memory should be programmed but that is no longer the case.  You must now specify
    -              bot this option and option -F in order to program flash memory.  This option and argument are required when flash‐
    -              ing a device but may appear anywhere on the command line.  Invalid image files will be rejected.   No  assumptions
    -              are made about this file based on filename and no filename conventions are enforced.
    -
    -       -t milliseconds
    -              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The Ethernet hardware address of some powerline device.  More than one address may be  specified  on  the  command
    -              line.   If  more  than one address is specified then operations are performed on each device in turn.  The default
    -              address is local.  as explained in the DEVICES section.
    -
    -DEVICES
    -       Powerline device addresses are 12 hexadecimal digits in upper, lower or mixed case.  Individual octets may  be  separated
    -       by   colons,   for  clarity,  but  colons  are  not  required.   For  example,  "00b052000001",  "00:b0:52:00:00:01"  and
    -       "00b052:000001" are valid and equivalent.
    -
    -       A local device is any Atheros Powerline Device connected directly to a host Ethernet interface.  A remote device  is  any
    -       Atheros Powerline Device at the far end of a powerline connection.  A foreign device is any powerline device not manufac‐
    -       tured by Atheros.
    -
    -       Common device addresses have symbolic names that can be used in place of the actual address value.   The  following  sym‐
    -       bolic addresses are recognized by this program and most other toolkit programs.
    -
    -       all    Equivalent to "broadcast", described next.
    -
    -       broadcast
    -              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
    -              will respond to this address.
    -
    -       local  A synonym for the Qualcomm Atheros Local Management Address (LMA), 00:B0:52:00:00:01.  All local  Atheros  devices
    -              will respond to this address but remote and foreign devices will not.
    -
    -REFERENCES
    -       See  the  Qualcomm  Atheros  HomePlug AV Firmware Technical Reference Manual for technical information.  See the Qualcomm
    -       Atheros Powerline Toolkit Online Documetation for practical information and examples.
    -
    -EXAMPLES
    -       This example boots a powerline device by downloading runtime parameters and firmware then  starting  firmware  execution.
    -       The  actual boot method used will depend on the file formats and powerline device type detected by the program.  The out‐
    -       put shown here is typical for panther and lynx chipsets.  Option -P and -N are required but their order is not important.
    -       Tne  MAC address may be omitted beccause it will default to 00:B0:52:00:00:01 which is also the default bootloader device
    -       address.  On completion, runtime firmware is executing in SDRAM but flash memory has not been programmed.  If This opera‐
    -       tion is common for flash-less devices.  If we reset the device at this point then it will return to bootloader mode.
    -
    -          # plcboot -P AR7420.pib -N AR7400.nvm
    -          eth1 00:B0:52:00:00:01 BootLoader is running
    -          eth1 00:B0:52:00:00:01 Write AR7420.nvm (1) (0x00000040:6212)
    -          eth1 00:B0:52:00:00:01 Start AR7420.nvm (1) (0x000000C0)
    -          eth1 00:B0:52:00:00:01 Write AR7420.pib (1) (0x00200000:10904)
    -          eth1 00:B0:52:00:00:01 Write AR7420.nvm (5) (0x002B610C:281252)
    -          eth1 00:B0:52:00:00:01 Start AR7420.nvm (5) (0x002B64FC)
    -          eth1 00:B0:52:BA:BE:88 MAC-QCA7420ES-0.9.0.278-0-20110914-INTERNAL is running
    -
    -       The  next  example  boots  a  device,  as  before, then flashes the same parameters and firmware into non-volatile memory
    -       attached to the device.  Observe that a softloader is required and will be written to flash memory before runtime parame‐
    -       ters  and firmware.  The softloader need only be written once when first programming a blank flash memory.  Option -FF is
    -       optional but permitted for backward compatibility with programs ampboot and int6kboot.
    -
    -          # plcboot -P AR7420.pib -N AR7400.nvm -S AR7420-softloader.nvm -FF
    -          eth1 00:B0:52:00:00:01 Write AR7420.nvm (1) (00000040:6212)
    -          eth1 00:B0:52:00:00:01 Start AR7420.nvm (1) (000000C0)
    -          eth1 00:B0:52:00:00:01 Write AR7420.pib (1) (00200000:11692)
    -          eth1 00:B0:52:00:00:01 Write AR7420.nvm (5) (002B6A4C:282444)
    -          eth1 00:B0:52:00:00:01 Start AR7420.nvm (5) (002B6E3C)
    -          eth1 00:B0:52:00:00:06 MAC-QCA7420ES-1.0.0.280-00-20110923-ALPHA is running
    -          eth1 00:B0:52:00:00:06 Start Session
    -          eth1 00:B0:52:00:00:06 Flash AR7420-softloader.nvm
    -          eth1 00:B0:52:00:00:06 Close Session
    -          eth1 00:B0:52:00:00:06 Start Session
    -          eth1 00:B0:52:00:00:06 Flash AR7420.pib
    -          eth1 00:B0:52:00:00:06 Flash AR7420.nvm
    -          eth1 00:B0:52:00:00:06 Close Session
    -
    -DISCLAIMER
    -       Qualcomm Atheros firmware file structure and content is proprietary to Qualcomm Atheros,  Ocala  FL  USA.   Consequently,
    -       public information is not available.  Qualcomm Atheros reserves the right to change firmware file structure or content or
    -       change the name or behavior of any program that inspects or changes firmware files, in future software  releases  without
    -       any  obligation  to notify or compensate users of such programs.  Qualcomm Atheros HomePlug AV Vendor Specific Management
    -       Message structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information may not
    -       be  available.   Aualcomm  Atheros reserves the right to modify message structure and content in future firmware releases
    -       without any obligation to notify or compensate users of this program.
    -
    -SEE ALSO
    -       ampboot(1), amptool(1), chknvm(1), chkpib(1), int6kboot(1), modpib(1), plctool(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plcboot(1)
    -
    - - - diff --git a/docbook/plcboot.c.html b/docbook/plcboot.c.html deleted file mode 100644 index 9b2b475f..00000000 --- a/docbook/plcboot.c.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - plcboot.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plcboot.c -
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <limits.h>
    -#include <fcntl.h>
    -#include <ctype.h>
    -#include <sys/stat.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/symbol.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../plc/plc.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../mme/mme.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/BootDevice2.c"
    -#include "../plc/BootFirmware2.c"
    -#include "../plc/BootParameters2.c"
    -#include "../plc/chipset.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Devices.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/FlashDevice2.c"
    -#include "../plc/FlashNVM.c"
    -#include "../plc/FlashSoftloader.c"
    -#include "../plc/FlashParameters.c"
    -#include "../plc/FlashFirmware.c"
    -#include "../plc/InitDevice2.c"
    -#include "../plc/ModuleCommit.c"
    -#include "../plc/ModuleSession.c"
    -#include "../plc/ModuleSpec.c"
    -#include "../plc/ModuleWrite.c"
    -#include "../plc/NVMSelect.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/Request.c"
    -#include "../plc/ResetDevice.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/WaitForReset.c"
    -#include "../plc/WaitForStart.c"
    -#include "../plc/WriteExecuteApplet2.c"
    -#include "../plc/WriteExecuteFirmware2.c"
    -#include "../plc/WriteExecuteParameters2.c"
    -#include "../plc/WriteFirmware2.c"
    -#include "../plc/WriteMEM.c"
    -#include "../plc/WriteNVM.c"
    -#include "../plc/WritePIB.c"
    -#include "../plc/WriteParameters2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/basespec.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/error.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/todigit.c"
    -#include "../tools/typename.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/version.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/channel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/openchannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/keys.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"eFi:N:p:P:qS:t:vx",
    -		"-N file -P file [device] [device] [...]",
    -		"Qualcomm Atheros Panther/Lynx Powerline Device Bootstrapper",
    -		"e\tredirect stderr to stdout",
    -		"F[F]\tFlash [Force] non-volatile memory after boot",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"N f\tfirmware file is (f)",
    -		"P f\tparameter file is (f)",
    -		"q\tquiet mode",
    -		"S f\tsoftloader file is (f)",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	char firmware [PLC_VERSION_STRING];
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'F':
    -			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
    -			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -			{
    -				_setbits (plc.module, VS_MODULE_FORCE);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'N':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.NVM.name);
    -			}
    -			if (nvmfile2 (&plc.NVM))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_MAC);
    -			break;
    -		case 'P':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.PIB.name);
    -			}
    -			if (pibfile2 (&plc.PIB))
    -			{
    -				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_PIB);
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'S':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.CFG.file = open (plc.CFG.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.CFG.name);
    -			}
    -			if (nvmfile2 (&plc.CFG))
    -			{
    -				error (1, errno, "Bad softloader file: %s", plc.CFG.name);
    -			}
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (WaitForStart (&plc, firmware, sizeof (firmware)))
    -	{
    -		Failure (&plc, PLC_NODETECT);
    -		exit (1);
    -	}
    -	if (strcmp (firmware, "BootLoader"))
    -	{
    -		Failure (&plc, "Bootloader must be running");
    -		exit (1);
    -	}
    -	if (plc.hardwareID < CHIPSET_INT6400)
    -	{
    -		Failure (&plc, "Device must be %s or later; Use program int6kboot or ampboot instead.", chipsetname (CHIPSET_INT6400));
    -		exit (1);
    -	}
    -	if (plc.PIB.file == -1)
    -	{
    -		error (1, ECANCELED, "No Parameter file named");
    -	}
    -	if (plc.NVM.file == -1)
    -	{
    -		error (1, ECANCELED, "No Firmware file named");
    -	}
    -	if (plc.CFG.file == -1)
    -	{
    -		if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -		{
    -			error (1, ECANCELED, "No Softloader file named");
    -		}
    -	}
    -	if (!InitDevice2 (&plc))
    -	{
    -		if (!BootDevice2 (&plc))
    -		{
    -			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -			{
    -				FlashDevice2 (& plc, (PLC_COMMIT_FORCE | PLC_COMMIT_NORESET | PLC_COMMIT_FACTPIB));
    -			}
    -		}
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcdevs.1.html b/docbook/plcdevs.1.html deleted file mode 100644 index f17e23b6..00000000 --- a/docbook/plcdevs.1.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - plcdevs.1 - - - - - - - - - -
    -plcdevs(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plcdevs(1)
    -
    -NAME
    -       plcdevs - Qualcomm Atheros Powerline Device Enumerator
    -
    -SYNOPSIS
    -       plcdevs [options]
    -
    -DESCRIPTION
    -       Search  host  Ethernet  interfaces  for local Atheros powerline devices.  This program is useful on host computers having
    -       multiple interface cards and powerline device are connected to only one or two of them.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Intellon Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       None.
    -
    -EXAMPLES
    -       The  following  example searches host Ethernet interfaces for powerline devices.  We can see that there are three network
    -       interfaces present but interface eth3 is the only one having a local powerline device connected.
    -
    -          # plcdevs
    -          eth2 00:0f:EA:4b:98:CA 010.234.095.003
    -          eth3 00:0F:EA:4B:98:CB 010.234.094.099 AR7400 INT7400-MAC-Test mac-release 2011/02/09 14:59:43 OCAFAE01494
    -          eth4 00:50:04:A5:D8:98 192.168.099.001
    -
    -SEE ALSO
    -       plc(1), ifs(1), plcnets(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plcdevs(1)
    -
    - - - diff --git a/docbook/plcdevs.c.html b/docbook/plcdevs.c.html deleted file mode 100644 index 3f3b25f3..00000000 --- a/docbook/plcdevs.c.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - plcdevs.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plcdevs.c -
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <limits.h>
    -#include <memory.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../ether/channel.h"
    -#include "../ether/ether.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/decdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/decstring.c"
    -#include "../tools/typename.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/hostnics.c"
    -#include "../ether/openchannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/Platform.c"
    -#include "../plc/chipset.c"
    -#include "../plc/Devices.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   void enumerate ();
    - *
    - *   enumerate host interfaces on stdout;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void enumerate (struct channel * channel, struct nic nic [], unsigned size)
    -
    -{
    -	extern const byte localcast [ETHER_ADDR_LEN];
    -	for (; size--; nic++)
    -	{
    -		byte memory [ETHER_ADDR_LEN];
    -		char string [ETHER_ADDR_LEN * 3];
    -		memset (memory, 0x00, sizeof (memory));
    -		if (!memcmp (memory, nic->ethernet, sizeof (memory)))
    -		{
    -			continue;
    -		}
    -		memset (memory, 0xFF, sizeof (memory));
    -		if (!memcmp (memory, nic->ethernet, sizeof (memory)))
    -		{
    -			continue;
    -		}
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		printf (" %d", nic->ifindex);
    -
    -#elif defined (__linux__) || defined (__OpenBSD__) || defined (__APPLE__)
    -
    -		printf (" %s", nic->ifname);
    -
    -#else
    -#error "Unknown environment"
    -#endif
    -
    -		printf (" %s", hexstring (string, sizeof (string), nic->ethernet, sizeof (nic->ethernet)));
    -		printf (" %s", decstring (string, sizeof (string), nic->internet, sizeof (nic->internet)));
    -
    -#if 0
    -
    -		printf (" %s", nic->ifname);
    -		printf (" %s", nic->ifdesc);
    -
    -#endif
    -
    -		channel->ifname = nic->ifname;
    -		openchannel (channel);
    -		Platform (channel, localcast);
    -		closechannel (channel);
    -		printf ("\n");
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"qt:v",
    -		PUTOPTV_S_DIVINE,
    -		"Atheros Ethernet Interface Enumerator",
    -		(char const *) (0)
    -	};
    -	struct nic nics [16];
    -	unsigned size = hostnics (nics, sizeof (nics) / sizeof (struct nic));
    -	signed c;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -	enumerate (&channel, nics, size);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcfwd.1.html b/docbook/plcfwd.1.html deleted file mode 100644 index c5494684..00000000 --- a/docbook/plcfwd.1.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - plcfwd.1 - - - - - - - - - -
    -plcfwd(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   plcfwd(1)
    -
    -NAME
    -       plcfwd - Qualcomm Atheros Forward Configuration
    -
    -SYNOPSIS
    -       plcfwd [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       Set  VLAN  and MAC address lookup for tx path traffic.  Setup requests are processed by master PLC device attached to the
    -       local device.  Upon receiving the request MME, the PLC device will send a confirm MME back with the results to the origi‐
    -       nating host.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -A     Add VLANIDs of multiple slaves to memory.
    -
    -       -C     Commit configruation to flash memory.
    -
    -       -D VLANID
    -              Set the default VLAN ID expressed as a 32-bit decimal value.
    -
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -f filename
    -              Read  additional device addresses and VLAN IDs from the named file.  This option may appear multiple times and may
    -              appear in addition option -z.  Each occurance of this option adds one or more entries to the VLANID table used  by
    -              options -A or -R.  The format used on each line of this file is identical to that used by option -z.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -l length
    -              The read data length in bytes.  This option is ignored during other operations.  The length is expressed in  deci‐
    -              mal.  The default is 0 bytes.
    -
    -       -M state
    -              Enable  or  disable VLANID forwarding on the master.  Valid states are 0 to disable and 1 but values up to 255 are
    -              permitted.  Keywords "on" and "enable" are the same as 1.  Keywords "off" and "disable" are the same as 0.
    -
    -       -o offset
    -              The read data offset in bytes.  This option is ignored during other operations.  The offset is expressed in  hexa‐
    -              decimal.  The default is 0 bytes;
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -R     Remove VLANIDs of multiple slaves from memory.
    -
    -       -S state
    -              Enable  or  disable VLANID forwarding on all slaves.  Valid states are 0 to disable and 1 but values up to 255 are
    -              permitted.  Keywords "on" and "enable" are the same as 1.  Keywords "off" and "disable" are the same as 0.
    -
    -       -t timeout
    -
    -       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
    -
    -       -z address,id[,id[,...]]
    -              A device address and associated VLAN IDs separated by commas.  This option  may  appear  multiple  times  and  may
    -              appear in addition option -f.  Each occurance of this option adds one entry to the VLANID table used by options -A
    -              or -R.  The string format used here is identical to that used on each line of input files named by option -f.
    -
    -       -?,--help
    -              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
    -              line except version information.
    -
    -       -!,--version
    -              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       device The MAC address of some powerline device.  More than one address may be specified.  If more than  one  address  is
    -              specified  then  operations  are performed on each device in turn.  The default address is local.  See DEVICES for
    -              information about symbolic device addresses.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
    -              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
    -              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       The following example reads 100 bytes starting at offset 0x24.  The operation is  read  because  no  other  operation  is
    -       specifed using -A, -C, -R, -M or -S.  The offset is always in hexadecimal and length is always in decimal.
    -
    -          # plcfwd -o 24 -l 100
    -
    -       The following example adds three VLAN IDs to the VLANID table on  device 00:B0:52:CA:FE:08.  Option -z creates the VLANID
    -       table and option -A adds table content to the device.  This program supports up to 10 VLAN IDs per entry but PLC firmware
    -       supports 8 maximum.
    -
    -          # plcfwd -A -z 00:B0:52:CA:FE:08,2300,2313,2415
    -
    -       The  following  example  does the same thing but adds three table entries.  The first entry is enclosed in quotes because
    -       spaces appear in the entry.  The third entry has more than 10 VLAN IDs.  The program will discard  the  last  ID  without
    -       indication but PLC firmware should report an error because there are more than 8 IDs reported in the request message.
    -
    -          #     plcfwd     -A     -z     "00:B0:52:CA:FE:08,     2300,     2313     ,     2415"    -z    00B052BABE01,0100    -z
    -       00B052888888,100,200,300,400,500,600,700,800,900,1000,1100
    -
    -       To avoid typing the above command line many times, you can save the entries in file plcfwd.txt, like so ...
    -
    -          00:B0:52:CA:FE:08, 2300, 2313 , 2415
    -          00B052BABE01,0100
    -          00B052888888,100,200,300,400,500,600,700,800,900,1000,1100
    -
    -       The next example adds these entries to the VLANID table by naming the file that contains the entries using option -f.
    -
    -          # plcfwd -A -f plcfwd.txt
    -
    -       The next example removes the same entries to the VLANID table.
    -
    -          # plcfwd -R -f plcfwd.txt
    -
    -       Of course, you can combine options -z and -f to cumulative effect.
    -
    -SEE ALSO
    -       PLC(1),
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   plcfwd(1)
    -
    - - - diff --git a/docbook/plcfwd.c.html b/docbook/plcfwd.c.html deleted file mode 100644 index 2f388fdd..00000000 --- a/docbook/plcfwd.c.html +++ /dev/null @@ -1,1137 +0,0 @@ - - - - - - plcfwd.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plcfwd.c - Atheros PLC Forward Configuration Manager;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -#include <ctype.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/Devices.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/basespec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexview.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexout.c"
    -#include "../tools/todigit.c"
    -#include "../tools/synonym.c"
    -#include "../tools/binout.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCFWD_VERBOSE (1 << 0)
    -#define PLCFWD_SILENCE (1 << 1)
    -
    -#define PLCFWD_LENGTH 0
    -#define PLCFWD_OFFSET 0
    -
    -#define PLCFWD_GET 0
    -#define PLCFWD_ADD 1
    -#define PLCFWD_REM 2
    -#define PLCFWD_STO 3
    -#define PLCFWD_CTL 4
    -#define PLCFWD_SET 5
    -#define PLCFWD_FWD 6
    -#define PLCFWD_VER 0
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -/*
    - *   this structure is only used in the VS_FORWARD_CONFIG message but
    - *   it is common to several variations of the message and is used in
    - *   arrays;
    - */
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct item
    -
    -{
    -	uint8_t MAC_ADDR [ETHER_ADDR_LEN];
    -	uint16_t NUM_VLANIDS;
    -	uint16_t VLANID [10];
    -}
    -
    -item;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*
    - *   synonym table for options -M and -S;
    - */
    -
    -#define STATES (sizeof (states) / sizeof (struct _term_))
    -
    -static const struct _term_ states [] =
    -
    -{
    -	{
    -		"disable",
    -		"0"
    -	},
    -	{
    -		"enable",
    -		"1"
    -	},
    -	{
    -		"off",
    -		"0"
    -	},
    -	{
    -		"on",
    -		"1"
    -	}
    -};
    -
    -/*====================================================================*
    - *
    - *   void readitem (struct item * item, char const * string);
    - *
    - *   encode a slave structure with infomation specified by a string
    - *   specification has the following production:
    - *
    - *   <spec> := <mac_addr>
    - *   <spec> := <spec>,<vlan_id>
    - *
    - *   basically, encode slave->MAC_ADDR then encode slave->VLANID[]
    - *   with hexadecimal VLANID values; we allow 10 VLANID values but
    - *   only 8 are legal;
    - *
    - *   the idea is to read multiple input strings and call this function
    - *   to initialize one or more slave structures; it is possible to fit
    - *   up to 128 slave structures in one message frame;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void readitem (struct item * item, char const * string)
    -
    -{
    -	register uint8_t * origin = (uint8_t *)(item->MAC_ADDR);
    -	register uint8_t * offset = (uint8_t *)(item->MAC_ADDR);
    -	size_t extent = sizeof (item->MAC_ADDR);
    -	memset (item, 0, sizeof (* item));
    -	while ((extent) && (*string))
    -	{
    -		unsigned radix = RADIX_HEX;
    -		unsigned field = sizeof (uint8_t) + sizeof (uint8_t);
    -		unsigned value = 0;
    -		unsigned digit = 0;
    -		if ((offset != origin) && (*string == HEX_EXTENDER))
    -		{
    -			string++;
    -		}
    -		while (field--)
    -		{
    -			if ((digit = todigit (*string)) < radix)
    -			{
    -				value *= radix;
    -				value += digit;
    -				string++;
    -				continue;
    -			}
    -			error (1, EINVAL, "bad MAC address: ...[%s] (1)", string);
    -		}
    -		*offset = value;
    -		offset++;
    -		extent--;
    -	}
    -	if (extent)
    -	{
    -		error (1, EINVAL, "bad MAC address: ...[%s] (2)", string);
    -	}
    -	while (isspace (*string))
    -	{
    -		string++;
    -	}
    -	if ((*string) && (*string != ','))
    -	{
    -		error (1, EINVAL, "bad MAC address: ...[%s] (3)", string);
    -	}
    -	while (*string == ',')
    -	{
    -		unsigned radix = RADIX_DEC;
    -		unsigned digit = 0;
    -		unsigned value = 0;
    -		do
    -		{
    -			string++;
    -		}
    -		while (isspace (*string));
    -		while ((digit = todigit (*string)) < radix)
    -		{
    -			value *= radix;
    -			value += digit;
    -			string++;
    -		}
    -		while (isspace (*string))
    -		{
    -			string++;
    -		}
    -		if (item->NUM_VLANIDS < (sizeof (item->VLANID) / sizeof (uint16_t)))
    -		{
    -			item->VLANID [item->NUM_VLANIDS++] = value;
    -		}
    -	}
    -	while (isspace (*string))
    -	{
    -		string++;
    -	}
    -	if (*string)
    -	{
    -		error (1, EINVAL, "bad VLAN ID: ...[%s]", string);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   unsigned readlist (struct item list [], unsigned size);
    - *
    - *   read one or more items from stdin; discard comments; assume one
    - *   item per line; permit multiple items on one line when separated
    - *   by semicolon; items cannot straddle lines; readitem () controls
    - *   what consitutes one item;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static unsigned readlist (struct item list [], unsigned size)
    -
    -{
    -	struct item * item = list;
    -	char string [1024];
    -	char * sp = string;
    -	signed c;
    -	for (c = getc (stdin); c != EOF; c = getc (stdin))
    -	{
    -		if (isspace (c))
    -		{
    -			continue;
    -		}
    -		if (c == '#')
    -		{
    -			while ((c != '\n') && (c != EOF))
    -			{
    -				c = getc (stdin);
    -			}
    -			continue;
    -		}
    -		sp = string;
    -		while ((c != ';') && (c != '\n') && (c != EOF))
    -		{
    -			*sp++ = (char)(c);
    -			c = getc (stdin);
    -		}
    -		*sp = (char)(0);
    -		if (size)
    -		{
    -			readitem (item++, string);
    -			size--;
    -		}
    -	}
    -	return ((unsigned)(item - list));
    -}
    -
    -/*====================================================================*
    - *
    - *   void showlist (struct item list [], unsigned items)
    - *
    - *   print item list on stdout in a format suitable for input using
    - *   readlist (); this function may be commented out if it not used;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#if 0
    -
    -static void showlist (struct item list [], unsigned items)
    -
    -{
    -	while (items--)
    -	{
    -		uint16_t fields = list->NUM_VLANIDS;
    -		uint16_t * field = list->VLANID;
    -		hexout (list->MAC_ADDR, sizeof (list->MAC_ADDR), 0, 0, stdout);
    -		while (fields--)
    -		{
    -			printf (", %d", *field);
    -			field++;
    -		}
    -		printf ("\n");
    -		list++;
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -/*====================================================================*
    - *
    - *   signed ReadVLANIDs (struct plc * plc, uint32_t offset, uint32_t length);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed ReadVLANIDs (struct plc * plc, uint32_t offset, uint32_t length)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_forward_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t MREQUEST;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -		uint32_t DATA_LENGTH;
    -		uint32_t DATA_OFFSET;
    -		uint16_t RESERVED3;
    -	}
    -	* request = (struct vs_forward_config_request *) (message);
    -	struct __packed vs_forward_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t RESULTCODE;
    -		uint8_t OPERATION;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -		uint32_t DATA_LENGTH;
    -		uint32_t DATA_OFFSET;
    -		uint8_t DATA [PLC_MODULE_SIZE];
    -	}
    -	* confirm = (struct vs_forward_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_FORWARD_CONFIG | MMTYPE_REQ));
    -	request->MREQUEST = PLCFWD_GET;
    -	request->MVERSION = PLCFWD_VER;
    -	request->DATA_OFFSET = HTOLE32 (offset);
    -	request->DATA_LENGTH = HTOLE32 (length);
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_FORWARD_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->RESULTCODE)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -		hexview (confirm->DATA, LE32TOH (confirm->DATA_OFFSET), LE32TOH (confirm->DATA_LENGTH), stdout);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed AddVLANIDs (struct plc * plc, struct item list [], unsigned items);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed AddVLANIDs (struct plc * plc, struct item list [], unsigned items)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_forward_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t MREQUEST;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -		uint16_t ITEMS;
    -		struct item LIST [1];
    -	}
    -	* request = (struct vs_forward_config_request *) (message);
    -	struct __packed vs_forward_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t RESULTCODE;
    -		uint8_t OPERATION;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -	}
    -	* confirm = (struct vs_forward_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	struct item * item = request->LIST;
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_FORWARD_CONFIG | MMTYPE_REQ));
    -	request->MREQUEST = PLCFWD_ADD;
    -	request->MVERSION = PLCFWD_VER;
    -	request->ITEMS = HTOLE16 (items);
    -	while (items--)
    -	{
    -		unsigned count;
    -		memcpy (item->MAC_ADDR, list->MAC_ADDR, sizeof (item->MAC_ADDR));
    -		item->NUM_VLANIDS = HTOLE16 (list->NUM_VLANIDS);
    -		for (count = 0; count < list->NUM_VLANIDS; count++)
    -		{
    -			item->VLANID [count] = HTOLE16 (list->VLANID [count]);
    -		}
    -
    -// item++;
    -
    -		item = (struct item *)(&item->VLANID [count]);
    -		list++;
    -	}
    -	plc->packetsize = (signed)((uint8_t *)(item) - (uint8_t *)(request));
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_FORWARD_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->RESULTCODE)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed RemoveVLANIDs (struct plc * plc, struct item list [], unsigned items);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed RemoveVLANIDs (struct plc * plc, struct item list [], unsigned items)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_forward_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t MREQUEST;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -		uint16_t ITEMS;
    -		struct item LIST [1];
    -	}
    -	* request = (struct vs_forward_config_request *) (message);
    -	struct __packed vs_forward_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t RESULTCODE;
    -		uint8_t OPERATION;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -	}
    -	* confirm = (struct vs_forward_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	struct item * item = request->LIST;
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_FORWARD_CONFIG | MMTYPE_REQ));
    -	request->MREQUEST = PLCFWD_REM;
    -	request->MVERSION = PLCFWD_VER;
    -	request->ITEMS = HTOLE16 (items);
    -	while (items--)
    -	{
    -		unsigned count;
    -		memcpy (item->MAC_ADDR, list->MAC_ADDR, sizeof (item->MAC_ADDR));
    -		item->NUM_VLANIDS = HTOLE16 (list->NUM_VLANIDS);
    -		for (count = 0; count < list->NUM_VLANIDS; count++)
    -		{
    -			item->VLANID [count] = HTOLE16 (list->VLANID [count]);
    -		}
    -
    -// item++;
    -
    -		item = (struct item *)(&item->VLANID [count]);
    -		list++;
    -	}
    -	plc->packetsize = (signed)((uint8_t *)(item) - (uint8_t *)(request));
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_FORWARD_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->RESULTCODE)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed CommitVLANIDs (struct plc * plc);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed CommitVLANIDs (struct plc * plc)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_forward_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t MREQUEST;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -	}
    -	* request = (struct vs_forward_config_request *) (message);
    -	struct __packed vs_forward_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t RESULTCODE;
    -		uint8_t OPERATION;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -	}
    -	* confirm = (struct vs_forward_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_FORWARD_CONFIG | MMTYPE_REQ));
    -	request->MREQUEST = PLCFWD_STO;
    -	request->MVERSION = PLCFWD_VER;
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_FORWARD_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->RESULTCODE)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed ControlVLANIDs (struct plc * plc);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed ControlVLANIDs (struct plc * plc)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_forward_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t MREQUEST;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -		uint8_t ENABLE;
    -		uint8_t UPSTREAMCHECK;
    -		uint8_t RESERVED3;
    -	}
    -	* request = (struct vs_forward_config_request *) (message);
    -	struct __packed vs_forward_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t RESULTCODE;
    -		uint8_t OPERATION;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -	}
    -	* confirm = (struct vs_forward_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_FORWARD_CONFIG | MMTYPE_REQ));
    -	request->MREQUEST = PLCFWD_CTL;
    -	request->MVERSION = PLCFWD_VER;
    -	request->ENABLE = plc->module;
    -	request->UPSTREAMCHECK = plc->pushbutton;
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_FORWARD_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->RESULTCODE)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed DefaultVLANIDs (struct plc * plc);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed DefaultVLANIDs (struct plc * plc, struct item list [], unsigned items)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_forward_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t MREQUEST;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -		uint16_t VLANID;
    -		uint16_t RESERVED3;
    -	}
    -	* request = (struct vs_forward_config_request *) (message);
    -	struct __packed vs_forward_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t RESULTCODE;
    -		uint8_t OPERATION;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -	}
    -	* confirm = (struct vs_forward_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_FORWARD_CONFIG | MMTYPE_REQ));
    -	request->MREQUEST = PLCFWD_SET;
    -	request->MVERSION = PLCFWD_VER;
    -	request->VLANID = HTOLE16 (list [0].VLANID [0]);
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_FORWARD_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->RESULTCODE)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed ForwardVLANIDs (struct plc * plc);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed ForwardVLANIDs (struct plc * plc)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_forward_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t MREQUEST;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -		uint8_t ENABLED;
    -		uint16_t VLANID;
    -		uint16_t RESERVED3;
    -		struct item ITEM;
    -	}
    -	* request = (struct vs_forward_config_request *) (message);
    -	struct __packed vs_forward_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t RESERVED1;
    -		uint8_t RESULTCODE;
    -		uint8_t OPERATION;
    -		uint8_t MVERSION;
    -		uint32_t RESERVED2;
    -	}
    -	* confirm = (struct vs_forward_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_FORWARD_CONFIG | MMTYPE_REQ));
    -	request->MREQUEST = PLCFWD_FWD;
    -	request->MVERSION = PLCFWD_VER;
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_FORWARD_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->RESULTCODE)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   void function (struct plc * plc, struct item list [], unsigned items);
    - *
    - *   perform the VLANID action specified by the action member
    - *   in struct plc as set in the main program; only one action
    - *   is performed;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (struct plc * plc, uint32_t offset, uint32_t length, struct item * list, unsigned items)
    -
    -{
    -	if (plc->action == PLCFWD_GET)
    -	{
    -		ReadVLANIDs (plc, offset, length);
    -		return;
    -	}
    -	if (plc->action == PLCFWD_ADD)
    -	{
    -		AddVLANIDs (plc, list, items);
    -		return;
    -	}
    -	if (plc->action == PLCFWD_REM)
    -	{
    -		RemoveVLANIDs (plc, list, items);
    -		return;
    -	}
    -	if (plc->action == PLCFWD_STO)
    -	{
    -		CommitVLANIDs (plc);
    -		return;
    -	}
    -	if (plc->action == PLCFWD_CTL)
    -	{
    -		ControlVLANIDs (plc);
    -		return;
    -	}
    -	if (plc->action == PLCFWD_SET)
    -	{
    -		DefaultVLANIDs (plc, list, items);
    -		return;
    -	}
    -	if (plc->action == PLCFWD_FWD)
    -	{
    -		ForwardVLANIDs (plc);
    -		return;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"ACD:ef:i:l:M:o:qRS:t:vxz:",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros VLANID Forward Configuration Manager",
    -		"A\tadd VLAN ID of multiple slaves to memory",
    -		"C\tcommit configuration to flash memory",
    -		"D x\tset default VLAN ID",
    -		"e\tredirect stderr to stdout",
    -		"f s\tread VLANIDS from file (s)",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"l n\tdata length in bytes [" LITERAL (PLCFWD_LENGTH) "]",
    -		"M n\tenable VLANID forwarding on the master",
    -		"o x\tdata offset in bytes [" LITERAL (PLCFWD_OFFSET) "]",
    -		"q\tquiet mode",
    -		"R\tremove VLAN ID of multiple slaves from memory",
    -		"S n\tenable VLANID forwarding on all slaves",
    -		"t n\ttimeout is (n) millisecond [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"x\texit on error",
    -		"z s\tslavespec",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	struct item list [128];
    -	unsigned size = sizeof (list) / sizeof (struct item);
    -	unsigned items = 0;
    -	uint32_t offset = 0;
    -	uint32_t length = 0;
    -	signed c;
    -	memset (&list, 0, sizeof (list));
    -	if (getenv (PLCDEVICE))
    -	{
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'A':
    -			plc.action = PLCFWD_ADD;
    -			break;
    -		case 'C':
    -			plc.action = PLCFWD_STO;
    -			break;
    -		case 'D':
    -			plc.action = PLCFWD_SET;
    -			list [0].VLANID [0] = (uint16_t)(basespec (optarg, 10, sizeof (uint16_t)));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'f':
    -			if (!freopen (optarg, "rb", stdin))
    -			{
    -				error (1, errno, "%s", optarg);
    -			}
    -			items += readlist (&list [items], size - items);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'M':
    -			plc.action = PLCFWD_CTL;
    -			plc.module = (uint8_t)(uintspec (synonym (optarg, states, STATES), 0, UCHAR_MAX));
    -			break;
    -		case 'l':
    -			length = (uint32_t) (basespec (optarg, 10, sizeof (length)));
    -			break;
    -		case 'o':
    -			offset = (uint32_t) (basespec (optarg, 10, sizeof (offset)));
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'R':
    -			plc.action = PLCFWD_REM;
    -			break;
    -		case 'S':
    -			plc.action = PLCFWD_CTL;
    -			plc.pushbutton = (uint8_t)(uintspec (synonym (optarg, states, STATES), 0, UCHAR_MAX));
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		case 'z':
    -			readitem (&list [items++], optarg);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -
    -#if 0
    -
    -	showlist (list, items);
    -
    -#endif
    -
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		function (&plc, offset, length, list, items);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		function (&plc, offset, length, list, items);
    -		argv++;
    -		argc--;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcget.1.html b/docbook/plcget.1.html deleted file mode 100644 index 435db19e..00000000 --- a/docbook/plcget.1.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - plcget.1 - - - - - - - - - -
    -plcget(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   plcget(1)
    -
    -NAME
    -       plcget - Qualcomm Atheros PLC Get Propery
    -
    -SYNOPSIS
    -       plcget [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       Read  a  specific  property value from a Qualcomm Atheros powerline device using the VS_GET_PROPERTY message.  Properties
    -       are selected using their numeric property identifier.  Property names are not supported.  Property values are printed  on
    -       stdout in hexadecimal format by default.  Alternate formats are ASCII, binary and decimal.
    -
    -       Only selected properties can be read using this message type.  See the Qualcomm Atheros Firmware Technical Reference Man‐
    -       ual for supported properties and versions.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -a     Display output in string format where each byte appears as an ASCII character.  Non-ASCII characters are displayed
    -              as a period or full-stop.  This option is useful for displaying HFID property values.
    -
    -       -b     Display output in binary format where each byte appears as 8 bits or binary digits.  This  option  is  useful  for
    -              interpreting bit-mapped property values.
    -
    -       -d     Display output in decimal format where each byte appears as three decimal digits.  This option is useful for prop‐
    -              erties with small integer values.
    -
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -h     Display  output in hexadecimal format where each byte appears as a hexadecimal octet consisting of two hexadecimal
    -              digits.  Hexadecimal is the default output format.
    -
    -       -n number
    -              The property identifier or property version.  Property identifiers and versions  are  entered  as  32-bit  decimal
    -              integers.  Property names are not supported.  The default is 0.  This option may appear more than once on the com‐
    -              mand line.  The first occurance specifies the property identifier.  The second occurances specifies  the  property
    -              version.  See the Firmware Technical Reference Manual for an list of valid property identifiers and versions.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this interface and only reponses received via this
    -              interface are recognized.  The default interface is eth1 because most people use eth0 as their  principle  network
    -              connection;  however,  if environment string "PLC" is defined then it takes precedence over the default interface.
    -              This option then takes precedence over either default.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
    -
    -       -?,--help
    -              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
    -              line except version information.
    -
    -       -!,--version
    -              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       device The MAC address of some powerline device.  More than one address may be specified.  If more than  one  address  is
    -              specified  then  operations  are performed on each device in turn.  The default address is local.  See DEVICES for
    -              information about symbolic device addresses.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
    -              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
    -              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       None.
    -
    -SEE ALSO
    -       plc(1), getpib(1), modpib(1), plcset(1), setpib(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   plcget(1)
    -
    - - - diff --git a/docbook/plcget.c.html b/docbook/plcget.c.html deleted file mode 100644 index 90d13a4f..00000000 --- a/docbook/plcget.c.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - plcget.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plcget.c -
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -#include "../ether/channel.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Devices.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/GetProperty.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/synonym.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/basespec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/binout.c"
    -#include "../tools/hexout.c"
    -#include "../tools/decout.c"
    -#include "../tools/chrout.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"abdehi:n:qs:t:v",
    -		"device [device] [...]",
    -		"Qualcomm Atheros PLC Get Property",
    -		"a\tdisplay property in ASCII",
    -		"b\tdisplay property in binary",
    -		"d\tdisplay property in decimal",
    -		"e\tredirect stderr to stdout",
    -		"h\tdisplay property in hexadecimal",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"n n\tproperty identifier or version is (n) [0]",
    -		"q\tquiet mode",
    -		"s x\tsession identifier is (x) [" LITERAL (PLCSESSION) "]",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	struct plcproperty plcproperty;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	memset (&plcproperty, 0, sizeof (plcproperty));
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'a':
    -			plcproperty.DATA_FORMAT = PLC_FORMAT_ASC;
    -			break;
    -		case 'b':
    -			plcproperty.DATA_FORMAT = PLC_FORMAT_BIN;
    -			break;
    -		case 'h':
    -			plcproperty.DATA_FORMAT = PLC_FORMAT_HEX;
    -			break;
    -		case 'd':
    -			plcproperty.DATA_FORMAT = PLC_FORMAT_DEC;
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'n':
    -			if (!plcproperty.PROP_NUMBER)
    -			{
    -				plcproperty.PROP_FORMAT = 1;
    -				plcproperty.PROP_LENGTH = sizeof (uint32_t);
    -				plcproperty.PROP_NUMBER = (uint32_t)(uintspec (optarg, 0, UINT_MAX));
    -			}
    -			else
    -			{
    -				plcproperty.PROP_VERSION = (uint32_t)(uintspec (optarg, 0, UINT_MAX));
    -			}
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 's':
    -			plc.cookie = (uint32_t)(basespec (optarg, 16, sizeof (plc.cookie)));
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		GetProperty (&plc, &plcproperty);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		GetProperty (&plc, &plcproperty);
    -		argc--;
    -		argv++;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plchost.1.html b/docbook/plchost.1.html deleted file mode 100644 index faa5727f..00000000 --- a/docbook/plchost.1.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - plchost.1 - - - - - - - - - -
    -plchost(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plchost(1)
    -
    -NAME
    -       plchost - Qualcomm Atheros Powerline Device Host Emulator
    -
    -SYNOPSIS
    -       plchost [options] -N file -P file
    -
    -DESCRIPTION
    -       Wait  for VS_HST_ACTION.IND messages from a local device and service them as described in the QCA Firmware Technical Ref‐
    -       erence Manual.  This program can be used to demonstrate or verify proper powerline device/host interaction for flash-less
    -       devices.   This implementation is not production grade and will stop dead - like a bug! - when things go wrong.  Consider
    -       using the Qualcomm Atheros Embedded API for real-time, production-grade applications.
    -
    -       Host emulation applies to flash-less device designs where a local host processor provides the  persistent  storage.   The
    -       local  host  can provide a wide range of intelligent storage functions for a device but this program offers one.  Options
    -       -N and -P name existing files that store the factory default runtime firmware and parameters, respectively.   Options  -n
    -       and  -p  name scratch files that will store user firmware and parameters, respectively.  This is similiar to the standard
    -       Atheros NVRAM scheme but is not the same.
    -
    -       To use the program, connect a flash-less device to the host via ethernet then start this program with the  correct  file‐
    -       names.   The  program  will  automatically  respond  to device requests to download memory configuration, firmware and/or
    -       parameters and upload firmware or and/or parameters under device control.  See the Qualcomm  Atheros  Firmware  Technical
    -       Reference Manual for more information.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -F[F]  Flash NVRAM once downloaded firmware has started.   The  same  firmware  and  PIB  are  downloaded,  again,  using
    -              VS_WR_MOD  and  written  to  NVRAM using VS_MOD_NVM.  Adding a second F here or another -F anywhere on the command
    -              line will perform a forced flash.  When no NVRAM is present, normal and force flash cause the device to upload  to
    -              the  host.  When blank or corrupted NVRAM is present, forced flash writes to NVRAM.  This operation will fail when
    -              no NVRAM is present.
    -
    -       -i interface
    -              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
    -              interface.  This option then takes precedence over either default.
    -
    -       -N filename
    -              Use  this  fIle to download firmware when requested by the local device.  The file must exist and have a valid NVM
    -              file format or it will be rejected.  No assumptions are made based on filename and  no  filename  conventions  are
    -              enforced.  The program will not over-write this file.  This option and argument are required.
    -
    -       -n filename
    -              Use  this  file to store firmware uploaded from the local device.  The file need not exist but an error will occur
    -              if it cannot be created or written.  If firmware is uploaded to this file, it  is  used  for  subsequent  firmware
    -              downloads  unless  the  device  requests  a factory reset.  In that case, the file specified by option -N is used.
    -              This option and argument are optional.  If omitted then the default filename user.pib will be used.
    -
    -       -P filename
    -              Use this file to download parameters when requested by the local device.  The file must exist and have a valid PIB
    -              file  format  or  it  will be rejected.  No assumptions are made based on filename and no filename conventions are
    -              enforced.  The program will not over-write this file.  This option and argument are required.
    -
    -       -p filename
    -              Use this file to store parameters uploaded from the local device.  The file need not exist but an error will occur
    -              if  it cannot be created or written.  Once parameters are uploaded to this file, it is used for subsequent parame‐
    -              ter downloads unless the device requests a factory reset.  In that case, the file specified by option -P is  used.
    -              This option and argument are optional.  If omitted then the default filename user.nvm will be used.
    -
    -       -q     Suppress status messages on stderr.
    -
    -       -Sfilename
    -              Use this file to download the softloader when requested by the local device.  The file must exist and have a valid
    -              NVM file format or it will be rejected.  No assumptions are made based on filename and no filename conventions are
    -              enforced.  The program will not over-write this file.  This option and argument are required.
    -
    -       -t milliseconds
    -              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -v     Print additional information on stdout.  In particular, this option will  print  incoming  and  outgoing  Ethernet
    -              frames on stdout.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       None.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -EXAMPLES
    -       The  following  command  starts the host emulator.  The -N and -P options are always required.  Their order is not impor‐
    -       tant.
    -
    -          # plchost -N test.nvm -P test.pib -n temp.nvm -p temp.pib
    -          eth1 00:B0:52:00:00:01 Waiting for Host Action Requests
    -
    -          eth1 00:B0:52:00:00:01 Host Action Request is (4) configure memory.
    -          eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
    -          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
    -          eth1 00:B0:52:00:00:01 Started BootLoader
    -
    -          eth1 00:B0:52:00:00:01 Host Action Request is (0) initialize device.
    -          eth1 00:B0:52:00:00:01 Write Memory (00000040:15752)
    -          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
    -          eth1 00:B0:52:00:00:01 Started BootLoader
    -          eth1 00:B0:52:00:00:01 Write Memory (00204000:1013952)
    -          eth1 00:B0:52:00:00:01 Wrote mac-release-X.nvm
    -          eth1 00:B0:52:00:00:01 Write Memory (01F00000:11400)
    -          eth1 00:B0:52:00:00:01 Wrote AR7400-WallAdapter-HomePlugAV_NorthAmerica.pib
    -          eth1 00:B0:52:00:00:03 Started INT7400-MAC-0-0-1008-00-63-20100227-AUTO-D
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
    -       gram.
    -
    -SEE ALSO
    -       plc(1), ampboot(1), amptool(1),
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plchost(1)
    -
    - - - diff --git a/docbook/plchost.c.html b/docbook/plchost.c.html deleted file mode 100644 index 41495768..00000000 --- a/docbook/plchost.c.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - plchost.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plchost.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <string.h>
    -#include <ctype.h>
    -#include <memory.h>
    -#include <signal.h>
    -#include <errno.h>
    -#include <sys/socket.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../ether/channel.h"
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/BootDevice2.c"
    -#include "../plc/BootFirmware2.c"
    -#include "../plc/BootParameters2.c"
    -#include "../plc/chipset.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Devices.c"
    -#include "../plc/Failure.c"
    -#include "../plc/FlashDevice2.c"
    -#include "../plc/FlashSoftloader.c"
    -#include "../plc/FlashFirmware.c"
    -#include "../plc/FlashParameters.c"
    -#include "../plc/FlashNVM.c"
    -#include "../plc/HostActionResponse.c"
    -#include "../plc/InitDevice2.c"
    -#include "../plc/ModuleRead.c"
    -#include "../plc/ModuleSpec.c"
    -#include "../plc/ModuleSession.c"
    -#include "../plc/ModuleWrite.c"
    -#include "../plc/ModuleCommit.c"
    -#include "../plc/LocalDevices.c"
    -#include "../plc/NVMSelect.c"
    -#include "../plc/ReadFirmware2.c"
    -#include "../plc/ReadParameters2.c"
    -#include "../plc/Request.c"
    -#include "../plc/ResetDevice.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/WaitForReset.c"
    -#include "../plc/WaitForStart.c"
    -#include "../plc/WriteMEM.c"
    -#include "../plc/WriteNVM.c"
    -#include "../plc/WritePIB.c"
    -#include "../plc/WriteExecuteFirmware2.c"
    -#include "../plc/WriteExecuteParameters2.c"
    -#include "../plc/WriteExecuteApplet2.c"
    -#include "../plc/WriteFirmware2.c"
    -#include "../plc/PLCSelect.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/error.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#ifdef AR7x00
    -#include "../mme/QualcommHeader1.c"
    -#endif
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/keys.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile2.c"
    -#include "../pib/pibpeek2.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define NEWPIB "user.pib"
    -#define NEWNVM "user.nvm"
    -
    -/*====================================================================*
    - *
    - *   signed function (struct plc * plc);
    - *
    - *   wait indefinitely for VS_HOST_ACTION messages; service the device
    - *   only; it will stop dead - like a bug! - on error;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed function (struct plc * plc)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_host_action_ind
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MACTION;
    -		uint8_t MAJOR_VERSION;
    -		uint8_t MINOR_VERSION;
    -	}
    -	* indicate = (struct vs_host_action_ind *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	char firmware [PLC_VERSION_STRING];
    -	char const * FactoryNVM = plc->NVM.name;
    -	char const * FactoryPIB = plc->PIB.name;
    -	signed status;
    -	while (true)
    -	{
    -		status = ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND));
    -		if (status < 0)
    -		{
    -			break;
    -		}
    -		if (status > 0)
    -		{
    -			signed action = indicate->MACTION;
    -			memcpy (channel->peer, indicate->ethernet.OSA, sizeof (channel->peer));
    -			if (HostActionResponse (plc))
    -			{
    -				return (-1);
    -			}
    -			if (action == 0x00)
    -			{
    -				if (BootDevice2 (plc))
    -				{
    -					return (-1);
    -				}
    -				if (WaitForStart (plc, firmware, sizeof (firmware)))
    -				{
    -					return (-1);
    -				}
    -				if (_anyset (plc->flags, PLC_FLASH_DEVICE))
    -				{
    -					FlashDevice2 (plc, (PLC_COMMIT_FORCE | PLC_COMMIT_NORESET | PLC_COMMIT_FACTPIB));
    -				}
    -				continue;
    -			}
    -			if (action == 0x01)
    -			{
    -				close (plc->NVM.file);
    -				if (ReadFirmware2 (plc))
    -				{
    -					return (-1);
    -				}
    -				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
    -				{
    -					error (1, errno, "%s", plc->NVM.name);
    -				}
    -				continue;
    -			}
    -			if (action == 0x02)
    -			{
    -				close (plc->PIB.file);
    -				if (ReadParameters2 (plc))
    -				{
    -					return (-1);
    -				}
    -				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -				{
    -					error (1, errno, "%s", plc->PIB.name);
    -				}
    -				if (ResetDevice (plc))
    -				{
    -					return (-1);
    -				}
    -				continue;
    -			}
    -			if (action == 0x03)
    -			{
    -				close (plc->PIB.file);
    -				if (ReadParameters2 (plc))
    -				{
    -					return (-1);
    -				}
    -				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -				{
    -					error (1, errno, "%s", plc->PIB.name);
    -				}
    -				close (plc->NVM.file);
    -				if (ReadFirmware2 (plc))
    -				{
    -					return (-1);
    -				}
    -				if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
    -				{
    -					error (1, errno, "%s", plc->NVM.name);
    -				}
    -				if (ResetDevice (plc))
    -				{
    -					return (-1);
    -				}
    -				continue;
    -			}
    -			if (action == 0x04)
    -			{
    -				if (InitDevice2 (plc))
    -				{
    -					return (-1);
    -				}
    -				continue;
    -			}
    -			if (action == 0x05)
    -			{
    -				close (plc->NVM.file);
    -				if ((plc->NVM.file = open (plc->NVM.name = FactoryNVM, O_BINARY|O_RDONLY)) == -1)
    -				{
    -					error (1, errno, "%s", plc->NVM.name);
    -				}
    -				close (plc->PIB.file);
    -				if ((plc->PIB.file = open (plc->PIB.name = FactoryPIB, O_BINARY|O_RDONLY)) == -1)
    -				{
    -					error (1, errno, "%s", plc->PIB.name);
    -				}
    -				if (ResetDevice (plc))
    -				{
    -					return (-1);
    -				}
    -				continue;
    -			}
    -			if (action == 0x06)
    -			{
    -				close (plc->PIB.file);
    -				if (ReadParameters2 (plc))
    -				{
    -					return (-1);
    -				}
    -				if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -				{
    -					error (1, errno, "%s", plc->PIB.name);
    -				}
    -				continue;
    -			}
    -			error (0, ENOSYS, "Host Action 0x%02X", action);
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary when asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	extern void terminate (signo_t);
    -	static char const * optv [] =
    -	{
    -		"Fi:n:N:p:P:qS:t:vw:x",
    -		"-N file -P file [-S file]",
    -		"Qualcomm Atheros PLC Host Daemon",
    -		"F [F]\tflash [force] non-volatile memory",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"n f\tuser firmware file is (f)",
    -		"N f\tfirmware file is (f)",
    -		"p f\tuser parameter file is (f)",
    -		"P f\tparameter file is (f)",
    -		"q\tquiet mode",
    -		"S f\tsoftloader file is (f)",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"w n\twakeup every (n) seconds [" LITERAL (PLC_LONGTIME) "]",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	plc.timer = PLC_LONGTIME;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'd':
    -			_setbits (plc.flags, PLC_DAEMON);
    -			break;
    -		case 'F':
    -			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
    -			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -			{
    -				_setbits (plc.module, VS_MODULE_FORCE);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'N':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.NVM.name);
    -			}
    -			if (nvmfile2 (&plc.NVM))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_MAC);
    -			break;
    -		case 'n':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.nvm.name);
    -			}
    -			break;
    -		case 'P':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.PIB.name);
    -			}
    -			if (pibfile2 (&plc.PIB))
    -			{
    -				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_PIB);
    -			break;
    -		case 'p':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.pib.name);
    -			}
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'S':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.CFG.file = open (plc.CFG.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.CFG.name);
    -			}
    -			if (nvmfile2 (&plc.CFG))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.CFG.name);
    -			}
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'w':
    -			plc.timer = (unsigned)(uintspec (optarg, 1, 3600));
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -	if (plc.NVM.file == -1)
    -	{
    -		error (1, ECANCELED, "No host NVM file named");
    -	}
    -	if (plc.PIB.file == -1)
    -	{
    -		error (1, ECANCELED, "No host PIB file named");
    -	}
    -	if (plc.CFG.file == -1)
    -	{
    -		if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -		{
    -			error (1, ECANCELED, "No Softloader file named");
    -		}
    -	}
    -	if (plc.nvm.file == -1)
    -	{
    -		if ((plc.nvm.file = open (plc.nvm.name = NEWNVM, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -		{
    -			error (1, errno, "%s", plc.nvm.name);
    -		}
    -	}
    -	if (plc.pib.file == -1)
    -	{
    -		if ((plc.pib.file = open (plc.pib.name = NEWPIB, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -		{
    -			error (1, errno, "%s", plc.pib.name);
    -		}
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	function (&plc);
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plchostd.1.html b/docbook/plchostd.1.html deleted file mode 100644 index c58565a6..00000000 --- a/docbook/plchostd.1.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - plchostd.1 - - - - - - - - - -
    -plchostd(1)                                  Qualcomm Atheros Open Powerline Toolkit                                 plchostd(1)
    -
    -NAME
    -       plchostd - Qualcomm Atheros PLC Host Daemon
    -
    -SYNOPSIS
    -       plchostd [options] -N nvmfile -P pibfile
    -
    -DESCRIPTION
    -       Wait  for  VS_HST_ACTION.IND  messages from a local device and service them as described in the Qualcomm Atheros Firmware
    -       Technical Reference Manual for powerline devices.  Unlike programs int6khost and int64host, this program  uses  operating
    -       system features available on POSIX, Unix, BSD and Linux systems but not available on Microsoft or VxWorks systems.
    -
    -       To  use  the program, connect a flash-less device to the host via ethernet then start this program with the correct file‐
    -       names.  The program will automatically respond to device requests  to  download  memory  configuration,  firmware  and/or
    -       parameters  and  upload  firmware or and/or parameters under device control.  See the Qualcomm Atheros Firmware Technical
    -       Reference Manual for more information.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this interface and only reponses received via this
    -              interface are recognized.  The default interface is eth1 because most people use eth0 as their  principle  network
    -              connection;  however,  if environment string "PLC" is defined then it takes precedence over the default interface.
    -              This option then takes precedence over either default.
    -
    -       -N nvmfile
    -              The file containing the firmware chain used to boot and flash the device.  The file must exist and  have  a  valid
    -              NVM file format or it will be rejected.  No assumptions are made based on filename and no filename conventions are
    -              enforced.  The program will not over-write this file.  This option and argument are required.
    -
    -       -n filename
    -              Use this file to store firmware uploaded from the local device.  The file need not exist but an error  will  occur
    -              if  it  cannot  be  created  or written.  If firmware is uploaded to this file, it is used for subsequent firmware
    -              downloads unless the device requests a factory reset.  In that case, the file specified  by  option  -N  is  used.
    -              This option and argument are optional.  If omitted then the default filename host.pib will be used.
    -
    -       -P pibfile
    -              The  file  containing the parameter chain used to boot and flash the device.  The file must exist and have a valid
    -              PIB file format or it will be rejected.  No assumptions are made based on filename and no filename conventions are
    -              enforced.  The program will not over-write this file.  This option and argument are required.
    -
    -       -p filename
    -              Use this file to store parameters uploaded from the local device.  The file need not exist but an error will occur
    -              if it cannot be created or written.  Once parameters are uploaded to this file, it is used for subsequent  parame‐
    -              ter  downloads unless the device requests a factory reset.  In that case, the file specified by option -P is used.
    -              This option and argument are optional.  If omitted then the default filename host.nvm will be used.
    -
    -       -q     Suppress status messages on stderr.
    -
    -       -s pathname
    -              The server socket pathname.  Automatically open this Unix socket and post event information to it for the  benefit
    -              of other host processes.
    -
    -       -S filename
    -              The file containing the softloader chain used to flash the device.  The presence of this file causes the device to
    -              be flashed once it has booted.  The file must exist and have a valid PIB file format or it will be  rejected.   No
    -              assumptions  are made based on filename and no filename conventions are enforced.  The program will not over-write
    -              this file.  This option and argument are required.
    -
    -       -t timeout
    -              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -v     Print  additional  information  on  stdout.   In particular, this option will print incoming and outgoing Ethernet
    -              frames on stdout.
    -
    -       -w wakeup
    -              Wakeup time in seconds.  If no VS_HST_ACTION.IND message is received within this time period then the process will
    -              wakeup  and perform periodic functions such as posting network topography to the server socket specified by option
    -              -s.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       None.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -EXAMPLES
    -       The following example starts the host server.  The -N and -P options are always required.  Option order is not important.
    -       Control  does  not return to the console until the program is terminated by the user using CTRL-C or another command line
    -       interrupt.
    -
    -          # plchostd -N test.nvm -P test.pib -n temp.nvm -p temp.pib
    -
    -       The next example does the same but spawns the program as an independent process and returns control to the  console.   In
    -       this case, that process must be terminated or killed using an appropriate command such ad kill.
    -
    -          # plchostd -N test.nvm -P test.pib -n temp.nvm -p temp.pib -d
    -
    -DISCLAIMER
    -       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
    -       gram.
    -
    -SEE ALSO
    -       plc(1), int64host(1), int6k(1), int6kboot(1), int6khost(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                 plchostd(1)
    -
    - - - diff --git a/docbook/plchostd.c.html b/docbook/plchostd.c.html deleted file mode 100644 index 20bb42d8..00000000 --- a/docbook/plchostd.c.html +++ /dev/null @@ -1,745 +0,0 @@ - - - - - - plchostd.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plchostd.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <string.h>
    -#include <ctype.h>
    -#include <memory.h>
    -#include <signal.h>
    -#include <errno.h>
    -#include <sys/socket.h>
    -#include <sys/un.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../ether/channel.h"
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/BootDevice1.c"
    -#include "../plc/BootDevice2.c"
    -#include "../plc/BootFirmware1.c"
    -#include "../plc/BootFirmware2.c"
    -#include "../plc/BootParameters1.c"
    -#include "../plc/BootParameters2.c"
    -#include "../plc/chipset.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Devices.c"
    -#include "../plc/ExecuteApplets.c"
    -#include "../plc/ExecuteApplets1.c"
    -#include "../plc/ExecuteApplets2.c"
    -#include "../plc/Failure.c"
    -#include "../plc/FlashDevice2.c"
    -#include "../plc/FlashSoftloader.c"
    -#include "../plc/FlashFirmware.c"
    -#include "../plc/FlashParameters.c"
    -#include "../plc/FlashNVM.c"
    -#include "../plc/HostActionResponse.c"
    -#include "../plc/InitDevice.c"
    -#include "../plc/InitDevice1.c"
    -#include "../plc/InitDevice2.c"
    -#include "../plc/ModuleSpec.c"
    -#include "../plc/ModuleSession.c"
    -#include "../plc/ModuleWrite.c"
    -#include "../plc/ModuleCommit.c"
    -#include "../plc/NVMSelect.c"
    -#include "../plc/Request.c"
    -#include "../plc/ResetDevice.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/ReadFirmware1.c"
    -#include "../plc/ReadParameters.c"
    -#include "../plc/ReadParameters1.c"
    -#include "../plc/ReadParameters2.c"
    -#include "../plc/LocalDevices.c"
    -#include "../plc/WaitForReset.c"
    -#include "../plc/WaitForStart.c"
    -#include "../plc/WaitForRestart.c"
    -#include "../plc/WriteMEM.c"
    -#include "../plc/WriteNVM.c"
    -#include "../plc/WritePIB.c"
    -#include "../plc/WriteExecuteApplet2.c"
    -#include "../plc/WriteExecuteFirmware.c"
    -#include "../plc/WriteExecuteFirmware1.c"
    -#include "../plc/WriteExecuteFirmware2.c"
    -#include "../plc/WriteExecuteParameters.c"
    -#include "../plc/WriteExecuteParameters1.c"
    -#include "../plc/WriteExecuteParameters2.c"
    -#include "../plc/WriteExecutePIB.c"
    -#include "../plc/Platform.c"
    -#include "../plc/PLCTopology.c"
    -#include "../plc/PLCTopologyPrint.c"
    -#include "../plc/WriteFirmware1.c"
    -#include "../plc/WriteFirmware2.c"
    -#include "../plc/StartFirmware1.c"
    -#include "../plc/StartFirmware2.c"
    -#include "../plc/PLCSelect.c"
    -#include "../plc/ModuleRead.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/error.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#ifdef AR7x00
    -#include "../mme/QualcommHeader1.c"
    -#endif
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/keys.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmfile.c"
    -#include "../nvm/nvmfile1.c"
    -#include "../nvm/nvmfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile.c"
    -#include "../pib/pibfile1.c"
    -#include "../pib/pibfile2.c"
    -#include "../pib/pibpeek1.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MESSAGE "Starting PLC Host Server\n"
    -#define SOCKETNAME "/tmp/socket"
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static bool done = false;
    -
    -/*====================================================================*
    - *
    - *   void terminate (signo_t signal);
    - *
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void terminate (signo_t signal)
    -
    -{
    -	done = true;
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   signed opensocket (char const * socketname);
    - *
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed opensocket (char const * socketname)
    -
    -{
    -	signed fd;
    -	struct sockaddr_un sockaddr_un =
    -	{
    -
    -#if defined (__OpenBSD__) || defined (__APPLE__)
    -
    -		0,
    -
    -#endif
    -
    -		AF_UNIX,
    -		"/tmp/socket"
    -	};
    -	strncpy (sockaddr_un.sun_path, socketname, sizeof (sockaddr_un.sun_path));
    -
    -#if defined (__OpenBSD__) || defined (__APPLE__)
    -
    -	sockaddr_un.sun_len = SUN_LEN (&sockaddr_un);
    -
    -#endif
    -
    -	if (unlink (sockaddr_un.sun_path))
    -	{
    -		if (errno != ENOENT)
    -		{
    -			error (1, errno, "%s", sockaddr_un.sun_path);
    -		}
    -	}
    -	if ((fd = socket (AF_UNIX, SOCK_DGRAM, 0)) == -1)
    -	{
    -		error (1, errno, "%s", sockaddr_un.sun_path);
    -	}
    -	if (bind (fd, (struct sockaddr *)(&sockaddr_un), sizeof (sockaddr_un)) == -1)
    -	{
    -		error (1, errno, "%s", sockaddr_un.sun_path);
    -	}
    -	if (chmod (sockaddr_un.sun_path, 0666) == -1)
    -	{
    -		error (1, errno, "%s", sockaddr_un.sun_path);
    -	}
    -	return (fd);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed function (struct plc * plc, char const * socket);
    - *
    - *   wait indefinitely for VS_HOST_ACTION messages; service the device
    - *   only; it will stop dead - like a bug! - on error;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed function (struct plc * plc, char const * socket)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_host_action_ind
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MACTION;
    -		uint8_t MAJOR_VERSION;
    -		uint8_t MINOR_VERSION;
    -	}
    -	* indicate = (struct vs_host_action_ind *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	byte buffer [3000];
    -	struct plctopology * plctopology = (struct plctopology *)(buffer);
    -	signed fd = opensocket (socket);
    -	char const * FactoryNVM = plc->NVM.name;
    -	char const * FactoryPIB = plc->PIB.name;
    -	signed action;
    -	signed status;
    -	memset (buffer, 0, sizeof (buffer));
    -	write (fd, MESSAGE, strlen (MESSAGE));
    -	while (!done)
    -	{
    -		status = ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND));
    -		if (status < 0)
    -		{
    -			break;
    -		}
    -		if (status < 1)
    -		{
    -			PLCTopology (channel, message, plctopology);
    -			PLCTopologyPrint (plctopology);
    -			continue;
    -		}
    -		action = indicate->MACTION;
    -		memcpy (channel->peer, indicate->ethernet.OSA, sizeof (channel->peer));
    -		if (HostActionResponse (plc))
    -		{
    -			return (-1);
    -		}
    -		if (action == 0x00)
    -		{
    -			if (BootDevice2 (plc))
    -			{
    -				return (-1);
    -			}
    -			if (_anyset (plc->flags, PLC_FLASH_DEVICE))
    -			{
    -				FlashDevice2 (plc, (PLC_COMMIT_FORCE | PLC_COMMIT_NORESET | PLC_COMMIT_FACTPIB));
    -			}
    -			continue;
    -		}
    -		if (action == 0x01)
    -		{
    -			close (plc->NVM.file);
    -			if (ReadFirmware1 (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->NVM.name);
    -			}
    -			if (ResetDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x02)
    -		{
    -			close (plc->PIB.file);
    -			if (ReadParameters (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			if (ResetDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x03)
    -		{
    -			close (plc->PIB.file);
    -			if (ReadParameters (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			close (plc->NVM.file);
    -			if (ReadFirmware1 (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->NVM.name);
    -			}
    -			if (ResetDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x04)
    -		{
    -			if (InitDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x05)
    -		{
    -			close (plc->NVM.file);
    -			if ((plc->NVM.file = open (plc->NVM.name = FactoryNVM, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->NVM.name);
    -			}
    -			close (plc->PIB.file);
    -			if ((plc->PIB.file = open (plc->PIB.name = FactoryPIB, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			if (ResetDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x06)
    -		{
    -			close (plc->PIB.file);
    -			if (ReadParameters (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			continue;
    -		}
    -		error (0, ENOSYS, "Host Action 0x%02X", action);
    -	}
    -	close (fd);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary when asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	extern void terminate (signo_t);
    -	static char const * optv [] =
    -	{
    -		"dFi:n:N:p:P:qs:S:t:vw:x",
    -		"-N file -P file [-S file] [-n file] [-p file]",
    -		"Qualcomm Atheros PLC Host Daemon",
    -		"d\texecute in background as daemon",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"n f\tread firmware from device into file (f)",
    -		"N f\tfirmware file is (f)",
    -		"p f\tread parameters from device into file (f)",
    -		"P f\tparameter file is (f)",
    -		"q\tquiet mode",
    -		"s f\tbroadcast event status on socket (f) [" SOCKETNAME "]",
    -		"S f\tsoftloader file is (f)",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"w n\twakeup every (n) seconds [" LITERAL (PLC_LONGTIME) "]",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	struct sigaction sa;
    -	char const * socketname = SOCKETNAME;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	plc.timer = PLC_LONGTIME;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'd':
    -			_setbits (plc.flags, PLC_DAEMON);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'N':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.NVM.name);
    -			}
    -			if (nvmfile (&plc.NVM))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_MAC);
    -			break;
    -		case 'n':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.nvm.name);
    -			}
    -			break;
    -		case 'P':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.PIB.name);
    -			}
    -			if (pibfile (&plc.PIB))
    -			{
    -				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_PIB);
    -			break;
    -		case 'p':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.pib.name);
    -			}
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 's':
    -			break;
    -		case 'S':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.CFG.file = open (plc.CFG.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.CFG.name);
    -			}
    -			if (nvmfile (&plc.CFG))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.CFG.name);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'w':
    -			plc.timer = (unsigned)(uintspec (optarg, 1, 3600));
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -	if (plc.NVM.file == -1)
    -	{
    -		error (1, ECANCELED, "No host NVM file named");
    -	}
    -	if (plc.PIB.file == -1)
    -	{
    -		error (1, ECANCELED, "No host PIB file named");
    -	}
    -	if (plc.nvm.file == -1)
    -	{
    -		error (1, ECANCELED, "No user NVM file named");
    -	}
    -	if (plc.pib.file == -1)
    -	{
    -		error (1, ECANCELED, "No user PIB file named");
    -	}
    -	if (plc.CFG.file == -1)
    -	{
    -		if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -		{
    -			error (1, ECANCELED, "No Softloader file named");
    -		}
    -	}
    -
    -#ifndef WIN32
    -
    -	if (_anyset (plc.flags, PLC_DAEMON))
    -	{
    -		pid_t pid = fork ();
    -		if (pid < 0)
    -		{
    -			error (1, errno, "Can't start daemon");
    -		}
    -		if (pid > 0)
    -		{
    -			exit (0);
    -		}
    -	}
    -	memset (&sa, 0, sizeof (struct sigaction));
    -	sa.sa_handler = terminate;
    -	sigaction (SIGTERM, &sa, (struct sigaction *)(0));
    -	sigaction (SIGQUIT, &sa, (struct sigaction *)(0));
    -	sigaction (SIGTSTP, &sa, (struct sigaction *)(0));
    -	sigaction (SIGINT, &sa, (struct sigaction *)(0));
    -	sigaction (SIGHUP, &sa, (struct sigaction *)(0));
    -
    -#endif
    -
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	function (&plc, socketname);
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plchostd2.1.html b/docbook/plchostd2.1.html deleted file mode 100644 index 46efdcbc..00000000 --- a/docbook/plchostd2.1.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - plchostd2.1 - - - - - - - - - -
    -plchostd2(1)                                 Qualcomm Atheros Open Powerline Toolkit                                plchostd2(1)
    -
    -NAME
    -       plchostd2 - Qualcomm Atheros Panther/Lynx PLC Host Daemon
    -
    -SYNOPSIS
    -       plchostd2 [options] -N nvmfile -P pibfile
    -
    -DESCRIPTION
    -       Wait  for  VS_HST_ACTION.IND  messages from a local device and service them as described in the Qualcomm Atheros Firmware
    -       Technical Reference Manual for powerline devices.  Unlike programs int6khost and int64host, this program  uses  operating
    -       system  features available on POSIX, Unix, BSD and Linux systems but not available on Microsoft or VxWorks systems.  This
    -       program supports chipsets QCA6410, QCA7000 and QCA7420.
    -
    -       To use the program, connect a flash-less device to the host via ethernet then start this program with the  correct  file‐
    -       names.   The  program  will  automatically  respond  to device requests to download memory configuration, firmware and/or
    -       parameters and upload firmware or and/or parameters under device control.  See the Qualcomm  Atheros  Firmware  Technical
    -       Reference Manual for more information.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -i interface
    -              Select the host Ethernet interface.  All requests are sent via this interface and only reponses received via  this
    -              interface  are  recognized.  The default interface is eth1 because most people use eth0 as their principle network
    -              connection; however, if environment string "PLC" is defined then it takes precedence over the  default  interface.
    -              This option then takes precedence over either default.
    -
    -       -N nvmfile
    -              The  file  containing  the firmware chain used to boot and flash the device.  The file must exist and have a valid
    -              NVM file format or it will be rejected.  No assumptions are made based on filename and no filename conventions are
    -              enforced.  The program will not over-write this file.  This option and argument are required.
    -
    -       -n filename
    -              Use  this  file to store firmware uploaded from the local device.  The file need not exist but an error will occur
    -              if it cannot be created or written.  If firmware is uploaded to this file, it  is  used  for  subsequent  firmware
    -              downloads  unless  the  device  requests  a factory reset.  In that case, the file specified by option -N is used.
    -              This option and argument are optional.  If omitted then the default filename host.pib will be used.
    -
    -       -P pibfile
    -              The file containing the parameter chain used to boot and flash the device.  The file must exist and have  a  valid
    -              PIB file format or it will be rejected.  No assumptions are made based on filename and no filename conventions are
    -              enforced.  The program will not over-write this file.  This option and argument are required.
    -
    -       -p filename
    -              Use this file to store parameters uploaded from the local device.  The file need not exist but an error will occur
    -              if  it cannot be created or written.  Once parameters are uploaded to this file, it is used for subsequent parame‐
    -              ter downloads unless the device requests a factory reset.  In that case, the file specified by option -P is  used.
    -              This option and argument are optional.  If omitted then the default filename host.nvm will be used.
    -
    -       -q     Suppress status messages on stderr.
    -
    -       -S filename
    -              The file containing the softloader chain used to flash the device.  The presence of this file causes the device to
    -              be flashed once it has booted.  The file must exist and have a valid PIB file format or it will be  rejected.   No
    -              assumptions  are made based on filename and no filename conventions are enforced.  The program will not over-write
    -              this file.  This option and argument are required.
    -
    -       -t timeout
    -              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -v     Print  additional  information  on  stdout.   In particular, this option will print incoming and outgoing Ethernet
    -              frames on stdout.
    -
    -       -w wakeup
    -              Wakeup time in seconds.  If no VS_HST_ACTION.IND message is received within this time period then the process will
    -              wakeup  and perform periodic functions such as posting network topography to the server socket specified by option
    -              -s.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       None.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -EXAMPLES
    -       The following example starts the host server.  The -N and -P options are always required.  Option order is not important.
    -       Control  does  not return to the console until the program is terminated by the user using CTRL-C or another command line
    -       interrupt.
    -
    -          # plchostd2 -N test.nvm -P test.pib -n temp.nvm -p temp.pib
    -
    -       The next example does the same but spawns the program as an independent process and returns control to the  console.   In
    -       this case, that process must be terminated or killed using an appropriate command such ad kill.
    -
    -          # plchostd2 -N test.nvm -P test.pib -n temp.nvm -p temp.pib -d
    -
    -DISCLAIMER
    -       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
    -       gram.
    -
    -SEE ALSO
    -       plc(1), int64host(1), int6k(1), int6kboot(1), int6khost(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                plchostd2(1)
    -
    - - - diff --git a/docbook/plchostd2.c.html b/docbook/plchostd2.c.html deleted file mode 100644 index 89cccdf3..00000000 --- a/docbook/plchostd2.c.html +++ /dev/null @@ -1,751 +0,0 @@ - - - - - - plchostd2.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *   Copyright (c) 2014 I2SE GmbH
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plchostd2.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *      Stefan Wahren <stefan.wahren@i2se.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <string.h>
    -#include <ctype.h>
    -#include <memory.h>
    -#include <signal.h>
    -#include <errno.h>
    -#include <sys/socket.h>
    -#include <sys/un.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../ether/channel.h"
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/BootDevice2.c"
    -#include "../plc/BootFirmware2.c"
    -#include "../plc/BootParameters2.c"
    -#include "../plc/chipset.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Devices.c"
    -#include "../plc/Failure.c"
    -#include "../plc/FlashDevice2.c"
    -#include "../plc/FlashSoftloader.c"
    -#include "../plc/FlashFirmware.c"
    -#include "../plc/FlashParameters.c"
    -#include "../plc/FlashNVM.c"
    -#include "../plc/HostActionResponse.c"
    -#include "../plc/InitDevice2.c"
    -#include "../plc/ModuleRead.c"
    -#include "../plc/ModuleSpec.c"
    -#include "../plc/ModuleSession.c"
    -#include "../plc/ModuleWrite.c"
    -#include "../plc/ModuleCommit.c"
    -#include "../plc/LocalDevices.c"
    -#include "../plc/NVMSelect.c"
    -#include "../plc/ReadFirmware2.c"
    -#include "../plc/ReadParameters2.c"
    -#include "../plc/Request.c"
    -#include "../plc/ResetDevice.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/WaitForReset.c"
    -#include "../plc/WaitForStart.c"
    -#include "../plc/WriteMEM.c"
    -#include "../plc/WriteNVM.c"
    -#include "../plc/WritePIB.c"
    -#include "../plc/WriteExecuteFirmware2.c"
    -#include "../plc/WriteExecuteParameters2.c"
    -#include "../plc/WriteExecuteApplet2.c"
    -#include "../plc/Platform.c"
    -#include "../plc/WriteFirmware2.c"
    -#include "../plc/PLCSelect.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/error.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#ifdef AR7x00
    -#include "../mme/QualcommHeader1.c"
    -#endif
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/keys.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile2.c"
    -#include "../pib/pibpeek2.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MESSAGE "Starting PLC Host Server\n"
    -#define SOCKETNAME "/tmp/socket"
    -
    -#define NEWPIB "user.pib"
    -#define NEWNVM "user.nvm"
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static bool done = false;
    -
    -/*====================================================================*
    - *
    - *   void terminate (signo_t signal);
    - *
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void terminate (signo_t signal)
    -
    -{
    -	done = true;
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   signed opensocket (char const * socketname);
    - *
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed opensocket (char const * socketname)
    -
    -{
    -	signed fd;
    -	struct sockaddr_un sockaddr_un =
    -	{
    -
    -#if defined (__OpenBSD__) || defined (__APPLE__)
    -
    -		0,
    -
    -#endif
    -
    -		AF_UNIX,
    -		"/tmp/socket"
    -	};
    -	strncpy (sockaddr_un.sun_path, socketname, sizeof (sockaddr_un.sun_path));
    -
    -#if defined (__OpenBSD__) || defined (__APPLE__)
    -
    -	sockaddr_un.sun_len = SUN_LEN (&sockaddr_un);
    -
    -#endif
    -
    -	if (unlink (sockaddr_un.sun_path))
    -	{
    -		if (errno != ENOENT)
    -		{
    -			error (1, errno, "%s", sockaddr_un.sun_path);
    -		}
    -	}
    -	if ((fd = socket (AF_UNIX, SOCK_DGRAM, 0)) == -1)
    -	{
    -		error (1, errno, "%s", sockaddr_un.sun_path);
    -	}
    -	if (bind (fd, (struct sockaddr *)(&sockaddr_un), sizeof (sockaddr_un)) == -1)
    -	{
    -		error (1, errno, "%s", sockaddr_un.sun_path);
    -	}
    -	if (chmod (sockaddr_un.sun_path, 0666) == -1)
    -	{
    -		error (1, errno, "%s", sockaddr_un.sun_path);
    -	}
    -	return (fd);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed function (struct plc * plc, char const * socket);
    - *
    - *   wait indefinitely for VS_HOST_ACTION messages; service the device
    - *   only; it will stop dead - like a bug! - on error;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed function (struct plc * plc, char const * socket)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -	static char const * actions [] =
    -	{
    -		"start device",
    -		"store firmware",
    -		"store parameters",
    -		"update host",
    -		"config memory",
    -		"restore defaults",
    -		"unknown"
    -	};
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_host_action_ind
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MACTION;
    -		uint8_t MAJOR_VERSION;
    -		uint8_t MINOR_VERSION;
    -	}
    -	* indicate = (struct vs_host_action_ind *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	signed fd = opensocket (socket);
    -	char firmware [PLC_VERSION_STRING];
    -	char const * FactoryNVM = plc->NVM.name;
    -	char const * FactoryPIB = plc->PIB.name;
    -	signed action;
    -	signed status;
    -	write (fd, MESSAGE, strlen (MESSAGE));
    -	while (!done)
    -	{
    -		status = ReadMME (plc, 0, (VS_HOST_ACTION | MMTYPE_IND));
    -		if (status < 0)
    -		{
    -			break;
    -		}
    -		if (status < 1)
    -		{
    -			continue;
    -		}
    -		action = indicate->MACTION;
    -		if (action < SIZEOF (actions))
    -		{
    -			fprintf(stderr, "plchostd2: action = %s\n", actions[action]);
    -		}
    -		else
    -		{
    -			fprintf(stderr, "plchostd2: action = %d\n", action);
    -		}
    -		memcpy (channel->peer, indicate->ethernet.OSA, sizeof (channel->peer));
    -		if (HostActionResponse (plc))
    -		{
    -			return (-1);
    -		}
    -		if (action == 0x00)
    -		{
    -			if (BootDevice2 (plc))
    -			{
    -				return (-1);
    -			}
    -			if (WaitForStart (plc, firmware, sizeof (firmware)))
    -			{
    -				return (-1);
    -			}
    -			if (_anyset (plc->flags, PLC_FLASH_DEVICE))
    -			{
    -				FlashDevice2 (plc, (PLC_COMMIT_FORCE | PLC_COMMIT_NORESET | PLC_COMMIT_FACTPIB));
    -			}
    -			continue;
    -		}
    -		if (action == 0x01)
    -		{
    -			close (plc->NVM.file);
    -			if (ReadFirmware2 (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->NVM.name);
    -			}
    -			continue;
    -		}
    -		if (action == 0x02)
    -		{
    -			close (plc->PIB.file);
    -			if (ReadParameters2 (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			if (ResetDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x03)
    -		{
    -			close (plc->PIB.file);
    -			if (ReadParameters2 (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			close (plc->NVM.file);
    -			if (ReadFirmware2 (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->NVM.file = open (plc->NVM.name = plc->nvm.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->NVM.name);
    -			}
    -			if (ResetDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x04)
    -		{
    -			if (InitDevice2 (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x05)
    -		{
    -			close (plc->NVM.file);
    -			if ((plc->NVM.file = open (plc->NVM.name = FactoryNVM, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->NVM.name);
    -			}
    -			close (plc->PIB.file);
    -			if ((plc->PIB.file = open (plc->PIB.name = FactoryPIB, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			if (ResetDevice (plc))
    -			{
    -				return (-1);
    -			}
    -			continue;
    -		}
    -		if (action == 0x06)
    -		{
    -			close (plc->PIB.file);
    -			if (ReadParameters2 (plc))
    -			{
    -				return (-1);
    -			}
    -			if ((plc->PIB.file = open (plc->PIB.name = plc->pib.name, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc->PIB.name);
    -			}
    -			continue;
    -		}
    -		error (0, ENOSYS, "Host Action 0x%02X", action);
    -	}
    -	close (fd);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary when asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	extern void terminate (signo_t);
    -	static char const * optv [] =
    -	{
    -		"dFi:n:N:p:P:qS:t:vw:x",
    -		"-N file -P file [-S file]",
    -		"Qualcomm Atheros Panther/Lynx PLC Host Daemon",
    -		"d\texecute in background as daemon",
    -		"F [F]\tflash [force] non-volatile memory",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"n f\tread firmware from device into file (f)",
    -		"N f\tfirmware file is (f)",
    -		"p f\tread parameters from device into file (f)",
    -		"P f\tparameter file is (f)",
    -		"q\tquiet mode",
    -		"S f\tsoftloader file is (f)",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"w n\twakeup every (n) seconds [" LITERAL (PLC_LONGTIME) "]",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	struct sigaction sa;
    -	char const * socketname = SOCKETNAME;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	plc.timer = PLC_LONGTIME;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'd':
    -			_setbits (plc.flags, PLC_DAEMON);
    -			break;
    -		case 'F':
    -			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
    -			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -			{
    -				_setbits (plc.module, VS_MODULE_FORCE);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'N':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.NVM.name);
    -			}
    -			if (nvmfile2 (&plc.NVM))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_MAC);
    -			break;
    -		case 'n':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.nvm.name);
    -			}
    -			break;
    -		case 'P':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.PIB.name);
    -			}
    -			if (pibfile2 (&plc.PIB))
    -			{
    -				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
    -			}
    -			_setbits (plc.flags, PLC_WRITE_PIB);
    -			break;
    -		case 'p':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.pib.name);
    -			}
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'S':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.CFG.file = open (plc.CFG.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.CFG.name);
    -			}
    -			if (nvmfile2 (&plc.CFG))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.CFG.name);
    -			}
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'w':
    -			plc.timer = (unsigned)(uintspec (optarg, 1, 3600));
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -	if (plc.NVM.file == -1)
    -	{
    -		error (1, ECANCELED, "No host NVM file named");
    -	}
    -	if (plc.PIB.file == -1)
    -	{
    -		error (1, ECANCELED, "No host PIB file named");
    -	}
    -	if (plc.CFG.file == -1)
    -	{
    -		if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -		{
    -			error (1, ECANCELED, "No Softloader file named");
    -		}
    -	}
    -	if (plc.nvm.file == -1)
    -	{
    -		if ((plc.nvm.file = open (plc.nvm.name = NEWNVM, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -		{
    -			error (1, errno, "%s", plc.nvm.name);
    -		}
    -	}
    -	if (plc.pib.file == -1)
    -	{
    -		if ((plc.pib.file = open (plc.pib.name = NEWPIB, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -		{
    -			error (1, errno, "%s", plc.pib.name);
    -		}
    -	}
    -
    -#ifndef WIN32
    -
    -	if (_anyset (plc.flags, PLC_DAEMON))
    -	{
    -		pid_t pid = fork ();
    -		if (pid < 0)
    -		{
    -			error (1, errno, "Can't start daemon");
    -		}
    -		if (pid > 0)
    -		{
    -			exit (0);
    -		}
    -	}
    -	memset (&sa, 0, sizeof (struct sigaction));
    -	sa.sa_handler = terminate;
    -	sigaction (SIGTERM, &sa, (struct sigaction *)(0));
    -	sigaction (SIGQUIT, &sa, (struct sigaction *)(0));
    -	sigaction (SIGTSTP, &sa, (struct sigaction *)(0));
    -	sigaction (SIGINT, &sa, (struct sigaction *)(0));
    -	sigaction (SIGHUP, &sa, (struct sigaction *)(0));
    -
    -#endif
    -
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	function (&plc, socketname);
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plclist.1.html b/docbook/plclist.1.html deleted file mode 100644 index 1680b038..00000000 --- a/docbook/plclist.1.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - plclist.1 - - - - - - - - - -
    -plclist(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plclist(1)
    -
    -NAME
    -       plclist - List Atheros Device Addresses
    -
    -SYNOPSIS
    -       plclist [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       print  the  local  device  address or all network device addresses for a specific device.  This program is ideal for that
    -       special script jokey in your life.  It only prints device addresses.  Nothing else.
    -
    -       Devices are detected using one of two methods.  The two methods can be used in combination to determine network topology.
    -
    -       The first method sends one VS_SW_VER message to the Qualcomm Atheros Local Management Address  and  prints  the  Ethernet
    -       source  address  found  in each received confirmation message.  The method is used when no device addresses appear on the
    -       command line.  The result is a list of all local devices, being this connected directly to the local  host.   Each  local
    -       device device may bridge to an independent powerline network having remote devices as members.
    -
    -       The  second  method sends one VS_NW_INFO message to each specified device and prints the Ethernet source address found in
    -       each received message plus the Ethernet addresses of each network station identified in that message body.   This  method
    -       is  used  whenever  one,  or more, device addresses appear on the command line.  It is possible to query remote powerline
    -       devices directly and so duplicate devices addresses are printed when devices share powerline neighbors.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
    -       instructions.
    -
    -COMMENTS
    -       This  program  is identical to legacy program int6klist but uses version 1 of the Qualcomm Atheros VS_NW_INFO vendor-spe‐
    -       cific message.  Older firmware versions may not recognize this message version.
    -
    -OPTIONS
    -       -b     Print bridge device addresses.  Each specified device reports it's own address. This option has no  effect  if  no
    -              devices are specified.
    -
    -       -i     Select  the  host Ethernet interface. All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized. The default interface is eth1 because most people use eth0 as their  principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface. This option then takes precedence over either default.
    -
    -       -n     Append a newline to output.
    -
    -       -q     Enter quiet mode. This option has no effect at this time.
    -
    -       -r     Print remote device addresses. Each specified device reports neighbor device addresses. This option has no  effect
    -              when no devices are specified.
    -
    -       -s     Insert a newline, instead of a space, between each device address.
    -
    -       -v     Enter verbose mode. All Etherenet frames sent or received by the program are displayed on stdout.
    -
    -       -?, --help
    -              Print program help summary on stdout. This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print  program version information on stdout. This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The  MAC address of some powerline device. More than one address may be specified. If omitted the the program out‐
    -              put consists of local device addresses only. Otherwise, output conisists of the specified device followed  by  all
    -              devices  associated  with  it.  The  default  address  is local. See DEVICES for information about symbolic device
    -              addresses.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses. A MAC address is a 48-bit value entered as 12  hexa‐
    -       decimal  digits  in  upper,  lower or mixed character case. Octets may be separated with colons for clarity. For example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF. All devices, whether  local,  remote  or  foreign
    -              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA),  00:B0:52:00:00:01.  All  local
    -              Atheros devices recognize this address but remote and foreign devices do not. A remote device is any device at the
    -              far end of a powerline connection. A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
    -       Ocala  FL  USA. Consequently, public information may not be available. Qualcomm Atheros reserves the right to modify mes‐
    -       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
    -       gram.
    -
    -EXAMPLES
    -       The  following command lists all local devices. Since no devices are specified on the command line, one VS_SW_VER message
    -       is addressed to 00:B0:52:00:00:01 and the responses are collected. As we can see, there is only one local  device  avail‐
    -       able at this time. Observe that the prompt appears immediately after the address because newlines are omitted by default.
    -
    -          # plclist
    -          00:B0:52:BE:EF:04 #
    -
    -       The  next  example  does  the  same  thing  but there are now three local devices available. Observe that all devices are
    -       printed without intervening newlines so that the output of this program can be used as input to other toolkit programs.
    -
    -          # plclist
    -          00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01 # int6k
    -
    -       The next example queries the first local device from  the  previous  example,  00:B0:52:BE:EF:04,  for  a  list  neighbor
    -       devices.  This  time a VS_NW_INFO message is sent because we named a device on the command line. The named device happens
    -       to be a local device but it need not be. We can see that the device has no neighbors.
    -
    -          # plclist 00:B0:52:BE:EF:04
    -          00:B0:52:BE:EF:04 # int6k
    -
    -       The next example we query the next local device, 00:B0:52:BA:BE:02, and find that it has two neighbor  devices  that  did
    -       not show up earlier because they are remote devices. Observe that the three devices comprise a complete logical powerline
    -       network. Device 00:B0:52:BA:BE:02 is connected to the local host but 00:0F:33:F2:01:21  and  00:0f:00:F2:01:13  are  con‐
    -       nected to other hosts, somewhere.
    -
    -          # plclist 00:B0:52:BA:BE:02
    -          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
    -
    -       The  next  example  shows  that we can query multiple devices at a time for neighbors. We have copied the output from the
    -       second example and pasted it onto the command line. We now have a list of all devices, local and remote.
    -
    -          # plclist 00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01
    -          00:B0:52:BE:EF:04 00:B0:52:BA:BE:01 00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
    -
    -       This next example does the same thing but uses option -n to append a newline after each query. This output is  eaiser  to
    -       understand because each device queried starts on a new line and is followed by any neighbors.
    -
    -          # plclist 00:B0:52:BE:EF:04 00:B0:52:BA:BE:02 00:B0:52:BA:BE:01 -n
    -          00:B0:52:BE:EF:04
    -          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
    -          00:B0:52:BA:BE:01
    -
    -       This  example  invokes  plclist which returns a list of local devices. That list is inserted into another plclist command
    -       line. This demontrates how program output can be used in scripts.
    -
    -          # plclist $(plclist) -n
    -          00:B0:52:BE:EF:04
    -          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
    -          00:B0:52:BA:BE:01
    -
    -       This next example accomplishes the same thing since all local device respond with a list of powerline neighbors.
    -
    -          # plclist local
    -          00:B0:52:BE:EF:04
    -          00:B0:52:BA:BE:02 00:0F:33:F2:01:21 00:0F:00:F2:01:13
    -          00:B0:52:BA:BE:01
    -
    -SEE ALSO
    -       plc(1), plcrate(1), plcstat(1), plctool(1), plctone(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plclist(1)
    -
    - - - diff --git a/docbook/plclist.c.html b/docbook/plclist.c.html deleted file mode 100644 index 0f6aaf03..00000000 --- a/docbook/plclist.c.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - plclist.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plclist.c -
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/Devices.c"
    -#include "../plc/ListRemoteDevices.c"
    -#include "../plc/ListRemoteDevices1.c"
    -#include "../plc/ListRemoteDevices2.c"
    -#include "../plc/ListLocalDevices.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/error.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexout.c"
    -#include "../tools/todigit.c"
    -#include "../tools/synonym.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/QualcommHeader1.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	extern const struct _term_ devices [];
    -	static char const * optv [] =
    -	{
    -		"i:bnqrsv",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros Powerline Device Enumerator",
    -		"b\tprint bridge devices; exclude remote devices",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"n\tappend newline to output",
    -		"q\tquiet mode",
    -		"r\tprint remote devices; exclude bridge devices",
    -		"s\tprint newlines instead of spaces",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	char const * space = " ";
    -	char const * comma = "\0";
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'b':
    -			_setbits (plc.flags, PLC_BRIDGE_LIST);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'n':
    -			comma = "\n";
    -			break;
    -		case 'r':
    -			_setbits (plc.flags, PLC_REMOTE_LIST);
    -			break;
    -		case 's':
    -			space = "\n";
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (_allclr (plc.flags, (PLC_BRIDGE_LIST|PLC_REMOTE_LIST)))
    -	{
    -		_setbits (plc.flags, (PLC_BRIDGE_LIST|PLC_REMOTE_LIST));
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		ListLocalDevices (&plc, space, comma);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		ListRemoteDevices (&plc, space, comma);
    -		argc--;
    -		argv++;
    -	}
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plclog.1.html b/docbook/plclog.1.html deleted file mode 100644 index d9cf909d..00000000 --- a/docbook/plclog.1.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - plclog.1 - - - - - - - - - -
    -plclog(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   plclog(1)
    -
    -NAME
    -       plclog - Qualcomm Atheros Log Retrieval Utility
    -
    -SYNOPSIS
    -       plclog [options] [device] [device] [...]  [>stdout]
    -
    -DESCRIPTION
    -       Read  and print the device watchdog and checkpoint report on stdout for subsequent analysis by Atheros Technical Support.
    -       Report output is in XML format and contains base-64 encoded binary data returned by the device.  Aside from the XML tags,
    -       output is not in human readable format.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -c     Specify custom watchdog report.
    -
    -       -C     Clear the report after reading.
    -
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -x     Print the report in XML format.  The default is raw (or binary) format.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
    -              be saved as text files for reference.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
    -              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
    -              information about symbolic device addresses.
    -
    -LOGFILES
    -       Log  files  are save in binary format by default but they can also be saved in XML format by adding option -x to the com‐
    -       mand line.  By convention, binary log files have a .log extension and XML log files have a .xlog extension.   The  exten‐
    -       sion is not critical but it helps us determine the format before we open the file.
    -
    -DEVICES
    -       Powerline  devices  use  Ethernet  Media  Access  Control  (MAC)  addresses.   MAC  addresses  are  12 hexadecimal digits
    -       (0123456789ABCDEFabcdef) in upper, lower or mixed case.  Individual octets may be separated by colons, for  clarity,  but
    -       not  all octets need to be seperated.  For example, "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and
    -       equivalent.
    -
    -       The following MAC addresses are special and may be expressed by name instead of number.
    -
    -       all    Equivalent to "broadcast", described next.
    -
    -       broadcast
    -              A synonym for the standard Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or
    -              foreign will respond to this address.
    -
    -       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
    -              Atheros devices will recognize this address but remote and foreign devices will  not.   A  remote  device  is  any
    -              device at the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -DISCLAIMER
    -       Atheros  HomePlug  AV  Vendor Specific Management Message structure and content is proprietary to Atheros Communications,
    -       Ocala FL USA.  Consequently, public information is not available.  Atheros Communications reserves the  right  to  modify
    -       message  structure  or  content  in future firmware releases without any obligation to notify or compensate users of this
    -       program.
    -
    -EXAMPLES
    -       The following example reads the Watchdog and Checkpoint Report from device 00:B0:52:BA:BE:02 and prints them on stdout in
    -       XML  format.  The output contains data segments formatted in base-64 notation which preserved data integrity when read or
    -       transmitted in text format.
    -
    -          # plclog 00:B0:52:BA:BE:02
    -
    -       The next example does the same thing but pipes output to file temp.log.  Atheros recommends using a  .log  extension  for
    -       compatibility with the WIndows Device Manager.
    -
    -          # plclog 00:B0:52:BA:BE:02 > temp.log
    -
    -SEE ALSO
    -       amp(1), plctool(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   plclog(1)
    -
    - - - diff --git a/docbook/plclog.c.html b/docbook/plclog.c.html deleted file mode 100644 index 7bb569ec..00000000 --- a/docbook/plclog.c.html +++ /dev/null @@ -1,711 +0,0 @@ - - - - - - plclog.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plclog.c - Atheros INT6x00 Log Retrieval Utility;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdint.h>
    -#include <stdlib.h>
    -#include <ctype.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/format.h"
    -#include "../tools/base64.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../ether/channel.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Devices.c"
    -#include "../plc/Failure.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/ReadMME.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/error.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/synonym.c"
    -#include "../tools/b64dump.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *   constants
    - *--------------------------------------------------------------------*/
    -
    -#define MSTATUS_STATUS (7 << 0)
    -#define MSTATUS_MAJORVERSION (1 << 3)
    -#define MSTATUS_BUFFERISLOCKED (1 << 4)
    -#define MSTATUS_AUTOLOCKONRESET (1 << 5)
    -#define MSTATUS_UNSOLICITEDUPDATES (1 << 6)
    -#define MSTATUS_UNSOLICITED (1 << 7)
    -
    -#define WD_SESSION_ID 0xFEFE
    -#define WD_ACTION_READ   (1 << 0)
    -#define WD_ACTION_CLEAR  (1 << 1)
    -#define WD_ACTION_CUSTOM (1 << 2)
    -
    -/*====================================================================*
    - *
    - *   static signed PrintRawWatchdogReport (struct plc * plc);
    - *
    - *   Read the watchdog report using VS_WD_RPT and write to file in
    - *   binary or XML format; this file can be sent to Atheros Support
    - *   for analysis;
    - *
    - *   The XML version rquires additional information and so VS_SW_VER
    - *   is used to collect it;
    - *
    - *   This VW_WD_RPT message protocol returns an indication message,
    - *   not a confirm message;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed PrintRawWatchdogReport (struct plc * plc)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_wd_rpt_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint16_t SESSIONID;
    -		uint8_t CLR;
    -	}
    -	* request = (struct vs_wd_rpt_request *) (message);
    -	struct __packed vs_wd_rpt_ind
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint16_t SESSIONID;
    -		uint8_t NUMPARTS;
    -		uint8_t CURPART;
    -		uint16_t RDATALENGTH;
    -		uint8_t RDATAOFFSET;
    -		uint8_t RDATA [1];
    -	}
    -	* indicate = (struct vs_wd_rpt_ind *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_WD_RPT | MMTYPE_REQ));
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	request->SESSIONID = HTOLE16 (WD_SESSION_ID);
    -	request->CLR = plc->readaction;
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	do
    -	{
    -		if (ReadMME (plc, 0, (VS_WD_RPT | MMTYPE_IND)) <= 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -			return (-1);
    -		}
    -		if (indicate->MSTATUS)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			return (-1);
    -		}
    -		write (STDOUT_FILENO, indicate->RDATA + indicate->RDATAOFFSET, LE16TOH (indicate->RDATALENGTH) - indicate->RDATAOFFSET);
    -	}
    -	while (indicate->CURPART < indicate->NUMPARTS);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   static signed PrintWatchdogReport (struct plc * plc, char const * version);
    - *
    - *   Read the watchdog report using VS_WD_RPT and write to file in
    - *   XML format; this file may be sent to QCA for analysis;
    - *
    - *   The XML version rquires additional information and so VS_SW_VER
    - *   is used to collect it;
    - *
    - *   This VW_WD_RPT message protocol returns an indication message,
    - *   not a confirm message;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed PrintWatchdogReport (struct plc * plc, char const * version)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_wd_rpt_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint16_t SESSIONID;
    -		uint8_t CLR;
    -	}
    -	* request = (struct vs_wd_rpt_request *) (message);
    -	struct __packed vs_wd_rpt_ind
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint16_t SESSIONID;
    -		uint8_t NUMPARTS;
    -		uint8_t CURPART;
    -		uint16_t RDATALENGTH;
    -		uint8_t RDATAOFFSET;
    -		uint8_t RDATA [1];
    -	}
    -	* indicate = (struct vs_wd_rpt_ind *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_WD_RPT | MMTYPE_REQ));
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	request->SESSIONID = HTOLE16 (WD_SESSION_ID);
    -	request->CLR = plc->readaction;
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	printf ("<WatchdogReport>");
    -	do
    -	{
    -		if (ReadMME (plc, 0, (VS_WD_RPT | MMTYPE_IND)) <= 0)
    -		{
    -			printf ("</WatchdogReport>");
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -			return (-1);
    -		}
    -		if (indicate->MSTATUS)
    -		{
    -			printf ("</WatchdogReport>");
    -			Failure (plc, PLC_WONTDOIT);
    -			return (-1);
    -		}
    -		printf ("<Packet>");
    -		printf ("<Version>%s</Version>", version);
    -		printf ("<OUI>%s</OUI>", "00B052");
    -		printf ("<Status>0</Status>");
    -		printf ("<SessionId>0</SessionId>");
    -		printf ("<NumParts>%d</NumParts>", indicate->NUMPARTS);
    -		printf ("<CurPart>%d</CurPart>", indicate->CURPART);
    -		printf ("<DataLength>%d</DataLength>", LE16TOH (indicate->RDATALENGTH));
    -		printf ("<DataOffset>%d</DataOffset>", indicate->RDATAOFFSET);
    -		printf ("<Data>");
    -		b64dump (indicate->RDATA, LE16TOH (indicate->RDATALENGTH), 0, stdout);
    -		printf ("</Data>");
    -		printf ("</Packet>");
    -	}
    -	while (indicate->CURPART < indicate->NUMPARTS);
    -	printf ("</WatchdogReport>");
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   static signed PrintCheckpointReport (struct plc * plc, char const * version);
    - *
    - *   Read the watchdog reqport using VS_CP_RPT and write to file in
    - *   binary or XML format; this file can be sent to Atheros Support
    - *   for analysis;
    - *
    - *   The XML version rquires additional information and so VS_SW_VER
    - *   is used to collect it;
    - *
    - *   This VW_WD_RPT message protocol returns an indication message,
    - *   not a confirm message;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed PrintCheckpointReport (struct plc * plc, char const * version)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_cp_rpt_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint16_t SESSIONID;
    -		uint8_t CLR;
    -	}
    -	* request = (struct vs_cp_rpt_request *) (message);
    -	struct __packed vs_cp_rpt_ind
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t MAJORVERSION;
    -		uint8_t MINORVERSION;
    -		uint8_t RESERVED [14];
    -		uint16_t SESSIONID;
    -		uint32_t TOTALBUFFERSIZE;
    -		uint32_t BLOCKOFFSET;
    -		uint32_t BYTEINDEXOFNEXTPOSITION;
    -		uint8_t NUMPARTS;
    -		uint8_t CURPART;
    -		uint16_t RDATALENGTH;
    -		uint8_t RDATAOFFSET;
    -		uint8_t RDATA [1];
    -	}
    -	* indicate = (struct vs_cp_rpt_ind *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_CP_RPT | MMTYPE_REQ));
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	request->SESSIONID = HTOLE16 (WD_SESSION_ID);
    -	request->CLR = plc->readaction;
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	printf ("<CheckpointReport>");
    -	do
    -	{
    -		if (ReadMME (plc, 0, (VS_CP_RPT | MMTYPE_IND)) <= 0)
    -		{
    -			printf ("</CheckpointReport>");
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -			return (-1);
    -		}
    -		if (_anyset (indicate->MSTATUS, MSTATUS_STATUS))
    -		{
    -			printf ("</CheckpointReport>");
    -			Failure (plc, PLC_WONTDOIT);
    -			return (-1);
    -		}
    -		printf ("<Packet>");
    -		printf ("<Version>%s</Version>", version);
    -		printf ("<Status>0</Status>");
    -		printf ("<MajorVersionBit>%d</MajorVersionBit>", indicate->MSTATUS & MSTATUS_MAJORVERSION? 1:0);
    -		printf ("<BufferIsLocked>%d</BufferIsLocked>", indicate->MSTATUS & MSTATUS_BUFFERISLOCKED? 1:0);
    -		printf ("<AutoLockOnResetIsOn>%d</AutoLockOnResetIsOn>", indicate->MSTATUS & MSTATUS_AUTOLOCKONRESET? 1:0);
    -		printf ("<UnsolicitedUpdatesIsOn>%d</UnsolicitedUpdatesIsOn>", indicate->MSTATUS & MSTATUS_UNSOLICITEDUPDATES? 1:0);
    -		printf ("<Unsolicited>%d</Unsolicited>", indicate->MSTATUS & MSTATUS_UNSOLICITED? 1:0);
    -		printf ("<MajorVersion>%d</MajorVersion>", indicate->MAJORVERSION);
    -		printf ("<MinorVersion>%d</MinorVersion>", indicate->MINORVERSION);
    -		printf ("<Reserved1>0</Reserved1>");
    -		printf ("<Reserved2>0</Reserved2>");
    -		printf ("<Reserved3>0</Reserved3>");
    -		printf ("<Reserved4>0</Reserved4>");
    -		printf ("<SessionId>1</SessionId>");
    -		printf ("<TotalBufferSize>%d</TotalBufferSize>", LE32TOH (indicate->TOTALBUFFERSIZE));
    -		printf ("<BlockOffset>%d</BlockOffset>", LE32TOH (indicate->BLOCKOFFSET));
    -		printf ("<ByteIndexOfNextPos>%d</ByteIndexOfNextPos>", LE32TOH (indicate->BYTEINDEXOFNEXTPOSITION));
    -		printf ("<NumParts>%d</NumParts>", indicate->NUMPARTS);
    -		printf ("<CurPart>%d</CurPart>", indicate->CURPART);
    -		printf ("<RDataLength>%d</RDataLength>", LE16TOH (indicate->RDATALENGTH));
    -		printf ("<RDataOffset>%d</RDataOffset>", indicate->RDATAOFFSET);
    -		printf ("<RData>");
    -		b64dump (indicate->RDATA, LE16TOH (indicate->RDATALENGTH), 0, stdout);
    -		printf ("</RData>");
    -		printf ("</Packet>");
    -	}
    -	while (indicate->CURPART < indicate->NUMPARTS);
    -	printf ("</CheckpointReport>");
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   static signed Diagnostics (struct plc * plc)
    - *
    - *   read the firmware version string from a device before reading
    - *   and writing the watchdog and checkpoint reports in XML format;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed Diagnostics (struct plc * plc)
    -
    -{
    -	char version [PLC_VERSION_STRING];
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_sw_ver_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t MDEVICEID;
    -		uint8_t MVERLENGTH;
    -		char MVERSION [PLC_VERSION_STRING];
    -	}
    -	* request = (struct vs_sw_ver_request *) (message);
    -	struct __packed vs_sw_ver_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t MDEVICEID;
    -		uint8_t MVERLENGTH;
    -		char MVERSION [PLC_VERSION_STRING];
    -	}
    -	* confirm = (struct vs_sw_ver_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -		return (-1);
    -	}
    -	if (confirm->MSTATUS)
    -	{
    -		Failure (plc, PLC_WONTDOIT);
    -		return (-1);
    -	}
    -	memcpy (version, confirm->MVERSION, sizeof (version));
    -	if (_anyset (plc->flags, PLC_XML_FORMAT))
    -	{
    -		printf ("<?xml version='1.0' encoding='utf-8' standalone='yes'?>");
    -		printf ("<Diagnostics>");
    -		PrintWatchdogReport (plc, version);
    -		PrintCheckpointReport (plc, version);
    -		printf ("</Diagnostics>\n");
    -		return (0);
    -	}
    -	PrintRawWatchdogReport (plc);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"cCei:qvx",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros INT6x00 Log Retrieval Utility",
    -		"c\tcustom report",
    -		"C\tclear report",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		"x\tprint watchdog report in XML format",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	plc.readaction = WD_ACTION_READ;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'C':
    -			plc.readaction |= WD_ACTION_CLEAR;
    -			break;
    -		case 'c':
    -			plc.readaction |= WD_ACTION_CUSTOM;
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_XML_FORMAT);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc != 1)
    -	{
    -		if (plc.rpt.file != -1)
    -		{
    -			error (1, ECANCELED, PLC_NODEVICE);
    -		}
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -
    -#if defined (WIN32)
    -
    -	if (format == INT6KLOG_FMT_RAW)
    -	{
    -		setmode (STDOUT_FILENO, O_BINARY);
    -	}
    -
    -#endif
    -
    -	if (!argc)
    -	{
    -		Diagnostics (&plc);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		Diagnostics (&plc);
    -		argc--;
    -		argv++;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcmdio16.1.html b/docbook/plcmdio16.1.html deleted file mode 100644 index 5947852e..00000000 --- a/docbook/plcmdio16.1.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - plcmdio16.1 - - - - - - - - - -
    -plcmdio16(1)                                 Qualcomm Atheros Open Powerline Toolkit                                plcmdio16(1)
    -
    -NAME
    -       plcmdio16 - Qualcomm Atheros 16-bit MDIO Register Editor
    -
    -SYNOPSIS
    -       plcmdio16 [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       Read  or write generic MDIO registers using the Qualcomm Atheros VS_MDIO_COMMAND vendor-specific management message.  The
    -       default operation is to read a register.  Registers are written only if data is specified on the command line.  This pro‐
    -       gram replaces program int6kmdio.
    -
    -       This program writes MDIO instructions using 802.3 Clause 22 (phy, reg, data and mask) format.  See program plcmdio162 for
    -       a similar program to write instructions using 802.3ae Clause 45 (address, data and mask) format.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  It replaces legacy program int6kmdio.  See the  plc  man
    -       page for an overview and installation instructions.
    -
    -OPTIONS
    -       -d data
    -              A  16-bit  data  value  to be inserted into the specified register.  The specified data value is written when this
    -              option is present; otherwise the specified register is read and the content is  displayed.   Data  values  may  be
    -              expressed  in decimal, hexadecimal or binary notation.  Hexadecimal values are prefixed with "0x" or "0X".  Binary
    -              values are prefixed with "0b" or "0B".
    -
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -p address
    -              The 5-bit PHY address.  Some devices may not support all possible addresses.  Addresses may be expressed in  deci‐
    -              mal,  hexadecimal  or binary notation.  Hexadecimal values must be prefixed with "0x" or "0X".  Binary values must
    -              be prefixed with "0b" or "0B".
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -r register
    -              The 5-bit register address.  Addresses may be expressed in decimal, hexadecimal or binary  notation.   Hexadecimal
    -              values  must  be  prefixed with "0x" or "0X".  Binary values must be prefixed with "0b" or "0B".  Some devices may
    -              not support all possible addresses.
    -
    -       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
    -
    -       -?,--help
    -              Displays program help information on stderr.  This option takes precedence over all other options on  the  command
    -              line except version information.
    -
    -       -!,--version
    -              Displays  program  version information on stderr.  This option takes precedence over all other options on the com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       device The MAC address of some powerline device.  More than one address may be specified.  If more than  one  address  is
    -              specified  then  operations  are performed on each device in turn.  The default address is local.  See DEVICES for
    -              information about symbolic device addresses.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
    -              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
    -              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       None.
    -
    -SEE ALSO
    -       plc(1), int6kmdio(1), plcmod(1), plcmdio32(1), mdioblock(1), mdioblock2(1),
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                plcmdio16(1)
    -
    - - - diff --git a/docbook/plcmdio16.c.html b/docbook/plcmdio16.c.html deleted file mode 100644 index 39412edd..00000000 --- a/docbook/plcmdio16.c.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - plcmdio16.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plcmdio16.c - Qualcomm Atheros 16-bit MDIO Register Editor
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <ctype.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../mme/mme.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Devices.c"
    -#include "../plc/Display.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexview.c"
    -#include "../tools/regview32.c"
    -#include "../tools/synonym.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/channel.c"
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define INT6KMDIO_RELATIVE (1 << 0)
    -#define INT6KMDIO_ABSOLUTE (1 << 1)
    -#define INT6KMDIO_REGISTER (1 << 2)
    -#define INT6KMDIO_HEADINGS (1 << 3)
    -#define INT6KMDIO_WRITE (1 << 4)
    -
    -/*====================================================================*
    - *
    - *   void function (struct channel * channel, uint32_t offset, uint32_t length, flag_t flags);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (struct channel * channel, uint8_t mode, uint8_t phy, uint8_t reg, uint16_t data)
    -
    -{
    -	struct message message;
    -	signed packetsize;
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_mdio_command_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t OPERATION;
    -		uint8_t PHY;
    -		uint8_t REG;
    -		uint16_t DATA;
    -	}
    -	* request = (struct vs_mdio_command_request *)(&message);
    -	struct __packed vs_mdio_command_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint16_t DATA;
    -		uint8_t PHY;
    -		uint8_t REG;
    -	}
    -	* confirm = (struct vs_mdio_command_confirm *)(&message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (&message, 0, sizeof (message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_MDIO_COMMAND | MMTYPE_REQ));
    -	request->OPERATION = mode;
    -	request->PHY = phy;
    -	request->REG = reg;
    -	request->DATA = HTOLE16 (data);
    -	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) == -1)
    -	{
    -		error (1, errno, CHANNEL_CANTSEND);
    -	}
    -	while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
    -	{
    -		if (UnwantedMessage (&message, packetsize, 0, (VS_MDIO_COMMAND | MMTYPE_CNF)))
    -		{
    -			continue;
    -		}
    -		if (confirm->MSTATUS)
    -		{
    -			error (0, 0, "%s (%0X): %s", MMECode (confirm->qualcomm.MMTYPE, confirm->MSTATUS), confirm->MSTATUS, PLC_WONTDOIT);
    -			continue;
    -		}
    -		printf (" phy 0x%02X", confirm->PHY);
    -		printf (" reg 0x%02X", confirm->REG);
    -		printf (" data 0x%04X", confirm->DATA);
    -		printf ("\n");
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"d:ei:p:qr:v",
    -		"[device] [...]",
    -		"Qualcomm Atheros 16-bit MDIO Register Editor",
    -		"d n\tdata value is (n) [0x0000]",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"p n\tPHY number (n) [0xFF]",
    -		"q\tquiet mode",
    -		"r n\tregister number (n) [0xFF]",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	uint8_t mode = 0;
    -	uint8_t phy = 0;
    -	uint8_t reg = 0;
    -	uint16_t data = 0;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'd':
    -			mode = 1;
    -			data = (uint16_t)(uintspec (optarg, 0, 0xFFFF));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'p':
    -			phy = (uint8_t)(uintspec (optarg, 0, 0x1F));
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			break;
    -		case 'r':
    -			reg = (uint8_t)(uintspec (optarg, 0, 0x1F));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!argc)
    -	{
    -		function (&channel, mode, phy, reg, data);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		function (&channel, mode, phy, reg, data);
    -		argv++;
    -		argc--;
    -	}
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcmdio32.1.html b/docbook/plcmdio32.1.html deleted file mode 100644 index 267913fa..00000000 --- a/docbook/plcmdio32.1.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - plcmdio32.1 - - - - - - - - - -
    -plcmdio32(1)                                 Qualcomm Atheros Open Powerline Toolkit                                plcmdio32(1)
    -
    -NAME
    -       plcmdio32 - Qualcomm Atheros 32-bit MDIO Register Editor
    -
    -SYNOPSIS
    -       plcmdio32 [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       Read  or  write  global  MDIO registers using multiple VS_MDIO_COMMAND vendor-specific management messages.  Commands are
    -       entered using 32-bit register and data values then converted to threeequivalen  16-bit commands.  The  default  operation
    -       is  to read a register.  Registers are written only if data is specified on the command line.  Thsi program replaces pro‐
    -       gram int6kmdio2.
    -
    -       This program writes MDIO instructions using 802.3ae Clause 45 (address, data and mask) format.  See program int6kmdio for
    -       a similar program to write instructions using 802.3 Clause 22 (phy, reg, data and mask) format.
    -
    -       This  program is part of the Qualcomm Atheros Powerline Toolkit.  It replaces legacy program int6kmdio2.  See the plc man
    -       page for an overview and installation instructions.
    -
    -OPTIONS
    -       -a address
    -              The 19-bit global register address.  Some devices may not  support  all  possible  addresses.   Addresses  may  be
    -              expressed  in  decimal,  hexadecimal  or  binary notation.  Hexadecimal values must be prefixed with "0x" or "0X".
    -              Binary values must be prefixed with "0b" or "0B".
    -
    -       -d data
    -              A 32-bit data value to be inserted into the specified register.  The specified data value  is  written  when  this
    -              option  is  present;  otherwise  the  specified register is read and the content is displayed.  Data values may be
    -              expressed in decimal, hexadecimal or binary notation.  Hexadecimal values are prefixed with "0x" or "0X".   Binary
    -              values are prefixed with "0b" or "0B".
    -
    -       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -h     When writing 32-bit values, write to the high-order register before the low-order register.  This option is needed
    -              in  cases  where the value in one register may affect the interpretation of some value written to the other regis‐
    -              ter.  This is not a common situation.
    -
    -       -i interface
    -              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
    -              interface.  This option then takes precedence over either default.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
    -
    -       -?,--help
    -              Displays  program  help information on stderr.  This option takes precedence over all other options on the command
    -              line except version information.
    -
    -       -!,--version
    -              Displays program version information on stderr.  This option takes precedence over all other options on  the  com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
    -              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
    -              information about symbolic device addresses.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
    -              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
    -              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for technical information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.  Consequently, public information may not be available.  Qualcomm Atheros  reserves  the  right  to  modify  message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       None.
    -
    -SEE ALSO
    -       plc(1), plcmod(1), plcmdio16(1), mdioblock(1), mdioblock2(1), mdiodump(1), mdiogen(1)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                plcmdio32(1)
    -
    - - - diff --git a/docbook/plcmdio32.c.html b/docbook/plcmdio32.c.html deleted file mode 100644 index 0ee1bf4c..00000000 --- a/docbook/plcmdio32.c.html +++ /dev/null @@ -1,480 +0,0 @@ - - - - - - plcmdio32.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plcmdio32.c - Qualcomm Atheros 32-bit MDIO Register Editor
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Matthieu Poullet <m.poullet@avm.de>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <ctype.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../mme/mme.h"
    -#include "../mdio/mdio.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Devices.c"
    -#include "../plc/Display.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexview.c"
    -#include "../tools/regview32.c"
    -#include "../tools/synonym.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/channel.c"
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define MDIO_FLAG_REVERSE (1 << 0)
    -
    -#define MDIO_MODE_READ 0
    -#define MDIO_MODE_WRITE 1
    -
    -#define CODE_SHIFT 3
    -#define CODE_MASK (0x03 << CODE_SHIFT)
    -#define CODE_HIGH_ADDR 0x03
    -#define CODE_LOW_ADDR 0x02
    -
    -#define HIGH_ADDR_SHIFT 9
    -#define LOW_ADDR_SHIFT 1
    -
    -#define HIGH_ADDR_MASK (0x000003FF << HIGH_ADDR_SHIFT)
    -#define LOW_ADDR_MASK 0x000001FC
    -
    -/*====================================================================*
    - *
    - *   signed mdio (struct channel * channel, uint8_t mode, uint8_t phy, uint16_t * data);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed mdio (struct channel * channel, uint8_t mode, uint8_t phy, uint8_t reg, uint16_t * data)
    -
    -{
    -	struct message message;
    -	signed packetsize;
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_mdio_command_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t OPERATION;
    -		uint8_t PHY;
    -		uint8_t REG;
    -		uint16_t DATA;
    -	}
    -	* request = (struct vs_mdio_command_request *)(&message);
    -	struct __packed vs_mdio_command_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint16_t DATA;
    -		uint8_t PHY;
    -		uint8_t REG;
    -	}
    -	* confirm = (struct vs_mdio_command_confirm *)(&message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (&message, 0, sizeof (message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_MDIO_COMMAND | MMTYPE_REQ));
    -	request->OPERATION = mode;
    -	request->PHY = phy;
    -	request->REG = reg;
    -	request->DATA = HTOLE16 (*data);
    -
    -#if 1
    -
    -	printf (" phy 0x%02X", phy);
    -	printf (" reg 0x%02X", reg);
    -	printf (" data 0x%04X", * data);
    -	printf ("\n");
    -
    -#endif
    -
    -	if (sendpacket (channel, &message, (ETHER_MIN_LEN - ETHER_CRC_LEN)) == -1)
    -	{
    -		error (1, errno, CHANNEL_CANTSEND);
    -	}
    -	while ((packetsize = readpacket (channel, &message, sizeof (message))) > 0)
    -	{
    -		if (UnwantedMessage (&message, packetsize, 0, (VS_MDIO_COMMAND | MMTYPE_CNF)))
    -		{
    -			continue;
    -		}
    -		if (confirm->MSTATUS)
    -		{
    -			error (0, 0, "%s (%0X): %s", MMECode (confirm->qualcomm.MMTYPE, confirm->MSTATUS), confirm->MSTATUS, PLC_WONTDOIT);
    -			continue;
    -		}
    -		*data = confirm->DATA;
    -		return (0);
    -	}
    -	return (-1);
    -}
    -
    -/*====================================================================*
    - *
    - *   void function (struct channel * channel, uint8_t mode, uint32_t address, uint32_t content, flag_t flags);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (struct channel * channel, uint8_t mode, uint32_t address, uint32_t content, flag_t flags)
    -
    -{
    -	uint8_t phy;
    -	uint8_t reg;
    -	uint16_t mdio_data;
    -	uint16_t high_addr = (address & HIGH_ADDR_MASK) >> HIGH_ADDR_SHIFT;
    -	uint16_t low_addr = (address & LOW_ADDR_MASK) >> LOW_ADDR_SHIFT;
    -
    -/*
    - *   supply chip with high address bytes
    - */
    -
    -	phy = CODE_HIGH_ADDR << CODE_SHIFT;
    -	reg = 0;
    -	mdio_data = high_addr;
    -	if (mdio (channel, MDIO_MODE_WRITE, phy, reg, &mdio_data))
    -	{
    -		error (1, 0, "could not set high address bits");
    -	}
    -	if (_allclr (flags, MDIO_FLAG_REVERSE))
    -	{
    -
    -/*
    - *   supply chip with first low address bytes and first data chunk
    - */
    -
    -		phy = CODE_LOW_ADDR << CODE_SHIFT;
    -		phy |= (low_addr & 0xE0) >> 5;
    -		reg = (low_addr & 0x1F);
    -		mdio_data = (content & 0x0000FFFF);
    -		if (mdio (channel, mode, phy, reg, &mdio_data))
    -		{
    -			error (1, 0, "could not read low 16bits");
    -		}
    -		if (mode == MDIO_MODE_READ)
    -		{
    -			content = mdio_data;
    -		}
    -
    -/*
    - *   supply chip with second low address bytes and second data chunk
    - */
    -
    -		phy = CODE_LOW_ADDR << CODE_SHIFT;
    -		phy |= (low_addr & 0xE0) >> 5;
    -		reg = (low_addr & 0x1F) | 0x01;
    -		mdio_data = (content & 0xFFFF0000) >> 16;
    -		if (mdio (channel, mode, phy, reg, &mdio_data))
    -		{
    -			error (1, 0, "could not read high 16bits");
    -		}
    -		if (mode == MDIO_MODE_READ)
    -		{
    -			content |= (mdio_data << 16);
    -			printf ("0x%08x: 0x%08x\n", address, content);
    -		}
    -	}
    -	else
    -	{
    -
    -/*
    - *   supply chip with second low address bytes and second data chunk
    - */
    -
    -		phy = CODE_LOW_ADDR << CODE_SHIFT;
    -		phy |= (low_addr & 0xE0) >> 5;
    -		reg = (low_addr & 0x1F) | 0x01;
    -		mdio_data = (content & 0xFFFF0000) >> 16;
    -		if (mdio (channel, mode, phy, reg, &mdio_data))
    -		{
    -			error (1, 0, "could not read high 16bits");
    -		}
    -		if (mode == MDIO_MODE_READ)
    -		{
    -			content = (mdio_data << 16);
    -		}
    -
    -/*
    - *   supply chip with first low address bytes and first data chunk
    - */
    -
    -		phy = CODE_LOW_ADDR << CODE_SHIFT;
    -		phy |= (low_addr & 0xE0) >> 5;
    -		reg = (low_addr & 0x1F);
    -		mdio_data = (content & 0x0000FFFF);
    -		if (mdio (channel, mode, phy, reg, &mdio_data))
    -		{
    -			error (1, 0, "could not read low 16bits");
    -		}
    -		if (mode == MDIO_MODE_READ)
    -		{
    -			content |= mdio_data;
    -			printf ("0x%08x: 0x%08x\n", address, content);
    -		}
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"a:d:ehi:qv",
    -		"[device] [...]",
    -		"Qualcomm Atheros 32-bit MDIO Register Editor",
    -		"a n\taddress is (n) [0x00000000]",
    -		"d n\tcontent is (n) [0x00000000]",
    -		"e\tredirect stderr to stdout",
    -		"h\tsend high-order data before low-order data",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	flag_t flags = (flag_t)(0);
    -	uint8_t mode = MDIO_MODE_READ;
    -	uint32_t address = 0;
    -	uint32_t content = 0;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'a':
    -			address = (uint32_t)(uintspec (optarg, 0, 0x0007FFFF));
    -			if (address & 0x03)
    -			{
    -				error (1, 0, "address must be on an even 4 byte boundary");
    -			}
    -			break;
    -		case 'd':
    -			mode = MDIO_MODE_WRITE;
    -			content = (uint32_t)(uintspec (optarg, 0, 0x0FFFFFFFF));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			break;
    -		case 'r':
    -			_setbits (flags, MDIO_FLAG_REVERSE);
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!argc)
    -	{
    -		function (&channel, mode, address, content, flags);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		function (&channel, mode, address, content, flags);
    -		argv++;
    -		argc--;
    -	}
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcotst.1.html b/docbook/plcotst.1.html deleted file mode 100644 index 98a2594c..00000000 --- a/docbook/plcotst.1.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - plcotst.1 - - - - - - - - - -
    -plcotst(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plcotst(1)
    -
    -NAME
    -       plcotst - PLC One-Time Self-Test Manager
    -
    -SYNOPSIS
    -       plcotst [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       Manage the PLC One-Time Self-Test feature on Atheros powerline devices.  Normally, selftest is performed once, on startup
    -       at the factory, but it can also be configured and run again using this utility.   Selftest  results  are  stored  by  the
    -       firmware  and  can be read using this utility, as well.  The selftest is configured when configuration options are speci‐
    -       fied on the command line; otherwise, selftest results are read or cleared.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -c  version Configuration version number.  Permitted values are 0 through 255.  The default is 0.  This option applies to
    -       both selftest configuration and selftest results.
    -
    -       -C     Clear stored selftest results.  This option clears stored selftest results.  This option implies selftest  results
    -              and supercedes options -d, -f, -m, -r and -R, if present on the command line.
    -
    -       -d seconds
    -              Delay  selftest  after  reboot.   Permitted delay times are 0 through UINT_MAX seconds.  The default is 0 seconds.
    -              This option implies selftest configuration and supercedes option -C, if present on the command line.
    -
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -f count
    -              Run  the  flash  memory selftest count times.  Valid values are 0 through UINT_MAX.  The default is 0 which effec‐
    -              tively suppresses the test.  This option implies selftest configuration and supercedes option -C,  if  present  on
    -              the command line.
    -
    -       -m count
    -              Run  the  memory  selftest  count  times.  Valid values are 0 through UINT_MAX.  The default is 0 which suppresses
    -              effectively the test.  This option implies selftest configuration and supercedes option -C, if present on the com‐
    -              mand line.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -r flag
    -              Run  selftest  after reboot.  Permitted values are 0 through 255.  Expected values are 0 for false and 1 for true.
    -              The default is 1.  If the memory test count and flash test count are both 0 no testing will occur  when  the  time
    -              comes.  This option implies selftest configuration and supercedes option -C, if present on the command line.
    -
    -       -R flag
    -              Reset device after selftest.  Permitted values are 0 through 255.  Expected values are 0 for false and 1 for true.
    -              The default is 0.  This option applies to selftest configuration only and supercedes option -C, if present on  the
    -              command line.
    -
    -       -t timeout
    -              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
    -              be saved as text files for reference.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The  Ethernet  hardware  address  of some powerline device.  More than one address may be specified on the command
    -              line.  If more than one address is specified then operations are performed on each device in  turn.   The  default
    -              address is local.  as explained in the DEVICES section.
    -
    -EXAMPLES
    -       The  following  example prints stored test results for the local device on stdout because no options are specified on the
    -       command line.
    -
    -          # plcotst
    -
    -       The next example prints stored test results for remote device 00:B0:52:BA:BE:DE and clears them afterwards.
    -
    -          # plcotst -C
    -
    -       The next example configures the PLC selftest to wait 5 seconds before execution because option -d is  present.   It  also
    -       configures the selftest to reset the device after execution because option -R is present
    -
    -          # plcotst -d 5 -R
    -
    -REFERENCES
    -       See the Qualcomm Atheros Powerline Firmware Technical Reference Manual for more information about firmware selftest.
    -
    -DISCLAIMER
    -       None.
    -
    -SEE ALSO
    -       plc(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plcotst(1)
    -
    - - - diff --git a/docbook/plcotst.c.html b/docbook/plcotst.c.html deleted file mode 100644 index a1b8ce5e..00000000 --- a/docbook/plcotst.c.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - - - plcotst.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plcotst.c - Atheros PLC One-Time Self-Test Manager;
    - *
    - *   Use VS_SELFTEST_ONETIME_CONFIG and VS_SELFTEST_RESULTS message
    - *   type to configure the Atheros PLC One-Time Self-Test then read
    - *   and display stored selftest results;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../plc/Devices.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/synonym.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCOTST_MVERSION 0
    -#define PLCOTST_RUNAFTERRESET 1
    -#define PLCOTST_DELAYTORUN 0
    -#define PLCOTST_MEMRUNS 0
    -#define PLCOTST_FLASHRUNS 0
    -#define PLCOTST_RESETONDONE 0
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed selftest
    -
    -{
    -	uint8_t MVERSION;
    -	uint8_t RUNAFTERRESET;
    -	uint32_t DELAYTORUN;
    -	uint32_t MEMRUNS;
    -	uint32_t FLASHRUNS;
    -	uint8_t RESETONDONE;
    -}
    -
    -selftest;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *
    - *   signed configure (struct plc * plc, struct selftest * selftest);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed configure (struct plc * plc, struct selftest * selftest)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_selftest_onetime_config_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MVERSION;
    -		uint8_t RUNAFTERRESET;
    -		uint32_t DELAYTORUN;
    -		uint32_t MEMRUNS;
    -		uint32_t FLASHRUNS;
    -		uint8_t RESETONDONE;
    -	}
    -	* request = (struct vs_selftest_onetime_config_request *) (message);
    -	struct __packed vs_selftest_onetime_config_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -	}
    -	* confirm = (struct vs_selftest_onetime_config_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	Request (plc, "Configure One-Time Self-Test");
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_SELFTEST_ONETIME_CONFIG | MMTYPE_REQ));
    -	request->MVERSION = selftest->MVERSION;
    -	request->RUNAFTERRESET = selftest->RUNAFTERRESET;
    -	request->DELAYTORUN = HTOLE32 (selftest->DELAYTORUN);
    -	request->MEMRUNS = HTOLE32 (selftest->MEMRUNS);
    -	request->FLASHRUNS = HTOLE32 (selftest->FLASHRUNS);
    -	request->RESETONDONE = selftest->RESETONDONE;
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_SELFTEST_ONETIME_CONFIG | MMTYPE_CNF)) > 0)
    -	{
    -		if (confirm->MSTATUS)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -		Display (plc, "%s", "Configured");
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed retrieve (struct plc * plc, struct selftest * selftest);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed retrieve (struct plc * plc, struct selftest * selftest)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_selftest_results_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MVERSION;
    -		uint8_t MACTION;
    -	}
    -	* request = (struct vs_selftest_results_request *) (message);
    -	struct __packed vs_selftest_results_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MVERSION;
    -		uint8_t MSTATUS;
    -		uint32_t NUMBER [6];
    -	}
    -	* confirm = (struct vs_selftest_results_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	Request (plc, "Retrieve Self-Test Results");
    -	memset (message, 0, sizeof (* message));
    -	EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -	QualcommHeader (&request->qualcomm, 0, (VS_SELFTEST_RESULTS | MMTYPE_REQ));
    -	request->MVERSION = selftest->MVERSION;
    -	request->MACTION = plc->action;
    -	plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -	if (SendMME (plc) <= 0)
    -	{
    -		error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -		return (-1);
    -	}
    -	while (ReadMME (plc, 0, (VS_SELFTEST_RESULTS | MMTYPE_CNF)) > 0)
    -	{
    -		if ((confirm->MSTATUS == 2) || (confirm->MSTATUS == 4) || (confirm->MSTATUS == 6))
    -		{
    -			Display (plc, "Memory test %d Passed %d Failed %d  Flash test %d Passed %d Failed %d", LE32TOH (confirm->NUMBER [0]), LE32TOH (confirm->NUMBER [1]), LE32TOH (confirm->NUMBER [2]), LE32TOH (confirm->NUMBER [3]), LE32TOH (confirm->NUMBER [4]), LE32TOH (confirm->NUMBER [5]));
    -			continue;
    -		}
    -		if (confirm->MSTATUS == 3)
    -		{
    -			Failure (plc, "%d seconds remaining", LE32TOH (confirm->NUMBER [0]));
    -			continue;
    -		}
    -		if (confirm->MSTATUS)
    -		{
    -			Failure (plc, PLC_WONTDOIT);
    -			continue;
    -		}
    -		Confirm (plc, "Cleared Results");
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed manager (struct plc * plc, struct selftest * selftest);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed manager (struct plc * plc, struct selftest * selftest)
    -
    -{
    -	if (_anyset (plc->flags, PLC_CONFIGURE))
    -	{
    -		configure (plc, selftest);
    -	}
    -	if (_anyset (plc->flags, PLC_RESULTS))
    -	{
    -		retrieve (plc, selftest);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"c:Cd:ef:i:m:qr:R:t:vx",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros Powerline One-Time Self-Test Manager",
    -		"c n\tconfiguration version",
    -		"C\tclear selftest results",
    -		"d n\tdelay selftest start by (n) seconds [" LITERAL (PLCOTST_DELAYTORUN) "]",
    -		"e\tredirect stderr to stdout",
    -		"f n\trun flash selftest (n) times [" LITERAL (PLCOTST_FLASHRUNS) "]",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"m n\trun memory selftest (n) times [" LITERAL (PLCOTST_MEMRUNS) "]",
    -		"q\tquiet mode",
    -		"r n\trun selftest after reset [" LITERAL (PLCOTST_RUNAFTERRESET) "]",
    -		"R n\treset after selftest completes [" LITERAL (PLCOTST_RESETONDONE) "]",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	struct selftest selftest =
    -	{
    -		PLCOTST_MVERSION,
    -		PLCOTST_RUNAFTERRESET,
    -		PLCOTST_DELAYTORUN,
    -		PLCOTST_MEMRUNS,
    -		PLCOTST_FLASHRUNS,
    -		PLCOTST_RESETONDONE
    -	};
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'c':
    -			selftest.MVERSION = (uint8_t)(uintspec (optarg, 0, UCHAR_MAX));
    -			break;
    -		case 'C':
    -			_setbits (plc.flags, PLC_RESULTS);
    -			plc.action = 1;
    -			break;
    -		case 'd':
    -			_setbits (plc.flags, PLC_CONFIGURE);
    -			selftest.DELAYTORUN = (uint32_t)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'f':
    -			_setbits (plc.flags, PLC_CONFIGURE);
    -			selftest.FLASHRUNS = (uint32_t)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'm':
    -			_setbits (plc.flags, PLC_CONFIGURE);
    -			selftest.MEMRUNS = (uint32_t)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'r':
    -			_setbits (plc.flags, PLC_CONFIGURE);
    -			selftest.RUNAFTERRESET = (uint8_t)(uintspec (optarg, false, true));
    -			break;
    -		case 'R':
    -			_setbits (plc.flags, PLC_CONFIGURE);
    -			selftest.RESETONDONE = (uint8_t)(uintspec (optarg, false, true));
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (_allclr (plc.flags, (PLC_CONFIGURE | PLC_RESULTS)))
    -	{
    -		_setbits (plc.flags, PLC_RESULTS);
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		manager (&plc, &selftest);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		manager (&plc, &selftest);
    -		argv++;
    -		argc--;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcrate.1.html b/docbook/plcrate.1.html deleted file mode 100644 index c113b4fb..00000000 --- a/docbook/plcrate.1.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - plcrate.1 - - - - - - - - - -
    -plcrate(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plcrate(1)
    -
    -NAME
    -       plcrate - Qualcomm Atheros AR7x00 PHY Rate Monitor
    -
    -SYNOPSIS
    -       plcrate [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       The  Atheros  PHY  Rate Utility polls one or more devices and prints the average transmit and receive PHY rates between a
    -       device and each neighboring network device.  Output is column-oriented and suitable for loading  into  a  spreadsheet  or
    -       being read by a simple program.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -CHIPSETS
    -       QCA6410, QCA7000, QCA7420
    -
    -OPTIONS
    -       -c     Display coded PHY rates.  Coded PHY rates are displayed by default so this option is redundant  but  it  has  been
    -              kept for backword compatibility.  This option and option -u are mutually exclusive.
    -
    -       -d seconds
    -              Traffic  duration in seconds per connection.  Directional traffic is systematically sent between each pair of pow‐
    -              erline network devices for this period of time.  Consequently, the total time needed to generate  traffic  between
    -              all network devices will be approximately n! times this value, so don''t get carried away.  The minimum value is 1
    -              second and the maximum value is 60 seconds.
    -
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -n     Reads the average transmit and receive PHY rate for wach device using VS_NW_INFO and prints it  on  stdout.   Each
    -              output  line  displays  the  ethernet  interface,  source  address, destination address and either the transmit or
    -              receive PHY rate.
    -
    -       -o milliseconds
    -              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -q     Enter quiet mode.  Progress messages are suppressed.
    -
    -       -r     Reads device hardware and software revision information using VS_SW_VER and prints it on stdout.
    -
    -       -R     Resets the device using VS_RS_DEV.
    -
    -       -t     Generate  powerline traffic between the local device and each remote device on each powerline network connected to
    -              the host.  It does not generate any traffic between remote powerline device pairs.  This option is especially use‐
    -              ful  when  remote  powerline  devices are not connected to Ethernet devices capable of sending traffic back to the
    -              host.
    -
    -       -T     Generate powerline traffic between all devices on each powerline network connected to the host.   This  option  is
    -              similar  to  option  -t  but it takes much longer because traffic is systematically generated between each pair of
    -              powerline devices.  Consequently, the time to complete will increase factorially as the number of network  devices
    -              increases.  Such complete traffic path coverage is not always needed.
    -
    -       -u     Display  un-coded  PHY  rates.   Coded PHY rates are displayed by default.  This option and option -c are mutually
    -              exclusive.
    -
    -       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
    -
    -       -x     Exit program on first error with a non-zero exit code.  This option allows  shell  scripts  to  detect  failed  or
    -              incomplete operations and take the appropriate action.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
    -              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
    -              information about symbolic device addresses.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
    -              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
    -              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -EXAMPLES
    -       The  following  example  displays  the  average  transmit and receive PHY rates from each of two devices.  One is a local
    -       device connected to interface eth2 and the other is a remote device at the far end of the powerline.  In this case,  they
    -       are the only two devices on the powerline network.  Observe the recipricol rates shown.
    -
    -          # plcrate -ni eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB
    -          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB TX 163 mbps
    -          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB RX 176 mbps
    -          eth2 00:B0:52:00:00:BB 00:B0:52:00:00:AA TX 176 mbps
    -          eth2 00:B0:52:00:00:BB 00:B0:52:00:00:AA RX 163 mbps
    -
    -       The  following  example  generates powerline traffic between the local device and each remote device because option -t is
    -       present.  It then displays the PHY rate read from the local device.
    -
    -          # plcrate -tni eth2
    -          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB TX 163 mbps
    -          eth2 00:B0:52:00:00:AA 00:B0:52:00:00:BB RX 176 mbps
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
    -       gram.
    -
    -SEE ALSO
    -       PLC(1), amprate(1), int6krate(1)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plcrate(1)
    -
    - - - diff --git a/docbook/plcrate.c.html b/docbook/plcrate.c.html deleted file mode 100644 index 0d8b50e0..00000000 --- a/docbook/plcrate.c.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - plcrate.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *    plcrate.c -
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/chipset.c"
    -#include "../plc/Devices.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/LocalDevices.c"
    -#include "../plc/PLCSelect.c"
    -#include "../plc/ResetDevice.c"
    -#include "../plc/PhyRates2.c"
    -#include "../plc/Traffic2.c"
    -#include "../plc/NetworkTraffic2.c"
    -#include "../plc/Antiphon.c"
    -#include "../plc/Transmit.c"
    -#include "../plc/VersionInfo2.c"
    -#include "../plc/WaitForStart.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/error.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/synonym.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/QualcommHeader1.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCRATE_WAIT 0
    -#define PLCRATE_LOOP 1
    -
    -/*====================================================================*
    - *
    - *   void manager (struct plc * plc, signed count, signed pause);
    - *
    - *   perform operations in logical order despite any order specfied
    - *   on the command line;
    - *
    - *   operation order is controlled by the order of "if" statements
    - *   shown here; the entire sequence can be repeated with optional
    - *   pause between each iteration;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void manager (struct plc * plc, signed count, signed pause)
    -
    -{
    -	while (count--)
    -	{
    -		if (_anyset (plc->flags, PLC_VERSION))
    -		{
    -			VersionInfo2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_LOCAL_TRAFFIC))
    -		{
    -			Traffic2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_NETWORK_TRAFFIC))
    -		{
    -			NetworkTraffic2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_NETWORK))
    -		{
    -			PhyRates2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_RESET_DEVICE))
    -		{
    -			ResetDevice (plc);
    -		}
    -		sleep (pause);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"cd:ei:l:o:nqrRtTuvw:x",
    -		"device [device] [...]",
    -		"Qualcomm Atheros PLC PHY Rate Monitor",
    -		"c\tdisplay coded PHY rates",
    -		"d n\ttraffic duration is (n) seconds per leg [" LITERAL (PLC_ECHOTIME) "]",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"l n\tloop (n) times [" LITERAL (PLCRATE_LOOP) "]",
    -		"n\tnetwork TX/RX information",
    -		"o n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"q\tquiet mode",
    -		"r\trequest device information",
    -		"R\treset device with VS_RS_DEV",
    -		"t\tgenerate network traffic (one-to-many)",
    -		"T\tgenerate network traffic (many-to-many)",
    -		"u\tdisplay uncoded PHY rates",
    -		"v\tverbose mode",
    -		"w n\twait (n) seconds [" LITERAL (PLCRATE_WAIT) "]",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed loop = PLCRATE_LOOP;
    -	signed wait = PLCRATE_WAIT;
    -	signed c;
    -	optind = 1;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	plc.timer = PLC_ECHOTIME;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'c':
    -			_clrbits (plc.flags, PLC_UNCODED_RATES);
    -			break;
    -		case 'd':
    -			plc.timer = (unsigned)(uintspec (optarg, 1, 60));
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'l':
    -			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'n':
    -			_setbits (plc.flags, PLC_NETWORK);
    -			break;
    -		case 'o':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'q':
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'r':
    -			_setbits (plc.flags, PLC_VERSION);
    -			break;
    -		case 'R':
    -			_setbits (plc.flags, PLC_RESET_DEVICE);
    -			break;
    -		case 't':
    -			_setbits (plc.flags, PLC_LOCAL_TRAFFIC);
    -			break;
    -		case 'T':
    -			_setbits (plc.flags, PLC_NETWORK_TRAFFIC);
    -			break;
    -		case 'u':
    -			_setbits (plc.flags, PLC_UNCODED_RATES);
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'w':
    -			wait = (unsigned)(uintspec (optarg, 0, 3600));
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (_allclr (plc.flags, (PLC_VERSION | PLC_LOCAL_TRAFFIC | PLC_NETWORK_TRAFFIC | PLC_RESET_DEVICE)))
    -	{
    -		_setbits (plc.flags, PLC_NETWORK);
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		manager (&plc, loop, wait);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		manager (&plc, loop, wait);
    -		argv++;
    -		argc--;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcrule.1.html b/docbook/plcrule.1.html deleted file mode 100644 index 0f9e22d5..00000000 --- a/docbook/plcrule.1.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - plcrule.1 - - - - - - - - - -
    -plcrule(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plcrule(1)
    -
    -NAME
    -       plcrule - Stream Classification Utility
    -
    -SYNOPSIS
    -       plcrule [options] action operand condition [condition] [condition] control volatility [device] [device] [...]
    -
    -       where condition is a field operator value sequence.
    -
    -DESCRIPTION
    -       Format  and  send  stream  classification rules to one or more devices.  Rules specify an action to be taken when a frame
    -       satisfies selection criteria.  Selection criteria consists of one, two or three conditions where any  or  all  conditions
    -       must  be satisfied.  Each condition consists of a field type, a relational operator and a value.  Rules may be added to a
    -       device, or removed from a device, so that they have permanent or temporary effect.
    -
    -       Classification rules are cumulative.  If a new rule set is identical to an old rule set then an error will  occur  unless
    -       it  contains a different Transmission Action.  In that case the old rule will be replaced.  Identical classification rule
    -       sets are permitted if one of the sets is associated with a VLAN tag action.  Classification  is  based  on  the  original
    -       frame before is is altered by VLAN Tag insertion or removal.
    -
    -       Classification  is  multi-dimensional  and  the  terminology  used here may seem strange at first.  Refer to the Qualcomm
    -       Atheros Firmware Techncial Reference Manual description of the VS_CLASSIFICATION management message for a  full  explana‐
    -       tion.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -r     Read rules from a device and display them on stdout.
    -
    -       -s     Print a list of program keywords on stdout.  This option over-rides all others, except -? and -!, and the  program
    -              will terminate without further action.
    -
    -       -t milliseconds
    -              Read  timeout  in  milliseconds.   Values  range  from 0 through UINT_MAX.  This is the maximum time allowed for a
    -              response.  The default is shown in brackets on the program menu.  -T tag The VLAN tag to be inserted  into  frames
    -              before  they  are transmitted.  The tag is a 32-bit hexadecimal integer with optional "0x" prefix.  This option is
    -              required for action TagTX and must be omitted for all other actions.
    -
    -       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
    -              be saved as text files for reference.
    -
    -       -V version
    -              The  CSPEC  version  number  expressed  as a small decimal integer.  This option is required (and should be 2) for
    -              action TagTX and must be omitted for all other actions.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       action The action to be taken for frames that meet any (or  all)  selection  criteria.   Valid  actions  are  listed  and
    -              described under ACTIONS.
    -
    -       operand
    -              The  operand  specifies the logical relationship between conditions before the action to be taken.  Valid operands
    -              are listed and described under OPERANDS.
    -
    -       condition
    -              A conditional expression consisting of a field, operator and value.  See CONDITIONS for more information.
    -
    -       control
    -              The control specifies the action to be taken by the device upon receipt of the rule.  The basic actions are to add
    -              it to, or remove it from, the list of existing rules.  Valid controls are listed and described under CONTROLS.
    -
    -       volatility
    -              The  volatility  specifies  the  effective lifetime of the rule.  Temoprary rules are stored in SDRAM and are lost
    -              then the device is reset.  Permanent rules are stored in NVRAM and are restored after the device is reset.   Valid
    -              volatilities are listed and described under VOLATILITY.
    -
    -       device The  MAC  address  of some powerline device.  More than one address may be specified on the command line.  If more
    -              than one address is specified then operations are performed on each  device  in  turn.   The  default  address  is
    -              "local".  See DEVICES for more information.
    -
    -ACTIONS
    -       Actions  indcate  the  disposition  of frames that match selection criteria.  They are expressed as discrete alphanumeric
    -       strings entered in upper, lower or mixed character case.  They are position sensitive.  Failure to enter a  known  action
    -       will results in an error message that lists permitted actions.
    -
    -       CAP0,CAP1,CAP2,CAP3
    -              Assign a specific Channel Access Priority to frames.
    -
    -       Drop,DropTX
    -              Do not forward frames over powerline.
    -
    -       DropRX Do not forward frames to host.
    -
    -       Boost  Boost frame priority to CAP3 for MMEs only.  At least one condition must be "MME".
    -
    -       StripTX
    -              Remove  the  VLAN Tag from frames before transmission over powerline.  This option checks for a VLAN Tag even when
    -              there are no VLAN related conditions.
    -
    -       StripRX
    -              Remove the VLAN Tag from frames before forwarding to host.  This option checks for a VLAN Tag even when there  are
    -              no VLAN related conditions.
    -
    -       TagTX  Insert a given VLAN Tag into frames before transmission over powerline.  This action requires option -T to specify
    -              the tag and option -V to specify the CSPEC version.
    -
    -OPERANDS
    -       The operand indicates the logical relationship that must exist between conditions in the rule set before  the  action  is
    -       applied  to  a frame.  Operands are expressed as discrete alphanumeric strings entered in upper, lower or mixed character
    -       case.  Failure to enter a known operand will result in an error message that lists permitted operands.  They are  positon
    -       sensitive.  One operand is allowed and it must appear after the action and before any condition.
    -
    -       Any    Apply the action to frames that satisfy any of the conditions.  This is equivalent to the logical or operation.
    -
    -       All    Apply the action to frames that satisfy all of the conditions.  This is equivalent to the logical and operation.
    -
    -       Always Apply the action to all frames.  All conditions are ignored.
    -
    -CONDITIONS
    -       A  condition consists of a field, an operator and a value.  One condition is required but three are permitted.  Condition
    -       order is not important but all conditions must appear after the operand and before the control.
    -
    -       field  The field is the part of the Ethernet frame to be examined.  Some fields are not valid for some actions  but  this
    -              program  does not enforce such rules since validation is performed by runtime firmware on each device.  Recognized
    -              fields are listed and described under FIELDS.
    -
    -       operator
    -              The operator specifies the relationsip that must exist between the field and value in order for the  condition  to
    -              evaluate  True.  Currently, only equality operators are supported.  Valid operators are listed and described under
    -              OPERATORS.
    -
    -       value  The value must be appropriate to the field type.  Some fields are MAC or IP addresses, some are integers, some are
    -              bitmaps  and  others  are states.  Integers and bitmaps may be expressed in binary, decimal or hexadecimal format.
    -              Binary values staRt with 0b.  Hexadecimal values start with 0x.  States are expressed using keywords.   Users  are
    -              responsible  for  knowing  how many bits are significant for each type of value.  Valid values are described along
    -              with fields under FIELDS.
    -
    -FIELDS
    -       Fields indicate the portion of the frame that is inspected during selection and the size and format of the value permited
    -       in the condition statement.  They are expressed as discrete alphanumeric strings entered in upper, lower or mixed charac‐
    -       ter case.  Failure to enter a known field will result in an error message that lists permitted fields.
    -
    -       ET     A 16-bit Ethertype expressed in hexadecimal with optional "0x" prefix.  The format is described in  IEEE  Standard
    -              802-2001 [4].
    -
    -       EthDA  A  48-bit Ethernet destination address expressed in hexadecimal.  Octets may be separated with optional colons for
    -              clarity.  The format is described in IEEE Standard 802-2001 [4].
    -
    -       EthSA  A 48-bit Ethernet source address expressed in hexadecimal.  Octets may be separated with optional colons for clar‐
    -              ity.  The format is described in IEEE Standard 802-2001 [4].
    -
    -       IPSP   A  16-bit  IP  source  port  expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
    -              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
    -
    -       IPDP   A 16-bit IP destination port expressed as a decimal integer.  This condition applies to either TCP or UDP packets,
    -              depending on the protocol used, and is valid only for actions "CAP0", "CAP1", "CAP2", "CAP3" and "Drop".
    -
    -       IPV4TOS
    -              An 8-bit Type-of-Service code where the format is defined in the RFC 791 (Internet Protocol) [14].
    -
    -       IPV4PROT
    -              An 8-bit Ethernet protocol code.  The format is defined in the RFC 791 (Internet Protocol) [14].
    -
    -       IPV4SA A 32-bit Internet Protocol source address expressed in dotted-decimal notation.  The official format is defined in
    -              RFC 791 (Internet Protocol) [14].  Our implementation permits empty octets and leading zeros within  fields.   For
    -              example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
    -
    -       IPV4DA A  32-bit  Internet  Protocol  destination  address  expressed  in dotted-decimal notation. The official format is
    -              defined in RFC 791 (internet Protocol) [14]. Our implementation permits empty  octets  and  leading  zeros  within
    -              fields. For example, "..." is equivalent to "0.0.0.0 and "127..000.001" is equivalent to "127.0.0.1".
    -
    -       IPV6TC An 8-bit Internet Protocol V6 traffic class expressed as defined in RFC 2460 (Internet Protocol Version 6) [17].
    -
    -       IPV6FL A  24-bit  IPV6  flow label where the lower 20 bits are the IPv6 Flow Label defined in RFC 2460 (Internat Protocol
    -              Version 6) [17].  The upper 4 bits should be zero.  The value can be entered either as a decimal,  binary  or  hex
    -              integer.
    -
    -       IPV6SA A  128-bit IPV6 source address expressed as colon-separated hexadecmial quartets (octet pairs).  The official for‐
    -              mat is defined in RFC 2460 (Internet Protocol Version 6) [17].  Our implementation permits multiple empty  fields,
    -              abreviated  fields  and  leading zeros within fields.  When multiple empty fields appear, the right-most occurance
    -              expands     to     multiple     zeros.      For     example,     "AAAA::BBBB::CCCC"     is      equivalent      to
    -              "AAAA:0000:BBBB:0000:0000:0000:0000:CCCC".
    -
    -       IPV6DA A  128-bit IPV6 destination address expressed as colon-separated hexadecimal quartets (octet pairs).  The official
    -              format is defined in RFC 2460 (Internet Protocol Version 6)  [17].   Our  implementation  permits  multiple  empty
    -              fields,  abbreviated  fields  and  leading zeros within fields.  When multiple empty fields appear, the right-most
    -              occurance expands to zeros.  For example, ":1::2" is equivalent to "0000:0001:0000:0000:0000:0000:0000:0002".
    -
    -       MME    A 24-bit Atheros HomePlugAV Management Message type expressed as a hex byte stream.  For clarity,  the  recommeded
    -              format  it  "xx:xxxx".   The  first  byte is the MMV.  The next two bytes are the MMTYPE.  Both are defined in the
    -              HomePlug AV Specification.  The MMTYPE will match all  MME  variants,  such  as  Request,  Confirm,  Indicate  and
    -              Response because the lower two bits are ignored.  This field is only valid for action "Boost".
    -
    -       TCPAck The  string  "True"  or "False" to indicate that the frame is (or is not) a TCP Acknowledgement.  Double negatives
    -              are allowed so "Is True" is equvalent to "Not False" and "Is False" is equivalent to "Not True".
    -
    -       TCPSP  A 16-bit TCP source port as a decimal integer.  The format is defined in RFC 793  (Transmission  Control  Protocol
    -              [15]).
    -
    -       TCPDP  A 16-bit TCP destination port expressed as a decimal integer.  The format is defined in RFC 793 (Transmission Con‐
    -              trol Protocol [15]).
    -
    -       UDPSP  A 16-bit UDP source port expressed as a decimal integer.  The format is defined in RFC 768 (User Datagram Protocol
    -              [13]).
    -
    -       UDPDP  A  16-bit  UDP  destination  port expressed as a decimal integer.  The format is defined in RFC 768 (User Datagram
    -              Protocol [13]).
    -
    -       VLANID A 16-bit VLAN identifier where the lower 12 bits are the VLAN Identifier (VID) defined  in  IEEE  Std  802.1Q-1998
    -              (Virtual Bridged Local Area Networks) [11].  The upper 4 bits should be zero.
    -
    -       VLANUP An  8-bit  Ethernet  VLAN tag where the lower 3 bits are the User Priority sub-field of a VLAN Tag defined in IEEE
    -              Std 802.1Q-1998 (Virtual Bridged Local Area Networks) [11].  The upper 5 bits should be zero.
    -
    -       VLANTag
    -              The string "Present" or "Missing" to indicate the presence (or absence) of one or more VLAN Tags within  a  frame.
    -              This  classifier  is  essentially  equivalent  to "ET Is 0x8100".  Double negatives are allowed so "Is Present" is
    -              equivalent to "Not Missing" and "Is Missing" is equivalent to "Not Present".
    -
    -OPERATORS
    -       An operator indicates an equality between a field and a value.  An operator is an alphanumeric string entered  in  upper,
    -       lower  or  mixed  character case.  Failure to enter a known operator will result in an error message that lists permitted
    -       operators.  Operators are position sensitive and must appear between each field and value.
    -
    -       Is     Indicates that the frame field must equal the associated value for the condition to evaluate true.
    -
    -       Not    Indicates that the frame field must not equal the associated value for the condition to evaluate true.
    -
    -STATES
    -       A state is a special case of value.
    -
    -       True,On,Yes,Present
    -              Indicates a positive state or presence of some entity.  All are equivalent and can be used interchangeably.   Dou‐
    -              ble negatives are permitted so "Is True" is equvalent to "Not False".
    -
    -       False,Off,No,Missing
    -              Indicates a negative state or absence of some entity.  All are equivalent and can be used interchangeably.  Double
    -              negatives are permitted so "Is False" is equvalent to "Not True".
    -
    -CONTROLS
    -       The control determines how the devices will handle the rule after it  is  validated.   It  is  expressed  as  a  discrete
    -       alphanumeric  string entered in upper, lower or mixed character case.  Failure to enter a known control will result in an
    -       error message that lists permitted controls.  The control is position sensitive and must occur after condition and before
    -       volatility.
    -
    -       Add    Adds the rule to the current list of rules unless a violation occurs.  In some cases, a rule may replace an exist‐
    -              ing rule instead of being added.
    -
    -       Rem,Remove
    -              Remove the rule from the current list of rules unless a violation occurs.
    -
    -VOLATILITY
    -       The volatility determines which device rule set will be affected by the action.  It is expressed as a  discrete  alphanu‐
    -       meric  string  entered  in  upper,  lower or mixed character case.  Failure to enter a known volatility will result in an
    -       error message that lists permitted volatilities.  The volatility is position sensitive and must occur after control.
    -
    -       Temp   The temporary rule set will be modified.  The temporary rule set resides in the working PIB stored in SDRAM.
    -
    -       Perm   The permanent rule set will be modified.  The permanent rule set resides in the user PIB stored in NVRAM.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal  digits  in upper, lower or mixed character case.  Octets may be separated with colons for clarity.  For example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A synonym for the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local,  remote  or  foreign
    -              recognize  messages sent to this address.  A remote device is any device at the far end of a powerline connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
    -              Atheros  devices  recognize  this address but remote and foreign devices do not.  A remote device is any device at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.  Consequently, public information is not available.  Qualcomm Atheros reserves the right to modify message structure
    -       or content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       This command adds a temporary classification rule to the classification table on  device  B00:B0:52:BA:BE:01.   The  rule
    -       instructs  the device to drop frames that match either (any) of two conditions.  The first condition states that the IPv4
    -       source address is 192.168.99.2.  The second conditon states that the IPv4 destination address is 192.168.99.100.
    -
    -          # plcrule drop any IPv4SA is 192.168.99.2 IPv4DA is 192.168.99.100 add temp 00:B0:52:BA:BE:01
    -
    -       Observe that the action, operand and conditions come first then the control and volatility then the affected devices.  Up
    -       to three conditions may be specified.  Keyword order is important.  Character case is not important.
    -
    -       The  following  example  prints  a  list of programmed keywords on stdout for reference.  The example shown here has been
    -       abbreviate due to formatting limitations.
    -
    -          # plcrule -t
    -
    -            Controls are 'Add'|'Rem'|'Remove'
    -            Volatilities are 'Temp'|'Perm'
    -            Actions are 'CAP0'|'CAP1'|'CAP2'|'CAP3'|'Boost'|...|'StripTX'|'StripRX'|'TagRX'
    -            Operands are 'All'|'Any'|'Always'
    -            Fields are 'EthDA'|'EthSA'|'VLANUP'|'VLANID'|'IPv4TOS'|...|'TCPAck'|'VLANTag'
    -            Operators are 'Is'|'Not'
    -
    -       More example follow:
    -
    -       Ethernet Address Rules
    -
    -       Ethernet address rules have the following general format:
    -
    -          | CAP0 | ANY | EthSA | IS  | xx:xx:xx:xx:xx:xx | ADD    | TEMP | xx:xx:xx:xx:xx:xx
    -          | CAP1 | ALL | EthDA | NOT |                   | REMOVE | PERM |
    -          | CAP2 |
    -          | CAP3 |
    -          | DROP |
    -
    -       For example, instruct device 00:B0:52:BA:BE:FF to temporarily add a rule to  forward  frames  from  00:2B:FE:CA:FE:BA  at
    -       CAP3.  Observe Ethernet hardware addresses are used both in the condition and for the affected powerline devices.
    -
    -          # plcrule cap3 any ethsa is 00:2b:fe:ca:fe:ba add temp 00:b0;52:ba:be:ff
    -
    -       IP Address Rules
    -
    -       IP address rules have the following general format:
    -
    -          | CAP0 | ANY | IPv4SA | IS  | ddd.ddd.ddd.ddd | ADD    | TEMP | xx:xx:xx:xx:xx:xx
    -          | CAP1 | ALL | IPv4DA | NOT |                 | REMOVE | PERM |
    -          | CAP2 |
    -          | CAP3 |
    -          | DROP |
    -
    -       For  example,  instruct  device  00:B0:52:BA:BE:FF  to  permanently remove the rule that drops packets from 192.168.99.1.
    -       Notice that the IP address is specified in dotted decimal format but the device address is specified in hexadecimal octet
    -       format.   Dotted decimal format permits empty and variable length octets but octet delimiters are mandatory.  Hexadecimal
    -       octet format requires fixed length octets but octet delimiters are optional.
    -
    -          # plcrule drop any ipv4sa is 192.168.99.1 remove perm 00:b0:52:ba:be:ff
    -
    -       IP Protocol Rules
    -
    -       IP protocol rules have the following general format:
    -
    -          | CAP0 | ANY | IPv4PROT | IS  | xxxx | ADD    | TEMP | xx:xx:xx:xx:xx:xx
    -          | CAP1 | ALL |          | NOT |      | REMOVE | PERM |
    -          | CAP2 |
    -          | CAP3 |
    -          | DROP |
    -
    -       For example, to instruct device 00:B0:52:BA:BE:FF to permanently add a rule to forward non-IP packets at CAP2.   In  this
    -       example, delmiters have been omitted from the device Ethernet address.
    -
    -          # plcrule CAP2 all ipv4prot not 0x0800 add perm 00b052babeff
    -
    -SEE ALSO
    -       plc(1), plcrate(1), plcstat(1), plctone(7)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plcrule(1)
    -
    - - - diff --git a/docbook/plcrule.c.html b/docbook/plcrule.c.html deleted file mode 100644 index 5d95afb9..00000000 --- a/docbook/plcrule.c.html +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - plcrule.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   plcrule.c - Qualcomm Atheros Message MakeRules Utility;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -#include "../plc/rules.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/basespec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/bytespec.c"
    -#include "../tools/ipv4spec.c"
    -#include "../tools/ipv6spec.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#include "../tools/synonym.c"
    -#include "../tools/assist.c"
    -#include "../tools/lookup.c"
    -#include "../tools/codelist.c"
    -#include "../tools/memout.c"
    -#include "../tools/reword.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/Request.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/Devices.c"
    -#include "../plc/rules.c"
    -#include "../plc/ParseRule.c"
    -#include "../plc/PrintRule.c"
    -#include "../plc/MakeRule.c"
    -#include "../plc/ReadRules.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/channel.c"
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCRULE_CSPEC_VERSION 0
    -#define PLCRULE_VLAN_TAG 0x00000000
    -#define COMMA ","
    -#define QUOTE "''"
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"ei:qrst:T:vV:",
    -		"action operand condition [...] control volatility [device] [...]\n\n          where a condition is: field operator value",
    -		"Qualcomm Atheros Stream MakeRules Utility",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"q\tquiet mode",
    -		"r\tread rules from device",
    -		"s\tdisplay symbol tables",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"T x\tinserted vlan tag is x [" LITERAL (PLCRULE_VLAN_TAG) "]",
    -		"v\tverbose mode",
    -		"V n\tcspec version is n [" LITERAL (PLCRULE_CSPEC_VERSION) "]",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	struct cspec cspec;
    -	struct MMERule rule;
    -	signed c;
    -	memset (& rule, 0, sizeof (rule));
    -	memset (& cspec, 0, sizeof (cspec));
    -	cspec.VLAN_TAG = PLCRULE_VLAN_TAG;
    -	cspec.CSPEC_VERSION = PLCRULE_CSPEC_VERSION;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while (~ (c = getoptv (argc, argv, optv)))
    -	{
    -		switch (c)
    -		{
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'r':
    -			_setbits (plc.flags, PLC_ANALYSE);
    -			break;
    -		case 's':
    -			printf ("\n");
    -			printf (" Controls are ");
    -			codelist (controls, SIZEOF (controls), COMMA, QUOTE, stdout);
    -			printf (".\n");
    -			printf (" Volatilities are ");
    -			codelist (volatilities, SIZEOF (volatilities), COMMA, QUOTE, stdout);
    -			printf (".\n");
    -			printf (" Actions are ");
    -			codelist (actions, SIZEOF (actions), COMMA, QUOTE, stdout);
    -			printf (".\n");
    -			printf (" Operands are ");
    -			codelist (operands, SIZEOF (operands), COMMA, QUOTE, stdout);
    -			printf (".\n");
    -			printf (" Fields are ");
    -			codelist (fields, SIZEOF (fields), COMMA, QUOTE, stdout);
    -			printf (".\n");
    -			printf (" Operators are ");
    -			codelist (operators, SIZEOF (operators), COMMA, QUOTE, stdout);
    -			printf (".\n");
    -			printf (" States are ");
    -			codelist (states, SIZEOF (states), COMMA, QUOTE, stdout);
    -			printf (".\n");
    -			printf ("\n");
    -			return (0);
    -		case 't':
    -			channel.timeout = (signed) (uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'T':
    -			cspec.VLAN_TAG = (uint32_t) (basespec (optarg, 16, sizeof (cspec.VLAN_TAG)));
    -			cspec.VLAN_TAG = htonl (cspec.VLAN_TAG);
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'V':
    -			cspec.CSPEC_VERSION = (uint16_t) (basespec (optarg, 10, sizeof (cspec.CSPEC_VERSION)));
    -			cspec.CSPEC_VERSION = HTOLE16 (cspec.CSPEC_VERSION);
    -			break;
    -		default: 
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (_allclr (plc.flags, PLC_ANALYSE))
    -	{
    -		if (ParseRule (& argc, & argv, & rule, & cspec) == -1)
    -		{
    -			error (1, 0, "invalid rule");
    -		}
    -	}
    -	openchannel (& channel);
    -	if (! (plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (! argc)
    -	{
    -		if (_anyset (plc.flags, PLC_ANALYSE))
    -		{
    -			ReadRules (& plc);
    -		}
    -		else 
    -		{
    -			MakeRule (& plc, & rule);
    -		}
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (! hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		if (_anyset (plc.flags, PLC_ANALYSE))
    -		{
    -			ReadRules (& plc);
    -		}
    -		else 
    -		{
    -			MakeRule (& plc, & rule);
    -		}
    -		argc--;
    -		argv++;
    -	}
    -	free (plc.message);
    -	closechannel (& channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcset.1.html b/docbook/plcset.1.html deleted file mode 100644 index 6cc97ae2..00000000 --- a/docbook/plcset.1.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - plcset.1 - - - - - - - - - -
    -plcset(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   plcset(1)
    -
    -NAME
    -       plcset - Qualcomm Atheros PLC Set Property
    -
    -SYNOPSIS
    -       plcset [options] [type data] [type data] [device] [device] [...]
    -
    -DESCRIPTION
    -       Set  a specific property value on an Qualcomm Atheros powerline device using the VS_SET_PROPERTY message.  Properties are
    -       specified using their numeric property identifier.  Property names are not supported.  Property values are entered  using
    -       type and data pairs.  Users familiar with program setpib should already understand this method of entering data values.
    -
    -       Only  selected properties can be set using this message type.  See the Qualcomm Atheros Firmware Technical Reference Man‐
    -       ual for supported property identifiers, versions, values and data formats.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.
    -
    -OPTIONS
    -       -e     Redirects stderr messages to stdout.  By convention status and error messages are printed on stderr while  primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -n number
    -              The  property  identifier  or  peoperty  version.  Property identifiers and versions are entered as 32-bit decimal
    -              integers.  Property names are not supported.  The default is 0.  This option may appear more than once on the com‐
    -              mand  line.   The first occurance specifies the property identifier.  The second occurances specifies the property
    -              version.  See the Firmware Technical Reference Manual for an list of valid property identifiers and versions.
    -
    -       -i interface
    -              Select the host Ethernet interface.  All requests are sent via this interface and only reponses received via  this
    -              interface  are  recognized.  The default interface is eth1 because most people use eth0 as their principle network
    -              connection; however, if environment string "PLC" is defined then it takes precedence over the  default  interface.
    -              This option then takes precedence over either default.
    -
    -       -o option
    -              The  update  option  (or  method) expressed as an 8-bit hexadecimal integer.  The prefix "0x" is optional.  Option
    -              values are constructed from the logical OR of 0x01=ApplyNow, 0x02=Persist and 0x04=Reset.  The only  legal  option
    -              values are 0x01, 0x02, 0x03 and 0x06.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -v     Prints additional information on stdout.  In particular, this option dumps outgoing Ethernet packets on stdout.
    -
    -       -?,--help
    -              Displays  program  help information on stderr.  This option takes precedence over all other options on the command
    -              line except version information.
    -
    -       -!,--version
    -              Displays program version information on stderr.  This option takes precedence over all other options on  the  com‐
    -              mand line except help information.  Use this option when sending screen dumps to Atheros technical staff.
    -
    -ARGUMENTS
    -       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
    -              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
    -              information about symbolic device addresses.
    -
    -FORMATS
    -       Each  property  is  assigned one or more values.  Each value may have a different type and size.  The expected type, size
    -       and order of property values is described in the Firmware Technical Reference Manual under  the  VS_SET_PROPERTY  message
    -       description.  Expected data types and values must be entered on the command line in the order specified in the manual and
    -       must appear on the command line before any device addresses appear.
    -
    -       byte integer
    -              An unsigned integer stored as 8 bits or 1 byte.  The value is expressed in decimal by default.  A binary value may
    -              be  expressed with a 0b prefix.  A hexadecimal value may be expressed using a 0x prefix.  The offset increments by
    -              1 prior to the next insertion.
    -
    -       word integer
    -              An unsigned integer stored as 16 bits or 2 bytes.  The value is expressed in decimal by default.  A  binary  value
    -              may  be  expressed  with a 0b prefix.  A hexadecimal value may be expressed using a 0x prefix.  The result will be
    -              sent in little endian byte order.  The offset increments by 2 prior to the next insertion.
    -
    -       long integer
    -              An unsigned integer stored as 32 bits or 4 bytes.  The value is expressed in decimal by default.  A  binary  value
    -              may  be  expressed  with a 0b prefix.  A hexadecimal value may be expressed using a 0x prefix.  The result will be
    -              sent in little endian byte order.  The offset increments by 4 prior to the next insertions.
    -
    -       huge integer
    -              An unsigned integer stored as 64 bits or 8 bytes.  The value is expressed in decimal by default.  A  binary  value
    -              may be expressed with a 0b prefix.  A hexadecimal value may be expressed using a 0x prefix.  The offset increments
    -              by 8 prior to the next insertion.  The result will be sent in little endian byte order.  This type is only  avail‐
    -              able on hosts that support 64 bit data values.
    -
    -       data hex
    -              A  sequence  of  hexadecimal octets.  Octets may be separated by a colon for clarity.  The number of octets deter‐
    -              mines the number of bytes written.  The result is sent in the byte order specified on the command line.  The  off‐
    -              set  increments  by  the  number  of bytes written.  This is similar to "key" and "mac" below but accepts variable
    -              length input.
    -
    -       key hex
    -              A sequence of hexadecimal octets.  Octets may be separated by a colon for clarity.  The number of octets must con‐
    -              vert to 16 bytes or an error will occur.  The result is sent in the byte order specified on the command line.  The
    -              offset increments by 16 prior to the next insertion.  This is similar "data" above but accepts  ony  fixed  length
    -              input.  This option may be used to set the DAK, NMK or NVAK values.
    -
    -       mac hex
    -              A sequence of hexadecimal octets.  Octets may be separated by a colon for clarity.  The number of octets must con‐
    -              vert to 6 bytes or an error will occur.  The result is sent in the byte order specified on the command line.   The
    -              offset  increments  by  6 prior to the next insertion.  This is similar "data" above but accepts only fixed length
    -              input.  This option may be used to set the DAK, NMK or NVAK values.
    -
    -       hfid string
    -              An ASCII character string.  The string is always stored as 64 bytes.  Short strings are padded on the  right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 64 prior to the next insertion.  This option may be used to enter user, network and  manufacturer identi‐
    -              fication strings.
    -
    -       zero count
    -              An  unsigned integer representing the number of consecutive bytes to fill with 0x00.  The offset increments by the
    -              number of bytes written.  This option may be used to erase regions of the PIB.
    -
    -       fill count
    -              An unsigned integer representing the number of consecutive bytes to fill with 0xFF.  The offset increments by  the
    -              number of bytes written.  This option may be used to erase regions of the PIB.
    -
    -       skip count
    -              An  unsigned  integer indicating the number of bytes to skip over before staring another change.  Intervening data
    -              data locations are unchanged.
    -
    -TR69 DATA TYPES
    -       These data types are not currently recognized by the runtime firmware and so errors will certainly  result  if  they  are
    -       used.
    -
    -       accesspassword string
    -              An  ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right with
    -              NUL characters.  Long strings are truncated on the right and the last byte is forced to NUL.   The  offset  incre‐
    -              ments by 257 prior to the next insertion.
    -
    -       accessusername string
    -              An  ASCII  character string.  The string is always stored as 33 bytes.  Short strings are padded on the right with
    -              NUL characters.  Long strings are truncated on the right and the last byte is forced to NUL.   The  offset  incre‐
    -              ments by 33 prior to the next insertion.
    -
    -       adminpassword string
    -              An  ASCII  character string.  The string is always stored as 33 bytes.  Short strings are padded on the right with
    -              NUL characters.  Long strings are truncated on the right and the last byte is forced to NUL.   The  offset  incre‐
    -              ments by 33 prior to the next insertion.
    -
    -       adminusername string
    -              An  ASCII  character string.  The string is always stored as 33 bytes.  Short strings are padded on the right with
    -              NUL characters.  Long strings are truncated on the right and the last byte is forced to NUL.   The  offset  incre‐
    -              ments by 33 prior to the next insertion.
    -
    -       password string
    -              An  ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right with
    -              NUL characters.  Long strings are truncated on the right and the last byte is forced to NUL.   The  offset  incre‐
    -              ments by 257 prior to the next insertion.
    -
    -       url string
    -              An  ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right with
    -              NUL characters.  Long strings are truncated on the right and the last byte is forced to NUL.   The  offset  incre‐
    -              ments by 257 prior to the next insertion.
    -
    -       username string
    -              An  ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right with
    -              NUL characters.  Long strings are truncated on the right and the last byte is forced to NUL.   The  offset  incre‐
    -              ments by 257 prior to the next insertion.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
    -              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
    -              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See  the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for the latest information on available proper‐
    -       ties.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure and content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       The following example sets the "time-to-live" property for each channel access priority type: CAP0, CAP1, CAP2, CAP3  and
    -       MME.  The property identifier is 101.  It needs five 32-bit decimal integer values in microseconds.  Data type long spec‐
    -       ifies a 32-bit decimal value that will be converted to little endian format on output.
    -
    -          # plcset -n 101 long 100 long 200 long 250 long 300 long 100
    -
    -       The next example set the User HFID.  The first occurance of option -n specifies the property by number as 105.  The  sec‐
    -       ond  occurance specifies the property version as 1.  This is merely an example of how to specify the propery version.  At
    -       the time of writing, property 105 is still version 0.
    -
    -          # plcset -n 105 -n 1 hfid "Intergalactic Software Pirates"
    -
    -SEE ALSO
    -       plc(1), getpib(1), modpib(1), plcset(1), setpib(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   plcset(1)
    -
    - - - diff --git a/docbook/plcset.c.html b/docbook/plcset.c.html deleted file mode 100644 index 2e7113e5..00000000 --- a/docbook/plcset.c.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - plcset.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plcset.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -#include "../ether/channel.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Devices.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/SetProperty.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/synonym.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/basespec.c"
    -#include "../tools/dataspec.c"
    -#include "../tools/bytespec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/binout.c"
    -#include "../tools/error.c"
    -#include "../tools/memencode.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCSET_PROP_VERSION 0
    -#define PLCSET_PROP_OPTION 1
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"ei:n:o:qs:t:v",
    -		"[type data] [type data] [...] [device] [device] [...]\n\n\ttype :== 'byte'|'word'|'long'|'huge'|'text'|'data'|'zero'|'fill'|'skip'|'hfid'|'mac'|'key'",
    -		"Qualcomm Atheros PLC Set Property",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"n n\tproperty identifier or version is (n) [" LITERAL (PLCSET_PROP_VERSION) "]",
    -		"o n\tproperty option is (n) [" LITERAL (PLCSET_PROP_OPTION) "]",
    -		"q\tquiet mode",
    -		"s x\tsession identifier is (x) [" LITERAL (PLCSESSION) "]",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	struct plcproperty plcproperty;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	memset (&plcproperty, 0, sizeof (plcproperty));
    -	plcproperty.PROP_OPTION = PLCSET_PROP_OPTION;
    -	plcproperty.PROP_VERSION = PLCSET_PROP_VERSION;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'n':
    -			if (!plcproperty.PROP_NUMBER)
    -			{
    -				plcproperty.PROP_NUMBER = (uint32_t)(uintspec (optarg, 0, UINT_MAX));
    -			}
    -			else
    -			{
    -				plcproperty.PROP_VERSION = (uint32_t)(uintspec (optarg, 0, UINT_MAX));
    -			}
    -			break;
    -		case 'o':
    -			plcproperty.PROP_OPTION = (uint8_t)(basespec (optarg, 16, sizeof (plcproperty.PROP_OPTION)));
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 's':
    -			plc.cookie = (uint32_t)(basespec (optarg, 16, sizeof (plc.cookie)));
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argc > 1) && (* argv))
    -	{
    -		plcproperty.DATA_LENGTH += (uint32_t)(memencode (plcproperty.DATA_BUFFER + plcproperty.DATA_LENGTH, sizeof (plcproperty.DATA_BUFFER) - plcproperty.DATA_LENGTH, argv [0], argv [1]));
    -		argc -= 2;
    -		argv += 2;
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		SetProperty (&plc, &plcproperty);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		SetProperty (&plc, &plcproperty);
    -		argc--;
    -		argv++;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcstat.1.html b/docbook/plcstat.1.html deleted file mode 100644 index 47511967..00000000 --- a/docbook/plcstat.1.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - plcstat.1 - - - - - - - - - -
    -plcstat(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plcstat(1)
    -
    -NAME
    -       plcstat - Qualcomm Atheros AR7x00 Link Statistics
    -
    -SYNOPSIS
    -       plcstat [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       The  Atheros  Device Statistics Utility polls a device and prints network and link statistics in various formats suitable
    -       for use by other programs.  This is a work in progress so user feedback is encouraged.  Link statistics  are  only  valid
    -       between one powerline device and another.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -COMMENTS
    -       This program is identical to legacy program int6kstat but uses version 1 of the Qualcomm Atheros VS_NW_INFO Atheros  ven‐
    -       dor-specific message.  Older firmware versions may not recognize this message version.
    -
    -OPTIONS
    -       -C     Clear  device link statistics using VS_LNK_STATS.  Statistics are read and cleared then displayed.  The statistics
    -              that are read and displayed depend on options -d, -p and -s but all link statistics are cleared.
    -
    -       -d direction
    -              Return statistics for the specified direction using VS_LNK_STATS.  Direction can be 0=tx, 1=rx,  2=both  or  "rx",
    -              "tx" or "both".
    -
    -       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -i     Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
    -              interface.  This option then takes precedence over either default.
    -
    -       -l count
    -              Define the number of times that the command will be repeated for each device specified.  Normally, you will repeat
    -              operations on one device only.
    -
    -       -m     Displays network membership information, as seen by one device, using VS_NW_INFO.  Use option -t for complete net‐
    -              work topology seen by the local host.
    -
    -       -p peernode
    -              Ethernet  hardware  address  of  the  peer  node for VS_LNK_STATS.  This option is required for all Link ID values
    -              except 0xFC.  The default is 00:00:00:00:00:00.
    -
    -       -q     Enter quiet mode.  Progress messages are suppressed.
    -
    -       -s linkid
    -              The Link ID for VS_LNK_STATS.  Link ID values range from 0 through 255 but not all  values  are  accepted  by  the
    -              device  firmware.   Values may be expressed in decimal, binary prefixed with "0b" or hexadecimal prefixed by "0x".
    -              Many valid values can be expressed by name.  Valid values are listed and explained under LINKID.  The default Link
    -              ID is 0xFC.
    -
    -       -t     Display  network  topology  using VS_SW_VER and VS_NW_INFO messages.  This option is similar to option -m but pro‐
    -              vides complete network topology plus device hardware and firmware version.  Topology is  always  relative  to  the
    -              local  host,  or  local hosts if present.  Powerline devices that appear on the command line are not used for this
    -              operation.
    -
    -       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
    -
    -       -w seconds
    -              Defines the number of seconds to wait before repeating command line options.  This option  has  no  effect  unless
    -              option -l is also specified with a non-zero value.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The  MAC  address  of some powerline device.  More than one address may be specified.  If more than one address is
    -              specified then operations are performed on each device in turn.  The default address is local.   See  DEVICES  for
    -              information about symbolic device addresses.
    -
    -LINKID
    -       0x00,CSMA-CAP0
    -              Display  CSMA  statistics  for CAP0 traffic using a single peer node.  The peer node MAC address must be specified
    -              using option -p.
    -
    -       0x01,CSMA-CAP1
    -              Display CSMA statistics for CAP1 traffic using a single peer node.  The peer node MAC address  must  be  specified
    -              using option -p.
    -
    -       0x02,CSMA-CAP2
    -              Display  CSMA  statistics  for CAP2 traffic using a single peer node.  The peer node MAC address must be specified
    -              using option -p.
    -
    -       0x03,CSMA-CAP3
    -              Display CSMA statistics for CAP3 traffic using a single peer node.  The peer node MAC address  must  be  specified
    -              using option -p.
    -
    -       0xF8,CSMA-PEER
    -              Display  CSMA  statistics  for all traffic using a single  peer node.  The peer node MAC address must be specified
    -              using option -p.
    -
    -       0xFC,CSMA-ALL
    -              Display CSMA statistics for all traffic with all peer nodes.  A peer node MAC address is not needed  and  will  be
    -              ignored if provided.  This value is the default for option -s.
    -
    -DEVICES
    -       Powerline devices use Ethernet Media Access Control (MAC) addresses.  A MAC address is a 48-bit value entered as 12 hexa‐
    -       decimal digits in upper, lower or mixed character case.  Octets may be separated with colons for clarity.   For  example,
    -       "00b052000001", "00:b0:52:00:00:01" and "00b052:000001" are valid and equivalent.
    -
    -       The following MAC addresses are special and may be entered by name instead of number.
    -
    -       all    Same as "broadcast".
    -
    -       broadcast
    -              A  synonym  for  the Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or foreign
    -              recognize messages sent to this address.  A remote device is any device at the far end of a powerline  connection.
    -              A foreign device is any device not manufactured by Atheros.
    -
    -       local  A  synonym  for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.  All local
    -              Atheros devices recognize this address but remote and foreign devices do not.  A remote device is  any  device  at
    -              the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -DISCLAIMER
    -       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
    -       gram.
    -
    -EXAMPLES
    -       None.
    -
    -SEE ALSO
    -       plc(1), plcrate(1), plcstat(1), plctool(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plcstat(1)
    -
    - - - diff --git a/docbook/plcstat.c.html b/docbook/plcstat.c.html deleted file mode 100644 index 67ece6f6..00000000 --- a/docbook/plcstat.c.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - plcstat.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plcstat.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/chipset.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/Devices.c"
    -#include "../plc/LinkStatistics.c"
    -#include "../plc/LocalDevices.c"
    -#include "../plc/NetworkInformation2.c"
    -#include "../plc/Topology2.c"
    -#include "../plc/Platform.c"
    -#include "../plc/WaitForStart.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/error.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/synonym.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/QualcommHeader1.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define LINKIDS 	(sizeof (linkids) / sizeof (struct _term_))
    -#define DIRECTIONS 	(sizeof (directions) / sizeof (struct _term_))
    -
    -#define AMPSTAT_LOOP 1
    -#define AMPSTAT_WAIT 0
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -static const struct _term_ linkids [] =
    -
    -{
    -	{
    -		"CSMA-ALL",
    -		"0xFC"
    -	},
    -	{
    -		"CSMA-CAP0",
    -		"0x00"
    -	},
    -	{
    -		"CSMA-CAP1",
    -		"0x01"
    -	},
    -	{
    -		"CSMA-CAP2",
    -		"0x02"
    -	},
    -	{
    -		"CSMA-CAP3",
    -		"0x03"
    -	},
    -	{
    -		"CSMA-PEER",
    -		"0xF8"
    -	},
    -};
    -
    -static const struct _term_ directions [] =
    -
    -{
    -	{
    -		"both",
    -		"2"
    -	},
    -	{
    -		"rx",
    -		"1"
    -	},
    -	{
    -		"tx",
    -		"0"
    -	}
    -};
    -
    -/*====================================================================*
    - *
    - *   void manager (struct plc * plc);
    - *
    - *   perform operations in logical order despite any order specfied
    - *   on the command line; for example read PIB before writing PIB;
    - *
    - *   operation order is controlled by the order of "if" statements
    - *   shown here; the entire operation sequence can be repeated with
    - *   an optional pause between each iteration;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void manager (struct plc * plc, signed count, signed pause)
    -
    -{
    -	while (count--)
    -	{
    -		if (_anyset (plc->flags, PLC_ANALYSE))
    -		{
    -			Topology2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_NETWORK))
    -		{
    -			NetworkInformation2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_LINK_STATS))
    -		{
    -			LinkStatistics (plc);
    -		}
    -		sleep (pause);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"Cd:ei:l:mp:qs:tvw:",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros AR7x00 Link Statistics",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"C\tclear statistics without reading using VS_LNK_STATS",
    -		"d n\tdirection (0=tx, 1=rx, 2=both) for VS_LNK_STATS",
    -		"e\tredirect stderr to stdout",
    -		"l n\tloop n times [" LITERAL (AMPSTAT_LOOP) "]",
    -		"s n\tLink ID for VS_LNK_STATS (see Programmer's Guide)",
    -		"m\tprint network membership information using VS_NW_INFO",
    -		"p x\tpeer node address for options -s",
    -		"q\tquiet mode",
    -		"t\tprint network topology using VS_NW_INFO with VS_SW_VER",
    -		"v\tverbose mode",
    -		"w n\twait n seconds [" LITERAL (AMPSTAT_WAIT) "]",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed loop = AMPSTAT_LOOP;
    -	signed wait = AMPSTAT_WAIT;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	plc.pushbutton = 0;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'C':
    -			_setbits (plc.flags, PLC_LINK_STATS);
    -			plc.pushbutton = 1;
    -			break;
    -		case 'd':
    -			_setbits (plc.flags, PLC_LINK_STATS);
    -			plc.module = (uint8_t)(uintspec (synonym (optarg, directions, DIRECTIONS), 0, UCHAR_MAX));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'm':
    -			_setbits (plc.flags, PLC_NETWORK);
    -			break;
    -		case 'p':
    -			_setbits (plc.flags, PLC_LINK_STATS);
    -			if (!hexencode (plc.RDA, sizeof (plc.RDA), (char const *)(optarg)))
    -			{
    -				error (1, errno, PLC_BAD_MAC, optarg);
    -			}
    -			break;
    -		case 'l':
    -			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 's':
    -			_setbits (plc.flags, PLC_LINK_STATS);
    -			plc.action = (uint8_t)(uintspec (synonym (optarg, linkids, LINKIDS), 0, UCHAR_MAX));
    -			break;
    -		case 't':
    -			_setbits (plc.flags, PLC_ANALYSE);
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'w':
    -			wait = (unsigned)(uintspec (optarg, 0, 3600));
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		manager (&plc, loop, wait);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		manager (&plc, loop, wait);
    -		argc--;
    -		argv++;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plctest.1.html b/docbook/plctest.1.html deleted file mode 100644 index 062beffa..00000000 --- a/docbook/plctest.1.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - plctest.1 - - - - - - - - - -
    -plctest(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plctest(1)
    -
    -NAME
    -       plctest - Qualcomm Atheros PLC Test Applet Loader
    -
    -SYNOPSIS
    -       plctest [options] [file] [file] [...]
    -
    -DESCRIPTION
    -       Download  and  execute  one  or  more  test applets to the local Qualcomm Atheros powerline device.  An applet is a small
    -       firmware image that can be started by the bootloader and will return to the bootloader when done.  This program  replaces
    -       int6ktest  and  amptest because is supports both old and new image file formats and the old and new powerline device boot
    -       methods.
    -
    -       Qualcomm Atheros firmware files may contain one or more applets.  Each applet is preceded by a header that specifies  the
    -       image  size,  load  address  and start address and other information.  Program plctest sequentially dowloads and executes
    -       every applet in each image file named on the command line.  It waits for each applet to complete before  downloading  and
    -       executing  the next one.  The program terminates once all applets in all files have been executed or some applet fails to
    -       complete within 60 seconds.
    -
    -       Most applets return to the Bootloader on successful completion so that another applet can  be  downloaded  and  executed.
    -       This allows applet sequences to be executed with one command.  A sequence may consist of one file having multiple applets
    -       or multiple files each having one applet or any combination of single and  multiple  applet  files.   The  sequence  will
    -       break,  after a timeout, if any applet in the chain fails to return to the Bootloader in time.  Failure to return in time
    -       may be either a good thing or a bad thing depending on applet design.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the APT man page for an  overview  and  installation
    -       instructions.
    -
    -COMMENTS
    -       The  Powerline  Toolkit  contains a set of legacy applets in folder applets.  These were originally designed for use with
    -       program int6ktest and most will not display console messages properly using this program; however, a new series  of  com‐
    -       patible applets are under development and should be available through Qualcomm Atheros Field Application Engineering.
    -
    -       Assuming  a  good  set  of applets are available, this program is ideal for testing reference designs for performance and
    -       production units for defects.  Applets may become available for testing onboard connections, memory integrity  and  noise
    -       immunity.  Consult with Atheros Field Application Engineering for applet availability.
    -
    -OPTIONS
    -       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -i interface
    -              Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
    -              interface.  This option then takes precedence over either default.
    -
    -       -l     Execute all applets in all files on the command line until the program is terminated using ^C.
    -
    -       -p frequency
    -              The  polling  frequency  expressed in polls-per-second.  For example, 1 means one poll per second and 10 means ten
    -              polls per second.  Overall wait time is count/frequency where count may be modified using option -c.  Overall wait
    -              time  is  always  approximate since operating system overhead and latency are not taken into account.  The default
    -              frequency is 5.
    -
    -       -q     Suppresses normal progress and status messages.
    -
    -       -t timeout
    -              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -v     Print additional information on stdout.  Specifically, this option prints incoming and outgoing frames in hexadec‐
    -              imal format on stdout.  Output can be directed to a text file for analysis.
    -
    -       -w seconds
    -              Application timeout in seconds.  This application will wait this long for an applet to terminate and return to the
    -              bootloader before reporting an error and proceeding to the next applet.
    -
    -       -x     Exit  program on first error instead of proceeding to the next applet.  Error exits return a non-zero value to the
    -              shell.
    -
    -       -X     Exit program on first applet load instead of waiting for the applet to complete.  This exit returns a  zero  value
    -              to the shell.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The  name of an Atheros image file.  The image file may contain one or more images.  Each image will be downloaded
    -              and executed in turn until all images are executed or an image fails to return to the Bootloader within  1  minute
    -              for some reason.
    -
    -EXAMPLES
    -       The  following example sequentially downloads then executes each image in file abc.nvm in turn.  Each image must complete
    -       and return to the bootloader before the next one downloads.  Observe that no device address  is  needed  because  Atheros
    -       powerline devices use address 00:b0:52:00:00:01 when in bootloader mode.
    -
    -          # plctest abc.nvm
    -
    -       The  following  example  will  sequentially  download and execute the images in each file abc.nvm, def.nvm and ghi.nvm in
    -       turn.
    -
    -          # plctest abc.nvm def.nvm ghi.nvm
    -
    -DISCLAIMER
    -       Atheros image file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public informa‐
    -       tion  is  not  available.   Qualcomm  Atheros  reserves  the right to change file structure or content in future firmware
    -       releases without any obligation to notify or compensate users of this program.  This  program  is  reserved  for  use  by
    -       Atheros Field Engineers.  Use of this program may void some contractual obligations made by Atheros.
    -
    -SEE ALSO
    -       APT(1), chknvm(1), chknvm2(1), amptest(1), int6ktest(1), nvmsplit(1), nvmmerge(1), setnvm(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plctest(1)
    -
    - - - diff --git a/docbook/plctest.c.html b/docbook/plctest.c.html deleted file mode 100644 index 592b2b6e..00000000 --- a/docbook/plctest.c.html +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - plctest.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plctest.c - Atheros Test Applet Loader;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../ether/channel.h"
    -#include "../ram/nvram.h"
    -#include "../ram/sdram.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/chipset.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Devices.c"
    -#include "../plc/Display.c"
    -#include "../plc/ExecuteApplets.c"
    -#include "../plc/ExecuteApplets1.c"
    -#include "../plc/ExecuteApplets2.c"
    -#include "../plc/Failure.c"
    -#include "../plc/NVMSelect.c"
    -#include "../plc/Request.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/StartFirmware1.c"
    -#include "../plc/WaitForStart.c"
    -#include "../plc/WriteExecuteApplet2.c"
    -#include "../plc/WriteExecuteFirmware1.c"
    -#include "../plc/WriteExecuteFirmware2.c"
    -#include "../plc/WriteFirmware1.c"
    -#include "../plc/WriteFirmware2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/error.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmfile.c"
    -#include "../nvm/nvmfile1.c"
    -#include "../nvm/nvmfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/FirmwareMessage.c"
    -#include "../mme/ARPCPrint.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE);
    - *
    - *   plc.h
    - *
    - *   this version of ReadMME() calls FirmwareMessage() to intercept
    - *   VS_ARPC messages and print them on stdout in readable format;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Matthieu Poullet <m.poullet@avm.de>
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed ReadMME (struct plc * plc, uint8_t MMV, uint16_t MMTYPE)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -	while ((plc->packetsize = readpacket (channel, message, sizeof (* message))) > 0)
    -	{
    -		if (FirmwareMessage (message))
    -		{
    -			continue;
    -		}
    -		if (UnwantedMessage (message, plc->packetsize, MMV, MMTYPE))
    -		{
    -			continue;
    -		}
    -		break;
    -	}
    -	return (plc->packetsize);
    -}
    -
    -/*====================================================================*
    - *
    - *   void sequence (struct plc * plc, int argc, char const * argv);
    - *
    - *   open each file on the command line and execute all applets in
    - *   each file; move on if errors occur;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void sequence (struct plc * plc, int argc, char const * argv [])
    -
    -{
    -	while ((argc) && (* argv))
    -	{
    -		if ((plc->NVM.file = open (plc->NVM.name = * argv, O_BINARY|O_RDONLY)) == -1)
    -		{
    -			error (0, errno, FILE_CANTOPEN, plc->NVM.name);
    -		}
    -		else if (nvmfile (&plc->NVM))
    -		{
    -			error (0, errno, FILE_CANTLOAD, plc->NVM.name);
    -		}
    -		else
    -		{
    -			ExecuteApplets (plc);
    -		}
    -		close (plc->NVM.file);
    -		argc--;
    -		argv++;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary when asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	char firmware [PLC_VERSION_STRING];
    -	static char const * optv [] =
    -	{
    -		"ei:lqt:vw:xX",
    -		"file [file] [...]",
    -		"Qualcomm Atheros PLC Test Applet Loader",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"l\tloop until program is terminated",
    -		"q\tquiet mode",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"w n\twait time is (n) seconds [" LITERAL (PLC_TIMER) "]",
    -		"x\texit on error",
    -		"X\texit on start",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed loop = 0;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'l':
    -			loop = 1;
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'w':
    -			plc.timer = (unsigned)(uintspec (optarg, 0, 3600));
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		case 'X':
    -			_setbits (plc.flags, PLC_QUICK_FLASH);
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (WaitForStart (&plc, firmware, sizeof (firmware)))
    -	{
    -		error (1, ECANCELED, PLC_NODETECT);
    -	}
    -	if (strcmp (firmware, "BootLoader"))
    -	{
    -		error (1, ECANCELED, "BootLoader must be running");
    -	}
    -	do
    -	{
    -		sequence (&plc, argc, argv);
    -	}
    -	while (loop);
    -	free (plc.message);
    -	closechannel (&channel);
    -	return (plc.state);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plctone.1.html b/docbook/plctone.1.html deleted file mode 100644 index 76e8ef6e..00000000 --- a/docbook/plctone.1.html +++ /dev/null @@ -1,1058 +0,0 @@ - - - - - - plctone.1 - - - - - - - - - -
    -plctone(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plctone(1)
    -
    -NAME
    -       plctone - Qualcomm Atheros Panther/Lynx Tone Map Dump Utility
    -
    -SYNOPSIS
    -       plctone [options] device peer [>stdout]
    -
    -DESCRIPTION
    -       Collect and print device tone map information on stdout.
    -
    -       Powerline  devices  cannot  compute tone map values unless until some data has passed through them, either to or from the
    -       powerline.  In most cases, the ping utility will generate enough traffic to create a usable tone map.  To get  a  respon‐
    -       sive tonemap, one must send more traffic at higher data rates, possibly using ttcp or iperf or similar utility.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -COMMENTS
    -       This program is identical to legacy program int6ktone but uses version 1 of the Qualcomm Atheros VS_RX_TONE_MAP_CHAR ven‐
    -       dor-specific message.  Older firmware versions may not recognize this message version.
    -
    -OPTIONS
    -       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -h     Display a histogram of the Root Mean Square (RMS) of the time slot values for each carrier.   This  value  has  no
    -              meaning by itself.  It merely accentuates minor differences from one carrier to the next.
    -
    -       -i     Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -p coupling
    -              Tonemap coupling.  Valid values are the number 0, or the string "pri", for primary coupling and the number  1,  or
    -              the  string "alt", for alternate coupling.  This program will accept any numeric value from 0 through 255 but run‐
    -              time firmware will reject invalid values.  The default value is 0.
    -
    -       -q     Enter quiet mode.  Progress messages are suppressed.
    -
    -       -s     Compute and display signal-to-noise ratios based on the bits-per-carrier reported.  Average SNR  is  computed  for
    -              each  slot  then  an  overall average SNR is computed.  ACG and GIL values for each slot are also displayed.  This
    -              option suppresses tone map output and causes option -h to be ignored.
    -
    -       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The MAC address of the primary device.
    -
    -       peer   The MAC address of the peer device.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -EXAMPLES
    -       The following example prints tone map information computed by device 00B05200CA0D on stdout.  The information relates  to
    -       channel  estimation  with  peer device 00B05200CA0C.  We requested a histogram with option -h and suppressed the progress
    -       messages with option -q.  Output consists of 917 lines of tone map modulation data.
    -
    -       Each line of tone map data consists of 8 columns.  The first column is the offset.  The next 6 columns are time slot mod‐
    -       ulation data.  The last column is the computed mean-square of the time slot modulation data.  Devices operating on a 50hz
    -       powerline have modulation data in all 6 time slot columns.  Devices operating on a 60hz powerline have modulation data in
    -       only 5 of the 6 columns.
    -
    -          # plctone -qh 00B05200CA0D 00B05200CA0C
    -          0000,05,04,04,05,04,00,19 ###################
    -          0001,05,04,04,05,04,00,19 ###################
    -          0002,05,04,04,05,04,00,19 ###################
    -          0003,05,04,04,05,05,00,21 #####################
    -          0004,05,04,04,05,05,00,21 #####################
    -          0005,05,04,04,05,05,00,21 #####################
    -          0006,05,04,04,05,05,00,21 #####################
    -          0007,05,04,05,05,05,00,23 #######################
    -          0008,05,04,05,05,05,00,23 #######################
    -          0009,05,04,04,05,05,00,21 #####################
    -          0010,05,05,05,05,05,00,25 #########################
    -          0011,05,05,05,05,05,00,25 #########################
    -          0012,05,05,04,05,05,00,23 #######################
    -          0013,05,05,05,05,05,00,25 #########################
    -          0014,05,05,05,05,05,00,25 #########################
    -          0015,05,05,05,05,05,00,25 #########################
    -          0016,05,05,04,05,05,00,23 #######################
    -          0017,05,05,04,05,05,00,23 #######################
    -          0018,05,05,05,05,05,00,25 #########################
    -          0019,05,05,05,05,05,00,25 #########################
    -          0020,05,05,05,05,05,00,25 #########################
    -          0021,05,05,05,05,05,00,25 #########################
    -          0022,05,05,05,05,05,00,25 #########################
    -          0023,05,05,05,05,05,00,25 #########################
    -          0024,05,05,05,05,05,00,25 #########################
    -          0025,05,05,05,05,05,00,25 #########################
    -          0026,05,05,05,05,05,00,25 #########################
    -          0027,05,05,05,05,05,00,25 #########################
    -          0028,05,05,05,05,05,00,25 #########################
    -          0029,05,05,05,05,05,00,25 #########################
    -          0030,05,05,05,05,05,00,25 #########################
    -          0031,05,05,05,05,05,00,25 #########################
    -          0032,05,05,05,05,05,00,25 #########################
    -          0033,05,05,05,05,05,00,25 #########################
    -          0034,05,05,05,05,05,00,25 #########################
    -          0035,05,04,04,04,05,00,19 ###################
    -          0036,05,04,04,04,05,00,19 ###################
    -          0037,04,03,03,04,04,00,13 #############
    -          0038,03,02,03,02,04,00,08 ########
    -          0039,02,01,02,02,03,00,04 ####
    -          0040,02,01,02,01,02,00,02 ##
    -          0041,02,00,02,01,02,00,02 ##
    -          0042,02,01,02,01,02,00,02 ##
    -          0043,02,01,02,02,03,00,04 ####
    -          0044,03,02,03,03,03,00,08 ########
    -          0045,03,03,03,04,03,00,10 ##########
    -          0046,05,04,04,04,05,00,19 ###################
    -          0047,05,05,04,05,05,00,23 #######################
    -          0048,05,05,05,05,05,00,25 #########################
    -          0049,06,05,05,06,06,00,31 ###############################
    -          0050,06,05,05,06,06,00,31 ###############################
    -          0051,06,05,05,06,06,00,31 ###############################
    -          0052,06,05,05,06,06,00,31 ###############################
    -          0053,06,05,05,06,06,00,31 ###############################
    -          0054,07,06,06,06,06,00,38 ######################################
    -          0055,06,06,06,06,06,00,36 ####################################
    -          0056,07,06,06,06,06,00,38 ######################################
    -          0057,06,06,06,06,06,00,36 ####################################
    -          0058,06,06,06,06,06,00,36 ####################################
    -          0059,06,06,06,06,06,00,36 ####################################
    -          0060,07,06,06,06,07,00,41 #########################################
    -          0061,07,06,06,06,07,00,41 #########################################
    -          0062,07,06,06,06,07,00,41 #########################################
    -          0063,07,06,06,06,07,00,41 #########################################
    -          0064,07,06,06,06,07,00,41 #########################################
    -          0065,07,06,06,06,07,00,41 #########################################
    -          0066,07,06,06,07,07,00,43 ###########################################
    -          0067,07,06,06,07,07,00,43 ###########################################
    -          0068,07,06,06,07,07,00,43 ###########################################
    -          0069,07,06,07,07,07,00,46 ##############################################
    -          0070,07,07,07,07,07,00,49 #################################################
    -          0071,07,07,07,07,07,00,49 #################################################
    -          0072,07,07,07,07,07,00,49 #################################################
    -          0073,07,07,07,07,07,00,49 #################################################
    -          0074,07,07,07,07,07,00,49 #################################################
    -          0075,07,07,07,07,07,00,49 #################################################
    -          0076,07,06,07,07,07,00,46 ##############################################
    -          0077,07,06,07,07,07,00,46 ##############################################
    -          0078,07,06,07,07,07,00,46 ##############################################
    -          0079,07,06,07,07,07,00,46 ##############################################
    -          0080,07,06,07,07,07,00,46 ##############################################
    -          0081,07,06,07,07,07,00,46 ##############################################
    -          0082,07,06,06,07,07,00,43 ###########################################
    -          0083,07,06,06,07,07,00,43 ###########################################
    -          0084,07,06,07,07,07,00,46 ##############################################
    -          0085,07,07,06,07,07,00,46 ##############################################
    -          0086,07,07,07,07,07,00,49 #################################################
    -          0087,07,07,07,07,07,00,49 #################################################
    -          0088,07,07,07,07,07,00,49 #################################################
    -          0089,07,07,07,07,07,00,49 #################################################
    -          0090,07,07,07,07,07,00,49 #################################################
    -          0091,07,07,07,07,07,00,49 #################################################
    -          0092,07,07,07,07,07,00,49 #################################################
    -          0093,07,07,07,07,07,00,49 #################################################
    -          0094,07,07,07,07,07,00,49 #################################################
    -          0095,07,06,07,07,07,00,46 ##############################################
    -          0096,07,06,07,07,07,00,46 ##############################################
    -          0097,07,06,07,07,07,00,46 ##############################################
    -          0098,07,06,07,07,07,00,46 ##############################################
    -          0099,07,06,07,07,07,00,46 ##############################################
    -          0100,07,06,07,07,07,00,46 ##############################################
    -          0101,07,07,07,07,07,00,49 #################################################
    -          0102,07,07,07,07,07,00,49 #################################################
    -          0103,07,07,07,07,07,00,49 #################################################
    -          0104,07,07,07,07,07,00,49 #################################################
    -          0105,07,07,07,07,07,00,49 #################################################
    -          0106,07,06,07,07,07,00,46 ##############################################
    -          0107,07,06,07,07,07,00,46 ##############################################
    -          0108,07,06,07,07,07,00,46 ##############################################
    -          0109,07,06,07,07,07,00,46 ##############################################
    -          0110,07,07,07,07,07,00,49 #################################################
    -          0111,07,07,07,07,07,00,49 #################################################
    -          0112,07,07,07,07,07,00,49 #################################################
    -          0113,07,07,07,07,07,00,49 #################################################
    -          0114,07,07,07,07,07,00,49 #################################################
    -          0115,07,07,07,07,07,00,49 #################################################
    -          0116,07,07,07,07,07,00,49 #################################################
    -          0117,07,07,07,07,07,00,49 #################################################
    -          0118,07,07,07,07,07,00,49 #################################################
    -          0119,07,06,07,07,07,00,46 ##############################################
    -          0120,07,06,06,07,07,00,43 ###########################################
    -          0121,07,06,06,07,07,00,43 ###########################################
    -          0122,06,06,06,07,06,00,38 ######################################
    -          0123,06,06,06,07,06,00,38 ######################################
    -          0124,06,06,06,07,07,00,41 #########################################
    -          0125,07,06,06,07,07,00,43 ###########################################
    -          0126,07,06,06,07,07,00,43 ###########################################
    -          0127,07,06,06,07,07,00,43 ###########################################
    -          0128,07,07,07,07,07,00,49 #################################################
    -          0129,07,07,07,07,07,00,49 #################################################
    -          0130,07,07,07,07,07,00,49 #################################################
    -          0131,07,07,07,07,07,00,49 #################################################
    -          0132,07,07,07,07,07,00,49 #################################################
    -          0133,07,07,07,07,07,00,49 #################################################
    -          0134,07,07,07,07,07,00,49 #################################################
    -          0135,07,07,07,07,07,00,49 #################################################
    -          0136,07,07,07,07,07,00,49 #################################################
    -          0137,07,07,07,07,07,00,49 #################################################
    -          0138,07,07,07,07,07,00,49 #################################################
    -          0139,07,07,07,07,07,00,49 #################################################
    -          0140,07,07,07,07,07,00,49 #################################################
    -          0141,07,07,07,07,07,00,49 #################################################
    -          0142,07,07,07,07,07,00,49 #################################################
    -          0143,07,07,07,07,07,00,49 #################################################
    -          0144,07,07,07,07,07,00,49 #################################################
    -          0145,07,07,07,07,07,00,49 #################################################
    -          0146,07,07,07,07,07,00,49 #################################################
    -          0147,07,07,07,07,07,00,49 #################################################
    -          0148,07,07,07,07,07,00,49 #################################################
    -          0149,07,07,07,07,07,00,49 #################################################
    -          0150,07,07,07,07,07,00,49 #################################################
    -          0151,07,07,07,07,07,00,49 #################################################
    -          0152,07,07,07,07,07,00,49 #################################################
    -          0153,07,07,07,07,07,00,49 #################################################
    -          0154,07,07,07,07,07,00,49 #################################################
    -          0155,07,07,07,07,07,00,49 #################################################
    -          0156,07,07,07,07,07,00,49 #################################################
    -          0157,07,07,07,07,07,00,49 #################################################
    -          0158,06,06,06,06,06,00,36 ####################################
    -          0159,06,06,06,06,06,00,36 ####################################
    -          0160,06,06,06,06,06,00,36 ####################################
    -          0161,07,06,06,06,07,00,41 #########################################
    -          0162,07,07,07,07,07,00,49 #################################################
    -          0163,07,07,07,07,07,00,49 #################################################
    -          0164,07,07,07,07,07,00,49 #################################################
    -          0165,07,07,07,07,07,00,49 #################################################
    -          0166,07,07,07,07,07,00,49 #################################################
    -          0167,07,07,07,07,07,00,49 #################################################
    -          0168,07,07,07,07,07,00,49 #################################################
    -          0169,07,07,07,07,07,00,49 #################################################
    -          0170,07,07,07,07,07,00,49 #################################################
    -          0171,07,07,07,07,07,00,49 #################################################
    -          0172,07,07,07,07,07,00,49 #################################################
    -          0173,07,07,07,07,07,00,49 #################################################
    -          0174,07,07,07,07,07,00,49 #################################################
    -          0175,07,07,07,07,07,00,49 #################################################
    -          0176,07,07,07,07,07,00,49 #################################################
    -          0177,07,07,07,07,07,00,49 #################################################
    -          0178,07,07,07,07,07,00,49 #################################################
    -          0179,07,07,07,07,07,00,49 #################################################
    -          0180,07,07,07,07,07,00,49 #################################################
    -          0181,07,07,07,07,07,00,49 #################################################
    -          0182,07,07,07,07,07,00,49 #################################################
    -          0183,07,07,07,07,07,00,49 #################################################
    -          0184,07,07,07,07,07,00,49 #################################################
    -          0185,07,07,07,07,07,00,49 #################################################
    -          0186,07,07,07,07,07,00,49 #################################################
    -          0187,07,07,07,07,07,00,49 #################################################
    -          0188,07,07,07,07,07,00,49 #################################################
    -          0189,07,07,07,07,07,00,49 #################################################
    -          0190,07,07,07,07,07,00,49 #################################################
    -          0191,07,07,07,07,07,00,49 #################################################
    -          0192,07,07,07,07,07,00,49 #################################################
    -          0193,07,07,07,07,07,00,49 #################################################
    -          0194,07,07,07,07,07,00,49 #################################################
    -          0195,07,07,07,07,07,00,49 #################################################
    -          0196,07,07,07,07,07,00,49 #################################################
    -          0197,07,07,07,07,07,00,49 #################################################
    -          0198,07,07,07,07,07,00,49 #################################################
    -          0199,07,07,07,07,07,00,49 #################################################
    -          0200,07,07,07,07,07,00,49 #################################################
    -          0201,07,07,07,07,07,00,49 #################################################
    -          0202,07,07,07,07,07,00,49 #################################################
    -          0203,07,07,07,07,07,00,49 #################################################
    -          0204,07,07,07,07,07,00,49 #################################################
    -          0205,07,07,07,07,07,00,49 #################################################
    -          0206,07,07,07,07,07,00,49 #################################################
    -          0207,07,07,07,07,07,00,49 #################################################
    -          0208,07,07,07,07,07,00,49 #################################################
    -          0209,07,07,07,07,07,00,49 #################################################
    -          0210,07,07,07,07,07,00,49 #################################################
    -          0211,07,07,07,07,07,00,49 #################################################
    -          0212,07,07,07,07,07,00,49 #################################################
    -          0213,07,07,07,07,07,00,49 #################################################
    -          0214,07,07,07,07,07,00,49 #################################################
    -          0215,07,07,07,07,07,00,49 #################################################
    -          0216,07,07,07,07,07,00,49 #################################################
    -          0217,07,07,07,07,07,00,49 #################################################
    -          0218,07,07,07,07,07,00,49 #################################################
    -          0219,07,07,07,07,07,00,49 #################################################
    -          0220,07,07,07,07,07,00,49 #################################################
    -          0221,07,07,07,07,07,00,49 #################################################
    -          0222,07,07,07,07,07,00,49 #################################################
    -          0223,07,07,07,07,07,00,49 #################################################
    -          0224,07,07,07,07,07,00,49 #################################################
    -          0225,07,07,07,07,07,00,49 #################################################
    -          0226,07,07,07,07,07,00,49 #################################################
    -          0227,07,07,07,07,07,00,49 #################################################
    -          0228,07,07,07,07,07,00,49 #################################################
    -          0229,07,07,07,07,07,00,49 #################################################
    -          0230,07,07,07,07,07,00,49 #################################################
    -          0231,07,07,07,07,07,00,49 #################################################
    -          0232,07,07,07,07,07,00,49 #################################################
    -          0233,07,07,07,07,07,00,49 #################################################
    -          0234,07,07,06,07,07,00,46 ##############################################
    -          0235,07,07,07,07,07,00,49 #################################################
    -          0236,07,07,06,07,07,00,46 ##############################################
    -          0237,07,07,06,07,07,00,46 ##############################################
    -          0238,07,07,07,07,07,00,49 #################################################
    -          0239,07,07,07,07,07,00,49 #################################################
    -          0240,07,06,07,07,07,00,46 ##############################################
    -          0241,07,06,07,07,07,00,46 ##############################################
    -          0242,07,07,07,07,07,00,49 #################################################
    -          0243,07,07,07,07,07,00,49 #################################################
    -          0244,07,07,07,07,07,00,49 #################################################
    -          0245,07,07,07,06,07,00,46 ##############################################
    -          0246,07,07,07,07,07,00,49 #################################################
    -          0247,07,07,06,07,07,00,46 ##############################################
    -          0248,07,07,06,06,07,00,43 ###########################################
    -          0249,07,07,07,06,07,00,46 ##############################################
    -          0250,07,07,07,07,07,00,49 #################################################
    -          0251,07,07,07,06,07,00,46 ##############################################
    -          0252,07,07,07,06,07,00,46 ##############################################
    -          0253,07,07,07,07,07,00,49 #################################################
    -          0254,07,07,07,06,07,00,46 ##############################################
    -          0255,07,07,07,06,07,00,46 ##############################################
    -          0256,07,07,07,07,07,00,49 #################################################
    -          0257,07,07,07,07,07,00,49 #################################################
    -          0258,07,06,06,07,07,00,43 ###########################################
    -          0259,07,06,06,07,07,00,43 ###########################################
    -          0260,07,06,06,07,07,00,43 ###########################################
    -          0261,07,06,06,07,07,00,43 ###########################################
    -          0262,07,06,06,06,07,00,41 #########################################
    -          0263,07,06,06,06,07,00,41 #########################################
    -          0264,07,06,06,06,07,00,41 #########################################
    -          0265,07,06,06,07,07,00,43 ###########################################
    -          0266,07,06,06,07,07,00,43 ###########################################
    -          0267,07,06,06,06,07,00,41 #########################################
    -          0268,07,06,06,06,07,00,41 #########################################
    -          0269,07,06,07,06,07,00,43 ###########################################
    -          0270,07,06,07,06,07,00,43 ###########################################
    -          0271,07,06,07,06,07,00,43 ###########################################
    -          0272,07,06,07,06,07,00,43 ###########################################
    -          0273,07,06,06,06,07,00,41 #########################################
    -          0274,07,06,06,06,07,00,41 #########################################
    -          0275,07,06,06,06,07,00,41 #########################################
    -          0276,07,06,06,07,07,00,43 ###########################################
    -          0277,07,06,06,07,07,00,43 ###########################################
    -          0278,07,06,06,06,07,00,41 #########################################
    -          0279,07,06,06,06,07,00,41 #########################################
    -          0280,07,06,06,07,07,00,43 ###########################################
    -          0281,07,06,06,06,07,00,41 #########################################
    -          0282,07,06,06,07,07,00,43 ###########################################
    -          0283,07,06,06,07,07,00,43 ###########################################
    -          0284,07,06,06,07,07,00,43 ###########################################
    -          0285,07,06,06,06,07,00,41 #########################################
    -          0286,06,06,06,06,07,00,38 ######################################
    -          0287,06,06,06,06,07,00,38 ######################################
    -          0288,07,06,06,06,07,00,41 #########################################
    -          0289,07,06,06,06,07,00,41 #########################################
    -          0290,07,06,06,07,07,00,43 ###########################################
    -          0291,07,06,06,07,07,00,43 ###########################################
    -          0292,07,06,07,07,07,00,46 ##############################################
    -          0293,07,06,07,07,07,00,46 ##############################################
    -          0294,07,06,06,07,07,00,43 ###########################################
    -          0295,07,06,06,07,07,00,43 ###########################################
    -          0296,07,06,06,07,07,00,43 ###########################################
    -          0297,07,06,06,07,07,00,43 ###########################################
    -          0298,07,06,06,07,06,00,41 #########################################
    -          0299,07,06,06,07,06,00,41 #########################################
    -          0300,07,06,06,06,07,00,41 #########################################
    -          0301,07,06,06,07,07,00,43 ###########################################
    -          0302,07,06,06,06,07,00,41 #########################################
    -          0303,07,06,06,07,07,00,43 ###########################################
    -          0304,07,06,06,07,07,00,43 ###########################################
    -          0305,07,06,06,07,07,00,43 ###########################################
    -          0306,07,06,06,07,06,00,41 #########################################
    -          0307,07,06,06,06,06,00,38 ######################################
    -          0308,06,06,06,06,06,00,36 ####################################
    -          0309,06,06,06,06,06,00,36 ####################################
    -          0310,06,06,06,06,06,00,36 ####################################
    -          0311,06,06,06,06,06,00,36 ####################################
    -          0312,06,06,06,06,06,00,36 ####################################
    -          0313,06,06,06,06,06,00,36 ####################################
    -          0314,07,06,06,06,06,00,38 ######################################
    -          0315,07,06,06,06,06,00,38 ######################################
    -          0316,07,06,06,06,06,00,38 ######################################
    -          0317,06,06,06,06,06,00,36 ####################################
    -          0318,06,06,06,06,06,00,36 ####################################
    -          0319,06,06,06,06,06,00,36 ####################################
    -          0320,06,06,06,06,06,00,36 ####################################
    -          0321,06,06,06,06,06,00,36 ####################################
    -          0322,06,06,06,06,06,00,36 ####################################
    -          0323,06,06,06,06,06,00,36 ####################################
    -          0324,06,06,06,06,06,00,36 ####################################
    -          0325,06,06,06,06,06,00,36 ####################################
    -          0326,06,06,06,06,06,00,36 ####################################
    -          0327,06,06,06,06,06,00,36 ####################################
    -          0328,06,06,06,06,06,00,36 ####################################
    -          0329,06,06,06,06,06,00,36 ####################################
    -          0330,06,06,06,06,06,00,36 ####################################
    -          0331,06,06,06,06,06,00,36 ####################################
    -          0332,06,06,06,06,06,00,36 ####################################
    -          0333,06,06,06,06,06,00,36 ####################################
    -          0334,06,06,06,06,06,00,36 ####################################
    -          0335,06,06,06,06,06,00,36 ####################################
    -          0336,06,06,06,06,06,00,36 ####################################
    -          0337,06,06,06,06,06,00,36 ####################################
    -          0338,06,06,06,06,06,00,36 ####################################
    -          0339,06,06,06,06,06,00,36 ####################################
    -          0340,06,06,06,06,06,00,36 ####################################
    -          0341,06,06,06,06,06,00,36 ####################################
    -          0342,06,06,06,06,06,00,36 ####################################
    -          0343,06,06,06,06,06,00,36 ####################################
    -          0344,06,06,06,06,06,00,36 ####################################
    -          0345,06,06,06,06,06,00,36 ####################################
    -          0346,06,06,06,06,06,00,36 ####################################
    -          0347,06,06,06,06,06,00,36 ####################################
    -          0348,06,06,06,06,06,00,36 ####################################
    -          0349,06,06,06,06,06,00,36 ####################################
    -          0350,06,06,06,06,06,00,36 ####################################
    -          0351,06,06,06,06,06,00,36 ####################################
    -          0352,06,06,06,06,06,00,36 ####################################
    -          0353,06,06,06,06,06,00,36 ####################################
    -          0354,06,06,06,06,06,00,36 ####################################
    -          0355,06,06,06,06,06,00,36 ####################################
    -          0356,06,06,06,06,06,00,36 ####################################
    -          0357,06,06,06,06,06,00,36 ####################################
    -          0358,06,06,06,06,06,00,36 ####################################
    -          0359,06,06,06,06,06,00,36 ####################################
    -          0360,06,06,06,06,06,00,36 ####################################
    -          0361,06,06,06,06,06,00,36 ####################################
    -          0362,06,06,06,06,06,00,36 ####################################
    -          0363,06,06,06,06,06,00,36 ####################################
    -          0364,06,06,06,06,06,00,36 ####################################
    -          0365,06,06,06,06,06,00,36 ####################################
    -          0366,06,06,06,06,06,00,36 ####################################
    -          0367,06,06,06,06,06,00,36 ####################################
    -          0368,06,06,06,06,06,00,36 ####################################
    -          0369,06,06,06,06,06,00,36 ####################################
    -          0370,06,06,06,06,06,00,36 ####################################
    -          0371,06,06,06,06,06,00,36 ####################################
    -          0372,06,06,06,06,06,00,36 ####################################
    -          0373,06,06,06,06,06,00,36 ####################################
    -          0374,06,06,06,06,06,00,36 ####################################
    -          0375,06,06,06,06,06,00,36 ####################################
    -          0376,07,06,06,06,06,00,38 ######################################
    -          0377,07,06,06,06,06,00,38 ######################################
    -          0378,07,06,06,06,06,00,38 ######################################
    -          0379,07,06,06,06,06,00,38 ######################################
    -          0380,07,06,06,06,06,00,38 ######################################
    -          0381,07,06,06,06,06,00,38 ######################################
    -          0382,07,06,06,06,06,00,38 ######################################
    -          0383,06,06,06,06,07,00,38 ######################################
    -          0384,06,06,06,06,07,00,38 ######################################
    -          0385,06,06,06,06,07,00,38 ######################################
    -          0386,06,06,06,06,07,00,38 ######################################
    -          0387,06,06,06,06,07,00,38 ######################################
    -          0388,06,06,06,06,07,00,38 ######################################
    -          0389,06,06,06,06,07,00,38 ######################################
    -          0390,06,06,06,06,06,00,36 ####################################
    -          0391,06,06,06,06,06,00,36 ####################################
    -          0392,06,06,06,06,06,00,36 ####################################
    -          0393,06,06,06,06,06,00,36 ####################################
    -          0394,06,06,06,06,06,00,36 ####################################
    -          0395,06,06,06,06,06,00,36 ####################################
    -          0396,06,06,06,06,06,00,36 ####################################
    -          0397,06,06,06,06,06,00,36 ####################################
    -          0398,06,06,06,06,06,00,36 ####################################
    -          0399,06,06,06,06,06,00,36 ####################################
    -          0400,06,06,06,06,06,00,36 ####################################
    -          0401,06,06,06,06,06,00,36 ####################################
    -          0402,06,06,06,06,06,00,36 ####################################
    -          0403,06,06,06,06,06,00,36 ####################################
    -          0404,06,06,06,06,06,00,36 ####################################
    -          0405,06,06,06,06,06,00,36 ####################################
    -          0406,06,06,06,06,06,00,36 ####################################
    -          0407,06,06,06,06,06,00,36 ####################################
    -          0408,06,06,06,06,06,00,36 ####################################
    -          0409,06,06,06,06,06,00,36 ####################################
    -          0410,06,06,06,06,06,00,36 ####################################
    -          0411,06,06,06,06,06,00,36 ####################################
    -          0412,06,06,06,06,06,00,36 ####################################
    -          0413,06,06,06,06,06,00,36 ####################################
    -          0414,06,06,06,06,06,00,36 ####################################
    -          0415,06,06,06,06,06,00,36 ####################################
    -          0416,06,06,06,06,06,00,36 ####################################
    -          0417,06,06,06,06,06,00,36 ####################################
    -          0418,06,06,06,06,06,00,36 ####################################
    -          0419,06,06,06,06,06,00,36 ####################################
    -          0420,06,06,06,06,06,00,36 ####################################
    -          0421,06,06,06,06,06,00,36 ####################################
    -          0422,06,06,06,06,06,00,36 ####################################
    -          0423,06,06,06,06,06,00,36 ####################################
    -          0424,06,06,06,06,06,00,36 ####################################
    -          0425,06,06,06,06,06,00,36 ####################################
    -          0426,06,06,06,06,06,00,36 ####################################
    -          0427,06,06,06,06,06,00,36 ####################################
    -          0428,06,06,06,06,06,00,36 ####################################
    -          0429,06,06,06,06,06,00,36 ####################################
    -          0430,06,06,05,06,06,00,33 #################################
    -          0431,06,05,05,06,06,00,31 ###############################
    -          0432,06,05,05,06,06,00,31 ###############################
    -          0433,06,05,05,06,06,00,31 ###############################
    -          0434,06,05,05,06,06,00,31 ###############################
    -          0435,06,05,05,06,06,00,31 ###############################
    -          0436,06,05,05,06,06,00,31 ###############################
    -          0437,06,05,05,06,06,00,31 ###############################
    -          0438,06,05,05,06,06,00,31 ###############################
    -          0439,06,05,05,06,06,00,31 ###############################
    -          0440,06,05,05,06,06,00,31 ###############################
    -          0441,06,05,05,06,06,00,31 ###############################
    -          0442,06,05,05,06,06,00,31 ###############################
    -          0443,06,05,05,06,06,00,31 ###############################
    -          0444,06,05,05,05,06,00,29 #############################
    -          0445,06,05,05,05,06,00,29 #############################
    -          0446,05,05,05,05,06,00,27 ###########################
    -          0447,05,05,05,05,06,00,27 ###########################
    -          0448,05,05,05,06,06,00,29 #############################
    -          0449,05,05,05,05,05,00,25 #########################
    -          0450,05,05,05,05,05,00,25 #########################
    -          0451,05,05,05,05,05,00,25 #########################
    -          0452,05,05,05,05,05,00,25 #########################
    -          0453,05,05,05,05,05,00,25 #########################
    -          0454,05,05,05,05,05,00,25 #########################
    -          0455,05,05,05,05,05,00,25 #########################
    -          0456,05,05,05,05,05,00,25 #########################
    -          0457,05,05,05,05,05,00,25 #########################
    -          0458,05,05,05,06,05,00,27 ###########################
    -          0459,05,05,05,06,05,00,27 ###########################
    -          0460,05,05,05,05,05,00,25 #########################
    -          0461,05,05,05,05,05,00,25 #########################
    -          0462,05,05,05,05,05,00,25 #########################
    -          0463,05,05,05,05,05,00,25 #########################
    -          0464,05,05,05,05,05,00,25 #########################
    -          0465,05,05,05,05,05,00,25 #########################
    -          0466,06,05,05,05,05,00,27 ###########################
    -          0467,05,05,05,05,05,00,25 #########################
    -          0468,06,05,05,05,05,00,27 ###########################
    -          0469,06,05,05,05,05,00,27 ###########################
    -          0470,06,05,05,06,05,00,29 #############################
    -          0471,06,05,05,06,05,00,29 #############################
    -          0472,05,05,05,06,05,00,27 ###########################
    -          0473,05,05,05,06,05,00,27 ###########################
    -          0474,05,05,05,05,05,00,25 #########################
    -          0475,05,05,05,05,05,00,25 #########################
    -          0476,05,05,05,05,05,00,25 #########################
    -          0477,05,05,05,05,05,00,25 #########################
    -          0478,05,05,05,05,05,00,25 #########################
    -          0479,05,05,05,05,05,00,25 #########################
    -          0480,05,05,05,05,05,00,25 #########################
    -          0481,05,05,05,05,05,00,25 #########################
    -          0482,05,05,05,05,05,00,25 #########################
    -          0483,05,05,05,05,05,00,25 #########################
    -          0484,05,05,05,05,05,00,25 #########################
    -          0485,05,05,05,05,05,00,25 #########################
    -          0486,05,05,05,05,05,00,25 #########################
    -          0487,05,05,05,05,05,00,25 #########################
    -          0488,05,05,05,05,05,00,25 #########################
    -          0489,05,05,05,05,05,00,25 #########################
    -          0490,05,05,05,05,05,00,25 #########################
    -          0491,05,05,05,05,05,00,25 #########################
    -          0492,05,05,05,05,05,00,25 #########################
    -          0493,05,05,05,05,05,00,25 #########################
    -          0494,05,05,05,05,05,00,25 #########################
    -          0495,05,05,05,05,05,00,25 #########################
    -          0496,05,04,05,05,05,00,23 #######################
    -          0497,05,04,05,05,05,00,23 #######################
    -          0498,05,04,05,05,05,00,23 #######################
    -          0499,05,04,05,05,05,00,23 #######################
    -          0500,05,04,05,05,05,00,23 #######################
    -          0501,05,05,05,05,05,00,25 #########################
    -          0502,05,05,05,05,05,00,25 #########################
    -          0503,05,05,05,05,05,00,25 #########################
    -          0504,05,05,05,05,05,00,25 #########################
    -          0505,05,05,05,05,05,00,25 #########################
    -          0506,05,05,05,05,05,00,25 #########################
    -          0507,05,05,05,05,05,00,25 #########################
    -          0508,05,05,05,05,05,00,25 #########################
    -          0509,05,05,05,05,05,00,25 #########################
    -          0510,05,05,05,05,05,00,25 #########################
    -          0511,05,05,05,05,05,00,25 #########################
    -          0512,05,05,05,05,05,00,25 #########################
    -          0513,05,05,05,05,05,00,25 #########################
    -          0514,05,05,05,05,05,00,25 #########################
    -          0515,05,05,05,05,05,00,25 #########################
    -          0516,05,05,05,05,05,00,25 #########################
    -          0517,05,05,05,05,05,00,25 #########################
    -          0518,05,05,05,05,05,00,25 #########################
    -          0519,05,05,05,05,05,00,25 #########################
    -          0520,05,05,05,05,05,00,25 #########################
    -          0521,05,04,04,05,05,00,21 #####################
    -          0522,05,04,04,05,05,00,21 #####################
    -          0523,05,04,04,05,05,00,21 #####################
    -          0524,05,04,04,05,05,00,21 #####################
    -          0525,05,05,04,05,05,00,23 #######################
    -          0526,05,05,04,05,05,00,23 #######################
    -          0527,05,05,04,05,05,00,23 #######################
    -          0528,05,05,04,05,05,00,23 #######################
    -          0529,05,05,04,05,05,00,23 #######################
    -          0530,05,05,04,05,05,00,23 #######################
    -          0531,05,05,04,05,05,00,23 #######################
    -          0532,05,04,04,05,05,00,21 #####################
    -          0533,05,04,04,05,05,00,21 #####################
    -          0534,05,04,04,05,05,00,21 #####################
    -          0535,05,04,04,05,05,00,21 #####################
    -          0536,05,04,04,05,05,00,21 #####################
    -          0537,05,04,04,05,05,00,21 #####################
    -          0538,05,04,04,05,05,00,21 #####################
    -          0539,05,04,04,05,05,00,21 #####################
    -          0540,05,04,04,05,05,00,21 #####################
    -          0541,05,04,04,05,05,00,21 #####################
    -          0542,05,04,04,05,05,00,21 #####################
    -          0543,05,04,04,05,05,00,21 #####################
    -          0544,05,04,04,05,05,00,21 #####################
    -          0545,05,04,04,05,05,00,21 #####################
    -          0546,05,04,04,05,04,00,19 ###################
    -          0547,04,04,04,05,04,00,17 #################
    -          0548,04,04,04,05,04,00,17 #################
    -          0549,04,04,04,04,04,00,16 ################
    -          0550,04,04,04,05,04,00,17 #################
    -          0551,04,04,04,05,05,00,19 ###################
    -          0552,05,04,04,05,04,00,19 ###################
    -          0553,05,04,04,04,04,00,17 #################
    -          0554,05,04,04,04,04,00,17 #################
    -          0555,04,04,04,04,04,00,16 ################
    -          0556,04,04,04,04,04,00,16 ################
    -          0557,04,04,04,04,04,00,16 ################
    -          0558,04,04,04,04,04,00,16 ################
    -          0559,04,04,04,04,04,00,16 ################
    -          0560,04,04,04,04,04,00,16 ################
    -          0561,04,04,04,04,04,00,16 ################
    -          0562,04,04,04,04,04,00,16 ################
    -          0563,04,04,04,04,04,00,16 ################
    -          0564,04,04,04,04,04,00,16 ################
    -          0565,04,04,04,04,04,00,16 ################
    -          0566,04,04,04,04,04,00,16 ################
    -          0567,04,04,04,04,04,00,16 ################
    -          0568,04,04,04,04,04,00,16 ################
    -          0569,04,04,04,04,04,00,16 ################
    -          0570,04,04,04,04,04,00,16 ################
    -          0571,04,04,04,04,05,00,17 #################
    -          0572,04,04,04,04,05,00,17 #################
    -          0573,04,04,04,04,04,00,16 ################
    -          0574,04,04,04,04,04,00,16 ################
    -          0575,04,04,04,04,04,00,16 ################
    -          0576,04,04,04,04,04,00,16 ################
    -          0577,04,04,04,04,04,00,16 ################
    -          0578,04,04,04,04,04,00,16 ################
    -          0579,04,04,04,04,04,00,16 ################
    -          0580,04,04,04,04,04,00,16 ################
    -          0581,04,04,04,04,04,00,16 ################
    -          0582,04,04,04,04,04,00,16 ################
    -          0583,04,04,04,04,04,00,16 ################
    -          0584,04,04,04,04,04,00,16 ################
    -          0585,04,04,04,04,04,00,16 ################
    -          0586,04,04,04,04,04,00,16 ################
    -          0587,04,04,04,04,04,00,16 ################
    -          0588,04,04,04,04,04,00,16 ################
    -          0589,04,04,04,04,04,00,16 ################
    -          0590,04,04,04,04,04,00,16 ################
    -          0591,04,04,04,04,04,00,16 ################
    -          0592,04,04,04,04,04,00,16 ################
    -          0593,04,04,04,04,04,00,16 ################
    -          0594,04,04,04,04,04,00,16 ################
    -          0595,04,04,04,04,04,00,16 ################
    -          0596,04,04,04,04,04,00,16 ################
    -          0597,04,04,04,04,04,00,16 ################
    -          0598,04,04,04,04,04,00,16 ################
    -          0599,04,04,04,04,04,00,16 ################
    -          0600,04,04,04,04,04,00,16 ################
    -          0601,04,04,04,04,04,00,16 ################
    -          0602,04,04,04,04,04,00,16 ################
    -          0603,04,04,04,04,04,00,16 ################
    -          0604,04,04,04,04,04,00,16 ################
    -          0605,04,04,04,04,04,00,16 ################
    -          0606,04,04,04,04,04,00,16 ################
    -          0607,04,04,04,04,04,00,16 ################
    -          0608,04,04,04,04,04,00,16 ################
    -          0609,04,04,04,04,04,00,16 ################
    -          0610,04,04,04,04,04,00,16 ################
    -          0611,04,04,04,04,04,00,16 ################
    -          0612,04,04,04,04,04,00,16 ################
    -          0613,04,04,04,04,04,00,16 ################
    -          0614,04,04,04,04,04,00,16 ################
    -          0615,04,04,04,04,04,00,16 ################
    -          0616,04,04,04,04,04,00,16 ################
    -          0617,04,04,04,04,04,00,16 ################
    -          0618,04,04,04,04,04,00,16 ################
    -          0619,04,04,04,04,04,00,16 ################
    -          0620,04,04,04,04,04,00,16 ################
    -          0621,04,04,04,04,04,00,16 ################
    -          0622,04,04,04,04,04,00,16 ################
    -          0623,04,04,04,04,04,00,16 ################
    -          0624,04,04,04,04,04,00,16 ################
    -          0625,04,04,04,04,04,00,16 ################
    -          0626,04,04,04,04,04,00,16 ################
    -          0627,04,04,04,04,04,00,16 ################
    -          0628,04,04,04,04,04,00,16 ################
    -          0629,04,04,04,04,04,00,16 ################
    -          0630,04,04,04,04,04,00,16 ################
    -          0631,04,04,04,04,04,00,16 ################
    -          0632,04,04,04,04,04,00,16 ################
    -          0633,04,04,04,04,04,00,16 ################
    -          0634,04,04,04,04,04,00,16 ################
    -          0635,04,04,03,04,04,00,14 ##############
    -          0636,04,04,03,04,04,00,14 ##############
    -          0637,04,04,03,03,04,00,13 #############
    -          0638,03,03,03,03,04,00,10 ##########
    -          0639,03,03,03,03,04,00,10 ##########
    -          0640,03,03,02,03,04,00,09 #########
    -          0641,03,03,02,02,03,00,07 #######
    -          0642,03,03,02,02,03,00,07 #######
    -          0643,03,03,02,02,03,00,07 #######
    -          0644,03,03,02,03,03,00,08 ########
    -          0645,03,03,02,03,03,00,08 ########
    -          0646,03,03,03,03,03,00,09 #########
    -          0647,03,03,03,04,03,00,10 ##########
    -          0648,03,03,03,04,03,00,10 ##########
    -          0649,04,03,03,04,04,00,13 #############
    -          0650,04,03,03,04,04,00,13 #############
    -          0651,04,03,03,04,04,00,13 #############
    -          0652,04,03,03,04,04,00,13 #############
    -          0653,04,03,03,04,04,00,13 #############
    -          0654,04,03,03,04,04,00,13 #############
    -          0655,04,03,03,04,04,00,13 #############
    -          0656,03,03,03,03,03,00,09 #########
    -          0657,03,03,03,03,03,00,09 #########
    -          0658,03,03,02,03,03,00,08 ########
    -          0659,03,03,02,03,03,00,08 ########
    -          0660,03,03,02,03,03,00,08 ########
    -          0661,03,02,02,02,03,00,06 ######
    -          0662,03,02,02,02,02,00,05 #####
    -          0663,03,02,02,02,02,00,05 #####
    -          0664,02,02,02,02,02,00,04 ####
    -          0665,02,01,02,02,02,00,03 ###
    -          0666,02,02,02,02,03,00,05 #####
    -          0667,02,01,02,02,03,00,04 ####
    -          0668,03,01,02,03,03,00,06 ######
    -          0669,03,01,02,02,03,00,05 #####
    -          0670,02,01,02,02,02,00,03 ###
    -          0671,02,01,02,02,02,00,03 ###
    -          0672,02,01,02,02,02,00,03 ###
    -          0673,02,01,02,01,02,00,02 ##
    -          0674,02,01,02,02,02,00,03 ###
    -          0675,02,01,02,02,03,00,04 ####
    -          0676,03,02,02,02,03,00,06 ######
    -          0677,03,02,02,03,03,00,07 #######
    -          0678,03,02,02,03,03,00,07 #######
    -          0679,02,02,02,03,03,00,06 ######
    -          0680,02,02,02,03,03,00,06 ######
    -          0681,02,02,02,03,03,00,06 ######
    -          0682,02,01,02,04,03,00,06 ######
    -          0683,02,01,02,04,03,00,06 ######
    -          0684,02,01,02,04,03,00,06 ######
    -          0685,02,01,02,04,03,00,06 ######
    -          0686,03,01,02,04,03,00,07 #######
    -          0687,03,02,03,04,03,00,09 #########
    -          0688,03,02,03,04,03,00,09 #########
    -          0689,03,02,03,04,03,00,09 #########
    -          0690,03,02,03,04,03,00,09 #########
    -          0691,04,02,03,04,04,00,12 ############
    -          0692,04,02,03,04,04,00,12 ############
    -          0693,03,02,03,04,04,00,10 ##########
    -          0694,04,02,03,04,04,00,12 ############
    -          0695,04,02,03,04,04,00,12 ############
    -          0696,04,02,03,04,04,00,12 ############
    -          0697,04,02,03,04,04,00,12 ############
    -          0698,04,02,03,04,04,00,12 ############
    -          0699,04,02,03,04,04,00,12 ############
    -          0700,04,02,03,04,04,00,12 ############
    -          0701,04,03,03,04,04,00,13 #############
    -          0702,04,02,03,04,04,00,12 ############
    -          0703,04,02,04,04,04,00,13 #############
    -          0704,04,02,04,04,04,00,13 #############
    -          0705,04,02,04,04,04,00,13 #############
    -          0706,04,02,04,04,04,00,13 #############
    -          0707,04,03,04,04,04,00,14 ##############
    -          0708,04,03,04,04,04,00,14 ##############
    -          0709,04,03,04,04,04,00,14 ##############
    -          0710,04,03,04,04,04,00,14 ##############
    -          0711,04,03,04,04,04,00,14 ##############
    -          0712,04,03,04,04,04,00,14 ##############
    -          0713,04,03,04,04,04,00,14 ##############
    -          0714,04,03,04,04,04,00,14 ##############
    -          0715,04,03,04,04,04,00,14 ##############
    -          0716,04,03,04,04,04,00,14 ##############
    -          0717,04,02,04,04,04,00,13 #############
    -          0718,04,02,04,04,04,00,13 #############
    -          0719,04,02,04,04,04,00,13 #############
    -          0720,04,02,04,04,04,00,13 #############
    -          0721,03,01,04,04,04,00,11 ###########
    -          0722,03,01,03,04,04,00,10 ##########
    -          0723,03,01,04,04,04,00,11 ###########
    -          0724,02,01,04,04,04,00,10 ##########
    -          0725,02,01,04,04,04,00,10 ##########
    -          0726,02,01,04,04,04,00,10 ##########
    -          0727,02,02,04,04,04,00,11 ###########
    -          0728,02,02,04,04,04,00,11 ###########
    -          0729,02,02,03,04,03,00,08 ########
    -          0730,02,01,03,04,03,00,07 #######
    -          0731,02,02,03,04,03,00,08 ########
    -          0732,02,02,03,04,03,00,08 ########
    -          0733,02,02,03,04,03,00,08 ########
    -          0734,02,02,03,04,03,00,08 ########
    -          0735,02,02,03,04,03,00,08 ########
    -          0736,02,03,03,04,03,00,09 #########
    -          0737,02,03,03,04,03,00,09 #########
    -          0738,02,03,03,04,03,00,09 #########
    -          0739,02,03,03,04,03,00,09 #########
    -          0740,02,03,03,04,03,00,09 #########
    -          0741,02,03,03,04,03,00,09 #########
    -          0742,02,04,03,03,03,00,09 #########
    -          0743,02,03,03,03,03,00,08 ########
    -          0744,02,04,03,03,03,00,09 #########
    -          0745,02,04,03,03,03,00,09 #########
    -          0746,02,04,02,03,03,00,08 ########
    -          0747,02,04,02,03,03,00,08 ########
    -          0748,02,04,02,02,04,00,08 ########
    -          0749,02,04,02,02,04,00,08 ########
    -          0750,03,04,02,02,04,00,09 #########
    -          0751,03,04,02,02,04,00,09 #########
    -          0752,03,04,02,02,04,00,09 #########
    -          0753,03,04,02,02,04,00,09 #########
    -          0754,04,04,02,02,04,00,11 ###########
    -          0755,04,04,02,02,04,00,11 ###########
    -          0756,04,04,02,02,04,00,11 ###########
    -          0757,04,04,02,02,04,00,11 ###########
    -          0758,04,04,02,02,04,00,11 ###########
    -          0759,04,04,03,02,04,00,12 ############
    -          0760,04,05,03,02,04,00,14 ##############
    -          0761,04,04,03,03,04,00,13 #############
    -          0762,04,04,03,03,05,00,15 ###############
    -          0763,04,04,03,03,05,00,15 ###############
    -          0764,04,05,04,04,05,00,19 ###################
    -          0765,04,05,04,04,05,00,19 ###################
    -          0766,04,05,04,04,05,00,19 ###################
    -          0767,04,05,04,04,05,00,19 ###################
    -          0768,04,05,04,04,05,00,19 ###################
    -          0769,04,05,04,04,05,00,19 ###################
    -          0770,04,05,04,04,05,00,19 ###################
    -          0771,04,05,04,04,05,00,19 ###################
    -          0772,05,05,04,04,05,00,21 #####################
    -          0773,05,05,04,04,05,00,21 #####################
    -          0774,05,05,04,04,05,00,21 #####################
    -          0775,05,05,05,04,05,00,23 #######################
    -          0776,05,05,05,04,05,00,23 #######################
    -          0777,05,05,05,05,05,00,25 #########################
    -          0778,05,05,05,05,05,00,25 #########################
    -          0779,05,05,05,05,05,00,25 #########################
    -          0780,05,05,05,05,05,00,25 #########################
    -          0781,05,05,05,05,05,00,25 #########################
    -          0782,05,05,05,05,05,00,25 #########################
    -          0783,05,05,05,05,05,00,25 #########################
    -          0784,05,05,05,05,05,00,25 #########################
    -          0785,05,05,05,05,05,00,25 #########################
    -          0786,05,05,05,05,05,00,25 #########################
    -          0787,05,05,05,05,05,00,25 #########################
    -          0788,05,05,05,05,05,00,25 #########################
    -          0789,05,05,05,05,05,00,25 #########################
    -          0790,05,05,05,05,05,00,25 #########################
    -          0791,05,05,05,05,05,00,25 #########################
    -          0792,05,05,05,05,05,00,25 #########################
    -          0793,05,05,05,05,05,00,25 #########################
    -          0794,05,05,05,05,05,00,25 #########################
    -          0795,05,05,05,05,05,00,25 #########################
    -          0796,05,05,05,05,06,00,27 ###########################
    -          0797,05,05,05,05,06,00,27 ###########################
    -          0798,05,05,05,05,06,00,27 ###########################
    -          0799,05,05,05,05,06,00,27 ###########################
    -          0800,05,05,05,05,06,00,27 ###########################
    -          0801,06,05,05,06,06,00,31 ###############################
    -          0802,06,05,06,06,06,00,33 #################################
    -          0803,06,05,05,06,06,00,31 ###############################
    -          0804,06,05,06,06,06,00,33 #################################
    -          0805,06,05,06,06,06,00,33 #################################
    -          0806,06,05,06,06,06,00,33 #################################
    -          0807,06,05,06,06,06,00,33 #################################
    -          0808,06,06,06,06,06,00,36 ####################################
    -          0809,06,06,06,06,06,00,36 ####################################
    -          0810,06,06,06,06,06,00,36 ####################################
    -          0811,06,06,06,06,06,00,36 ####################################
    -          0812,06,06,06,06,06,00,36 ####################################
    -          0813,06,05,06,06,06,00,33 #################################
    -          0814,06,06,06,06,06,00,36 ####################################
    -          0815,06,06,06,06,06,00,36 ####################################
    -          0816,06,06,06,06,06,00,36 ####################################
    -          0817,06,06,06,06,06,00,36 ####################################
    -          0818,06,06,06,06,06,00,36 ####################################
    -          0819,06,06,06,06,06,00,36 ####################################
    -          0820,06,06,06,06,06,00,36 ####################################
    -          0821,06,05,06,06,06,00,33 #################################
    -          0822,06,06,06,06,06,00,36 ####################################
    -          0823,06,05,06,06,06,00,33 #################################
    -          0824,06,05,05,06,06,00,31 ###############################
    -          0825,06,05,05,06,06,00,31 ###############################
    -          0826,06,06,05,06,06,00,33 #################################
    -          0827,06,06,06,06,06,00,36 ####################################
    -          0828,06,06,06,06,06,00,36 ####################################
    -          0829,06,06,06,06,06,00,36 ####################################
    -          0830,06,06,06,06,06,00,36 ####################################
    -          0831,06,06,06,06,06,00,36 ####################################
    -          0832,06,06,06,06,06,00,36 ####################################
    -          0833,06,06,06,06,06,00,36 ####################################
    -          0834,06,06,06,06,06,00,36 ####################################
    -          0835,06,06,06,06,06,00,36 ####################################
    -          0836,06,06,06,06,06,00,36 ####################################
    -          0837,06,06,06,06,06,00,36 ####################################
    -          0838,06,06,06,06,06,00,36 ####################################
    -          0839,06,06,06,06,06,00,36 ####################################
    -          0840,06,06,06,06,06,00,36 ####################################
    -          0841,06,06,06,06,06,00,36 ####################################
    -          0842,06,06,06,06,06,00,36 ####################################
    -          0843,06,06,06,06,06,00,36 ####################################
    -          0844,06,06,06,06,06,00,36 ####################################
    -          0845,06,06,06,06,06,00,36 ####################################
    -          0846,06,06,06,06,06,00,36 ####################################
    -          0847,06,06,06,06,06,00,36 ####################################
    -          0848,06,06,06,06,06,00,36 ####################################
    -          0849,06,06,06,06,06,00,36 ####################################
    -          0850,06,06,06,06,06,00,36 ####################################
    -          0851,06,06,06,06,06,00,36 ####################################
    -          0852,06,06,06,06,06,00,36 ####################################
    -          0853,06,06,06,06,06,00,36 ####################################
    -          0854,06,06,06,06,06,00,36 ####################################
    -          0855,06,06,06,06,06,00,36 ####################################
    -          0856,06,05,06,06,06,00,33 #################################
    -          0857,06,05,06,06,06,00,33 #################################
    -          0858,06,05,05,06,06,00,31 ###############################
    -          0859,06,05,05,06,06,00,31 ###############################
    -          0860,06,05,05,06,06,00,31 ###############################
    -          0861,06,05,05,06,06,00,31 ###############################
    -          0862,06,05,05,06,06,00,31 ###############################
    -          0863,06,05,06,06,06,00,33 #################################
    -          0864,06,06,06,06,06,00,36 ####################################
    -          0865,06,06,06,06,06,00,36 ####################################
    -          0866,06,06,06,06,06,00,36 ####################################
    -          0867,06,06,06,06,06,00,36 ####################################
    -          0868,06,06,06,06,06,00,36 ####################################
    -          0869,06,06,06,06,06,00,36 ####################################
    -          0870,06,06,06,06,06,00,36 ####################################
    -          0871,06,06,06,06,06,00,36 ####################################
    -          0872,06,06,06,06,06,00,36 ####################################
    -          0873,06,06,06,06,06,00,36 ####################################
    -          0874,06,06,06,06,06,00,36 ####################################
    -          0875,06,06,06,06,06,00,36 ####################################
    -          0876,06,06,06,06,06,00,36 ####################################
    -          0877,06,06,06,06,06,00,36 ####################################
    -          0878,06,06,06,06,06,00,36 ####################################
    -          0879,06,06,06,06,06,00,36 ####################################
    -          0880,06,06,06,06,06,00,36 ####################################
    -          0881,06,06,06,06,06,00,36 ####################################
    -          0882,06,06,06,06,06,00,36 ####################################
    -          0883,06,06,06,06,06,00,36 ####################################
    -          0884,06,06,06,06,06,00,36 ####################################
    -          0885,06,06,06,06,06,00,36 ####################################
    -          0886,06,06,06,06,06,00,36 ####################################
    -          0887,06,06,06,06,06,00,36 ####################################
    -          0888,06,06,06,06,06,00,36 ####################################
    -          0889,06,06,06,06,06,00,36 ####################################
    -          0890,06,06,06,06,07,00,38 ######################################
    -          0891,06,06,06,06,06,00,36 ####################################
    -          0892,06,06,06,06,06,00,36 ####################################
    -          0893,06,06,06,06,06,00,36 ####################################
    -          0894,06,06,06,06,06,00,36 ####################################
    -          0895,06,06,06,06,06,00,36 ####################################
    -          0896,06,06,06,06,07,00,38 ######################################
    -          0897,06,06,06,06,07,00,38 ######################################
    -          0898,06,06,06,06,07,00,38 ######################################
    -          0899,06,06,06,06,06,00,36 ####################################
    -          0900,06,06,06,06,07,00,38 ######################################
    -          0901,07,06,06,06,07,00,41 #########################################
    -          0902,06,06,06,06,06,00,36 ####################################
    -          0903,07,06,06,06,06,00,38 ######################################
    -          0904,07,06,06,06,07,00,41 #########################################
    -          0905,07,06,06,06,06,00,38 ######################################
    -          0906,07,06,06,06,06,00,38 ######################################
    -          0907,07,06,06,06,07,00,41 #########################################
    -          0908,07,06,06,06,07,00,41 #########################################
    -          0909,06,06,06,06,07,00,38 ######################################
    -          0910,06,06,06,06,06,00,36 ####################################
    -          0911,06,06,06,06,06,00,36 ####################################
    -          0912,06,06,06,06,06,00,36 ####################################
    -          0913,06,06,06,06,06,00,36 ####################################
    -          0914,06,06,06,06,06,00,36 ####################################
    -          0915,06,06,06,06,06,00,36 ####################################
    -          0916,06,06,06,06,06,00,36 ####################################
    -
    -       The  mean-square value in column 8 determines the length of the hash line that follows when option -h is selected.  Lower
    -       mean-square values indicate lower data handling capacity for that carrier frequency while higher values  indicate  higher
    -       data  handling  capacity.   Mean-square values can range from 0 through 49.  For example, the distinct parabolic dip near
    -       offset 41 indicates reduced data capacity at that frequency.  There is another near offset 673.  The actual carrier  fre‐
    -       quencies  cannot  be  determined  without the corresponding amplitude map.  See the man page for program psnotch for more
    -       information.
    -
    -       This program can be used to detect the presence of powerline interference when electronic test equipment  is  not  avail‐
    -       able.  Although the frequency cannot be determined, the presence or absence of severe interferrence can be detected.
    -
    -       The  following  example  computes average signal-to-noise ratios (SNR) for each time slot and the entire tone map because
    -       option -s is selected.  The AGC and GIL values for each slot are also displayed.  Option -s also suppresses tone map out‐
    -       put.
    -
    -          # plctone -qs 000B3B00AAFA 00B05200CA0C
    -           SNR   24.398   24.398   24.398   24.398   24.398   24.398
    -           ATN  -35.602  -35.602  -35.602  -35.602  -35.602  -35.602
    -           BPC    8.799      nan    8.799    8.799    8.799    8.799
    -           AGC 04 04 04 04 04
    -           GIL 00 00 00 00 00
    -
    -       The  SNR  values  shown  above are for a very clean and stable connection.  Once a tone map is computed it remains stable
    -       unless the attenuation changes or noise is introduced while data is being transfered.  With no  data  transfer,  the  map
    -       will automatically update after some (long) period, perhaps a minute, based on a number of interrelated factors.
    -
    -DISCLAIMER
    -       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
    -       gram.
    -
    -SEE ALSO
    -       plc(1), plclist(1), plcrate(1), plcstat(1), plctool(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plctone(1)
    -
    - - - diff --git a/docbook/plctone.c.html b/docbook/plctone.c.html deleted file mode 100644 index c3ce3fe8..00000000 --- a/docbook/plctone.c.html +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - plctone.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plctone.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/symbol.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Devices.c"
    -#include "../plc/Failure.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/ToneMaps2.c"
    -#include "../plc/SignalToNoise2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/error.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/synonym.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader1.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static const struct _term_ couple [] =
    -
    -{
    -	{
    -		"alt",
    -		"1"
    -	},
    -	{
    -		"pri",
    -		"0"
    -	}
    -};
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"ehi:p:qsvx",
    -		"node peer [> stdout]",
    -		"Qualcomm Atheros Panther/Lynx Tone Map Dump",
    -		"e\tredirect stderr to stdout",
    -		"h\tprint mean-square histogram",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"p n\tcoupling [" LITERAL (PLCOUPLING) "]",
    -		"q\tquiet mode",
    -		"s\tcompute signal-to-noise and bits-per-carrier ratios",
    -		"v\tverbose mode",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed (* function) (struct plc *) = ToneMaps2;
    -	signed c;
    -	plc.action = PLCOUPLING;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'p':
    -			plc.coupling = (unsigned)(uintspec (synonym (optarg, couple, SIZEOF (couple)), 0, UCHAR_MAX));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'h':
    -			_setbits (plc.flags, PLC_GRAPH);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 's':
    -			_setbits (plc.flags, PLC_ANALYSE);
    -			function = SignalToNoise2;
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (!argc || !argv)
    -	{
    -		error (1, ECANCELED, "No node address given");
    -	}
    -	if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -	{
    -		error (1, errno, PLC_BAD_MAC, * argv);
    -	}
    -	argc--;
    -	argv++;
    -	if (!argc || !argv)
    -	{
    -		error (1, ECANCELED, "No peer address given");
    -	}
    -	if (!hexencode (plc.RDA, sizeof (plc.RDA), synonym (* argv, devices, SIZEOF (devices))))
    -	{
    -		error (1, errno, PLC_BAD_MAC, * argv);
    -	}
    -	argc--;
    -	argv++;
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	function (&plc);
    -	free (plc.message);
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plctool.1.html b/docbook/plctool.1.html deleted file mode 100644 index bef04145..00000000 --- a/docbook/plctool.1.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - plctool.1 - - - - - - - - - -
    -plctool(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plctool(1)
    -
    -NAME
    -       plctool - Qualcomm Atheros Panther/Lynx Powerline Device Manager
    -
    -SYNOPSIS
    -       plctool [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       This  version  of the Qualcomm Atheros Powerline Device Manager performs basic operations on powerline devices using ven‐
    -       dor-specific management messages.  It can be used to interrogate and control devices  or  upgrade  firmware  if  on-board
    -       NVRAM is present.  See amptool for a similar utility that supports AR7400 devices.  It supports chipsets QCA6410, QCA7000
    -       and QCA7420.
    -
    -       This program is the proper tool for upgrading panther/lynx devices.  It is important to reset panther/lynx devices  after
    -       update  since  reset  after update is not automatic anymore.  Also, everything takes longer because part memory is erased
    -       before being written.  Some operations may take 20 to 40 seconds so be patient.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an  overview  and  installation
    -       instructions.
    -
    -COMMENTS
    -       This  program  version  is  identical  to  legacy program int6k except for option -m which uses version 1 of the Qualcomm
    -       Atheros VS_NW_INFO vendor-specific message.  Older firmware versions may not recognize this message version.
    -
    -OPTIONS
    -       -a     Read device attributes using VS_OP_ATTRIBUTES.  Attributes are short strings and  integers  that  describe  device
    -              hardware  and firmware.  They are concatenated to form the output that is similar to option -r but derived differ‐
    -              ently.
    -
    -       -B action
    -              press the simple connect pushbutton using VS_PB_ENC.  The action can be specified by number 1, 2, 3  or  4  or  by
    -              symbol  "join", "leave", "status" or "reset", respectively.  Use 1 on both devices that are expected to join.  Use
    -              2 only on the device that is expected to leave the network.
    -
    -       -d filename
    -              Read Watchdog Report from the device and write it to the named file in binary format using VS_WD_RPT.  The  report
    -              file  can  be  sent  to Qualcomm Atheros for technical analysis.  No assumptions are made based on filename and no
    -              filename convetions are enforced; however, you should use a .log file extension to indicate binary format.
    -
    -       -D xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
    -              Define the 16 octet Device Access Key (DAK) in hex format.  The DAK is used by option -J.  It may also be  set  to
    -              "key1" or "key2" as explained in the KEYS section.
    -
    -       -e     Redirects stderr messages to stdout.  Normally, status and error messages are printed on stderr while primary pro‐
    -              gram output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -f     Read flash memory parameters using VS_GET_NVM.  An error will be reported if no flash memory is present.
    -
    -       -F[F]  Write previously downloaded MAC and PIB to NVRAM using VS_MOD_NVM.  Adding a second F here or another -F  anywhere
    -              on  the command line WILL NOT force-flash a blank or corrupted NVRAM as with programs int6k and amptool.  Firmware
    -              loaded from NVRAM will treat force-flash as an error.  This option can be used to create factory settings but can‐
    -              not  be  used  to  change  them once created.  Subsequent use creates and updates operational settings that can be
    -              erased using a factory reset.  This option is executed after all others on the command line,  except  for  the  -R
    -              option.
    -
    -       -g     Read multicast group information discovered while IGMP snooping using VS_MULTICAST_INFO.
    -
    -       -i interface
    -              Select  the host Ethernet interface.  All requests are sent via this host interface and only reponses received via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network  connection;  however,  if  environment  string "PLC" is defined then it takes precedence over the default
    -              interface.  This option then takes precedence over either default.
    -
    -       -I     Read the device PIB header using VS_MODULE_OPERATION and print the PIB major and  minor  revision  number,  Device
    -              Access  Key (DAK), Network Membership Key (NMK), MAC address and other identity information on stdout.  The values
    -              displayed can be changed using program modpib.
    -
    -       -J xx:xx:xx:xx:xx:xx
    -              Set the Network Membership Key (NMK) on a remote device using VS_SET_KEY.  This option is similar to option -K but
    -              requires  the  remote  device  MAC  and DAK in addition to the NMK and local device MAC address.  The NMK value is
    -              defined using option -K unless you want to use the default value.  The remote  DAK  is  defined  using  option  -D
    -              unless  you  want to use the default value.  Programming remote device keys is complicated.  It is often easier to
    -              connect the device directly to the host and use the -K option.
    -
    -       -K xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
    -              Define the Network Membership Key (NMK) value used by options -M or -J.  The symbolic names "key1" and "key2"  are
    -              recognized as described in the KEY section.
    -
    -       -l count
    -              Define the number of times that the command will be repeated for each device specified.  Normally, you will repeat
    -              operations on one device only.
    -
    -       -L     Read and display powerline link status.
    -
    -       -m     Read network membership information using VS_NW_INFO.  This can be used to determine network configuration.
    -
    -       -M     Set the Network Membership Key (NMK) on the local device using VS_SET_KEY.  The NMK value is specified  using  the
    -              -K option unless you want to use the default value.
    -
    -       -n filename
    -              Read  firmware  from  the  device SDRAM and write it to the named .nvm file using multiple VS_RD_MOD messages.  No
    -              assumptions are made based on filename and no filename conventions are enforced.  This option is performed  before
    -              option -N when both are specified.
    -
    -       -N filename
    -              Read  the  named  .nvm file and write it to the device using multiple VS_WR_MOD messages.  No assumptions are made
    -              based on filename and no filename conventions are enforced; however, files having  invalid  .nvm  format  will  be
    -              rejected.  This option is executed after -n when both are specified.
    -
    -       -p filename
    -              Read parameters from the device NVRAM and write them to the named .pib file using multiple VS_RD_MOD messages.  No
    -              assumptions are made based on filename and no filename convetions are enforced.  This option  is  executed  before
    -              option BP when both are specified.
    -
    -       -P filename
    -              Read  the  named  .pib file and write it to the device using multiple VS_WR_MOD messages.  No assumptions are made
    -              based on filename and no filename conventions are enforced; however, files having  invalid  .pib  format  will  be
    -              rejected.  This option is executed after -p when both are specified.
    -
    -       -q     Suppresses status messages on stderr.
    -
    -       -Q     Quick  flash.  The program will not wait for a device to reset or the firmware to restart after writing flash mem‐
    -              ory.  This option is desirable with newer firmware that writes flash memory in the background.  It has  no  effect
    -              unless used with option -F or -C.
    -
    -       -r     Read device firmware and hardware revision using VS_SW_VER.  Output is similar to option -a but is derived differ‐
    -              ently.
    -
    -       -R     Reset the device using VS_RS_DEV.  This option is executed after all others on the same command line.
    -
    -       -t milliseconds
    -              Read timeout in milliseconds.  Values range from 0 through UINT_MAX.  This is  the  maximum  time  allowed  for  a
    -              response.  The default is shown in brackets on the program menu.
    -
    -       -T     Restore  factory defaults.  This permanently erases all PIB changes made since the device was last programmed with
    -              factory default settings.  The device will automatically reset and reboot.
    -
    -       -v     Print additional information on stdout.  In particular, this option dumps incoming and outgoing packets which  can
    -              be saved as text files for reference.
    -
    -       -w seconds
    -              Defines  the  number  of  seconds to wait before repeating command line options.  This option has no effect unless
    -              option -l is also specified with a non-zero value.
    -
    -       -x     Cause the program to exit on the first error instead  of  continuing  with  remaining  iterations,  operations  or
    -              devices.   Normally,  the program reports errors and moves on to the next operation, iteration or device depending
    -              on the command line.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The Ethernet hardware address of some powerline device.  More than one address may be  specified  on  the  command
    -              line.   If  more  than one address is specified then operations are performed on each device in turn.  The default
    -              address is local.  as explained in the DEVICES section.
    -
    -KEYS
    -       Passwords are variable length character strings that end-users can remember.  Keys are fixed length binary values created
    -       by encrypting passwords.  There are two encryption algorithms for HomePlugAV.  One for DAKs and the other for NMKs.  This
    -       means that a given password will produce different keys depending on use.  This program only deals with keys because that
    -       is what powerline devices recognize.  The passwords that generated the keys are irrelevant here.
    -
    -       Encryption  keys  are  tedious  to type and prone to error.  For convenience, symbolic names have been assigned to common
    -       encryption keys and are recognized by options -D and -K.
    -
    -       key1   Key  for  encrypted  password  "HomePlugAV".   This  is  "689F074B8B0275A2710B0B5779AD1630"  for  option  -D   and
    -              "50D3E4933F855B7040784DF815AA8DB7" for option -K.
    -
    -       key2   Key  for  encrypted  password  "HomePlugAV0123".   This  is  "F084B4E8F6069FF1300C9BDB812367FF"  for option -D and
    -              "B59319D7E8157BA001B018669CCEE30D" for option -K.
    -
    -       none   Always "00000000000000000000000000000000".
    -
    -DEVICES
    -       Powerline devices use Ethernet hardware, or Media Access Control (MAC), addresses.  Device addresses are  12  hexadecimal
    -       digits  (0123456789ABCDEFabcdef)  in upper, lower or mixed case.  Individual octets may be separated by colons, for clar‐
    -       ity, but not all octets need to be seperated.  For example, "00b052000001", "00:b0:52:00:00:01" and  "00b052:000001"  are
    -       valid and equivalent.
    -
    -       These symbolic addresses are recognized by this program and may be used instead of the actual address value.
    -
    -       all    Equivalent to "broadcast", described next.
    -
    -       broadcast
    -              A  synonym  for the standard Ethernet broadcast address, FF:FF:FF:FF:FF:FF.  All devices, whether local, remote or
    -              foreign will respond to this address.
    -
    -       local  A synonym for the Qualcomm Atheros vendor specific Local Management Address (LMA), 00:B0:52:00:00:01.   All  local
    -              Atheros  devices  will  recognize  this  address  but remote and foreign devices will not.  A remote device is any
    -              device at the far end of a powerline connection.  A foreign device is any device not manufactured by Atheros.
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL
    -       USA.   Consequently,  public  information  may  not  be available.  Qualcomm Atheros reserves the right to modify message
    -       structure or content in future firmware releases without any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       The following command writew file QCA7000.pib and QCA7000.nvm to a remote powerline device then resets it.  The reset  is
    -       required because reset after flash is no longer automatic.
    -
    -          # plctool -P QCA7000.pib -N QCA7000.nvm -R 00B05201053E
    -
    -       The  previous command does not replace existing PIB values.  Instead, it appends the new PIB values to the end of the old
    -       PIB.  To replace existing PIB values, you must write the same PIB again, as follows.
    -
    -          # plctool -P QCA7000.pib -R 00B05201053E
    -
    -       The following commands do the same thing but avoid one unecessary reset.
    -
    -          # plctool -P QCA7000.pib -N QCA7000.nvm 00B05201053E
    -          # plctool -P QCA7000.pib -R 00B05201053E
    -
    -       The reset can also be postponed as follows.
    -
    -          # plctool -P QCA7000.pib -N QCA7000.nvm 00B05201053E
    -          # plctool -P QCA7000.pib 00B05201053E
    -          # plctool -R 00B05201053E
    -
    -       The next two commands are equivalent.  They set the NMK on the local device to key1 as descripted in  the  KEYS  section.
    -       The  first  command  resets the NMK on the local device with -M then specifies the NMK as key1.  The second command omits
    -       the key specification since key1 is the program default NMK.  One could, of course, type the encryption key.
    -
    -          # plctool -MK key1
    -          # plctool -M
    -
    -SEE ALSO
    -       plc(1), ampboot(1), ampboot(1), amphost(1), int6kid(1), amprate(1), amprule(1), ampstat(1), ampwait(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plctool(1)
    -
    - - - diff --git a/docbook/plctool.c.html b/docbook/plctool.c.html deleted file mode 100644 index 68d5ccdb..00000000 --- a/docbook/plctool.c.html +++ /dev/null @@ -1,697 +0,0 @@ - - - - - - plctool.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plctool.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../ether/channel.h"
    -#include "../key/HPAVKey.h"
    -#include "../key/keys.h"
    -#include "../ram/sdram.h"
    -#include "../pib/pib.h"
    -#include "../nvm/nvm.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Attributes2.c"
    -#include "../plc/Confirm.c"
    -#include "../plc/Devices.c"
    -#include "../plc/Display.c"
    -#include "../plc/FactoryDefaults.c"
    -#include "../plc/Failure.c"
    -#include "../plc/FlashDevice2.c"
    -#include "../plc/FlashFirmware.c"
    -#include "../plc/FlashNVM.c"
    -#include "../plc/FlashParameters.c"
    -#include "../plc/FlashSoftloader.c"
    -#include "../plc/HostActionResponse.c"
    -#include "../plc/Identity.c"
    -#include "../plc/Identity1.c"
    -#include "../plc/Identity2.c"
    -#include "../plc/LinkStatus.c"
    -#include "../plc/ModuleCommit.c"
    -#include "../plc/ModuleRead.c"
    -#include "../plc/ModuleSession.c"
    -#include "../plc/ModuleSpec.c"
    -#include "../plc/ModuleWrite.c"
    -#include "../plc/NVRAMInfo.c"
    -#include "../plc/NetInfo2.c"
    -#include "../plc/PLCSelect.c"
    -#include "../plc/PushButton.c"
    -#include "../plc/ReadMFG.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/ReadFirmware2.c"
    -#include "../plc/ReadParameters2.c"
    -#include "../plc/Request.c"
    -#include "../plc/ResetDevice.c"
    -#include "../plc/RemoteHosts.c"
    -#include "../plc/SDRAMInfo.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/SetNMK.c"
    -#include "../plc/StartFirmware1.c"
    -#include "../plc/StationRole.c"
    -#include "../plc/VersionInfo2.c"
    -#include "../plc/WaitForReset.c"
    -#include "../plc/WaitForStart.c"
    -#include "../plc/WatchdogReport.c"
    -#include "../plc/WriteNVM.c"
    -#include "../plc/WritePIB.c"
    -#include "../plc/chipset.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/error.c"
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/synonym.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/basespec.c"
    -#include "../tools/version.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/decstring.c"
    -#include "../tools/decdecode.c"
    -#include "../tools/hexout.c"
    -#include "../tools/todigit.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/typename.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/channel.c"
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ram/nvram.c"
    -#include "../ram/sdramfile.c"
    -#include "../ram/sdrampeek.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibpeek1.c"
    -#include "../pib/pibpeek2.c"
    -#include "../pib/pibfile2.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/QualcommHeader1.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../mme/MMECode.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/keys.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PLCTOOL_WAIT 0
    -#define PLCTOOL_LOOP 1
    -
    -#define BUTTONS (sizeof (buttons) / sizeof (struct _term_))
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static const struct _term_ buttons [] =
    -
    -{
    -	{
    -		"join",
    -		"1"
    -	},
    -	{
    -		"leave",
    -		"2"
    -	},
    -	{
    -		"status",
    -		"3"
    -	}
    -};
    -
    -/*====================================================================*
    - *
    - *   void manager (struct plc * plc, signed count, signed pause);
    - *
    - *   perform operations in logical order despite any order specfied
    - *   on the command line; for example read PIB before writing PIB;
    - *
    - *   operation order is controlled by the order of "if" statements
    - *   shown here; the entire operation sequence can be repeated with
    - *   an optional pause between each iteration;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void manager (struct plc * plc, signed count, signed pause)
    -
    -{
    -	while (count--)
    -	{
    -		if (_anyset (plc->flags, PLC_LINK_STATUS))
    -		{
    -			LinkStatus (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_VERSION))
    -		{
    -			VersionInfo2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_ATTRIBUTES))
    -		{
    -			Attributes2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_WATCHDOG_REPORT))
    -		{
    -			WatchdogReport (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_NVRAM_INFO))
    -		{
    -			NVRAMInfo (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_READ_IDENTITY))
    -		{
    -			Identity2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_REMOTEHOSTS))
    -		{
    -			RemoteHosts (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_NETWORK))
    -		{
    -			NetInfo2 (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_READ_PIB))
    -		{
    -			ModuleRead (plc, &plc->pib, PLC_MOD_OP_READ_MEMORY, PLC_MODULEID_PARAMETERS, 0);
    -		}
    -		if (_anyset (plc->flags, PLC_READ_MAC))
    -		{
    -			ModuleRead (plc, &plc->nvm, PLC_MOD_OP_READ_MEMORY, PLC_MODULEID_FIRMWARE, 0);
    -		}
    -		if (_anyset (plc->flags, PLC_HOST_ACTION))
    -		{
    -			HostActionResponse (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_PUSH_BUTTON))
    -		{
    -			PushButton (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_FACTORY_DEFAULTS))
    -		{
    -			FactoryDefaults (plc);
    -		}
    -		if (_anyset (plc->flags, (PLC_SETLOCALKEY | PLC_SETREMOTEKEY)))
    -		{
    -			SetNMK (plc);
    -		}
    -		if (_anyset (plc->flags, PLC_FLASH_DEVICE))
    -		{
    -			FlashDevice2 (plc, (PLC_COMMIT_FORCE | PLC_COMMIT_NORESET | PLC_COMMIT_FACTPIB));
    -		}
    -		if (_anyset (plc->flags, PLC_RESET_DEVICE))
    -		{
    -			ResetDevice (plc);
    -		}
    -		sleep (pause);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	extern struct _term_ const daks [];
    -	extern struct _term_ const nmks [];
    -	static char const * optv [] =
    -	{
    -		"abB:d:D:efFHi:IJ:K:l:LmMn:N:p:P:QqrRS:t:Tvw:x",
    -		"device [device] [...]",
    -		"Qualcomm Atheros Panther/Lynx Powerline Device Manager",
    -		"a\tread Device Attributes using VS_OP_ATTRIBUTES",
    -		"B n\tperform pushbutton action (n) using MS_PB_ENC [1|2|3|'join'|'leave'|'status']",
    -		"d f\tdump and clear watchdog report to file (f) using VS_WD_RPT",
    -		"D x\tDevice Access Key (DAK) is (x) [" DAK1 "]",
    -		"e\tredirect stderr to stdout",
    -		"f\tread NVRAM Configuration using VS_GET_NVM",
    -		"F[F]\tflash [force] parameters and/or firmware using VS_MODULE_OPERATION",
    -		"H\tstop host action requests using VS_HOST_ACTION.IND",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"I\tread device identity using VS_MODULE_OPERATION",
    -		"J x\tset NMK on remote device (x) via local device using VS_SET_KEY (see -K)",
    -		"K x\tNetwork Membership Key (NMK) is (x) [" NMK1 "]",
    -		"l n\tloop (n) times [" LITERAL (PLCTOOL_LOOP) "]",
    -		"L\tdisplay link status",
    -		"m\tread network membership information using VS_NW_INFO",
    -		"M\tset NMK on local device using VS_SET_KEY (see -K)",
    -		"n f\tread NVM from SDRAM to file (f) using VS_MODULE_OPERATION",
    -		"N f\twrite firmware file (f) to flash memory using VS_MODULE_OPERATION",
    -		"p f\tread PIB from SDRAM to file (f) using VS_MODULE_OPERATION",
    -		"P f\twrite parameter file (f) to flash memory using VS_MODULE_OPERATION",
    -		"q\tquiet mode",
    -		"Q\tquick flash (return immediately)",
    -		"r\tread hardware and firmware revision using VS_SW_VER",
    -		"R\treset device using VS_RS_DEV",
    -		"S f\twrite softloader file (f) to flash memory using VS_MODULE_OPERATION",
    -		"t n\tread timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"T\trestore factory defaults using VS_FAC_DEFAULTS",
    -		"v\tverbose mode",
    -		"w n\tpause (n) seconds [" LITERAL (PLCTOOL_WAIT) "]",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed loop = PLCTOOL_LOOP;
    -	signed wait = PLCTOOL_WAIT;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'a':
    -			_setbits (plc.flags, PLC_ATTRIBUTES);
    -			break;
    -		case 'B':
    -			_setbits (plc.flags, PLC_PUSH_BUTTON);
    -			plc.pushbutton = (unsigned)(uintspec (synonym (optarg, buttons, BUTTONS), 0, UCHAR_MAX));
    -			break;
    -		case 'b':
    -			_setbits (plc.flags, PLC_REMOTEHOSTS);
    -			break;
    -		case 'd':
    -			_setbits (plc.flags, PLC_WATCHDOG_REPORT);
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.rpt.file = open (plc.rpt.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.rpt.name);
    -			}
    -
    -#ifndef WIN32
    -
    -			chown (optarg, getuid (), getgid ());
    -
    -#endif
    -
    -			plc.readaction = 3;
    -			break;
    -		case 'D':
    -			if (!hexencode (plc.DAK, sizeof (plc.DAK), synonym (optarg, daks, SIZEOF (daks))))
    -			{
    -				error (1, errno, PLC_BAD_DAK, optarg);
    -			}
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'f':
    -			_setbits (plc.flags, PLC_NVRAM_INFO);
    -			break;
    -		case 'F':
    -			_setbits (plc.module, (VS_MODULE_MAC | VS_MODULE_PIB));
    -			if (_anyset (plc.flags, PLC_FLASH_DEVICE))
    -			{
    -				_setbits (plc.module, VS_MODULE_FORCE);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 'H':
    -			_setbits (plc.flags, PLC_HOST_ACTION);
    -			break;
    -		case 'I':
    -			_setbits (plc.flags, PLC_READ_IDENTITY);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'J':
    -			if (!hexencode (plc.RDA, sizeof (plc.RDA), (char const *)(optarg)))
    -			{
    -				error (1, errno, PLC_BAD_MAC, optarg);
    -			}
    -			_setbits (plc.flags, PLC_SETREMOTEKEY);
    -			break;
    -		case 'K':
    -			if (!hexencode (plc.NMK, sizeof (plc.NMK), synonym (optarg, nmks, SIZEOF (nmks))))
    -			{
    -				error (1, errno, PLC_BAD_NMK, optarg);
    -			}
    -			break;
    -		case 'M':
    -			_setbits (plc.flags, PLC_SETLOCALKEY);
    -			break;
    -		case 'l':
    -			loop = (unsigned)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'L':
    -			_setbits (plc.flags, PLC_LINK_STATUS);
    -			break;
    -		case 'm':
    -			_setbits (plc.flags, PLC_NETWORK);
    -			break;
    -		case 'N':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.NVM.file = open (plc.NVM.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.NVM.name);
    -			}
    -			if (nvmfile2 (&plc.NVM))
    -			{
    -				error (1, errno, "Bad firmware file: %s", plc.NVM.name);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 'n':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.nvm.file = open (plc.nvm.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.nvm.name);
    -			}
    -
    -#ifndef WIN32
    -
    -			chown (optarg, getuid (), getgid ());
    -
    -#endif
    -
    -			_setbits (plc.flags, PLC_READ_MAC);
    -			break;
    -		case 'P':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.PIB.file = open (plc.PIB.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.PIB.name);
    -			}
    -			if (pibfile2 (&plc.PIB))
    -			{
    -				error (1, errno, "Bad parameter file: %s", plc.PIB.name);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 'p':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.pib.file = open (plc.pib.name = optarg, O_BINARY|O_CREAT|O_RDWR|O_TRUNC, FILE_FILEMODE)) == -1)
    -			{
    -				error (1, errno, "%s", plc.pib.name);
    -			}
    -
    -#ifndef WIN32
    -
    -			chown (optarg, getuid (), getgid ());
    -
    -#endif
    -
    -			_setbits (plc.flags, PLC_READ_PIB);
    -			break;
    -		case 'Q':
    -			_setbits (plc.flags, PLC_QUICK_FLASH);
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'R':
    -			_setbits (plc.flags, PLC_RESET_DEVICE);
    -			break;
    -		case 'r':
    -			_setbits (plc.flags, PLC_VERSION);
    -			break;
    -		case 'S':
    -			if (!checkfilename (optarg))
    -			{
    -				error (1, EINVAL, "%s", optarg);
    -			}
    -			if ((plc.CFG.file = open (plc.CFG.name = optarg, O_BINARY|O_RDONLY)) == -1)
    -			{
    -				error (1, errno, "%s", plc.CFG.name);
    -			}
    -			if (nvmfile2 (&plc.CFG))
    -			{
    -				error (1, errno, "Bad softloader file: %s", plc.CFG.name);
    -			}
    -			_setbits (plc.flags, PLC_FLASH_DEVICE);
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'T':
    -			_setbits (plc.flags, PLC_FACTORY_DEFAULTS);
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'V':
    -			_setbits (plc.flags, PLC_SNIFFER);
    -			plc.action = (uint8_t)(uintspec (optarg, 0, UCHAR_MAX));
    -			break;
    -		case 'w':
    -			wait = (unsigned)(uintspec (optarg, 0, 3600));
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc != 1)
    -	{
    -		if (plc.nvm.file != -1)
    -		{
    -			error (1, ECANCELED, PLC_NODEVICE);
    -		}
    -		if (plc.pib.file != -1)
    -		{
    -			error (1, ECANCELED, PLC_NODEVICE);
    -		}
    -		if (plc.rpt.file != -1)
    -		{
    -			error (1, ECANCELED, PLC_NODEVICE);
    -		}
    -	}
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		manager (&plc, loop, wait);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		manager (&plc, loop, wait);
    -		argc--;
    -		argv++;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/plcwait.1.html b/docbook/plcwait.1.html deleted file mode 100644 index a338add6..00000000 --- a/docbook/plcwait.1.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - plcwait.1 - - - - - - - - - -
    -plcwait(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  plcwait(1)
    -
    -NAME
    -       ampwait - Qualcomm Atheros Powerline Procrastinator
    -
    -SYNOPSIS
    -       ampwait [options] [device] [device] [...]
    -
    -DESCRIPTION
    -       Poll  a  Qualcomm  Atheros powerline device, waiting for one or more events to occur before continuing or returning.  The
    -       events include reset or power off, restart or power on and network association.  It is used to  pause  shell  scripts  at
    -       critical points where a device must be in a known state before continuing.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the plc man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -a     Poll the device every few seconds using VS_NW_INFO messages until the device indicates that a networks exists  and
    -              has  at  least  one  station.   This option can give false readings if other devices have dropped off-line and the
    -              device bridging table still holds information about them.  The program always checks for this event last if  other
    -              event options are specified.
    -
    -       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.
    -
    -       -f firmware
    -              The identification string for firmware that should be running after the device starts.  This option can be used to
    -              detect a failed firmware load.  If the actual identification string does not match this one once the device starts
    -              then an error is reported.  If option -x is present then the program terminates with a non-zero exit  code.   This
    -              option    has    no   effect   unless   option   -s   is   present.    An   identification   string   looks   like
    -              "INT6000-MAC-3-1-3143-1690-20071107-FINAL-B" and can be obtained using int6k -r.
    -
    -       -i     Select the host Ethernet interface.  All requests are sent via this host interface and only reponses received  via
    -              this host interface are recognized.  The default interface is eth1 because most people use eth0 as their principle
    -              network connection; however, if environment string "PLC" is defined then it  takes  precedence  over  the  default
    -              interface.  This option then takes precedence over either default.
    -
    -       -p seconds
    -              Fixed  pause  time  in  seconds.   This adds an fixed delay after the other events have occured.  A pause does not
    -              occur if any of the specified events timeout.  When no other events  are  specified  this  option  is  effectively
    -              equivalent  to sleep.  This option can be used to allow the device or the network to settle.  For example, a nomi‐
    -              nal 5 second wait is recommended after a device successfully associates before attempting to transfer data.
    -
    -       -q     Enter quiet mode.  Progress messages are suppressed.
    -
    -       -R     Reset the device then check return status.  Exit program on error if option -x is present; otherwise,  repeat  the
    -              reset request until the device either accepts the request or the wait time is exceeded.
    -
    -       -s     Poll  the  device  every few seconds using VS_SW_VER messages until the bootloader or runtime firmware responds or
    -              the poll count exhausts.  The presence of a response indicates that the device has either connected to  the  host,
    -              received power or finished reboot.
    -
    -       -t milliseconds
    -              Channel  read/write  timeout  in  milliseconds.  This is the maximum time allowed for a confirmation or a response
    -              from a powerline device before abandoning a read/write operation.  Permitted values range from 0 through  UINT_MAX
    -              as defined in limits.h.  The default is 50 milliseconds.
    -
    -       -v     Enter verbose mode.  All Etherenet frames sent or received by the program are displayed on stdout.
    -
    -       -w seconds
    -              Wait  timeout in seconds.  This is the maximum time that this application will wait for an event to occur where an
    -              event is reset, start or assoc.  If an event does no occur within this time, the program proceeds to wait for  the
    -              next  specified event.  This timeout applies to each event in turn when more than one event is specified.  Permit‐
    -              ted values are 0 through 86400 seconds which is 24 hours.
    -
    -       -x     Exit program on first error with a non-zero exit code.  This option allows  shell  scripts  to  detect  failed  or
    -              incomplete operations and take the appropriate action.
    -
    -       -y     Display actual wait times on stdout.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       device The Media Access Control (MAC) address of some device.  Addresses are 6 hexadecimal octets optionally separated by
    -              colon.  For example, the addresses "00b052000001", "00:b0:52:00:00:01"  and  "00b052:000001"  are  all  valid  and
    -              equivalent.   For  convenience,  the  symbolic  address  "local"  resolves to "00:b0:52:00:00:01" and the symbolic
    -              addresses "all" and "broadcast" both resolve to "ff:ff:ff:ff:ff:ff".
    -
    -REFERENCES
    -       See the Qualcomm Atheros HomePlug AV Firmware Technical Reference Manual for more information.
    -
    -DISCLAIMER
    -       Atheros HomePlug AV Vendor Specific Management Message Entry structure and content is proprietary  to  Qualcomm  Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage structure and content in future firmware releases without any obligation to notify or compensate users of this  pro‐
    -       gram.
    -
    -EXAMPLES
    -       The  following  command  polls  the local device until firmware stops running then polls the device until firmware starts
    -       running again.  This command can be inserted into a shell script at a point where the device must reset and reboot before
    -       proceeding.   Observe  that the program waits up to 60 seconds for each event, in turn, because 60 seconds is the default
    -       wait period.  If an event occurs before the specified timeout the program will move on to the next event.
    -
    -          # ampwait -rs
    -          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
    -          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
    -
    -       The following example waits up to 30 seconds for the local device to reset (-r) then up  to  50  seconds  for  the  local
    -       device to start (-s).  This is the same as above but we have specified 30 seconds using option -w.
    -
    -          # ampwait -r -s -w 30
    -          eth0 00:B0:52:BA:BA:01 Allow 30 seconds for Reset
    -          eth0 00:B0:52:BA:BA:01 Allow 30 seconds for Start
    -
    -       The  next  example  reports the actual amount of time taken for each event to occur.  Observe that the last event, device
    -       association, did not occur within the allotted time.
    -
    -          # ampwait -rsay
    -          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Reset
    -          etho 00:B0:52:BA:BA:01 Waited 22 seconds to Reset
    -          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Start
    -          etho 00:B0:52:BA:BA:01 Waited 4 seconds to Start
    -          eth0 00:B0:52:BA:BA:01 Allow 60 seconds for Assoc
    -          etho 00:B0:52:BA:BA:01 Waited 60 seconds for Assoc
    -          etho 00:B0:52:BA:BA:01 Device did not Assoc
    -
    -       The following example illustrates use of the revision string to detect mismatched firmware.  In this  example,  we  reset
    -       the  device  first,  using program amptool, then wait for it to reset then start up again.  There are also operation that
    -       can cause the device to reset.
    -
    -          # amptool -R
    -          # ampwait -xrsf INT6000-MAC-3-1-3143-1690-20071107-FINAL-B
    -          eth0 00:B0:52:BA:BA:01 Device started wrong firmware
    -
    -       Immediately after a reset we wait for the firmware to stop responding, with option -r, and then  start  responding,  with
    -       option  -s,  and  then  perform  a string comparison against the actual firmware revision string, with option -f.  If the
    -       strings do not match then an error is reported.  In this case, the program will exit with a non-zero  return  code  since
    -       option -x is present.
    -
    -DISCLAIMER
    -       Atheros  HomePlug  AV  Vendor Specific Management Message Entry structure and content is proprietary to Qualcomm Atheros,
    -       Ocala FL USA.  Consequently, public information may not be available.  Qualcomm Atheros reserves the right to modify mes‐
    -       sage  structure and content in future firmware releases without any obligation to notify or compensate users of this pro‐
    -       gram.
    -
    -SEE ALSO
    -       amp(1), amptool(1), amphost(1), amprate(1), ampid(1), ampstat(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  plcwait(1)
    -
    - - - diff --git a/docbook/plcwait.c.html b/docbook/plcwait.c.html deleted file mode 100644 index 4c8a285f..00000000 --- a/docbook/plcwait.c.html +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - plcwait.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   plcwait.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <limits.h>
    -#include <sys/time.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/timer.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/checkfilename.c"
    -#include "../tools/synonym.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/Request.c"
    -#include "../plc/SendMME.c"
    -#include "../plc/Devices.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#include "../mme/QualcommHeader1.c"
    -#include "../mme/UnwantedMessage.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   signed ResetAndWait (struct plc * plc);
    - *
    - *   plc.h
    - *
    - *   send VS_RS_DEV.REQ messages every channel->timeout milliseconds
    - *   until the device responds to indicate that it is ready to reset;
    - *   return 0 if the device eventually responds within plc->timer
    - *   seconds or -1 if not;
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed ResetAndWait (struct plc * plc)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -	struct timeval ts;
    -	struct timeval tc;
    -	unsigned timer = 0;
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_rs_dev_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -	}
    -	* request = (struct vs_rs_dev_request *) (message);
    -	struct __packed vs_rs_dev_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -	}
    -	* confirm = (struct vs_rs_dev_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	Request (plc, "Reset when Ready");
    -	if (gettimeofday (&ts, NULL) == -1)
    -	{
    -		error (1, errno, CANT_START_TIMER);
    -	}
    -	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
    -	{
    -		memset (message, 0, sizeof (* message));
    -		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -		QualcommHeader (&request->qualcomm, 0, (VS_RS_DEV | MMTYPE_REQ));
    -		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -		if (SendMME (plc) <= 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -			return (-1);
    -		}
    -		if (ReadMME (plc, 0, (VS_RS_DEV | MMTYPE_CNF)) < 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -			return (-1);
    -		}
    -		if (gettimeofday (&tc, NULL) == -1)
    -		{
    -			error (1, errno, CANT_RESET_TIMER);
    -		}
    -		if (plc->packetsize)
    -		{
    -			if (!confirm->MSTATUS)
    -			{
    -				Confirm (plc, "Resetting ...");
    -				return (0);
    -			}
    -		}
    -	}
    -	return (-1);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed WaitForReset (struct plc * plc, char string [], size_t length);
    - *
    - *   plc.h
    - *
    - *   send VS_SW_VER.REQ  messages every channel->timeout milliseconds
    - *   until the device stops responding to indicate that it is inactive;
    - *   return 0 if the device eventually stops responding within
    - *   plc->timer seconds or -1 if not;
    - *
    - *   this function cannot distinguish between a software reset and
    - *   hardware reset;
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed WaitForReset (struct plc * plc, char string [], size_t length)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -	struct timeval ts;
    -	struct timeval tc;
    -	unsigned timer = 0;
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_sw_ver_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t MDEVICEID;
    -		uint8_t MVERLENGTH;
    -		char MVERSION [PLC_VERSION_STRING];
    -	}
    -	* request = (struct vs_sw_ver_request *) (message);
    -	struct __packed vs_sw_ver_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t MDEVICEID;
    -		uint8_t MVERLENGTH;
    -		char MVERSION [PLC_VERSION_STRING];
    -	}
    -	* confirm = (struct vs_sw_ver_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	memset (string, 0, length);
    -	Request (plc, "Allow %d seconds for Reset", plc->timer);
    -	if (gettimeofday (&ts, NULL) == -1)
    -	{
    -		error (1, errno, CANT_START_TIMER);
    -	}
    -	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
    -	{
    -		memset (message, 0, sizeof (* message));
    -		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
    -		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -		if (SendMME (plc) <= 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -			return (-1);
    -		}
    -		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -			return (-1);
    -		}
    -		if (gettimeofday (&tc, NULL) == -1)
    -		{
    -			error (1, errno, CANT_RESET_TIMER);
    -		}
    -		if (!plc->packetsize)
    -		{
    -			if (_allset (plc->flags, (PLC_WAITFORRESET | PLC_ANALYSE)))
    -			{
    -				Confirm (plc, "Waited %d seconds for Reset", timer);
    -			}
    -			memcpy (string, confirm->MVERSION, confirm->MVERLENGTH);
    -			return (0);
    -		}
    -	}
    -	if (_allset (plc->flags, (PLC_WAITFORRESET | PLC_ANALYSE)))
    -	{
    -		Confirm (plc, "Waited %d seconds for Reset", timer);
    -	}
    -	return (-1);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed WaitForStart (struct plc * plc, char string [], size_t length);
    - *
    - *   plc.h
    - *
    - *   send VS_SW_VER.REQ messages every channel->timeout milliseconds
    - *   until the device responds to indicate that it is active; return
    - *   0 if the device eventually responds within plc->timer seconds
    - *   or -1 if not;
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed WaitForStart (struct plc * plc, char string [], size_t length)
    -
    -{
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -	struct timeval ts;
    -	struct timeval tc;
    -	unsigned timer = 0;
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_sw_ver_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t MDEVICEID;
    -		uint8_t MVERLENGTH;
    -		char MVERSION [PLC_VERSION_STRING];
    -	}
    -	* request = (struct vs_sw_ver_request *) (message);
    -	struct __packed vs_sw_ver_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_hdr qualcomm;
    -		uint8_t MSTATUS;
    -		uint8_t MDEVICEID;
    -		uint8_t MVERLENGTH;
    -		char MVERSION [PLC_VERSION_STRING];
    -	}
    -	* confirm = (struct vs_sw_ver_confirm *) (message);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	Request (plc, "Allow %d seconds for Start", plc->timer);
    -	if (gettimeofday (&ts, NULL) == -1)
    -	{
    -		error (1, errno, CANT_START_TIMER);
    -	}
    -	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
    -	{
    -		memset (message, 0, sizeof (* message));
    -		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -		QualcommHeader (&request->qualcomm, 0, (VS_SW_VER | MMTYPE_REQ));
    -		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -		if (SendMME (plc) <= 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -			return (-1);
    -		}
    -		if (ReadMME (plc, 0, (VS_SW_VER | MMTYPE_CNF)) < 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -			return (-1);
    -		}
    -		if (gettimeofday (&tc, NULL) == -1)
    -		{
    -			error (1, errno, CANT_RESET_TIMER);
    -		}
    -		if (plc->packetsize)
    -		{
    -			if (confirm->MSTATUS)
    -			{
    -				Failure (plc, PLC_WONTDOIT);
    -				return (-1);
    -			}
    -			if (_allset (plc->flags, (PLC_WAITFORSTART | PLC_ANALYSE)))
    -			{
    -				Confirm (plc, "Waited %d seconds for Start", timer);
    -			}
    -			strncpy (string, confirm->MVERSION, length);
    -			return (0);
    -		}
    -	}
    -	if (_allset (plc->flags, (PLC_WAITFORSTART | PLC_ANALYSE)))
    -	{
    -		Confirm (plc, "Waited %d seconds for Start", timer);
    -	}
    -	return (-1);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed WaitForAssoc (struct plc * plc);
    - *
    - *   plc.h
    - *
    - *   send VS_NW_INFO.REQ messages every channel->timeout milliseconds
    - *   until the device reports that a network has formed; return 0 if a
    - *   network forms within plc->timer seconds or -1 if not;
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed WaitForAssoc (struct plc * plc)
    -
    -{
    -	extern const uint8_t broadcast [ETHER_ADDR_LEN];
    -	struct channel * channel = (struct channel *)(plc->channel);
    -	struct message * message = (struct message *)(plc->message);
    -	struct timeval ts;
    -	struct timeval tc;
    -	unsigned timer = 0;
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -	struct __packed vs_nw_info_request
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_fmi qualcomm;
    -	}
    -	* request = (struct vs_nw_info_request *)(message);
    -	struct __packed vs_nw_info_confirm
    -	{
    -		struct ethernet_hdr ethernet;
    -		struct qualcomm_fmi qualcomm;
    -		uint8_t SUB_VERSION;
    -		uint8_t Reserved;
    -		uint16_t DATA_LEN;
    -		uint8_t DATA [1];
    -	}
    -	* confirm = (struct vs_nw_info_confirm *)(message);
    -	struct __packed station
    -	{
    -		uint8_t MAC [ETHER_ADDR_LEN];
    -		uint8_t TEI;
    -		uint8_t Reserved [3];
    -		uint8_t BDA [ETHER_ADDR_LEN];
    -		uint16_t AVGTX;
    -		uint8_t COUPLING;
    -		uint8_t Reserved3;
    -		uint16_t AVGRX;
    -		uint16_t Reserved4;
    -	}
    -	* station;
    -	struct __packed network
    -	{
    -		uint8_t NID [7];
    -		uint8_t Reserved1 [2];
    -		uint8_t SNID;
    -		uint8_t TEI;
    -		uint8_t Reserved2 [4];
    -		uint8_t ROLE;
    -		uint8_t CCO_MAC [ETHER_ADDR_LEN];
    -		uint8_t CCO_TEI;
    -		uint8_t Reserved3 [3];
    -		uint8_t NUMSTAS;
    -		uint8_t Reserved4 [5];
    -		struct station stations [1];
    -	}
    -	* network;
    -	struct __packed networks
    -	{
    -		uint8_t Reserved;
    -		uint8_t NUMAVLNS;
    -		struct network networks [1];
    -	}
    -	* networks = (struct networks *) (confirm->DATA);
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	Request (plc, "Allow %d seconds for Assoc", plc->timer);
    -	if (gettimeofday (&ts, NULL) == -1)
    -	{
    -		error (1, errno, CANT_START_TIMER);
    -	}
    -	for (timer = 0; timer < plc->timer; timer = SECONDS (ts, tc))
    -	{
    -		memset (message, 0, sizeof (* message));
    -		EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type);
    -		QualcommHeader1 (&request->qualcomm, 1, (VS_NW_INFO | MMTYPE_REQ));
    -		plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN);
    -		if (SendMME (plc) <= 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND);
    -			return (-1);
    -		}
    -		if (ReadMME (plc, 1, (VS_NW_INFO | MMTYPE_CNF)) < 0)
    -		{
    -			error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD);
    -			return (-1);
    -		}
    -		if (gettimeofday (&tc, NULL) == -1)
    -		{
    -			error (1, errno, CANT_RESET_TIMER);
    -		}
    -		if (plc->packetsize)
    -		{
    -			network = (struct network *)(&networks->networks);
    -			while (networks->NUMAVLNS--)
    -			{
    -				station = (struct station *)(&network->stations);
    -				while (network->NUMSTAS--)
    -				{
    -					if (memcmp (station->MAC, broadcast, sizeof (broadcast)))
    -					{
    -						if (_allset (plc->flags, (PLC_WAITFORASSOC | PLC_ANALYSE)))
    -						{
    -							Confirm (plc, "Waited %d seconds for Assoc", timer);
    -						}
    -						return (0);
    -					}
    -					station++;
    -				}
    -				network = (struct network *)(station);
    -			}
    -		}
    -	}
    -	if (_allset (plc->flags, (PLC_WAITFORASSOC | PLC_ANALYSE)))
    -	{
    -		Confirm (plc, "Waited %d seconds for Assoc", timer);
    -	}
    -	return (-1);
    -}
    -
    -#define COMPARE_TYPE_NONE     0
    -#define COMPARE_TYPE_EXACT    1
    -#define COMPARE_TYPE_CONTAINS 2
    -
    -/*====================================================================*
    - *
    - *   void function (struct plc * plc, char const * firmware, int compare_type);
    - *
    - *   perform operations in a logical order;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function (struct plc * plc, char const * firmware, int compare_type)
    -
    -{
    -	char string [PLC_VERSION_STRING];
    -	if (_anyset (plc->flags, PLC_RESET_DEVICE))
    -	{
    -		if (ResetAndWait (plc))
    -		{
    -			Failure (plc, "Device did not Reset.");
    -		}
    -	}
    -	if (_anyset (plc->flags, PLC_WAITFORRESET))
    -	{
    -		if (WaitForReset (plc, string, sizeof (string)))
    -		{
    -			Failure (plc, "Device did not Reset.");
    -		}
    -	}
    -	if (_anyset (plc->flags, PLC_WAITFORSTART))
    -	{
    -		if (WaitForStart (plc, string, sizeof (string)))
    -		{
    -			Failure (plc, "Device did not Start.");
    -		}
    -		if ((firmware) && (*firmware))
    -		{
    -			switch (compare_type)
    -			{
    -			case COMPARE_TYPE_EXACT:
    -				if (strcmp (firmware, string))
    -				{
    -					Failure (plc, "Started wrong firmware");
    -				}
    -				break;
    -			case COMPARE_TYPE_CONTAINS:
    -				if (strstr (string, firmware) == NULL)
    -				{
    -					Failure (plc, "Started wrong firmware");
    -				}
    -				break;
    -			}
    -		}
    -	}
    -	if (_anyset (plc->flags, PLC_WAITFORASSOC))
    -	{
    -		if (WaitForAssoc (plc))
    -		{
    -			Failure (plc, "Device did not Assoc.");
    -		}
    -	}
    -	if (plc->sleep)
    -	{
    -		Request (plc, "Pause %d seconds", plc->sleep);
    -		sleep (plc->sleep);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"aef:F:i:p:qrRst:vw:xy",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros Powerline Procrastinator",
    -		"a\twait for device assoc",
    -		"e\tredirect stderr to stdout",
    -		"f s\tconfirm firmware is revision s",
    -		"F s\tconfirm firmware revision contains substring s",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"p n\tpause (n) seconds",
    -		"q\tquiet mode",
    -		"r\twait for device reset",
    -		"R\treset device and wait",
    -		"s\twait for device start",
    -		"t n\tchannel timeout is (n) milliseconds [" LITERAL (CHANNEL_TIMEOUT) "]",
    -		"v\tverbose mode",
    -		"w n\twait up to (n) seconds for action [" LITERAL (PLC_TIMER) "]",
    -		"x\texit on error",
    -		"y\treport failure times",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	char const * firmware = "";
    -	signed c;
    -	int compare_type = COMPARE_TYPE_NONE;
    -	if (getenv (PLCDEVICE))
    -	{
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		channel.ifindex = atoi (getenv (PLCDEVICE));
    -
    -#else
    -
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -
    -#endif
    -
    -	}
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'a':
    -			_setbits (plc.flags, PLC_WAITFORASSOC);
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'f':
    -			firmware = optarg;
    -			compare_type = COMPARE_TYPE_EXACT;
    -			break;
    -		case 'F':
    -			firmware = optarg;
    -			compare_type = COMPARE_TYPE_CONTAINS;
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'p':
    -			plc.sleep = (unsigned)(uintspec (optarg, 0, 3600));
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 'r':
    -			_setbits (plc.flags, PLC_WAITFORRESET);
    -			break;
    -		case 'R':
    -			_setbits (plc.flags, PLC_RESET_DEVICE);
    -			break;
    -		case 's':
    -			_setbits (plc.flags, PLC_WAITFORSTART);
    -			break;
    -		case 't':
    -			channel.timeout = (signed)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'w':
    -			plc.timer = (unsigned)(uintspec (optarg, 0, 86400));
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		case 'y':
    -			_setbits (plc.flags, PLC_ANALYSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		function (&plc, firmware, compare_type);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		function (&plc, firmware, compare_type);
    -		argv++;
    -		argc--;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/procedures.xml b/docbook/procedures.xml deleted file mode 100644 index 4e5914bc..00000000 --- a/docbook/procedures.xml +++ /dev/null @@ -1,586 +0,0 @@ - - - Procedures - -
    - - Introduction - - - The Open Powerline Toolkit can perform all sorts of operations on Atheros powerline devices. Many operations are simple and can be accomplished using one command. Others are more complex and may require several commands. This section demonstrates common console commands that you might want to use when experimenting or working with Atheros powerline devices. Multi-command procedures can be generalized and automated using any programming or scripting language that can execute console commands. - -
    -
    - - Select an Interface on Linux - - - Linux network interfaces are referenced by name. Use Linux utility ifconfig to determine the names of interfaces on your host. By default, Toolkit programs communicate with powerline devices on interface eth1 but another interface can be specified on the command line with the -i option: - - - - Selecting another Interface on Linux - - -# int6k -i eth3 ... - - - - In the previous example, int6k will send and receive frames on interface eth3 instead of the default interface. Having to specify the interface can become become tedious when entering commands manually. An alternative method involves setting environment variable PLC to your preferred Ethernet interfaces, as follows: - - - - Changing the Default Interface on Linux - - -# export PLC="eth2" - - - - In the previous example, environment variable PLC is defined and exported, making it available to all programs running under the current console session. This command can be included in ~/.profile or /etc/profile or in /etc/environment on Debian and Ubuntu systems. - - - - Finding Interfaces on Linux - - -# ifconfig -eth0 Link encap:Ethernet HWaddr 00:60:97:05:97:0C - inet addr:192.168.170.179 Bcast:192.168.170.255 Mask:255.255.255.0 - inet6 addr: fe80::260:97ff:fe05:970c/64 Scope:Link - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:52130758 errors:0 dropped:0 overruns:0 frame:0 - TX packets:59629414 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:43781526 (41.7 MiB) TX bytes:4226651392 (3.9 GiB) - Interrupt:209 Base address:0xe000 - -eth1 Link encap:Ethernet HWaddr 00:0F:EA:10:D5:1C - inet addr:192.168.99.1 Bcast:192.168.99.255 Mask:255.255.255.0 - inet6 addr: fe80::20f:eaff:fe10:d51c/64 Scope:Link - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 - RX packets:68711621 errors:0 dropped:0 overruns:0 frame:0 - TX packets:70059644 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:1000 - RX bytes:3449044517 (3.2 GiB) TX bytes:1328494982 (1.2 GiB) - Interrupt:217 - -lo Link encap:Local Loopback - inet addr:127.0.0.1 Mask:255.0.0.0 - inet6 addr: ::1/128 Scope:Host - UP LOOPBACK RUNNING MTU:16436 Metric:1 - RX packets:177789 errors:0 dropped:0 overruns:0 frame:0 - TX packets:177789 errors:0 dropped:0 overruns:0 carrier:0 - collisions:0 txqueuelen:0 - RX bytes:599522176 (571.7 MiB) TX bytes:599522176 (571.7 MiB) - - - - The previous example demonstrates the use of Linux ifconfig utility to identify available network interfaces by name and MAC address. - - - If your computer has multiple Ethernet interface cards installed, you can connect each card to a different Atheros powerline device and communicate with each device, independently, from one console session (window) by specifying the appropriate interface card with each command. It is also possible to open multiple console sessions (windows), each having a unique enviroment, and assign a different value for PLC in each enviroment. - -
    -
    - - Select an Interface on Windows - - - Winpcap references host network interfaces by number, not name. This means that you must determine the proper interface number for the network adapter that you plan to use. Use Toolkit pcapdevs utility will enumerate available host network adapters by number, MAC address and description. By default, Toolkit programs communicate with powerline devices on pcap interface 2 but another interface can be specified on the command line with the -i option: - - - - Selecting another Interface on Windows - - -# int6k -i 3 ... - - - - In the previous example, int6k will send and receive frames using host interface 3 instead of the default interface. Having to specify the interface can become tedious when entering commands manually. Presently there is no way to specify a default interface on WIndows platforms. - - - - Finding Interfaces on Windows - - -# pcapdevs - 1 00:00:00:00:00:00 \Device\NPF_GenericDialupAdapter (Adapter for generic dialup - 2 00:0E:2E:03:5F:B8 \Device\NPF_{4CFAABD5-C929-4942-914B-BDFE72B13611} (Realtek R - 3 00:C0:49:D5:CB:14 \Device\NPF_{73E0D2EF-6069-4831-B379-507025F2BDCD} (Realtek R - 4 00:0C:76:87:3E:3D \Device\NPF_{86B96905-3AA7-46F1-969A-6C23E3BBBA8B} (Broadcom - - - - The previous example illustrates the use of Toolkit pcapdevs utility to identify available network interfaces by interface number, MAC address and description. The descriptions have been truncated in this example because they are too long. Devices having MAC address 00:00:00:00:00:00 are unavailable. - -
    -
    - - Identify a Device - - - Before you start working with Atheros powerline devices, you should determine the chipset and firmware revision because that will determine the types of operations that can be performed and the order in which some operations should be performed. The following example illustrates how to determine this information. - - - - Device Identification - - -# int6k -r -eth1 00:B0:52:00:00:01 Fetch Version Information -eth1 00:B0:52:DA:DA:23 INT6300A0 INT6000-MAC-3-0-3001-1081-LA-A NOT_UPGRADEABLE -eth1 00:B0:52:FE:87:2D INT6000A1 INT6000-SL-0-1-0110-200-2006-0415-BETA NOT_UPGRADEABLE - - - - This example demonstrates several things. - - - First, the int6k -r option requests hardware and software revision information from a device by sending an Atheros VS_SW_VER vendor-specific managerment message and waiting for a response. Atheros vendor-specific management messages are described in the Atheros HomePlug AV Firmware Technical Reference Manual. It you do not have access to this document then many toolkit features may be difficult to understand. - - - Since we did not specify an Ethernet interface on the command line, the default interface was used. In this case, the default interface was eth1 and so we observe that eth1 was used to both send requests and receive responses. - - - Since we did not specify a device address on the command line, the default address was used. Device addresses are also known as MAC, Ethernet or hardware addresses. They uniquely identify a device on a network. Unlike Ethernet cards, powlerlines device do not have IP addresses. - - - The default device address for toolkit programs is 00:B0:52:00:00:01. This address is the Local Management Address (LMA). All Atheros devices connected to the local host will respond to this address and include their actual address in the response. In the above example, two devices responded. This means that both were connected directly to eth1, perhaps via a network hub. Observer that device 00:B0:52:DA:DA:23 is an INT6300 and device 00:B0:52:FE:87:2D is an INT6000. The first device is running Atheros firmware and the second device is running the Atheros Softloader. - - - - Inspecting Device Configuration - - - To find out more about device 00:B0:52:DA:DA:23 we might issue the following command where option -I requests identity information stored in the device PIB. In this case, we specified the device by MAC address to prevent other local devices from responding. There is no harm in having both devices respond so we could have specified both hardware addresses. - - - - Pay special attention to the MAC address after flashing NVRAM. Hardware address 00:B0:52:00:00:03 indicates the Default PIB used when no other PIB is available. The Default PIB disables communication over powerline. - - - Pay special attention to the NMK when devices cannot communicate. Devices having different NMK values will not form a network. Conversely, all devices having the same NMK will form a network. This becomes important when programming large numbers of devices. You must have an out-of-the-box networking strategy that balances user convenience and network security. - - - The string next to the NMK indicates that password HomePlugAV was used to generate that key. This is one of two default passwords and keys used by Atheros. In some cases, it may be another clue that the device is using the default PIB. - - -
    -
    - - Browse the Network - - - A powerline network consists of one or more powerline devices that share a common NMK. One device on the network is in charge of the network and known as the Central Coordinator (CCo). All other devices on that network are known as stations (STA). Each device maintains internal information about the network to which it belongs. You can view that information at any time. - - - - Display Network Information - -NID = 77:23:0D:91:06:6E - network->SNID = 6 - network->TEI = 1 - network->ROLE = 0x02 (CCO) - network->CCO_DA = 00:B0:52:00:00:BB - network->CCO_TEI = 1 - network->STATIONS = 1 - - station->DA = 00:B0:52:00:00:AA - station->TEI = 2 - station->BDA = FF:FF:FF:FF:FF:FF - station->AvgPHYDR_TX = 0 mbps - station->AvgPHYDR_RX = 0 mbps -]]> - - - The example above prompts the local device on interface eth3 for network membership (-m) information. Device 00:B0:52:00:00:BB responded and reported that it belongs to one powerline network. The first block of information identifies the network CCo. The second block of information identifies a network STA. This second block will repeat when multiple stations are present. Each device on the network has a unique Terminal Equipment Identifier (TEI) within the network. The average PHY rates show the data rates between the reporting device and each STA. In this cases there has been no traffic. - -
    -
    - - Forming a Network - - - A powerline network is formed when two or more devices share a common Network Membership Key (NMK). An NMK is always 16 bytes (32 hexadecimal digits) in length and can have any value, including all zeros. Devices programmed with the same NMK value can communicate while those programmed with different NMK values cannot. Program int6k can be used to program a local or remote device with a specific NMK value. - - - - Setting the Network Membership Key - - - - - This example programs the local device with the default NMK. Option -M sets the network membership key with the default key value. The default key is used because we omitted option -K and the local device is programmed because we omitted the device MAC address. - - - One can quickly and easily create a default network by connecting each device, in turn, to the local host and executing this command shown above. The devices will then form a network when connected via the powerline. Although fast and simple, this method is not very secure because the default NMK is used by many Atheros tools and is well known. - - - There are cases where one wants to create separate, independent networks on the powerline. This is accomplished by programming some devices with one NMK and other devices with another NMK. In such cases we need to specify an NMK value. - - - - Forming a Custom Network - - - - This example programs the local device NMK with the value 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF. Option -K sets the default key value used by option -M. The default device is programmed because we omitted a target MAC address from the command line but we could have specified the local device using the actual device MAC address or the Local Management Address (LMA) of 00:B0:52:00:00:01 or the keyword local, like so ... - - - - - - Remote Network Configuration - - - Once a network has been established, one can change the NMK of remote devices over the powerline but once the NMK on the remote device has changed, it is no longer part of original network and can no longer be returned to the network in the same way. Additionally, one cannot change the NMK on a remote device without specifying the DAK of the device to be changed. - - -# int6k -M -K 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF \ - -J 00:B0:52:BA:BE:57 \ - -D A7:8E:11:FB:6A:90:2C:CB:A7:8E:11:FB:6A:90:2C:CB -eth1 00:B0:52:00:00:01 Set Remote Network Membership Key -eth1 00:B0:52:BA:BA:56 Setting ... - - - This example sets the NMK on remote device via the local device. Option -J specified the MAC address of the remote device. Option -D specified the DAK of the remote device. The request is sent to the local device, because we omitted the target MAC address, and the local device forwards our request to the remote device. The request will fail if the remote device is not accessible or the remote device DAK is incorrect. - - - This command is one of the more complicated int6k commands, requires lots of typing and is consequently prone to typing errors. The order of command line options is not important. - - -
    -
    - - Configuring a Device - - - Device identity, capability and behavior are controlled by runtime parameters stored in the device PIB. To change device identity, capability or behavior you must alter a template PIB file, download it to the device and flash it into NVRAM. A template PIB can come from several sources but an excellent souce is the device, itself. Configuration changes then become a simple read, modify and write back operation. - - - - Read a PIB File - - - - This example reads the PIB from the local device and writes it to a file. The toolkit has a growing number of programs designed to inspect and change pibfiles in various ways. Program modpib is one program that can be used for this purpose. - - - - - Modify a PIB File - - - - - The example above edits identity parameters in PIB file, old.pib, recomputes the internal checksum and re-writes the file. The network identity parameters are MAC (-M), NMK (-N) and DAK (-D). The user identity parameters are MFG_HFID (-S), NET_HFID (-T) and USR_HFID (-U). The PIB file is ready for download and flash. - - - Program modpib is a safe way to edit a PIB file because it only change selected parameters. Use program setpib to edit other parameters if required. - - - - Save a PIB File - - - - - This example writes the modified PIB file, old.pib, to the local device and commits it to NVRAM. Option -P writes the PIB file to the device instead of reading it from the device. Option -C with argument pib commits only the PIB, and not firmware, to NVRAM. - -
    -
    - - Upgrading Firmware and PIB - - - Eventually, you may want to upgrade (or downgrade) the runtime firmware stored in NVRAM. To do this, you must locate a copy of the new .nvm file on the Atheros FTP site and download it to your host. You must then download the file to the device and ask the runtime firmware on the device to write the file to NVRAM. Writing firmware to NVRAM is also called flashing the device. Program int6k can be used for this purpose when runtime firmware is executing on the device. - - - Program int6k instructs runtime firmware to write to NVRAM but the firmware will behave differently depending on how it was loaded and started. The first time NVRAM is written by runtime firmware, the Factory PIB is created in NVRAM. The second time, the User PIB is created. Thereafter, the User PIB will be re-written each time. This preserves original factory settings and permits their restoration regardless of intervening parameter changes. This means that you should make an effort to get things right the first time. - - - - Upgrade Firmware and PIB - - - - - This example downloads a PIB file (-P) and an NVM file (-N) to the device then instructs the runtime firmware to write (or flash) (-F) both of them to NVRAM. Option -F always writes both to NVRAM but option -C can be used to write only one or the other or both. - - - Observe that options -P, -N and -F are all in uppercase. As a rule, uppercase options modify the device and lowercase options do not. One notable exception to this rule is -I which merely displays device identity. - -
    -
    - - Upgrading PIB Only - - - When flashing a PIB to the local device, the PIB DAK must match that of the local device or you will get a DAK Not Zero error message. This message is incorrect and should probably read DAK Mismatch. The following two toolkit commands should prevent this error from occuring on Linux. The first command reads the actual MAC (-A) and DAK (-D) from the device using program int6kid and inserts them on the command lise as modpib arguments using options -M and -D. We need not include the station MAC address on the int6k command line because the device is local, but we could include it. - - - - Upgrade local device PIB - - - - - When flashing a PIB to a remote device, the PIB DAK must be all zeros or you will get a DAK Not Zero error message. This message occurs because the HomePlug AV Specification does not permit a DAK to be transmitted over powerline in any form. The following two toolkit commands should prevent this error on Linux. We must include the device MAC on the command line when invoking each program because the device is remote. Notice that symbol none can be used as shorthand 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 when specifying the DAK. - - - - Upgrade remote PIB - - - - - The MAC address stored in the PIB can have any value but it is good practice to preserve the original value. This avoids the common mistake of flashing multiple network stations with the same MAC address because the PIB was not updated. - -
    -
    - - Starting a Device - - - Some device configurations have no flash memory to store runtime parameters and firmware so the local host must store them until needed then write them into device SDRAM and start execution. This is also needed when the flash memory is blank or corrupted because the runtime firmware is the only way to write flash memory. Programs int6kf, int6kboot, ampboot and plcboot are used to configure a blank device then download runtime parameters and firmware and start execution. They all perform the same basic function but in different ways. - - - - Start Firmware on <productname>INT6000</productname> - - -# int6kf -C abc.cfg -N abc.nvm -P abc.pib - - - Program int6kf can be used to download runtime firmware and parameters and start execution on and INT6000 chipset. The process involves downloading a .cfg file using VS_SET_SDRAM, downloading a .nvm file using VS_WR_MEM, downloading a .pib file using VS_WR_MEM then starting firmware execution using VS_ST_MAC. See the int6kf man page for an explanation of the command line options and arguments used here. - - - - - Start Firmware on <productname>INT6300</productname> and <productname>INT6400</productname> - - -# int6kboot -N abc.nvm -P abc.pib - - - Program int6kboot can be used to download runtime firmware and parameters and start execution on an INT6300 or INT6400 chipset. The process involves downloading a .nvm file using VS_WR_MEM, downloading a .pib file using VS_WR_MEM then starting firmware execution using VS_ST_MAC. No .cfg file is needed or permitted with this application. - - - - - Start Firmware on <productname>AR7400</productname> - - -# ampboot -N abc.nvm -P abc.pib - - - Program ampboot can be used to download runtime firmware and parameters and start execution of runtime firmware on an INT6300, INT6400 or AR7400 chipset. The process involves downloading a .pib file using VS_WR_MEM, downloading a .nvm file using VS_WR_MEM then starting firmware execution using VS_ST_MAC. A general purpose applet, stored in the .nvm file, configures SDRAM. No .cfg file is needed or permitted with this application. - - - - - Start Firmware on <productname>AR7420</productname> - - -# plcboot -N abc.nvm -P abc.pib - - - Program plcboot can be used to download runtime firmware and parameters and start execution an INT6300, INT6400, AR7400 or AR7420 chipset. This program detects the type of chipset and the image file format. The boot process varies depending on the chipset that is detected and the image file format. For the AR7420 chipset, this process involves downloading a .pib and .nvm file using only VS_WRITE_EXECUTE messages. For earlier chipsets, the process is as described above. - - -
    -
    - - Testing a Device - - - When the Bootloader is running, it is possible to perform systematic diagnostic testing by downloading and executing a variety of small programs, called applets. A collection of applets can be found in the toolkit Applets folder. Applet manpages describe the purpose of each one. Some applets are more useful than others. Start by reading the applets manpage. - - - Program int6ktest can be used to sequentially download and execute a series of applets. Applets have evolved over time and some are more useful or informative than others. Newer applets report progress and errors on the console. Older applets report progress or errors by flashing the onboard LEDs. This means of testing cannot be used after the flash memory has been programmed unless you erase, corrupt or remove the flash. - - -# int6ktest -i eth4 connection.nvm memctl.nvm marchloop.nvm -eth4 00:B0:52:00:00:01 Write Memory (00000000:32) -eth4 00:B0:52:00:00:01 Wrote connection.nvm -eth4 00:B0:52:00:00:01 Start connection.nvm (0) -eth4 00:B0:52:00:00:01 Write Memory (00001000:664) -eth4 00:B0:52:00:00:01 Wrote connection.nvm -eth4 00:B0:52:00:00:01 Start connection.nvm (1) -eth4 00:B0:52:00:00:01 Write Memory (00000040:6076) -eth4 00:B0:52:00:00:01 Wrote memctl.nvm -eth4 00:B0:52:00:00:01 Start memctl.nvm (0) -eth4 00:B0:52:00:00:01 Write Memory (00001000:2212) -eth4 00:B0:52:00:00:01 Wrote marchloop.nvm -eth4 00:B0:52:00:00:01 Start marchloop.nvm (0) -eth4 00:B0:52:00:00:01 0x00 March2 test - Pass - - - This example uses program int6ktest to download and execute applets connection.nvm, memctl.nvm and marchloop.nvm to the powerline device on host interface eth4. The first applet checks circuit board connections to memory and reports progress and errors by flashing onboard LEDs. The second configures the SDRAM controller and exits without any indication. The third performs a systematic test of SDRAM and reports progress and errors on the console. In this case the test passed. - - - See programs amptest and plctest for updated versions of this program for use with AR7400 and QCA7420 chipsets. - -
    -
    - - Programming NVRAM - - - - int6kf and int6kboot - - - The INT6300 and INT6400 do not require a special SDRAM configuration file and so program int6kboot may be used in place of int6kf which is described here. The only real difference between the two programs is the presence or absence of option -C on the command line. - - - - The int6kf program can program a blank or corrupted NVRAM on the INT6300. The process involves starting the runtime firmware as shown in the previous example then downloading a .nvm file using a VS_WR_MOD message, downloading a .pib file using another WR_WR_MOD message then writing both to NVRAM using a VS_MOD_NVM message. An example int6kf command line is shown below. It is identical to the one shown above except for the addition of the flash option at the end. - - - - Flash NVRAM with int6kf - - -# int6kf -C abc.cfg -N abc.nvm -P abc.pib -F - - - - The example above starts the firmware then uses it to program the NVRAM. This was done in one step rather than two seperate steps as shown in the examples before it. The only difference is that int6k needs to use the 'force flash' option when using downloaded firmware to write NVRAM. The following example accomplishes the same thing as the previous example but uses int6k to program NVRAM. See the int6k man page for an explanation of the command line options and arguments used here. - - - The int6kf program cannot program blank or corrupted NVRAM on the INT6000 unless the Softloader is running. Since the Softloader resides in NVRAM, the NVRAM must be either pre-programmed before use or removed and externally re-programmed if it corrupts. - - - - Flash NVRAM with int6k - - -# int6kf -C abc.cfg -N abc.nvm -P abc.pib -# int6k -N abc.nvm -P abc.pib -FF - - -
    -
    - - Pairing UART Devices post PTS - - - This procedure describes how to pair two UART-enabled powerline adapters once they have been programmed, personalized and tested. This example assumes you are using a Windows host and two powerline adapters having MAC addresses 00:B0:52:00:05:F9 and 00:B0:52:00:05:FA. - - - Start with the first device, 00:B0:52)(00:05:F9. Plug the host serial cable into the RJ45 port on the device and plug the device into an AC power source. - - - Change to transparent mode using program int6kuart. Option -v displays outgoing command and incoming serial responses. The +++ is the serial data sent to the device and the OK is the device response. - -# int6kuart -s com3 -wv -+++ -OK - - - - Read the adapter PIB into a temporary file using program int6kuart. The following command reads the PIB from serial device com3 and saves it to file temp.pib on the host. You will see a series of dots appear on the console as the PIB is read from the device. The filename used is not important. - -# int6kuart -s com3 -p temp.pib -.................... - - - - Program the PIB file with the default destination address using program setpib. The following command inserts the MAC address of the second device, 00B0520005FA, at fixed offset 0x2C8A in file temp.pib downloaded in the previous step. - -# setpib temp.pib 2C8A data 00B0520005FA - - - - Write the modified PIB file back to the adapter and commit it to flash memory using program int6kuart. The following command write file temp.pib to serial device com3 then commits the PIB to flash memory. You will see a series of dots appear on the console as the PIB is written to the device. The device will reboot. - -# int6kuart -s com3 -P temp.pib -C2 -.................... - - - - Change the device to Transparent Mode using program int6kuart once the device resets. - -# inc6kuart -s com3 -wv -+++ -OK - - - - Verify that the destination MAC address is correct using program int6kuart. - -# int6kuart -s com3 -d -00B0520005FA - - - - Repeat this process on the second adapter, 00:B0:52:00:05:FA, using the MAC address of the first device, 00:B0:52:00:05:F9, as the destination address. - -
    - &procedure-trouble-shooting; - &procedure-slac-config; - &procedure-slac-demo; -
    diff --git a/docbook/programs.xml b/docbook/programs.xml deleted file mode 100644 index 27b904c2..00000000 --- a/docbook/programs.xml +++ /dev/null @@ -1,958 +0,0 @@ -
    - - Toolkit Programs - - - The Qualcomm Atheros Open Powerline Toolkit is a collection of small, command line programs. Each program deals with some aspect of powerline device management. Programs can be combined, in various ways, using shell scripts, to perform sophisticated and complex tasks. With these program, one can identify chipset and firmware version, reset devices, flash devices, identify other powerline network devices, validate *.pib and *.nvm files, sniff HomePlug AV Ethernet frames, send generic Ethernet frames and so on. - - - Program source code is designed to demonstrate device hardware and firmware features and to illustrate techniques for software developers and hardware engineers. The source code may be modified and distributed without obligation to Qualcomm Atheros; however Qualcomm Atheros would appreciate feedback concerning improvements to program useability, reliability or efficiency. Keep in mind that these tools, unlike some other tools, are intended to be simple and compact. - - - Most programs in this toolkit start their life on Linux and are eventually ported to other environments. Consequently, not all programs are available in the Windows version of the toolkit but most of them are. - - - Program descriptions appear below in alphabetical order. Alternately, you may browse the latest program descriptions and source code here. - - - -
    - - INT6400 Device Management - - - Programs in this group are older versions that communicate with INT6x00 chipsets. Many still work on AR7x00 chipsets. The main difference is due to the higher PHY data rates on AR7x00 chipsets. The higher data rates must be expressed using 16-bits instead of 8-bits. Consequently, some MME formats have changed. - - - - - - int64host - - - - - A command line utility that waits for and services VS_HST_ACTION messages from a flash-less device INT6300 or INT6400 device. It is similar to program int6khost but does not use an SDRAM configuration files. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int64host man page for more information. - - - - - - - int6k - - - - - A command line utility to inspect and control INT6000 and INT6300 devices connected to the local host. It performs several of the device maintenance functions available in the Atheros Windows Device Manager but is small enough to run on an embedded system. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder .int6k. See the int6k man page for more information. - - - - - - - int6k2 - - - - - A command line utility to inspect and control INT6000 and int6300 devices connected to the local host. It is similar to int6k but calls the Atheros Embedded API, described in the Atheros HomePlug AV API User's Guide, to perform device management tasks. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6k2 man page for more information. - - - - - - - int6kboot - - - - - A command line utility to start and optionally flash INT6300 and INT6400' devices that have no NVRAM or have a blank or corrupted NVRAM. It communicates with the Atheros Bootloader to configure SDRAM, download runtime firmware and PIB and start firmware execution. Users can optionally request that the same PIB and firmware then be used to flash NVRAM. It is similar to program int6kf but does not accept an SDRAM configuration file. Instead, it uses on the memctl applet. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kboot man page for more information. - - - - - - - int6kf - - - - - A command line utility to start and optionally flash INT6000 and INT6300 devices having no NVRAM or having a blank or corrupted NVRAM. It communicates with the Atheros Bootloader to configure SDRAM, download runtime firmware and PIB and start firmwrae execution. It can also be used to force flash blank or corrupted NVRAM. It is similar to program int6kboot but requires an SDRAM parameter file. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kf man page for more information. - - - - - - - int6khost - - - - - A command line utility that waits for and services VS_HST_ACTION messages from a flash-less INT6000 or INT6300 device. It is similar to program in64host but needs an SDRAM configuration file. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6khost man page for more information. - - - - - - - int6kid - - - - - A command line utility that prints the DAK or NMK strings read from one or more devices. It can be used in shell scripts to dynamically obtain device keys and insert them on program command lines as arguments. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kid man page for more information. - - - - - - - int6klist - - - - - A command line utility that lists local devices, or remote devices associated with a specific device, on stdout in undecorated format. It can be used in shell scripts to dynamically determine, and then traverse, network topology. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6klist man page for more information. - - - - - - - int6kprobe - - - - - A command line utility that probes for neighboring networks. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kprobe man page for more information. - - - - - - - int6krule - - - - - A command line utility to format and send classification rules to a device. Classification rules are specified using symbolic names for actions, options, conditions and frame fields. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6krule man page for more information. - - - - - - - int6ktest - - - - - A command line utility that downloads and executes program images stored in an Atheros .nvm file. This program can be used to download and execute Atheros hardware diagnostic programs like those in the ./applets folder. It is not intended to download and start runtime firmware, although it may be used for that. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6ktest man page for more information. - - - - - - - int6kuart - - - - - A command line utility used to manage a local powerline device over a host serial line interface. Program command line options are translated to AT-style serial commands and sent to the device. THe primary benefits of using this program, in place of a terminal emulator, is the ability to download parameter blocks and upload paameter blocks and firmware images. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./serial. See the int6kuart man page for more information. - - - - - - - int6kwait - - - - - A command line utility that polls the local powerline device and waits for the bootloader or runtime firmware to either stop executing or start executing or wait for a device to associate with another device. It can be used to synchronize scripts with device or network events such as connection make or break, power on or off and firmware stop or start. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kwait man page for more information. - - - - -
    - -
    - - INT6400 Device Monitoring - - - - - - int6klog - - - - - A command line utility that exports the runtime watchdog report in binary or XML format. Output is suitable for input to the Atheros Windows Device Manager. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6klog man page for more information. - - - - - - - int6krate - - - - - A command line utility that polls a device and prints the average transmit and receive PHY rates between it and each of it's network neighbors. Program output is suitable for loading into a spreadsheet or other program that can process column-oriented information. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6krate man page for more information. - - - This program is suitable for use with INT6x00 chipsets but not AR7x00 chipsets due to higher PHY rates. Use program amprate for AR7x00 chipsets and plcrate for mixed chipset environments. - - - - - - - int6kstat - - - - - A command line utility that polls a poserline device and prints various network and link statistics in a format suitable for processing by another program. It is a work in progress because we are investigating different ways to present the information. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the int6kstat man page for more information. - - - - -
    - -
    - - AR7400 Device Management - - - The programs in this group are essentially identical to those in the INT6x00 group but they support higher PHY data rates offered by the AR7x00 chipsets. Specifically, they handle the new VS_NW_INFO and VS_LNK_STATS message formats. - - - - - - ampboot - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampboot man page for more information. - - - - - - - amphost - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amphost man page for more information. - - - - - - - ampinit - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampinit man page for more information. - - - - - - - amplist - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amplist man page for more information. - - - - - - - amptest - - - - - A command line utility that downloads and executes program images stored in an Atheros .nvm file. It can be used to download and execute special Atheros hardware diagnostic programs. It is not intended to download and start runtime firmware. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amptest man page for more information. - - - - - - - amptool - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amptool man page for more information. - - - - - - - ampwait - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampwait man page for more information. - - - - -
    - -
    - - AR7400 Device Monitoring - - - The programs in this group are essentially identical to those in the INT6x00 group but they support higher PHY data rates offered by the AR7x00 chipsets. Specifically, they handle the new VS_NW_INFO and VS_LNK_STATS message formats. - - - - - - amprate - - - - - A command line utility that polls a device and prints the average transmit and receive PHY rates between it and each of it's network neighbors. Program output is suitable for loading into a spreadsheet or other program that can process column-oriented information. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amprate man page for more information. - - - This program is suitable for use with AR7x00 chipsets and later that have higher PHY rates and newer firmware. Use program int6krate for AR6x00 running earlier runtime firmware that may not recognize newer message formats. Use program plcrate for mixed chipset environments - - - - - - - ampsnif - - - - - Enables or disables the powerline sniffer mode on the local powerline device using the VS_SNIFFER message. Use program ampsnot to display and/or record sniffer output. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampsnif man page for more information. - - - - - - - ampsnot - - - - - Listens for sniffer output from the local powerline device and display results on the console. Use program ampsnif to enable or disable sniffer output. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampsnot man page for more information. - - - - - - - ampstat - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the ampstat man page for more information. - - - - - - - amptone - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the amptone man page for more information. - - - - - - mdustats - - - - A command line utility to collect and display various MDU traffic statistics. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./plc. See the mdustats man page for more information. - - - - -
    - -
    - - AR7420 Device Configuration - - - Programs in this group understand changes to .nvm file formats and to the device boot and memory flash messages and sequences. - - - - - - plchost - - - - - This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the plchost man page for more information. - - - - - - - plctest - - - - - A command line utility that downloads and executes small program images stored in older and newer .nvm files. It can be used to download and execute small powerline diagnostic programs. It is not intended to download and start runtime firmware. The program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./plc. See the plctest man page for more information. - - - This program automatically detects the type of .nvm file format and adapts. - - - - -
    - - -
    - - Parameter File Management - - - Programs in this group are used to inspect and change .pib files in various ways. The do not communicate directly with the powerline device. Use program int6k, amptool or plctool to read the PIB from a powerline device or write a PIB to the powerline device. - - - - - - chkpib - - - - - A command line utility to validate .pib files based on their internal checksum, file size and other characteristics. It can also be used to produce a text catalog of .pib files. This program is slower than program chkpib2 but requires less memory to execute. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the chkpib man page for more information. - - - - - - - chkpib2 - - - - - A command line utility to validate .pib files based on their internal checksum, file size and other characteristics. It can also be used to produce a text catalog of .pib files. This program is faster than program chkpib but requires more memory to execute. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the chkpib2 man page for more information. - - - - - - - getpib - - - - - A free-form means of extracting paremeters from a PIB file when the offset, length and format of the parameter is known. It is a companion to program setpib. The user specifies the filename, a starting offset and a sequence of type/data pairs. Values are echoed in order on the console in the specified format. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the getpib man page for more information. - - - - - - - modpib - - - - - A command line utility to change the MAC, DAK and/or NMK of an existing PIB file and recompute the checksum. It can also be used to change the manufacturer string, network name and username strings. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the modpib man page for more information. - - - - - - - mrgpib - - - - - A command line utility that transfers parameters from one PIB file to another. The two files needs not have the same PIB version. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the mrgpib man page for more information. - - - - - - - pib2xml - - - - - An offset-driven XML dump utility for the PIB. It requires an offset description file to be useful. The user specifies an offset description file and a PIB file. The program output an XML description of PIB fields. An example file, piboffset.txt, is included as a basic example. The example offset description file is intentionally incomplete. Complete files are reserved for use by Atheros Field Application Engineers. This program is an alternative to program pibdump. The main source code is located in folder ./tools. See the pib2xml man page for more information. - - - - - - - pibcomp - - - - - An offset-driven binary file compare utility for the PIB. It requires an offset description file to be useful. The user specifies an offset description file and two binary files. The files are compared, field by field, and differences are printed on stdout, field by field. An example file, piboffset.txt, is included as a basic example. The example offset description file is intentionally incomplete. Complete files are reserved for use by Atheros Field Application Engineers. This program is an alternative to program pib2xml and a companion to program pibdump. The main source code is located in folder ./tools. See the pibcomp man page for more information. - - - - - - - pibdump - - - - - An offset-driven dump utility for the PIB. It requires an offset description file to be useful. An example file, piboffset.txt, is included as a basic example. The example offset description file is intentionally incomplete. Complete files are reserved for use by Atheros Field Application Engineers. This program is a companion to program pibcomp. The main source code is located in folder ./tools. See the pibdump man page for more information. - - - - - - - pibruin - - - - - A command line utility that inserts classifier rules, read from a file, into a PIB file. It is an alternative to program int6krule and companion to program pibrump. The main source code is located in folder ./pib. See the pibruin man page for more information. - - - This program supports INT6300, INT6400 and AR7400 PIBs only and is deprecated. - - - - - - - pibrump - - - - - A command line utility that reads classifier rules from a PIB file and prints them on stdout in a format suitable for input to program pibruin. The main source code is located in folder ./pib. See the pibrump man page for more information. - - - - - - - psin - - - - - A command line utility to insert an amplitude map into an existing PIB file. The map is read from stdin in text format allowing the output of program psout to be piped directly into this program. The main source code is located in folder ./pib. See the psin man page for more information. - - - - - - - psout - - - - - A command line utility to that exports an amplitude map stored in an existing PIB file. The map is written directly to stdin in text format allowing the output of this program to be piped into the input of program psin. The main source code is located in folder ./pib. See the psout man page for more information. - - - - - - - pxe - - - - - A generic 'Remote PIB Management' tool. One or more XML files define decimal, hexadecimal and string edits to be applied to a PIB file. The PIB is read, edits are applied, a new checksum is computed and the PIB is saved. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the pxe man page for more information. - - - - - - - setpib - - - - - A simple means of setting PIB parameters when the parameter offset, length and format are known. It is an alternative to program pxe and a companion to program getpib. The user specifies the filename, a starting offset and a sequence of type/data pairs. Edits are applied in order and a new checksum is computed. A full or partial dump of the PIB displays the result. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./pib. See the setpib man page for more information. - - - - -
    - - -
    - - Firmware File Management - - - - - - chknvm - - - - - A command line utility to validate .nvm files based on their internal checksum, file size and other characteristics. This program is slower than program chknvm2 but requires less memory to execute. Optionally, it can be used to display the image headers inside the file. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the chknvm man page for more information. - - - - - - - chknvm2 - - - - - A command line utility to validate .nvm files based on their internal checksum, file size and other characteristics. Optionally, it can be used to display the image headers inside the file. This program is faster than program chknvm but requires more memory to execute. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the chknvm2 man page for more information. - - - - - - - config2cfg - - - - - A command line utility to convert an SDRAM configruation file used by the Atheros Windows Device Manager to the configuration file format used by the Open Powerline Toolkit applications. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./sdram. See the config2cfg man page for more information. - - - - - - - nvmmerge - - - - - A command line utility to combine multiple Atheros image files into one. It is reserved for use by Atheros Field Application Engineers. Use of this probram could void some contractual obligations made by Atheros. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the nvmmerge man page for more information. - - - - - - - nvmsplit - - - - - A command line utility to extract all constituent images from an Atheros image file. It is reserved for use by Atheros Field Application Engineers. Use of this probram could void some contractual obligations made by Atheros. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./nvm. See the nvmsplit man page for more information. - - - - -
    - - -
    - - Ethernet Traffic - - - - - - edru - - - - - A command line program that reads one or more Ethernet II (IEEE 802.2) frames and write frame data to stdout as a continuous stream. This program can be used to capture serial data sent from a remote UART-enabled powerline device. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./ether. See the edru man page for more information. - - - - - - - edsu - - - - - A command line program sends one or more files over the network using Ethernet II (IEEE 802.2) Frames. This program can be used to test remote UART-enabled powerline devices. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./ether. See the edsu man page for more information. - - - - - - - efsu - - - - - A freeform Ethernet frame send utility used to define and send Ethernet packets. Packets are defined in text files containing hexadecimal byte codes plus optional comments and whitespace. Input files are stripped of comments and whitespace then transmitted as Ethernet frames. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./ether. See the efsu man page for more information. - - - - - - - hpav - - - - - A basic HomePlug AV packet sniffer that displays only HomePlug AV protocol frames on the console as they are sent or arrive on a given interface. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./mme. See the hpav man page for more information. - - - - - - - pcapdevs - - - - - A utility to enumerate LibPcap or WinPcap devices available on the host. It is compiled but only works if one of these two packages is installed on the host. At present, it is only needed with the Windows version of the Toolkit which is compiled against the WinPcap library. The main source code is located in folder ./ether. See the pcapdevs man page for more information. - - - - -
    - - -
    - - Passwords and Keys - - - - - - hpavkey - - - - - A HomePlug AV key generator. Pass phrase arguments are hashed to form the corresponding Device Access Key (DAK), Network Membership Key (NMK) or Network Identifier (NID). This program is installed in folder /usr/local/bin with 4555 permissions. The main source code is located in folder ./crypt. See the hpavkey man page for more information. - - - - - - - hpavkeys - - - - - A HomePlug AV key generator. Pass phrases are read from a file and hashed to form the corresponding Device Access Key (DAK), Network Membership Key (NMK) or Network Identifier (NID). This program is installed in folder /usr/local/bin with 4555 permissions. The main source code is located in folder ./crypt. See the hpavkeys man page for more information. - - - - - - - mac2pw - - - - - A device password generator that prints a range of MAC address and passwords on stdout. It is an alternative to the Atheros Production Test System (PTS) DBBuilder Utility and toolkit program mac2pwd. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./crypt. See the mac2pw man page for more information. - - - - - - - mac2pwd - - - - - A device password generator that reads files containing MAC addresses and prints address/password pairs. It is an alternative to the Atheros Production Test System (PTS) DBBuilder Utility and toolkit program mac2pw. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./crypt. See the mac2pwd man page for more information. - - - - - - - rkey - - - - - A command line utility to dynamically generate distinct HomePlug AV compliant keys from a user created keyfile. It can be used in shell scripts to dynamically insert random and distinct keys on program command lines as arguments. For example, a Linux bash script can reference "$(rkey -i eth0 -D secret.key)" inline. This program is installed in folder /usr/local/bin with 4555 file permissions. See the discussion on security for more information about file permissions. The main source code is located in folder ./crypt. See the rkey man page for more information. - - - - -
    - - -
    - - MDIO Programming - - - - - int6kmdio - - - - A command line utility that uses VS_MDIO_COMMAND messages to read and write MDIO registers on a switch chip connected to the local powerline device. MDIO instructions are specified and send as Clause 22 instructions. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock man page for more information. - - - - - - int6kmdio2 - - - - A command line utility that uses VS_MDIO_COMMAND messages to read and write MDIO registers on a switch chip connected to the local powerline device. Instructions are read as Clause 45 instructions but send as Clause 22 instructions. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock man page for more information. - - - - - - mdioblock - - - - A command line utility to assemble an Atheros MDIO instruction block from hexadecimal register instructions. MDIO instruction blocks are written to Atheros powerline devices as modules using the VS_MOD_OP message type. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock man page for more information. - - - - - - mdioblock2 - - - - A command line utility to assemble an Atheros MDIO instruction block from hexadecimal register instructions. MDIO instruction blocks are written to Atheros powerline devices as modules using the VS_MOD_OP message type. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdioblock2 man page for more information. - - - - - - mdiodump - - - - A command line utility to read and display Atheros MDIO custom modules in human readable format. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./mdio. See the mdiodump man page for more information. - - - - - - mdiogen - - - - A rudimentary command line utility that write a custom MDIO block to a fixed file. The user must edit a data statements, in the main program, to define MDIO command fields. A series of macros then mask, shift and merge the fields to create complete Clause 22 or Clause 45 MDIO commands on output. The program has no dependencies on other toolkit modules and so it will compile anywhere. This program must be manually compiled and it is not automatically installed. The main source code is located in folder ./mdio and file mdio.h is required for compilation. There are no help files available at this time. If you do not understand how to use it then you may not need it. - - - - -
    - - -
    - - Serial Programming - - - - - - ptsctl - - - - - A command line program used to control a bank of three Weeder programmable attenuators. It may be used to construct a Production Test System (PTS) for Qualcomm Atheros SmartLink devices. See program weeder to control a bank of two Weeder programmable attenuators. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./serial. See the ptsctl man page for more information. - - - - - - - ttycat - - - - - A command line program that copies one or more host files to a specific serial port. It can be used to stream serial data to the local UART-enabled powerline device for transmission over powerline. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./serial. See the ttycat man page for more information. - - - - - - - weeder - - - - - A command line program used to control a bank of two Weeder programmable attenuators. It may be used to construct a Production Test System (PTS) for Qualcomm Atheros powerline devices. See program ptsctl to control a bank of three Weeder programmable attenuators. This program is installed in folder /usr/local/bin with 0555 file permissions. The main source code is located in folder ./serial. See the weeder man page for more information. - - - - - - Atheros Communications reserves the right to add, remove or rename utility programs or modify their command line options or their functionality in future software releases without any obligation to notify or compensate users of this software. - -
    -
    - - diff --git a/docbook/pseudo.c.html b/docbook/pseudo.c.html deleted file mode 100644 index 00ca1776..00000000 --- a/docbook/pseudo.c.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - pseudo.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *    encapsulate and transmit as many Ethernet frames as possible 
    - *    without overflowing the SPI write buffer;
    - *
    - *--------------------------------------------------------------------*/
    -
    -function transmit frame do read write buffer space available register; 
    -while transmit queue is not empty and write buffer space is available do encapsulate transmit frame; 
    -write transmit frame to write buffer; 
    -if error then return failure; 
    -end if; 
    -update transmit statistics; 
    -remove frame from transmit queue; 
    -end while; 
    -return (success); 
    -end function; 
    -
    -/*====================================================================*
    - *
    - *   read as many frames as possible from the read buffer; 
    - *
    - *--------------------------------------------------------------------*/
    -
    -function receive frame do allocate an input buffer; 
    -if no memory available then return failure; 
    -end if; 
    -read read space available register; 
    -if read buffer is empty then return failure; 
    -end if; 
    -write frame length into buffer size register; 
    -if mode is legacy then send read command; 
    -end if; 
    -while read buffer is not empty do read read buffer into frame buffer; 
    -extract Ethernet frame from frame buffer; 
    -update read statistics; 
    -end while; 
    -return (success); 
    -end function; 
    -
    -/*====================================================================*
    - *
    - *   state machine to manage QCA7000 SPI slave synchronization;
    - *
    - *--------------------------------------------------------------------*/
    -
    -function synchronize SPI slave do allocate a static reset counter; 
    -if synchronization state is CPU on then read QCA7000 signature register; 
    -read QCA7000 signature register; 
    -if signature is invalid then set synchronization state to unknown; 
    -else read SPI write buffer space available register; 
    -if write buffer is empty then qca->SynchState = QCASPI_SYNC_READY; 
    -set synchronization state to ready; 
    -return; 
    -else set synchronization state to unknown; 
    -end if; 
    -end if; 
    -end if; 
    -if synchronization stats is ready then if mode is legacy then return; 
    -end if; 
    -read QCA7000 signature register; 
    -if signature is invalid then set synchronization state to unknown; 
    -return; 
    -end if; 
    -end if; 
    -if synchronization state is unknown then if mode is legacy then use GPIO to reset QCA7000; 
    -else read QCA7000 signature register; 
    -if signature is invalid then return; 
    -end if; 
    -set soc_core_reset bit in QCA SPI configuration register; 
    -end if set synchronization state to reset; 
    -clear reset counter; 
    -return; 
    -end if; 
    -if synchronization state is reset then increment reset counter; 
    -if reset counter exceeds reset limit then set synchronization state to unknown; 
    -end if; 
    -end if; 
    -return; 
    -end function; 
    -
    -/*====================================================================*
    - *   
    - *   handle QCA7000 interrupts and transmit requests; interrupts are
    - *   from the QCA7000; transmit requests are from the host computer;
    - *   
    - *--------------------------------------------------------------------*/
    -
    -function interrupt serivce routine do while terminate is false do set thread state to interruptable; 
    -if no interrupts and synchronization state is synchronized and transmit queue is empty then allow other tasks to run; 
    -end if set thread state to busy; 
    -check synchronization state; 
    -if syncrhonization state is not synchronized then flush transmit queue; 
    -suspend for a while; 
    -end if; 
    -if interrupt occurred then disable SPI interrupts; 
    -read SPI interrupt cause register; 
    -if SPI interrupt cause is CPU on then update synchronization state; 
    -if synchronization state is synchronized then continue; 
    -end if; 
    -end if; 
    -if SPI interrupt cause is packet available then if synchronization state is synchronized then call receive frame function; 
    -end if; 
    -end if; 
    -if SPI interrupt cause is read buffer error then set synchronization state to unknown; 
    -continue; 
    -end if; 
    -if SPI interrupt cause is write buffer error then set synchronization state to unknown; 
    -continue; 
    -end if; 
    -clear SPI interrupt cause register; 
    -clear SPI interrupt register; 
    -end if; 
    -if transmit queue is not empty then call transmit frame function; 
    -end if; 
    -end while; 
    -set thread state to dormant; 
    -return; 
    -end function; 
    -
    -/*====================================================================*
    - *   
    - *   basic interrupt handler; count interrupts since last service;
    - *   wake up dormant service routine;
    - *
    - *--------------------------------------------------------------------*/
    -
    -function interrupt handler do increment interrupt count; 
    -if thread is available and thread is dormant then wake up thread to service interrupt; 
    -end if; 
    -return (success); 
    -end function; 
    -
    -
    -
    - - - diff --git a/docbook/psgraph.1.html b/docbook/psgraph.1.html deleted file mode 100644 index 544e79c3..00000000 --- a/docbook/psgraph.1.html +++ /dev/null @@ -1,1241 +0,0 @@ - - - - - - psgraph.1 - - - - - - - - - -
    -psgraph(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  psgraph(1)
    -
    -NAME
    -       psgraph - Display PIB File Prescalers
    -
    -SYNOPSIS
    -       psgraph [options] file [file] [...]  [>stdout]
    -
    -SYNOPSIS
    -       Read  one or more PIB files and plot prescaler values on stdout.  This program can be used to quickly verify that correct
    -       carriers have been notched and, by using a difference program, determine where two prescaler sets differ.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -s scale
    -              The amplitude scale factor.  The amplitude for each carrier is scaled (divided) by this amount before printing the
    -              hash line that represents the amplitude value.  Larger values result in shorter hash lines.   Valid  scale  values
    -              are 1 through UCHAR_MAX, as defined in limits.h.  The default is 10.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The name of an Atheros Parameter Information File.
    -
    -EXAMPLES
    -       The  following  example graphs prescaler values stored in file test.pib on the console.  Output consists of 1155 lines in
    -       four columns.  The first collumn is the amplitude map offset.  The next column is the decimal equivalent of the amplitude
    -       scaler.   The  next  column  is  the  carrier frequency in megahertz.  The last column is a hash line that represents the
    -       amplitude scaler value.  Sinc option -s was omitted, the hash line consists of hash character for every 5 units of ampli‐
    -       tude.
    -
    -          # psgraph test.pib
    -           0000      0  1.807
    -           0001      0  1.831
    -           0002      0  1.855
    -           0003      0  1.880
    -           0004      0  1.904
    -           0005      0  1.929
    -           0006      0  1.953
    -           0007      0  1.978
    -           0008      0  2.002
    -           0009      0  2.026
    -           0010      0  2.051
    -           0011      0  2.075
    -           0012    199  2.100 ########################################
    -           0013    199  2.124 ########################################
    -           0014    199  2.148 ########################################
    -           0015    199  2.173 ########################################
    -           0016    199  2.197 ########################################
    -           0017    198  2.222 ########################################
    -           0018    198  2.246 ########################################
    -           0019    198  2.271 ########################################
    -           0020    198  2.295 ########################################
    -           0021    198  2.319 ########################################
    -           0022    198  2.344 ########################################
    -           0023    198  2.368 ########################################
    -           0024    198  2.393 ########################################
    -           0025    198  2.417 ########################################
    -           0026    198  2.441 ########################################
    -           0027    198  2.466 ########################################
    -           0028    198  2.490 ########################################
    -           0029    198  2.515 ########################################
    -           0030    198  2.539 ########################################
    -           0031    198  2.563 ########################################
    -           0032    198  2.588 ########################################
    -           0033    198  2.612 ########################################
    -           0034    198  2.637 ########################################
    -           0035    198  2.661 ########################################
    -           0036    198  2.686 ########################################
    -           0037    198  2.710 ########################################
    -           0038    198  2.734 ########################################
    -           0039    199  2.759 ########################################
    -           0040    199  2.783 ########################################
    -           0041    199  2.808 ########################################
    -           0042    200  2.832 ########################################
    -           0043    200  2.856 ########################################
    -           0044    201  2.881 ########################################
    -           0045    201  2.905 ########################################
    -           0046    202  2.930 ########################################
    -           0047    202  2.954 ########################################
    -           0048    203  2.979 #########################################
    -           0049    203  3.003 #########################################
    -           0050    204  3.027 #########################################
    -           0051    205  3.052 #########################################
    -           0052    205  3.076 #########################################
    -           0053    206  3.101 #########################################
    -           0054    206  3.125 #########################################
    -           0055    207  3.149 #########################################
    -           0056    208  3.174 ##########################################
    -           0057    208  3.198 ##########################################
    -           0058    209  3.223 ##########################################
    -           0059    210  3.247 ##########################################
    -           0060    210  3.271 ##########################################
    -           0061    211  3.296 ##########################################
    -           0062    211  3.320 ##########################################
    -           0063    212  3.345 ##########################################
    -           0064    212  3.369 ##########################################
    -           0065    213  3.394 ###########################################
    -           0066      0  3.418
    -           0067      0  3.442
    -           0068      0  3.467
    -           0069      0  3.491
    -           0070      0  3.516
    -           0071      0  3.540
    -           0072      0  3.564
    -           0073      0  3.589
    -           0074      0  3.613
    -           0075      0  3.638
    -           0076      0  3.662
    -           0077      0  3.687
    -           0078      0  3.711
    -           0079      0  3.735
    -           0080      0  3.760
    -           0081      0  3.784
    -           0082      0  3.809
    -           0083      0  3.833
    -           0084      0  3.857
    -           0085      0  3.882
    -           0086      0  3.906
    -           0087      0  3.931
    -           0088      0  3.955
    -           0089      0  3.979
    -           0090      0  4.004
    -           0091      0  4.028
    -           0092      0  4.053
    -           0093      0  4.077
    -           0094    220  4.102 ############################################
    -           0095    220  4.126 ############################################
    -           0096    220  4.150 ############################################
    -           0097    220  4.175 ############################################
    -           0098    221  4.199 ############################################
    -           0099    221  4.224 ############################################
    -           0100    221  4.248 ############################################
    -           0101    221  4.272 ############################################
    -           0102    221  4.297 ############################################
    -           0103    222  4.321 ############################################
    -           0104    222  4.346 ############################################
    -           0105    222  4.370 ############################################
    -           0106    222  4.395 ############################################
    -           0107    222  4.419 ############################################
    -           0108    223  4.443 #############################################
    -           0109    223  4.468 #############################################
    -           0110    223  4.492 #############################################
    -           0111    223  4.517 #############################################
    -           0112    224  4.541 #############################################
    -           0113    224  4.565 #############################################
    -           0114    224  4.590 #############################################
    -           0115    224  4.614 #############################################
    -           0116    224  4.639 #############################################
    -           0117    225  4.663 #############################################
    -           0118    225  4.688 #############################################
    -           0119    225  4.712 #############################################
    -           0120    225  4.736 #############################################
    -           0121    225  4.761 #############################################
    -           0122    226  4.785 #############################################
    -           0123    226  4.810 #############################################
    -           0124    226  4.834 #############################################
    -           0125    226  4.858 #############################################
    -           0126    227  4.883 #############################################
    -           0127    227  4.907 #############################################
    -           0128    227  4.932 #############################################
    -           0129    227  4.956 #############################################
    -           0130    227  4.980 #############################################
    -           0131    228  5.005 ##############################################
    -           0132    228  5.029 ##############################################
    -           0133    228  5.054 ##############################################
    -           0134    228  5.078 ##############################################
    -           0135    229  5.103 ##############################################
    -           0136    229  5.127 ##############################################
    -           0137    229  5.151 ##############################################
    -           0138    229  5.176 ##############################################
    -           0139    229  5.200 ##############################################
    -           0140    230  5.225 ##############################################
    -           0141      0  5.249
    -           0142      0  5.273
    -           0143      0  5.298
    -           0144      0  5.322
    -           0145      0  5.347
    -           0146      0  5.371
    -           0147      0  5.396
    -           0148      0  5.420
    -           0149      0  5.444
    -           0150      0  5.469
    -           0151      0  5.493
    -           0152    232  5.518 ##############################################
    -           0153    232  5.542 ##############################################
    -           0154    233  5.566 ###############################################
    -           0155    233  5.591 ###############################################
    -           0156    233  5.615 ###############################################
    -           0157    233  5.640 ###############################################
    -           0158    233  5.664 ###############################################
    -           0159    234  5.688 ###############################################
    -           0160    234  5.713 ###############################################
    -           0161    234  5.737 ###############################################
    -           0162    234  5.762 ###############################################
    -           0163    234  5.786 ###############################################
    -           0164    235  5.811 ###############################################
    -           0165    235  5.835 ###############################################
    -           0166    235  5.859 ###############################################
    -           0167    235  5.884 ###############################################
    -           0168    236  5.908 ###############################################
    -           0169    236  5.933 ###############################################
    -           0170    236  5.957 ###############################################
    -           0171    236  5.981 ###############################################
    -           0172    237  6.006 ###############################################
    -           0173    237  6.030 ###############################################
    -           0174    237  6.055 ###############################################
    -           0175    237  6.079 ###############################################
    -           0176    238  6.104 ################################################
    -           0177    238  6.128 ################################################
    -           0178    238  6.152 ################################################
    -           0179    239  6.177 ################################################
    -           0180    239  6.201 ################################################
    -           0181    239  6.226 ################################################
    -           0182    240  6.250 ################################################
    -           0183    240  6.274 ################################################
    -           0184    240  6.299 ################################################
    -           0185    241  6.323 ################################################
    -           0186    241  6.348 ################################################
    -           0187    241  6.372 ################################################
    -           0188    242  6.396 ################################################
    -           0189    242  6.421 ################################################
    -           0190    243  6.445 #################################################
    -           0191    243  6.470 #################################################
    -           0192    243  6.494 #################################################
    -           0193    244  6.519 #################################################
    -           0194    244  6.543 #################################################
    -           0195    245  6.567 #################################################
    -           0196    245  6.592 #################################################
    -           0197    246  6.616 #################################################
    -           0198    246  6.641 #################################################
    -           0199    246  6.665 #################################################
    -           0200    247  6.689 #################################################
    -           0201    247  6.714 #################################################
    -           0202    248  6.738 ##################################################
    -           0203    248  6.763 ##################################################
    -           0204    249  6.787 ##################################################
    -           0205    249  6.812 ##################################################
    -           0206    249  6.836 ##################################################
    -           0207    250  6.860 ##################################################
    -           0208    250  6.885 ##################################################
    -           0209      0  6.909
    -           0210      0  6.934
    -           0211      0  6.958
    -           0212      0  6.982
    -           0213      0  7.007
    -           0214      0  7.031
    -           0215      0  7.056
    -           0216      0  7.080
    -           0217      0  7.104
    -           0218      0  7.129
    -           0219      0  7.153
    -           0220      0  7.178
    -           0221      0  7.202
    -           0222      0  7.227
    -           0223      0  7.251
    -           0224      0  7.275
    -           0225      0  7.300
    -           0226      0  7.324
    -           0227      0  7.349
    -           0228      0  7.373
    -           0229    203  7.397 #########################################
    -           0230    258  7.422 ####################################################
    -           0231    258  7.446 ####################################################
    -           0232    258  7.471 ####################################################
    -           0233    259  7.495 ####################################################
    -           0234    259  7.520 ####################################################
    -           0235    259  7.544 ####################################################
    -           0236    260  7.568 ####################################################
    -           0237    260  7.593 ####################################################
    -           0238    260  7.617 ####################################################
    -           0239    261  7.642 ####################################################
    -           0240    261  7.666 ####################################################
    -           0241    261  7.690 ####################################################
    -           0242    262  7.715 ####################################################
    -           0243    262  7.739 ####################################################
    -           0244    262  7.764 ####################################################
    -           0245    263  7.788 #####################################################
    -           0246    263  7.812 #####################################################
    -           0247    263  7.837 #####################################################
    -           0248    264  7.861 #####################################################
    -           0249    264  7.886 #####################################################
    -           0250    264  7.910 #####################################################
    -           0251    265  7.935 #####################################################
    -           0252    265  7.959 #####################################################
    -           0253    265  7.983 #####################################################
    -           0254    266  8.008 #####################################################
    -           0255    266  8.032 #####################################################
    -           0256    266  8.057 #####################################################
    -           0257    267  8.081 #####################################################
    -           0258    267  8.105 #####################################################
    -           0259    268  8.130 ######################################################
    -           0260    268  8.154 ######################################################
    -           0261    268  8.179 ######################################################
    -           0262    269  8.203 ######################################################
    -           0263    269  8.228 ######################################################
    -           0264    269  8.252 ######################################################
    -           0265    270  8.276 ######################################################
    -           0266    270  8.301 ######################################################
    -           0267    270  8.325 ######################################################
    -           0268    271  8.350 ######################################################
    -           0269    271  8.374 ######################################################
    -           0270    272  8.398 ######################################################
    -           0271    272  8.423 ######################################################
    -           0272    272  8.447 ######################################################
    -           0273    273  8.472 #######################################################
    -           0274    273  8.496 #######################################################
    -           0275    273  8.521 #######################################################
    -           0276    274  8.545 #######################################################
    -           0277    274  8.569 #######################################################
    -           0278    274  8.594 #######################################################
    -           0279    275  8.618 #######################################################
    -           0280    275  8.643 #######################################################
    -           0281    275  8.667 #######################################################
    -           0282    276  8.691 #######################################################
    -           0283    276  8.716 #######################################################
    -           0284    276  8.740 #######################################################
    -           0285    277  8.765 #######################################################
    -           0286    277  8.789 #######################################################
    -           0287    277  8.813 #######################################################
    -           0288    277  8.838 #######################################################
    -           0289    278  8.862 ########################################################
    -           0290    278  8.887 ########################################################
    -           0291    278  8.911 ########################################################
    -           0292    279  8.936 ########################################################
    -           0293    279  8.960 ########################################################
    -           0294    279  8.984 ########################################################
    -           0295    279  9.009 ########################################################
    -           0296    280  9.033 ########################################################
    -           0297    280  9.058 ########################################################
    -           0298    280  9.082 ########################################################
    -           0299    280  9.106 ########################################################
    -           0300    281  9.131 ########################################################
    -           0301    281  9.155 ########################################################
    -           0302    281  9.180 ########################################################
    -           0303    281  9.204 ########################################################
    -           0304    282  9.229 ########################################################
    -           0305    282  9.253 ########################################################
    -           0306    282  9.277 ########################################################
    -           0307    283  9.302 #########################################################
    -           0308    283  9.326 #########################################################
    -           0309    283  9.351 #########################################################
    -           0310    283  9.375 #########################################################
    -           0311    284  9.399 #########################################################
    -           0312    284  9.424 #########################################################
    -           0313    284  9.448 #########################################################
    -           0314    284  9.473 #########################################################
    -           0315    285  9.497 #########################################################
    -           0316    285  9.521 #########################################################
    -           0317    285  9.546 #########################################################
    -           0318    285  9.570 #########################################################
    -           0319    286  9.595 #########################################################
    -           0320    286  9.619 #########################################################
    -           0321    286  9.644 #########################################################
    -           0322    287  9.668 #########################################################
    -           0323    287  9.692 #########################################################
    -           0324    287  9.717 #########################################################
    -           0325    287  9.741 #########################################################
    -           0326    288  9.766 ##########################################################
    -           0327    288  9.790 ##########################################################
    -           0328    288  9.814 ##########################################################
    -           0329    289  9.839 ##########################################################
    -           0330    289  9.863 ##########################################################
    -           0331    289  9.888 ##########################################################
    -           0332    289  9.912 ##########################################################
    -           0333    290  9.937 ##########################################################
    -           0334    290  9.961 ##########################################################
    -           0335    290  9.985 ##########################################################
    -           0336      0 10.010
    -           0337      0 10.034
    -           0338      0 10.059
    -           0339      0 10.083
    -           0340      0 10.107
    -           0341      0 10.132
    -           0342      0 10.156
    -           0343      0 10.181
    -           0344      0 10.205
    -           0345      0 10.229
    -           0346    294 10.254 ###########################################################
    -           0347    294 10.278 ###########################################################
    -           0348    294 10.303 ###########################################################
    -           0349    294 10.327 ###########################################################
    -           0350    295 10.352 ###########################################################
    -           0351    295 10.376 ###########################################################
    -           0352    295 10.400 ###########################################################
    -           0353    295 10.425 ###########################################################
    -           0354    296 10.449 ###########################################################
    -           0355    296 10.474 ###########################################################
    -           0356    296 10.498 ###########################################################
    -           0357    296 10.522 ###########################################################
    -           0358    297 10.547 ###########################################################
    -           0359    297 10.571 ###########################################################
    -           0360    297 10.596 ###########################################################
    -           0361    297 10.620 ###########################################################
    -           0362    297 10.645 ###########################################################
    -           0363    298 10.669 ############################################################
    -           0364    298 10.693 ############################################################
    -           0365    298 10.718 ############################################################
    -           0366    298 10.742 ############################################################
    -           0367    299 10.767 ############################################################
    -           0368    299 10.791 ############################################################
    -           0369    299 10.815 ############################################################
    -           0370    299 10.840 ############################################################
    -           0371    299 10.864 ############################################################
    -           0372    300 10.889 ############################################################
    -           0373    300 10.913 ############################################################
    -           0374    300 10.938 ############################################################
    -           0375    300 10.962 ############################################################
    -           0376    300 10.986 ############################################################
    -           0377    301 11.011 ############################################################
    -           0378    301 11.035 ############################################################
    -           0379    301 11.060 ############################################################
    -           0380    301 11.084 ############################################################
    -           0381    301 11.108 ############################################################
    -           0382    301 11.133 ############################################################
    -           0383    302 11.157 ############################################################
    -           0384    302 11.182 ############################################################
    -           0385    302 11.206 ############################################################
    -           0386    302 11.230 ############################################################
    -           0387    302 11.255 ############################################################
    -           0388    302 11.279 ############################################################
    -           0389    303 11.304 #############################################################
    -           0390    303 11.328 #############################################################
    -           0391    303 11.353 #############################################################
    -           0392    303 11.377 #############################################################
    -           0393    303 11.401 #############################################################
    -           0394    303 11.426 #############################################################
    -           0395    303 11.450 #############################################################
    -           0396    303 11.475 #############################################################
    -           0397    304 11.499 #############################################################
    -           0398    304 11.523 #############################################################
    -           0399    304 11.548 #############################################################
    -           0400    304 11.572 #############################################################
    -           0401    304 11.597 #############################################################
    -           0402    304 11.621 #############################################################
    -           0403    304 11.646 #############################################################
    -           0404    304 11.670 #############################################################
    -           0405    304 11.694 #############################################################
    -           0406    304 11.719 #############################################################
    -           0407    305 11.743 #############################################################
    -           0408    305 11.768 #############################################################
    -           0409    305 11.792 #############################################################
    -           0410    305 11.816 #############################################################
    -           0411    305 11.841 #############################################################
    -           0412    305 11.865 #############################################################
    -           0413    305 11.890 #############################################################
    -           0414    305 11.914 #############################################################
    -           0415    305 11.938 #############################################################
    -           0416    305 11.963 #############################################################
    -           0417    305 11.987 #############################################################
    -           0418    305 12.012 #############################################################
    -           0419    306 12.036 #############################################################
    -           0420    306 12.061 #############################################################
    -           0421    306 12.085 #############################################################
    -           0422    306 12.109 #############################################################
    -           0423    306 12.134 #############################################################
    -           0424    306 12.158 #############################################################
    -           0425    306 12.183 #############################################################
    -           0426    306 12.207 #############################################################
    -           0427    306 12.231 #############################################################
    -           0428    307 12.256 #############################################################
    -           0429    307 12.280 #############################################################
    -           0430    307 12.305 #############################################################
    -           0431    307 12.329 #############################################################
    -           0432    307 12.354 #############################################################
    -           0433    307 12.378 #############################################################
    -           0434    308 12.402 ##############################################################
    -           0435    308 12.427 ##############################################################
    -           0436    308 12.451 ##############################################################
    -           0437    308 12.476 ##############################################################
    -           0438    309 12.500 ##############################################################
    -           0439    309 12.524 ##############################################################
    -           0440    309 12.549 ##############################################################
    -           0441    309 12.573 ##############################################################
    -           0442    310 12.598 ##############################################################
    -           0443    310 12.622 ##############################################################
    -           0444    310 12.646 ##############################################################
    -           0445    310 12.671 ##############################################################
    -           0446    311 12.695 ##############################################################
    -           0447    311 12.720 ##############################################################
    -           0448    311 12.744 ##############################################################
    -           0449    312 12.769 ##############################################################
    -           0450    312 12.793 ##############################################################
    -           0451    312 12.817 ##############################################################
    -           0452    312 12.842 ##############################################################
    -           0453    312 12.866 ##############################################################
    -           0454    313 12.891 ###############################################################
    -           0455    313 12.915 ###############################################################
    -           0456    313 12.939 ###############################################################
    -           0457    313 12.964 ###############################################################
    -           0458    313 12.988 ###############################################################
    -           0459    313 13.013 ###############################################################
    -           0460    313 13.037 ###############################################################
    -           0461    314 13.062 ###############################################################
    -           0462    314 13.086 ###############################################################
    -           0463    314 13.110 ###############################################################
    -           0464    314 13.135 ###############################################################
    -           0465    314 13.159 ###############################################################
    -           0466    314 13.184 ###############################################################
    -           0467    314 13.208 ###############################################################
    -           0468    314 13.232 ###############################################################
    -           0469    314 13.257 ###############################################################
    -           0470    314 13.281 ###############################################################
    -           0471    314 13.306 ###############################################################
    -           0472    314 13.330 ###############################################################
    -           0473    314 13.354 ###############################################################
    -           0474    314 13.379 ###############################################################
    -           0475    314 13.403 ###############################################################
    -           0476    314 13.428 ###############################################################
    -           0477    314 13.452 ###############################################################
    -           0478    314 13.477 ###############################################################
    -           0479    314 13.501 ###############################################################
    -           0480    314 13.525 ###############################################################
    -           0481    314 13.550 ###############################################################
    -           0482    314 13.574 ###############################################################
    -           0483    314 13.599 ###############################################################
    -           0484    314 13.623 ###############################################################
    -           0485    314 13.647 ###############################################################
    -           0486    314 13.672 ###############################################################
    -           0487    314 13.696 ###############################################################
    -           0488    314 13.721 ###############################################################
    -           0489    314 13.745 ###############################################################
    -           0490    314 13.770 ###############################################################
    -           0491    314 13.794 ###############################################################
    -           0492    314 13.818 ###############################################################
    -           0493    314 13.843 ###############################################################
    -           0494    314 13.867 ###############################################################
    -           0495    314 13.892 ###############################################################
    -           0496      0 13.916
    -           0497      0 13.940
    -           0498      0 13.965
    -           0499      0 13.989
    -           0500      0 14.014
    -           0501      0 14.038
    -           0502      0 14.062
    -           0503      0 14.087
    -           0504      0 14.111
    -           0505      0 14.136
    -           0506      0 14.160
    -           0507      0 14.185
    -           0508      0 14.209
    -           0509      0 14.233
    -           0510      0 14.258
    -           0511      0 14.282
    -           0512      0 14.307
    -           0513      0 14.331
    -           0514      0 14.355
    -           0515      0 14.380
    -           0516      0 14.404
    -           0517      0 14.429
    -           0518    312 14.453 ##############################################################
    -           0519    312 14.478 ##############################################################
    -           0520    312 14.502 ##############################################################
    -           0521    312 14.526 ##############################################################
    -           0522    312 14.551 ##############################################################
    -           0523    312 14.575 ##############################################################
    -           0524    312 14.600 ##############################################################
    -           0525    311 14.624 ##############################################################
    -           0526    311 14.648 ##############################################################
    -           0527    311 14.673 ##############################################################
    -           0528    311 14.697 ##############################################################
    -           0529    311 14.722 ##############################################################
    -           0530    311 14.746 ##############################################################
    -           0531    311 14.771 ##############################################################
    -           0532    310 14.795 ##############################################################
    -           0533    310 14.819 ##############################################################
    -           0534    310 14.844 ##############################################################
    -           0535    310 14.868 ##############################################################
    -           0536    310 14.893 ##############################################################
    -           0537    310 14.917 ##############################################################
    -           0538    310 14.941 ##############################################################
    -           0539    310 14.966 ##############################################################
    -           0540    309 14.990 ##############################################################
    -           0541    309 15.015 ##############################################################
    -           0542    309 15.039 ##############################################################
    -           0543    309 15.063 ##############################################################
    -           0544    309 15.088 ##############################################################
    -           0545    308 15.112 ##############################################################
    -           0546    308 15.137 ##############################################################
    -           0547    308 15.161 ##############################################################
    -           0548    308 15.186 ##############################################################
    -           0549    308 15.210 ##############################################################
    -           0550    307 15.234 #############################################################
    -           0551    307 15.259 #############################################################
    -           0552    307 15.283 #############################################################
    -           0553    307 15.308 #############################################################
    -           0554    307 15.332 #############################################################
    -           0555    306 15.356 #############################################################
    -           0556    306 15.381 #############################################################
    -           0557    306 15.405 #############################################################
    -           0558    306 15.430 #############################################################
    -           0559    306 15.454 #############################################################
    -           0560    305 15.479 #############################################################
    -           0561    305 15.503 #############################################################
    -           0562    305 15.527 #############################################################
    -           0563    305 15.552 #############################################################
    -           0564    304 15.576 #############################################################
    -           0565    304 15.601 #############################################################
    -           0566    304 15.625 #############################################################
    -           0567    304 15.649 #############################################################
    -           0568    304 15.674 #############################################################
    -           0569    303 15.698 #############################################################
    -           0570    303 15.723 #############################################################
    -           0571    303 15.747 #############################################################
    -           0572    303 15.771 #############################################################
    -           0573    303 15.796 #############################################################
    -           0574    302 15.820 ############################################################
    -           0575    302 15.845 ############################################################
    -           0576    302 15.869 ############################################################
    -           0577    302 15.894 ############################################################
    -           0578    302 15.918 ############################################################
    -           0579    301 15.942 ############################################################
    -           0580    301 15.967 ############################################################
    -           0581    301 15.991 ############################################################
    -           0582    301 16.016 ############################################################
    -           0583    301 16.040 ############################################################
    -           0584    300 16.064 ############################################################
    -           0585    300 16.089 ############################################################
    -           0586    300 16.113 ############################################################
    -           0587    300 16.138 ############################################################
    -           0588    300 16.162 ############################################################
    -           0589    300 16.187 ############################################################
    -           0590    299 16.211 ############################################################
    -           0591    299 16.235 ############################################################
    -           0592    299 16.260 ############################################################
    -           0593    299 16.284 ############################################################
    -           0594    299 16.309 ############################################################
    -           0595    298 16.333 ############################################################
    -           0596    298 16.357 ############################################################
    -           0597    298 16.382 ############################################################
    -           0598    298 16.406 ############################################################
    -           0599    298 16.431 ############################################################
    -           0600    297 16.455 ###########################################################
    -           0601    297 16.479 ###########################################################
    -           0602    297 16.504 ###########################################################
    -           0603    297 16.528 ###########################################################
    -           0604    297 16.553 ###########################################################
    -           0605    296 16.577 ###########################################################
    -           0606    296 16.602 ###########################################################
    -           0607    296 16.626 ###########################################################
    -           0608    296 16.650 ###########################################################
    -           0609    296 16.675 ###########################################################
    -           0610    296 16.699 ###########################################################
    -           0611    295 16.724 ###########################################################
    -           0612    295 16.748 ###########################################################
    -           0613    295 16.772 ###########################################################
    -           0614    295 16.797 ###########################################################
    -           0615    295 16.821 ###########################################################
    -           0616    294 16.846 ###########################################################
    -           0617    294 16.870 ###########################################################
    -           0618    294 16.895 ###########################################################
    -           0619    294 16.919 ###########################################################
    -           0620    294 16.943 ###########################################################
    -           0621    294 16.968 ###########################################################
    -           0622    293 16.992 ###########################################################
    -           0623    293 17.017 ###########################################################
    -           0624    293 17.041 ###########################################################
    -           0625    293 17.065 ###########################################################
    -           0626    293 17.090 ###########################################################
    -           0627    292 17.114 ##########################################################
    -           0628    292 17.139 ##########################################################
    -           0629    292 17.163 ##########################################################
    -           0630    292 17.188 ##########################################################
    -           0631    292 17.212 ##########################################################
    -           0632    292 17.236 ##########################################################
    -           0633    291 17.261 ##########################################################
    -           0634    291 17.285 ##########################################################
    -           0635    291 17.310 ##########################################################
    -           0636    291 17.334 ##########################################################
    -           0637    291 17.358 ##########################################################
    -           0638    290 17.383 ##########################################################
    -           0639    290 17.407 ##########################################################
    -           0640    290 17.432 ##########################################################
    -           0641    290 17.456 ##########################################################
    -           0642    290 17.480 ##########################################################
    -           0643    289 17.505 ##########################################################
    -           0644    289 17.529 ##########################################################
    -           0645    289 17.554 ##########################################################
    -           0646    289 17.578 ##########################################################
    -           0647    288 17.603 ##########################################################
    -           0648    288 17.627 ##########################################################
    -           0649    288 17.651 ##########################################################
    -           0650    288 17.676 ##########################################################
    -           0651    287 17.700 #########################################################
    -           0652    287 17.725 #########################################################
    -           0653    287 17.749 #########################################################
    -           0654    287 17.773 #########################################################
    -           0655    286 17.798 #########################################################
    -           0656    286 17.822 #########################################################
    -           0657    286 17.847 #########################################################
    -           0658    285 17.871 #########################################################
    -           0659    285 17.896 #########################################################
    -           0660    285 17.920 #########################################################
    -           0661    285 17.944 #########################################################
    -           0662    253 17.969 ###################################################
    -           0663      0 17.993
    -           0664      0 18.018
    -           0665      0 18.042
    -           0666      0 18.066
    -           0667      0 18.091
    -           0668      0 18.115
    -           0669      0 18.140
    -           0670      0 18.164
    -           0671      0 18.188
    -           0672      0 18.213
    -           0673      0 18.237
    -           0674      0 18.262
    -           0675    281 18.286 ########################################################
    -           0676    280 18.311 ########################################################
    -           0677    280 18.335 ########################################################
    -           0678    280 18.359 ########################################################
    -           0679    279 18.384 ########################################################
    -           0680    279 18.408 ########################################################
    -           0681    279 18.433 ########################################################
    -           0682    279 18.457 ########################################################
    -           0683    278 18.481 ########################################################
    -           0684    278 18.506 ########################################################
    -           0685    278 18.530 ########################################################
    -           0686    278 18.555 ########################################################
    -           0687    277 18.579 #######################################################
    -           0688    277 18.604 #######################################################
    -           0689    277 18.628 #######################################################
    -           0690    276 18.652 #######################################################
    -           0691    276 18.677 #######################################################
    -           0692    276 18.701 #######################################################
    -           0693    276 18.726 #######################################################
    -           0694    275 18.750 #######################################################
    -           0695    275 18.774 #######################################################
    -           0696    275 18.799 #######################################################
    -           0697    275 18.823 #######################################################
    -           0698    274 18.848 #######################################################
    -           0699    274 18.872 #######################################################
    -           0700    274 18.896 #######################################################
    -           0701    274 18.921 #######################################################
    -           0702    273 18.945 #######################################################
    -           0703    273 18.970 #######################################################
    -           0704    273 18.994 #######################################################
    -           0705    273 19.019 #######################################################
    -           0706    272 19.043 ######################################################
    -           0707    272 19.067 ######################################################
    -           0708    272 19.092 ######################################################
    -           0709    271 19.116 ######################################################
    -           0710    271 19.141 ######################################################
    -           0711    271 19.165 ######################################################
    -           0712    271 19.189 ######################################################
    -           0713    270 19.214 ######################################################
    -           0714    270 19.238 ######################################################
    -           0715    270 19.263 ######################################################
    -           0716    270 19.287 ######################################################
    -           0717    269 19.312 ######################################################
    -           0718    269 19.336 ######################################################
    -           0719    269 19.360 ######################################################
    -           0720    269 19.385 ######################################################
    -           0721    268 19.409 ######################################################
    -           0722    268 19.434 ######################################################
    -           0723    268 19.458 ######################################################
    -           0724    268 19.482 ######################################################
    -           0725    267 19.507 #####################################################
    -           0726    267 19.531 #####################################################
    -           0727    267 19.556 #####################################################
    -           0728    267 19.580 #####################################################
    -           0729    266 19.604 #####################################################
    -           0730    266 19.629 #####################################################
    -           0731    266 19.653 #####################################################
    -           0732    266 19.678 #####################################################
    -           0733    265 19.702 #####################################################
    -           0734    265 19.727 #####################################################
    -           0735    265 19.751 #####################################################
    -           0736    265 19.775 #####################################################
    -           0737    264 19.800 #####################################################
    -           0738    264 19.824 #####################################################
    -           0739    264 19.849 #####################################################
    -           0740    263 19.873 #####################################################
    -           0741    263 19.897 #####################################################
    -           0742    263 19.922 #####################################################
    -           0743    263 19.946 #####################################################
    -           0744    262 19.971 ####################################################
    -           0745    262 19.995 ####################################################
    -           0746    262 20.020 ####################################################
    -           0747    262 20.044 ####################################################
    -           0748    261 20.068 ####################################################
    -           0749    261 20.093 ####################################################
    -           0750    261 20.117 ####################################################
    -           0751    261 20.142 ####################################################
    -           0752    260 20.166 ####################################################
    -           0753    260 20.190 ####################################################
    -           0754    260 20.215 ####################################################
    -           0755    260 20.239 ####################################################
    -           0756    259 20.264 ####################################################
    -           0757    259 20.288 ####################################################
    -           0758    259 20.312 ####################################################
    -           0759    259 20.337 ####################################################
    -           0760    258 20.361 ####################################################
    -           0761    258 20.386 ####################################################
    -           0762    258 20.410 ####################################################
    -           0763    258 20.435 ####################################################
    -           0764    257 20.459 ###################################################
    -           0765    257 20.483 ###################################################
    -           0766    257 20.508 ###################################################
    -           0767    257 20.532 ###################################################
    -           0768    256 20.557 ###################################################
    -           0769    256 20.581 ###################################################
    -           0770    256 20.605 ###################################################
    -           0771    256 20.630 ###################################################
    -           0772    255 20.654 ###################################################
    -           0773    255 20.679 ###################################################
    -           0774    255 20.703 ###################################################
    -           0775    255 20.728 ###################################################
    -           0776    254 20.752 ###################################################
    -           0777    254 20.776 ###################################################
    -           0778    254 20.801 ###################################################
    -           0779    254 20.825 ###################################################
    -           0780    254 20.850 ###################################################
    -           0781    253 20.874 ###################################################
    -           0782    253 20.898 ###################################################
    -           0783      0 20.923
    -           0784      0 20.947
    -           0785      0 20.972
    -           0786      0 20.996
    -           0787      0 21.021
    -           0788      0 21.045
    -           0789      0 21.069
    -           0790      0 21.094
    -           0791      0 21.118
    -           0792      0 21.143
    -           0793      0 21.167
    -           0794      0 21.191
    -           0795      0 21.216
    -           0796      0 21.240
    -           0797      0 21.265
    -           0798      0 21.289
    -           0799      0 21.313
    -           0800      0 21.338
    -           0801      0 21.362
    -           0802      0 21.387
    -           0803      0 21.411
    -           0804      0 21.436
    -           0805      0 21.460
    -           0806      0 21.484
    -           0807      0 21.509
    -           0808      0 21.533
    -           0809    246 21.558 #################################################
    -           0810    246 21.582 #################################################
    -           0811    246 21.606 #################################################
    -           0812    246 21.631 #################################################
    -           0813    245 21.655 #################################################
    -           0814    245 21.680 #################################################
    -           0815    245 21.704 #################################################
    -           0816    245 21.729 #################################################
    -           0817    244 21.753 #################################################
    -           0818    244 21.777 #################################################
    -           0819    244 21.802 #################################################
    -           0820    244 21.826 #################################################
    -           0821    244 21.851 #################################################
    -           0822    243 21.875 #################################################
    -           0823    243 21.899 #################################################
    -           0824    243 21.924 #################################################
    -           0825    243 21.948 #################################################
    -           0826    243 21.973 #################################################
    -           0827    243 21.997 #################################################
    -           0828    242 22.021 ################################################
    -           0829    242 22.046 ################################################
    -           0830    242 22.070 ################################################
    -           0831    242 22.095 ################################################
    -           0832    242 22.119 ################################################
    -           0833    241 22.144 ################################################
    -           0834    241 22.168 ################################################
    -           0835    241 22.192 ################################################
    -           0836    241 22.217 ################################################
    -           0837    241 22.241 ################################################
    -           0838    241 22.266 ################################################
    -           0839    240 22.290 ################################################
    -           0840    240 22.314 ################################################
    -           0841    240 22.339 ################################################
    -           0842    240 22.363 ################################################
    -           0843    240 22.388 ################################################
    -           0844    240 22.412 ################################################
    -           0845    240 22.437 ################################################
    -           0846    239 22.461 ################################################
    -           0847    239 22.485 ################################################
    -           0848    239 22.510 ################################################
    -           0849    239 22.534 ################################################
    -           0850    239 22.559 ################################################
    -           0851    239 22.583 ################################################
    -           0852    239 22.607 ################################################
    -           0853    238 22.632 ################################################
    -           0854    238 22.656 ################################################
    -           0855    238 22.681 ################################################
    -           0856    238 22.705 ################################################
    -           0857    238 22.729 ################################################
    -           0858    238 22.754 ################################################
    -           0859    238 22.778 ################################################
    -           0860    238 22.803 ################################################
    -           0861    238 22.827 ################################################
    -           0862    238 22.852 ################################################
    -           0863    237 22.876 ###############################################
    -           0864    237 22.900 ###############################################
    -           0865    237 22.925 ###############################################
    -           0866    237 22.949 ###############################################
    -           0867    237 22.974 ###############################################
    -           0868    237 22.998 ###############################################
    -           0869    237 23.022 ###############################################
    -           0870    237 23.047 ###############################################
    -           0871    237 23.071 ###############################################
    -           0872    237 23.096 ###############################################
    -           0873    237 23.120 ###############################################
    -           0874    237 23.145 ###############################################
    -           0875    236 23.169 ###############################################
    -           0876    236 23.193 ###############################################
    -           0877    236 23.218 ###############################################
    -           0878    236 23.242 ###############################################
    -           0879    236 23.267 ###############################################
    -           0880    236 23.291 ###############################################
    -           0881    236 23.315 ###############################################
    -           0882    236 23.340 ###############################################
    -           0883    236 23.364 ###############################################
    -           0884    236 23.389 ###############################################
    -           0885    236 23.413 ###############################################
    -           0886    236 23.438 ###############################################
    -           0887    236 23.462 ###############################################
    -           0888    236 23.486 ###############################################
    -           0889    236 23.511 ###############################################
    -           0890    235 23.535 ###############################################
    -           0891    235 23.560 ###############################################
    -           0892    235 23.584 ###############################################
    -           0893    235 23.608 ###############################################
    -           0894    235 23.633 ###############################################
    -           0895    235 23.657 ###############################################
    -           0896    235 23.682 ###############################################
    -           0897    235 23.706 ###############################################
    -           0898    235 23.730 ###############################################
    -           0899    235 23.755 ###############################################
    -           0900    235 23.779 ###############################################
    -           0901    235 23.804 ###############################################
    -           0902    234 23.828 ###############################################
    -           0903    234 23.853 ###############################################
    -           0904    234 23.877 ###############################################
    -           0905    234 23.901 ###############################################
    -           0906    234 23.926 ###############################################
    -           0907    234 23.950 ###############################################
    -           0908    234 23.975 ###############################################
    -           0909    234 23.999 ###############################################
    -           0910    234 24.023 ###############################################
    -           0911    234 24.048 ###############################################
    -           0912    233 24.072 ###############################################
    -           0913    233 24.097 ###############################################
    -           0914    233 24.121 ###############################################
    -           0915    233 24.146 ###############################################
    -           0916    233 24.170 ###############################################
    -           0917    233 24.194 ###############################################
    -           0918    233 24.219 ###############################################
    -           0919    233 24.243 ###############################################
    -           0920    233 24.268 ###############################################
    -           0921    233 24.292 ###############################################
    -           0922    233 24.316 ###############################################
    -           0923    233 24.341 ###############################################
    -           0924    233 24.365 ###############################################
    -           0925    233 24.390 ###############################################
    -           0926    233 24.414 ###############################################
    -           0927    233 24.438 ###############################################
    -           0928    233 24.463 ###############################################
    -           0929    233 24.487 ###############################################
    -           0930    233 24.512 ###############################################
    -           0931    233 24.536 ###############################################
    -           0932    233 24.561 ###############################################
    -           0933    233 24.585 ###############################################
    -           0934    233 24.609 ###############################################
    -           0935    233 24.634 ###############################################
    -           0936    233 24.658 ###############################################
    -           0937    233 24.683 ###############################################
    -           0938    233 24.707 ###############################################
    -           0939    233 24.731 ###############################################
    -           0940    233 24.756 ###############################################
    -           0941    233 24.780 ###############################################
    -           0942      0 24.805
    -           0943      0 24.829
    -           0944      0 24.854
    -           0945      0 24.878
    -           0946      0 24.902
    -           0947      0 24.927
    -           0948      0 24.951
    -           0949      0 24.976
    -           0950      0 25.000
    -           0951      0 25.024
    -           0952      0 25.049
    -           0953      0 25.073
    -           0954    234 25.098 ###############################################
    -           0955    234 25.122 ###############################################
    -           0956    234 25.146 ###############################################
    -           0957    234 25.171 ###############################################
    -           0958    235 25.195 ###############################################
    -           0959    235 25.220 ###############################################
    -           0960    235 25.244 ###############################################
    -           0961    235 25.269 ###############################################
    -           0962    235 25.293 ###############################################
    -           0963    235 25.317 ###############################################
    -           0964    235 25.342 ###############################################
    -           0965    235 25.366 ###############################################
    -           0966    235 25.391 ###############################################
    -           0967    235 25.415 ###############################################
    -           0968    235 25.439 ###############################################
    -           0969    235 25.464 ###############################################
    -           0970    236 25.488 ###############################################
    -           0971    236 25.513 ###############################################
    -           0972    236 25.537 ###############################################
    -           0973    236 25.562 ###############################################
    -           0974    236 25.586 ###############################################
    -           0975    236 25.610 ###############################################
    -           0976    236 25.635 ###############################################
    -           0977    236 25.659 ###############################################
    -           0978    236 25.684 ###############################################
    -           0979    236 25.708 ###############################################
    -           0980    236 25.732 ###############################################
    -           0981    236 25.757 ###############################################
    -           0982    236 25.781 ###############################################
    -           0983    236 25.806 ###############################################
    -           0984    236 25.830 ###############################################
    -           0985    237 25.854 ###############################################
    -           0986    237 25.879 ###############################################
    -           0987    237 25.903 ###############################################
    -           0988    237 25.928 ###############################################
    -           0989    237 25.952 ###############################################
    -           0990    237 25.977 ###############################################
    -           0991    237 26.001 ###############################################
    -           0992    237 26.025 ###############################################
    -           0993    237 26.050 ###############################################
    -           0994    237 26.074 ###############################################
    -           0995    237 26.099 ###############################################
    -           0996    237 26.123 ###############################################
    -           0997    238 26.147 ################################################
    -           0998    238 26.172 ################################################
    -           0999    238 26.196 ################################################
    -           1000    238 26.221 ################################################
    -           1001    238 26.245 ################################################
    -           1002    238 26.270 ################################################
    -           1003    238 26.294 ################################################
    -           1004    238 26.318 ################################################
    -           1005    238 26.343 ################################################
    -           1006    238 26.367 ################################################
    -           1007    239 26.392 ################################################
    -           1008    239 26.416 ################################################
    -           1009    239 26.440 ################################################
    -           1010    239 26.465 ################################################
    -           1011    239 26.489 ################################################
    -           1012    239 26.514 ################################################
    -           1013    239 26.538 ################################################
    -           1014    240 26.562 ################################################
    -           1015    240 26.587 ################################################
    -           1016    240 26.611 ################################################
    -           1017    240 26.636 ################################################
    -           1018    240 26.660 ################################################
    -           1019    240 26.685 ################################################
    -           1020    241 26.709 ################################################
    -           1021    241 26.733 ################################################
    -           1022    241 26.758 ################################################
    -           1023    241 26.782 ################################################
    -           1024    241 26.807 ################################################
    -           1025    241 26.831 ################################################
    -           1026    242 26.855 ################################################
    -           1027    242 26.880 ################################################
    -           1028    242 26.904 ################################################
    -           1029    242 26.929 ################################################
    -           1030    242 26.953 ################################################
    -           1031    242 26.978 ################################################
    -           1032    243 27.002 #################################################
    -           1033    243 27.026 #################################################
    -           1034    243 27.051 #################################################
    -           1035    243 27.075 #################################################
    -           1036    243 27.100 #################################################
    -           1037    243 27.124 #################################################
    -           1038    244 27.148 #################################################
    -           1039    244 27.173 #################################################
    -           1040    244 27.197 #################################################
    -           1041    244 27.222 #################################################
    -           1042    244 27.246 #################################################
    -           1043    244 27.271 #################################################
    -           1044    245 27.295 #################################################
    -           1045    245 27.319 #################################################
    -           1046    245 27.344 #################################################
    -           1047    245 27.368 #################################################
    -           1048    245 27.393 #################################################
    -           1049    245 27.417 #################################################
    -           1050    245 27.441 #################################################
    -           1051    246 27.466 #################################################
    -           1052    246 27.490 #################################################
    -           1053    246 27.515 #################################################
    -           1054    246 27.539 #################################################
    -           1055    246 27.563 #################################################
    -           1056    246 27.588 #################################################
    -           1057    247 27.612 #################################################
    -           1058    247 27.637 #################################################
    -           1059    247 27.661 #################################################
    -           1060    247 27.686 #################################################
    -           1061    247 27.710 #################################################
    -           1062    247 27.734 #################################################
    -           1063    248 27.759 ##################################################
    -           1064    248 27.783 ##################################################
    -           1065    248 27.808 ##################################################
    -           1066    248 27.832 ##################################################
    -           1067    248 27.856 ##################################################
    -           1068    248 27.881 ##################################################
    -           1069    176 27.905 ###################################
    -           1070      0 27.930
    -           1071      0 27.954
    -           1072      0 27.979
    -           1073      0 28.003
    -           1074      0 28.027
    -           1075      0 28.052
    -           1076      0 28.076
    -           1077      0 28.101
    -           1078      0 28.125
    -           1079      0 28.149
    -           1080      0 28.174
    -           1081      0 28.198
    -           1082      0 28.223
    -           1083      0 28.247
    -           1084      0 28.271
    -           1085      0 28.296
    -           1086      0 28.320
    -           1087      0 28.345
    -           1088      0 28.369
    -           1089      0 28.394
    -           1090      0 28.418
    -           1091      0 28.442
    -           1092      0 28.467
    -           1093      0 28.491
    -           1094      0 28.516
    -           1095      0 28.540
    -           1096      0 28.564
    -           1097      0 28.589
    -           1098      0 28.613
    -           1099      0 28.638
    -           1100      0 28.662
    -           1101      0 28.687
    -           1102      0 28.711
    -           1103      0 28.735
    -           1104      0 28.760
    -           1105      0 28.784
    -           1106      0 28.809
    -           1107      0 28.833
    -           1108      0 28.857
    -           1109      0 28.882
    -           1110      0 28.906
    -           1111      0 28.931
    -           1112      0 28.955
    -           1113      0 28.979
    -           1114      0 29.004
    -           1115      0 29.028
    -           1116      0 29.053
    -           1117      0 29.077
    -           1118      0 29.102
    -           1119      0 29.126
    -           1120      0 29.150
    -           1121      0 29.175
    -           1122      0 29.199
    -           1123      0 29.224
    -           1124      0 29.248
    -           1125      0 29.272
    -           1126      0 29.297
    -           1127      0 29.321
    -           1128      0 29.346
    -           1129      0 29.370
    -           1130      0 29.395
    -           1131      0 29.419
    -           1132      0 29.443
    -           1133      0 29.468
    -           1134      0 29.492
    -           1135      0 29.517
    -           1136      0 29.541
    -           1137      0 29.565
    -           1138      0 29.590
    -           1139      0 29.614
    -           1140      0 29.639
    -           1141      0 29.663
    -           1142      0 29.688
    -           1143      0 29.712
    -           1144      0 29.736
    -           1145      0 29.761
    -           1146      0 29.785
    -           1147      0 29.810
    -           1148      0 29.834
    -           1149      0 29.858
    -           1150      0 29.883
    -           1151      0 29.907
    -           1152      0 29.932
    -           1153      0 29.956
    -           1154      0 29.980
    -
    -       This  display  graphically  illustrates  which  carrier  frequencies are enabled and which are suppressed.  Atheros takes
    -       greeat care in designing amplitude maps that conform to regional and national regulations where their  powerline  devices
    -       are  expected  to  operate.  Any modification to Atheros supplied amplitude maps may void certain contractual obligations
    -       previously agreed with Qualcomm Atheros.
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -SEE ALSO
    -       int6ktone(1), psgraph(7), psin(1), psout(1), pskey(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  psgraph(1)
    -
    - - - diff --git a/docbook/psgraph.c.html b/docbook/psgraph.c.html deleted file mode 100644 index b0a95c17..00000000 --- a/docbook/psgraph.c.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - psgraph.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   psgraph.c - print PIB prescaler graph;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <limits.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../plc/plc.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibscalers.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PSGRAPH_VERBOSE (1 << 0)
    -#define PSGRAPH_SILENCE (1 << 1)
    -
    -/*====================================================================*
    - *
    - *   void int6x00Prescalers (struct _file_ * pib, unsigned scale);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void int6x00Prescalers (struct _file_ * pib, unsigned scale)
    -
    -{
    -	unsigned index = 0;
    -	if (lseek (pib->file, INT_PRESCALER_OFFSET, SEEK_SET) != INT_PRESCALER_OFFSET)
    -	{
    -		error (1, errno, "Can't seek %s", pib->name);
    -	}
    -	for (index = 0; index < INT_PRESCALER_LENGTH; index++)
    -	{
    -		uint32_t value;
    -		if (read (pib->file, &value, sizeof (value)) != sizeof (value))
    -		{
    -			error (1, errno, "can't read %s", pib->name);
    -		}
    -		printf (" %6.3f %04d %6d ", INDEX_TO_FREQ (index), index, value);
    -		while (value > scale)
    -		{
    -			printf ("#");
    -			value -= scale;
    -		}
    -		printf ("\n");
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void qca7x00Prescalers (struct _file_ * pib, unsigned scale);
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void qca7x00Prescalers (struct _file_ * pib, unsigned scale)
    -{
    -	unsigned index = 0;
    -	if (lseek (pib->file, QCA_PRESCALER_OFFSET, SEEK_SET) != QCA_PRESCALER_OFFSET)
    -	{
    -		error (1, errno, FILE_CANTSEEK, pib->name);
    -	}
    -	for (index = 0; index < QCA_PRESCALER_LENGTH; index++)
    -	{
    -		byte value;
    -		if (read (pib->file, &value, sizeof (value)) != sizeof (value))
    -		{
    -			error (1, errno, "can't read %s", pib->name);
    -		}
    -		printf (" %6.3f %04d %6d ", INDEX_TO_FREQ (index), index, value);
    -		while (value > scale)
    -		{
    -			printf ("#");
    -			value -= scale;
    -		}
    -		printf ("\n");
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"s:",
    -		"file [> stdout]",
    -		"print PIB prescaler graph",
    -		"s n\tscale",
    -		(char const *) (0)
    -	};
    -	struct _file_ pib;
    -	unsigned count = 0;
    -	unsigned scale = 10;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 's':
    -			scale = (unsigned)(uintspec (optarg, 1, UCHAR_MAX));
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc > 1)
    -	{
    -		error (1, ENOTSUP, "Only one file is permitted");
    -	}
    -	if ((argc) && (* argv))
    -	{
    -		pib.name = * argv;
    -		if ((pib.file = open (pib.name, O_BINARY|O_RDONLY)) == -1)
    -		{
    -			error (1, errno, "Can't open %s", pib.name);
    -		}
    -		count = pibscalers (&pib);
    -		if (count == PLC_CARRIERS)
    -		{
    -			qca7x00Prescalers (&pib, scale);
    -		}
    -		else if (count == AMP_CARRIERS)
    -		{
    -			error (1, ENOTSUP, "AR7x00 PIB Format");
    -		}
    -		else if (count == INT_CARRIERS)
    -		{
    -			int6x00Prescalers (&pib, scale);
    -		}
    -		else
    -		{
    -			error (1, ENOTSUP, "Unknown PIB Format");
    -		}
    -		close (pib.file);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/psin.1.html b/docbook/psin.1.html deleted file mode 100644 index 853c83af..00000000 --- a/docbook/psin.1.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - psin.1 - - - - - - - - - -
    -psin(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     psin(1)
    -
    -NAME
    -       psin - Import PIB Prescalers
    -
    -SYNOPSIS
    -       psin [options] [<stdin] file
    -
    -SYNOPSIS
    -       Read  an  amplitude  map  from stdin and insert it into a nexisting PIB file, replacing the previous amplitude map.  This
    -       program permits custom amplitude maps to be loaded into a PIB file.  It can also pipe a map directly from one PIB file to
    -       another.   Atheros  can  provide  standard amplitude maps (prescalers) that conform to most national or international EMI
    -       regulations.  Generally speaking, these maps should not be modified but there are execeptions.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -CAVEATS
    -       The  Atheros  Windows  Device  Manager determines the type of prescalers stored in the PIB by inspecting the ToneMaskType
    -       code which is also stored in the PIB but is not part of the prescaler set.  If this  program  is  used  to  store  a  new
    -       prescaler  set  in  a  PIB and the ToneMaskType code is not updated to reflect the change then the Windows Device Manager
    -       will continue to display the previous prescaler type.  This will confuse Windows Device Manager users.  Use program  set‐
    -       pib to set the ToneMaskType code and program pskey to verify the true prescaler type.
    -
    -OPTIONS
    -       None.
    -
    -ARGUMENTS
    -       file   The  name  of  an  Atheros  Parameter  Information Block (PIB) file.  The original prescalers are replaced and the
    -              checksum is re-computed.  By convention, PIB files have a .pib extension but this program does  not  enforce  that
    -              convention and does not make any assumption based on filename or extension but the program will reject invalid PIB
    -              files.  Only one file may be specified on the command line.
    -
    -FILES
    -       An amplitude map consists of 1155 frequency-amplitude pairs.  Each pair consists of a decimal  index  and  a  hexadecimal
    -       scaler value.  The index represents a frequecy from 1.8 mhz through 30 mhz.  The scaler represents the amplitude attenua‐
    -       tion applied at that frequency.  The frequency and attenuation are computed as follows.
    -
    -          frequency = (index + 74) / 40.96
    -          decibels = 20 * log10 (scaler / 256)
    -
    -EXAMPLE
    -       The following example loads prescaler file abc.psc into PIB file abc.pib.  The ToneMaskType code is not updated  by  this
    -       operation  and should be updated separately to avoid confusing Windows Device Manager users.  Program setpib is one means
    -       of updating this code.
    -
    -          # psin < abc.psc abc.pib
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -       Tampering with prescaler settings may violate national or international electo-magnetic emission standards  and  lead  to
    -       fines  or  penalties.   Qualcomm  Atheros  shall  not  be  held responsible for any consequences of modifications made to
    -       prescaler sets provided to their customers.
    -
    -SEE ALSO
    -       psgraph(7), pskey(1), psout(1), setpib(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                     psin(1)
    -
    - - - diff --git a/docbook/psin.c.html b/docbook/psin.c.html deleted file mode 100644 index 6619a071..00000000 --- a/docbook/psin.c.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - psin.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   psin.c - load prescalers into int6000 parameter file;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdint.h>
    -#include <ctype.h>
    -#include <string.h>
    -#include <unistd.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/endian.h"
    -#include "../tools/getoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/chars.h"
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../key/HPAVKey.h"
    -#include "../pib/pib.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile1.c"
    -#include "../pib/piblock.c"
    -#include "../pib/pibscalers.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/keys.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *
    - *   signed ar7x00_psin (struct _file_ * pib, uint32_t value, uint32_t index);
    - *
    - *   Places a single 10 bit prescaler into the pib file at index;
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed ar7x00_psin (struct _file_ * pib, uint32_t value, uint32_t index)
    -
    -{
    -	off_t offset = AMP_PRESCALER_OFFSET + (index * 10 / 8);
    -	uint8_t bit_offset = (index * 10) % 8;
    -	uint16_t tmp;
    -	if (lseek (pib->file, offset, SEEK_SET) != offset)
    -	{
    -		return (-1);
    -	}
    -	if (read (pib->file, &tmp, sizeof (tmp)) != sizeof (tmp))
    -	{
    -		return (-1);
    -	}
    -	if (lseek (pib->file, offset, SEEK_SET) != offset)
    -	{
    -		return (-1);
    -	}
    -	value &= 0x03FF;
    -	tmp = LE16TOH (tmp);
    -	tmp &= ~(0x03FF << bit_offset);
    -	tmp |= value << bit_offset;
    -	tmp = HTOLE16 (tmp);
    -	if (write (pib->file, &tmp, sizeof (tmp)) != sizeof (tmp))
    -	{
    -		return (-1);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed psin (struct _file_ * pib);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed psin (struct _file_ * pib)
    -
    -{
    -	unsigned index = 0;
    -	unsigned count = 0;
    -	unsigned limit = pibscalers (pib);
    -	uint32_t value = 0;
    -	signed c;
    -	if ((limit != INT_CARRIERS) && (limit != AMP_CARRIERS))
    -	{
    -		error (1, 0, "Don't understand this PIB's prescaler format");
    -	}
    -	if (limit == INT_CARRIERS)
    -	{
    -		if (lseek (pib->file, INT_PRESCALER_OFFSET, SEEK_SET) != INT_PRESCALER_OFFSET)
    -		{
    -			error (1, errno, FILE_CANTSEEK, pib->name);
    -		}
    -	}
    -	while ((c = getc (stdin)) != EOF)
    -	{
    -		if (isspace (c))
    -		{
    -			continue;
    -		}
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while (nobreak (c));
    -			continue;
    -		}
    -		index = 0;
    -		while (isdigit (c))
    -		{
    -			index *= 10;
    -			index += c - '0';
    -			c = getc (stdin);
    -		}
    -		if (index != count)
    -		{
    -			error (1, ECANCELED, "Carrier %d out of order", index);
    -		}
    -		if (index >= limit)
    -		{
    -			error (1, EOVERFLOW, "Too many prescalers");
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		value = 0;
    -		while (isxdigit (c))
    -		{
    -			value *= 16;
    -			value += todigit (c);
    -			c = getc (stdin);
    -		}
    -		if (limit == INT_CARRIERS)
    -		{
    -			value = HTOLE32 (value);
    -			if (write (pib->file, &value, sizeof (value)) != sizeof (value))
    -			{
    -				error (1, errno, "Can't save %s", pib->name);
    -			}
    -		}
    -		else if (limit == AMP_CARRIERS)
    -		{
    -			if (value & ~0x03FF)
    -			{
    -				error (1, errno, "Position %d has invalid prescaler value", index);
    -			}
    -			if (ar7x00_psin (pib, value, index))
    -			{
    -				error (1, errno, "Can't update %s", pib->name);
    -			}
    -		}
    -		while (nobreak (c))
    -		{
    -			c = getc (stdin);
    -		};
    -		count++;
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv [])
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"",
    -		"pibfile [< scalers]",
    -		"load prescalers into int6000 parameter file",
    -		(char const *) (0)
    -	};
    -	struct _file_ pib;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc > 1)
    -	{
    -		error (1, ECANCELED, "Only one target file allowed");
    -	}
    -	if ((argc) && (* argv))
    -	{
    -		pib.name = * argv;
    -		if ((pib.file = open (pib.name, O_BINARY|O_RDWR)) == -1)
    -		{
    -			error (1, errno, "Can't open %s", pib.name);
    -		}
    -		else if (pibfile1 (&pib))
    -		{
    -			error (1, errno, "Bad PIB file: %s", pib.name);
    -		}
    -		else if (psin (&pib))
    -		{
    -			error (1, ECANCELED, "%s", pib.name);
    -		}
    -		else if (piblock (&pib))
    -		{
    -			error (1, ECANCELED, "%s", pib.name);
    -		}
    -		close (pib.file);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pskey.1.html b/docbook/pskey.1.html deleted file mode 100644 index 2601bce9..00000000 --- a/docbook/pskey.1.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - pskey.1 - - - - - - - - - -
    -pskey(1)                                     Qualcomm Atheros Open Powerline Toolkit                                    pskey(1)
    -
    -NAME
    -       pskey - Print prescaler key
    -
    -SYNOPSIS
    -       pskey [options] file [file] [...]  [>stdout]
    -
    -DESCRIPTION
    -       Read the prescaler section of a .pib file and print the SHA256 digest (key) on stdout.  The digest acts as a finger-print
    -       of the prescalers stored within and may be used to compare prescalers and detect changes.  Only the prescaler section  is
    -       read.  The rest of the PIB is ignored.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -q     Enable quiet mode.  This suppresses the filename after prescaler keys on output.
    -
    -       -v     Verbose mode.  This option has no effect at present.  None.
    -
    -ARGUMENTS
    -       file   The name of an Atheros Parameter Information Block (PIB) file.  This file is not  modified.   By  convention,  PIB
    -              files  have  a  .pib  extenstion  but  this program does not enforce that convention but invalid PIB files will be
    -              rejected on input.
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -EXAMPLES
    -       This example prints the SHA256 digest for the prescaler section in file v3.3.4.pib.  The digest uniquely identifies  that
    -       particular prescaler set.  PIB files with the same prescaler digest contain the same prescaler set.
    -
    -          # pskey v3.3.4.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.4.pib
    -
    -       The next example is the same as before but does not print the input filename after the key.
    -
    -          # pskey v3.3.4.pib -q
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4
    -
    -       The  next  example does the same for all .pib files in the current folder.  Observe that several files have the same fin‐
    -       gerprint and so contain identical prescaler sets.  Prescalers are designed to satisfy EMI requirements for various appli‐
    -       cations and world regions.  It is critical that the correct prescalers are used.
    -
    -          # pskey *.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 2008-06-25.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v2.0.4.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.0.1.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.0.4.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.0.5.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.0.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.3.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.4.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.1.6.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.7.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.1.8.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.1.9.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.2.0.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.0.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.1.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.2.pib
    -          980444623A8B8E76121E5014B054D9D1306C06C4D7FD7E2E158D13C9B24CFDE1 v3.3.4-1.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.4-2.pib
    -          649C3B280E20A78994D11048C6E2ABEB6BA5DBCBBE3BA2BDD3BA3C3CFF8EF7E4 v3.3.4-RC9.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.4.pib
    -
    -       The  next  example  does  the same as the previous one but sorts on the digest in order to group files by their prescaler
    -       sets.  This highlights the fact that we have four different prescaler sets in the group and two files are apparently dif‐
    -       ferent from the others.  The sort program is a Linux utility and may not be available on some systems.
    -
    -          # pskey *.pib | sort
    -          649C3B280E20A78994D11048C6E2ABEB6BA5DBCBBE3BA2BDD3BA3C3CFF8EF7E4 v3.3.4-RC9.pib
    -          980444623A8B8E76121E5014B054D9D1306C06C4D7FD7E2E158D13C9B24CFDE1 v3.3.4-1.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.0.4.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.0.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.3.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.4.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.1.7.pib
    -          9D6F711B81BEAE3DE9182ECC264C47DDD187264A2B89A162C54F3C1FDD5CE240 v3.2.0.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 2008-06-25.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v2.0.4.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.0.1.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.0.5.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.1.6.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.1.8.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.1.9.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.0.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.1.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.2.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.4-2.pib
    -          AF26B02BB5044BE70986A5C2F5705671213D63A7827928C240D131E940EF4FC4 v3.3.4.pib
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -SEE ALSO
    -       psgraph(7), psin(1), psout(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                    pskey(1)
    -
    - - - diff --git a/docbook/pskey.c.html b/docbook/pskey.c.html deleted file mode 100644 index f7565bd4..00000000 --- a/docbook/pskey.c.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - pskey.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   pskey.c - print prescaler key
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <string.h>
    -#include <unistd.h>
    -#include <errno.h>
    -#include <sys/stat.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../tools/flags.h"
    -#include "../key/HPAVKey.h"
    -#include "../key/SHA256.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/hexout.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile1.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/SHA256Reset.c"
    -#include "../key/SHA256Write.c"
    -#include "../key/SHA256Block.c"
    -#include "../key/SHA256Fetch.c"
    -#include "../key/keys.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PSKEY_VERBOSE (1 << 0)
    -#define PSKEY_SILENCE (1 << 1)
    -
    -/*====================================================================*
    - *
    - *   static signed pskey (struct _file_ * pib);
    - *
    - *   compute the SHA256 digest of the PIB file prescalers and print
    - *   the key with optional filename on stdout; the digest acts like
    - *   a fingerprint;
    - *
    - *   assume that offset and extent are for ar7400 and change to 6400
    - *   offset and extent when the PIB requires it;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pskey (struct _file_ * pib, off_t offset, void * memory, ssize_t extent, flag_t flags)
    -
    -{
    -	struct sha256 sha256;
    -	byte digest [SHA256_DIGEST_LENGTH];
    -	struct pib_header pib_header;
    -	if (read (pib->file, &pib_header, sizeof (pib_header)) != sizeof (pib_header))
    -	{
    -		return (-1);
    -	}
    -	if (pib_header.FWVERSION < 0x05)
    -	{
    -		offset = INT_PRESCALER_OFFSET;
    -		extent = INT_PRESCALER_LENGTH;
    -	}
    -	if (lseek (pib->file, offset, SEEK_SET) != offset)
    -	{
    -		error (0, errno, FILE_CANTSEEK, pib->name);
    -		return (-1);
    -	}
    -	if (read (pib->file, memory, extent) != extent)
    -	{
    -		error (0, errno, FILE_CANTREAD, pib->name);
    -		return (-1);
    -	}
    -	SHA256Reset (&sha256);
    -	SHA256Write (&sha256, memory, extent);
    -	SHA256Fetch (&sha256, digest);
    -	hexout (digest, sizeof (digest), '\0', 0, stdout);
    -	if (_allclr (flags, PSKEY_SILENCE))
    -	{
    -		printf (" %s", pib->name);
    -	}
    -	printf ("\n");
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv [])
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"lqrsv",
    -		"file [file] [...]",
    -		"print prescaler finger-print on stdout",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	struct _file_ pib;
    -	uint8_t buffer [INT_PRESCALER_LENGTH];
    -	signed state = 0;
    -	flag_t flags = (flag_t) (0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'q':
    -			_setbits (flags, PSKEY_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PSKEY_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argc) && (* argv))
    -	{
    -		pib.name = * argv;
    -		if ((pib.file = open (pib.name, O_BINARY|O_RDONLY)) == -1)
    -		{
    -			error (0, errno, "Can't open: %s", pib.name);
    -			state = 1;
    -			errno = 0;
    -		}
    -		else if (pibfile1 (&pib))
    -		{
    -			error (0, errno, "Bad PIB: %s", pib.name);
    -			state = 1;
    -		}
    -		else if (pskey (&pib, INT_PRESCALER_OFFSET, buffer, sizeof (buffer), flags))
    -		{
    -			state = 1;
    -		}
    -		close (pib.file);
    -		argc--;
    -		argv++;
    -	}
    -	return (state);
    -}
    -
    -
    -
    - - - diff --git a/docbook/psnotch.1.html b/docbook/psnotch.1.html deleted file mode 100644 index adae6099..00000000 --- a/docbook/psnotch.1.html +++ /dev/null @@ -1,2438 +0,0 @@ - - - - - - psnotch.1 - - - - - - - - - -
    -psnotch(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  psnotch(1)
    -
    -NAME
    -       psnotch - Qualcomm Atheros PIB Notch Utility
    -
    -SYNOPSIS
    -       psnotch [options] [<stdin] [>stdout]
    -
    -SYNOPSIS
    -       Read  an  amplitude map from stdin and print a notched version on stdout.  Notches are computed based on an optional tone
    -       map and are applied only to a specified range of carriers.  An optional histogram may be printed on stderr  to  visualize
    -       tone map characteristics.
    -
    -       This  program determines which prescalers to notch by inspecting a tonemap for radical changes.  Changes are computed and
    -       appear as parabolic dips in amplitude that tend to exaggerate the center point.  This  program  notches  prescalers  that
    -       correspond  to  tonemap low points.  The notch width, in terms of carriers, will depend on the threshold set by the user.
    -       See int6ktone for an explanation and example of how tonemaps can be used to detect powerline noise.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -c     Display comma delimited output on stderr showing only carriers in the range specified or implied by options -L and
    -              -U.  The histogram shows the carrier, amplitude mask, tonemap slot values and carrier frequency.  Data columns are
    -              seperated by commas instead of spaces.  This option excludes option -v.
    -
    -       -f tonemap
    -              The  name  of  a  tone map file created using program int6ktone.  The tone map reflects dynamic, real-time carrier
    -              information read from a device and may be obsolete before it can be applied.  If the tone map file is omitted then
    -              no amplitude map notching will occur and the histogram will not illustrate any signal activity.
    -
    -       -l carrier
    -              The  lowest  carrier  to  be notched.  No carriers below this one will be notched.  This option and option -u must
    -              both be specified for notching to occur.  The minimum is 0 and the maximum is 1154.  The default is 1154 to  avoid
    -              accidental notching.  Use program psgraph to determine amplitude map offsets for carriers of interest.
    -
    -       -L carrier
    -              The  lowest  carrier  displayed  when option -v is present.  Generally speaking, this carrier should be lower than
    -              that specified or implied by option -l to provide some context.  The minimum is 0 and the maximum  is  1154.   The
    -              default is 0.
    -
    -       -u carrier
    -              The  highest  carrier  to be notched.  No carriers above this one will be notched.  This option and option -l must
    -              both be specified for notching to occur.  The minimum is 0 and the maximum is 1154.  The default  is  0  to  avoid
    -              accidental notching.  Use program psgraph to determine amplitude map offsets for carriers of interest.
    -
    -       -U carrier
    -              The  highest  carrier displayed when option -v is present.  Generally speaking, this carrier should be higher than
    -              that specified using option -u to provide some context.  The minimum is 0 and the maximum is 1154.  The default is
    -              1154.
    -
    -       -t threshold
    -              The  notching threshold expressed as an integer in the range 0 through 49.  A value of 0 will notch scalers in the
    -              specified carrier range.  A value in the range 1 through 5 is reasonable.  A value greater than 5 may result in no
    -              notching at all.  See the man page for program int6ktone for an explanation and illustration of threshold values.
    -
    -       -v     Verbose  mode.  Display a histogram on stderr showing carriers in the range specified or implied by options -L and
    -              -U.  The histogram shows the carrier, amplitude mask, tonemap slot values and carrier frequency.  Data columns are
    -              separated by specases instead of commas.  This option excludes option -c.
    -
    -ARGUMENTS
    -       stdin  The  unotched  amplitude map file.  This amplitude map should conform to EMI regulations for the region or country
    -              where the powerline device will operate.  A range of approved amplitude maps is available from  Qualcomm  Atheros.
    -              Use  program psout to extract the amplitude map from an existing PIB file or program psgraph to display the ampli‐
    -              tude map in an existing PIB file.
    -
    -       stdout The notched amplitude map file.  If no tone map file is specified on the command line then no notches are computed
    -              or applied.  Otherwise, the selected carriers may be suppressed based on time slot modulation information from the
    -              tone map.  Use program psin to insert an amplitude map into an existing PIB file.
    -
    -EXAMPLES
    -       The following example reads unotched amplitude map unotched.psc and creates a notched amplitude  map  notched.psc.   File
    -       tone.map  determines  if and wehre notching may be required; however, only carriers from offset 57 through 66 are notched
    -       if their mean-square values are less than 3.  No other carriers will be notched.  See the man page for program  int6ktone
    -       for an illustration of threshold values.
    -
    -          # psnotch < unotched.psc > notched.psc -f tone.map -l 57 -u 66 -t 3
    -
    -       The  next example does the same thing but also displays a histogram on stderr.  It show, in order from left to right, the
    -       carrier, prescaler amplitude mask, the five or six tonemap slot values, the carrier frequency and a bar representing  the
    -       mean square of the slot values.  To save this output, redirect stderr to a file using "2> temp.txt".
    -
    -          # psnotch < unotched.psc > notched.psc -f tone.map -v
    -          0000 0000 00 00 00 00 00 00  1.807
    -          0001 0000 00 00 00 00 00 00  1.831
    -          0002 0000 00 00 00 00 00 00  1.855
    -          0003 0000 00 00 00 00 00 00  1.880
    -          0004 0000 00 00 00 00 00 00  1.904
    -          0005 0000 00 00 00 00 00 00  1.929
    -          0006 0000 00 00 00 00 00 00  1.953
    -          0007 0000 00 00 00 00 00 00  1.978
    -          0008 0000 00 00 00 00 00 00  2.002
    -          0009 0000 00 00 00 00 00 00  2.026
    -          0010 0000 00 00 00 00 00 00  2.051
    -          0011 0000 00 00 00 00 00 00  2.075
    -          0012 0070 07 07 07 07 07 07  2.100 #################################################
    -          0013 006F 07 07 07 07 07 07  2.124 #################################################
    -          0014 006F 07 07 07 07 07 07  2.148 #################################################
    -          0015 006F 07 07 07 07 07 07  2.173 #################################################
    -          0016 006F 07 07 07 07 07 07  2.197 #################################################
    -          0017 006F 07 07 07 07 07 07  2.222 #################################################
    -          0018 006F 07 07 07 07 07 07  2.246 #################################################
    -          0019 006F 07 07 07 07 07 07  2.271 #################################################
    -          0020 006F 07 07 07 07 07 07  2.295 #################################################
    -          0021 006F 07 07 07 07 07 07  2.319 #################################################
    -          0022 006F 07 07 07 07 07 07  2.344 #################################################
    -          0023 006F 07 07 07 07 07 07  2.368 #################################################
    -          0024 006F 07 07 07 07 07 07  2.393 #################################################
    -          0025 006F 07 07 07 07 07 07  2.417 #################################################
    -          0026 006F 07 07 07 07 07 07  2.441 #################################################
    -          0027 006F 07 07 07 07 07 07  2.466 #################################################
    -          0028 0070 07 07 07 07 07 07  2.490 #################################################
    -          0029 0070 07 07 07 07 07 07  2.515 #################################################
    -          0030 0070 07 07 07 07 07 07  2.539 #################################################
    -          0031 0070 07 07 07 07 07 07  2.563 #################################################
    -          0032 0070 07 07 07 07 07 07  2.588 #################################################
    -          0033 0071 07 07 07 07 07 07  2.612 #################################################
    -          0034 0071 07 07 07 07 07 07  2.637 #################################################
    -          0035 0071 07 07 07 07 07 07  2.661 #################################################
    -          0036 0071 07 07 07 07 07 07  2.686 #################################################
    -          0037 0072 07 07 07 07 07 07  2.710 #################################################
    -          0038 0072 07 07 07 07 07 07  2.734 #################################################
    -          0039 0073 07 07 07 07 07 07  2.759 #################################################
    -          0040 0073 07 07 07 07 07 07  2.783 #################################################
    -          0041 0073 07 07 07 07 07 07  2.808 #################################################
    -          0042 0074 07 07 07 07 07 07  2.832 #################################################
    -          0043 0074 07 07 07 07 07 07  2.856 #################################################
    -          0044 0074 07 07 07 07 07 07  2.881 #################################################
    -          0045 0075 07 07 07 07 07 07  2.905 #################################################
    -          0046 0075 07 07 07 07 07 07  2.930 #################################################
    -          0047 0076 07 07 07 07 07 07  2.954 #################################################
    -          0048 0076 07 07 07 07 07 07  2.979 #################################################
    -          0049 0076 07 07 07 07 07 07  3.003 #################################################
    -          0050 0077 07 07 07 07 07 07  3.027 #################################################
    -          0051 0077 07 07 07 07 07 07  3.052 #################################################
    -          0052 0077 07 07 07 07 07 07  3.076 #################################################
    -          0053 0078 07 07 07 07 07 07  3.101 #################################################
    -          0054 0078 07 07 07 07 07 07  3.125 #################################################
    -          0055 0078 07 07 07 07 07 07  3.149 #################################################
    -          0056 0078 07 07 07 07 07 07  3.174 #################################################
    -          0057 0079 07 07 07 07 07 07  3.198 #################################################
    -          0058 0079 07 07 07 07 07 07  3.223 #################################################
    -          0059 0079 07 07 07 07 07 07  3.247 #################################################
    -          0060 0079 07 07 07 07 07 07  3.271 #################################################
    -          0061 0079 07 07 07 07 07 07  3.296 #################################################
    -          0062 0079 07 07 07 07 07 07  3.320 #################################################
    -          0063 007A 07 07 07 07 07 07  3.345 #################################################
    -          0064 007A 07 07 07 07 07 07  3.369 #################################################
    -          0065 007A 07 07 07 07 07 07  3.394 #################################################
    -          0066 0000 00 00 00 00 00 00  3.418
    -          0067 0000 00 00 00 00 00 00  3.442
    -          0068 0000 00 00 00 00 00 00  3.467
    -          0069 0000 00 00 00 00 00 00  3.491
    -          0070 0000 00 00 00 00 00 00  3.516
    -          0071 0000 00 00 00 00 00 00  3.540
    -          0072 0000 00 00 00 00 00 00  3.564
    -          0073 0000 00 00 00 00 00 00  3.589
    -          0074 0000 00 00 00 00 00 00  3.613
    -          0075 0000 00 00 00 00 00 00  3.638
    -          0076 0000 00 00 00 00 00 00  3.662
    -          0077 0000 00 00 00 00 00 00  3.687
    -          0078 0000 00 00 00 00 00 00  3.711
    -          0079 0000 00 00 00 00 00 00  3.735
    -          0080 0000 00 00 00 00 00 00  3.760
    -          0081 0000 00 00 00 00 00 00  3.784
    -          0082 0000 00 00 00 00 00 00  3.809
    -          0083 0000 00 00 00 00 00 00  3.833
    -          0084 0000 00 00 00 00 00 00  3.857
    -          0085 0000 00 00 00 00 00 00  3.882
    -          0086 0000 00 00 00 00 00 00  3.906
    -          0087 0000 00 00 00 00 00 00  3.931
    -          0088 0000 00 00 00 00 00 00  3.955
    -          0089 0000 00 00 00 00 00 00  3.979
    -          0090 0000 00 00 00 00 00 00  4.004
    -          0091 0000 00 00 00 00 00 00  4.028
    -          0092 0000 00 00 00 00 00 00  4.053
    -          0093 0000 00 00 00 00 00 00  4.077
    -          0094 007D 07 07 07 07 07 07  4.102 #################################################
    -          0095 007E 07 07 07 07 07 07  4.126 #################################################
    -          0096 007E 07 07 07 07 07 07  4.150 #################################################
    -          0097 007E 07 07 07 07 07 07  4.175 #################################################
    -          0098 007E 07 07 07 07 07 07  4.199 #################################################
    -          0099 007E 07 07 07 07 07 07  4.224 #################################################
    -          0100 007E 07 07 07 07 07 07  4.248 #################################################
    -          0101 007E 07 07 07 07 07 07  4.272 #################################################
    -          0102 007E 07 07 07 07 07 07  4.297 #################################################
    -          0103 007F 07 07 07 07 07 07  4.321 #################################################
    -          0104 007F 07 07 07 07 07 07  4.346 #################################################
    -          0105 007F 07 07 07 07 07 07  4.370 #################################################
    -          0106 007F 07 07 07 07 07 07  4.395 #################################################
    -          0107 007F 07 07 07 07 07 07  4.419 #################################################
    -          0108 007F 07 07 07 07 07 07  4.443 #################################################
    -          0109 007F 07 07 07 07 07 07  4.468 #################################################
    -          0110 0080 07 07 07 07 07 07  4.492 #################################################
    -          0111 0080 07 07 07 07 07 07  4.517 #################################################
    -          0112 0080 07 07 07 07 07 07  4.541 #################################################
    -          0113 0080 07 07 07 07 07 07  4.565 #################################################
    -          0114 0080 07 07 07 07 07 07  4.590 #################################################
    -          0115 0080 07 07 07 07 07 07  4.614 #################################################
    -          0116 0080 07 07 07 07 07 07  4.639 #################################################
    -          0117 0080 07 07 07 07 07 07  4.663 #################################################
    -          0118 0081 07 07 07 07 07 07  4.688 #################################################
    -          0119 0081 07 07 07 07 07 07  4.712 #################################################
    -          0120 0081 07 07 07 07 07 07  4.736 #################################################
    -          0121 0081 07 07 07 07 07 07  4.761 #################################################
    -          0122 0081 07 07 07 07 07 07  4.785 #################################################
    -          0123 0081 07 07 07 07 07 07  4.810 #################################################
    -          0124 0081 07 07 07 07 07 07  4.834 #################################################
    -          0125 0082 07 07 07 07 07 07  4.858 #################################################
    -          0126 0082 07 07 07 07 07 07  4.883 #################################################
    -          0127 0082 06 06 06 06 06 06  4.907 ####################################
    -          0128 0082 05 05 05 05 05 05  4.932 #########################
    -          0129 0082 05 05 05 05 05 05  4.956 #########################
    -          0130 0082 04 04 04 04 04 04  4.980 ################
    -          0131 0082 04 04 04 04 04 04  5.005 ################
    -          0132 0082 05 05 05 05 05 05  5.029 #########################
    -          0133 0083 05 05 05 05 05 05  5.054 #########################
    -          0134 0083 06 06 06 06 06 06  5.078 ####################################
    -          0135 0083 07 07 07 07 07 07  5.103 #################################################
    -          0136 0083 07 07 07 07 07 07  5.127 #################################################
    -          0137 0083 07 07 07 07 07 07  5.151 #################################################
    -          0138 0083 07 07 07 07 07 07  5.176 #################################################
    -          0139 0083 07 07 07 07 07 07  5.200 #################################################
    -          0140 0094 07 07 07 07 07 07  5.225 #################################################
    -          0141 0000 00 00 00 00 00 00  5.249
    -          0142 0000 00 00 00 00 00 00  5.273
    -          0143 0000 00 00 00 00 00 00  5.298
    -          0144 0000 00 00 00 00 00 00  5.322
    -          0145 0000 00 00 00 00 00 00  5.347
    -          0146 0000 00 00 00 00 00 00  5.371
    -          0147 0000 00 00 00 00 00 00  5.396
    -          0148 0000 00 00 00 00 00 00  5.420
    -          0149 0000 00 00 00 00 00 00  5.444
    -          0150 0000 00 00 00 00 00 00  5.469
    -          0151 0000 00 00 00 00 00 00  5.493
    -          0152 0095 07 07 07 07 07 07  5.518 #################################################
    -          0153 0096 07 07 07 07 07 07  5.542 #################################################
    -          0154 0096 07 07 07 07 07 07  5.566 #################################################
    -          0155 0096 07 07 07 07 07 07  5.591 #################################################
    -          0156 0096 07 07 07 07 07 07  5.615 #################################################
    -          0157 0096 07 07 07 07 07 07  5.640 #################################################
    -          0158 0097 07 07 07 07 07 07  5.664 #################################################
    -          0159 0097 07 07 07 07 07 07  5.688 #################################################
    -          0160 0097 07 07 07 07 07 07  5.713 #################################################
    -          0161 0097 07 07 07 07 07 07  5.737 #################################################
    -          0162 0098 07 07 07 07 07 07  5.762 #################################################
    -          0163 0098 07 07 07 07 07 07  5.786 #################################################
    -          0164 0098 07 07 07 07 07 07  5.811 #################################################
    -          0165 0098 07 07 07 07 07 07  5.835 #################################################
    -          0166 0099 07 07 07 07 07 07  5.859 #################################################
    -          0167 0099 07 07 07 07 07 07  5.884 #################################################
    -          0168 0099 07 07 07 07 07 07  5.908 #################################################
    -          0169 009A 07 07 07 07 07 07  5.933 #################################################
    -          0170 009A 07 07 07 07 07 07  5.957 #################################################
    -          0171 009A 07 07 07 07 07 07  5.981 #################################################
    -          0172 009A 07 07 07 07 07 07  6.006 #################################################
    -          0173 009B 07 07 07 07 07 07  6.030 #################################################
    -          0174 009B 07 07 07 07 07 07  6.055 #################################################
    -          0175 009B 07 07 07 07 07 07  6.079 #################################################
    -          0176 009C 07 07 07 07 07 07  6.104 #################################################
    -          0177 009C 07 07 07 07 07 07  6.128 #################################################
    -          0178 009C 07 07 07 07 07 07  6.152 #################################################
    -          0179 009C 07 07 07 07 07 07  6.177 #################################################
    -          0180 009D 07 07 07 07 07 07  6.201 #################################################
    -          0181 009D 07 07 07 07 07 07  6.226 #################################################
    -          0182 009D 07 07 07 07 07 07  6.250 #################################################
    -          0183 009E 07 07 07 07 07 07  6.274 #################################################
    -          0184 009E 07 07 07 07 07 07  6.299 #################################################
    -          0185 009E 07 07 07 07 07 07  6.323 #################################################
    -          0186 009E 07 07 07 07 07 07  6.348 #################################################
    -          0187 009F 07 07 07 07 07 07  6.372 #################################################
    -          0188 009F 07 07 07 07 07 07  6.396 #################################################
    -          0189 009F 07 07 07 07 07 07  6.421 #################################################
    -          0190 009F 07 07 07 07 07 07  6.445 #################################################
    -          0191 00A0 07 07 07 07 07 07  6.470 #################################################
    -          0192 00A0 07 07 07 07 07 07  6.494 #################################################
    -          0193 00A0 07 07 07 07 07 07  6.519 #################################################
    -          0194 00A0 07 07 07 07 07 07  6.543 #################################################
    -          0195 00A1 07 07 07 07 07 07  6.567 #################################################
    -          0196 00A1 07 07 07 07 07 07  6.592 #################################################
    -          0197 00A1 07 07 07 07 07 07  6.616 #################################################
    -          0198 00A1 07 07 07 07 07 07  6.641 #################################################
    -          0199 00A2 07 07 07 07 07 07  6.665 #################################################
    -          0200 00A2 07 07 07 07 07 07  6.689 #################################################
    -          0201 00A2 07 07 07 07 07 07  6.714 #################################################
    -          0202 00A2 07 07 07 07 07 07  6.738 #################################################
    -          0203 00A2 07 07 07 07 07 07  6.763 #################################################
    -          0204 00A3 07 07 07 07 07 07  6.787 #################################################
    -          0205 00A3 07 07 07 07 07 07  6.812 #################################################
    -          0206 00A3 07 07 07 07 07 07  6.836 #################################################
    -          0207 00A3 07 07 07 07 07 07  6.860 #################################################
    -          0208 00A4 07 07 07 07 07 07  6.885 #################################################
    -          0209 0000 00 00 00 00 00 00  6.909
    -          0210 0000 00 00 00 00 00 00  6.934
    -          0211 0000 00 00 00 00 00 00  6.958
    -          0212 0000 00 00 00 00 00 00  6.982
    -          0213 0000 00 00 00 00 00 00  7.007
    -          0214 0000 00 00 00 00 00 00  7.031
    -          0215 0000 00 00 00 00 00 00  7.056
    -          0216 0000 00 00 00 00 00 00  7.080
    -          0217 0000 00 00 00 00 00 00  7.104
    -          0218 0000 00 00 00 00 00 00  7.129
    -          0219 0000 00 00 00 00 00 00  7.153
    -          0220 0000 00 00 00 00 00 00  7.178
    -          0221 0000 00 00 00 00 00 00  7.202
    -          0222 0000 00 00 00 00 00 00  7.227
    -          0223 0000 00 00 00 00 00 00  7.251
    -          0224 0000 00 00 00 00 00 00  7.275
    -          0225 0000 00 00 00 00 00 00  7.300
    -          0226 0000 00 00 00 00 00 00  7.324
    -          0227 0000 00 00 00 00 00 00  7.349
    -          0228 0000 00 00 00 00 00 00  7.373
    -          0229 00A8 07 07 07 07 07 07  7.397 #################################################
    -          0230 00A9 07 07 07 07 07 07  7.422 #################################################
    -          0231 00A9 07 07 07 07 07 07  7.446 #################################################
    -          0232 00A9 07 07 07 07 07 07  7.471 #################################################
    -          0233 00A9 07 07 07 07 07 07  7.495 #################################################
    -          0234 00AA 07 07 07 07 07 07  7.520 #################################################
    -          0235 00AA 07 07 07 07 07 07  7.544 #################################################
    -          0236 00AA 07 07 07 07 07 07  7.568 #################################################
    -          0237 00AA 07 07 07 07 07 07  7.593 #################################################
    -          0238 00AB 07 07 07 07 07 07  7.617 #################################################
    -          0239 00AB 07 07 07 07 07 07  7.642 #################################################
    -          0240 00AB 07 07 07 07 07 07  7.666 #################################################
    -          0241 00AB 07 07 07 07 07 07  7.690 #################################################
    -          0242 00AC 07 07 07 07 07 07  7.715 #################################################
    -          0243 00AC 07 07 07 07 07 07  7.739 #################################################
    -          0244 00AC 07 07 07 07 07 07  7.764 #################################################
    -          0245 00AC 07 07 07 07 07 07  7.788 #################################################
    -          0246 00AD 07 07 07 07 07 07  7.812 #################################################
    -          0247 00AD 07 07 07 07 07 07  7.837 #################################################
    -          0248 00AD 07 07 07 07 07 07  7.861 #################################################
    -          0249 00AD 07 07 07 07 07 07  7.886 #################################################
    -          0250 00AE 07 07 07 07 07 07  7.910 #################################################
    -          0251 00AE 07 07 07 07 07 07  7.935 #################################################
    -          0252 00AE 07 07 07 07 07 07  7.959 #################################################
    -          0253 00AE 07 07 07 07 07 07  7.983 #################################################
    -          0254 00AE 07 07 07 07 07 07  8.008 #################################################
    -          0255 00AF 07 07 07 07 07 07  8.032 #################################################
    -          0256 00AF 07 07 07 07 07 07  8.057 #################################################
    -          0257 00AF 07 07 07 07 07 07  8.081 #################################################
    -          0258 00AF 07 07 07 07 07 07  8.105 #################################################
    -          0259 00AF 07 07 07 07 07 07  8.130 #################################################
    -          0260 00B0 07 07 07 07 07 07  8.154 #################################################
    -          0261 00B0 07 07 07 07 07 07  8.179 #################################################
    -          0262 00B0 07 07 07 07 07 07  8.203 #################################################
    -          0263 00B0 07 07 07 07 07 07  8.228 #################################################
    -          0264 00B0 07 07 07 07 07 07  8.252 #################################################
    -          0265 00B1 07 07 07 07 07 07  8.276 #################################################
    -          0266 00B1 07 07 07 07 07 07  8.301 #################################################
    -          0267 00B1 07 07 07 07 07 07  8.325 #################################################
    -          0268 00B1 07 07 07 07 07 07  8.350 #################################################
    -          0269 00B1 07 07 07 07 07 07  8.374 #################################################
    -          0270 00B1 07 07 07 07 07 07  8.398 #################################################
    -          0271 00B2 07 07 07 07 07 07  8.423 #################################################
    -          0272 00B2 07 07 07 07 07 07  8.447 #################################################
    -          0273 00B2 07 07 07 07 07 07  8.472 #################################################
    -          0274 00B2 07 07 07 07 07 07  8.496 #################################################
    -          0275 00B2 07 07 07 07 07 07  8.521 #################################################
    -          0276 00B3 07 07 07 07 07 07  8.545 #################################################
    -          0277 00B3 07 07 07 07 07 07  8.569 #################################################
    -          0278 00B3 07 07 07 07 07 07  8.594 #################################################
    -          0279 00B3 07 07 07 07 07 07  8.618 #################################################
    -          0280 00B3 07 07 07 07 07 07  8.643 #################################################
    -          0281 00B3 07 07 07 07 07 07  8.667 #################################################
    -          0282 00B4 07 07 07 07 07 07  8.691 #################################################
    -          0283 00B4 07 07 07 07 07 07  8.716 #################################################
    -          0284 00B4 07 07 07 07 07 07  8.740 #################################################
    -          0285 00B4 07 07 07 07 07 07  8.765 #################################################
    -          0286 00B4 07 07 07 07 07 07  8.789 #################################################
    -          0287 00B5 07 07 07 07 07 07  8.813 #################################################
    -          0288 00B5 07 07 07 07 07 07  8.838 #################################################
    -          0289 00B5 07 07 07 07 07 07  8.862 #################################################
    -          0290 00B5 07 07 07 07 07 07  8.887 #################################################
    -          0291 00B5 07 07 07 07 07 07  8.911 #################################################
    -          0292 00B6 07 07 07 07 07 07  8.936 #################################################
    -          0293 00B6 07 07 07 07 07 07  8.960 #################################################
    -          0294 00B6 07 07 07 07 07 07  8.984 #################################################
    -          0295 00B6 07 07 07 07 07 07  9.009 #################################################
    -          0296 00B6 07 07 07 07 07 07  9.033 #################################################
    -          0297 00B7 07 07 07 07 07 07  9.058 #################################################
    -          0298 00B7 07 07 07 07 07 07  9.082 #################################################
    -          0299 00B7 07 07 07 07 07 07  9.106 #################################################
    -          0300 00B7 07 07 07 07 07 07  9.131 #################################################
    -          0301 00B7 07 07 07 07 07 07  9.155 #################################################
    -          0302 00B8 07 07 07 07 07 07  9.180 #################################################
    -          0303 00B8 07 07 07 07 07 07  9.204 #################################################
    -          0304 00B8 07 07 07 07 07 07  9.229 #################################################
    -          0305 00B8 07 07 07 07 07 07  9.253 #################################################
    -          0306 00B8 07 07 07 07 07 07  9.277 #################################################
    -          0307 00B9 07 07 07 07 07 07  9.302 #################################################
    -          0308 00B9 07 07 07 07 07 07  9.326 #################################################
    -          0309 00B9 07 07 07 07 07 07  9.351 #################################################
    -          0310 00B9 07 07 07 07 07 07  9.375 #################################################
    -          0311 00B9 07 07 07 07 07 07  9.399 #################################################
    -          0312 00BA 07 07 07 07 07 07  9.424 #################################################
    -          0313 00BA 07 07 07 07 07 07  9.448 #################################################
    -          0314 00BA 07 07 07 07 07 07  9.473 #################################################
    -          0315 00BA 07 07 07 07 07 07  9.497 #################################################
    -          0316 00BA 07 07 07 07 07 07  9.521 #################################################
    -          0317 00BA 07 07 07 07 07 07  9.546 #################################################
    -          0318 00BB 07 07 07 07 07 07  9.570 #################################################
    -          0319 00BB 07 07 07 07 07 07  9.595 #################################################
    -          0320 00BB 07 07 07 07 07 07  9.619 #################################################
    -          0321 00BB 07 07 07 07 07 07  9.644 #################################################
    -          0322 00BB 07 07 07 07 07 07  9.668 #################################################
    -          0323 00BB 07 07 07 07 07 07  9.692 #################################################
    -          0324 00BC 07 07 07 07 07 07  9.717 #################################################
    -          0325 00BC 07 07 07 07 07 07  9.741 #################################################
    -          0326 00BC 07 07 07 07 07 07  9.766 #################################################
    -          0327 00BC 07 07 07 07 07 07  9.790 #################################################
    -          0328 00BC 07 07 07 07 07 07  9.814 #################################################
    -          0329 00BC 07 07 07 07 07 07  9.839 #################################################
    -          0330 00BC 07 07 07 07 07 07  9.863 #################################################
    -          0331 00BD 07 07 07 07 07 07  9.888 #################################################
    -          0332 00BD 07 07 07 07 07 07  9.912 #################################################
    -          0333 00BD 07 07 07 07 07 07  9.937 #################################################
    -          0334 00BD 07 07 07 07 07 07  9.961 #################################################
    -          0335 00BD 07 07 07 07 07 07  9.985 #################################################
    -          0336 0000 00 00 00 00 00 00 10.010
    -          0337 0000 00 00 00 00 00 00 10.034
    -          0338 0000 00 00 00 00 00 00 10.059
    -          0339 0000 00 00 00 00 00 00 10.083
    -          0340 0000 00 00 00 00 00 00 10.107
    -          0341 0000 00 00 00 00 00 00 10.132
    -          0342 0000 00 00 00 00 00 00 10.156
    -          0343 0000 00 00 00 00 00 00 10.181
    -          0344 0000 00 00 00 00 00 00 10.205
    -          0345 0000 00 00 00 00 00 00 10.229
    -          0346 00AA 07 07 07 07 07 07 10.254 #################################################
    -          0347 00AA 07 07 07 07 07 07 10.278 #################################################
    -          0348 00AA 07 07 07 07 07 07 10.303 #################################################
    -          0349 00AA 07 07 07 07 07 07 10.327 #################################################
    -          0350 00AA 07 07 07 07 07 07 10.352 #################################################
    -          0351 00AA 07 07 07 07 07 07 10.376 #################################################
    -          0352 00AA 07 07 07 07 07 07 10.400 #################################################
    -          0353 00AA 07 07 07 07 07 07 10.425 #################################################
    -          0354 00AB 07 07 07 07 07 07 10.449 #################################################
    -          0355 00AB 07 07 07 07 07 07 10.474 #################################################
    -          0356 00AB 07 07 07 07 07 07 10.498 #################################################
    -          0357 00AB 07 07 07 07 07 07 10.522 #################################################
    -          0358 00AB 07 07 07 07 07 07 10.547 #################################################
    -          0359 00AB 07 07 07 07 07 07 10.571 #################################################
    -          0360 00AB 07 07 07 07 07 07 10.596 #################################################
    -          0361 00AB 07 07 07 07 07 07 10.620 #################################################
    -          0362 00AB 07 07 07 07 07 07 10.645 #################################################
    -          0363 00AB 07 07 07 07 07 07 10.669 #################################################
    -          0364 00AB 07 07 07 07 07 07 10.693 #################################################
    -          0365 00AB 07 07 07 07 07 07 10.718 #################################################
    -          0366 00AB 07 07 07 07 07 07 10.742 #################################################
    -          0367 00AB 07 07 07 07 07 07 10.767 #################################################
    -          0368 00AB 07 07 07 07 07 07 10.791 #################################################
    -          0369 00AB 07 07 07 07 07 07 10.815 #################################################
    -          0370 00AB 07 07 07 07 07 07 10.840 #################################################
    -          0371 00AC 07 07 07 07 07 07 10.864 #################################################
    -          0372 00AC 07 07 07 07 07 07 10.889 #################################################
    -          0373 00AC 07 07 07 07 07 07 10.913 #################################################
    -          0374 00AC 07 07 07 07 07 07 10.938 #################################################
    -          0375 00AC 07 07 07 07 07 07 10.962 #################################################
    -          0376 00AC 07 07 07 07 07 07 10.986 #################################################
    -          0377 00AC 07 07 07 07 07 07 11.011 #################################################
    -          0378 00AC 07 07 07 07 07 07 11.035 #################################################
    -          0379 00AC 07 07 07 07 07 07 11.060 #################################################
    -          0380 00AC 07 07 07 07 07 07 11.084 #################################################
    -          0381 00AC 07 07 07 07 07 07 11.108 #################################################
    -          0382 00AC 07 07 07 07 07 07 11.133 #################################################
    -          0383 00AC 07 07 07 07 07 07 11.157 #################################################
    -          0384 00AC 07 07 07 07 07 07 11.182 #################################################
    -          0385 00AC 07 07 07 07 07 07 11.206 #################################################
    -          0386 00AC 07 07 07 07 07 07 11.230 #################################################
    -          0387 00AD 07 07 07 07 07 07 11.255 #################################################
    -          0388 00AD 07 07 07 07 07 07 11.279 #################################################
    -          0389 00AD 07 07 07 07 07 07 11.304 #################################################
    -          0390 00AD 07 07 07 07 07 07 11.328 #################################################
    -          0391 00AD 07 07 07 07 07 07 11.353 #################################################
    -          0392 00AD 07 07 07 07 07 07 11.377 #################################################
    -          0393 00AD 07 07 07 07 07 07 11.401 #################################################
    -          0394 00AE 07 07 07 07 07 07 11.426 #################################################
    -          0395 00AE 07 07 07 07 07 07 11.450 #################################################
    -          0396 00AE 07 07 07 07 07 07 11.475 #################################################
    -          0397 00AE 07 07 07 07 07 07 11.499 #################################################
    -          0398 00AE 07 07 07 07 07 07 11.523 #################################################
    -          0399 00AE 07 07 07 07 07 07 11.548 #################################################
    -          0400 00AF 07 07 07 07 07 07 11.572 #################################################
    -          0401 00AF 07 07 07 07 07 07 11.597 #################################################
    -          0402 00AF 07 07 07 07 07 07 11.621 #################################################
    -          0403 00AF 07 07 07 07 07 07 11.646 #################################################
    -          0404 00AF 07 07 07 07 07 07 11.670 #################################################
    -          0405 00AF 07 07 07 07 07 07 11.694 #################################################
    -          0406 00AF 07 07 07 07 07 07 11.719 #################################################
    -          0407 00B0 07 07 07 07 07 07 11.743 #################################################
    -          0408 00B0 07 07 07 07 07 07 11.768 #################################################
    -          0409 00B0 07 07 07 07 07 07 11.792 #################################################
    -          0410 00B0 07 07 07 07 07 07 11.816 #################################################
    -          0411 00B0 07 07 07 07 07 07 11.841 #################################################
    -          0412 00B0 07 07 07 07 07 07 11.865 #################################################
    -          0413 00B0 07 07 07 07 07 07 11.890 #################################################
    -          0414 00B0 07 07 07 07 07 07 11.914 #################################################
    -          0415 00B0 07 07 07 07 07 07 11.938 #################################################
    -          0416 00B0 07 07 07 07 07 07 11.963 #################################################
    -          0417 00B0 07 07 07 07 07 07 11.987 #################################################
    -          0418 00B0 07 07 07 07 07 07 12.012 #################################################
    -          0419 00B0 07 07 07 07 07 07 12.036 #################################################
    -          0420 00B0 07 07 07 07 07 07 12.061 #################################################
    -          0421 00B0 07 07 07 07 07 07 12.085 #################################################
    -          0422 00B0 07 07 07 07 07 07 12.109 #################################################
    -          0423 00B0 07 07 07 07 07 07 12.134 #################################################
    -          0424 00B0 07 07 07 07 07 07 12.158 #################################################
    -          0425 00B0 07 07 07 07 07 07 12.183 #################################################
    -          0426 00B0 07 07 07 07 07 07 12.207 #################################################
    -          0427 00B0 07 07 07 07 07 07 12.231 #################################################
    -          0428 00B0 07 07 07 07 07 07 12.256 #################################################
    -          0429 00B0 07 07 07 07 07 07 12.280 #################################################
    -          0430 00B0 07 07 07 07 07 07 12.305 #################################################
    -          0431 00B0 07 07 07 07 07 07 12.329 #################################################
    -          0432 00B0 07 07 07 07 07 07 12.354 #################################################
    -          0433 00B0 07 07 07 07 07 07 12.378 #################################################
    -          0434 00B0 07 07 07 07 07 07 12.402 #################################################
    -          0435 00B0 07 07 07 07 07 07 12.427 #################################################
    -          0436 00B0 07 07 07 07 07 07 12.451 #################################################
    -          0437 00B0 07 07 07 07 07 07 12.476 #################################################
    -          0438 00B0 07 07 07 07 07 07 12.500 #################################################
    -          0439 00B0 07 07 07 07 07 07 12.524 #################################################
    -          0440 00B0 07 07 07 07 07 07 12.549 #################################################
    -          0441 00B0 07 07 07 07 07 07 12.573 #################################################
    -          0442 00B0 07 07 07 07 07 07 12.598 #################################################
    -          0443 00B0 07 07 07 07 07 07 12.622 #################################################
    -          0444 00B0 07 07 07 07 07 07 12.646 #################################################
    -          0445 00B0 07 07 07 07 07 07 12.671 #################################################
    -          0446 00B0 07 07 07 07 07 07 12.695 #################################################
    -          0447 00B0 07 07 07 07 07 07 12.720 #################################################
    -          0448 00B0 07 07 07 07 07 07 12.744 #################################################
    -          0449 00B0 07 07 07 07 07 07 12.769 #################################################
    -          0450 00B0 07 07 07 07 07 07 12.793 #################################################
    -          0451 00B0 07 07 07 07 07 07 12.817 #################################################
    -          0452 00B0 07 07 07 07 07 07 12.842 #################################################
    -          0453 00B0 07 07 07 07 07 07 12.866 #################################################
    -          0454 00B0 07 07 07 07 07 07 12.891 #################################################
    -          0455 00B0 07 07 07 07 07 07 12.915 #################################################
    -          0456 00B0 07 07 07 07 07 07 12.939 #################################################
    -          0457 00B0 07 07 07 07 07 07 12.964 #################################################
    -          0458 00B0 07 07 07 07 07 07 12.988 #################################################
    -          0459 00B0 07 07 07 07 07 07 13.013 #################################################
    -          0460 00B0 07 07 07 07 07 07 13.037 #################################################
    -          0461 00B0 07 07 07 07 07 07 13.062 #################################################
    -          0462 00B0 07 07 07 07 07 07 13.086 #################################################
    -          0463 00B0 07 07 07 07 07 07 13.110 #################################################
    -          0464 00B0 07 07 07 07 07 07 13.135 #################################################
    -          0465 00B0 07 07 07 07 07 07 13.159 #################################################
    -          0466 00B0 07 07 07 07 07 07 13.184 #################################################
    -          0467 00B0 07 07 07 07 07 07 13.208 #################################################
    -          0468 00B0 07 07 07 07 07 07 13.232 #################################################
    -          0469 00B0 07 07 07 07 07 07 13.257 #################################################
    -          0470 00AF 07 07 07 07 07 07 13.281 #################################################
    -          0471 00AF 07 07 07 07 07 07 13.306 #################################################
    -          0472 00AF 07 07 07 07 07 07 13.330 #################################################
    -          0473 00AF 07 07 07 07 07 07 13.354 #################################################
    -          0474 00AF 07 07 07 07 07 07 13.379 #################################################
    -          0475 00AF 07 07 07 07 07 07 13.403 #################################################
    -          0476 00AF 07 07 07 07 07 07 13.428 #################################################
    -          0477 00AF 07 07 07 07 07 07 13.452 #################################################
    -          0478 00AF 07 07 07 07 07 07 13.477 #################################################
    -          0479 00AF 07 07 07 07 07 07 13.501 #################################################
    -          0480 00AF 07 07 07 07 07 07 13.525 #################################################
    -          0481 00AF 07 07 07 07 07 07 13.550 #################################################
    -          0482 00AE 07 07 07 07 07 07 13.574 #################################################
    -          0483 00AE 07 07 07 07 07 07 13.599 #################################################
    -          0484 00AE 07 07 07 07 07 07 13.623 #################################################
    -          0485 00AE 07 07 07 07 07 07 13.647 #################################################
    -          0486 00AE 07 07 07 07 07 07 13.672 #################################################
    -          0487 00AE 07 07 07 07 07 07 13.696 #################################################
    -          0488 00AE 07 07 07 07 07 07 13.721 #################################################
    -          0489 00AE 07 07 07 07 07 07 13.745 #################################################
    -          0490 00AE 07 07 07 07 07 07 13.770 #################################################
    -          0491 00AE 07 07 07 07 07 07 13.794 #################################################
    -          0492 00AD 07 07 07 07 07 07 13.818 #################################################
    -          0493 00AD 07 07 07 07 07 07 13.843 #################################################
    -          0494 00AD 07 07 07 07 07 07 13.867 #################################################
    -          0495 00AD 07 07 07 07 07 07 13.892 #################################################
    -          0496 0000 00 00 00 00 00 00 13.916
    -          0497 0000 00 00 00 00 00 00 13.940
    -          0498 0000 00 00 00 00 00 00 13.965
    -          0499 0000 00 00 00 00 00 00 13.989
    -          0500 0000 00 00 00 00 00 00 14.014
    -          0501 0000 00 00 00 00 00 00 14.038
    -          0502 0000 00 00 00 00 00 00 14.062
    -          0503 0000 00 00 00 00 00 00 14.087
    -          0504 0000 00 00 00 00 00 00 14.111
    -          0505 0000 00 00 00 00 00 00 14.136
    -          0506 0000 00 00 00 00 00 00 14.160
    -          0507 0000 00 00 00 00 00 00 14.185
    -          0508 0000 00 00 00 00 00 00 14.209
    -          0509 0000 00 00 00 00 00 00 14.233
    -          0510 0000 00 00 00 00 00 00 14.258
    -          0511 0000 00 00 00 00 00 00 14.282
    -          0512 0000 00 00 00 00 00 00 14.307
    -          0513 0000 00 00 00 00 00 00 14.331
    -          0514 0000 00 00 00 00 00 00 14.355
    -          0515 0000 00 00 00 00 00 00 14.380
    -          0516 0000 00 00 00 00 00 00 14.404
    -          0517 0000 00 00 00 00 00 00 14.429
    -          0518 00AA 07 07 07 07 07 07 14.453 #################################################
    -          0519 00AA 07 07 07 07 07 07 14.478 #################################################
    -          0520 00AA 07 07 07 07 07 07 14.502 #################################################
    -          0521 00AA 07 07 07 07 07 07 14.526 #################################################
    -          0522 00AA 07 07 07 07 07 07 14.551 #################################################
    -          0523 00AA 07 07 07 07 07 07 14.575 #################################################
    -          0524 00A9 07 07 07 07 07 07 14.600 #################################################
    -          0525 00A9 07 07 07 07 07 07 14.624 #################################################
    -          0526 00A9 07 07 07 07 07 07 14.648 #################################################
    -          0527 00A9 07 07 07 07 07 07 14.673 #################################################
    -          0528 00A9 07 07 07 07 07 07 14.697 #################################################
    -          0529 00A9 07 07 07 07 07 07 14.722 #################################################
    -          0530 00A9 07 07 07 07 07 07 14.746 #################################################
    -          0531 00A9 07 07 07 07 07 07 14.771 #################################################
    -          0532 00A8 07 07 07 07 07 07 14.795 #################################################
    -          0533 00A8 07 07 07 07 07 07 14.819 #################################################
    -          0534 00A8 07 07 07 07 07 07 14.844 #################################################
    -          0535 00A8 07 07 07 07 07 07 14.868 #################################################
    -          0536 00A8 07 07 07 07 07 07 14.893 #################################################
    -          0537 00A8 07 07 07 07 07 07 14.917 #################################################
    -          0538 00A8 07 07 07 07 07 07 14.941 #################################################
    -          0539 00A8 07 07 07 07 07 07 14.966 #################################################
    -          0540 00A8 07 07 07 07 07 07 14.990 #################################################
    -          0541 00A7 07 07 07 07 07 07 15.015 #################################################
    -          0542 00A7 07 07 07 07 07 07 15.039 #################################################
    -          0543 00A7 07 07 07 07 07 07 15.063 #################################################
    -          0544 00A7 07 07 07 07 07 07 15.088 #################################################
    -          0545 00A7 07 07 07 07 07 07 15.112 #################################################
    -          0546 00A7 07 07 07 07 07 07 15.137 #################################################
    -          0547 00A7 07 07 07 07 07 07 15.161 #################################################
    -          0548 00A7 07 07 07 07 07 07 15.186 #################################################
    -          0549 00A6 07 07 07 07 07 07 15.210 #################################################
    -          0550 00A6 07 07 07 07 07 07 15.234 #################################################
    -          0551 00A6 07 07 07 07 07 07 15.259 #################################################
    -          0552 00A6 07 07 07 07 07 07 15.283 #################################################
    -          0553 00A6 07 07 07 07 07 07 15.308 #################################################
    -          0554 00A6 07 07 07 07 07 07 15.332 #################################################
    -          0555 00A6 07 07 07 07 07 07 15.356 #################################################
    -          0556 00A6 07 07 07 07 07 07 15.381 #################################################
    -          0557 00A6 07 07 07 07 07 07 15.405 #################################################
    -          0558 00A5 07 07 07 07 07 07 15.430 #################################################
    -          0559 00A5 07 07 07 07 07 07 15.454 #################################################
    -          0560 00A5 07 07 07 07 07 07 15.479 #################################################
    -          0561 00A5 07 07 07 07 07 07 15.503 #################################################
    -          0562 00A5 07 07 07 07 07 07 15.527 #################################################
    -          0563 00A5 07 07 07 07 07 07 15.552 #################################################
    -          0564 00A5 07 07 07 07 07 07 15.576 #################################################
    -          0565 00A5 07 07 07 07 07 07 15.601 #################################################
    -          0566 00A5 07 07 07 07 07 07 15.625 #################################################
    -          0567 00A4 07 07 07 07 07 07 15.649 #################################################
    -          0568 00A4 07 07 07 07 07 07 15.674 #################################################
    -          0569 00A4 07 07 07 07 07 07 15.698 #################################################
    -          0570 00A4 07 07 07 07 07 07 15.723 #################################################
    -          0571 00A4 07 07 07 07 07 07 15.747 #################################################
    -          0572 00A4 07 07 07 07 07 07 15.771 #################################################
    -          0573 00A4 07 07 07 07 07 07 15.796 #################################################
    -          0574 00A4 07 07 07 07 07 07 15.820 #################################################
    -          0575 00A4 07 07 07 07 07 07 15.845 #################################################
    -          0576 00A3 07 07 07 07 07 07 15.869 #################################################
    -          0577 00A3 07 07 07 07 07 07 15.894 #################################################
    -          0578 00A3 07 07 07 07 07 07 15.918 #################################################
    -          0579 00A3 07 07 07 07 07 07 15.942 #################################################
    -          0580 00A3 07 07 07 07 07 07 15.967 #################################################
    -          0581 00A3 07 07 07 07 07 07 15.991 #################################################
    -          0582 00A3 07 07 07 07 07 07 16.016 #################################################
    -          0583 00A2 07 07 07 07 07 07 16.040 #################################################
    -          0584 00A2 07 07 07 07 07 07 16.064 #################################################
    -          0585 00A2 07 07 07 07 07 07 16.089 #################################################
    -          0586 00A2 07 07 07 07 07 07 16.113 #################################################
    -          0587 00A2 07 07 07 07 07 07 16.138 #################################################
    -          0588 00A2 07 07 07 07 07 07 16.162 #################################################
    -          0589 00A2 07 07 07 07 07 07 16.187 #################################################
    -          0590 00A1 07 07 07 07 07 07 16.211 #################################################
    -          0591 00A1 07 07 07 07 07 07 16.235 #################################################
    -          0592 00A1 07 07 07 07 07 07 16.260 #################################################
    -          0593 00A1 07 07 07 07 07 07 16.284 #################################################
    -          0594 00A1 07 07 07 07 07 07 16.309 #################################################
    -          0595 00A1 07 07 07 07 07 07 16.333 #################################################
    -          0596 00A0 07 07 07 07 07 07 16.357 #################################################
    -          0597 00A0 07 07 07 07 07 07 16.382 #################################################
    -          0598 00A0 07 07 07 07 07 07 16.406 #################################################
    -          0599 00A0 07 07 07 07 07 07 16.431 #################################################
    -          0600 00A0 07 07 07 07 07 07 16.455 #################################################
    -          0601 009F 07 07 07 07 07 07 16.479 #################################################
    -          0602 009F 07 07 07 07 07 07 16.504 #################################################
    -          0603 009F 07 07 07 07 07 07 16.528 #################################################
    -          0604 009F 07 07 07 07 07 07 16.553 #################################################
    -          0605 009F 07 07 07 07 07 07 16.577 #################################################
    -          0606 009F 07 07 07 07 07 07 16.602 #################################################
    -          0607 009E 07 07 07 07 07 07 16.626 #################################################
    -          0608 009E 07 07 07 07 07 07 16.650 #################################################
    -          0609 009E 07 07 07 07 07 07 16.675 #################################################
    -          0610 009E 07 07 07 07 07 07 16.699 #################################################
    -          0611 009E 07 07 07 07 07 07 16.724 #################################################
    -          0612 009E 07 07 07 07 07 07 16.748 #################################################
    -          0613 009D 07 07 07 07 07 07 16.772 #################################################
    -          0614 009D 07 07 07 07 07 07 16.797 #################################################
    -          0615 009D 07 07 07 07 07 07 16.821 #################################################
    -          0616 009D 07 07 07 07 07 07 16.846 #################################################
    -          0617 009D 07 07 07 07 07 07 16.870 #################################################
    -          0618 009D 07 07 07 07 07 07 16.895 #################################################
    -          0619 009C 07 07 07 07 07 07 16.919 #################################################
    -          0620 009C 07 07 07 07 07 07 16.943 #################################################
    -          0621 009C 07 07 07 07 07 07 16.968 #################################################
    -          0622 009C 07 07 07 07 07 07 16.992 #################################################
    -          0623 009C 07 07 07 07 07 07 17.017 #################################################
    -          0624 009C 07 07 07 07 07 07 17.041 #################################################
    -          0625 009B 07 07 07 07 07 07 17.065 #################################################
    -          0626 009B 07 07 07 07 07 07 17.090 #################################################
    -          0627 009B 07 07 07 07 07 07 17.114 #################################################
    -          0628 009B 07 07 07 07 07 07 17.139 #################################################
    -          0629 009B 07 07 07 07 07 07 17.163 #################################################
    -          0630 009B 07 07 07 07 07 07 17.188 #################################################
    -          0631 009A 07 07 07 07 07 07 17.212 #################################################
    -          0632 009A 07 07 07 07 07 07 17.236 #################################################
    -          0633 009A 07 07 07 07 07 07 17.261 #################################################
    -          0634 009A 07 07 07 07 07 07 17.285 #################################################
    -          0635 009A 07 07 07 07 07 07 17.310 #################################################
    -          0636 009A 07 07 07 07 07 07 17.334 #################################################
    -          0637 0099 07 07 07 07 07 07 17.358 #################################################
    -          0638 0099 07 07 07 07 07 07 17.383 #################################################
    -          0639 0099 07 07 07 07 07 07 17.407 #################################################
    -          0640 0099 07 07 07 07 07 07 17.432 #################################################
    -          0641 0099 07 07 07 07 07 07 17.456 #################################################
    -          0642 0099 07 07 07 07 07 07 17.480 #################################################
    -          0643 0098 07 07 07 07 07 07 17.505 #################################################
    -          0644 0098 07 07 07 07 07 07 17.529 #################################################
    -          0645 0098 07 07 07 07 07 07 17.554 #################################################
    -          0646 0098 07 07 07 07 07 07 17.578 #################################################
    -          0647 0098 07 07 07 07 07 07 17.603 #################################################
    -          0648 0098 07 07 07 07 07 07 17.627 #################################################
    -          0649 0098 07 07 07 07 07 07 17.651 #################################################
    -          0650 0097 07 07 07 07 07 07 17.676 #################################################
    -          0651 0097 07 07 07 07 07 07 17.700 #################################################
    -          0652 0097 07 07 07 07 07 07 17.725 #################################################
    -          0653 0097 07 07 07 07 07 07 17.749 #################################################
    -          0654 0097 07 07 07 07 07 07 17.773 #################################################
    -          0655 0097 07 07 07 07 07 07 17.798 #################################################
    -          0656 0096 07 07 07 07 07 07 17.822 #################################################
    -          0657 0096 07 07 07 07 07 07 17.847 #################################################
    -          0658 0096 07 07 07 07 07 07 17.871 #################################################
    -          0659 0096 07 07 07 07 07 07 17.896 #################################################
    -          0660 0096 07 07 07 07 07 07 17.920 #################################################
    -          0661 0096 07 07 07 07 07 07 17.944 #################################################
    -          0662 0095 07 07 07 07 07 07 17.969 #################################################
    -          0663 0000 00 00 00 00 00 00 17.993
    -          0664 0000 00 00 00 00 00 00 18.018
    -          0665 0000 00 00 00 00 00 00 18.042
    -          0666 0000 00 00 00 00 00 00 18.066
    -          0667 0000 00 00 00 00 00 00 18.091
    -          0668 0000 00 00 00 00 00 00 18.115
    -          0669 0000 00 00 00 00 00 00 18.140
    -          0670 0000 00 00 00 00 00 00 18.164
    -          0671 0000 00 00 00 00 00 00 18.188
    -          0672 0000 00 00 00 00 00 00 18.213
    -          0673 0000 00 00 00 00 00 00 18.237
    -          0674 0000 00 00 00 00 00 00 18.262
    -          0675 0093 07 07 07 07 07 07 18.286 #################################################
    -          0676 0093 07 07 07 07 07 07 18.311 #################################################
    -          0677 0093 07 07 07 07 07 07 18.335 #################################################
    -          0678 0093 07 07 07 07 07 07 18.359 #################################################
    -          0679 0093 07 07 07 07 07 07 18.384 #################################################
    -          0680 0093 07 07 07 07 07 07 18.408 #################################################
    -          0681 0092 07 07 07 07 07 07 18.433 #################################################
    -          0682 0092 07 07 07 07 07 07 18.457 #################################################
    -          0683 0092 07 07 07 07 07 07 18.481 #################################################
    -          0684 0092 07 07 07 07 07 07 18.506 #################################################
    -          0685 0092 07 07 07 07 07 07 18.530 #################################################
    -          0686 0092 07 07 07 07 07 07 18.555 #################################################
    -          0687 0092 07 07 07 07 07 07 18.579 #################################################
    -          0688 0091 07 07 07 07 07 07 18.604 #################################################
    -          0689 0091 07 07 07 07 07 07 18.628 #################################################
    -          0690 0091 07 07 07 07 07 07 18.652 #################################################
    -          0691 0091 07 07 07 07 07 07 18.677 #################################################
    -          0692 0091 07 07 07 07 07 07 18.701 #################################################
    -          0693 0091 07 07 07 07 07 07 18.726 #################################################
    -          0694 0091 07 07 07 07 07 07 18.750 #################################################
    -          0695 0090 07 07 07 07 07 07 18.774 #################################################
    -          0696 0090 07 07 07 07 07 07 18.799 #################################################
    -          0697 0090 07 07 07 07 07 07 18.823 #################################################
    -          0698 0090 07 07 07 07 07 07 18.848 #################################################
    -          0699 0090 07 07 07 07 07 07 18.872 #################################################
    -          0700 0090 07 07 07 07 07 07 18.896 #################################################
    -          0701 008F 07 07 07 07 07 07 18.921 #################################################
    -          0702 008F 07 07 07 07 07 07 18.945 #################################################
    -          0703 008F 07 07 07 07 07 07 18.970 #################################################
    -          0704 008F 07 07 07 07 07 07 18.994 #################################################
    -          0705 008F 07 07 07 07 07 07 19.019 #################################################
    -          0706 008F 07 07 07 07 07 07 19.043 #################################################
    -          0707 008F 07 07 07 07 07 07 19.067 #################################################
    -          0708 008E 07 07 07 07 07 07 19.092 #################################################
    -          0709 008E 07 07 07 07 07 07 19.116 #################################################
    -          0710 008E 07 07 07 07 07 07 19.141 #################################################
    -          0711 008E 07 07 07 07 07 07 19.165 #################################################
    -          0712 008E 07 07 07 07 07 07 19.189 #################################################
    -          0713 008E 07 07 07 07 07 07 19.214 #################################################
    -          0714 008D 07 07 07 07 07 07 19.238 #################################################
    -          0715 008D 07 07 07 07 07 07 19.263 #################################################
    -          0716 008D 07 07 07 07 07 07 19.287 #################################################
    -          0717 008D 07 07 07 07 07 07 19.312 #################################################
    -          0718 008D 07 07 07 07 07 07 19.336 #################################################
    -          0719 008D 07 07 07 07 07 07 19.360 #################################################
    -          0720 008D 07 07 07 07 07 07 19.385 #################################################
    -          0721 008C 07 07 07 07 07 07 19.409 #################################################
    -          0722 008C 07 07 07 07 07 07 19.434 #################################################
    -          0723 008C 07 07 07 07 07 07 19.458 #################################################
    -          0724 008C 07 07 07 07 07 07 19.482 #################################################
    -          0725 008C 07 07 07 07 07 07 19.507 #################################################
    -          0726 008C 07 07 07 07 07 07 19.531 #################################################
    -          0727 008B 07 07 07 07 07 07 19.556 #################################################
    -          0728 008B 07 07 07 07 07 07 19.580 #################################################
    -          0729 008B 07 07 07 07 07 07 19.604 #################################################
    -          0730 008B 07 07 07 07 07 07 19.629 #################################################
    -          0731 008B 07 07 07 07 07 07 19.653 #################################################
    -          0732 008B 07 07 07 07 07 07 19.678 #################################################
    -          0733 008B 07 07 07 07 07 07 19.702 #################################################
    -          0734 008A 07 07 07 07 07 07 19.727 #################################################
    -          0735 008A 07 07 07 07 07 07 19.751 #################################################
    -          0736 008A 07 07 07 07 07 07 19.775 #################################################
    -          0737 008A 07 07 07 07 07 07 19.800 #################################################
    -          0738 008A 07 07 07 07 07 07 19.824 #################################################
    -          0739 008A 07 07 07 07 07 07 19.849 #################################################
    -          0740 008A 07 07 07 07 07 07 19.873 #################################################
    -          0741 0089 07 07 07 07 07 07 19.897 #################################################
    -          0742 0089 07 07 07 07 07 07 19.922 #################################################
    -          0743 0089 07 07 07 07 07 07 19.946 #################################################
    -          0744 0089 07 07 07 07 07 07 19.971 #################################################
    -          0745 0089 07 07 07 07 07 07 19.995 #################################################
    -          0746 0089 07 07 07 07 07 07 20.020 #################################################
    -          0747 0089 07 07 07 07 07 07 20.044 #################################################
    -          0748 0089 07 07 07 07 07 07 20.068 #################################################
    -          0749 0088 07 07 07 07 07 07 20.093 #################################################
    -          0750 0088 07 07 07 07 07 07 20.117 #################################################
    -          0751 0088 07 07 07 07 07 07 20.142 #################################################
    -          0752 0088 07 07 07 07 07 07 20.166 #################################################
    -          0753 0088 06 06 06 06 06 06 20.190 ####################################
    -          0754 0088 06 06 06 06 06 06 20.215 ####################################
    -          0755 0088 06 06 06 06 06 06 20.239 ####################################
    -          0756 0088 06 06 06 06 06 06 20.264 ####################################
    -          0757 0088 05 05 05 05 05 05 20.288 #########################
    -          0758 0087 05 05 05 05 05 05 20.312 #########################
    -          0759 0087 06 06 06 06 06 06 20.337 ####################################
    -          0760 0087 06 06 06 06 06 06 20.361 ####################################
    -          0761 0087 06 06 06 06 06 06 20.386 ####################################
    -          0762 0087 06 06 06 06 06 06 20.410 ####################################
    -          0763 0087 07 07 07 07 07 07 20.435 #################################################
    -          0764 0087 07 07 07 07 07 07 20.459 #################################################
    -          0765 0087 07 07 07 07 07 07 20.483 #################################################
    -          0766 0087 07 07 07 07 07 07 20.508 #################################################
    -          0767 0087 07 07 07 07 07 07 20.532 #################################################
    -          0768 0087 07 07 07 07 07 07 20.557 #################################################
    -          0769 0086 07 07 07 07 07 07 20.581 #################################################
    -          0770 0086 07 07 07 07 07 07 20.605 #################################################
    -          0771 0086 07 07 07 07 07 07 20.630 #################################################
    -          0772 0086 07 07 07 07 07 07 20.654 #################################################
    -          0773 0086 07 07 07 07 07 07 20.679 #################################################
    -          0774 0086 07 07 07 07 07 07 20.703 #################################################
    -          0775 0086 07 07 07 07 07 07 20.728 #################################################
    -          0776 0086 07 07 07 07 07 07 20.752 #################################################
    -          0777 0086 07 07 07 07 07 07 20.776 #################################################
    -          0778 0086 07 07 07 07 07 07 20.801 #################################################
    -          0779 0086 07 07 07 07 07 07 20.825 #################################################
    -          0780 0086 07 07 07 07 07 07 20.850 #################################################
    -          0781 0086 07 07 07 07 07 07 20.874 #################################################
    -          0782 0086 07 07 07 07 07 07 20.898 #################################################
    -          0783 0000 00 00 00 00 00 00 20.923
    -          0784 0000 00 00 00 00 00 00 20.947
    -          0785 0000 00 00 00 00 00 00 20.972
    -          0786 0000 00 00 00 00 00 00 20.996
    -          0787 0000 00 00 00 00 00 00 21.021
    -          0788 0000 00 00 00 00 00 00 21.045
    -          0789 0000 00 00 00 00 00 00 21.069
    -          0790 0000 00 00 00 00 00 00 21.094
    -          0791 0000 00 00 00 00 00 00 21.118
    -          0792 0000 00 00 00 00 00 00 21.143
    -          0793 0000 00 00 00 00 00 00 21.167
    -          0794 0000 00 00 00 00 00 00 21.191
    -          0795 0000 00 00 00 00 00 00 21.216
    -          0796 0000 00 00 00 00 00 00 21.240
    -          0797 0000 00 00 00 00 00 00 21.265
    -          0798 0000 00 00 00 00 00 00 21.289
    -          0799 0000 00 00 00 00 00 00 21.313
    -          0800 0000 00 00 00 00 00 00 21.338
    -          0801 0000 00 00 00 00 00 00 21.362
    -          0802 0000 00 00 00 00 00 00 21.387
    -          0803 0000 00 00 00 00 00 00 21.411
    -          0804 0000 00 00 00 00 00 00 21.436
    -          0805 0000 00 00 00 00 00 00 21.460
    -          0806 0000 00 00 00 00 00 00 21.484
    -          0807 0000 00 00 00 00 00 00 21.509
    -          0808 0000 00 00 00 00 00 00 21.533
    -          0809 0084 07 07 07 07 07 07 21.558 #################################################
    -          0810 0084 07 07 07 07 07 07 21.582 #################################################
    -          0811 0084 07 07 07 07 07 07 21.606 #################################################
    -          0812 0084 07 07 07 07 07 07 21.631 #################################################
    -          0813 0084 07 07 07 07 07 07 21.655 #################################################
    -          0814 0084 07 07 07 07 07 07 21.680 #################################################
    -          0815 0084 07 07 07 07 07 07 21.704 #################################################
    -          0816 0084 07 07 07 07 07 07 21.729 #################################################
    -          0817 0084 07 07 07 07 07 07 21.753 #################################################
    -          0818 0084 07 07 07 07 07 07 21.777 #################################################
    -          0819 0084 07 07 07 07 07 07 21.802 #################################################
    -          0820 0084 07 07 07 07 07 07 21.826 #################################################
    -          0821 0084 07 07 07 07 07 07 21.851 #################################################
    -          0822 0084 07 07 07 07 07 07 21.875 #################################################
    -          0823 0084 07 07 07 07 07 07 21.899 #################################################
    -          0824 0083 07 07 07 07 07 07 21.924 #################################################
    -          0825 0083 07 07 07 07 07 07 21.948 #################################################
    -          0826 0083 07 07 07 07 07 07 21.973 #################################################
    -          0827 0083 07 07 07 07 07 07 21.997 #################################################
    -          0828 0083 07 07 07 07 07 07 22.021 #################################################
    -          0829 0083 07 07 07 07 07 07 22.046 #################################################
    -          0830 0083 07 07 07 07 07 07 22.070 #################################################
    -          0831 0083 07 07 07 07 07 07 22.095 #################################################
    -          0832 0083 07 07 07 07 07 07 22.119 #################################################
    -          0833 0083 07 07 07 07 07 07 22.144 #################################################
    -          0834 0083 07 07 07 07 07 07 22.168 #################################################
    -          0835 0083 07 07 07 07 07 07 22.192 #################################################
    -          0836 0083 07 07 07 07 07 07 22.217 #################################################
    -          0837 0083 07 07 07 07 07 07 22.241 #################################################
    -          0838 0083 07 07 07 07 07 07 22.266 #################################################
    -          0839 0083 07 07 07 07 07 07 22.290 #################################################
    -          0840 0083 07 07 07 07 07 07 22.314 #################################################
    -          0841 0083 07 07 07 07 07 07 22.339 #################################################
    -          0842 0083 07 07 07 07 07 07 22.363 #################################################
    -          0843 0083 07 07 07 07 07 07 22.388 #################################################
    -          0844 0083 07 07 07 07 07 07 22.412 #################################################
    -          0845 0083 07 07 07 07 07 07 22.437 #################################################
    -          0846 0083 07 07 07 07 07 07 22.461 #################################################
    -          0847 0083 07 07 07 07 07 07 22.485 #################################################
    -          0848 0083 07 07 07 07 07 07 22.510 #################################################
    -          0849 0083 07 07 07 07 07 07 22.534 #################################################
    -          0850 0083 07 07 07 07 07 07 22.559 #################################################
    -          0851 0083 07 07 07 07 07 07 22.583 #################################################
    -          0852 0083 07 07 07 07 07 07 22.607 #################################################
    -          0853 0083 07 07 07 07 07 07 22.632 #################################################
    -          0854 0083 07 07 07 07 07 07 22.656 #################################################
    -          0855 0083 07 07 07 07 07 07 22.681 #################################################
    -          0856 0083 07 07 07 07 07 07 22.705 #################################################
    -          0857 0083 07 07 07 07 07 07 22.729 #################################################
    -          0858 0083 07 07 07 07 07 07 22.754 #################################################
    -          0859 0083 07 07 07 07 07 07 22.778 #################################################
    -          0860 0083 07 07 07 07 07 07 22.803 #################################################
    -          0861 0083 07 07 07 07 07 07 22.827 #################################################
    -          0862 0083 07 07 07 07 07 07 22.852 #################################################
    -          0863 0083 07 07 07 07 07 07 22.876 #################################################
    -          0864 0084 07 07 07 07 07 07 22.900 #################################################
    -          0865 0084 07 07 07 07 07 07 22.925 #################################################
    -          0866 0084 07 07 07 07 07 07 22.949 #################################################
    -          0867 0084 07 07 07 07 07 07 22.974 #################################################
    -          0868 0084 07 07 07 07 07 07 22.998 #################################################
    -          0869 0084 07 07 07 07 07 07 23.022 #################################################
    -          0870 0084 07 07 07 07 07 07 23.047 #################################################
    -          0871 0084 07 07 07 07 07 07 23.071 #################################################
    -          0872 0084 07 07 07 07 07 07 23.096 #################################################
    -          0873 0084 07 07 07 07 07 07 23.120 #################################################
    -          0874 0084 07 07 07 07 07 07 23.145 #################################################
    -          0875 0084 07 07 07 07 07 07 23.169 #################################################
    -          0876 0084 07 07 07 07 07 07 23.193 #################################################
    -          0877 0084 07 07 07 07 07 07 23.218 #################################################
    -          0878 0084 07 07 07 07 07 07 23.242 #################################################
    -          0879 0084 07 07 07 07 07 07 23.267 #################################################
    -          0880 0084 07 07 07 07 07 07 23.291 #################################################
    -          0881 0084 07 07 07 07 07 07 23.315 #################################################
    -          0882 0085 07 07 07 07 07 07 23.340 #################################################
    -          0883 0085 07 07 07 07 07 07 23.364 #################################################
    -          0884 0085 07 07 07 07 07 07 23.389 #################################################
    -          0885 0085 07 07 07 07 07 07 23.413 #################################################
    -          0886 0085 07 07 07 07 07 07 23.438 #################################################
    -          0887 0085 07 07 07 07 07 07 23.462 #################################################
    -          0888 0085 07 07 07 07 07 07 23.486 #################################################
    -          0889 0085 07 07 07 07 07 07 23.511 #################################################
    -          0890 0085 07 07 07 07 07 07 23.535 #################################################
    -          0891 0085 07 07 07 07 07 07 23.560 #################################################
    -          0892 0085 07 07 07 07 07 07 23.584 #################################################
    -          0893 0085 07 07 07 07 07 07 23.608 #################################################
    -          0894 0085 07 07 07 07 07 07 23.633 #################################################
    -          0895 0085 07 07 07 07 07 07 23.657 #################################################
    -          0896 0085 07 07 07 07 07 07 23.682 #################################################
    -          0897 0085 07 07 07 07 07 07 23.706 #################################################
    -          0898 0085 07 07 07 07 07 07 23.730 #################################################
    -          0899 0085 07 07 07 07 07 07 23.755 #################################################
    -          0900 0085 07 07 07 07 07 07 23.779 #################################################
    -          0901 0085 07 07 07 07 07 07 23.804 #################################################
    -          0902 0085 07 07 07 07 07 07 23.828 #################################################
    -          0903 0085 07 07 07 07 07 07 23.853 #################################################
    -          0904 0086 07 07 07 07 07 07 23.877 #################################################
    -          0905 0086 07 07 07 07 07 07 23.901 #################################################
    -          0906 0086 07 07 07 07 07 07 23.926 #################################################
    -          0907 0086 07 07 07 07 07 07 23.950 #################################################
    -          0908 0086 07 07 07 07 07 07 23.975 #################################################
    -          0909 0086 07 07 07 07 07 07 23.999 #################################################
    -          0910 0086 07 07 07 07 07 07 24.023 #################################################
    -          0911 0086 07 07 07 07 07 07 24.048 #################################################
    -          0912 0086 07 07 07 07 07 07 24.072 #################################################
    -          0913 0086 07 07 07 07 07 07 24.097 #################################################
    -          0914 0086 07 07 07 07 07 07 24.121 #################################################
    -          0915 0086 07 07 07 07 07 07 24.146 #################################################
    -          0916 0086 07 07 07 07 07 07 24.170 #################################################
    -          0917 0086 07 07 07 07 07 07 24.194 #################################################
    -          0918 0086 07 07 07 07 07 07 24.219 #################################################
    -          0919 0087 07 07 07 07 07 07 24.243 #################################################
    -          0920 0087 07 07 07 07 07 07 24.268 #################################################
    -          0921 0087 07 07 07 07 07 07 24.292 #################################################
    -          0922 0087 07 07 07 07 07 07 24.316 #################################################
    -          0923 0087 07 07 07 07 07 07 24.341 #################################################
    -          0924 0087 07 07 07 07 07 07 24.365 #################################################
    -          0925 0087 07 07 07 07 07 07 24.390 #################################################
    -          0926 0087 07 07 07 07 07 07 24.414 #################################################
    -          0927 0087 07 07 07 07 07 07 24.438 #################################################
    -          0928 0087 07 07 07 07 07 07 24.463 #################################################
    -          0929 0088 07 07 07 07 07 07 24.487 #################################################
    -          0930 0088 07 07 07 07 07 07 24.512 #################################################
    -          0931 0088 07 07 07 07 07 07 24.536 #################################################
    -          0932 0088 07 07 07 07 07 07 24.561 #################################################
    -          0933 0088 07 07 07 07 07 07 24.585 #################################################
    -          0934 0088 07 07 07 07 07 07 24.609 #################################################
    -          0935 0088 07 07 07 07 07 07 24.634 #################################################
    -          0936 0088 07 07 07 07 07 07 24.658 #################################################
    -          0937 0088 07 07 07 07 07 07 24.683 #################################################
    -          0938 0089 07 07 07 07 07 07 24.707 #################################################
    -          0939 0089 07 07 07 07 07 07 24.731 #################################################
    -          0940 0089 07 07 07 07 07 07 24.756 #################################################
    -          0941 0089 07 07 07 07 07 07 24.780 #################################################
    -          0942 0000 00 00 00 00 00 00 24.805
    -          0943 0000 00 00 00 00 00 00 24.829
    -          0944 0000 00 00 00 00 00 00 24.854
    -          0945 0000 00 00 00 00 00 00 24.878
    -          0946 0000 00 00 00 00 00 00 24.902
    -          0947 0000 00 00 00 00 00 00 24.927
    -          0948 0000 00 00 00 00 00 00 24.951
    -          0949 0000 00 00 00 00 00 00 24.976
    -          0950 0000 00 00 00 00 00 00 25.000
    -          0951 0000 00 00 00 00 00 00 25.024
    -          0952 0000 00 00 00 00 00 00 25.049
    -          0953 0000 00 00 00 00 00 00 25.073
    -          0954 007B 07 07 07 07 07 07 25.098 #################################################
    -          0955 007B 07 07 07 07 07 07 25.122 #################################################
    -          0956 007B 07 07 07 07 07 07 25.146 #################################################
    -          0957 007B 07 07 07 07 07 07 25.171 #################################################
    -          0958 007B 07 07 07 07 07 07 25.195 #################################################
    -          0959 007C 07 07 07 07 07 07 25.220 #################################################
    -          0960 007C 07 07 07 07 07 07 25.244 #################################################
    -          0961 007C 07 07 07 07 07 07 25.269 #################################################
    -          0962 007C 07 07 07 07 07 07 25.293 #################################################
    -          0963 007C 07 07 07 07 07 07 25.317 #################################################
    -          0964 007C 07 07 07 07 07 07 25.342 #################################################
    -          0965 007C 07 07 07 07 07 07 25.366 #################################################
    -          0966 007C 07 07 07 07 07 07 25.391 #################################################
    -          0967 007C 07 07 07 07 07 07 25.415 #################################################
    -          0968 007C 07 07 07 07 07 07 25.439 #################################################
    -          0969 007C 07 07 07 07 07 07 25.464 #################################################
    -          0970 007C 07 07 07 07 07 07 25.488 #################################################
    -          0971 007D 07 07 07 07 07 07 25.513 #################################################
    -          0972 007D 07 07 07 07 07 07 25.537 #################################################
    -          0973 007D 07 07 07 07 07 07 25.562 #################################################
    -          0974 007D 07 07 07 07 07 07 25.586 #################################################
    -          0975 007D 07 07 07 07 07 07 25.610 #################################################
    -          0976 007D 07 07 07 07 07 07 25.635 #################################################
    -          0977 007D 07 07 07 07 07 07 25.659 #################################################
    -          0978 007D 07 07 07 07 07 07 25.684 #################################################
    -          0979 007D 07 07 07 07 07 07 25.708 #################################################
    -          0980 007D 07 07 07 07 07 07 25.732 #################################################
    -          0981 007D 07 07 07 07 07 07 25.757 #################################################
    -          0982 007D 07 07 07 07 07 07 25.781 #################################################
    -          0983 007E 07 07 07 07 07 07 25.806 #################################################
    -          0984 007E 07 07 07 07 07 07 25.830 #################################################
    -          0985 007E 07 07 07 07 07 07 25.854 #################################################
    -          0986 007E 07 07 07 07 07 07 25.879 #################################################
    -          0987 007E 07 07 07 07 07 07 25.903 #################################################
    -          0988 007E 07 07 07 07 07 07 25.928 #################################################
    -          0989 007E 07 07 07 07 07 07 25.952 #################################################
    -          0990 007E 07 07 07 07 07 07 25.977 #################################################
    -          0991 007E 07 07 07 07 07 07 26.001 #################################################
    -          0992 007E 07 07 07 07 07 07 26.025 #################################################
    -          0993 007E 06 06 06 06 06 06 26.050 ####################################
    -          0994 007E 06 06 06 06 06 06 26.074 ####################################
    -          0995 007F 06 06 06 06 06 06 26.099 ####################################
    -          0996 007F 06 06 06 06 06 06 26.123 ####################################
    -          0997 007F 05 05 05 05 05 05 26.147 #########################
    -          0998 007F 05 05 05 05 05 05 26.172 #########################
    -          0999 007F 06 06 06 06 06 06 26.196 ####################################
    -          1000 007F 06 06 06 06 06 06 26.221 ####################################
    -          1001 007F 06 06 06 06 06 06 26.245 ####################################
    -          1002 007F 06 06 06 06 06 06 26.270 ####################################
    -          1003 007F 07 07 07 07 07 07 26.294 #################################################
    -          1004 007F 07 07 07 07 07 07 26.318 #################################################
    -          1005 0080 07 07 07 07 07 07 26.343 #################################################
    -          1006 0080 07 07 07 07 07 07 26.367 #################################################
    -          1007 0080 07 07 07 07 07 07 26.392 #################################################
    -          1008 0080 07 07 07 07 07 07 26.416 #################################################
    -          1009 0080 07 07 07 07 07 07 26.440 #################################################
    -          1010 0080 07 07 07 07 07 07 26.465 #################################################
    -          1011 0080 07 07 07 07 07 07 26.489 #################################################
    -          1012 0080 07 07 07 07 07 07 26.514 #################################################
    -          1013 0080 07 07 07 07 07 07 26.538 #################################################
    -          1014 0081 07 07 07 07 07 07 26.562 #################################################
    -          1015 0081 07 07 07 07 07 07 26.587 #################################################
    -          1016 0081 07 07 07 07 07 07 26.611 #################################################
    -          1017 0081 07 07 07 07 07 07 26.636 #################################################
    -          1018 0081 07 07 07 07 07 07 26.660 #################################################
    -          1019 0081 07 07 07 07 07 07 26.685 #################################################
    -          1020 0081 07 07 07 07 07 07 26.709 #################################################
    -          1021 0081 07 07 07 07 07 07 26.733 #################################################
    -          1022 0082 07 07 07 07 07 07 26.758 #################################################
    -          1023 0082 07 07 07 07 07 07 26.782 #################################################
    -          1024 0082 07 07 07 07 07 07 26.807 #################################################
    -          1025 0082 07 07 07 07 07 07 26.831 #################################################
    -          1026 0082 07 07 07 07 07 07 26.855 #################################################
    -          1027 0082 07 07 07 07 07 07 26.880 #################################################
    -          1028 0083 07 07 07 07 07 07 26.904 #################################################
    -          1029 0083 07 07 07 07 07 07 26.929 #################################################
    -          1030 0083 07 07 07 07 07 07 26.953 #################################################
    -          1031 0083 07 07 07 07 07 07 26.978 #################################################
    -          1032 0083 07 07 07 07 07 07 27.002 #################################################
    -          1033 0083 07 07 07 07 07 07 27.026 #################################################
    -          1034 0083 07 07 07 07 07 07 27.051 #################################################
    -          1035 0084 07 07 07 07 07 07 27.075 #################################################
    -          1036 0084 07 07 07 07 07 07 27.100 #################################################
    -          1037 0084 07 07 07 07 07 07 27.124 #################################################
    -          1038 0084 07 07 07 07 07 07 27.148 #################################################
    -          1039 0084 07 07 07 07 07 07 27.173 #################################################
    -          1040 0084 07 07 07 07 07 07 27.197 #################################################
    -          1041 0084 07 07 07 07 07 07 27.222 #################################################
    -          1042 0085 07 07 07 07 07 07 27.246 #################################################
    -          1043 0085 07 07 07 07 07 07 27.271 #################################################
    -          1044 0085 07 07 07 07 07 07 27.295 #################################################
    -          1045 0085 07 07 07 07 07 07 27.319 #################################################
    -          1046 0085 07 07 07 07 07 07 27.344 #################################################
    -          1047 0085 07 07 07 07 07 07 27.368 #################################################
    -          1048 0085 07 07 07 07 07 07 27.393 #################################################
    -          1049 0086 07 07 07 07 07 07 27.417 #################################################
    -          1050 0086 07 07 07 07 07 07 27.441 #################################################
    -          1051 0086 07 07 07 07 07 07 27.466 #################################################
    -          1052 0086 07 07 07 07 07 07 27.490 #################################################
    -          1053 0086 07 07 07 07 07 07 27.515 #################################################
    -          1054 0086 07 07 07 07 07 07 27.539 #################################################
    -          1055 0086 07 07 07 07 07 07 27.563 #################################################
    -          1056 0087 07 07 07 07 07 07 27.588 #################################################
    -          1057 0087 07 07 07 07 07 07 27.612 #################################################
    -          1058 0087 07 07 07 07 07 07 27.637 #################################################
    -          1059 0087 07 07 07 07 07 07 27.661 #################################################
    -          1060 0087 07 07 07 07 07 07 27.686 #################################################
    -          1061 0087 07 07 07 07 07 07 27.710 #################################################
    -          1062 0087 07 07 07 07 07 07 27.734 #################################################
    -          1063 0088 07 07 07 07 07 07 27.759 #################################################
    -          1064 0088 07 07 07 07 07 07 27.783 #################################################
    -          1065 0088 07 07 07 07 07 07 27.808 #################################################
    -          1066 0088 07 07 07 07 07 07 27.832 #################################################
    -          1067 0088 07 07 07 07 07 07 27.856 #################################################
    -          1068 0088 07 07 07 07 07 07 27.881 #################################################
    -          1069 0088 07 07 07 07 07 07 27.905 #################################################
    -          1070 0000 00 00 00 00 00 00 27.930
    -          1071 0000 00 00 00 00 00 00 27.954
    -          1072 0000 00 00 00 00 00 00 27.979
    -          1073 0000 00 00 00 00 00 00 28.003
    -          1074 0000 00 00 00 00 00 00 28.027
    -          1075 0000 00 00 00 00 00 00 28.052
    -          1076 0000 00 00 00 00 00 00 28.076
    -          1077 0000 00 00 00 00 00 00 28.101
    -          1078 0000 00 00 00 00 00 00 28.125
    -          1079 0000 00 00 00 00 00 00 28.149
    -          1080 0000 00 00 00 00 00 00 28.174
    -          1081 0000 00 00 00 00 00 00 28.198
    -          1082 0000 00 00 00 00 00 00 28.223
    -          1083 0000 00 00 00 00 00 00 28.247
    -          1084 0000 00 00 00 00 00 00 28.271
    -          1085 0000 00 00 00 00 00 00 28.296
    -          1086 0000 00 00 00 00 00 00 28.320
    -          1087 0000 00 00 00 00 00 00 28.345
    -          1088 0000 00 00 00 00 00 00 28.369
    -          1089 0000 00 00 00 00 00 00 28.394
    -          1090 0000 00 00 00 00 00 00 28.418
    -          1091 0000 00 00 00 00 00 00 28.442
    -          1092 0000 00 00 00 00 00 00 28.467
    -          1093 0000 00 00 00 00 00 00 28.491
    -          1094 0000 00 00 00 00 00 00 28.516
    -          1095 0000 00 00 00 00 00 00 28.540
    -          1096 0000 00 00 00 00 00 00 28.564
    -          1097 0000 00 00 00 00 00 00 28.589
    -          1098 0000 00 00 00 00 00 00 28.613
    -          1099 0000 00 00 00 00 00 00 28.638
    -          1100 0000 00 00 00 00 00 00 28.662
    -          1101 0000 00 00 00 00 00 00 28.687
    -          1102 0000 00 00 00 00 00 00 28.711
    -          1103 0000 00 00 00 00 00 00 28.735
    -          1104 0000 00 00 00 00 00 00 28.760
    -          1105 0000 00 00 00 00 00 00 28.784
    -          1106 0000 00 00 00 00 00 00 28.809
    -          1107 0000 00 00 00 00 00 00 28.833
    -          1108 0000 00 00 00 00 00 00 28.857
    -          1109 0000 00 00 00 00 00 00 28.882
    -          1110 0000 00 00 00 00 00 00 28.906
    -          1111 0000 00 00 00 00 00 00 28.931
    -          1112 0000 00 00 00 00 00 00 28.955
    -          1113 0000 00 00 00 00 00 00 28.979
    -          1114 0000 00 00 00 00 00 00 29.004
    -          1115 0000 00 00 00 00 00 00 29.028
    -          1116 0000 00 00 00 00 00 00 29.053
    -          1117 0000 00 00 00 00 00 00 29.077
    -          1118 0000 00 00 00 00 00 00 29.102
    -          1119 0000 00 00 00 00 00 00 29.126
    -          1120 0000 00 00 00 00 00 00 29.150
    -          1121 0000 00 00 00 00 00 00 29.175
    -          1122 0000 00 00 00 00 00 00 29.199
    -          1123 0000 00 00 00 00 00 00 29.224
    -          1124 0000 00 00 00 00 00 00 29.248
    -          1125 0000 00 00 00 00 00 00 29.272
    -          1126 0000 00 00 00 00 00 00 29.297
    -          1127 0000 00 00 00 00 00 00 29.321
    -          1128 0000 00 00 00 00 00 00 29.346
    -          1129 0000 00 00 00 00 00 00 29.370
    -          1130 0000 00 00 00 00 00 00 29.395
    -          1131 0000 00 00 00 00 00 00 29.419
    -          1132 0000 00 00 00 00 00 00 29.443
    -          1133 0000 00 00 00 00 00 00 29.468
    -          1134 0000 00 00 00 00 00 00 29.492
    -          1135 0000 00 00 00 00 00 00 29.517
    -          1136 0000 00 00 00 00 00 00 29.541
    -          1137 0000 00 00 00 00 00 00 29.565
    -          1138 0000 00 00 00 00 00 00 29.590
    -          1139 0000 00 00 00 00 00 00 29.614
    -          1140 0000 00 00 00 00 00 00 29.639
    -          1141 0000 00 00 00 00 00 00 29.663
    -          1142 0000 00 00 00 00 00 00 29.688
    -          1143 0000 00 00 00 00 00 00 29.712
    -          1144 0000 00 00 00 00 00 00 29.736
    -          1145 0000 00 00 00 00 00 00 29.761
    -          1146 0000 00 00 00 00 00 00 29.785
    -          1147 0000 00 00 00 00 00 00 29.810
    -          1148 0000 00 00 00 00 00 00 29.834
    -          1149 0000 00 00 00 00 00 00 29.858
    -          1150 0000 00 00 00 00 00 00 29.883
    -          1151 0000 00 00 00 00 00 00 29.907
    -          1152 0000 00 00 00 00 00 00 29.932
    -          1153 0000 00 00 00 00 00 00 29.956
    -
    -       ThIs  next  example does the same thing as the previous example but outputs information in comma-delimited format because
    -       option -c was used instead of option -v.  This format is better suited for importing into a  spreadsheet  but  lacks  the
    -       visual effect of the histogram.  Observe that prescaler values appear in decimal rather than hexadecimal.
    -
    -          # psnotch < unotched.psc > notched.psc -f tone.map -c
    -          0,0,0,0,0,0,0,0,0, 1.807
    -          1,0,0,0,0,0,0,0,0, 1.831
    -          2,0,0,0,0,0,0,0,0, 1.855
    -          3,0,0,0,0,0,0,0,0, 1.880
    -          4,0,0,0,0,0,0,0,0, 1.904
    -          5,0,0,0,0,0,0,0,0, 1.929
    -          6,0,0,0,0,0,0,0,0, 1.953
    -          7,0,0,0,0,0,0,0,0, 1.978
    -          8,0,0,0,0,0,0,0,0, 2.002
    -          9,0,0,0,0,0,0,0,0, 2.026
    -          10,0,0,0,0,0,0,0,0, 2.051
    -          11,0,0,0,0,0,0,0,0, 2.075
    -          12,112,7,7,7,7,7,7,49, 2.100
    -          13,111,7,7,7,7,7,7,49, 2.124
    -          14,111,7,7,7,7,7,7,49, 2.148
    -          15,111,7,7,7,7,7,7,49, 2.173
    -          16,111,7,7,7,7,7,7,49, 2.197
    -          17,111,7,7,7,7,7,7,49, 2.222
    -          18,111,7,7,7,7,7,7,49, 2.246
    -          19,111,7,7,7,7,7,7,49, 2.271
    -          20,111,7,7,7,7,7,7,49, 2.295
    -          21,111,7,7,7,7,7,7,49, 2.319
    -          22,111,7,7,7,7,7,7,49, 2.344
    -          23,111,7,7,7,7,7,7,49, 2.368
    -          24,111,7,7,7,7,7,7,49, 2.393
    -          25,111,7,7,7,7,7,7,49, 2.417
    -          26,111,7,7,7,7,7,7,49, 2.441
    -          27,111,7,7,7,7,7,7,49, 2.466
    -          28,112,7,7,7,7,7,7,49, 2.490
    -          29,112,7,7,7,7,7,7,49, 2.515
    -          30,112,7,7,7,7,7,7,49, 2.539
    -          31,112,7,7,7,7,7,7,49, 2.563
    -          32,112,7,7,7,7,7,7,49, 2.588
    -          33,113,7,7,7,7,7,7,49, 2.612
    -          34,113,7,7,7,7,7,7,49, 2.637
    -          35,113,7,7,7,7,7,7,49, 2.661
    -          36,113,7,7,7,7,7,7,49, 2.686
    -          37,114,7,7,7,7,7,7,49, 2.710
    -          38,114,7,7,7,7,7,7,49, 2.734
    -          39,115,7,7,7,7,7,7,49, 2.759
    -          40,115,7,7,7,7,7,7,49, 2.783
    -          41,115,7,7,7,7,7,7,49, 2.808
    -          42,116,7,7,7,7,7,7,49, 2.832
    -          43,116,7,7,7,7,7,7,49, 2.856
    -          44,116,7,7,7,7,7,7,49, 2.881
    -          45,117,7,7,7,7,7,7,49, 2.905
    -          46,117,7,7,7,7,7,7,49, 2.930
    -          47,118,7,7,7,7,7,7,49, 2.954
    -          48,118,7,7,7,7,7,7,49, 2.979
    -          49,118,7,7,7,7,7,7,49, 3.003
    -          50,119,7,7,7,7,7,7,49, 3.027
    -          51,119,7,7,7,7,7,7,49, 3.052
    -          52,119,7,7,7,7,7,7,49, 3.076
    -          53,120,7,7,7,7,7,7,49, 3.101
    -          54,120,7,7,7,7,7,7,49, 3.125
    -          55,120,7,7,7,7,7,7,49, 3.149
    -          56,120,7,7,7,7,7,7,49, 3.174
    -          57,121,7,7,7,7,7,7,49, 3.198
    -          58,121,7,7,7,7,7,7,49, 3.223
    -          59,121,7,7,7,7,7,7,49, 3.247
    -          60,121,7,7,7,7,7,7,49, 3.271
    -          61,121,7,7,7,7,7,7,49, 3.296
    -          62,121,7,7,7,7,7,7,49, 3.320
    -          63,122,7,7,7,7,7,7,49, 3.345
    -          64,122,7,7,7,7,7,7,49, 3.369
    -          65,122,7,7,7,7,7,7,49, 3.394
    -          66,0,0,0,0,0,0,0,0, 3.418
    -          67,0,0,0,0,0,0,0,0, 3.442
    -          68,0,0,0,0,0,0,0,0, 3.467
    -          69,0,0,0,0,0,0,0,0, 3.491
    -          70,0,0,0,0,0,0,0,0, 3.516
    -          71,0,0,0,0,0,0,0,0, 3.540
    -          72,0,0,0,0,0,0,0,0, 3.564
    -          73,0,0,0,0,0,0,0,0, 3.589
    -          74,0,0,0,0,0,0,0,0, 3.613
    -          75,0,0,0,0,0,0,0,0, 3.638
    -          76,0,0,0,0,0,0,0,0, 3.662
    -          77,0,0,0,0,0,0,0,0, 3.687
    -          78,0,0,0,0,0,0,0,0, 3.711
    -          79,0,0,0,0,0,0,0,0, 3.735
    -          80,0,0,0,0,0,0,0,0, 3.760
    -          81,0,0,0,0,0,0,0,0, 3.784
    -          82,0,0,0,0,0,0,0,0, 3.809
    -          83,0,0,0,0,0,0,0,0, 3.833
    -          84,0,0,0,0,0,0,0,0, 3.857
    -          85,0,0,0,0,0,0,0,0, 3.882
    -          86,0,0,0,0,0,0,0,0, 3.906
    -          87,0,0,0,0,0,0,0,0, 3.931
    -          88,0,0,0,0,0,0,0,0, 3.955
    -          89,0,0,0,0,0,0,0,0, 3.979
    -          90,0,0,0,0,0,0,0,0, 4.004
    -          91,0,0,0,0,0,0,0,0, 4.028
    -          92,0,0,0,0,0,0,0,0, 4.053
    -          93,0,0,0,0,0,0,0,0, 4.077
    -          94,125,7,7,7,7,7,7,49, 4.102
    -          95,126,7,7,7,7,7,7,49, 4.126
    -          96,126,7,7,7,7,7,7,49, 4.150
    -          97,126,7,7,7,7,7,7,49, 4.175
    -          98,126,7,7,7,7,7,7,49, 4.199
    -          99,126,7,7,7,7,7,7,49, 4.224
    -          100,126,7,7,7,7,7,7,49, 4.248
    -          101,126,7,7,7,7,7,7,49, 4.272
    -          102,126,7,7,7,7,7,7,49, 4.297
    -          103,127,7,7,7,7,7,7,49, 4.321
    -          104,127,7,7,7,7,7,7,49, 4.346
    -          105,127,7,7,7,7,7,7,49, 4.370
    -          106,127,7,7,7,7,7,7,49, 4.395
    -          107,127,7,7,7,7,7,7,49, 4.419
    -          108,127,7,7,7,7,7,7,49, 4.443
    -          109,127,7,7,7,7,7,7,49, 4.468
    -          110,128,7,7,7,7,7,7,49, 4.492
    -          111,128,7,7,7,7,7,7,49, 4.517
    -          112,128,7,7,7,7,7,7,49, 4.541
    -          113,128,7,7,7,7,7,7,49, 4.565
    -          114,128,7,7,7,7,7,7,49, 4.590
    -          115,128,7,7,7,7,7,7,49, 4.614
    -          116,128,7,7,7,7,7,7,49, 4.639
    -          117,128,7,7,7,7,7,7,49, 4.663
    -          118,129,7,7,7,7,7,7,49, 4.688
    -          119,129,7,7,7,7,7,7,49, 4.712
    -          120,129,7,7,7,7,7,7,49, 4.736
    -          121,129,7,7,7,7,7,7,49, 4.761
    -          122,129,7,7,7,7,7,7,49, 4.785
    -          123,129,7,7,7,7,7,7,49, 4.810
    -          124,129,7,7,7,7,7,7,49, 4.834
    -          125,130,7,7,7,7,7,7,49, 4.858
    -          126,130,7,7,7,7,7,7,49, 4.883
    -          127,130,6,6,6,6,6,6,36, 4.907
    -          128,130,5,5,5,5,5,5,25, 4.932
    -          129,130,5,5,5,5,5,5,25, 4.956
    -          130,130,4,4,4,4,4,4,16, 4.980
    -          131,130,4,4,4,4,4,4,16, 5.005
    -          132,130,5,5,5,5,5,5,25, 5.029
    -          133,131,5,5,5,5,5,5,25, 5.054
    -          134,131,6,6,6,6,6,6,36, 5.078
    -          135,131,7,7,7,7,7,7,49, 5.103
    -          136,131,7,7,7,7,7,7,49, 5.127
    -          137,131,7,7,7,7,7,7,49, 5.151
    -          138,131,7,7,7,7,7,7,49, 5.176
    -          139,131,7,7,7,7,7,7,49, 5.200
    -          140,148,7,7,7,7,7,7,49, 5.225
    -          141,0,0,0,0,0,0,0,0, 5.249
    -          142,0,0,0,0,0,0,0,0, 5.273
    -          143,0,0,0,0,0,0,0,0, 5.298
    -          144,0,0,0,0,0,0,0,0, 5.322
    -          145,0,0,0,0,0,0,0,0, 5.347
    -          146,0,0,0,0,0,0,0,0, 5.371
    -          147,0,0,0,0,0,0,0,0, 5.396
    -          148,0,0,0,0,0,0,0,0, 5.420
    -          149,0,0,0,0,0,0,0,0, 5.444
    -          150,0,0,0,0,0,0,0,0, 5.469
    -          151,0,0,0,0,0,0,0,0, 5.493
    -          152,149,7,7,7,7,7,7,49, 5.518
    -          153,150,7,7,7,7,7,7,49, 5.542
    -          154,150,7,7,7,7,7,7,49, 5.566
    -          155,150,7,7,7,7,7,7,49, 5.591
    -          156,150,7,7,7,7,7,7,49, 5.615
    -          157,150,7,7,7,7,7,7,49, 5.640
    -          158,151,7,7,7,7,7,7,49, 5.664
    -          159,151,7,7,7,7,7,7,49, 5.688
    -          160,151,7,7,7,7,7,7,49, 5.713
    -          161,151,7,7,7,7,7,7,49, 5.737
    -          162,152,7,7,7,7,7,7,49, 5.762
    -          163,152,7,7,7,7,7,7,49, 5.786
    -          164,152,7,7,7,7,7,7,49, 5.811
    -          165,152,7,7,7,7,7,7,49, 5.835
    -          166,153,7,7,7,7,7,7,49, 5.859
    -          167,153,7,7,7,7,7,7,49, 5.884
    -          168,153,7,7,7,7,7,7,49, 5.908
    -          169,154,7,7,7,7,7,7,49, 5.933
    -          170,154,7,7,7,7,7,7,49, 5.957
    -          171,154,7,7,7,7,7,7,49, 5.981
    -          172,154,7,7,7,7,7,7,49, 6.006
    -          173,155,7,7,7,7,7,7,49, 6.030
    -          174,155,7,7,7,7,7,7,49, 6.055
    -          175,155,7,7,7,7,7,7,49, 6.079
    -          176,156,7,7,7,7,7,7,49, 6.104
    -          177,156,7,7,7,7,7,7,49, 6.128
    -          178,156,7,7,7,7,7,7,49, 6.152
    -          179,156,7,7,7,7,7,7,49, 6.177
    -          180,157,7,7,7,7,7,7,49, 6.201
    -          181,157,7,7,7,7,7,7,49, 6.226
    -          182,157,7,7,7,7,7,7,49, 6.250
    -          183,158,7,7,7,7,7,7,49, 6.274
    -          184,158,7,7,7,7,7,7,49, 6.299
    -          185,158,7,7,7,7,7,7,49, 6.323
    -          186,158,7,7,7,7,7,7,49, 6.348
    -          187,159,7,7,7,7,7,7,49, 6.372
    -          188,159,7,7,7,7,7,7,49, 6.396
    -          189,159,7,7,7,7,7,7,49, 6.421
    -          190,159,7,7,7,7,7,7,49, 6.445
    -          191,160,7,7,7,7,7,7,49, 6.470
    -          192,160,7,7,7,7,7,7,49, 6.494
    -          193,160,7,7,7,7,7,7,49, 6.519
    -          194,160,7,7,7,7,7,7,49, 6.543
    -          195,161,7,7,7,7,7,7,49, 6.567
    -          196,161,7,7,7,7,7,7,49, 6.592
    -          197,161,7,7,7,7,7,7,49, 6.616
    -          198,161,7,7,7,7,7,7,49, 6.641
    -          199,162,7,7,7,7,7,7,49, 6.665
    -          200,162,7,7,7,7,7,7,49, 6.689
    -          201,162,7,7,7,7,7,7,49, 6.714
    -          202,162,7,7,7,7,7,7,49, 6.738
    -          203,162,7,7,7,7,7,7,49, 6.763
    -          204,163,7,7,7,7,7,7,49, 6.787
    -          205,163,7,7,7,7,7,7,49, 6.812
    -          206,163,7,7,7,7,7,7,49, 6.836
    -          207,163,7,7,7,7,7,7,49, 6.860
    -          208,164,7,7,7,7,7,7,49, 6.885
    -          209,0,0,0,0,0,0,0,0, 6.909
    -          210,0,0,0,0,0,0,0,0, 6.934
    -          211,0,0,0,0,0,0,0,0, 6.958
    -          212,0,0,0,0,0,0,0,0, 6.982
    -          213,0,0,0,0,0,0,0,0, 7.007
    -          214,0,0,0,0,0,0,0,0, 7.031
    -          215,0,0,0,0,0,0,0,0, 7.056
    -          216,0,0,0,0,0,0,0,0, 7.080
    -          217,0,0,0,0,0,0,0,0, 7.104
    -          218,0,0,0,0,0,0,0,0, 7.129
    -          219,0,0,0,0,0,0,0,0, 7.153
    -          220,0,0,0,0,0,0,0,0, 7.178
    -          221,0,0,0,0,0,0,0,0, 7.202
    -          222,0,0,0,0,0,0,0,0, 7.227
    -          223,0,0,0,0,0,0,0,0, 7.251
    -          224,0,0,0,0,0,0,0,0, 7.275
    -          225,0,0,0,0,0,0,0,0, 7.300
    -          226,0,0,0,0,0,0,0,0, 7.324
    -          227,0,0,0,0,0,0,0,0, 7.349
    -          228,0,0,0,0,0,0,0,0, 7.373
    -          229,168,7,7,7,7,7,7,49, 7.397
    -          230,169,7,7,7,7,7,7,49, 7.422
    -          231,169,7,7,7,7,7,7,49, 7.446
    -          232,169,7,7,7,7,7,7,49, 7.471
    -          233,169,7,7,7,7,7,7,49, 7.495
    -          234,170,7,7,7,7,7,7,49, 7.520
    -          235,170,7,7,7,7,7,7,49, 7.544
    -          236,170,7,7,7,7,7,7,49, 7.568
    -          237,170,7,7,7,7,7,7,49, 7.593
    -          238,171,7,7,7,7,7,7,49, 7.617
    -          239,171,7,7,7,7,7,7,49, 7.642
    -          240,171,7,7,7,7,7,7,49, 7.666
    -          241,171,7,7,7,7,7,7,49, 7.690
    -          242,172,7,7,7,7,7,7,49, 7.715
    -          243,172,7,7,7,7,7,7,49, 7.739
    -          244,172,7,7,7,7,7,7,49, 7.764
    -          245,172,7,7,7,7,7,7,49, 7.788
    -          246,173,7,7,7,7,7,7,49, 7.812
    -          247,173,7,7,7,7,7,7,49, 7.837
    -          248,173,7,7,7,7,7,7,49, 7.861
    -          249,173,7,7,7,7,7,7,49, 7.886
    -          250,174,7,7,7,7,7,7,49, 7.910
    -          251,174,7,7,7,7,7,7,49, 7.935
    -          252,174,7,7,7,7,7,7,49, 7.959
    -          253,174,7,7,7,7,7,7,49, 7.983
    -          254,174,7,7,7,7,7,7,49, 8.008
    -          255,175,7,7,7,7,7,7,49, 8.032
    -          256,175,7,7,7,7,7,7,49, 8.057
    -          257,175,7,7,7,7,7,7,49, 8.081
    -          258,175,7,7,7,7,7,7,49, 8.105
    -          259,175,7,7,7,7,7,7,49, 8.130
    -          260,176,7,7,7,7,7,7,49, 8.154
    -          261,176,7,7,7,7,7,7,49, 8.179
    -          262,176,7,7,7,7,7,7,49, 8.203
    -          263,176,7,7,7,7,7,7,49, 8.228
    -          264,176,7,7,7,7,7,7,49, 8.252
    -          265,177,7,7,7,7,7,7,49, 8.276
    -          266,177,7,7,7,7,7,7,49, 8.301
    -          267,177,7,7,7,7,7,7,49, 8.325
    -          268,177,7,7,7,7,7,7,49, 8.350
    -          269,177,7,7,7,7,7,7,49, 8.374
    -          270,177,7,7,7,7,7,7,49, 8.398
    -          271,178,7,7,7,7,7,7,49, 8.423
    -          272,178,7,7,7,7,7,7,49, 8.447
    -          273,178,7,7,7,7,7,7,49, 8.472
    -          274,178,7,7,7,7,7,7,49, 8.496
    -          275,178,7,7,7,7,7,7,49, 8.521
    -          276,179,7,7,7,7,7,7,49, 8.545
    -          277,179,7,7,7,7,7,7,49, 8.569
    -          278,179,7,7,7,7,7,7,49, 8.594
    -          279,179,7,7,7,7,7,7,49, 8.618
    -          280,179,7,7,7,7,7,7,49, 8.643
    -          281,179,7,7,7,7,7,7,49, 8.667
    -          282,180,7,7,7,7,7,7,49, 8.691
    -          283,180,7,7,7,7,7,7,49, 8.716
    -          284,180,7,7,7,7,7,7,49, 8.740
    -          285,180,7,7,7,7,7,7,49, 8.765
    -          286,180,7,7,7,7,7,7,49, 8.789
    -          287,181,7,7,7,7,7,7,49, 8.813
    -          288,181,7,7,7,7,7,7,49, 8.838
    -          289,181,7,7,7,7,7,7,49, 8.862
    -          290,181,7,7,7,7,7,7,49, 8.887
    -          291,181,7,7,7,7,7,7,49, 8.911
    -          292,182,7,7,7,7,7,7,49, 8.936
    -          293,182,7,7,7,7,7,7,49, 8.960
    -          294,182,7,7,7,7,7,7,49, 8.984
    -          295,182,7,7,7,7,7,7,49, 9.009
    -          296,182,7,7,7,7,7,7,49, 9.033
    -          297,183,7,7,7,7,7,7,49, 9.058
    -          298,183,7,7,7,7,7,7,49, 9.082
    -          299,183,7,7,7,7,7,7,49, 9.106
    -          300,183,7,7,7,7,7,7,49, 9.131
    -          301,183,7,7,7,7,7,7,49, 9.155
    -          302,184,7,7,7,7,7,7,49, 9.180
    -          303,184,7,7,7,7,7,7,49, 9.204
    -          304,184,7,7,7,7,7,7,49, 9.229
    -          305,184,7,7,7,7,7,7,49, 9.253
    -          306,184,7,7,7,7,7,7,49, 9.277
    -          307,185,7,7,7,7,7,7,49, 9.302
    -          308,185,7,7,7,7,7,7,49, 9.326
    -          309,185,7,7,7,7,7,7,49, 9.351
    -          310,185,7,7,7,7,7,7,49, 9.375
    -          311,185,7,7,7,7,7,7,49, 9.399
    -          312,186,7,7,7,7,7,7,49, 9.424
    -          313,186,7,7,7,7,7,7,49, 9.448
    -          314,186,7,7,7,7,7,7,49, 9.473
    -          315,186,7,7,7,7,7,7,49, 9.497
    -          316,186,7,7,7,7,7,7,49, 9.521
    -          317,186,7,7,7,7,7,7,49, 9.546
    -          318,187,7,7,7,7,7,7,49, 9.570
    -          319,187,7,7,7,7,7,7,49, 9.595
    -          320,187,7,7,7,7,7,7,49, 9.619
    -          321,187,7,7,7,7,7,7,49, 9.644
    -          322,187,7,7,7,7,7,7,49, 9.668
    -          323,187,7,7,7,7,7,7,49, 9.692
    -          324,188,7,7,7,7,7,7,49, 9.717
    -          325,188,7,7,7,7,7,7,49, 9.741
    -          326,188,7,7,7,7,7,7,49, 9.766
    -          327,188,7,7,7,7,7,7,49, 9.790
    -          328,188,7,7,7,7,7,7,49, 9.814
    -          329,188,7,7,7,7,7,7,49, 9.839
    -          330,188,7,7,7,7,7,7,49, 9.863
    -          331,189,7,7,7,7,7,7,49, 9.888
    -          332,189,7,7,7,7,7,7,49, 9.912
    -          333,189,7,7,7,7,7,7,49, 9.937
    -          334,189,7,7,7,7,7,7,49, 9.961
    -          335,189,7,7,7,7,7,7,49, 9.985
    -          336,0,0,0,0,0,0,0,0,10.010
    -          337,0,0,0,0,0,0,0,0,10.034
    -          338,0,0,0,0,0,0,0,0,10.059
    -          339,0,0,0,0,0,0,0,0,10.083
    -          340,0,0,0,0,0,0,0,0,10.107
    -          341,0,0,0,0,0,0,0,0,10.132
    -          342,0,0,0,0,0,0,0,0,10.156
    -          343,0,0,0,0,0,0,0,0,10.181
    -          344,0,0,0,0,0,0,0,0,10.205
    -          345,0,0,0,0,0,0,0,0,10.229
    -          346,170,7,7,7,7,7,7,49,10.254
    -          347,170,7,7,7,7,7,7,49,10.278
    -          348,170,7,7,7,7,7,7,49,10.303
    -          349,170,7,7,7,7,7,7,49,10.327
    -          350,170,7,7,7,7,7,7,49,10.352
    -          351,170,7,7,7,7,7,7,49,10.376
    -          352,170,7,7,7,7,7,7,49,10.400
    -          353,170,7,7,7,7,7,7,49,10.425
    -          354,171,7,7,7,7,7,7,49,10.449
    -          355,171,7,7,7,7,7,7,49,10.474
    -          356,171,7,7,7,7,7,7,49,10.498
    -          357,171,7,7,7,7,7,7,49,10.522
    -          358,171,7,7,7,7,7,7,49,10.547
    -          359,171,7,7,7,7,7,7,49,10.571
    -          360,171,7,7,7,7,7,7,49,10.596
    -          361,171,7,7,7,7,7,7,49,10.620
    -          362,171,7,7,7,7,7,7,49,10.645
    -          363,171,7,7,7,7,7,7,49,10.669
    -          364,171,7,7,7,7,7,7,49,10.693
    -          365,171,7,7,7,7,7,7,49,10.718
    -          366,171,7,7,7,7,7,7,49,10.742
    -          367,171,7,7,7,7,7,7,49,10.767
    -          368,171,7,7,7,7,7,7,49,10.791
    -          369,171,7,7,7,7,7,7,49,10.815
    -          370,171,7,7,7,7,7,7,49,10.840
    -          371,172,7,7,7,7,7,7,49,10.864
    -          372,172,7,7,7,7,7,7,49,10.889
    -          373,172,7,7,7,7,7,7,49,10.913
    -          374,172,7,7,7,7,7,7,49,10.938
    -          375,172,7,7,7,7,7,7,49,10.962
    -          376,172,7,7,7,7,7,7,49,10.986
    -          377,172,7,7,7,7,7,7,49,11.011
    -          378,172,7,7,7,7,7,7,49,11.035
    -          379,172,7,7,7,7,7,7,49,11.060
    -          380,172,7,7,7,7,7,7,49,11.084
    -          381,172,7,7,7,7,7,7,49,11.108
    -          382,172,7,7,7,7,7,7,49,11.133
    -          383,172,7,7,7,7,7,7,49,11.157
    -          384,172,7,7,7,7,7,7,49,11.182
    -          385,172,7,7,7,7,7,7,49,11.206
    -          386,172,7,7,7,7,7,7,49,11.230
    -          387,173,7,7,7,7,7,7,49,11.255
    -          388,173,7,7,7,7,7,7,49,11.279
    -          389,173,7,7,7,7,7,7,49,11.304
    -          390,173,7,7,7,7,7,7,49,11.328
    -          391,173,7,7,7,7,7,7,49,11.353
    -          392,173,7,7,7,7,7,7,49,11.377
    -          393,173,7,7,7,7,7,7,49,11.401
    -          394,174,7,7,7,7,7,7,49,11.426
    -          395,174,7,7,7,7,7,7,49,11.450
    -          396,174,7,7,7,7,7,7,49,11.475
    -          397,174,7,7,7,7,7,7,49,11.499
    -          398,174,7,7,7,7,7,7,49,11.523
    -          399,174,7,7,7,7,7,7,49,11.548
    -          400,175,7,7,7,7,7,7,49,11.572
    -          401,175,7,7,7,7,7,7,49,11.597
    -          402,175,7,7,7,7,7,7,49,11.621
    -          403,175,7,7,7,7,7,7,49,11.646
    -          404,175,7,7,7,7,7,7,49,11.670
    -          405,175,7,7,7,7,7,7,49,11.694
    -          406,175,7,7,7,7,7,7,49,11.719
    -          407,176,7,7,7,7,7,7,49,11.743
    -          408,176,7,7,7,7,7,7,49,11.768
    -          409,176,7,7,7,7,7,7,49,11.792
    -          410,176,7,7,7,7,7,7,49,11.816
    -          411,176,7,7,7,7,7,7,49,11.841
    -          412,176,7,7,7,7,7,7,49,11.865
    -          413,176,7,7,7,7,7,7,49,11.890
    -          414,176,7,7,7,7,7,7,49,11.914
    -          415,176,7,7,7,7,7,7,49,11.938
    -          416,176,7,7,7,7,7,7,49,11.963
    -          417,176,7,7,7,7,7,7,49,11.987
    -          418,176,7,7,7,7,7,7,49,12.012
    -          419,176,7,7,7,7,7,7,49,12.036
    -          420,176,7,7,7,7,7,7,49,12.061
    -          421,176,7,7,7,7,7,7,49,12.085
    -          422,176,7,7,7,7,7,7,49,12.109
    -          423,176,7,7,7,7,7,7,49,12.134
    -          424,176,7,7,7,7,7,7,49,12.158
    -          425,176,7,7,7,7,7,7,49,12.183
    -          426,176,7,7,7,7,7,7,49,12.207
    -          427,176,7,7,7,7,7,7,49,12.231
    -          428,176,7,7,7,7,7,7,49,12.256
    -          429,176,7,7,7,7,7,7,49,12.280
    -          430,176,7,7,7,7,7,7,49,12.305
    -          431,176,7,7,7,7,7,7,49,12.329
    -          432,176,7,7,7,7,7,7,49,12.354
    -          433,176,7,7,7,7,7,7,49,12.378
    -          434,176,7,7,7,7,7,7,49,12.402
    -          435,176,7,7,7,7,7,7,49,12.427
    -          436,176,7,7,7,7,7,7,49,12.451
    -          437,176,7,7,7,7,7,7,49,12.476
    -          438,176,7,7,7,7,7,7,49,12.500
    -          439,176,7,7,7,7,7,7,49,12.524
    -          440,176,7,7,7,7,7,7,49,12.549
    -          441,176,7,7,7,7,7,7,49,12.573
    -          442,176,7,7,7,7,7,7,49,12.598
    -          443,176,7,7,7,7,7,7,49,12.622
    -          444,176,7,7,7,7,7,7,49,12.646
    -          445,176,7,7,7,7,7,7,49,12.671
    -          446,176,7,7,7,7,7,7,49,12.695
    -          447,176,7,7,7,7,7,7,49,12.720
    -          448,176,7,7,7,7,7,7,49,12.744
    -          449,176,7,7,7,7,7,7,49,12.769
    -          450,176,7,7,7,7,7,7,49,12.793
    -          451,176,7,7,7,7,7,7,49,12.817
    -          452,176,7,7,7,7,7,7,49,12.842
    -          453,176,7,7,7,7,7,7,49,12.866
    -          454,176,7,7,7,7,7,7,49,12.891
    -          455,176,7,7,7,7,7,7,49,12.915
    -          456,176,7,7,7,7,7,7,49,12.939
    -          457,176,7,7,7,7,7,7,49,12.964
    -          458,176,7,7,7,7,7,7,49,12.988
    -          459,176,7,7,7,7,7,7,49,13.013
    -          460,176,7,7,7,7,7,7,49,13.037
    -          461,176,7,7,7,7,7,7,49,13.062
    -          462,176,7,7,7,7,7,7,49,13.086
    -          463,176,7,7,7,7,7,7,49,13.110
    -          464,176,7,7,7,7,7,7,49,13.135
    -          465,176,7,7,7,7,7,7,49,13.159
    -          466,176,7,7,7,7,7,7,49,13.184
    -          467,176,7,7,7,7,7,7,49,13.208
    -          468,176,7,7,7,7,7,7,49,13.232
    -          469,176,7,7,7,7,7,7,49,13.257
    -          470,175,7,7,7,7,7,7,49,13.281
    -          471,175,7,7,7,7,7,7,49,13.306
    -          472,175,7,7,7,7,7,7,49,13.330
    -          473,175,7,7,7,7,7,7,49,13.354
    -          474,175,7,7,7,7,7,7,49,13.379
    -          475,175,7,7,7,7,7,7,49,13.403
    -          476,175,7,7,7,7,7,7,49,13.428
    -          477,175,7,7,7,7,7,7,49,13.452
    -          478,175,7,7,7,7,7,7,49,13.477
    -          479,175,7,7,7,7,7,7,49,13.501
    -          480,175,7,7,7,7,7,7,49,13.525
    -          481,175,7,7,7,7,7,7,49,13.550
    -          482,174,7,7,7,7,7,7,49,13.574
    -          483,174,7,7,7,7,7,7,49,13.599
    -          484,174,7,7,7,7,7,7,49,13.623
    -          485,174,7,7,7,7,7,7,49,13.647
    -          486,174,7,7,7,7,7,7,49,13.672
    -          487,174,7,7,7,7,7,7,49,13.696
    -          488,174,7,7,7,7,7,7,49,13.721
    -          489,174,7,7,7,7,7,7,49,13.745
    -          490,174,7,7,7,7,7,7,49,13.770
    -          491,174,7,7,7,7,7,7,49,13.794
    -          492,173,7,7,7,7,7,7,49,13.818
    -          493,173,7,7,7,7,7,7,49,13.843
    -          494,173,7,7,7,7,7,7,49,13.867
    -          495,173,7,7,7,7,7,7,49,13.892
    -          496,0,0,0,0,0,0,0,0,13.916
    -          497,0,0,0,0,0,0,0,0,13.940
    -          498,0,0,0,0,0,0,0,0,13.965
    -          499,0,0,0,0,0,0,0,0,13.989
    -          500,0,0,0,0,0,0,0,0,14.014
    -          501,0,0,0,0,0,0,0,0,14.038
    -          502,0,0,0,0,0,0,0,0,14.062
    -          503,0,0,0,0,0,0,0,0,14.087
    -          504,0,0,0,0,0,0,0,0,14.111
    -          505,0,0,0,0,0,0,0,0,14.136
    -          506,0,0,0,0,0,0,0,0,14.160
    -          507,0,0,0,0,0,0,0,0,14.185
    -          508,0,0,0,0,0,0,0,0,14.209
    -          509,0,0,0,0,0,0,0,0,14.233
    -          510,0,0,0,0,0,0,0,0,14.258
    -          511,0,0,0,0,0,0,0,0,14.282
    -          512,0,0,0,0,0,0,0,0,14.307
    -          513,0,0,0,0,0,0,0,0,14.331
    -          514,0,0,0,0,0,0,0,0,14.355
    -          515,0,0,0,0,0,0,0,0,14.380
    -          516,0,0,0,0,0,0,0,0,14.404
    -          517,0,0,0,0,0,0,0,0,14.429
    -          518,170,7,7,7,7,7,7,49,14.453
    -          519,170,7,7,7,7,7,7,49,14.478
    -          520,170,7,7,7,7,7,7,49,14.502
    -          521,170,7,7,7,7,7,7,49,14.526
    -          522,170,7,7,7,7,7,7,49,14.551
    -          523,170,7,7,7,7,7,7,49,14.575
    -          524,169,7,7,7,7,7,7,49,14.600
    -          525,169,7,7,7,7,7,7,49,14.624
    -          526,169,7,7,7,7,7,7,49,14.648
    -          527,169,7,7,7,7,7,7,49,14.673
    -          528,169,7,7,7,7,7,7,49,14.697
    -          529,169,7,7,7,7,7,7,49,14.722
    -          530,169,7,7,7,7,7,7,49,14.746
    -          531,169,7,7,7,7,7,7,49,14.771
    -          532,168,7,7,7,7,7,7,49,14.795
    -          533,168,7,7,7,7,7,7,49,14.819
    -          534,168,7,7,7,7,7,7,49,14.844
    -          535,168,7,7,7,7,7,7,49,14.868
    -          536,168,7,7,7,7,7,7,49,14.893
    -          537,168,7,7,7,7,7,7,49,14.917
    -          538,168,7,7,7,7,7,7,49,14.941
    -          539,168,7,7,7,7,7,7,49,14.966
    -          540,168,7,7,7,7,7,7,49,14.990
    -          541,167,7,7,7,7,7,7,49,15.015
    -          542,167,7,7,7,7,7,7,49,15.039
    -          543,167,7,7,7,7,7,7,49,15.063
    -          544,167,7,7,7,7,7,7,49,15.088
    -          545,167,7,7,7,7,7,7,49,15.112
    -          546,167,7,7,7,7,7,7,49,15.137
    -          547,167,7,7,7,7,7,7,49,15.161
    -          548,167,7,7,7,7,7,7,49,15.186
    -          549,166,7,7,7,7,7,7,49,15.210
    -          550,166,7,7,7,7,7,7,49,15.234
    -          551,166,7,7,7,7,7,7,49,15.259
    -          552,166,7,7,7,7,7,7,49,15.283
    -          553,166,7,7,7,7,7,7,49,15.308
    -          554,166,7,7,7,7,7,7,49,15.332
    -          555,166,7,7,7,7,7,7,49,15.356
    -          556,166,7,7,7,7,7,7,49,15.381
    -          557,166,7,7,7,7,7,7,49,15.405
    -          558,165,7,7,7,7,7,7,49,15.430
    -          559,165,7,7,7,7,7,7,49,15.454
    -          560,165,7,7,7,7,7,7,49,15.479
    -          561,165,7,7,7,7,7,7,49,15.503
    -          562,165,7,7,7,7,7,7,49,15.527
    -          563,165,7,7,7,7,7,7,49,15.552
    -          564,165,7,7,7,7,7,7,49,15.576
    -          565,165,7,7,7,7,7,7,49,15.601
    -          566,165,7,7,7,7,7,7,49,15.625
    -          567,164,7,7,7,7,7,7,49,15.649
    -          568,164,7,7,7,7,7,7,49,15.674
    -          569,164,7,7,7,7,7,7,49,15.698
    -          570,164,7,7,7,7,7,7,49,15.723
    -          571,164,7,7,7,7,7,7,49,15.747
    -          572,164,7,7,7,7,7,7,49,15.771
    -          573,164,7,7,7,7,7,7,49,15.796
    -          574,164,7,7,7,7,7,7,49,15.820
    -          575,164,7,7,7,7,7,7,49,15.845
    -          576,163,7,7,7,7,7,7,49,15.869
    -          577,163,7,7,7,7,7,7,49,15.894
    -          578,163,7,7,7,7,7,7,49,15.918
    -          579,163,7,7,7,7,7,7,49,15.942
    -          580,163,7,7,7,7,7,7,49,15.967
    -          581,163,7,7,7,7,7,7,49,15.991
    -          582,163,7,7,7,7,7,7,49,16.016
    -          583,162,7,7,7,7,7,7,49,16.040
    -          584,162,7,7,7,7,7,7,49,16.064
    -          585,162,7,7,7,7,7,7,49,16.089
    -          586,162,7,7,7,7,7,7,49,16.113
    -          587,162,7,7,7,7,7,7,49,16.138
    -          588,162,7,7,7,7,7,7,49,16.162
    -          589,162,7,7,7,7,7,7,49,16.187
    -          590,161,7,7,7,7,7,7,49,16.211
    -          591,161,7,7,7,7,7,7,49,16.235
    -          592,161,7,7,7,7,7,7,49,16.260
    -          593,161,7,7,7,7,7,7,49,16.284
    -          594,161,7,7,7,7,7,7,49,16.309
    -          595,161,7,7,7,7,7,7,49,16.333
    -          596,160,7,7,7,7,7,7,49,16.357
    -          597,160,7,7,7,7,7,7,49,16.382
    -          598,160,7,7,7,7,7,7,49,16.406
    -          599,160,7,7,7,7,7,7,49,16.431
    -          600,160,7,7,7,7,7,7,49,16.455
    -          601,159,7,7,7,7,7,7,49,16.479
    -          602,159,7,7,7,7,7,7,49,16.504
    -          603,159,7,7,7,7,7,7,49,16.528
    -          604,159,7,7,7,7,7,7,49,16.553
    -          605,159,7,7,7,7,7,7,49,16.577
    -          606,159,7,7,7,7,7,7,49,16.602
    -          607,158,7,7,7,7,7,7,49,16.626
    -          608,158,7,7,7,7,7,7,49,16.650
    -          609,158,7,7,7,7,7,7,49,16.675
    -          610,158,7,7,7,7,7,7,49,16.699
    -          611,158,7,7,7,7,7,7,49,16.724
    -          612,158,7,7,7,7,7,7,49,16.748
    -          613,157,7,7,7,7,7,7,49,16.772
    -          614,157,7,7,7,7,7,7,49,16.797
    -          615,157,7,7,7,7,7,7,49,16.821
    -          616,157,7,7,7,7,7,7,49,16.846
    -          617,157,7,7,7,7,7,7,49,16.870
    -          618,157,7,7,7,7,7,7,49,16.895
    -          619,156,7,7,7,7,7,7,49,16.919
    -          620,156,7,7,7,7,7,7,49,16.943
    -          621,156,7,7,7,7,7,7,49,16.968
    -          622,156,7,7,7,7,7,7,49,16.992
    -          623,156,7,7,7,7,7,7,49,17.017
    -          624,156,7,7,7,7,7,7,49,17.041
    -          625,155,7,7,7,7,7,7,49,17.065
    -          626,155,7,7,7,7,7,7,49,17.090
    -          627,155,7,7,7,7,7,7,49,17.114
    -          628,155,7,7,7,7,7,7,49,17.139
    -          629,155,7,7,7,7,7,7,49,17.163
    -          630,155,7,7,7,7,7,7,49,17.188
    -          631,154,7,7,7,7,7,7,49,17.212
    -          632,154,7,7,7,7,7,7,49,17.236
    -          633,154,7,7,7,7,7,7,49,17.261
    -          634,154,7,7,7,7,7,7,49,17.285
    -          635,154,7,7,7,7,7,7,49,17.310
    -          636,154,7,7,7,7,7,7,49,17.334
    -          637,153,7,7,7,7,7,7,49,17.358
    -          638,153,7,7,7,7,7,7,49,17.383
    -          639,153,7,7,7,7,7,7,49,17.407
    -          640,153,7,7,7,7,7,7,49,17.432
    -          641,153,7,7,7,7,7,7,49,17.456
    -          642,153,7,7,7,7,7,7,49,17.480
    -          643,152,7,7,7,7,7,7,49,17.505
    -          644,152,7,7,7,7,7,7,49,17.529
    -          645,152,7,7,7,7,7,7,49,17.554
    -          646,152,7,7,7,7,7,7,49,17.578
    -          647,152,7,7,7,7,7,7,49,17.603
    -          648,152,7,7,7,7,7,7,49,17.627
    -          649,152,7,7,7,7,7,7,49,17.651
    -          650,151,7,7,7,7,7,7,49,17.676
    -          651,151,7,7,7,7,7,7,49,17.700
    -          652,151,7,7,7,7,7,7,49,17.725
    -          653,151,7,7,7,7,7,7,49,17.749
    -          654,151,7,7,7,7,7,7,49,17.773
    -          655,151,7,7,7,7,7,7,49,17.798
    -          656,150,7,7,7,7,7,7,49,17.822
    -          657,150,7,7,7,7,7,7,49,17.847
    -          658,150,7,7,7,7,7,7,49,17.871
    -          659,150,7,7,7,7,7,7,49,17.896
    -          660,150,7,7,7,7,7,7,49,17.920
    -          661,150,7,7,7,7,7,7,49,17.944
    -          662,149,7,7,7,7,7,7,49,17.969
    -          663,0,0,0,0,0,0,0,0,17.993
    -          664,0,0,0,0,0,0,0,0,18.018
    -          665,0,0,0,0,0,0,0,0,18.042
    -          666,0,0,0,0,0,0,0,0,18.066
    -          667,0,0,0,0,0,0,0,0,18.091
    -          668,0,0,0,0,0,0,0,0,18.115
    -          669,0,0,0,0,0,0,0,0,18.140
    -          670,0,0,0,0,0,0,0,0,18.164
    -          671,0,0,0,0,0,0,0,0,18.188
    -          672,0,0,0,0,0,0,0,0,18.213
    -          673,0,0,0,0,0,0,0,0,18.237
    -          674,0,0,0,0,0,0,0,0,18.262
    -          675,147,7,7,7,7,7,7,49,18.286
    -          676,147,7,7,7,7,7,7,49,18.311
    -          677,147,7,7,7,7,7,7,49,18.335
    -          678,147,7,7,7,7,7,7,49,18.359
    -          679,147,7,7,7,7,7,7,49,18.384
    -          680,147,7,7,7,7,7,7,49,18.408
    -          681,146,7,7,7,7,7,7,49,18.433
    -          682,146,7,7,7,7,7,7,49,18.457
    -          683,146,7,7,7,7,7,7,49,18.481
    -          684,146,7,7,7,7,7,7,49,18.506
    -          685,146,7,7,7,7,7,7,49,18.530
    -          686,146,7,7,7,7,7,7,49,18.555
    -          687,146,7,7,7,7,7,7,49,18.579
    -          688,145,7,7,7,7,7,7,49,18.604
    -          689,145,7,7,7,7,7,7,49,18.628
    -          690,145,7,7,7,7,7,7,49,18.652
    -          691,145,7,7,7,7,7,7,49,18.677
    -          692,145,7,7,7,7,7,7,49,18.701
    -          693,145,7,7,7,7,7,7,49,18.726
    -          694,145,7,7,7,7,7,7,49,18.750
    -          695,144,7,7,7,7,7,7,49,18.774
    -          696,144,7,7,7,7,7,7,49,18.799
    -          697,144,7,7,7,7,7,7,49,18.823
    -          698,144,7,7,7,7,7,7,49,18.848
    -          699,144,7,7,7,7,7,7,49,18.872
    -          700,144,7,7,7,7,7,7,49,18.896
    -          701,143,7,7,7,7,7,7,49,18.921
    -          702,143,7,7,7,7,7,7,49,18.945
    -          703,143,7,7,7,7,7,7,49,18.970
    -          704,143,7,7,7,7,7,7,49,18.994
    -          705,143,7,7,7,7,7,7,49,19.019
    -          706,143,7,7,7,7,7,7,49,19.043
    -          707,143,7,7,7,7,7,7,49,19.067
    -          708,142,7,7,7,7,7,7,49,19.092
    -          709,142,7,7,7,7,7,7,49,19.116
    -          710,142,7,7,7,7,7,7,49,19.141
    -          711,142,7,7,7,7,7,7,49,19.165
    -          712,142,7,7,7,7,7,7,49,19.189
    -          713,142,7,7,7,7,7,7,49,19.214
    -          714,141,7,7,7,7,7,7,49,19.238
    -          715,141,7,7,7,7,7,7,49,19.263
    -          716,141,7,7,7,7,7,7,49,19.287
    -          717,141,7,7,7,7,7,7,49,19.312
    -          718,141,7,7,7,7,7,7,49,19.336
    -          719,141,7,7,7,7,7,7,49,19.360
    -          720,141,7,7,7,7,7,7,49,19.385
    -          721,140,7,7,7,7,7,7,49,19.409
    -          722,140,7,7,7,7,7,7,49,19.434
    -          723,140,7,7,7,7,7,7,49,19.458
    -          724,140,7,7,7,7,7,7,49,19.482
    -          725,140,7,7,7,7,7,7,49,19.507
    -          726,140,7,7,7,7,7,7,49,19.531
    -          727,139,7,7,7,7,7,7,49,19.556
    -          728,139,7,7,7,7,7,7,49,19.580
    -          729,139,7,7,7,7,7,7,49,19.604
    -          730,139,7,7,7,7,7,7,49,19.629
    -          731,139,7,7,7,7,7,7,49,19.653
    -          732,139,7,7,7,7,7,7,49,19.678
    -          733,139,7,7,7,7,7,7,49,19.702
    -          734,138,7,7,7,7,7,7,49,19.727
    -          735,138,7,7,7,7,7,7,49,19.751
    -          736,138,7,7,7,7,7,7,49,19.775
    -          737,138,7,7,7,7,7,7,49,19.800
    -          738,138,7,7,7,7,7,7,49,19.824
    -          739,138,7,7,7,7,7,7,49,19.849
    -          740,138,7,7,7,7,7,7,49,19.873
    -          741,137,7,7,7,7,7,7,49,19.897
    -          742,137,7,7,7,7,7,7,49,19.922
    -          743,137,7,7,7,7,7,7,49,19.946
    -          744,137,7,7,7,7,7,7,49,19.971
    -          745,137,7,7,7,7,7,7,49,19.995
    -          746,137,7,7,7,7,7,7,49,20.020
    -          747,137,7,7,7,7,7,7,49,20.044
    -          748,137,7,7,7,7,7,7,49,20.068
    -          749,136,7,7,7,7,7,7,49,20.093
    -          750,136,7,7,7,7,7,7,49,20.117
    -          751,136,7,7,7,7,7,7,49,20.142
    -          752,136,7,7,7,7,7,7,49,20.166
    -          753,136,6,6,6,6,6,6,36,20.190
    -          754,136,6,6,6,6,6,6,36,20.215
    -          755,136,6,6,6,6,6,6,36,20.239
    -          756,136,6,6,6,6,6,6,36,20.264
    -          757,136,5,5,5,5,5,5,25,20.288
    -          758,135,5,5,5,5,5,5,25,20.312
    -          759,135,6,6,6,6,6,6,36,20.337
    -          760,135,6,6,6,6,6,6,36,20.361
    -          761,135,6,6,6,6,6,6,36,20.386
    -          762,135,6,6,6,6,6,6,36,20.410
    -          763,135,7,7,7,7,7,7,49,20.435
    -          764,135,7,7,7,7,7,7,49,20.459
    -          765,135,7,7,7,7,7,7,49,20.483
    -          766,135,7,7,7,7,7,7,49,20.508
    -          767,135,7,7,7,7,7,7,49,20.532
    -          768,135,7,7,7,7,7,7,49,20.557
    -          769,134,7,7,7,7,7,7,49,20.581
    -          770,134,7,7,7,7,7,7,49,20.605
    -          771,134,7,7,7,7,7,7,49,20.630
    -          772,134,7,7,7,7,7,7,49,20.654
    -          773,134,7,7,7,7,7,7,49,20.679
    -          774,134,7,7,7,7,7,7,49,20.703
    -          775,134,7,7,7,7,7,7,49,20.728
    -          776,134,7,7,7,7,7,7,49,20.752
    -          777,134,7,7,7,7,7,7,49,20.776
    -          778,134,7,7,7,7,7,7,49,20.801
    -          779,134,7,7,7,7,7,7,49,20.825
    -          780,134,7,7,7,7,7,7,49,20.850
    -          781,134,7,7,7,7,7,7,49,20.874
    -          782,134,7,7,7,7,7,7,49,20.898
    -          783,0,0,0,0,0,0,0,0,20.923
    -          784,0,0,0,0,0,0,0,0,20.947
    -          785,0,0,0,0,0,0,0,0,20.972
    -          786,0,0,0,0,0,0,0,0,20.996
    -          787,0,0,0,0,0,0,0,0,21.021
    -          788,0,0,0,0,0,0,0,0,21.045
    -          789,0,0,0,0,0,0,0,0,21.069
    -          790,0,0,0,0,0,0,0,0,21.094
    -          791,0,0,0,0,0,0,0,0,21.118
    -          792,0,0,0,0,0,0,0,0,21.143
    -          793,0,0,0,0,0,0,0,0,21.167
    -          794,0,0,0,0,0,0,0,0,21.191
    -          795,0,0,0,0,0,0,0,0,21.216
    -          796,0,0,0,0,0,0,0,0,21.240
    -          797,0,0,0,0,0,0,0,0,21.265
    -          798,0,0,0,0,0,0,0,0,21.289
    -          799,0,0,0,0,0,0,0,0,21.313
    -          800,0,0,0,0,0,0,0,0,21.338
    -          801,0,0,0,0,0,0,0,0,21.362
    -          802,0,0,0,0,0,0,0,0,21.387
    -          803,0,0,0,0,0,0,0,0,21.411
    -          804,0,0,0,0,0,0,0,0,21.436
    -          805,0,0,0,0,0,0,0,0,21.460
    -          806,0,0,0,0,0,0,0,0,21.484
    -          807,0,0,0,0,0,0,0,0,21.509
    -          808,0,0,0,0,0,0,0,0,21.533
    -          809,132,7,7,7,7,7,7,49,21.558
    -          810,132,7,7,7,7,7,7,49,21.582
    -          811,132,7,7,7,7,7,7,49,21.606
    -          812,132,7,7,7,7,7,7,49,21.631
    -          813,132,7,7,7,7,7,7,49,21.655
    -          814,132,7,7,7,7,7,7,49,21.680
    -          815,132,7,7,7,7,7,7,49,21.704
    -          816,132,7,7,7,7,7,7,49,21.729
    -          817,132,7,7,7,7,7,7,49,21.753
    -          818,132,7,7,7,7,7,7,49,21.777
    -          819,132,7,7,7,7,7,7,49,21.802
    -          820,132,7,7,7,7,7,7,49,21.826
    -          821,132,7,7,7,7,7,7,49,21.851
    -          822,132,7,7,7,7,7,7,49,21.875
    -          823,132,7,7,7,7,7,7,49,21.899
    -          824,131,7,7,7,7,7,7,49,21.924
    -          825,131,7,7,7,7,7,7,49,21.948
    -          826,131,7,7,7,7,7,7,49,21.973
    -          827,131,7,7,7,7,7,7,49,21.997
    -          828,131,7,7,7,7,7,7,49,22.021
    -          829,131,7,7,7,7,7,7,49,22.046
    -          830,131,7,7,7,7,7,7,49,22.070
    -          831,131,7,7,7,7,7,7,49,22.095
    -          832,131,7,7,7,7,7,7,49,22.119
    -          833,131,7,7,7,7,7,7,49,22.144
    -          834,131,7,7,7,7,7,7,49,22.168
    -          835,131,7,7,7,7,7,7,49,22.192
    -          836,131,7,7,7,7,7,7,49,22.217
    -          837,131,7,7,7,7,7,7,49,22.241
    -          838,131,7,7,7,7,7,7,49,22.266
    -          839,131,7,7,7,7,7,7,49,22.290
    -          840,131,7,7,7,7,7,7,49,22.314
    -          841,131,7,7,7,7,7,7,49,22.339
    -          842,131,7,7,7,7,7,7,49,22.363
    -          843,131,7,7,7,7,7,7,49,22.388
    -          844,131,7,7,7,7,7,7,49,22.412
    -          845,131,7,7,7,7,7,7,49,22.437
    -          846,131,7,7,7,7,7,7,49,22.461
    -          847,131,7,7,7,7,7,7,49,22.485
    -          848,131,7,7,7,7,7,7,49,22.510
    -          849,131,7,7,7,7,7,7,49,22.534
    -          850,131,7,7,7,7,7,7,49,22.559
    -          851,131,7,7,7,7,7,7,49,22.583
    -          852,131,7,7,7,7,7,7,49,22.607
    -          853,131,7,7,7,7,7,7,49,22.632
    -          854,131,7,7,7,7,7,7,49,22.656
    -          855,131,7,7,7,7,7,7,49,22.681
    -          856,131,7,7,7,7,7,7,49,22.705
    -          857,131,7,7,7,7,7,7,49,22.729
    -          858,131,7,7,7,7,7,7,49,22.754
    -          859,131,7,7,7,7,7,7,49,22.778
    -          860,131,7,7,7,7,7,7,49,22.803
    -          861,131,7,7,7,7,7,7,49,22.827
    -          862,131,7,7,7,7,7,7,49,22.852
    -          863,131,7,7,7,7,7,7,49,22.876
    -          864,132,7,7,7,7,7,7,49,22.900
    -          865,132,7,7,7,7,7,7,49,22.925
    -          866,132,7,7,7,7,7,7,49,22.949
    -          867,132,7,7,7,7,7,7,49,22.974
    -          868,132,7,7,7,7,7,7,49,22.998
    -          869,132,7,7,7,7,7,7,49,23.022
    -          870,132,7,7,7,7,7,7,49,23.047
    -          871,132,7,7,7,7,7,7,49,23.071
    -          872,132,7,7,7,7,7,7,49,23.096
    -          873,132,7,7,7,7,7,7,49,23.120
    -          874,132,7,7,7,7,7,7,49,23.145
    -          875,132,7,7,7,7,7,7,49,23.169
    -          876,132,7,7,7,7,7,7,49,23.193
    -          877,132,7,7,7,7,7,7,49,23.218
    -          878,132,7,7,7,7,7,7,49,23.242
    -          879,132,7,7,7,7,7,7,49,23.267
    -          880,132,7,7,7,7,7,7,49,23.291
    -          881,132,7,7,7,7,7,7,49,23.315
    -          882,133,7,7,7,7,7,7,49,23.340
    -          883,133,7,7,7,7,7,7,49,23.364
    -          884,133,7,7,7,7,7,7,49,23.389
    -          885,133,7,7,7,7,7,7,49,23.413
    -          886,133,7,7,7,7,7,7,49,23.438
    -          887,133,7,7,7,7,7,7,49,23.462
    -          888,133,7,7,7,7,7,7,49,23.486
    -          889,133,7,7,7,7,7,7,49,23.511
    -          890,133,7,7,7,7,7,7,49,23.535
    -          891,133,7,7,7,7,7,7,49,23.560
    -          892,133,7,7,7,7,7,7,49,23.584
    -          893,133,7,7,7,7,7,7,49,23.608
    -          894,133,7,7,7,7,7,7,49,23.633
    -          895,133,7,7,7,7,7,7,49,23.657
    -          896,133,7,7,7,7,7,7,49,23.682
    -          897,133,7,7,7,7,7,7,49,23.706
    -          898,133,7,7,7,7,7,7,49,23.730
    -          899,133,7,7,7,7,7,7,49,23.755
    -          900,133,7,7,7,7,7,7,49,23.779
    -          901,133,7,7,7,7,7,7,49,23.804
    -          902,133,7,7,7,7,7,7,49,23.828
    -          903,133,7,7,7,7,7,7,49,23.853
    -          904,134,7,7,7,7,7,7,49,23.877
    -          905,134,7,7,7,7,7,7,49,23.901
    -          906,134,7,7,7,7,7,7,49,23.926
    -          907,134,7,7,7,7,7,7,49,23.950
    -          908,134,7,7,7,7,7,7,49,23.975
    -          909,134,7,7,7,7,7,7,49,23.999
    -          910,134,7,7,7,7,7,7,49,24.023
    -          911,134,7,7,7,7,7,7,49,24.048
    -          912,134,7,7,7,7,7,7,49,24.072
    -          913,134,7,7,7,7,7,7,49,24.097
    -          914,134,7,7,7,7,7,7,49,24.121
    -          915,134,7,7,7,7,7,7,49,24.146
    -          916,134,7,7,7,7,7,7,49,24.170
    -          917,134,7,7,7,7,7,7,49,24.194
    -          918,134,7,7,7,7,7,7,49,24.219
    -          919,135,7,7,7,7,7,7,49,24.243
    -          920,135,7,7,7,7,7,7,49,24.268
    -          921,135,7,7,7,7,7,7,49,24.292
    -          922,135,7,7,7,7,7,7,49,24.316
    -          923,135,7,7,7,7,7,7,49,24.341
    -          924,135,7,7,7,7,7,7,49,24.365
    -          925,135,7,7,7,7,7,7,49,24.390
    -          926,135,7,7,7,7,7,7,49,24.414
    -          927,135,7,7,7,7,7,7,49,24.438
    -          928,135,7,7,7,7,7,7,49,24.463
    -          929,136,7,7,7,7,7,7,49,24.487
    -          930,136,7,7,7,7,7,7,49,24.512
    -          931,136,7,7,7,7,7,7,49,24.536
    -          932,136,7,7,7,7,7,7,49,24.561
    -          933,136,7,7,7,7,7,7,49,24.585
    -          934,136,7,7,7,7,7,7,49,24.609
    -          935,136,7,7,7,7,7,7,49,24.634
    -          936,136,7,7,7,7,7,7,49,24.658
    -          937,136,7,7,7,7,7,7,49,24.683
    -          938,137,7,7,7,7,7,7,49,24.707
    -          939,137,7,7,7,7,7,7,49,24.731
    -          940,137,7,7,7,7,7,7,49,24.756
    -          941,137,7,7,7,7,7,7,49,24.780
    -          942,0,0,0,0,0,0,0,0,24.805
    -          943,0,0,0,0,0,0,0,0,24.829
    -          944,0,0,0,0,0,0,0,0,24.854
    -          945,0,0,0,0,0,0,0,0,24.878
    -          946,0,0,0,0,0,0,0,0,24.902
    -          947,0,0,0,0,0,0,0,0,24.927
    -          948,0,0,0,0,0,0,0,0,24.951
    -          949,0,0,0,0,0,0,0,0,24.976
    -          950,0,0,0,0,0,0,0,0,25.000
    -          951,0,0,0,0,0,0,0,0,25.024
    -          952,0,0,0,0,0,0,0,0,25.049
    -          953,0,0,0,0,0,0,0,0,25.073
    -          954,123,7,7,7,7,7,7,49,25.098
    -          955,123,7,7,7,7,7,7,49,25.122
    -          956,123,7,7,7,7,7,7,49,25.146
    -          957,123,7,7,7,7,7,7,49,25.171
    -          958,123,7,7,7,7,7,7,49,25.195
    -          959,124,7,7,7,7,7,7,49,25.220
    -          960,124,7,7,7,7,7,7,49,25.244
    -          961,124,7,7,7,7,7,7,49,25.269
    -          962,124,7,7,7,7,7,7,49,25.293
    -          963,124,7,7,7,7,7,7,49,25.317
    -          964,124,7,7,7,7,7,7,49,25.342
    -          965,124,7,7,7,7,7,7,49,25.366
    -          966,124,7,7,7,7,7,7,49,25.391
    -          967,124,7,7,7,7,7,7,49,25.415
    -          968,124,7,7,7,7,7,7,49,25.439
    -          969,124,7,7,7,7,7,7,49,25.464
    -          970,124,7,7,7,7,7,7,49,25.488
    -          971,125,7,7,7,7,7,7,49,25.513
    -          972,125,7,7,7,7,7,7,49,25.537
    -          973,125,7,7,7,7,7,7,49,25.562
    -          974,125,7,7,7,7,7,7,49,25.586
    -          975,125,7,7,7,7,7,7,49,25.610
    -          976,125,7,7,7,7,7,7,49,25.635
    -          977,125,7,7,7,7,7,7,49,25.659
    -          978,125,7,7,7,7,7,7,49,25.684
    -          979,125,7,7,7,7,7,7,49,25.708
    -          980,125,7,7,7,7,7,7,49,25.732
    -          981,125,7,7,7,7,7,7,49,25.757
    -          982,125,7,7,7,7,7,7,49,25.781
    -          983,126,7,7,7,7,7,7,49,25.806
    -          984,126,7,7,7,7,7,7,49,25.830
    -          985,126,7,7,7,7,7,7,49,25.854
    -          986,126,7,7,7,7,7,7,49,25.879
    -          987,126,7,7,7,7,7,7,49,25.903
    -          988,126,7,7,7,7,7,7,49,25.928
    -          989,126,7,7,7,7,7,7,49,25.952
    -          990,126,7,7,7,7,7,7,49,25.977
    -          991,126,7,7,7,7,7,7,49,26.001
    -          992,126,7,7,7,7,7,7,49,26.025
    -          993,126,6,6,6,6,6,6,36,26.050
    -          994,126,6,6,6,6,6,6,36,26.074
    -          995,127,6,6,6,6,6,6,36,26.099
    -          996,127,6,6,6,6,6,6,36,26.123
    -          997,127,5,5,5,5,5,5,25,26.147
    -          998,127,5,5,5,5,5,5,25,26.172
    -          999,127,6,6,6,6,6,6,36,26.196
    -          1000,127,6,6,6,6,6,6,36,26.221
    -          1001,127,6,6,6,6,6,6,36,26.245
    -          1002,127,6,6,6,6,6,6,36,26.270
    -          1003,127,7,7,7,7,7,7,49,26.294
    -          1004,127,7,7,7,7,7,7,49,26.318
    -          1005,128,7,7,7,7,7,7,49,26.343
    -          1006,128,7,7,7,7,7,7,49,26.367
    -          1007,128,7,7,7,7,7,7,49,26.392
    -          1008,128,7,7,7,7,7,7,49,26.416
    -          1009,128,7,7,7,7,7,7,49,26.440
    -          1010,128,7,7,7,7,7,7,49,26.465
    -          1011,128,7,7,7,7,7,7,49,26.489
    -          1012,128,7,7,7,7,7,7,49,26.514
    -          1013,128,7,7,7,7,7,7,49,26.538
    -          1014,129,7,7,7,7,7,7,49,26.562
    -          1015,129,7,7,7,7,7,7,49,26.587
    -          1016,129,7,7,7,7,7,7,49,26.611
    -          1017,129,7,7,7,7,7,7,49,26.636
    -          1018,129,7,7,7,7,7,7,49,26.660
    -          1019,129,7,7,7,7,7,7,49,26.685
    -          1020,129,7,7,7,7,7,7,49,26.709
    -          1021,129,7,7,7,7,7,7,49,26.733
    -          1022,130,7,7,7,7,7,7,49,26.758
    -          1023,130,7,7,7,7,7,7,49,26.782
    -          1024,130,7,7,7,7,7,7,49,26.807
    -          1025,130,7,7,7,7,7,7,49,26.831
    -          1026,130,7,7,7,7,7,7,49,26.855
    -          1027,130,7,7,7,7,7,7,49,26.880
    -          1028,131,7,7,7,7,7,7,49,26.904
    -          1029,131,7,7,7,7,7,7,49,26.929
    -          1030,131,7,7,7,7,7,7,49,26.953
    -          1031,131,7,7,7,7,7,7,49,26.978
    -          1032,131,7,7,7,7,7,7,49,27.002
    -          1033,131,7,7,7,7,7,7,49,27.026
    -          1034,131,7,7,7,7,7,7,49,27.051
    -          1035,132,7,7,7,7,7,7,49,27.075
    -          1036,132,7,7,7,7,7,7,49,27.100
    -          1037,132,7,7,7,7,7,7,49,27.124
    -          1038,132,7,7,7,7,7,7,49,27.148
    -          1039,132,7,7,7,7,7,7,49,27.173
    -          1040,132,7,7,7,7,7,7,49,27.197
    -          1041,132,7,7,7,7,7,7,49,27.222
    -          1042,133,7,7,7,7,7,7,49,27.246
    -          1043,133,7,7,7,7,7,7,49,27.271
    -          1044,133,7,7,7,7,7,7,49,27.295
    -          1045,133,7,7,7,7,7,7,49,27.319
    -          1046,133,7,7,7,7,7,7,49,27.344
    -          1047,133,7,7,7,7,7,7,49,27.368
    -          1048,133,7,7,7,7,7,7,49,27.393
    -          1049,134,7,7,7,7,7,7,49,27.417
    -          1050,134,7,7,7,7,7,7,49,27.441
    -          1051,134,7,7,7,7,7,7,49,27.466
    -          1052,134,7,7,7,7,7,7,49,27.490
    -          1053,134,7,7,7,7,7,7,49,27.515
    -          1054,134,7,7,7,7,7,7,49,27.539
    -          1055,134,7,7,7,7,7,7,49,27.563
    -          1056,135,7,7,7,7,7,7,49,27.588
    -          1057,135,7,7,7,7,7,7,49,27.612
    -          1058,135,7,7,7,7,7,7,49,27.637
    -          1059,135,7,7,7,7,7,7,49,27.661
    -          1060,135,7,7,7,7,7,7,49,27.686
    -          1061,135,7,7,7,7,7,7,49,27.710
    -          1062,135,7,7,7,7,7,7,49,27.734
    -          1063,136,7,7,7,7,7,7,49,27.759
    -          1064,136,7,7,7,7,7,7,49,27.783
    -          1065,136,7,7,7,7,7,7,49,27.808
    -          1066,136,7,7,7,7,7,7,49,27.832
    -          1067,136,7,7,7,7,7,7,49,27.856
    -          1068,136,7,7,7,7,7,7,49,27.881
    -          1069,136,7,7,7,7,7,7,49,27.905
    -          1070,0,0,0,0,0,0,0,0,27.930
    -          1071,0,0,0,0,0,0,0,0,27.954
    -          1072,0,0,0,0,0,0,0,0,27.979
    -          1073,0,0,0,0,0,0,0,0,28.003
    -          1074,0,0,0,0,0,0,0,0,28.027
    -          1075,0,0,0,0,0,0,0,0,28.052
    -          1076,0,0,0,0,0,0,0,0,28.076
    -          1077,0,0,0,0,0,0,0,0,28.101
    -          1078,0,0,0,0,0,0,0,0,28.125
    -          1079,0,0,0,0,0,0,0,0,28.149
    -          1080,0,0,0,0,0,0,0,0,28.174
    -          1081,0,0,0,0,0,0,0,0,28.198
    -          1082,0,0,0,0,0,0,0,0,28.223
    -          1083,0,0,0,0,0,0,0,0,28.247
    -          1084,0,0,0,0,0,0,0,0,28.271
    -          1085,0,0,0,0,0,0,0,0,28.296
    -          1086,0,0,0,0,0,0,0,0,28.320
    -          1087,0,0,0,0,0,0,0,0,28.345
    -          1088,0,0,0,0,0,0,0,0,28.369
    -          1089,0,0,0,0,0,0,0,0,28.394
    -          1090,0,0,0,0,0,0,0,0,28.418
    -          1091,0,0,0,0,0,0,0,0,28.442
    -          1092,0,0,0,0,0,0,0,0,28.467
    -          1093,0,0,0,0,0,0,0,0,28.491
    -          1094,0,0,0,0,0,0,0,0,28.516
    -          1095,0,0,0,0,0,0,0,0,28.540
    -          1096,0,0,0,0,0,0,0,0,28.564
    -          1097,0,0,0,0,0,0,0,0,28.589
    -          1098,0,0,0,0,0,0,0,0,28.613
    -          1099,0,0,0,0,0,0,0,0,28.638
    -          1100,0,0,0,0,0,0,0,0,28.662
    -          1101,0,0,0,0,0,0,0,0,28.687
    -          1102,0,0,0,0,0,0,0,0,28.711
    -          1103,0,0,0,0,0,0,0,0,28.735
    -          1104,0,0,0,0,0,0,0,0,28.760
    -          1105,0,0,0,0,0,0,0,0,28.784
    -          1106,0,0,0,0,0,0,0,0,28.809
    -          1107,0,0,0,0,0,0,0,0,28.833
    -          1108,0,0,0,0,0,0,0,0,28.857
    -          1109,0,0,0,0,0,0,0,0,28.882
    -          1110,0,0,0,0,0,0,0,0,28.906
    -          1111,0,0,0,0,0,0,0,0,28.931
    -          1112,0,0,0,0,0,0,0,0,28.955
    -          1113,0,0,0,0,0,0,0,0,28.979
    -          1114,0,0,0,0,0,0,0,0,29.004
    -          1115,0,0,0,0,0,0,0,0,29.028
    -          1116,0,0,0,0,0,0,0,0,29.053
    -          1117,0,0,0,0,0,0,0,0,29.077
    -          1118,0,0,0,0,0,0,0,0,29.102
    -          1119,0,0,0,0,0,0,0,0,29.126
    -          1120,0,0,0,0,0,0,0,0,29.150
    -          1121,0,0,0,0,0,0,0,0,29.175
    -          1122,0,0,0,0,0,0,0,0,29.199
    -          1123,0,0,0,0,0,0,0,0,29.224
    -          1124,0,0,0,0,0,0,0,0,29.248
    -          1125,0,0,0,0,0,0,0,0,29.272
    -          1126,0,0,0,0,0,0,0,0,29.297
    -          1127,0,0,0,0,0,0,0,0,29.321
    -          1128,0,0,0,0,0,0,0,0,29.346
    -          1129,0,0,0,0,0,0,0,0,29.370
    -          1130,0,0,0,0,0,0,0,0,29.395
    -          1131,0,0,0,0,0,0,0,0,29.419
    -          1132,0,0,0,0,0,0,0,0,29.443
    -          1133,0,0,0,0,0,0,0,0,29.468
    -          1134,0,0,0,0,0,0,0,0,29.492
    -          1135,0,0,0,0,0,0,0,0,29.517
    -          1136,0,0,0,0,0,0,0,0,29.541
    -          1137,0,0,0,0,0,0,0,0,29.565
    -          1138,0,0,0,0,0,0,0,0,29.590
    -          1139,0,0,0,0,0,0,0,0,29.614
    -          1140,0,0,0,0,0,0,0,0,29.639
    -          1141,0,0,0,0,0,0,0,0,29.663
    -          1142,0,0,0,0,0,0,0,0,29.688
    -          1143,0,0,0,0,0,0,0,0,29.712
    -          1144,0,0,0,0,0,0,0,0,29.736
    -          1145,0,0,0,0,0,0,0,0,29.761
    -          1146,0,0,0,0,0,0,0,0,29.785
    -          1147,0,0,0,0,0,0,0,0,29.810
    -          1148,0,0,0,0,0,0,0,0,29.834
    -          1149,0,0,0,0,0,0,0,0,29.858
    -          1150,0,0,0,0,0,0,0,0,29.883
    -          1151,0,0,0,0,0,0,0,0,29.907
    -          1152,0,0,0,0,0,0,0,0,29.932
    -          1153,0,0,0,0,0,0,0,0,29.956
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -SEE ALSO
    -       int6ktone(1), psgraph(7), psout(1), pskey(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  psnotch(1)
    -
    - - - diff --git a/docbook/psnotch.c.html b/docbook/psnotch.c.html deleted file mode 100644 index 1685488a..00000000 --- a/docbook/psnotch.c.html +++ /dev/null @@ -1,1792 +0,0 @@ - - - - - - psnotch.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================r
    - *
    - *   psnotch.c - Atheros Prescaler Notching Utility
    - *
    - *   Atheros Powerline Toolkit;
    - *
    - *   this program is the Atheros INT6000 Dynamic Notching Utility
    - *
    - *   this program inspects the following frequency bands for SW signals:
    - *
    - *       120 m 2,300 - 2,495 kHz tropic band
    - *        90 m 3,200 - 3,400 kHz tropic band
    - *        75 m 3,900 - 4,000 kHz shared with the amateur radio 75/80 meter band
    - *        60 m 4,750 - 5,060 kHz tropic band
    - *        49 m 5,900 - 6,200 kHz
    - *        40 m/41m 7,100 - 7,350 kHz shared with the amateur radio 40 meter band
    - *        31 m 9,400 - 9,900 kHz Currently most heavily used band
    - *        25 m 11,600 - 12,100 kHz
    - *        22 m 13,570 - 13,870 kHz substantially used only in Eurasia
    - *        19 m 15,100 - 15,800 kHz
    - *        16 m 17,480 - 17,900 kHz
    - *        15 m 18,900 - 19,020 kHz almost unused, could become a DRM band
    - *        13 m 21,450 - 21,850 kHz
    - *        11 m 25,600 - 26,100 kHz may be used for local DRM broadcasting
    - *
    - *
    - *   Contributor(s):
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <ctype.h>
    -#include <math.h>
    -#include <ctype.h>
    -#include <sys/types.h>
    -#include <sys/stat.h>
    -#include <fcntl.h>
    -#include <string.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../tools/chars.h"
    -#include "../tools/number.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define _PRINTF_DEBUG
    -
    -#define PSNOTCH_VERBOSE (1 << 0)
    -#define PSNOTCH_SILENCE (1 << 1)
    -#define PSNOTCH_COMMA   (1 << 2)
    -
    -#define CARRIERS 1155
    -#define TONES 917
    -#define SLOTS 6
    -
    -#define INDEX_TO_FREQ(index) ((float)(index + 74)/40.96)
    -#define FREQ_TO_INDEX(freq)  ((unsigned)(40.96 * freq)-74)
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -typedef struct carrier
    -
    -{
    -	uint16_t amplitude;
    -	uint8_t slots [SLOTS];
    -}
    -
    -carrier;
    -typedef struct map
    -
    -{
    -	unsigned slots;
    -	struct carrier carriers [CARRIERS];
    -}
    -
    -map;
    -uint8_t hambands [CARRIERS] =
    -
    -{
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	2,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	1,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0,
    -	0
    -};
    -
    -/*====================================================================*
    - *
    - *   int read_scalers (struct map * map);
    - *
    - *   read a prescaler file from stdin; permit comments and blank
    - *   input lines; the set of prescalers are technically known as
    - *   an amplitude map;
    - *
    - *   an amplitude map consists an offset (frequency) and a scaler
    - *   (amplitude); we read, check and discard the offset but store
    - *   the scaler;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void read_scalers (struct map * map)
    -
    -{
    -	unsigned carriers = 0;
    -	unsigned tones = 0;
    -	uint32_t carrier;
    -	uint32_t amplitude;
    -	signed c;
    -	while ((c = getc (stdin)) != EOF)
    -	{
    -		if (isspace (c))
    -		{
    -			continue;
    -		}
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = getc (stdin);
    -			}
    -			while (nobreak (c));
    -			continue;
    -		}
    -		carrier = 0;
    -		while (isdigit (c))
    -		{
    -			carrier *= 10;
    -			carrier += c - '0';
    -			c = getc (stdin);
    -		}
    -		if (carrier != carriers)
    -		{
    -			error (1, 0, "Prescaler %d/%d out of order", carrier, carriers);
    -		}
    -		if (carrier >= CARRIERS)
    -		{
    -			break;
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (stdin);
    -		}
    -		amplitude = 0;
    -		while (isxdigit (c))
    -		{
    -			amplitude *= 16;
    -			amplitude += todigit (c);
    -			c = getc (stdin);
    -		}
    -		map->carriers [carrier].amplitude = amplitude;
    -		if (amplitude)
    -		{
    -			tones++;
    -		}
    -		while ((c != EOF) && (c != '\n'))
    -		{
    -			c = getc (stdin);
    -		}
    -		carriers++;
    -	}
    -	if (carriers != CARRIERS)
    -	{
    -		error (1, 0, "Have %d amplitude map carriers but need %d", carriers, CARRIERS);
    -	}
    -	if (tones != TONES)
    -	{
    -		error (1, 0, "Expected %d amplitude map scalers but read %d", TONES, tones);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void write_scalers (struct map * map);
    - *
    - *   print amplitude map on stdout in a format suitabl for input to
    - *   program psin or the Windows Device Manager;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void write_scalers (struct map * map)
    -
    -{
    -	unsigned carrier = 0;
    -	for (carrier = 0; carrier < CARRIERS; carrier++)
    -	{
    -		printf ("%.8u %.8hX\n", carrier, map->carriers [carrier].amplitude);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void read_tonemaps (struct map * map, FILE *fp);
    - *
    - *   read tone map from a file; a tonemap file can be created using
    - *   program int6ktone;
    - *
    - *   input consists of 1159 lines; the first line is a comment; the
    - *   next two lines contain GIL and AGC information; the remaining
    - *   1155 lines consist of an offset follwed by 5 or 6 slot values;
    - *
    - *   although 1155 values are read, the first 917 contain tonemap
    - *   data and rest contain 0 values; the 917 values correspond to
    - *   the 917 amplitude scalers;
    - *
    - *   the tone map may be read either before or after the amplitude
    - *   map is read;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void read_tonemaps (struct map * map, FILE *fp)
    -
    -{
    -	uint8_t slots [SLOTS];
    -	unsigned tones = 0;
    -	unsigned tone = 0;
    -	unsigned slot = 0;
    -	signed c;
    -	map->slots = SLOTS;
    -	memset (slots, 0, sizeof (slots));
    -	while ((c = getc (fp)) != EOF)
    -	{
    -		if (c == '#')
    -		{
    -			while (((c = getc (fp)) != EOF) && (c != '\n'));
    -		}
    -		if (isspace (c))
    -		{
    -			continue;
    -		}
    -		tone = 0;
    -		while (isdigit (c))
    -		{
    -			tone *= 10;
    -			tone += c - '0';
    -			c = getc (fp);
    -		}
    -		if (tone != tones)
    -		{
    -			error (1, ECANCELED, "Tonemap %d/%d is out of order", tone, tones);
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (fp);
    -		}
    -		for (slot = 0; slot < SLOTS; slot++)
    -		{
    -			unsigned value = 0;
    -			while (isdigit (c))
    -			{
    -				value *= 10;
    -				value += c - '0';
    -				c = getc (fp);
    -			}
    -			map->carriers [tone].slots [slot] = value;
    -			while (isblank (c))
    -			{
    -				c = getc (fp);
    -			}
    -		}
    -		while ((c != EOF) && (c != '\n'))
    -		{
    -			c = getc (fp);
    -		}
    -		tones++;
    -	}
    -	if (tones != TONES)
    -	{
    -		error (0, 0, "Have %d tone map carriers but need %d", tones, TONES);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void align_tones (struct map * map);
    - *
    - *   the tonemap consists of 917 consecutive carriers the amplitude
    - *   map consists of 1155 carriers having 917 non-zero values; this
    - *   function distributes the tonemap entries so that they align to
    - *   corresponding amplitude map entries;
    - *
    - *   alignment cannot be performed until both the amplitude map and
    - *   tone map have been read;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void align_tones (struct map * map)
    -
    -{
    -	unsigned carriers = CARRIERS;
    -	unsigned tones = TONES;
    -	while (carriers--)
    -	{
    -		if (map->carriers [carriers].amplitude)
    -		{
    -			if (tones)
    -			{
    -				tones--;
    -				memcpy (&map->carriers [carriers].slots, &map->carriers [tones].slots, SLOTS);
    -				memset (&map->carriers [tones].slots, 0, SLOTS);
    -			}
    -		}
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   unsigned notch_tones (struct map * scalers, unsigned lower, unsigned upper);
    - *
    - *   scan a range of tones for signals; signals are indicated by low
    - *   mean-square values computed across all slots for a given tone;
    - *
    - *   there may not be much change from one carrier to the next; we
    - *   accentuate changes by squaring then summing slot values; this
    - *   produces a reasonably clean parabolic dip in the map where the
    - *   signal occurs;
    - *
    - *   function watch_tones can be used to observe tone map values and
    - *   signal dips over a given range of map values; generally, it is
    - *   best to display a wider range of tones than those being notched;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -unsigned notch_tones (struct map * map, unsigned lower, unsigned upper, unsigned limit)
    -
    -{
    -	unsigned slot;
    -	unsigned notch = 0;
    -	while (lower < upper)
    -	{
    -		unsigned total = 0;
    -		for (slot = 0; slot < map->slots; slot++)
    -		{
    -			unsigned value = 0;
    -			value = map->carriers [lower].slots [slot];
    -			value *= value;
    -			total += value;
    -		}
    -		if (slot)
    -		{
    -			total /= slot;
    -		}
    -		if (total < limit)
    -		{
    -			map->carriers [lower].amplitude = 0;
    -			notch = 2;
    -		}
    -		lower++;
    -	}
    -	return (notch);
    -}
    -
    -/*====================================================================*
    - *
    - *   void watch_tones (struct map * map, unsigned lower, unsigned upper);
    - *
    - *   print amplitude and tone values over a given range along with a
    - *   plot of the values used to detect signal dips; for best effect,
    - *   the range used here should exceed the notching range to provide
    - *   context information;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void watch_tones (struct map * map, unsigned lower, unsigned upper)
    -
    -{
    -	unsigned slot;
    -	while (lower < upper)
    -	{
    -		unsigned total = 0;
    -		fprintf (stderr, "%04d %04X", lower, map->carriers [lower].amplitude);
    -		for (slot = 0; slot < map->slots; slot++)
    -		{
    -			unsigned value = 0;
    -			value = map->carriers [lower].slots [slot];
    -			fprintf (stderr, " %02X", value);
    -			value *= value;
    -			total += value;
    -		}
    -		if (slot)
    -		{
    -			total /= slot;
    -		}
    -		fprintf (stderr, " %6.3f ", INDEX_TO_FREQ (lower));
    -		while (total--)
    -		{
    -			fprintf (stderr, "#");
    -		}
    -		fprintf (stderr, "\n");
    -		lower++;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void watch_tone2 (struct map * map, unsigned lower, unsigned upper);
    - *
    - *   print amplitude and tone values over a given range along with a
    - *   plot of the values used to detect signal dips; for best effect,
    - *   the range used here should exceed the notching range to provide
    - *   context information;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void watch_tone2 (struct map * map, unsigned lower, unsigned upper)
    -
    -{
    -	unsigned slot;
    -	while (lower < upper)
    -	{
    -		unsigned total = 0;
    -		fprintf (stderr, "%d,%d", lower, map->carriers [lower].amplitude);
    -		for (slot = 0; slot < map->slots; slot++)
    -		{
    -			unsigned value = 0;
    -			value = map->carriers [lower].slots [slot];
    -			fprintf (stderr, ",%d", value);
    -			value *= value;
    -			total += value;
    -		}
    -		if (slot)
    -		{
    -			total /= slot;
    -		}
    -		fprintf (stderr, ",%d", total);
    -		fprintf (stderr, ",%6.3f", INDEX_TO_FREQ (lower));
    -		fprintf (stderr, "\n");
    -		lower++;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   read an amplitude map from stdin and print a notched amplitude
    - *   map on stdout; use a tone map file to determine if a signal is
    - *   present where notching chould occur; notching ranges are input
    - *   as map offsets, not carrier frequencies;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	char const * optv [] =
    -	{
    -		"cf:l:L:t:u:U:qv",
    -		PUTOPTV_S_FILTER,
    -		"Atheros Prescaler Notching Utility",
    -		"c\tcomma delimited output",
    -		"f f\tread tonemap file (f)",
    -		"t n\tthreshold is (n) units",
    -		"l n\tlower notch range is (n)",
    -		"L n\tlower graph range is (n)",
    -		"u n\tupper notch range is (n)",
    -		"U n\tupper graph range is (n)",
    -		"v\tverbose output",
    -		(char const *)(0)
    -	};
    -	struct map map;
    -	FILE * fp = (FILE *)(0);
    -	unsigned lower = CARRIERS-1;
    -	unsigned upper = 0;
    -	unsigned LOWER = 0;
    -	unsigned UPPER = CARRIERS-1;
    -	signed limit = 4;
    -	signed status = 0;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	memset (&map, 0, sizeof (map));
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'c':
    -			_setbits (flags, PSNOTCH_COMMA);
    -			break;
    -		case 'f':
    -			if ((fp = fopen (optarg, "rb")) == (FILE *)(0))
    -			{
    -				error (1, errno, "Can't open %s", optarg);
    -			}
    -			read_tonemaps (&map, fp);
    -			fclose (fp);
    -			break;
    -		case 'l':
    -			lower = (unsigned)(uintspec (optarg, 0, CARRIERS-1));
    -			break;
    -		case 'u':
    -			upper = (unsigned)(uintspec (optarg, 0, CARRIERS-1));
    -			break;
    -		case 'L':
    -			LOWER = (unsigned)(uintspec (optarg, 0, CARRIERS-1));
    -			break;
    -		case 'U':
    -			UPPER = (unsigned)(uintspec (optarg, 0, CARRIERS-1));
    -			break;
    -		case 't':
    -			limit = (signed)(uintspec (optarg, 0, 49));
    -			break;
    -		case 'q':
    -			_setbits (flags, PSNOTCH_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PSNOTCH_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argv += optind;
    -	argc -= optind;
    -	read_scalers (&map);
    -	align_tones (&map);
    -	if (_anyset (flags, PSNOTCH_COMMA))
    -	{
    -		watch_tone2 (&map, LOWER, UPPER);
    -	}
    -	else if (_anyset (flags, PSNOTCH_VERBOSE))
    -	{
    -		watch_tones (&map, LOWER, UPPER);
    -	}
    -	if (fp)
    -	{
    -		status = notch_tones (&map, lower, upper, limit);
    -	}
    -	write_scalers (&map);
    -	return (status);
    -}
    -
    -
    -
    - - - diff --git a/docbook/psnotch.sh.html b/docbook/psnotch.sh.html deleted file mode 100644 index 4b1d8be9..00000000 --- a/docbook/psnotch.sh.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - psnotch.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: scripts/pibnotch.sh
    -
    -# This is an experimental script used to test dynamic PIB notching;
    -# if you do not know what that is then you probably don't need this
    -# script;
    -
    -# ====================================================================
    -# 
    -# --------------------------------------------------------------------
    -
    -. /etc/environment
    -. ${SCRIPTS}/hardware.sh
    -. ${SCRIPTS}/firmware.sh
    -
    -# ====================================================================
    -# 
    -# ETH1 is Host Interface for Device 1
    -# ETH2 is Host Interface for Device 2
    -#
    -# PLD1 is MAC of Powerline Device 1
    -# PLD2 is MAC of Powerline Device 2
    -#
    -# PIB the PIB file used to load prescalars
    -# MAP the MAP file used to save tonemaps read from device
    -# OLD the OLD prescalars (no notches)
    -# NEW the NEW prescalars (with notches)
    -# 
    -# --------------------------------------------------------------------
    -
    -PIB=abc.pib    # the PIB file used to load prescalars
    -MAP=tonemap    # the MAP file used to save tonemaps read from device
    -OLD=scalars    # the OLD prescalars (no notches)
    -NEW=notches    # the NEW prescalars (with notches)
    -
    -# ====================================================================
    -# 1. print message;
    -# 2. load OLD prescalars into PIB
    -# 3. download and flash PIB
    -# --------------------------------------------------------------------
    -
    -echo
    -echo Setup
    -echo
    -psout ../firmware/v3.3.6.pib > ${OLD}
    -psin < ${OLD} ${PIB}
    -int6k -i ${ETH2} -P ${PIB} ${PLD1} -C2
    -
    -# ====================================================================
    -# 1. Increment loop counter and print message
    -# 2. request tonemap between PLD1 and PLD2; save in MAP
    -# 3. read OLD prescalars and write NEW prescalars based on MAP; only
    -#    notch prescalars 57 through 63 if tone threshold is below 3;
    -# 4. load NEW prescalars into PIB;
    -# 5. plot prescalars from PIB discarding unwanted lines;
    -# 6. print a message
    -# 7. download and flash PIB to apply changes;
    -# 8. wait some time
    -# 9. load OLD prescalars into PIB
    -# 10. print a message
    -# 11. download and flash PIB to sample changes;
    -# 12. wait some time
    -# 13. repeat forever;
    -# --------------------------------------------------------------------
    -
    -while [ 1 ]; do
    -	echo
    -	echo Check $((++count))
    -	echo
    -	int6ktone -qhi ${ETH2} ${PLD1} ${PLD2} > ${MAP}
    -	psnotch -v -L 40 -U 66 -l 57 -u 62 -t 3 -f ${MAP} < ${OLD} > ${NEW} 
    -	psin < ${NEW} ${PIB}
    -	psgraph ${PIB} | head -n 66 | tail -n 36
    -	echo
    -	echo blocking ...
    -	echo
    -	int6k -i ${ETH2} -P ${PIB} ${PLD1} -C2
    -	sleep 10
    -	psin < ${OLD} ${PIB}
    -	echo
    -	echo sampling ...
    -	echo
    -	int6k -i ${ETH2} -P ${PIB} ${PLD1} -C2
    -	sleep 60
    -done
    -
    -
    -
    - - - diff --git a/docbook/psout.1.html b/docbook/psout.1.html deleted file mode 100644 index 63d5e771..00000000 --- a/docbook/psout.1.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - psout.1 - - - - - - - - - -
    -psout(1)                                     Qualcomm Atheros Open Powerline Toolkit                                    psout(1)
    -
    -NAME
    -       psout - Export PIB Prescalers
    -
    -SYNOPSIS
    -       psout [options] file [>stdout]
    -
    -DESCRIPTION
    -       Export the prescaler section of a PIB file as an amplitude map suitable for input to program psin or the Qualcomm Atheros
    -       Windows Device Manager.  Prescalers are stored in the PIB in binary format but the amplitude map is  in  text  format  so
    -       that  values  may be changed using an ordinary text editor.  Program psin can be used to import an amplitude map into the
    -       original or another PIB file.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       None.
    -
    -ARGUMENTS
    -       file   The  name  of  an  Atheros Parameter Information Block (PIB) file.  This file is not modified.  By convention, PIB
    -              files have a .pib extension but this program does not enforce that convention and does  not  make  any  assumption
    -              based  on  filename or extension but the program will reject invalid PIB files.  Only one filename is permitted on
    -              the command line.
    -
    -FILES
    -       An amplitude map consists of 1155 frequency-amplitude pairs.  Each pair consists of a decimal  index  and  a  hexadecimal
    -       scaler.   The  index  represents a frequecy from 1.8 mhz through 30 mhz.  The scaler represents the amplitude attenuation
    -       applied at that frequency.  The frequency and attenuation are computed as follows.
    -
    -            frequency = 40.96 * (index + 74)
    -
    -            index = (frequency / 40.96) - 74
    -
    -            decibels = 20 * log10 (scaler / 256)
    -
    -            scaler = 256 * pow (decibels / 20)
    -
    -EXAMPLES
    -       The following example prints the prescaler section of file abc.pib on stdout as an amplitude map.  The  output  has  been
    -       abbreviated here to save space.  A single comment line identifies the prescaler source file.  Output may be directed to a
    -       text file, edited using a text editor and read into the same or another PIB file with program psin.
    -
    -          # psout abc.pib
    -          # file: abc.pib
    -          00000000 00000000
    -          00000001 00000000
    -          00000002 00000000
    -          00000003 00000000
    -          ...
    -          00000027 000000D0
    -          00000028 000000D0
    -          00000029 000000D1
    -          00000030 000000D1
    -          ...
    -          00000214 00000000
    -          00000215 00000000
    -          00000216 00000000
    -          ...
    -          00001155 00000000
    -
    -       The next example copies prescalers from file abc.pib to def.pib using a command line pipe.
    -
    -          # psout abc.pib | psin def.pib
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -       Tampering with prescaler settings may violate national or international electo-magnetic emission standards  and  lead  to
    -       fines  or  penalties.   Qualcomm  Atheros  shall  not  be  held responsible for any consequences of modifications made to
    -       prescaler sets provided to their customers.
    -
    -SEE ALSO
    -       psgraph(1), pskey(1), psin(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                    psout(1)
    -
    - - - diff --git a/docbook/psout.c.html b/docbook/psout.c.html deleted file mode 100644 index e31c9bc2..00000000 --- a/docbook/psout.c.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - psout.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   psout.c - Export PIB Prescalers;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <math.h>
    -#include <stdio.h>
    -#include <string.h>
    -#include <unistd.h>
    -#include <errno.h>
    -#include <sys/stat.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/chars.h"
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../tools/endian.h"
    -#include "../pib/pib.h"
    -#include "../plc/plc.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../pib/pibfile.c"
    -#include "../pib/pibfile1.c"
    -#include "../pib/pibfile2.c"
    -#include "../pib/pibscalers.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PSOUT_VERBOSE (1 << 0)
    -#define PSOUT_SILENCE (1 << 1)
    -
    -/*====================================================================*
    - *
    - *   void ar7x00Prescalers (struct _file_ * pib);
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void ar7x00Prescalers (struct _file_ * pib)
    -
    -{
    -
    -#if 0
    -
    -	uint32_t value;
    -	uint32_t temp;
    -	uint32_t buffer = 0;
    -	unsigned bits = 0;
    -	unsigned index = 0;
    -	if (lseek (pib->file, AMP_PRESCALER_OFFSET, SEEK_SET) != AMP_PRESCALER_OFFSET)
    -	{
    -		error (1, errno, FILE_CANTSEEK, pib->name);
    -	}
    -
    -/* no dependency on math lib */
    -
    -	while (index < AMP_CARRIERS)
    -	{
    -		if (read (pib->file, &temp, sizeof (temp)) != sizeof (temp))
    -		{
    -			error (1, errno, FILE_CANTREAD, pib->name);
    -		}
    -		temp = LE32TOH (temp);
    -		buffer |= (temp << bits);
    -		if (bits == 0)
    -		{
    -			bits = 8 * sizeof (buffer);
    -		}
    -		else
    -		{
    -			if (lseek (pib->file, -1, SEEK_CUR) == -1)
    -			{
    -				error (1, errno, "could not seek backwards");
    -			}
    -			bits += 8 * (sizeof (buffer) - 1);
    -		}
    -		while (bits >= 10)
    -		{
    -			value = (buffer & 0x000003FF);
    -			printf ("%08d %08X\n", index, value);
    -			buffer = buffer >> 10;
    -			++index;
    -			bits -= 10;
    -		}
    -	}
    -
    -#elif 0
    -
    -	uint32_t value;
    -	uint32_t temp;
    -	uint32_t buffer = 0;
    -	unsigned bits = 0;
    -	unsigned index = 0;
    -	if (lseek (pib->file, AMP_PRESCALER_OFFSET, SEEK_SET) != AMP_PRESCALER_OFFSET)
    -	{
    -		error (1, errno, FILE_CANTSEEK, pib->name);
    -	}
    -
    -/* more generic code, but requires math lib, add -lm to LFLAGS */
    -
    -	while (index < AMP_CARRIERS)
    -	{
    -		if (read (pib->file, &temp, sizeof (temp)) != sizeof (temp))
    -		{
    -			error (1, errno, FILE_CANTREAD, pib->name);
    -		}
    -		temp = LE32TOH (temp);
    -		buffer |= (temp << bits);
    -		if (lseek (pib->file, (off_t)(-ceil (bits / 8.0)), SEEK_CUR) == -1)
    -		{
    -			error (1, errno, "could not seek backwards");
    -		}
    -		bits += 8 * (sizeof (buffer) - (unsigned)(ceil (bits / 8.0)));
    -		while (bits >= 10)
    -		{
    -			value = (buffer & 0x000003FF);
    -			printf ("%08d %08X\n", index, value);
    -			buffer = buffer >> 10;
    -			++index;
    -			bits -= 10;
    -		}
    -	}
    -
    -#else
    -
    -	uint16_t upper;
    -	uint16_t lower;
    -	unsigned index = 0;
    -	byte buffer [AMP_PRESCALER_LENGTH];
    -	byte * p = buffer;
    -	if (lseek (pib->file, AMP_PRESCALER_OFFSET, SEEK_SET) != AMP_PRESCALER_OFFSET)
    -	{
    -		error (1, errno, FILE_CANTSEEK, pib->name);
    -	}
    -	if (read (pib->file, buffer, sizeof (buffer)) != sizeof (buffer))
    -	{
    -		error (1, errno, FILE_CANTREAD, pib->name);
    -	}
    -
    -/*
    - * |00000000|00111111|11112222|22222233|33333333|
    - * |01234567|89012345|67890123|45678901|23456789|
    - */
    -
    -	while (index < AMP_CARRIERS)
    -	{
    -		lower = (*p++ & 0xFF) >> 0;
    -		upper = (*p & 0x03) << 8;
    -		printf ("%08d %08X\n", index++, upper | lower);
    -		lower = (*p++ & 0xFC) >> 2;
    -		upper = (*p & 0x0F) << 6;
    -		printf ("%08d %08X\n", index++, upper | lower);
    -		lower = (*p++ & 0xF0) >> 4;
    -		upper = (*p & 0x3F) << 4;
    -		printf ("%08d %08X\n", index++, upper | lower);
    -		lower = (*p++ & 0xC0) >> 6;
    -		upper = (*p++ & 0xFF) << 2;
    -		printf ("%08d %08X\n", index++, upper | lower);
    -	}
    -
    -#endif
    -
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void int6x00Prescalers (struct _file_ * pib);
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void int6x00Prescalers (struct _file_ * pib)
    -
    -{
    -	unsigned index = 0;
    -	if (lseek (pib->file, INT_PRESCALER_OFFSET, SEEK_SET) != INT_PRESCALER_OFFSET)
    -	{
    -		error (1, errno, FILE_CANTSEEK, pib->name);
    -	}
    -	while (index < INT_CARRIERS)
    -	{
    -		uint32_t value;
    -		if (read (pib->file, &value, sizeof (value)) != sizeof (value))
    -		{
    -			error (1, errno, FILE_CANTREAD, pib->name);
    -		}
    -		printf ("%08d %08X\n", index++, LE32TOH (value));
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void qca7x00Prescalers (struct _file_ * pib);
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void qca7x00Prescalers (struct _file_ * pib)
    -{
    -	unsigned index = 0;
    -	byte buffer [QCA_PRESCALER_LENGTH];
    -	byte * p = buffer;
    -	if (lseek (pib->file, QCA_PRESCALER_OFFSET, SEEK_SET) != QCA_PRESCALER_OFFSET)
    -	{
    -		error (1, errno, FILE_CANTSEEK, pib->name);
    -	}
    -	if (read (pib->file, buffer, sizeof (buffer)) != sizeof (buffer))
    -	{
    -		error (1, errno, FILE_CANTREAD, pib->name);
    -	}
    -
    -	while (index < PLC_CARRIERS)
    -	{
    -		printf ("%08d %08x\n", index++, *p++);
    -	}
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv [])
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"",
    -		"pibfile [> scalers]",
    -		"Export PIB Prescalers",
    -		(char const *) (0)
    -	};
    -	struct _file_ pib;
    -	unsigned scalers;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc > 1)
    -	{
    -		error (1, ENOTSUP, "Only one file is permitted");
    -	}
    -	if ((argc) && (* argv))
    -	{
    -		pib.name = * argv;
    -		if ((pib.file = open (pib.name, O_BINARY|O_RDONLY)) == -1)
    -		{
    -			error (1, errno, "Can't open %s", pib.name);
    -		}
    -		if (pibfile (&pib))
    -		{
    -			error (1, errno, "Bad PIB file: %s", pib.name);
    -		}
    -		scalers = pibscalers (&pib);
    -		if (scalers == PLC_CARRIERS)
    -		{
    -			qca7x00Prescalers (&pib);
    -		}
    -		else if (scalers == AMP_CARRIERS)
    -		{
    -			ar7x00Prescalers (&pib);
    -		}
    -		else if (scalers == INT_CARRIERS)
    -		{
    -			int6x00Prescalers (&pib);
    -		}
    -		else
    -		{
    -			error (1, ENOTSUP, "Unexpected number of carriers");
    -		}
    -		close (pib.file);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/psread.c.html b/docbook/psread.c.html deleted file mode 100644 index ecee766e..00000000 --- a/docbook/psread.c.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - psread.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   uint16_t psread (uint16_t values [], uint16_t limit, FILE * fp);
    - *
    - *   pib.h
    - *
    - *   read a prescaler file and populate a scaler array;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <ctype.h>
    -#include <stdint.h>
    -
    -#include "../tools/chars.h"
    -#include "../tools/error.h"
    -#include "../tools/number.h"
    -#include "../pib/pib.h"
    -
    -uint16_t psread (uint16_t values [], uint16_t limit, FILE * fp)
    -
    -{
    -	uint16_t index = 0;
    -	uint16_t count = 0;
    -	uint32_t value = 0;
    -	signed c;
    -	while ((c = getc (fp)) != EOF)
    -	{
    -		if (isspace (c))
    -		{
    -			continue;
    -		}
    -		if ((c == '#') || (c == ';'))
    -		{
    -			do
    -			{
    -				c = getc (fp);
    -			}
    -			while ((c != '\n') && (c != EOF));
    -			continue;
    -		}
    -		index = 0;
    -		while (isdigit (c))
    -		{
    -			index *= 10;
    -			index += c - '0';
    -			c = getc (fp);
    -		}
    -		if (index != count)
    -		{
    -			error (1, ECANCELED, "Carrier %d out of order", index);
    -		}
    -		if (index >= limit)
    -		{
    -			error (1, EOVERFLOW, "Too many prescalers");
    -		}
    -		while (isblank (c))
    -		{
    -			c = getc (fp);
    -		}
    -		value = 0;
    -		while (isxdigit (c))
    -		{
    -			value *= 16;
    -			value += todigit (c);
    -			c = getc (fp);
    -		}
    -		values [index] = value;
    -		while ((c != '\n') && (c != EOF))
    -		{
    -			c = getc (fp);
    -		};
    -		count++;
    -	}
    -	return (count);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pts.sh.html b/docbook/pts.sh.html deleted file mode 100644 index 0c32e964..00000000 --- a/docbook/pts.sh.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - pts.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: scripts/pts.sh
    -
    -# This is an example PTS script for bash shells; Both Linux and Cygwin
    -# bash are suitable shells;
    -
    -# Define proper values in files hardware.sh and firmware.sh, connect
    -# two INT6300 devices that share a power strip then run this script;
    -
    -# THe script will define symbols, create a frame file and program one
    -# device as a golden node; it then enters a loop that programs the
    -# other device, runs two rate tests and resets the golden node;
    -
    -# ====================================================================
    -# host symbols;
    -# --------------------------------------------------------------------
    -
    -. /etc/environment
    -. ${SCRIPTS}/hardware.sh
    -. ${SCRIPTS}/firmware.sh
    -
    -# ====================================================================
    -# file symbols;
    -# --------------------------------------------------------------------
    -
    -CNT=1000
    -PKT=frame.hex
    -LOG=time.log
    -
    -DAK1=00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF
    -DAK2=FF:EE:DD:CC:BB:AA:99:88:77:66:55:44:33:22:11:00
    -
    -# ====================================================================
    -# create dummy ethernet frame;
    -# --------------------------------------------------------------------
    -
    -cat > ${PKT} << EOF
    -FF FF FF FF FF FF FF FF FF FF FF FF 08 00 FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -EOF
    -
    -# ====================================================================
    -# check environment;
    -# --------------------------------------------------------------------
    -
    -  if [ ! -f ${PIB} ]; then
    -	echo "File ${PIB} is missing or misplaced."
    -	exit 1
    -elif [ ! -f ${NVM} ]; then
    -	echo "File ${NVM} is missing or misplaced."
    -	exit 1
    -elif [ ! -f ${PKT} ]; then
    -	echo "File ${PKT} is missing or misplaced."
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# check connections;
    -# --------------------------------------------------------------------
    -
    -int6kwait -xqsi ${ETH1} -c10
    -if [ ${?} != 0 ]; then
    -	echo "Reference Unit is not connected."
    -	exit 1
    -fi
    -
    -int6kwait -xqsi ${ETH2} -c10
    -if [ ${?} != 0 ]; then
    -	echo "Production Unit is not connected."
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# program golden node;
    -# --------------------------------------------------------------------
    -
    -clear
    -
    -echo
    -echo Program Reference Unit
    -echo 
    -
    -MAC=00:B0:52:00:00:AA
    -NMK=$(rkey secret.key -M)
    -DAK=$(int6kid -Di ${ETH1})
    -modpib -C0 -M ${MAC} -N ${NMK} -D ${DAK1} ${PIB}
    -int6kp -i ${ETH1} -P ${PIB} -N ${NVM} -D ${DAK} -FF 
    -
    -# ====================================================================
    -# program and test devices;
    -# --------------------------------------------------------------------
    -
    -while [ 1 ]; do  
    -clear
    -echo $(date)
    -
    -echo
    -echo Program Production Unit $((++unit))
    -echo 
    -
    -MAC=00:B0:52:00:00:BB
    -NMK=$(rkey secret.key -M)
    -DAK=$(int6kid -Di ${ETH2})
    -modpib -C0 -M ${MAC} -N ${NMK} -D ${DAK2} ${PIB}
    -int6kp -i ${ETH2} -P ${PIB} -N ${NVM} -D ${DAK} -FF
    -
    -echo
    -echo Stabilize Devices
    -echo 
    -
    -int6kwait -w20
    -
    -echo
    -echo Associate Devices
    -echo 
    -
    -int6k -i ${ETH1} -B1
    -int6kwait -w3
    -int6k -i ${ETH2} -B1
    -int6kwait -rsai ${ETH2}  
    -int6kwait -rsai ${ETH2} 
    -# int6kwait -w10
    -
    -echo
    -echo Rate Test One             
    -echo
    -
    -efsu -i ${ETH1} -hd ${NIC2} ${PKT} -l ${CNT}          
    -efsu -i ${ETH2} -hd ${NIC1} ${PKT} -l ${CNT}
    -efsu -i ${ETH1} -hd ${NIC2} ${PKT} -l ${CNT}
    -efsu -i ${ETH2} -hd ${NIC1} ${PKT} -l ${CNT} 
    -int6krate -ni ${ETH2}
    -
    -echo
    -echo Reset Devices                 
    -echo
    -
    -int6k -Ri ${ETH1}
    -int6kwait -rsai ${ETH1} 
    -int6k -Ri ${ETH2}
    -int6kwait -rsai ${ETH2} 
    -
    -echo
    -echo Stabilize Devices
    -echo 
    -
    -int6kwait -w20
    -
    -echo
    -echo Rate Test Two                 
    -echo
    -
    -efsu -i ${ETH1} -hd ${NIC2} ${PKT} -l ${CNT}          
    -efsu -i ${ETH2} -hd ${NIC1} ${PKT} -l ${CNT}
    -efsu -i ${ETH1} -hd ${NIC2} ${PKT} -l ${CNT}
    -efsu -i ${ETH2} -hd ${NIC1} ${PKT} -l ${CNT} 
    -int6krate -ni ${ETH2}
    -
    -echo
    -echo Reset Reference Unit
    -echo 
    -
    -int6k -Ti ${ETH1}
    -int6kwait -w10
    -done
    -
    -
    -
    - - - diff --git a/docbook/ptsctl.1.html b/docbook/ptsctl.1.html deleted file mode 100644 index 6d0978b2..00000000 --- a/docbook/ptsctl.1.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - ptsctl.1 - - - - - - - - - -
    -ptsctl(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   ptsctl(1)
    -
    -NAME
    -       ptsctl - PTS Module Controller
    -
    -SYNOPSIS
    -       ptsctl [options]
    -
    -DESCRIPTION
    -       Set  attenuation  level on the Qualcomm Atheros Production Test System using a local RS-232 communication port.  The port
    -       settings must be configured before running this program.  Settings are 9600 baud, no parity, 8 data and 1 stop bit.   See
    -       datasheet http://www.weedtech.com/wtssr-m.pdf for more information.
    -
    -OPTIONS
    -       -f file
    -              The  name  of  the  serial  port.   On  Linux, the name is usually "/dev/ttyS[0-4]".  On OS/X, the name is usually
    -              "/dev/cua[0-4]".  On Windows, the name is "com[0-9]:".  The default is "/dev/ttyS0" on Linux and "com1:"  on  Win‐
    -              dows.   If  environment  string  "PTSCTL"  is defined then it takes precedence over the default serial port.  This
    -              option then takes precedence over either default.
    -
    -       -g attenuation
    -              The desired line/ground attenation in Decibels.  The value may be expressed in decimal,  binary,  or  hexadecimal.
    -              Binary varues start with "0b" and hexadecimal values start with "0x".  The default for this option is 127 dB.
    -
    -       -n attenuation
    -              The  desired  line/neutral attenation in Decibels.  The value may be expressed in decimal, binary, or hexadecimal.
    -              Binary varues start with "0b" and hexadecimal values start with "0x".  The default for this option is 127 dB.
    -
    -       -p power
    -              Turn on or off the Device Under Test power.  The value of power can be 1=on or 0=off.  Alternately, keywords  "on"
    -              and "off" can be used.
    -
    -       -r     Read  and  display undecorated attenuator settings on stdout.  Setting appear as two decimal integers representing
    -              the attenuation in decibels.  The line/neutral setting appears first then the line/ground setting.  This option is
    -              independent  of  options -n and -g.  If this option is present and the other are missing then settings are display
    -              but not changed.  If this setting appears with either or both of the other two then the settings are changed  then
    -              read and displayed.
    -
    -       -w wait
    -              Wait  time  in  milliseconds.   Serial  I/O  operation  are slow and a delay is needed after each write operation.
    -              Unfortunately, different operating systems require different wait times.  This options lets you adjust  the  time.
    -              The default is 10 milliseconds which should be adequate on most systems.
    -
    -EXAMPLES
    -       The  following  example turns the Device Under Test power on and configures the line/neutral attenuator for 72dB attenua‐
    -       tion.  Line ground attenation is automatically set to 127 dB since it is not specified on the command line.  Option -p is
    -       not necessary if the Device Under Test power is already on.
    -
    -          # ptsctl -p 1 -n 72
    -
    -       The  next example configures the controller for 42 dB attenuation on line/neutral and 100 dB on line/ground.  There is no
    -       needed to turn the Device Under Test on again because it remains on until turned off.
    -
    -          # ptsctl -n 42 -g 100
    -
    -       The next example configures the controller for 56 dB attenuation on line/ground and 127 dB on line/neutral, and turns the
    -       Device Under Test off.
    -
    -          # ptsctl -p off -g 56
    -
    -       The  next  example  reads  the atteuator setting and displays them on decimal format on stdout.  The line/neutral setting
    -       appears first then the line/ground setting.  In this example, line/neutral has 55 dB attenuation and line/ground has  120
    -       dB attenuation.
    -
    -          # ptsctl -r
    -          55 120
    -
    -       You  can  also set the attenuation and read it back using one command.  The next example sets line/neutral attenuation to
    -       10 db and line/ground attenuation to 50 db then reads the attenuator settings and displays them in  the  standard  order,
    -       line/neutral then line/ground.
    -
    -          # ptsctl -g 50 -r -n 10
    -          10 50
    -
    -REFERENCES
    -       Information  shown above applies to WTSSR-M Solid State Relay Module by Weeder Technologies, 90-A Beal Pkwy NW, Fort Wal‐
    -       ton Beach FL 32548 USA; Tel +44 850 863 5723.
    -
    -SEE ALSO
    -       plc(1), WTSSR-M(1), weeder(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   ptsctl(1)
    -
    - - - diff --git a/docbook/ptsctl.c.html b/docbook/ptsctl.c.html deleted file mode 100644 index 84ffd2e0..00000000 --- a/docbook/ptsctl.c.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - ptsctl.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ptsctl.c - PTS Module Controller;
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Mathieu Olivari <mathieu@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <ctype.h>
    -
    -#if defined (__linux__)
    -#	include <termios.h>
    -#elif defined (__APPLE__)
    -#	include <termios.h>
    -#elif defined (__OpenBSD__)
    -#	include <termios.h>
    -#elif defined (WIN32)
    -#	include <windows.h>
    -#else
    -#error "Unknown Environment"
    -#endif
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/timer.h"
    -#include "../tools/files.h"
    -#include "../tools/flags.h"
    -#include "../tools/timer.h"
    -#include "../tools/error.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/synonym.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define PTSCTL_DEBUG 0
    -#define PTSCTL_UNITS "CBA"
    -#define PTSCTL_LEDS 5
    -#define PTSCTL_BITS 7
    -#define PTSCTL_WAIT 50
    -#define PTSCTL_ECHO 0
    -#define PTSCTL_MODE 1
    -
    -#define PTSCTL_LINE_ATTN 127
    -#define PTSCTL_GRND_ATTN 127
    -
    -#define PTSCTL_BUFFER_SIZE 10
    -#define PTSCTL_STRING_SIZE 15
    -
    -#ifdef WIN32
    -#	define PTSCTL_PORT "com1:"
    -#else
    -#	define PTSCTL_PORT "/dev/ttyS0"
    -#endif
    -
    -#define PTSCTL_SILENCE (1 << 0)
    -#define PTSCTL_VERBOSE (1 << 1)
    -#define PTSCTL_CHANGE  (1 << 2)
    -#define PTSCTL_DISPLAY (1 << 3)
    -#define PTSCTL_ITERATE (1 << 4)
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static const struct _term_ modes [] =
    -
    -{
    -	{
    -		"off",
    -		"0"
    -	},
    -	{
    -		"on",
    -		"1"
    -	}
    -};
    -
    -static char buffer [PTSCTL_BUFFER_SIZE];
    -static char string [PTSCTL_STRING_SIZE];
    -static signed length = 0;
    -static signed offset = 0;
    -
    -/*====================================================================*
    - *
    - *   void cycle (char * string, unsigned offset, unsigned length);
    - *
    - *   rotate a number of consecutive characters starting at a given
    - *   offset within a string; this is used to shift the character,
    - *   that represents the power on/off bit, out of the way during
    - *   data conversions from binary to ASCII and ASCII to binary;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void cycle (char * string, unsigned offset, unsigned length)
    -
    -{
    -	signed c = string [offset];
    -	memcpy (&string [offset], &string [offset + 1], length);
    -	string [offset + length] = c;
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function1 (struct _file_ * port, char const * units, unsigned wait, unsigned echo);
    - *
    - *   send echo command to Weeder Solid State Relay modules in an order
    - *   specified by units;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function1 (struct _file_ * port, char const * units, unsigned wait, unsigned echo)
    -
    -{
    -	extern char buffer [PTSCTL_BUFFER_SIZE];
    -	extern signed length;
    -	while (*units)
    -	{
    -		length = 0;
    -		buffer [length++] = *units++;
    -		buffer [length++] = 'X';
    -		buffer [length++] = '0' + (echo & 1);
    -		buffer [length++] = '\r';
    -		if (write (port->file, buffer, length) != length)
    -		{
    -			error (1, errno, FILE_CANTSAVE, port->name);
    -		}
    -		SLEEP (wait);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function2 (struct _file_ * port, char const * units, unsigned wait, unsigned data);
    - *
    - *   send write command to Weeder Solid State Relay modules in an
    - *   order specified by units;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function2 (struct _file_ * port, char const * units, unsigned wait, unsigned data)
    -
    -{
    -	extern char buffer [PTSCTL_BUFFER_SIZE];
    -	extern char string [PTSCTL_STRING_SIZE];
    -	extern signed length;
    -	extern signed offset;
    -	memset (string, 0, sizeof (string));
    -	memset (buffer, 0, sizeof (buffer));
    -	for (offset = 0; offset < (signed)(sizeof (string)); offset++)
    -	{
    -		string [offset] = '0' + (data & 1);
    -		data >>= 1;
    -	}
    -	cycle (string, 0, 5);
    -	for (offset = 0; *units; offset += PTSCTL_LEDS)
    -	{
    -		length = 0;
    -		buffer [length++] = *units++;
    -		buffer [length++] = 'W';
    -		memcpy (&buffer [length], &string [offset], PTSCTL_LEDS);
    -		length += PTSCTL_LEDS;
    -		buffer [length++] = '\r';
    -		if (write (port->file, buffer, length) != length)
    -		{
    -			error (1, errno, FILE_CANTSAVE, port->name);
    -		}
    -		SLEEP (wait);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function3 (struct _file_ * port, char const * units, unsigned wait);
    - *
    - *   read weeder solid state modules and display settings on the
    - *   console as attenuation;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function3 (struct _file_ * port, char const * units, unsigned wait)
    -
    -{
    -	extern char buffer [PTSCTL_BUFFER_SIZE];
    -	extern char string [PTSCTL_STRING_SIZE];
    -	extern signed length;
    -	extern signed offset;
    -	signed value1 = 0;
    -	signed value2 = 0;
    -	memset (string, 0, sizeof (string));
    -	for (offset = 0; *units; offset += PTSCTL_LEDS)
    -	{
    -		length = 0;
    -		buffer [length++] = *units++;
    -		buffer [length++] = 'R';
    -		buffer [length++] = '\r';
    -		if (write (port->file, buffer, length) != length)
    -		{
    -			error (1, errno, FILE_CANTSAVE, port->name);
    -		}
    -		SLEEP (wait);
    -		memset (buffer, 0, sizeof (buffer));
    -		if (read (port->file, buffer, PTSCTL_LEDS + 2) == -1)
    -		{
    -			error (1, errno, FILE_CANTREAD, port->name);
    -		}
    -		memcpy (&string [offset], &buffer [1], PTSCTL_LEDS);
    -		SLEEP (wait);
    -	}
    -	cycle (string, PTSCTL_LEDS, 2);
    -	while (--offset > PTSCTL_BITS)
    -	{
    -		value1 <<= 1;
    -		value1 |= string [offset] - '0';
    -	}
    -	while (offset-- > 0)
    -	{
    -		value2 <<= 1;
    -		value2 |= string [offset] - '0';
    -	}
    -	if ((value1 >= 0) && (value2 >= 0))
    -	{
    -		printf ("%d %d\n", value1, value2);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function4 (struct _file_ * port, char const * units, unsigned wait);
    - *
    - *   sequence through all attenuator settings at one second intervals;
    - *   this function can be used to debug program additions and changes;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function4 (struct _file_ * port, char const * units, unsigned wait)
    -
    -{
    -	signed value;
    -	for (value = 0; value < 128; value++)
    -	{
    -		function2 (port, units, wait, (value << 8) | (value << 1) | 1);
    -		function3 (port, units, wait);
    -		SLEEP (wait);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"f:g:n:p:iqrvw:z",
    -		"",
    -		"PTS Module Controller",
    -		"f f\tport is (f) [" PTSCTL_PORT "]",
    -		"g n\tline ground attenuation is (n) [" LITERAL (PTSCTL_GRND_ATTN) "]",
    -		"n n\tline neutral attenuation is (n) [" LITERAL (PTSCTL_LINE_ATTN) "]",
    -		"p n\tpower is (n) [" LITERAL (PTSCTL_MODE) "]",
    -		"q\tquiet mode",
    -		"r\tread and display attenuator settings",
    -		"v\tverbose mode",
    -		"w n\twait (n) millseconds [" LITERAL (PTSCTL_WAIT) "]",
    -		(char const *) (0)
    -	};
    -	struct _file_ port =
    -	{
    -		-1,
    -		PTSCTL_PORT
    -	};
    -
    -#if defined (WIN32)
    -
    -	HANDLE hSerial;
    -	DCB dcbSerial =
    -	{
    -		0
    -	};
    -
    -#else
    -
    -	struct termios termios;
    -
    -#endif
    -
    -	char const * units = PTSCTL_UNITS;
    -	unsigned wait = PTSCTL_WAIT;
    -	unsigned mode = PTSCTL_MODE;
    -	unsigned echo = PTSCTL_ECHO;
    -	unsigned line = PTSCTL_LINE_ATTN;
    -	unsigned grnd = PTSCTL_GRND_ATTN;
    -	unsigned data = 0;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	if (getenv ("PTSCTL"))
    -	{
    -		port.name = strdup (getenv ("PTSCTL"));
    -	}
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'f':
    -			port.name = optarg;
    -			break;
    -		case 'g':
    -			_setbits (flags, PTSCTL_CHANGE);
    -			grnd = (unsigned)(uintspec (optarg, 0, 0x7F));
    -			break;
    -		case 'n':
    -			_setbits (flags, PTSCTL_CHANGE);
    -			line = (unsigned)(uintspec (optarg, 0, 0x7F));
    -			break;
    -		case 'p':
    -			_setbits (flags, PTSCTL_CHANGE);
    -			mode = (unsigned)(uintspec (synonym (optarg, modes, SIZEOF (modes)), 0, 1));
    -			break;
    -		case 'w':
    -			wait = (unsigned)(uintspec (optarg, 5, 100));
    -			break;
    -		case 'q':
    -			_setbits (flags, PTSCTL_SILENCE);
    -			break;
    -		case 'r':
    -			_setbits (flags, PTSCTL_DISPLAY);
    -			break;
    -		case 'v':
    -			_setbits (flags, PTSCTL_VERBOSE);
    -			break;
    -		case 'z':
    -			_setbits (flags, PTSCTL_ITERATE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc)
    -	{
    -		error (1, ENOTSUP, ERROR_TOOMANY);
    -	}
    -
    -#if defined (WIN32)
    -
    -	hSerial = CreateFile (port.name, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
    -	if (hSerial == INVALID_HANDLE_VALUE)
    -	{
    -		error (1, errno, FILE_CANTOPEN, port.name);
    -	}
    -	dcbSerial.DCBlength = sizeof (dcbSerial);
    -	if (!GetCommState (hSerial, &dcbSerial))
    -	{
    -		error (1, 0, FILE_CANTREAD " state", port.name);
    -	}
    -	dcbSerial.BaudRate = CBR_9600;
    -	dcbSerial.ByteSize = 8;
    -	dcbSerial.StopBits = ONESTOPBIT;
    -	dcbSerial.Parity = NOPARITY;
    -	if (!SetCommState (hSerial, &dcbSerial))
    -	{
    -		error (1, 0, FILE_CANTSAVE " state", port.name);
    -	}
    -	CloseHandle (hSerial);
    -	if ((port.file = open (port.name, O_BINARY | O_RDWR)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, port.name);
    -	}
    -
    -#else
    -
    -	if ((port.file = open (port.name, O_RDWR|O_NOCTTY|O_NDELAY)) == -1)
    -	{
    -		error (1, 0, FILE_CANTOPEN, port.name);
    -	}
    -	tcgetattr (port.file, &termios);
    -	termios.c_cflag = CS8;
    -	cfsetospeed (&termios, B9600);
    -	tcsetattr (port.file, TCSANOW, &termios);
    -
    -#endif
    -
    -	function1 (&port, units, wait, echo);
    -	if (_anyset (flags, PTSCTL_CHANGE))
    -	{
    -		data = line << 8 | grnd << 1 | mode;
    -		function2 (&port, units, wait, data);
    -	}
    -	if (_anyset (flags, PTSCTL_DISPLAY))
    -	{
    -		function3 (&port, units, wait);
    -	}
    -	if (_anyset (flags, PTSCTL_ITERATE))
    -	{
    -		function4 (&port, units, wait);
    -	}
    -	close (port.file);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/pushbutton.sh.html b/docbook/pushbutton.sh.html deleted file mode 100644 index 052f4fab..00000000 --- a/docbook/pushbutton.sh.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - pushbutton.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: scripts/pushbutton.sh
    -
    -# This script illustrates how to use MS_PB_ENC to break and make a
    -# network for testing purposes;
    -  
    -
    -# ====================================================================
    -# host symbols;
    -# --------------------------------------------------------------------
    -
    -. /etc/environment
    -. ${SCRIPTS}/hardware.sh
    -
    -# ====================================================================
    -# leave network;
    -# --------------------------------------------------------------------
    -
    -int6k -i ${ETH1} -B 2
    -int6kwait -i ${ETH1} -rs
    -int6k -i ${ETH2} -B 2
    -int6kwait -i${ETH2} -rs
    -int6k -i ${ETH1} -I
    -int6k -i ${ETH2} -I
    -
    -# ====================================================================
    -# create network;
    -# --------------------------------------------------------------------
    -
    -int6k -i ${ETH1} -B 1
    -int6k -i ${ETH2} -B 1
    -int6kwait -i ${ETH1} -rs
    -int6kwait -i ${ETH2} -rs
    -int6k -i ${ETH1} -I
    -int6k -i ${ETH2} -I
    -
    -
    -
    - - - diff --git a/docbook/putoptv.c.html b/docbook/putoptv.c.html deleted file mode 100644 index cdc1b9d9..00000000 --- a/docbook/putoptv.c.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - putoptv.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void putoptv(char const *help[]);
    - *
    - *   putoptv.h
    - *
    - *   print program information on stdout; informtion is stored as an
    - *   ordered string vector; string indexes are defined in getopt.h;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PUTOPTV_SOURCE
    -#define PUTOPTV_SOURCE
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -
    -void putoptv (char const * optv [])
    -
    -{
    -	extern char const * program_name;
    -	size_t index;
    -	printf ("\n");
    -	printf (" program: %s\n\n", optv [PUTOPTV_I_PROGRAM]);
    -	printf (" command: %s [options] %s\n\n", program_name, optv [PUTOPTV_I_COMMAND]);
    -	printf (" options: [%s%c%c]\n\n", optv [PUTOPTV_I_OPTIONS], GETOPTV_C_VERSION, GETOPTV_C_SUMMARY);
    -	for (index = PUTOPTV_I_DETAILS; optv [index] != (char *) (0); index++)
    -	{
    -		printf (" %c%s\n", GETOPTV_C_OPTION, optv [index]);
    -	}
    -	printf (" %c%c\tversion information\n", GETOPTV_C_OPTION, GETOPTV_C_VERSION);
    -	printf (" %c%c\thelp summary\n", GETOPTV_C_OPTION, GETOPTV_C_SUMMARY);
    -	printf ("\n");
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/putoptv.h.html b/docbook/putoptv.h.html deleted file mode 100644 index f196c859..00000000 --- a/docbook/putoptv.h.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - putoptv.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   putoptv.h - putopt related definitions and declarations;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PUTOPTV_HEADER
    -#define PUTOPTV_HEADER
    -
    -/*====================================================================*
    - *   constant definitions;
    - *--------------------------------------------------------------------*/
    -
    -#define PUTOPTV_I_OPTIONS 0
    -#define PUTOPTV_I_COMMAND 1
    -#define PUTOPTV_I_PROGRAM 2
    -#define PUTOPTV_I_DETAILS 3
    -
    -#define PUTOPTV_S_FILTER "file [file] [...] or [< stdin][> stdout]"
    -#define PUTOPTV_S_FUNNEL "file [file] [...] [> stdout]"
    -#define PUTOPTV_S_SEARCH "findspec [findspec] [...] [> stdout]"
    -#define PUTOPTV_S_DIVINE "[> stdout]"
    -
    -/*====================================================================*
    - *   function declarations;
    - *--------------------------------------------------------------------*/
    -
    -void putoptv (char const *help []);
    -
    -/*====================================================================*
    - *   end definitions;
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/putpwd.c.html b/docbook/putpwd.c.html deleted file mode 100644 index 05e9e14d..00000000 --- a/docbook/putpwd.c.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - putpwd.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2015 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -/*====================================================================*
    - *
    - *   void putpwd (unsigned count, unsigned group, char space);
    - *
    - *   keys.h
    - *
    - *   print a random password on stdout; passwords consist of count
    - *   letters and digits; optionally, group letters and digits and 
    - *   separate groups with a space character;
    - *
    - *   alphabet is an array of 32 printable password characters; 
    - *   count is the number of characters to be selected from alphabet; 
    - *   group is the grouping factor; 
    - *   space is the group separator;
    - *
    - *   grouping is suppressed when group is zero or greater than or 
    - *   equal to count;
    - *
    - *   Contributors:
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef PUTPWD_SOURCE
    -#define PUTPWD_SOURCE
    -
    -#include <unistd.h>
    -#include <stdio.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../key/keys.h"
    -
    -void putpwd (unsigned count, unsigned group, char space)
    -
    -{
    -	signed fd;
    -	if ((fd = open ("/dev/urandom", O_RDONLY)) == -1)
    -	{
    -		error (1, errno, "can't open /dev/urandom");
    -	}
    -	while (count--)
    -	{
    -		static const char alphabet [] =
    -		{
    -			'2',
    -			'3',
    -			'4',
    -			'5',
    -			'6',
    -			'7',
    -			'8',
    -			'9',
    -			'A',
    -			'B',
    -			'C',
    -			'D',
    -			'E',
    -			'F',
    -			'G',
    -			'H',
    -			'J',
    -			'K',
    -			'L',
    -			'M',
    -			'N',
    -			'P',
    -			'Q',
    -			'R',
    -			'S',
    -			'T',
    -			'U',
    -			'V',
    -			'W',
    -			'X',
    -			'Y',
    -			'Z'
    -		};
    -		unsigned member;
    -		if (read (fd, & member, sizeof (member)) != sizeof (member))
    -		{
    -			error (1, errno, "can't read /dev/urandom");
    -		}
    -		member &= 0x1F;
    -		putc (alphabet [member % sizeof (alphabet)], stdout);
    -		if ((count) && (group) && ! (count % group))
    -		{
    -			putc (space, stdout);
    -		}
    -	}
    -	close (fd);
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/qcaspi.xml b/docbook/qcaspi.xml deleted file mode 100644 index c34d5fcc..00000000 --- a/docbook/qcaspi.xml +++ /dev/null @@ -1,814 +0,0 @@ - - - Serial Drivers - -
    - - Introduction - - - Most Qualcomm Atheros PLC chipsets are Ethernet-to-Powerline bridges but the QCA7000 is a Serial-to-Powerline bridge, ... with a big difference. The QCA7000 expects the host serial stream to be segmented into Ethernet frames where each frame is encapsulated by a distinct serial header and trailer. This means the host can format and transmit, or receive and decode, standard Ethernet 802.3 frames over an ordinary SPI or UART interface thereby enabling full Ethernet or Internet protocol communications over powerline at low cost and low speed. The enabling component here is an Ethernet-to-Serial driver that supports the SPI or UART interface connected to the QCA7000. This section covers such a driver. - - - The example driver described here was written for the Freescale iMX28 board support package running a custom Freescale Linux distribution. As such, we believe that this driver is suitable for the iMX28 processor out of the box but it could be adapted to other processors. - -
    - -
    - - Principles of Operation - - - The basic unit of data transfer over MII and powerline is the IEEE 802.3 Ethernet frame. On output, the host must encapsulate each Ethernet frame as shown below before serial transmission to the QCA7000. The QCA7000 strips off the serial header and footer and forwards the frame over powerline. - - - - SPI Transmit Frame - - - Allocate a 1528-byte buffer to accommodate the largest outgoing serial packet and pad with NUL bytes. Write SOF, compute and write FL, copy the outgoing frame then write EOF. Serially transmit FL + 12 buffer bytes to the QCA7000. - - - - - - Offset - - - Length - - - Symbol - - - Description - - - - - - - 0x0000 - - - 4 - - - SOF - - - Start Of Frame. Must be 0xAAAAAAAA. - - - - - 0x0004 - - - 2 - - - FL - - - The Ethernet frame length in little endian format. The frame starts at offset 0x0008 here and includes all fields up to but excluding EOF. The minimum is 60. The maximum is 1518 if VLAN is omitted and 1522 if not. - - - - - 0x0006 - - - 2 - - - RSVD - - - Must be 0x0000. Reserved to ensure 4-byte frame alignment. - - - - - 0x0008 - - - 6 - - - DA - - - Destination address. - - - - - 0x000E - - - 6 - - - SA - - - Source address. This must not be the MAC address of the powerline device. This must be the MAC address of the local host serial interface as assigned by the SP or UART driver. The PLC device and the associated host interface must have different MAC address. - - - - - 0x0014 - - - 4 - - - VLAN - - - Virtual LAN tag. This field may be omitted. - - - - - 0x0018 - - - 2 - - - ET - - - Ethertype. This field starts at offset 0x0014 if VLAN is omitted. - - - - - 0x001A - - - 42 to 1500 - - - BODY - - - Frame body. This field starts at offset 0x0016 and ranges from 46 to 1500 bytes if VLAN is omitted. - - - - - 0x004A to 0x05F8 - - - 4 - - - EOF - - - End Of Frame. Must be 0x5555. This field starts at offset 0x0008 plus FL. - - - - -
    - - - SPI Receive Frame - - - The SPI read frame occurs in response to a read interrupt generated by the QCA7000. The host must acknowledge a read interrupt and service it by reading and acting on QCA7000 SPI register values. For incoming frames, the host reads the 32-bit overall packet length reported by the QCA7000 then read that many bytes, stripping off the serial header and footer and forwarding the Ethernet frame to the host. - - - Allocate a 1532-byte buffer to accomodate the largest incoming serial packet. Read LEN to determine the size of the incoming serial packet. Read LEN bytes into the buffer. Beware that LEN is a multiple of 4-bytes so there may be a few trailing NUL bytes in buffer. - - - - - - Offset - - - Length - - - Symbol - - - Description - - - - - - - 0x0000 - - - 4 - - - LEN - - - Hardware generated packet length. This field is only generated for SPI packets, not the UART packets. - - - - - 0x0004 - - - 4 - - - SOF - - - Start Of Frame. Must be 0xAAAAAAAA. - - - - - 0x0008 - - - 2 - - - FL - - - Ethernet frame length in little endian format. The frame starts at offset 0x000C here and includes all fields up to but excluding EOF. The minimum length is 60. The maximum is 1518 if VLAN is omitted and 1522 if not. - - - - - 0x000A - - - 2 - - - RSVD - - - Must be 0x0000. Reserved to ensure 4-byte frame alignment. - - - - - 0x000C - - - 6 - - - DA - - - Destination address. - - - - - 0x0012 - - - 6 - - - SA - - - Source address. This must not be the MAC address of the powerline device. This must be the MAC address of the local host serial interface as assigned by the SP or UART driver. The PLC device and the associated host interface must have different MAC address. - - - - - 0x0018 - - - 4 - - - VLAN - - - Virtual LAN tag. This field may be omitted. - - - - - 0x001C - - - 2 - - - ET - - - Ethertype. This field starts offset 0x0018 if VLAN is omitted. - - - - - 0x001E - - - 42 to 1500 - - - BODY - - - Frame body. This field starts at offset 0x001A and ranges from 46 to 1500 bytes if VLAN is omitted. - - - - - 0x004A to 0x05F8 - - - 4 - - - EOF - - - End Of Frame. Must be 0x5555. This field starts at offset 0x000C plus FL. - - - - -
    -
    -
    - - SPI Serial Driver - -
    - - qcaspi_spi_thread - - - - static int qcaspi_spi_thread - char void * data - - - - Manages synchronization with the exteranl QCA7000. - Handles interrupts fomr the external QCA7000. - Transmits frames for the transmit queue to the QCA7000. - -
    -
    - - qcaspi_qca7k_sync - - - - void qca_qca7k_sync - char struct qcaspi * qca - int event - - - - Keeps track of the current synchonization state. - -
    -
    - -
    - - Register Functions - -
    - - qcaspi_read_register - - - - uint16_t qcaspi_read_register - struct qcaspi * qca - uint16_t reg - - - - Reads a QCA7000 register and returns register content. - -
    -
    - - qcaspi_write_register - - - - void qcaspi_write_register - struct qcaspi * qca - uint16_t reg - uint16_t value - - - - Write a value into a QCA7000 register. - -
    -
    - - qcaspi_tx_cmd - - - - int qcaspi_tx_cmd - struct qcaspi * qca - uint16_t cmd - - - - Transmit a 16-bit command to the QCA7000. This is currently used when performing a legacy DMA read or write. - -
    -
    - -
    - - Interrupt Functions - -
    - - disable_spi_interrupts - - - - uint32_t disable_spi_interrupts - struct qcaspi * qca - - - - Disables interrupts by writing 0 to the QCA7000 INTR_ENABLE register. - -
    -
    - - enable_spi_interrupts - - - - uint32_t enable_spi_interrupts - struct qcaspi * qca - uint32_t intr_enable - - - - Enables interrupts specified by writing to the QCA7000 INTR_ENABLE register and returns the previous register value. - -
    -
    - - qcaspi_intr_handler - - - - static irqreturn_t qcaspi_intr_handler - int irq - void * data - - - - Called to service interrupts on rising edge of the QCA7000 interrupt line. - -
    -
    - -
    - - Transmit Functions - -
    - - qcaspi_transmit - - - - int qcaspi_transmit - struct qcaspi * qca - - - - Transmit as many frames as possible from the transmit queue. - -
    -
    - - qcaspi_tx_frame - - - - int qcaspi_tx_frame - struct qcaspi * qca - struct sk_buff * skb - - - - Transmit a single socket buffer over the SPI interface. - -
    -
    - - qcaspi_flush_txq - - - - void qcaspi_flush_txq - struct qcaspi * qca - - - - Flush the transmit queue. Typically called when a synchronization issue is detected between the SPI master (host) and SPI slave (QCA7000). - -
    -
    - -
    - - Receive Functions - -
    - - qcaspi_receive - - - - int qcaspi_receive - struct qcaspi * qca - - - - Reads the QCA7000 read buffer bytes register and reads all available data from the QCA7000. Calls function to parse out the individual Ethernet frames and passes them to the Linux kernel protocol stack. - -
    -
    - -
    - - DMA Functions - -
    - - qcaspi_dma_read_burst - - - - uint32_t qcaspi_dma_read_burst - struct qcaspi * qca - uint8_t * buffer - uint32_t length - - - - Performs QCA7000 DMA burst read. - -
    -
    - - qcaspi_dma_read_legacy - - - - uint32_t qcaspi_dma_read_legacy - struct qcaspi * qca - uint8_t * buffer - uint32_t length - - - - Performs QCA7000 DMA legacy read. - -
    -
    - - qcaspi_dma_write_burst - - - - uint32_t qcaspi_dma_write_burst - struct qcaspi * qca - uint8_t * buffer - uint32_t length - - - - Called by qcaspi_tx_frame to peform a DMA burst write instead of a legacy write. - -
    -
    - - qcaspi_dma_write_legacy - - - - uint32_t qcaspi_dma_write_legacy - struct qcaspi * qca - uint8_t * buffer - uint32_t length - - - - Called by qcaspi_tx_frame to peform a DMA legacy write instead of a burst write. - -
    -
    - -
    - - Support Functions - -
    - - QcaFrmCreateHeader - - - - uint32_t QcaFrmCreateHeader - uint8_t * buffer - uint16_t length - - - - Encode buffer with the required SPI header and overall frame length. - -
    -
    - - QcaFrmCreateFooter - - - - uint32_t QcaFrmCreateFooter - uint8_t * buffer - - - - Encode buffer with the required SPI footer. - -
    -
    - - QcaFrmFsmInit - - - - void QcaFrmFsmInit - QcaFrmHdl * frmHdl - - - - Initialize the state machine used to decode the incoming QCA7000 byte stream. - -
    -
    - - QcaFrmFsmDecode - - - - uint32_t QcaFrmFsmDecode - QcaFrmHdl * frmHdl - uint8_t * buffer - uint16_t length - uint8_t bytevalue - - - - Feeds incoming bytes into the state machine and breaks the stream into individual frames. Frames are passed to the Linux kernel. - -
    -
    - -
    - - Kernel Functions - -
    - - qcaspi_netdev_xmit - - - - int qcaspi_netdev_xmit - struct sk_buff * skb - struct net_device * device - - - - Called by the Linux kernel append outgoing frames to the transmit queue. - -
    -
    - - qcaspi_netdev_tx_timeout - - - - void qcaspi_netdev_tx_timeout - struct net_device * device - - - - Called by the Linux kernel after the transmit queue has been stopped for an extended period of time. - -
    -
    - - qcaspi_netdev_uninit - - - - static void qcaspi_netdev_uninit - struct net_device * device - - - - Called when function unregister_netdev is called. For the QCA7000 driver, function qcaspi_mod_exit calls function unregister_netdev. - -
    -
    - - qcaspi_netdev_get_stats - - - - struct net_device_stats * qcaspi_netdev_get_stats - struct net_device * device - - - - Returns transmit, receive and error statistics associated with the net device. These are the statistics displayed by ifconfig. - -
    -
    - - qcaspi_netdev_change_mtu - - - - int qcaspi_netdev_change_mtu - struct net_device * device - int new_mtu - - - - Changes the serial interface MTU size. - -
    -
    - - qcaspi_netdev_set_mac_address - - - - static int qcaspi_netdev_set_mac_address - struct net_device * device - void * memory - - - - Sets the serial interface MAC address. Called by ifconfig whenever user types ifconfig qca0 hw ether xx:xx:xx:xx:xx:xx. - -
    -
    - - qcaspi_netdev_close - - - - int qcaspi_netdev_close - struct net_device * device - - - - Called by ifconfig to disable the network interface. - -
    -
    - - qcaspi_mod_exit - - - - static void qcaspi_mod_exit - void - - - - Called by the kernel to shutdown the driver module. - -
    -
    -
    diff --git a/docbook/qosinfo.c.html b/docbook/qosinfo.c.html deleted file mode 100644 index e7ec1334..00000000 --- a/docbook/qosinfo.c.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - qosinfo.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   qosinfo.c - print qos information;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <limits.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define TM_VERBOSE (1 << 0)
    -#define TM_SILENCE (1 << 1)
    -
    -#define OFFSET 0x020C
    -#define LENGTH 0x0800
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"",
    -		"file [file] [...] [> stdout]",
    -		"print qos information",
    -		(char const *) (0)
    -	};
    -
    -#ifndef __GNUC__
    -#pragma pack (push, 1)
    -#endif
    -
    -	struct __packed QoS
    -	{
    -		uint8_t UniCastPriority;
    -		uint8_t McastPriority;
    -		uint8_t IGMPPriority;
    -		uint8_t AVStreamPriority;
    -		uint32_t PriorityTTL [4];
    -		uint8_t EnableVLANOver;
    -		uint8_t EnableTOSOver;
    -		uint16_t RSVD1;
    -		uint16_t VLANPrioMatrix;
    -		uint16_t TOSPrecMatrix;
    -		uint8_t NumberOfConfigEntries;
    -		struct
    -		{
    -			uint8_t one;
    -			uint8_t two;
    -		}
    -		AggregateConfigEntries [8];
    -		uint8_t CustomAggregationParameters [384];
    -		uint8_t RSVD2 [1619];
    -	}
    -	QoS;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -	file_t fd;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argc) && (* argv))
    -	{
    -		if ((fd = open (* argv, O_BINARY|O_RDONLY)) == -1)
    -		{
    -			error (0, errno, "Can't open %s", * argv);
    -		}
    -		else if (lseek (fd, OFFSET, SEEK_SET) != OFFSET)
    -		{
    -			error (0, errno, "Can't seek %s", * argv);
    -			close (fd);
    -		}
    -		else if (read (fd, &QoS, sizeof (QoS)) != sizeof (QoS))
    -		{
    -			error (0, errno, "Can't read %s", * argv);
    -			close (fd);
    -		}
    -		else
    -		{
    -			for (c = 0; c < 8; c++)
    -			{
    -				unsigned VLAN = (QoS.VLANPrioMatrix >> (c * 2)) & 0x03;
    -				unsigned TOS = (QoS.TOSPrecMatrix >> (c * 2)) & 0x03;
    -				printf ("VLAN %d TOS %d\n", VLAN, TOS);
    -			}
    -			for (c = 0; c < 4; c++)
    -			{
    -				printf ("TTL [%d]=%d\n", c, QoS.PriorityTTL [c]);
    -			}
    -			for (c = 0; c < 8; c++)
    -			{
    -				printf ("AggregateConfigEntries [%d] %02x %02X\n", c, QoS.AggregateConfigEntries [c].one, QoS.AggregateConfigEntries [c].two);
    -			}
    -			printf ("QoS "SIZE_T_SPEC" %04X\n", sizeof (QoS), (unsigned int) sizeof (QoS));
    -			close (fd);
    -		}
    -		argc--;
    -		argv++;
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/qualcomm.h.html b/docbook/qualcomm.h.html deleted file mode 100644 index 9c130a5b..00000000 --- a/docbook/qualcomm.h.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - qualcomm.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   qualcomm.h - Qualcomm Definitions and Declarations;
    - *
    - *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
    - *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef QUALCOMM_HEADER
    -#define QUALCOMM_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   header constants;
    - *--------------------------------------------------------------------*/
    -
    -#define BROADCAST "FF:FF:FF:FF:FF:FF"
    -#define LOCALCAST "00:B0:52:00:00:01"
    -
    -/*====================================================================*
    - * Qualcomm Manufacturer Specific Management Message Types;
    - *--------------------------------------------------------------------*/
    -
    -#define MS_PB_ENC 0x8000
    -#define MS_ADC_CAP 0x8004
    -#define MS_DISCOVER 0x8008
    -
    -/*====================================================================*
    - *  Qualcomm Vendor Specific Management Message Types;
    - *--------------------------------------------------------------------*/
    -
    -#define VS_SW_VER 0xA000
    -#define VS_WR_MEM 0xA004
    -#define VS_RD_MEM 0xA008
    -#define VS_ST_MAC 0xA00C
    -#define VS_GET_NVM 0xA010
    -#define VS_RSVD_1 0xA014
    -#define VS_RSVD_2 0xA018
    -#define VS_RS_DEV 0xA01C
    -#define VS_WR_MOD 0xA020
    -#define VS_RD_MOD 0xA024
    -#define VS_MOD_NVM 0xA028
    -#define VS_WD_RPT 0xA02C
    -#define VS_LNK_STATS 0xA030
    -#define VS_SNIFFER 0xA034
    -#define VS_NW_INFO 0xA038
    -#define VS_RSVD_3 0xA03C
    -#define VS_CP_RPT 0xA040
    -#define VS_ARPC 0xA044
    -#define VS_SET_KEY 0xA050
    -#define VS_MFG_STRING 0xA054
    -#define VS_RD_CBLOCK 0xA058
    -#define VS_SET_SDRAM 0xA05C
    -#define VS_HOST_ACTION 0xA060
    -#define VS_OP_ATTRIBUTES 0xA068
    -#define VS_ENET_SETTINGS 0xA06C
    -#define VS_TONE_MAP_CHAR 0xA070
    -#define VS_NW_INFO_STATS 0xA074
    -#define VS_SLAVE_MEM 0xA078
    -#define VS_FAC_DEFAULTS 0xA07C
    -#define VS_MULTICAST_INFO 0xA084
    -#define VS_CLASSIFICATION 0xA088
    -#define VS_RX_TONE_MAP_CHAR 0xA090
    -#define VS_SET_LED_BEHAVIOR 0xA094
    -#define VS_WRITE_AND_EXECUTE_APPLET 0xA098
    -#define VS_MDIO_COMMAND 0xA09C
    -#define VS_SLAVE_REG 0xA0A0
    -#define VS_BANDWIDTH_LIMITING 0xA0A4
    -#define VS_SNID_OPERATION 0xA0A8
    -#define VS_NN_MITIGATE 0xA0AC
    -#define VS_MODULE_OPERATION 0xA0B0
    -#define VS_DIAG_NETWORK_PROBE 0xA0B4
    -#define VS_PL_LINK_STATUS 0xA0B8
    -#define VS_GPIO_STATE_CHANGE 0xA0BC
    -#define VS_CONN_ADD 0xA0C0
    -#define VS_CONN_MOD 0xA0C4
    -#define VS_CONN_REL 0xA0C8
    -#define VS_CONN_INFO 0xA0CC
    -#define VS_MULTIPORT_LNK_STA 0xA0D0
    -#define VS_EM_ID_TABLE 0xA0DC
    -#define VS_STANDBY 0xA0E0
    -#define VS_SLEEPSCHEDULE 0xA0E4
    -#define VS_SLEEPSCHEDULE_NOTIFICATION 0xA0E8
    -#define VS_MICROCONTROLLER_DIAG 0xA0F0
    -#define VS_GET_PROPERTY 0xA0F8
    -#define VS_SET_PROPERTY 0xA100
    -#define VS_PHYSWITCH_MDIO 0xA104
    -#define VS_SELFTEST_ONETIME_CONFIG 0xA10C
    -#define VS_SELFTEST_RESULTS 0xA110
    -#define VS_MDU_TRAFFIC_STATS 0xA114
    -#define VS_FORWARD_CONFIG 0xA118
    -#define VS_HYBRID_INFO 0xA200
    -
    -/*====================================================================*
    - *   module codes for VS_RD_MOD, VS_WR_MOD and VS_MOD_NVM;
    - *--------------------------------------------------------------------*/
    -
    -#define VS_MODULE_MAC   (1 << 0)
    -#define VS_MODULE_PIB   (1 << 1)
    -#define VS_MODULE_FORCE (1 << 4)
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/readmessage.c.html b/docbook/readmessage.c.html deleted file mode 100644 index d52bdf96..00000000 --- a/docbook/readmessage.c.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - readmessage.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ssize_t readmessage (struct channel const * channel, struct message * message, uint8_t MMV, uint16_t MMTYPE);
    - *
    - *   plc.h
    - *
    - *   wait for a QCA vendor specific message of given MMV and MMTYPE; 
    - *   discard unwanted messages until the desired message arrives or
    - *   the channel timeout expires; return packet length on success,
    - *   0 on timeout or -1 on error;
    - *
    - *   see sendmessage for the send counterpart to this function;
    - *
    - *   a well designed UnwantedMessage function is critical here;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef READMESSAGE_SOURCE
    -#define READMESSAGE_SOURCE
    -
    -#include <sys/time.h>
    -#include <memory.h>
    -#include <errno.h>
    -
    -#include "../tools/error.h"
    -#include "../tools/timer.h"
    -#include "../plc/plc.h"
    -
    -ssize_t readmessage (struct channel const * channel, struct message * message, uint8_t MMV, uint16_t MMTYPE) 
    -
    -{ 
    -	struct timeval ts; 
    -	struct timeval tc; 
    -	ssize_t length; 
    -	if (gettimeofday (& ts, NULL) == - 1) 
    -	{ 
    -		error (1, errno, CANT_START_TIMER); 
    -	} 
    -	while ((length = readpacket (channel, message, sizeof (* message))) >= 0) 
    -	{ 
    -		if (! UnwantedMessage (message, length, MMV, MMTYPE)) 
    -		{ 
    -			return (length); 
    -		} 
    -		if (gettimeofday (& tc, NULL) == - 1) 
    -		{ 
    -			error (1, errno, CANT_RESET_TIMER); 
    -		} 
    -		if (channel->timeout < 0) 
    -		{ 
    -			continue; 
    -		} 
    -		if (channel->timeout > MILLISECONDS (ts, tc)) 
    -		{ 
    -			continue; 
    -		} 
    -		return (0); 
    -	} 
    -	return (- 1); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/readpacket.c.html b/docbook/readpacket.c.html deleted file mode 100644 index 3023fdeb..00000000 --- a/docbook/readpacket.c.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - readpacket.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ssize_t readpacket (struct channel const * channel, void * memory, ssize_t extent);
    - *
    - *   channel.h
    - *
    - *   read one packet from a raw packet channel;
    - *
    - *   return the packet size on success, 0 on timeout or -1 on error;
    - *   dump packets on stdout when the channel VERBOSE flag is set;
    - *
    - *   constant __MAGIC__ enables code that reads frames from stdin,
    - *   instead of the network; you may use it whenever a network or
    - *   transmitting device is not available;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *      Werner Henze <w.henze@avm.de>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef READPACKET_SOURCE
    -#define READPACKET_SOURCE
    -
    -#include <stdlib.h>
    -#include <unistd.h>
    -#include <memory.h>
    -#include <errno.h>
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -
    -#if defined (__MAGIC__)
    -#include "../tools/hexload.c"
    -#endif
    -
    -ssize_t readpacket (struct channel const * channel, void * memory, ssize_t extent)
    -
    -{
    -
    -#if defined (__MAGIC__)
    -
    -	memset (memory, 0, extent);
    -	extent = hexload (memory, extent, stdin);
    -	if (_anyset (channel->flags, CHANNEL_VERBOSE))
    -	{
    -		hexdump (memory, 0, extent, stdout);
    -	}
    -	return (extent);
    -
    -#elif defined (__linux__)
    -
    -#include <sys/poll.h>
    -
    -	struct pollfd pollfd =
    -	{
    -		channel->fd,
    -		POLLIN,
    -		0
    -	};
    -	signed status = poll (&pollfd, 1, channel->capture);
    -	memset (memory, 0, extent);
    -	if ((status < 0) && (errno != EINTR))
    -	{
    -		error (0, errno, "%s can't poll %s", __func__, channel->ifname);
    -		return (-1);
    -	}
    -	if (status > 0)
    -	{
    -		status = recvfrom (channel->fd, memory, extent, 0, (struct sockaddr *) (0), (socklen_t *)(0));
    -		if (status < 0)
    -		{
    -			error (0, errno, "%s can't read %s", __func__, channel->ifname);
    -			return (-1);
    -		}
    -		if (status > 0)
    -		{
    -			extent = status;
    -			if (_anyset (channel->flags, CHANNEL_VERBOSE))
    -			{
    -				hexdump (memory, 0, extent, stdout);
    -			}
    -			return (extent);
    -		}
    -	}
    -
    -#elif defined (__APPLE__) || defined (__OpenBSD__)
    -
    -	struct bpf_hdr * bpf_packet;
    -	struct bpf * bpf = channel->bpf;;
    -	memset (memory, 0, extent);
    -	if (bpf->bpf_bufused <= 0)
    -	{
    -		bpf->bpf_bufused = read (channel->fd, bpf->bpf_buffer, bpf->bpf_length);
    -		bpf->bpf_bp = bpf->bpf_buffer;
    -	}
    -	if (bpf->bpf_bufused < 0)
    -	{
    -		error (0, errno, "bpf");
    -		return (-1);
    -	}
    -	if (bpf->bpf_bufused > 0)
    -	{
    -		bpf_packet = (struct bpf_hdr *)(bpf->bpf_bp);
    -		if ((size_t) (extent) > bpf_packet->bh_caplen)
    -		{
    -			extent = bpf_packet->bh_caplen;
    -		}
    -		if ((size_t) (extent) < bpf_packet->bh_caplen)
    -		{ 
    -			if (_anyset (channel->flags, CHANNEL_VERBOSE)) 
    -			{
    -				error (0, 0, "Truncated incoming frame (%u -> %zd bytes)", bpf_packet->bh_caplen, extent); 
    -			}
    -		}
    -		memcpy (memory, bpf->bpf_bp + bpf_packet->bh_hdrlen, extent);
    -		bpf->bpf_bufused -= BPF_WORDALIGN (bpf_packet->bh_hdrlen + bpf_packet->bh_caplen);
    -		bpf->bpf_bp += BPF_WORDALIGN (bpf_packet->bh_hdrlen + bpf_packet->bh_caplen);
    -		if (_anyset (channel->flags, CHANNEL_VERBOSE))
    -		{
    -			hexdump (memory, 0, extent, stdout);
    -		}
    -		return (extent);
    -	}
    -
    -#elif defined (WINPCAP) || defined (LIBPCAP)
    -
    -	struct pcap_pkthdr * header;
    -	const uint8_t *data;
    -	signed status = pcap_next_ex (channel->socket, &header, &data);
    -	memset (memory, 0, extent);
    -	if (status < 0)
    -	{
    -		error (0, errno, "pcap_next_ex");
    -		return (-1);
    -	}
    -	if (status > 0)
    -	{
    -		extent = header->caplen;
    -		memcpy (memory, data, extent);
    -		if (_anyset (channel->flags, CHANNEL_VERBOSE))
    -		{
    -			hexdump (memory, 0, extent, stdout);
    -		}
    -		return (extent);
    -	}
    -
    -#else
    -#error "Unknown Environment"
    -#endif
    -
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/regview32.c.html b/docbook/regview32.c.html deleted file mode 100644 index 50b80a09..00000000 --- a/docbook/regview32.c.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - regview32.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void regview32 (void const * memory, size_t offset, size_t length, FILE *fp);
    - *
    - *   memory.h
    - *
    - *   print memory as a binary dump showing absolute memory offsets
    - *   and 32-bit binary register maps; sample output looks like:
    - *
    - *      REGISTER CONTENTS 31----24 23----16 15----08 07----00
    - *
    - *      00183000 00000F7F 00000000-00000000-00001111-01111111
    - *      00183004 00000A00 00000000-00000000-00001010-00000000
    - *      00183008 00000FF8 00000000-00000000-00001111-11111000
    - *      0018300C 00000000 00000000-00000000-00000000-00000000
    - *      00183010 00000075 00000000-00000000-00000000-01110101
    - *
    - *   the header line shown above is not part of the output;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef REGVIEW_SOURCE
    -#define REGVIEW_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/endian.h"
    -
    -void regview32 (void const * memory, size_t offset, size_t extent, FILE *fp)
    -
    -{
    -	uint32_t * origin = (uint32_t *)(memory);
    -	while (extent >= sizeof (* origin))
    -	{
    -		signed bit = sizeof (* origin) << 3;
    -		printf ("%08X ", (uint32_t)(offset));
    -		printf ("%08X ", LE32TOH (* origin));
    -		while (bit--)
    -		{
    -			putc (((LE32TOH (* origin) >> bit) & 1)? '1': '0', fp);
    -			if ((bit) && !(bit%8))
    -			{
    -				putc ('-', fp);
    -			}
    -		}
    -		putc ('\n', fp);
    -		offset += sizeof (* origin);
    -		extent -= sizeof (* origin);
    -		origin++;
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/replace-softloader.sh.html b/docbook/replace-softloader.sh.html deleted file mode 100644 index 7966971f..00000000 --- a/docbook/replace-softloader.sh.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - replace-softloader.sh - - - - - - - - - -
    -#!/bin/sh
    -
    -# this script replaces the intellon softloader with runtime firmware;
    -# it assumes the softloader is running when the script is started;
    -
    -# ====================================================================
    -# file symbols;
    -# --------------------------------------------------------------------
    -
    -ETH=eth4
    -PIB=../firmware/v3.3.6.pib
    -NVM=../firmware/v3.3.6-0-8-B-RC1.nvm
    -MAC=00B05200CA08
    -DAK=689F074B8B0275A2710B0B5779AD1630
    -NMK=50D3E4933F855B7040784DF815AA8DB7
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    -modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB}
    -int6k -i ${ETH} -P ${PIB} -N ${NVM} -F
    -int6k -i ${ETH} -P ${PIB} -N ${NVM} -FF
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    - exit 0
    -
    -
    -
    - - - diff --git a/docbook/reverse.c.html b/docbook/reverse.c.html deleted file mode 100644 index f6691f8c..00000000 --- a/docbook/reverse.c.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - reverse.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void reverse (void * memory, size_t extent);
    - *
    - *   reverse the order of bytes in a multi-byte memory region; 
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef REVERSE_SOURCE
    -#define REVERSE_SOURCE
    -
    -#include "../tools/memory.h"
    -
    -void reverse (void * memory, size_t extent) 
    -
    -{ 
    -	register byte * first = (byte *) (memory); 
    -	register byte * final = first +  extent; 
    -	while (first < final) 
    -	{ 
    -		register byte byte = * first; 
    -		* first++ = * -- final; 
    -		* final = byte; 
    -	} 
    -	return; 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/reword.c.html b/docbook/reword.c.html deleted file mode 100644 index e62cff13..00000000 --- a/docbook/reword.c.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - reword.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   char const * reword (code_t code, struct _code_ const list [], size_t size);
    - *
    - *   symbol.h
    - *
    - *   search a _code_ list by code and return the associated name; return the
    - *   corresponding name on success or NULL on failure;
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef REWORD_SOURCE
    -#define REWORD_SOURCE
    -
    -#include <unistd.h>
    -#include <string.h>
    -
    -#include "../tools/symbol.h"
    -
    -char const * reword (code_t code, struct _code_ const list [], size_t size)
    -
    -{
    -	struct _code_ const * item = list;
    -	while ((unsigned)(item - list) < size)
    -	{
    -		if (item->code == code)
    -		{
    -			return (item->name);
    -		}
    -		item++;
    -	}
    -	return (NULL);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/rkey.1.html b/docbook/rkey.1.html deleted file mode 100644 index 25cff8b0..00000000 --- a/docbook/rkey.1.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - rkey.1 - - - - - - - - - -
    -rkey(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     rkey(1)
    -
    -NAME
    -       rkey - HomePlug AV Random Key Generator
    -
    -SYNOPSIS
    -       rkey [options] file
    -
    -DESCRIPTION
    -       Dynamically generate distinct HomePlug AV compliant keys.  A new key is printed on stdout with each program invocation or
    -       iteration, unless this is suppressed.  Key computation is seeded using a 64 ASCII character string stored in a user  cre‐
    -       ated  seedfile.   The  program  automatically increments the seedfile string to preserve continuity and uniqueness across
    -       program invocations, program iterations, console sessions, host reboots and production sites.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -D     Uses HomePlug AV rules for computing a Device Access Key (DAK) from a pass phrase.  A DAK is 16 bytes expressed as
    -              32 hexadecimal digits.  This option over-rides any -M and -N options previously specified on the command line.
    -
    -       -L level
    -              Set security level.  The security level is encoded into the NID.  Level 0 enables  pushbutton  pairing.   Level  1
    -              disables it.  This option has no effect unless a NID is computed.
    -
    -       -M     Uses  HomePlug  AV  rules  for  computing  a  Network Membership Key (NMK) from a pass phrase.  An NMK is 16 bytes
    -              expressed as 32 hexadecimal digits.  This option over-rides any -D or -N options previsously specified on the com‐
    -              mand line.
    -
    -       -N     Uses  HomePlug  AV  rules  for computing a Network Identification Key (NID) from a pass phrase.  An NID is 7 bytes
    -              expressed as 14 hexadecimal digits.  This option over-rides any -D or -M options previously specified on the  com‐
    -              mand line.
    -
    -       -n count
    -              The number of keys to generate and print.  This program prints the specified number of distinct keys of the speci‐
    -              fied type, one key per line.  Normally, program output is directed to a file or a pipe when this option  is  used.
    -              It is useful for creating a file of random keys.
    -
    -       -o     Use  the old seedfile string.  This option prevents the seedfile string from being incremented before a new key is
    -              computed.  This feature allows additional key types to be computed from the same seedfile string.
    -
    -       -q     Enable quiet mode which, for this application, has no effect.
    -
    -       -v     Enable verbose mode which, for this application, prints the pass phrase for each key.
    -
    -       --?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       seedfile
    -              The text file containing the seed string.  This file may be any length but only the first 64 characters  are  sig‐
    -              nificant.   If  it  is less than 64 characters then it will be extended to 64 characters after the first use.  The
    -              full 64 character string is incremented, character by character, right to left each time this program is run.  The
    -              seedfile  string is salted differently for each type of key requested and used to seed the SHA256 key engine.  One
    -              property of the SHA256 algorithm is that small changes in the seed will produce radically different output  having
    -              an extremely small chance of collision.
    -
    -EXAMPLES
    -       The  following example shows how to create a seedfile.  The seedfile acts as the seed for the SHA256 algorithm.  The seed
    -       is then salted (modified) differently for each type of key generated by this program.  The seedfile string is then incre‐
    -       mented  and  re-written  each time the program is executed, unless behaviors is suppressed.  Initially, the seedfile must
    -       contain at least one character or an error will occur.
    -
    -          # echo "My Company Name, Inc." > secret.key
    -
    -       The following example prints an SHA256 key on stdout.  An SHA256 key is 256 bits or 32 bytes expressed as 64  hexadecimal
    -       digits.   An  SHA256  key is the default output when no key type is specified.  SHA256 is a public domain standard, not a
    -       HomePlug AV standard.
    -
    -          # rkey secret.key
    -          BFF0F6E3C83CE13829EA7F1F6D25042F4B05052E44C0B801EEA7CD6317F3622E
    -
    -       The following command prints a new Device Access Key (DAK) on stdout using the seedfile secret.key as the seed.  The  key
    -       will be different each time this program is executed because the seedfile string is incremented each time.
    -
    -          # rkey -D secret.key
    -          F084B4E8F6069FF1300C9BDB812367FF
    -
    -       To observe the seedfile string, use option -v.  Notice that the seedfile string is 64 characters long and that spaces are
    -       significant.
    -
    -          # rkey -D secret.key -v
    -          89F96BC11480B0E1A37441397695E676 Qualcomm Atheros, Ocala FL                              [8@Z
    -
    -       The following command prints a new Network Membership Key  (NMK)  on  stdout,  instead  of  a  DAK,  using  the  seedfile
    -       secret.key as the seed.  Of course, one could specify another seedfile.
    -
    -          # rkey -M secret.key
    -          B59319D7E8157BA001B018669CCEE30D
    -
    -       The  following command prints 10 random SHA256 keys on stdout.  SHA256 keys were printed because no other type of key was
    -       specified.  Program output could have been directed to a file or a pipe for further processing.
    -
    -          # rkey secret.key -n 10
    -          780AC153CD47AB01520B5B0246DE7B78584C0413393EDA4430773DED80DDF01A
    -          C7FF68DB206B1E98B8752CC95296692D45AB3DFA418F5CF5DD13479836FEDD4E
    -          127C8E27F4C8AC7DB27EC8F977968F64D950830B8D511B798FA5A20BE807A7E1
    -          79E00DBD57A0E22DCEE2C9CF29F3B7DBA95137BEDC8C76EBE3C32BFFA653D136
    -          AC9B8DA1B480EF0ECD7A734383DC1B0F3886D0959BAE77F30F1F16C069D2FE4A
    -          B1F57B211EE774B506106DEC90B7D18FE0328377FCFD9A4D523B632DFAEFF87A
    -          B1C1C746BDC3E45EBE65FC8D5C15D68F41E9981757024A25A4C3261A154BE6F2
    -          06E6CCEA8C919162D22CE2ADCB2DDFBDCBB876631CE73F48525EC27E435934E9
    -          F26C0636C6B2D51956D04AD73DE03BE6D112661040CB23DD74922C6E05EC7E6B
    -          A62219B0BBABA1DBC444574D0D73A52954847E6DB2BE44441C73E12B9F8EA6E7
    -
    -       The following three commands use the -o option to prevent the seedfile from being incremented before or after the key  is
    -       computed.   Notice  that  a  DAK is first generated then regenerated again.  The third command generates an NMK using the
    -       same seedfile value used to compute the previous two keys.
    -
    -          # rkey -D secret.key
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          # rkey -oD secret.key
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          # rkey -oM secret.key
    -          FAD7EA3713497F2E134299FF1118F6B0
    -
    -       This utterly useless example demonstrates how to generate 10 identical device  access  keys  by  suppressing  the  normal
    -       string increment between each key computation.
    -
    -          # rkey -oDn 10 secret.key
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -          B12E8BA7B0FF31D107BE15E96EF65B86
    -
    -       This  example  demonstrates  how  to assign distinct keys to script variables or insert them on a command line using this
    -       program.  Read the GNU bash manual for more information on shell scripting.  See the modpib man page for  an  explanation
    -       of program options shown.
    -
    -          # DAK=$(rkey -D secret.key)
    -          # NMK=$(rkey -M secret.key)
    -          # echo DAK=${DAK} NMK=${NMK}
    -          # modpib -D $(rkey -D secret.key) -N ${NMK}
    -
    -RECOMMENDATIONS
    -       The seedfile is critical to the continuity and uniqueness of generated keys.  The 64 character string stored in the seed‐
    -       file is incremented, character by character, right to left, with each file access  unless  that  behavior  is  suppressed
    -       using  the  -o option.  The SHA256 algorithm generates radially different output given minor changes in this string.  The
    -       key space is huge and the probability of collision is statistically small.
    -
    -       Be aware that two seedfiles containing the same start string will generate the same key sequence.  To minimize the chance
    -       of  duplicate  key  values  across  production  lines,  each  production line should use seedfiles having different start
    -       strings.  The length of the start string is not important but it should be different for  each  production  line.   If  a
    -       seedfile is lost, merely replace it with another one, as though you are opening another production line.
    -
    -       Mathematically,  the  shorter the start string the longer it will take for two different seedfiles to coincidentally pro‐
    -       duce identical output.  From 12 to 24 character is a reasonable length but this is not a restriction.  If you  have  sev‐
    -       eral  production  lines,  you may want to maintain a record of the start strings used on each line in case a new seedfile
    -       must be created.
    -
    -REFERENCES
    -       See the HomePlug AV Specification for more information on encryption keys, pass phrases  and  hash  algorithms  used  and
    -       standard FIPS180-2 sec 5.3.2 for more information on SHA256 encoding.
    -
    -DISCLAIMER
    -       Qualcomm Atheros reserves the right to modify program names, functionality, input format or output format in future tool‐
    -       kit releases without any obligation to notify or compensate toolkit users.
    -
    -SEE ALSO
    -       hpavkey(1), hpavkeys(1), keys(1), mac2pw(1), mac2pwd(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com> ]
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                     rkey(1)
    -
    - - - diff --git a/docbook/rkey.c.html b/docbook/rkey.c.html deleted file mode 100644 index b2b00e42..00000000 --- a/docbook/rkey.c.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - rkey.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   rkey.c - random key generator;
    - *
    - *   generate random SHA256, device access, network membership and
    - *   network identifier keys using a seed file;
    - *
    - *   read the seed file, increment the seed for each key generated
    - *   then save the seed when done; exit the loop in an orderly way
    - *   on keyboard interrupt;
    - *
    - *
    - *   Contributor(s);
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define _GETOPT_H
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <signal.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../tools/flags.h"
    -#include "../key/HPAVKey.h"
    -#include "../key/SHA256.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/strincr.c"
    -#include "../tools/hexout.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/HPAVKeyDAK.c"
    -#include "../key/HPAVKeyNMK.c"
    -#include "../key/HPAVKeyNID.c"
    -#include "../key/HPAVKeySHA.c"
    -#include "../key/HPAVKeyOut.c"
    -#include "../key/SHA256Reset.c"
    -#include "../key/SHA256Write.c"
    -#include "../key/SHA256Block.c"
    -#include "../key/SHA256Fetch.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define DEFAULT_LEVEL 0
    -#define DEFAULT_COUNT 1
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static unsigned count = DEFAULT_COUNT;
    -
    -/*====================================================================*
    - *
    - *   void stop (signo_t signal);
    - *
    - *   terminate the program; we want to ensure an organized program
    - *   exit such that the current pass phrase is saved;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#if defined (__linux__)
    -
    -static void stop (signo_t signal)
    -
    -{
    -	count = 0;
    -	return;
    -}
    -
    -#endif
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, const char * argv []);
    - *
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, const char * argv [])
    -
    -{
    -	static const char * optv [] =
    -	{
    -		"DL:MNn:oqv",
    -		"seedfile",
    -		"generate HomePlug AV compliant keys",
    -		"D\tDAK - Device Access Keys",
    -		"L n\tSecurity Level is n [" LITERAL (DEFAULT_LEVEL) "]",
    -		"M\tNMK - Network Membership Keys",
    -		"N\tNID - Network Identifier",
    -		"n n\tgenerate n keys [" LITERAL (DEFAULT_COUNT) "]",
    -		"o\tuse old seedfile value",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(const char *)(0)
    -	};
    -
    -#if defined (__linux__)
    -
    -	struct sigaction sa;
    -
    -#endif
    -
    -	char phrase [HPAVKEY_PHRASE_MAX + 1];
    -	uint8_t digest [SHA256_DIGEST_LENGTH];
    -	unsigned level = DEFAULT_LEVEL;
    -	signed type = 0;
    -	signed next = 1;
    -	signed fd;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char)(c))
    -		{
    -		case 'D':
    -			type = HPAVKEY_DAK;
    -			break;
    -		case 'M':
    -			type = HPAVKEY_NMK;
    -			break;
    -		case 'N':
    -			type = HPAVKEY_NID;
    -			break;
    -		case 'n':
    -			count = (unsigned)(uintspec (optarg, 0, UINT_MAX));
    -			break;
    -		case 'L':
    -			level = (unsigned)(uintspec (optarg, 0, 1));
    -			break;
    -		case 'o':
    -			next = 0;
    -			break;
    -		case 'q':
    -			_setbits (flags, HPAVKEY_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, HPAVKEY_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc != 1)
    -	{
    -		error (1, ECANCELED, "No secret file given");
    -	}
    -	memset (phrase, 0, sizeof (phrase));
    -	if ((fd = open (* argv, O_BINARY|O_CREAT|O_RDWR, FILE_FILEMODE)) == -1)
    -	{
    -		error (1, errno, "Can't open %s", * argv);
    -	}
    -	if (read (fd, phrase, sizeof (phrase) - 1) == -1)
    -	{
    -		error (1, errno, "Can't read seedfile");
    -	}
    -	for (c = 0; c < (signed)(sizeof (phrase) - 1); c++)
    -	{
    -		if (phrase [c] < HPAVKEY_CHAR_MIN)
    -		{
    -			phrase [c] = HPAVKEY_CHAR_MIN;
    -			continue;
    -		}
    -		if (phrase [c] > HPAVKEY_CHAR_MAX)
    -		{
    -			phrase [c] = HPAVKEY_CHAR_MAX;
    -			continue;
    -		}
    -	}
    -
    -#if defined (__linux__)
    -
    -	memset (&sa, 0, sizeof (struct sigaction));
    -	sa.sa_handler = stop;
    -	sigaction (SIGTERM, &sa, (struct sigaction *)(0));
    -	sigaction (SIGQUIT, &sa, (struct sigaction *)(0));
    -	sigaction (SIGTSTP, &sa, (struct sigaction *)(0));
    -	sigaction (SIGINT, &sa, (struct sigaction *)(0));
    -	sigaction (SIGHUP, &sa, (struct sigaction *)(0));
    -
    -#endif
    -
    -	while (count-- > 0)
    -	{
    -		memset (digest, 0, sizeof (digest));
    -		if (next && strincr ((uint8_t *)(phrase), (size_t) (sizeof (phrase) - 1), HPAVKEY_CHAR_MIN, HPAVKEY_CHAR_MAX))
    -		{
    -			error (1, errno, "Can't increment seedfile");
    -		}
    -		if (type == HPAVKEY_DAK)
    -		{
    -			HPAVKeyDAK (digest, phrase);
    -			HPAVKeyOut (digest, HPAVKEY_DAK_LEN, phrase, flags);
    -			continue;
    -		}
    -		if (type == HPAVKEY_NMK)
    -		{
    -			HPAVKeyNMK (digest, phrase);
    -			HPAVKeyOut (digest, HPAVKEY_NMK_LEN, phrase, flags);
    -			continue;
    -		}
    -		if (type == HPAVKEY_NID)
    -		{
    -			HPAVKeyNMK (digest, phrase);
    -			HPAVKeyNID (digest, digest, level);
    -			HPAVKeyOut (digest, HPAVKEY_NID_LEN, phrase, flags);
    -			continue;
    -		}
    -		HPAVKeySHA (digest, phrase);
    -		HPAVKeyOut (digest, HPAVKEY_SHA_LEN, phrase, flags);
    -	}
    -	if (lseek (fd, 0, SEEK_SET) == -1)
    -	{
    -		error (1, errno, "Can't rewind seedfile");
    -	}
    -	if (write (fd, phrase, sizeof (phrase) - 1) == -1)
    -	{
    -		error (1, errno, "Can't update seedfile");
    -	}
    -	close (fd);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/ruledump.c.html b/docbook/ruledump.c.html deleted file mode 100644 index 80af8112..00000000 --- a/docbook/ruledump.c.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - ruledump.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void ruledump (struct rule * rule, FILE * fp);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef RULEDUMP_SOURCE
    -#define RULEDUMP_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../tools/memory.h"
    -#include "../plc/rules.h"
    -
    -/*====================================================================*
    - *
    - *   cspec_dump (struct cspec * cspec);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void cspec_dump (struct cspec * cspec)
    -
    -{
    -	printf ("cspec->CSPEC_VERSION=%d\n", LE16TOH (cspec->CSPEC_VERSION));
    -	printf ("cspec->VLAN_TAG=%d\n", LE16TOH (cspec->VLAN_TAG));
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   MMEClassifierDump (struct MMEClassifier * classifier);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void MMEClassifierDump (struct MMEClassifier * classifier)
    -
    -{
    -	char string [48];
    -	printf ("classifier->CR_PID=0x%02X\n", (unsigned)(classifier->CR_PID));
    -	printf ("classifier->CR_OPERAND=0x%02X\n", classifier->CR_OPERAND);
    -	hexdecode (classifier->CR_VALUE, sizeof (classifier->CR_VALUE), string, sizeof (string));
    -	printf ("classifier->CR_VALUE=%s\n", string);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   PIBClassifierDump (struct PIBClassifier * classifier);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void PIBClassifierDump (struct PIBClassifier * classifier)
    -
    -{
    -	char string [48];
    -	printf ("classifier->CR_PID=0x%08X\n", LE32TOH (classifier->CR_PID));
    -	printf ("classifier->CR_OPERAND=0x%08X\n", LE32TOH (classifier->CR_OPERAND));
    -	hexdecode (classifier->CR_VALUE, sizeof (classifier->CR_VALUE), string, sizeof (string));
    -	printf ("classifier->CR_VALUE=%s\n", string);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   MMERuleDump (struct MMERule * rule);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void MMERuleDump (struct MMERule * rule)
    -
    -{
    -	unsigned count;
    -	printf ("rule->MCONTROL=%d\n", rule->MCONTROL);
    -	printf ("rule->MVOLATILITY=%d\n", rule->MVOLATILITY);
    -	printf ("rule->MACTION=%d\n", rule->MACTION);
    -	printf ("rule->MOPERAND=%d\n", rule->MOPERAND);
    -	printf ("rule->NUM_CLASSIFIERS=%d\n", rule->NUM_CLASSIFIERS);
    -	for (count = 0; count < rule->NUM_CLASSIFIERS; count++)
    -	{
    -		MMEClassifierDump (&rule->CLASSIFIER [count]);
    -	}
    -	cspec_dump (&rule->cspec);
    -	printf ("\n");
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   PIBRuleDump (struct PIBRule * rule);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void PIBRuleDump (struct PIBRule * rule)
    -
    -{
    -	unsigned count;
    -	printf ("rule->MCONTROL=%d\n", rule->MCONTROL);
    -	printf ("rule->MVOLATILITY=%d\n", rule->MVOLATILITY);
    -	printf ("rule->MACTION=%d\n", rule->MACTION);
    -	printf ("rule->MOPERAND=%d\n", rule->MOPERAND);
    -	printf ("rule->NUM_CLASSIFIERS=%d\n", LE32TOH (rule->NUM_CLASSIFIERS));
    -	for (count = 0; count < LE32TOH (rule->NUM_CLASSIFIERS); count++)
    -	{
    -		PIBClassifierDump (&rule->CLASSIFIER [count]);
    -	}
    -	cspec_dump (&rule->cspec);
    -	printf ("\n");
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   classifier_priority_map_dump (struct classifier_priority_map * classifier_priority_map);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void classifier_priority_map_dump (struct classifier_priority_map * classifier_priority_map)
    -
    -{
    -	printf ("classifier_priority_map->Priority=%d\n", LE32TOH (classifier_priority_map->Priority));
    -	PIBClassifierDump (&classifier_priority_map->CLASSIFIER);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   auto_connection_dump (struct auto_connection * auto_connection);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void auto_connection_dump (struct auto_connection * auto_connection)
    -
    -{
    -	unsigned count;
    -	printf ("auto_connection->MACTION=%d\n", auto_connection->MACTION);
    -	printf ("auto_connection->MOPERAND=%d\n", auto_connection->MOPERAND);
    -	printf ("auto_connection->NUM_CLASSIFIERS=%d\n", LE16TOH (auto_connection->NUM_CLASSIFIERS));
    -	for (count = 0; count < LE16TOH (auto_connection->NUM_CLASSIFIERS); count++)
    -	{
    -		PIBClassifierDump (&auto_connection->CLASSIFIER [count]);
    -	}
    -	cspec_dump (&auto_connection->cspec);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   PIBClassifiersDump (struct PIBClassifiers * classifiers);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -void PIBClassifiersDump (struct PIBClassifiers * classifiers)
    -
    -{
    -	unsigned count;
    -	printf ("classifiers->priority_count=%d\n", LE32TOH (classifiers->priority_count));
    -	printf ("classifiers->autoconn_count=%d\n", LE32TOH (classifiers->autoconn_count));
    -	printf ("\n");
    -	printf ("-------- PRIORITY MAPS --------\n\n");
    -	for (count = 0; count < LE32TOH (classifiers->priority_count); count++)
    -	{
    -		classifier_priority_map_dump (&classifiers->classifier_priority_map [count]);
    -	}
    -	printf ("\n");
    -	printf ("-------- AUTO CONNECTIONS --------\n\n");
    -	for (count = 0; count < LE32TOH (classifiers->autoconn_count); count++)
    -	{
    -		auto_connection_dump (&classifiers->auto_connection [count]);
    -	}
    -	printf ("\n");
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/rules.c.html b/docbook/rules.c.html deleted file mode 100644 index a410b6e3..00000000 --- a/docbook/rules.c.html +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - rules.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   rules.c - Classification Rules Lookup Tables;
    - *
    - *   rules.h
    - *
    - *   QoS related symbol tables used by function ParseRule;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef RULES_SOURCE
    -#define RULES_SOURCE
    -
    -#include "../plc/rules.h"
    -
    -struct _code_ const controls [] =
    -
    -{
    -	{
    -		CONTROL_ADD,
    -		"Add"
    -	},
    -	{
    -		CONTROL_REM,
    -		"Rem"
    -	},
    -	{
    -		CONTROL_REMOVE,
    -		"Remove"
    -	}
    -};
    -
    -struct _code_ const volatilities [] =
    -
    -{
    -	{
    -		VOLATILITY_TEMP,
    -		"Temp"
    -	},
    -	{
    -		VOLATILITY_PERM,
    -		"Perm"
    -	}
    -};
    -
    -struct _code_ const actions [] =
    -
    -{
    -	{
    -		ACTION_CAP0,
    -		"CAP0"
    -	},
    -	{
    -		ACTION_CAP1,
    -		"CAP1"
    -	},
    -	{
    -		ACTION_CAP2,
    -		"CAP2"
    -	},
    -	{
    -		ACTION_CAP3,
    -		"CAP3"
    -	},
    -	{
    -		ACTION_BOOST,
    -		"Boost"
    -	},
    -	{
    -		ACTION_DROP,
    -		"Drop"
    -	},
    -	{
    -		ACTION_DROPTX,
    -		"DropTX"
    -	},
    -	{
    -		ACTION_DROPRX,
    -		"DropRX"
    -	},
    -	{
    -		ACTION_AUTOCONNECT,
    -		"AutoConnect"
    -	},
    -	{
    -		ACTION_STRIPTX,
    -		"StripTX"
    -	},
    -	{
    -		ACTION_STRIPRX,
    -		"StripRX"
    -	},
    -	{
    -		ACTION_TAGTX,
    -		"TagTX"
    -	},
    -	{
    -		ACTION_TAGRX,
    -		"TagRX"
    -	}
    -};
    -
    -struct _code_ const operands [] =
    -
    -{
    -	{
    -		OPERAND_ALL,
    -		"All"
    -	},
    -	{
    -		OPERAND_ANY,
    -		"Any"
    -	},
    -	{
    -		OPERAND_ALWAYS,
    -		"Always"
    -	}
    -};
    -
    -struct _code_ const fields [] =
    -
    -{
    -	{
    -		FIELD_ETH_DA,
    -		"EthDA"
    -	},
    -	{
    -		FIELD_ETH_SA,
    -		"EthSA"
    -	},
    -	{
    -		FIELD_VLAN_UP,
    -		"VLANUP"
    -	},
    -	{
    -		FIELD_VLAN_ID,
    -		"VLANID"
    -	},
    -	{
    -		FIELD_IPV4_TOS,
    -		"IPv4TOS"
    -	},
    -	{
    -		FIELD_IPV4_PROT,
    -		"IPv4PROT"
    -	},
    -	{
    -		FIELD_IPV4_SA,
    -		"IPv4SA"
    -	},
    -	{
    -		FIELD_IPV4_DA,
    -		"IPv4DA"
    -	},
    -	{
    -		FIELD_IPV6_TC,
    -		"IPv6TC"
    -	},
    -	{
    -		FIELD_IPV6_FL,
    -		"IPv6FL"
    -	},
    -	{
    -		FIELD_IPV6_SA,
    -		"IPv6SA"
    -	},
    -	{
    -		FIELD_IPV6_DA,
    -		"IPv6DA"
    -	},
    -	{
    -		FIELD_TCP_SP,
    -		"TCPSP"
    -	},
    -	{
    -		FIELD_TCP_DP,
    -		"TCPDP"
    -	},
    -	{
    -		FIELD_UDP_SP,
    -		"UDPSP"
    -	},
    -	{
    -		FIELD_UDP_DP,
    -		"UDPDP"
    -	},
    -	{
    -		FIELD_IP_SP,
    -		"IPSP"
    -	},
    -	{
    -		FIELD_IP_DP,
    -		"IPDP"
    -	},
    -	{
    -		FIELD_HPAV_MME,
    -		"MME"
    -	},
    -	{
    -		FIELD_ETH_TYPE,
    -		"ET"
    -	},
    -	{
    -		FIELD_TCP_ACK,
    -		"TCPAck"
    -	},
    -	{
    -		FIELD_VLAN_TAG,
    -		"VLANTag"
    -	}
    -};
    -
    -struct _code_ const operators [] =
    -
    -{
    -	{
    -		OPERATOR_IS,
    -		"Is"
    -	},
    -	{
    -		OPERATOR_NOT,
    -		"Not"
    -	}
    -};
    -
    -struct _code_ const states [] =
    -
    -{
    -	{
    -		OPERATOR_IS,
    -		"True"
    -	},
    -	{
    -		OPERATOR_NOT,
    -		"False"
    -	},
    -	{
    -		OPERATOR_IS,
    -		"On"
    -	},
    -	{
    -		OPERATOR_NOT,
    -		"Off"
    -	},
    -	{
    -		OPERATOR_IS,
    -		"Yes"
    -	},
    -	{
    -		OPERATOR_NOT,
    -		"No"
    -	},
    -	{
    -		OPERATOR_IS,
    -		"Present"
    -	},
    -	{
    -		OPERATOR_NOT,
    -		"Missing"
    -	}
    -};
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/rules.h.html b/docbook/rules.h.html deleted file mode 100644 index 87fccb63..00000000 --- a/docbook/rules.h.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - rules.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   rules.h - Classification Rules Definitions and Declarations;
    - *
    - *.  Qualcomm Atheros HomePlug AV Powerline Toolkit;
    - *:  Copyright (c) 2006-2010 by Intellon Corporation; ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nathaniel.houghton@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef RULES_HEADER
    -#define RULES_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../plc/plc.h"
    -#include "../tools/symbol.h"
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define CLASSIFIER_STRING 64
    -#define CLASSIFIER_CONTROLS 3
    -#define CLASSIFIER_VOLATILITIES 2
    -#define CLASSIFIER_ACTIONS 13
    -#define CLASSIFIER_OPERANDS 3
    -#define CLASSIFIER_OPERATORS 2
    -#define CLASSIFIER_STATES 8
    -#define CLASSIFIER_FIELDS 22
    -
    -#define CLASSIFIER_CONTROL_NAME "control"
    -#define CLASSIFIER_VOLATILITY_NAME "volatility"
    -#define CLASSIFIER_ACTION_NAME "action"
    -#define CLASSIFIER_OPERAND_NAME "operand"
    -#define CLASSIFIER_OPERATOR_NAME "operator"
    -#define CLASSIFIER_STATE_NAME "state"
    -#define CLASSIFIER_FIELD_NAME "field"
    -
    -#define CONTROL_ADD 0x00
    -#define CONTROL_REM 0x01
    -#define CONTROL_READ 0x02
    -#define CONTROL_REMOVE CONTROL_REM
    -
    -#define VOLATILITY_TEMP 0x00
    -#define VOLATILITY_PERM 0x01
    -
    -#define ACTION_CAP0 0x00
    -#define ACTION_CAP1 0x01
    -#define ACTION_CAP2 0x02
    -#define ACTION_CAP3 0x03
    -#define ACTION_DROP 0x04
    -#define ACTION_DROPTX ACTION_DROP
    -#define ACTION_BOOST 0x05
    -#define ACTION_DROPRX 0x06
    -#define ACTION_AUTOCONNECT 0x06
    -#define ACTION_STRIPTX 0x20
    -#define ACTION_STRIPRX 0x21
    -#define ACTION_TAGTX 0x22
    -#define ACTION_TAGRX 0x23
    -
    -#define OPERAND_ALL 0x00
    -#define OPERAND_ANY 0x01
    -#define OPERAND_ALWAYS 0x02
    -
    -#define OPERATOR_IS 0x00
    -#define OPERATOR_NOT 0x01
    -
    -#define FIELD_ETH_DA 0x00
    -#define FIELD_ETH_SA 0x01
    -#define FIELD_VLAN_UP 0x02
    -#define FIELD_VLAN_ID 0x03
    -#define FIELD_IPV4_TOS 0x04
    -#define FIELD_IPV4_PROT 0x05
    -#define FIELD_IPV4_SA 0x06
    -#define FIELD_IPV4_DA 0x07
    -#define FIELD_IPV6_TC 0x08
    -#define FIELD_IPV6_FL 0x09
    -#define FIELD_IPV6_SA 0x0A
    -#define FIELD_IPV6_DA 0x0B
    -#define FIELD_TCP_SP 0x0C
    -#define FIELD_TCP_DP 0x0D
    -#define FIELD_UDP_SP 0x0E
    -#define FIELD_UDP_DP 0x0F
    -#define FIELD_IP_SP 0xE0
    -#define FIELD_IP_DP 0xE1
    -#define FIELD_HPAV_MME 0xE2
    -#define FIELD_ETH_TYPE 0xE3
    -#define FIELD_TCP_ACK 0xE4
    -#define FIELD_VLAN_TAG 0xE5
    -
    -#define RULE_MAX_AUTOCONN 16
    -#define RULE_MAX_PRIORITY_MAPS 8
    -#define RULE_MAX_CLASSIFIERS 3
    -
    -/*====================================================================*
    - *   variables;
    - *--------------------------------------------------------------------*/
    -
    -extern struct _code_ const controls [CLASSIFIER_CONTROLS];
    -extern struct _code_ const volatilities [CLASSIFIER_VOLATILITIES];
    -extern struct _code_ const actions [CLASSIFIER_ACTIONS];
    -extern struct _code_ const operands [CLASSIFIER_OPERANDS];
    -extern struct _code_ const fields [CLASSIFIER_FIELDS];
    -extern struct _code_ const operators [CLASSIFIER_OPERATORS];
    -extern struct _code_ const states [CLASSIFIER_STATES];
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -/*
    - *	MME and PIB Classifier Rules are similar but differ in size
    - *      and so we declare structures for each use; observe that
    - *	function ParseRule uses the compact MMERule structure;
    - */
    -
    -typedef struct __packed cspec
    -
    -{
    -	uint16_t CSPEC_VERSION;
    -	uint32_t VLAN_TAG;
    -	uint32_t RSVD;
    -}
    -
    -cspec;
    -typedef struct __packed MMEClassifier
    -
    -{
    -	uint8_t CR_PID;
    -	uint8_t CR_OPERAND;
    -	uint8_t CR_VALUE [16];
    -}
    -
    -MMEClassifier;
    -typedef struct __packed PIBClassifier
    -
    -{
    -	uint32_t CR_PID;
    -	uint32_t CR_OPERAND;
    -	uint8_t CR_VALUE [16];
    -}
    -
    -PIBClassifier;
    -typedef struct __packed MMERule
    -
    -{
    -	uint8_t MCONTROL;
    -	uint8_t MVOLATILITY;
    -	uint8_t MACTION;
    -	uint8_t MOPERAND;
    -	uint8_t NUM_CLASSIFIERS;
    -	struct MMEClassifier CLASSIFIER [RULE_MAX_CLASSIFIERS];
    -	struct cspec cspec;
    -}
    -
    -MMERule;
    -typedef struct __packed PIBRule
    -
    -{
    -	uint8_t MCONTROL;
    -	uint8_t MVOLATILITY;
    -	uint8_t MACTION;
    -	uint8_t MOPERAND;
    -	uint32_t NUM_CLASSIFIERS;
    -	struct PIBClassifier CLASSIFIER [RULE_MAX_CLASSIFIERS];
    -	struct cspec cspec;
    -}
    -
    -PIBRule;
    -typedef struct __packed classifier_priority_map
    -
    -{
    -	uint32_t Priority;
    -	struct PIBClassifier CLASSIFIER;
    -}
    -
    -classifier_priority_map;
    -typedef struct __packed auto_connection
    -
    -{
    -	uint8_t MACTION;
    -	uint8_t MOPERAND;
    -	uint16_t NUM_CLASSIFIERS;
    -	struct PIBClassifier CLASSIFIER [RULE_MAX_CLASSIFIERS];
    -	struct cspec cspec;
    -	uint8_t RSVD [14];
    -}
    -
    -auto_connection;
    -typedef struct __packed PIBClassifiers
    -
    -{
    -	uint32_t priority_count;
    -	uint32_t autoconn_count;
    -	struct classifier_priority_map classifier_priority_map [RULE_MAX_PRIORITY_MAPS];
    -	struct auto_connection auto_connection [RULE_MAX_AUTOCONN];
    -}
    -
    -PIBClassifiers;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -signed MakeRule (struct plc * plc, struct MMERule * rule);
    -signed ParseRule (int * argcp, char const ** argvp [], struct MMERule *, struct cspec *);
    -signed PrintRule (uint32_t CR_PID, uint32_t CR_OPERAND, uint8_t CR_VALUE []);
    -signed ReadRules (struct plc * plc);
    -void cspec_dump (struct cspec *);
    -void classifier_priority_map_dump (struct classifier_priority_map *);
    -void auto_connection_dump (struct auto_connection *);
    -void PIBClassifiersDump (struct PIBClassifiers *);
    -void PIBClassifierDump (struct PIBClassifier *);
    -void MMEClassifierDump (struct MMEClassifier *);
    -void PIBRuleDump (struct PIBRule *);
    -void MMERuleDump (struct MMERule *);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/sada.1.html b/docbook/sada.1.html deleted file mode 100644 index 0cb1b8f9..00000000 --- a/docbook/sada.1.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - sada.1 - - - - - - - - - -
    -sada(1)                                      Qualcomm Atheros Open Powerline Toolkit                                     sada(1)
    -
    -NAME
    -       sada - slave authorization/deauthorization
    -
    -SYNOPSIS
    -       sada [options] [...]
    -
    -DESCRIPTION
    -OPTIONS
    -       -e     Redirects  stderr messages to stdout.  By convention status and error messages are printed on stderr while primary
    -              program output is printed on stdout.  This option prints all output on stdout in cases where this is desired.   -q
    -              Suppresses status messages on stderr.
    -
    -       -v     Print  additional information on stdout.  In particular, this option dumps incoming and outgoing packets which can
    -              be saved as text files for reference.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -EXAMPLES
    -       None.
    -
    -REFERENCES
    -       See the Qualcomm Atheros Powerline Firmware Technical Reference Manual for more information about MDU powerline  configu‐
    -       ration.
    -
    -DISCLAIMER
    -       None.
    -
    -SEE ALSO
    -       plc(1), mdustats(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                     sada(1)
    -
    - - - diff --git a/docbook/sada.c.html b/docbook/sada.c.html deleted file mode 100644 index 091b9dd8..00000000 --- a/docbook/sada.c.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - sada.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   sada.c - Slave Membership Manager;
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -#include "../plc/plc.h"
    -#include "../key/HPAVKey.h"
    -#include "../ram/sdram.h"
    -#include "../pib/pib.h"
    -#include "../nvm/nvm.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../plc/Confirm.c"
    -#include "../plc/Display.c"
    -#include "../plc/Failure.c"
    -#include "../plc/Request.c"
    -#include "../plc/ReadMME.c"
    -#include "../plc/SendMME.c"
    -#include "../mme/UnwantedMessage.c"
    -#include "../plc/SlaveMembership.c"
    -#include "../plc/Devices.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexencode.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/todigit.c"
    -#include "../tools/synonym.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../ether/openchannel.c"
    -#include "../ether/closechannel.c"
    -#include "../ether/readpacket.c"
    -#include "../ether/sendpacket.c"
    -#include "../ether/channel.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../mme/MMECode.c"
    -#include "../mme/EthernetHeader.c"
    -#include "../mme/QualcommHeader.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define SADA_AUTH_MODE 0
    -#define SADA_RETRY_TIME 0
    -
    -/*====================================================================*
    - *
    - *   void manager (struct plc * plc, signed count, signed pause);
    - *
    - *   perform operations in logical order despite any order specfied
    - *   on the command line; for example read PIB before writing PIB;
    - *
    - *   operation order is controlled by the order of "if" statements
    - *   shown here; the entire operation sequence can be repeated with
    - *   an optional pause between each iteration;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void manager (struct plc * plc, signed count, signed pause)
    -
    -{
    -	while (count--)
    -	{
    -		SlaveMembership (plc);
    -		sleep (pause);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv[]);
    - *
    - *   parse command line, populate plc structure and perform selected
    - *   operations; show help summary if asked; see getoptv and putoptv
    - *   to understand command line parsing and help summary display; see
    - *   plc.h for the definition of struct plc;
    - *
    - *   the command line accepts multiple MAC addresses and the program
    - *   performs the specified operations on each address, in turn; the
    - *   address order is significant but the option order is not; the
    - *   default address is a local broadcast that causes all devices on
    - *   the local H1 interface to respond but not those at the remote
    - *   end of the powerline;
    - *
    - *   the default address is 00:B0:52:00:00:01; omitting the address
    - *   will automatically address the local device; some options will
    - *   cancel themselves if this makes no sense;
    - *
    - *   the default interface is eth1 because most people use eth0 as
    - *   their principle network connection; you can specify another
    - *   interface with -i or define environment string PLC to make
    - *   that the default interface and save typing;
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	extern struct channel channel;
    -	static char const * optv [] =
    -	{
    -		"A:a:ei:qt:vx",
    -		"device [device] [...] [> stdout]",
    -		"Qualcomm Atheros Slave Membership Manager",
    -		"A x\tslave MAC address",
    -		"a n\tauthorization mode is n [" LITERAL (SADA_AUTH_MODE) "]\n\t0 = retain slave in AVLN\n\t1 = eject slave from AVNL\n\t2 = eject slave from AVLN and associates with next master",
    -		"e\tredirect stderr to stdout",
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -		"i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]",
    -
    -#else
    -
    -		"i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]",
    -
    -#endif
    -
    -		"q\tquiet mode",
    -		"t n\tassociation retry time [" LITERAL (SADA_RETRY_TIME) "]",
    -		"v\tverbose mode",
    -		"x\texit on error",
    -		(char const *) (0)
    -	};
    -
    -#include "../plc/plc.c"
    -
    -	signed loop = 1;
    -	signed wait = 0;
    -	signed c;
    -	if (getenv (PLCDEVICE))
    -	{
    -		channel.ifname = strdup (getenv (PLCDEVICE));
    -	}
    -	optind = 1;
    -	plc.pushbutton = SADA_AUTH_MODE;
    -	plc.module = SADA_RETRY_TIME;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'A':
    -			if (!hexencode (plc.RDA, sizeof (plc.RDA), (char const *)(optarg)))
    -			{
    -				error (1, errno, PLC_BAD_MAC, optarg);
    -			}
    -			break;
    -		case 'a':
    -			plc.pushbutton = (uint32_t)(uintspec (optarg, 0, 2));
    -			break;
    -		case 'e':
    -			dup2 (STDOUT_FILENO, STDERR_FILENO);
    -			break;
    -		case 'i':
    -
    -#if defined (WINPCAP) || defined (LIBPCAP)
    -
    -			channel.ifindex = atoi (optarg);
    -
    -#else
    -
    -			channel.ifname = optarg;
    -
    -#endif
    -
    -			break;
    -		case 'q':
    -			_setbits (channel.flags, CHANNEL_SILENCE);
    -			_setbits (plc.flags, PLC_SILENCE);
    -			break;
    -		case 't':
    -			plc.module = (uint32_t)(uintspec (optarg, 0, 0x0F));
    -			break;
    -		case 'v':
    -			_setbits (channel.flags, CHANNEL_VERBOSE);
    -			_setbits (plc.flags, PLC_VERBOSE);
    -			break;
    -		case 'x':
    -			_setbits (plc.flags, PLC_BAILOUT);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	openchannel (&channel);
    -	if (!(plc.message = malloc (sizeof (* plc.message))))
    -	{
    -		error (1, errno, PLC_NOMEMORY);
    -	}
    -	if (!argc)
    -	{
    -		manager (&plc, loop, wait);
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices))))
    -		{
    -			error (1, errno, PLC_BAD_MAC, * argv);
    -		}
    -		manager (&plc, loop, wait);
    -		argv++;
    -		argc--;
    -	}
    -	free (plc.message);
    -	closechannel (&channel);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/scripting.xml b/docbook/scripting.xml deleted file mode 100644 index 6a37c015..00000000 --- a/docbook/scripting.xml +++ /dev/null @@ -1,386 +0,0 @@ - - - Scripting - -
    - - Introduction - - - The Open Powerline Toolkit comes with a variety of example scripts in the scripts folder. They have proven useful to Atheros engineers but may not satisfy your specific needs. This chapter explains how some of these scripts work so that you can modify them to do what you need to do. Most scripts covered in this chapter are intended for a Powerline Workstation. - - - Atheros provides GNU bash scripts as examples and does not guarantee that they are suitable in any or all situations. Furthermore, Atheros may not always update them to reflect changes to toolkit programs. Toolkit command line syntax may change from one release to the next and so Atheros cannot guarantee that older scripts will work with newer programs. The scrips are small, simple and well organized. Do not run them until you have read them and understand what they do and how they work. - - - Sample scripts are available in the scripts folder. Some extremely useful ones are flash.sh, upgrade.sh and traffic.sh. They all reference files hardware.sh and firmware.sh. - - Although Toolkit programs run under Windows their power is realized through scripts. Scripting requires environmental support for sophisticated symbol substitution and expansion. Most Linux shells are suitable but Microsoft DOS is not. On Windows, consider using installing Cygwin and using their bash shell. Scripting languages Tcl and Python are suitable alternatives. Another alternative is to write small Windows programs that format and execute the DOS shell commands you want. - -
    -
    - - Linux Script Basics - - - We summarize some scripting rules here for those who may not be familiar with Linux scripting. If you do not understand the rules or the syntax or have questions then you should consult Linux documentation available on the internet. - - - On Linux, all commands typed in a console window are read and interpreted by a command interpreter called a shell program. The are several shell programs available for Linux but we use bash exclusively. If you elect to use a different shell program, like csh, then you will probably need to modify our scripts. - - - If you do not set execute permissions you must submit it to the shell for execution. If you set execute permissions on a script file then you can execute it directly by typing the filename. You can set execute permission on Linux with the chmod utility as shown in the example below. - - - - The example above show how to run a script file using bash when it does not have execute permissions set. It then shows how to set the execute permissions and run it directly without using bash. - - - It is good practice to insert a bang-path on the first line of a script to ensure is is executed by the correct shell program, regardless of the shell used to open the script. It is possible to open a script with one shell and have it execute under another shell. - - - - The next example shows an example bang-path. The first two characters inform the shell that this file contains scripting commands. The remainder of the bang-path line includes a program path with any options and arguments needed by the program. The shell will invoke that program and pass the rest of the script file to the program as standard input. - - - Symbols are defined with the symbol name then an equals sign then the definition text. By convention, symbol names use uppercase letters. The definition consists of all characters from the equals sign to the line end. If a definition contains white space, enclose it in quotes so that it is treated as one string when expanded. Symbol scope ends with the defining file unless it is exported. - - - - To reference a symbol, precede the variable name with a dollar sign. Atheros scripts go one step further by enclosing the symbol name is braces. This improves readability and simplifies global search-and-replace operations. - -
    - -
    - - Host Independence - - - Different hosts may use interfaces for different purposes. For example, one host might use eth0 for local network communications and eth1 for powerline communications. Another host might do the opposite. A portability problem is created when scripts use the literal interface names on the command line, as illustrated below: - - - - - - The commands shown above will work on a host where eth1 and eth2 are used for powerline communications but will not work on another host where eth1 or eth2 are configured differently. Editing scripts can become a chore when they contain many interface references. One solution is the consistent use of symbols. For example, the following example provides some degree of portability. - - - - - - The commands shown above are an improvment because symbols NIC1 and NIC2 can be edited once; however, if you frequently move many scripts from one host to another then each script must be changed. That can also become a chore. A better solution is to define the symbols NIC1 and NIC2 once in a single file and then include the definitions in scripts that need them. For example, if we created file hardware.sh like so ... - - - - - - ... then we could include it in one or more other scripts, like so ... - - - - - - On Linux, the . command causes the named file to be included in-line as though it were part of the including file. This elminates the need to export symbol definitions. A full discussion of Linux environment variable scope can be found on the internet. The point is that each host should have it's own definitions files stored in a common folder so that other scripts can include them and reference them in a consistent manner. - - - Atheros example scripts include two definitions files: hardware.sh and firmware.sh. File hardware.sh defines hardware related symbols as shown below and file firmware.sh defines firmware and configuration filenames. They reside in a scripts folder and relative path is used to access them. This has proven to work well in most situations. - - - - hardware.sh - - - - You should create a hardware.sh file in a common folder on each host where you want to execute toolkit scripts. In this way, a script created on one host can be executed on another host without modification. - - - - - File hardware.sh assigns specific values to symbols that are used in many of the scripts found in the scripts folder. Some Atheros scripts uses all these symbols and some do not. By convention, NIC1 and NIC2 name the Ethernet interfaces connected to a Golden Node and Device Under Test. MAC1 and MAC2 are the hardware addresses of NIC1 and NIC2, respectively. These symbols can be referenced in scripts with references like ${NIC1} or ${MAC1}. Of course, you could define other symbols here, as well. See the script under Device Upgrade as one example of how file hardware.sh can be included in another script. - - - Some scripts, such as flash.sh and upgrade.sh, only operate on one device and do not need to define both NIC1 and NIC2. By convention, these scripts reference interface DUT only. - - - - - firmware.sh - - - You should create a firmware.sh file in a common folder on each host where you want to execute toolkit scripts. In this way, a script created on one host can be executed on another host without modification. - - - - - File firmware.sh assigns specific filenames to symbols that are used in some of the scripts found in the scripts folder. Some Atheros scripts use all of these symbols and some do not. By convention, CFG defines the SDRAM configuration file used to initialize an INT6000 or INT6300 device, PIB defines the Parameter Information Block file to be used and NVM defines the firmware image file to be used. - - - This file is especially useful when working with a specific version of firmware. If there are multiple definitions for a symbol, the last definition is the one that takes effect. At Atheros, this file often contains dozens of definitions and we merely move or copy the ones we want to the end of the file. Our custom scripts then operate on the same configuration, parameter and firmware files until we reorder the definitions in firmware.sh. - - -
    -
    - - Checking Device Connection - - - You may want to confirm that a device is actually connected to an Etherenet interface before attempting to run a script. Program int6kwait can be used for this purpose. We often print a brief message to alert the operator that there is no connection or the device has no power applied. - - - - In the above example, we invoke int6kwait to poll the device connected to a specific Ethernet interface (-i) until the firmware starts (-s). The program will return a non-zero return value (-x) if the device does not start within a given period of time. By default, the timeout period is 60 seconds. On return, we check the return code then print an error message and exit the script on timeout. Symbol NIC1 must be defined earlier in the script, possibly in hardware.sh. - -
    -
    - - Random Device Identity - - - Some Atheros scripts need random MAC, DAK or NMK strings as arguments to Toolkit programs. Program rkey can be used for this purpose. We demonstrate one way to define symbols here and demonstrate how to use symbols later on. - - - - The first statement, above, uses program rkey to read file secret.key and compute a random DAK (-D). The ouput string is assigned to symbol DAK. The second statement uses program rkey to read the file secret.key and compute a random NMK (-M). The output is assigned to symbol NMK. - -
    -
    - - Actual Device Identity - - - Some scripts need actual MAC, DAK or NMK strings as arguments to Toolkit programs. Program int6kid can be used for this purpose. We demonstrate one way to define symbols here and demonstrate how to use them later on. - - - - - The first statement, above, uses program int6kid to echo the DAK (-D) from the device connected to Ethernet interface NIC1 and assign the output to symbol DAK. The second statement uses program int6kid to echo the NMK (-M) of the device connected to Ethernet interface NIC1 and assign the output to symbol NMK. - -
    -
    - - Editing a PIB - - - Many scripts place a device in a known state by editing a PIB file and writing it to the device before starting an operation. Program modpib can be used for this purpose. It is safe because only certain values can be changed and, where necessary, certain cross-parameter computations are performed automatically. - - - - The example above uses modpib to set the CCo state (-C), the MAC address (-M), the DAK (-D) and the NMK (-N) in the defined PIB file. Argument 0 means CCo Auto and argument next increments the MAC address. The DAK and NMK were defined earlier in the script. Symbol PIB must be defined earlier in the script, possibly in firmware.sh. - - - Program modpib will print an error message and return a non-zero value on error. We test the return value and exit the script on error to avoid subsequent errors. One could, of course, suppress normal output (-q) and print your own error message using the Linux echo utility. - -
    -
    - - Initialize a Device - - - Initializing a device involves downloading memory configuration parameters, runtime firmware and runtime parameters into SDRAM and then starting the runtime firmware to make the device fully functional. Program int6kf can be used for this purpose when the INT6000 Softloader or INT6300 Bootloader is running. Additionally, program int6kf can be used to flash blank or corrupted NVRAM once runtime firmware has started. - - - Device initialization is only necessary when a device that has no NVRAM or has corrupted NVRAM or has a Softloader stored in NVRAM. It is only possible when either the INT6000 Softloader or INT6300 Bootloader is running. See The Boot Process for detailed information. - - - - The example above uses program int6kf to download an SDRAM configuration file (-C), PIB file (-P) and NVM file (-N) then start firmware execution. Symbols NIC1, CFG, PIB and NVM must be defined earlier in the script, perhaps in files hardware.sh and firmware.sh. - - - Program int6kf returns a non-zero value on error. We can check the return code and exit the script on error to avoid subsequent errors. We could, of course, suppress normal output (-q) and print our own error message using the Linux echo utility. - - - In some cases, we may want to flash a blank or corrupted NVRAM after the runtime firmware has started. We could use program int6k for this purpose but program int6kf can be used, as well. Essentially, it initializes the device (as above) then downloads the PIB and NVM files again and flashes them into NVRAM. - - - - The example above initializes a device with an SDRAM configuration file (-C), PIB file (-P) and NVM file (-N) as before. Once the runtime firmware has started, the PIB and NVM files are downloaded again and flashed (-FF) into NVRAM. - - - The force-flash option (-FF) is needed in this case because runtime firmware that has been written directly to SDRAM and started by the local host assumes there is no NVRAM present to flash or there might be Softloader firmware stored in NVRAM that must be protected from accidental flashing. Runtime firmware that has been read from NVRAM need not make that assumption. - -
    -
    - - Update a Device - - - In some cases we want to replace the runtime firmware or runtime parameters stored in NVRAM. Program int6k can be used for this purpose when runtime firmware is running. - - - A device update may be necessary when new runtime firmware or new runtime parameters or both must be programmed into NVRAM. It is only possible when NVRAM is present and the runtime firmware is running. - - - - The example above uses int6k to download a PIB file (-P) and NVM file (-N) then flash NVRAM (-F). Symbol NIC1 must be defined earlier in the script, perhaps in file hardware.sh. Symbols PIB and NVM must also be defined earlier in the script, perhaps in file firmware.sh. - - - Program int6k returns a non-zero value on error. We can check the return code and exit the script on error to avoid subsequent errors. We could, of course, suppress normal output (-q) and print our own error message using the Linux echo utility. - - - - In some cases, you may want to preserve the current firmware on a device and update only the PIB. Program int6k can be used for this purpose, as well. - - - - The example above downloads a PIB file (-P) and commits (-C) the PIB only to NVRAM. There are a variety of device flash scenarios and each requires some varation on one of the examples shown here. - -
    -
    - - Generating Powerline Traffic - - - Once two devices associate, you must send data across the powerline in both direction so that each device can compute a TX and RX PHY rate. One method is to use the efsu program that comes with the Toolkit. The program is designed to send free-form Ethernet frames for test and debug purposes but we can also use it to send lots of junk frames in either direction. - - - - The example above uses efsu to send the generic Ethernet frame stored in file frame.hex between the two Ethernet interfaces NIC1 and NIC2 (-i). In this example, NIC1 and NIC2 are both installed in the host. We have efsu insert the host source address in the OSA field (-h) and destination address in the ODA field (-d) of each frame as it is sent. The entire operation sends the same frame 1000 times (-l) in each direction, twice. - - - Other methods of generating bi-directional traffic can be used but this method is simple, needs nothing other than the toolkit programs and permits easy synchronization. Program efsu is designed to send custom Etherenet frames, not measure or control data rates, but the toolkit includes open source program ttcp which is designed to measure and control data rates. - -
    -
    - - Reading PHY Rates - - - Atheros powerline devices automatically compute their average PHY rate which can be read and displayed. Average PHY rate is an indication of performance and can be affected by attenuation and ambient powerline noise. Program int6krate is designed to report the average PHY rate. - - - - The example above uses int6krate to read and display the average TX and RX PHY rates for the device connected to Ethernet interface NIC2. Option -n requests PHY rates. Option -x exits with a status that can be tested in the subsequent if statement. Output appears in fix-width columns to facilitate post-processing. Other ways to obtain PHY rates are int6k -m and int6kstat -t. - -
    -
    - - User Interaction - - - Scripts should be designed, whenever possible, to perform correctly without user intervention but there are cases where user intervention is appropriate. The following example illustrates one bash shell method that only requires user input when default values are wrong. - - - - First, we define symbol MAC with a default value. The Linux echo utility prints a prompt on the console that includes the symbol value. The trailing newline is suppressed () so that text can be typed immediately after the prompt. The echo command is terminated with semicolon (;) so that another command can be included on the same line. The shell read statement waits for the user to type something and press the enter key. The shell will assign the input to shell variable REPLY. The value of REPLY is evaluated and used to redefine the symbol only if the input was a non-zero length string. - - -MAC Address [00:B0:52:00:BA:BE]: - - - The user will see something like this. If the value is correct the user can press the enter key to generate a zero length string. Otherwise, the user can type the correct value before pressing the enter key. - -
    -
    diff --git a/docbook/sdram.1.html b/docbook/sdram.1.html deleted file mode 100644 index 019456ab..00000000 --- a/docbook/sdram.1.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - sdram.1 - - - - - - - - - -
    -sdram(1)                                     Qualcomm Atheros Open Powerline Toolkit                                    sdram(1)
    -
    -NAME
    -       sdram - Atheros SDRAM Configuration File Generator
    -
    -SYNOPSIS
    -       sdram
    -
    -DESCRIPTION
    -       The  Atheros  SDRAM  Configuration  File  Generator  creates two INT6300 SDRAM configuration files in the current working
    -       folder.  Either of them may be used as the argument for the int6kf -C option when initializing INT6300 devices.  Read the
    -       int6kf man page for more information.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -BACKGROUND
    -       Configuration files for the Linux Toolkit have .cfg extensions and consist of 32 binary bytes plus  a  32  bit  checksum.
    -       They are difficult to modify but easy to verify.  The format requires no conversion on input or output and, consequently,
    -       it is preferred to that used by the Windows Device Manager.
    -
    -       Configuration files for the Windows Device Manager have .config extensions and consist of 64  hexadecimal  ASCII  charac‐
    -       ters.  They are easily modified using a text editor but cannot be easily validated.  They require ASCII to binary conver‐
    -       sion on input and binary to ASCII conversion on output.  Read the config2cfg man page for more information.
    -
    -OPTIONS
    -       There are no options.
    -
    -EXAMPLES
    -       The following example writes two files, sdram16mb.cfg and sdram64.cfg, in the current working folder.  They will  replace
    -       any existing files having the same names.
    -
    -           # sdram
    -           writing sdram16mb.cfg
    -           writing sdram64mb.cfg
    -
    -DISCLAIMER
    -       The  SDRAM file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information
    -       is not available.  Qualcomm Atheros reserves the right to change  the  file  structure  or  content  in  future  firmware
    -       releases without any obligation to notify or compensate users of this program.
    -
    -SEE ALSO
    -       config2cfg(1), int6kf(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                    sdram(1)
    -
    - - - diff --git a/docbook/sdram.c.html b/docbook/sdram.c.html deleted file mode 100644 index e9d9021c..00000000 --- a/docbook/sdram.c.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - sdram.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   sdram.c - create INT6300 sdram configuration files;
    - *
    - *   sdram.h
    - *
    - *   this program writes two sdram configuration files in the current
    - *   working directory; both files are for Linux toolkit programs and
    - *   not the Windows Device Manager;
    - *
    - *   one of these sdram configuration blocks must be sent to the
    - *   INT6300 bootloader with VS_SET_SDRAM before downloading NVM
    - *   and PIB files;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <unistd.h>
    -#include <stdint.h>
    -#include <fcntl.h>
    -
    -#include "../tools/memory.h"
    -#include "../ram/sdram.h"
    -
    -#ifndef MAKEFILE
    -#include "../tools/checksum32.c"
    -#endif
    -
    -#define FILE1 "sdram16mb.cfg"
    -#define FILE2 "sdram64mb.cfg"
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	const uint8_t sdram16mb [32] =
    -	{
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x01,
    -		0x68,
    -		0x2f,
    -		0x14,
    -		0x00,
    -		0x92,
    -		0xd4,
    -		0xe1,
    -		0x01,
    -		0xd6,
    -		0x83,
    -		0x08,
    -		0x00,
    -		0x88,
    -		0x32,
    -		0x00,
    -		0x00,
    -		0xdb,
    -		0x06,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00
    -	};
    -	const uint8_t sdram64mb [32] =
    -	{
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x04,
    -		0x88,
    -		0x31,
    -		0x14,
    -		0x00,
    -		0x91,
    -		0xd4,
    -		0xe1,
    -		0x01,
    -		0xe3,
    -		0x2b,
    -		0x01,
    -		0x00,
    -		0x89,
    -		0x30,
    -		0x00,
    -		0x00,
    -		0x66,
    -		0x03,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x01,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00,
    -		0x00
    -	};
    -	int fd;
    -	uint32_t checksum;
    -	if ((fd = open (FILE1, O_CREAT|O_WRONLY|O_TRUNC, 0444)) != -1)
    -	{
    -		printf ("writing %s\n", FILE1);
    -		checksum = checksum32 (sdram16mb, sizeof (sdram16mb), 0);
    -		write (fd, sdram16mb, sizeof (sdram16mb));
    -		write (fd, &checksum, sizeof (checksum));
    -		close (fd);
    -	}
    -	if ((fd = open (FILE2, O_CREAT|O_WRONLY|O_TRUNC, 0444)) != -1)
    -	{
    -		printf ("writing %s\n", FILE2);
    -		checksum = checksum32 (sdram64mb, sizeof (sdram64mb), 0);
    -		write (fd, sdram64mb, sizeof (sdram64mb));
    -		write (fd, &checksum, sizeof (checksum));
    -		close (fd);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/sdram.h.html b/docbook/sdram.h.html deleted file mode 100644 index 1b4e979f..00000000 --- a/docbook/sdram.h.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - sdram.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   sdram.h - SDRAM definitions and declarations;
    - *
    - *   the first section if an NVM file contains SDRAM parameters used
    - *   by the bootloader;
    - *
    - *.  Qualcomm Atheros HomePlug AV Powerline Toolkit;
    - *:  Copyright (c) 2006-2010 by Intellon Corporation; ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SDRAM_HEADER
    -#define SDRAM_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define SDRAM_SILENCE (1 << 0)
    -#define SDRAM_VERBOSE (1 << 1)
    -#define SDRAM_BASENAME (1 << 2)
    -
    -/*====================================================================*
    - *   variables;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed config_ram
    -
    -{
    -	uint32_t SDRAMSIZE;
    -	uint32_t SDRAMCONF;
    -	uint32_t SDRAMTIM0;
    -	uint32_t SDRAMTIM1;
    -	uint32_t SDRAMCNTRL;
    -	uint32_t SDRAMREF;
    -	uint32_t MACCLOCK;
    -	uint32_t SDRAMRSVD;
    -}
    -
    -config_ram;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -void sdrampeek (struct config_ram * config_ram);
    -void sdramtext (struct config_ram * config_ram);
    -int sdramfile (int fd, char const *title, flag_t flags);
    -int sdramfileA (int fd, char const *title, flag_t flags);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/sdramfile.c.html b/docbook/sdramfile.c.html deleted file mode 100644 index 64e885ea..00000000 --- a/docbook/sdramfile.c.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - sdramfile.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   int sdramfile (int fd, char const * filename, flag_t flags);
    - *
    - *   sdram.h
    - *
    - *   open an SDRAM configuration file and validate it by checking the
    - *   file length; unfortunately there are not many things to check;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SDRAMFILE_SOURCE
    -#define SDRAMFILE_SOURCE
    -
    -#include <unistd.h>
    -#include <memory.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -
    -#include "../ram/sdram.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -
    -int sdramfile (int fd, char const * filename, flag_t flags)
    -
    -{
    -	uint32_t checksum;
    -	struct config_ram config_ram;
    -	memset (&config_ram, 0, sizeof (config_ram));
    -	if (lseek (fd, 0, SEEK_SET) == -1)
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Can't rewind file: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (read (fd, &config_ram, sizeof (config_ram)) != sizeof (config_ram))
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Wrong file size: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (read (fd, &checksum, sizeof (checksum)) != sizeof (checksum))
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Can't read checksum: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (checksum32 (&config_ram, sizeof (config_ram), checksum))
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, 0, "Bad checksum: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (lseek (fd, 0, SEEK_SET) == -1)
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Can't rewind file: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/sdramfileA.c.html b/docbook/sdramfileA.c.html deleted file mode 100644 index 8543c211..00000000 --- a/docbook/sdramfileA.c.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - sdramfileA.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   int sdramfileA (int fd, char const * filename, flag_t flags);
    - *
    - *   sdram.h
    - *
    - *   open an SDRAM configuration file and validate it by checking the
    - *   file length; unfortunately there are not many things to check;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SDRAMFILEA_SOURCE
    -#define SDRAMFILEA_SOURCE
    -
    -#include <unistd.h>
    -#include <memory.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -
    -#include "../ram/sdram.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -
    -int sdramfileA (int fd, char const * filename, flag_t flags)
    -
    -{
    -	uint32_t checksum;
    -	struct config_ram config_ram;
    -	memset (&config_ram, 0, sizeof (config_ram));
    -	if (lseek (fd, 0, SEEK_SET) == -1)
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Can't rewind file: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (read (fd, &config_ram, sizeof (config_ram)) != sizeof (config_ram))
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Wrong file size: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (read (fd, &checksum, sizeof (checksum)) != sizeof (checksum))
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Can't read checksum: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (checksum32 ((uint32_t *)(&config_ram), sizeof (config_ram) >> 2, checksum))
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, 0, "Bad checksum: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	if (_anyset (flags, SDRAM_VERBOSE))
    -	{
    -		if ((filename) && (*filename))
    -		{
    -			printf ("------- %s -------\n", filename);
    -		}
    -		sdrampeek (&config_ram);
    -	}
    -	if (lseek (fd, 0, SEEK_SET) == -1)
    -	{
    -		if (_allclr (flags, SDRAM_SILENCE))
    -		{
    -			error (0, errno, "Can't rewind file: %s", filename);
    -		}
    -		return (-1);
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/sdrampeek.c.html b/docbook/sdrampeek.c.html deleted file mode 100644 index 02e7b14d..00000000 --- a/docbook/sdrampeek.c.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - sdrampeek.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void sdrampeek(const struct config_ram * config_ram);
    - *
    - *   sdram.h
    - *
    - *   print SDRAM configuration on stdout in human-readable format;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SDRAMPEEK_SOURCE
    -#define SDRAMPEEK_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../ram/sdram.h"
    -#include "../tools/memory.h"
    -
    -void sdrampeek (struct config_ram * config_ram)
    -
    -{
    -	printf ("\tSIZE=0x%08X (%dmb)\n", LE32TOH (config_ram->SDRAMSIZE), LE32TOH (config_ram->SDRAMSIZE)>>20);
    -	printf ("\tCONF=0x%08X\n", LE32TOH (config_ram->SDRAMCONF));
    -	printf ("\tTIM0=0x%08X\n", LE32TOH (config_ram->SDRAMTIM0));
    -	printf ("\tTIM1=0x%08X\n", LE32TOH (config_ram->SDRAMTIM1));
    -	printf ("\tCNTRL=0x%08X\n", LE32TOH (config_ram->SDRAMCNTRL));
    -	printf ("\tREF=0x%08X\n", LE32TOH (config_ram->SDRAMREF));
    -	printf ("\tCLOCK=0x%08X\n", LE32TOH (config_ram->MACCLOCK));
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/sdramtext.c.html b/docbook/sdramtext.c.html deleted file mode 100644 index 7957ad09..00000000 --- a/docbook/sdramtext.c.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - sdramtext.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void sdramtext(const struct config_ram * config_ram);
    - *
    - *   sdram.h
    - *
    - *   print SDRAM configuration on stdout as an ASCII string; this
    - *   format is suitable input for Atheros Windows Device Manager;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SDRAMTEXT_SOURCE
    -#define SDRAMTEXT_SOURCE
    -
    -#include <stdio.h>
    -#include <unistd.h>
    -
    -#include "../ram/sdram.h"
    -#include "../tools/memory.h"
    -
    -void sdramtext (struct config_ram * config_ram)
    -
    -{
    -	printf ("%08X", htonl (config_ram->SDRAMSIZE));
    -	printf ("%08X", htonl (config_ram->SDRAMCONF));
    -	printf ("%08X", htonl (config_ram->SDRAMTIM0));
    -	printf ("%08X", htonl (config_ram->SDRAMTIM1));
    -	printf ("%08X", htonl (config_ram->SDRAMCNTRL));
    -	printf ("%08X", htonl (config_ram->SDRAMREF));
    -	printf ("%08X", htonl (config_ram->MACCLOCK));
    -	printf ("%08X", htonl (config_ram->SDRAMRSVD));
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/security.xml b/docbook/security.xml deleted file mode 100644 index 00b15abc..00000000 --- a/docbook/security.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - Security - -
    - - Introduction - - - HomePlug AV devices support two types of secure access: Network Access and Device Access. Network access requires a Network Membership Key (NMK) that grants a device the right to join and participate in a given HomePlug AV powerline network. Device access requires a Device Access Key (DAK) that grants a local host the right to perform privileged operations on a given device. Both types of keys, the NMK and the DAK, are apparently random 128-bit (or 16-byte) integers. At the network level, any application that can produce the correct NMK or DAK can gain access to the network or the device that demands that key. - -
    -
    - - Encryption Keys - - - There are many ways to generate keys but some methods are preferred to others. The HomePlug Powerline Alliance has published two algorithms for generating fixed-length, binary keys from human-friendly, variable-length character strings. One method generates an NMK and the other generates a DAK. We call these character strings "pass phrases" or "passwords". - - - Both HomePlug AV algorithms use the widely published SHA256 algorithm that converts variable length input to a statistically unique 256-bit (or 32 byte) digest or signature. It is statistically improbable that two inputs will produce the same output and is would be computationally expensive to determine the input given the output. Although these algorithms are approved by the HomePlug Powerline Alliance, there is no requirement to used them. Many other excellent algorithms exist. - -
    -
    - - User Passwords - - - Atheros end-user software implements the recommended HomePlug AV algorithms for converting variable-length character strings (passwords) to fixed-length binary values (keys). This ensures that a given password will always produce the same key. It also ensures that no two passwords will produce the same key and that the key cannot be used to determine the password. A given password will also produce a different NMK and DAK. - - - HomePlug AV passwords are 12 to 64 characters long and may contain any ASCII character in the range 0x20 (space) through 0x7E (~). This character set essentially includes all printable characters that can be entered using an English Language keyboard. - - - People frequently confuse the DAK with the device password and the NMK with the network password. The password is a character string and the key is a binary value. The password are for people and the key is for computers. - -
    -
    - - Password Strategy - - - -
    -
    diff --git a/docbook/sendmessage.c.html b/docbook/sendmessage.c.html deleted file mode 100644 index fbfb2599..00000000 --- a/docbook/sendmessage.c.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - sendmessage.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ssize_t sendmessage (struct channel const * channel, struct message * message, ssize_t length);
    - *
    - *   plc.h
    - *   
    - *   send management message over Ethernet in a platform independent
    - *   fashion; return the number of bytes sent on succes, 0 on timeout
    - *   or -1 on error;
    - *
    - *   see readmessage for the vendor specific read counterpart to this 
    - *   function;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *      Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SENDMESSAGE_SOURCE
    -#define SENDMESSAGE_SOURCE
    -
    -#include <stdint.h>
    -
    -#include "../plc/plc.h"
    -
    -ssize_t sendmessage (struct channel const * channel, struct message * message, ssize_t length) 
    -
    -{ 
    -	return (sendpacket (channel, message, length)); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/sendpacket.c.html b/docbook/sendpacket.c.html deleted file mode 100644 index 99c4bf19..00000000 --- a/docbook/sendpacket.c.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - sendpacket.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ssize_t sendpacket (struct channel const * channel, void * memory, ssize_t extent);
    - *
    - *   channel.h
    - *
    - *   send one packet over a raw packet channel; return the number of
    - *   bytes sent or -1 on error; dump outgoing packets on stdout when
    - *   the VERBOSE flag is set;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SENDPACKET_SOURCE
    -#define SENDPACKET_SOURCE
    -
    -#include <unistd.h>
    -
    -#include "../ether/channel.h"
    -#include "../tools/memory.h"
    -#include "../tools/flags.h"
    -
    -ssize_t sendpacket (struct channel const * channel, void * memory, ssize_t extent)
    -
    -{
    -	if (_anyset (channel->flags, CHANNEL_VERBOSE))
    -	{
    -		hexdump (memory, 0, extent, stdout);
    -	}
    -
    -#if defined (__linux__)
    -
    -	extent = sendto (channel->fd, memory, extent, 0, (struct sockaddr *) (0), (socklen_t) (0));
    -
    -#elif defined (__APPLE__) || defined (__OpenBSD__)
    -
    -	extent = write (channel->fd, memory, extent);
    -
    -#elif defined (WINPCAP) || defined (LIBPCAP)
    -
    -	if (pcap_sendpacket (channel->socket, (byte *)(memory), extent))
    -	{
    -		extent = -1;
    -	}
    -
    -#else
    -#error "Unknown Environment"
    -#endif
    -
    -	return (extent);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/serial.c.html b/docbook/serial.c.html deleted file mode 100644 index 6c2b4f2d..00000000 --- a/docbook/serial.c.html +++ /dev/null @@ -1,506 +0,0 @@ - - - - - - serial.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   serial.c - Atheros Serial Line Command Buffer Management;
    - *
    - *   serial.h
    - *
    - *   this module contains a serial line command buffer and functions
    - *   to encode and decode it in different formats and send or receive
    - *   it over the serial line;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SERIAL_SOURCE
    -#define SERIAL_SOURCE
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <stdint.h>
    -#include <memory.h>
    -#include <errno.h>
    -
    -#if defined (WIN32)
    -#include <Windows.h>
    -#endif
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../serial/serial.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -
    -/*====================================================================*
    - *   private variables;
    - *--------------------------------------------------------------------*/
    -
    -struct command command;
    -
    -/*====================================================================*
    - *
    - *   void clearcommand ();
    - *
    - *   serial.h
    - *
    - *   erase the current command by writing 0s;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void clearcommand ()
    -
    -{
    -	extern struct command command;
    -	memset (&command, 0, sizeof (command));
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void sendcommand (struct _file_ * port, flag_t flags);
    - *
    - *   serial.h
    - *
    - *   echo then send the command;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void sendcommand (struct _file_ * port, flag_t flags)
    -
    -{
    -	extern struct command command;
    -	if (_anyset (flags, UART_VERBOSE))
    -	{
    -		write (STDERR_FILENO, command.buffer, command.length);
    -		write (STDERR_FILENO, "\n", sizeof (char));
    -	}
    -	if (write (port->file, command.buffer, command.length) != (signed)(command.length))
    -	{
    -		error (1, errno, "Can't write to %s", port->name);
    -	}
    -	clearcommand ();
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void readcommand (struct _file_ * port, flag_t flags);
    - *
    - *   serial.h
    - *
    - *   read response serial line and log the response;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void readcommand (struct _file_ * port, flag_t flags)
    -
    -{
    -	extern struct command command;
    -
    -#if defined (WIN32)
    -
    -	PAUSE (250);
    -	memset (&command, 0, sizeof (command));
    -	command.length = read (port->file, command.buffer, sizeof (command.buffer));
    -	if (command.length < 0)
    -	{
    -		error (1, errno, "Bad response from %s", port->name);
    -	}
    -	if (command.length == 0)
    -	{
    -		error (1, errno, "No response from %s", port->name);
    -	}
    -
    -#else
    -
    -	struct timeval tv;
    -	fd_set rfd;
    -	ssize_t tmp;
    -	memset (&command, 0, sizeof (command));
    -	while (!strchr (command.buffer, '\r'))
    -	{
    -		tv.tv_sec = 1;
    -		tv.tv_usec = 0;
    -		FD_ZERO (&rfd);
    -		FD_SET (port->file, &rfd);
    -		if (select (port->file + 1, &rfd, NULL, NULL, &tv) != 1)
    -		{
    -			error (1, errno, "Read timeout");
    -		}
    -		tmp = read (port->file, command.buffer + command.length, sizeof (command.buffer) - command.length - 1);
    -		if (tmp < 0)
    -		{
    -			error (1, errno, "Could not read %s", port->name);
    -		}
    -		command.length += tmp;
    -		command.buffer [command.length] = '\0';
    -	}
    -
    -#endif
    -
    -	if (_anyset (flags, UART_VERBOSE))
    -	{
    -		write (STDERR_FILENO, command.buffer, command.length);
    -		write (STDERR_FILENO, "\n", sizeof (char));
    -	}
    -	if (!memcmp (command.buffer, "ERROR", 5))
    -	{
    -		error (1, ECANCELED, "Device refused request");
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void insert (char c);
    - *
    - *   serial.h
    - *
    - *   insert a character into the command buffer at the current buffer
    - *   position then increment the buffer position pointer;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void insert (char c)
    -
    -{
    -	extern struct command command;
    -	if (command.length < sizeof (command.buffer))
    -	{
    -		command.buffer [command.length++] = c;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   unsigned readframe (signed fd, void * memory, size_t extent);
    - *
    - *   serial.h
    - *
    - *   read a file and convert hexadecimal octets to binary bytes then
    - *   store them in consecutive memory locations up to a given length;
    - *   return the actual number of bytes stored;
    - *
    - *   digits may be consecutive or separated by white space consisting
    - *   of spaces, tabs, linefeeds, carriage returns, formfeeds or other
    - *   characters such as punctuation; script-style comments are treated
    - *   as white space;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed fdgetc (signed fd)
    -
    -{
    -	char c;
    -	return ((read (fd, &c, sizeof (c)) == sizeof (c))? c: EOF);
    -}
    -
    -size_t readframe (signed fd, void * memory, size_t extent)
    -
    -{
    -	unsigned digits = 0;
    -	uint8_t * origin = (uint8_t *)(memory);
    -	uint8_t * offset = (uint8_t *)(memory);
    -	signed c = EOF;
    -	while ((extent) && ((c = fdgetc (fd)) != EOF) && (c != ';'))
    -	{
    -		if (isspace (c))
    -		{
    -			continue;
    -		}
    -		if (c == '#')
    -		{
    -			do
    -			{
    -				c = fdgetc (fd);
    -			}
    -			while ((c != '\n') && (c != EOF));
    -			continue;
    -		}
    -		if (c == '/')
    -		{
    -			c = fdgetc (fd);
    -			if (c == '/')
    -			{
    -				do
    -				{
    -					c = fdgetc (fd);
    -				}
    -				while ((c != '\n') && (c != EOF));
    -				continue;
    -			}
    -			if (c == '*')
    -			{
    -				while ((c != '/') && (c != EOF))
    -				{
    -					while ((c != '*') && (c != EOF))
    -					{
    -						c = fdgetc (fd);
    -					}
    -					c = fdgetc (fd);
    -				}
    -				continue;
    -			}
    -			continue;
    -		}
    -		if (isxdigit (c))
    -		{
    -			*offset = c;
    -			offset++;
    -			digits++;
    -			extent--;
    -			continue;
    -		}
    -		error (1, ENOTSUP, "Illegal hex digit '%c' (0x%02X) in source", c, c);
    -	}
    -	if (digits & 1)
    -	{
    -		error (1, ENOTSUP, "Odd number of hex digits (%d) in source", digits);
    -	}
    -	return (offset - origin);
    -}
    -
    -/*====================================================================*
    - *
    - *   void decode (void const * memory, size_t extent);
    - *
    - *   serial.h
    - *
    - *   copy a memory region into command buffer at the current position
    - *   and increment the buffer position pointer; convert bytes to hex
    - *   octets;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void decode (void const * memory, size_t extent)
    -
    -{
    -	extern struct command command;
    -	register byte * binary = (byte *)(memory);
    -	while ((command.length < sizeof (command.buffer)) && (extent--))
    -	{
    -		insert (DIGITS_HEX [(*binary >> 4) & 0x0F]);
    -		insert (DIGITS_HEX [(*binary >> 0) & 0x0F]);
    -		binary++;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void encode (void * memory, size_t extent);
    - *
    - *   serial.h
    - *
    - *   encode a memory region from the current command buffer position
    - *   and increment the command buffer position pointer;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void encode (void * memory, size_t extent)
    -
    -{
    -	extern struct command command;
    -	register byte * binary = (byte *)(memory);
    -	unsigned digit;
    -	while ((command.offset < command.length) && (extent--))
    -	{
    -		*binary = 0;
    -		if ((digit = todigit (command.buffer [command.offset++])) > 0x0F)
    -		{
    -			command.buffer [command.offset] = (char)(0);
    -			error (1, EINVAL, "[%s]1", command.buffer);
    -		}
    -		*binary |= digit << 4;
    -		if ((digit = todigit (command.buffer [command.offset++])) > 0x0F)
    -		{
    -			command.buffer [command.offset] = (char)(0);
    -			error (1, EINVAL, "[%s]2", command.buffer);
    -		}
    -		*binary |= digit;
    -		binary++;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void string (char * string);
    - *
    - *   serial.h
    - *
    - *   extract the contents of a quoted string string from the command
    - *   buffer; it assumes that the current char is a quote character;
    - *
    - *   copy command buffer characters to an external string; start a the
    - *   current buffer position and continue until the buffer exhausts or
    - *   a closing quote is encountered; NUL terminate the string;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void string (char * string)
    -
    -{
    -	extern struct command command;
    -	while ((command.offset < command.length) && (command.buffer [command.offset] != '\"'))
    -	{
    -		*string++ = command.buffer [command.offset++];
    -	}
    -	*string = (char)(0);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   uint64_t hextoint (unsigned bytes);
    - *
    - *   serial.h
    - *
    - *   this function is used to extract a hexadecimal integer string as
    - *   an integer of specified length; an error occurs of the string is
    - *   to long for the specified integer size in bytes;
    - *
    - *--------------------------------------------------------------------*/
    -
    -uint64_t hextoint (unsigned bytes)
    -
    -{
    -	extern struct command command;
    -	uint64_t limit = -1;
    -	uint64_t value = 0;
    -	unsigned radix = 16;
    -	unsigned digit = 0;
    -	if (bytes < sizeof (limit))
    -	{
    -		limit <<= (bytes << 3);
    -		limit = ~limit;
    -	}
    -	while ((digit = todigit (command.buffer [command.offset])) < radix)
    -	{
    -		value *= radix;
    -		value += digit;
    -		command.offset++;
    -		if (value > limit)
    -		{
    -			command.buffer [command.offset] = (char)(0);
    -			error (1, EINVAL, "[%s] exceeds %d bits", command.buffer, (bytes << 3));
    -		}
    -	}
    -	return (value);
    -}
    -
    -/*====================================================================*
    - *
    - *   void mustbe (char c);
    - *
    - *   serial.h
    - *
    - *   test the character at the current buffer position; advance the
    - *   buffer position pointer and return true on match; terminate the
    - *   program on mismatch or exhausted buffer;
    - *
    - *--------------------------------------------------------------------*/
    -
    -void mustbe (char c)
    -
    -{
    -	extern struct command command;
    -	if (command.offset >= command.length)
    -	{
    -		command.buffer [command.offset] = (char)(0);
    -		error (1, EINVAL, "[%s]: overflow", command.buffer);
    -	}
    -	if (command.buffer [command.offset++] != (c))
    -	{
    -		command.buffer [command.offset] = (char)(0);
    -		error (1, EINVAL, "[%s]: expecting 0x%02X", command.buffer, c);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/serial.h.html b/docbook/serial.h.html deleted file mode 100644 index 9f1192ea..00000000 --- a/docbook/serial.h.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - serial.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   serial.h - Atheros Serial Line Definitions and declarations;
    - *
    - *.  Qualcomm Atheros HomePlug AV Powerline Toolkit
    - *:  Copyright (c) 2009-2013 by Qualcomm Atheros Inc. ALL RIGHTS RESERVED;
    - *;  For demonstration and evaluation only; Not for production use.
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SERIAL_HEADER
    -#define SERIAL_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <ctype.h>
    -
    -#ifndef WIN32
    -#include <termios.h>
    -#endif
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#if defined (WIN32)
    -#       define DEVICE "com1:"
    -#       define PAUSE(x) Sleep (x)
    -#else
    -#       define DEVICE "/dev/ttyUSB0"
    -#       define PAUSE(x) usleep ((x)*1000)
    -#endif
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define UART_MODE 0
    -#define UART_BAUDRATE 115200
    -#define UART_DATABITS 8
    -#define UART_STOPBITS 1
    -#define UART_PARITY 0
    -#define UART_FLOWCTRL 0
    -
    -#define UART_BUFFERSIZE 4096
    -#define UART_BLOCKSIZE 512
    -#define UART_PORT "PLCUART"
    -
    -/*====================================================================*
    - *   Atheros Serial Line Command flags;
    - *--------------------------------------------------------------------*/
    -
    -#define UART_SILENCE    (1 << 0)
    -#define UART_VERBOSE    (1 << 1)
    -#define UART_DEFAULT    (1 << 2)
    -#define UART_COMMAND    (1 << 3)
    -#define UART_WAKE       (1 << 4)
    -#define UART_RESPOND    (1 << 5)
    -#define UART_ATRV       (1 << 6)
    -#define UART_ATRPM      (1 << 7)
    -#define UART_ATSK1      (1 << 8)
    -#define UART_ATSK2      (1 << 9)
    -#define UART_ATZ        (1 << 10)
    -#define UART_ATDST1     (1 << 11)
    -#define UART_ATDST2     (1 << 12)
    -#define UART_ATNI       (1 << 13)
    -#define UART_ATFD       (1 << 14)
    -#define UART_ATPS       (1 << 15)
    -#define UART_ATO        (1 << 16)
    -#define UART_ATHSC      (1 << 17)
    -#define UART_ATRP       (1 << 18)
    -#define UART_ATWPF1     (1 << 19)
    -#define UART_ATWPF2     (1 << 20)
    -#define UART_ATWNV      (1 << 21)
    -#define UART_ATBSZ1     (1 << 22)
    -#define UART_ATBSZ2     (1 << 23)
    -#define UART_ATTO       (1 << 24)
    -#define UART_ATBR       (1 << 25)
    -#define UART_ATM        (1 << 26)
    -
    -/*====================================================================*
    - *
    - *   struct command;
    - *
    - *   structure containing serial command buffer and two pointers; the
    - *   buffer is used for both transmit and receive and shared by most
    - *   function below;
    - *
    - *--------------------------------------------------------------------*/
    -
    -typedef struct command
    -
    -{
    -	char buffer [UART_BUFFERSIZE];
    -	unsigned length;
    -	unsigned offset;
    -}
    -
    -COMMAND;
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef WIN32
    -
    -signed baudrate (unsigned rate, speed_t * speed);
    -
    -#endif
    -
    -void openport (struct _file_ * port, flag_t mode);
    -void closeport (struct _file_ * port);
    -
    -/*====================================================================*
    - *   serial command line buffer functions;
    - *--------------------------------------------------------------------*/
    -
    -void clearcommand ();
    -void sendcommand (struct _file_ * port, flag_t flags);
    -void readcommand (struct _file_ * port, flag_t flags);
    -void insert (char c);
    -size_t readframe (signed fd, void * memory, size_t extent);
    -void decode (void const * memory, size_t extent);
    -void encode (void * memory, size_t extent);
    -void string (char * string);
    -uint64_t hextoint (unsigned bytes);
    -void mustbe (char c);;
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/set32bitmap.c.html b/docbook/set32bitmap.c.html deleted file mode 100644 index 2d5285d1..00000000 --- a/docbook/set32bitmap.c.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - set32bitmap.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void set32bitmap (uint32_t * map, unsigned bit);
    - *
    - *   flags.h
    - *
    - *   set a given bit in a 32-bit flagword array; macro _bits () is
    - *   defined in flags.h;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SET32BITMAP_SOURCE
    -#define SET32BITMAP_SOURCE
    -
    -#include "../tools/flags.h"
    -#include "../tools/endian.h"
    -
    -void set32bitmap (uint32_t * map, unsigned bit)
    -
    -{
    -	map [bit / _bits (* map)] |= HTOLE32 (1 << (bit % _bits (* map)));
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/setpib.1.html b/docbook/setpib.1.html deleted file mode 100644 index 9650217b..00000000 --- a/docbook/setpib.1.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - setpib.1 - - - - - - - - - -
    -setpib(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   setpib(1)
    -
    -NAME
    -       setpib - Qualcomm Atheros PIB File Editor
    -
    -SYNOPSIS
    -       setpib [options] file base [type data] [type data] [...]
    -
    -DESCRIPTION
    -       Replace  one  or more values in a Qualcomm Atheros powerline parameter (or PIB) file and re-compute the checksum.  Values
    -       are specified as a sequence of type/data pairs.  Users must know the offset, length and type of the values they change or
    -       problems will certainly result.  This program makes absolutely no effort to validate offsets or values.
    -
    -       This  program  can  be used to change any PIB value, including those that should not be changed.  Be warned that some PIB
    -       values are derived from, or interact with, other PIB values.  Failure to observe such dependencies may  diminish  perfor‐
    -       mance or render a device inoperable.
    -
    -       Atheros  does not recommend the use of this program to edit PIB parameters because small mistakes can cause big problems.
    -       In addition, Atheros is under no obligation to provide customers with the offset, length or type of any PIB file  parame‐
    -       ters.
    -
    -       Atheros  recommends  using  program  modpib to change device identity parameters and the Windows Device Manager to change
    -       other parameters whenever possible.
    -
    -       This program handles older Thunderbolt/Lightning parameter files and newer Panther/Lynx parameter  files  but  it  has  a
    -       larger  footprint  that may not be acceptable for embedded systems.  In cases where only the older or the newer parameter
    -       files are used, consider using program setpib1 for an older Thunderbolt/Lightning only version or  setpib2  for  a  newer
    -       Panther/Lynx only version.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -q     Enable quiet mode which has not effect.
    -
    -       -v     Print a hexdump of the edited region.  Print hexdump headers if this option appears twice.  The region window  may
    -              be changed with option -w.
    -
    -       -w window
    -              The  display  window  in  bytes.  When option -v is present, PIB information surrounding the edited region is dis‐
    -              played to provide some sort of context.  The edited region appears in the middle of this window.  The default win‐
    -              dow is 32 bytes.  This means that the 32 bytes before and the 32 bytes after the edited region are included in the
    -              display.
    -
    -       -x     Repair the checksum.  By default, this program does not modify files that fail the size or checksum test on input.
    -              In addition, it does not re-compute the checksum on output if no data has changed.  This option skips the size and
    -              checksum test on input and re-computes the checksum on output even if no data has changed.  This option only works
    -              on legacy PIB files.  It does not work on PIB files having NVM file format.
    -
    -       -?, --help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!, --version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Usethis option when sending screen dumps to Atheros Technical Support so that they know exactly which  version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The  PIB  filename.  The file must exist and will be re-written.  No assumptions are made based on filename and no
    -              filename conventions are enforced.  This argument is required and must precede the base argument.
    -
    -       base   The byte offset where changes will start.  The offset is expressed in hexadecimal with (or  without)  the  leading
    -              "0x".   Changes  are  applied  in  order, left to right, and offset automatically increments by the correct amount
    -              after each change is applied.  This permits consectuive PIB locations to be changed with one command.  This  argu‐
    -              ment  is  required  and must follow the file argument.  It must also precede all format/data pairs.  Normally, you
    -              must use multiple setpib commands to change non-consecutive PIB locations but  careful  use  of  format  skip  can
    -              achive the same results using one command.
    -
    -       type   The  implied  length  and  encoding of the data.  Valid types are byte, word, long, data and hfid.  A valid format
    -              must precede each data item.  A byte is 8 bits, a word is 16 bits, a long is 32 bits and a huge is 64  bits.   The
    -              format  implies  the maximum data value except for format data which is limited by the number of octets entered on
    -              the command line.
    -
    -       data   The information written to the current PIB offset.  Integer data may be expressed in binary, decimal or  hexadeci‐
    -              mal  but  must  not  exceed the type minimum or maximum.  String data may contain any ASCII characters that can be
    -              entered via keyboard but must be enclosed in quotes when spaces are included.  Binary values start with 0b  or  0B
    -              and hexadecimal values start with 0x or 0X.
    -
    -FORMATS
    -       byte integer
    -              A  signed or unsigned integer stored as 8 bits or 1 byte.  The value is expressed in decimal by default.  A binary
    -              value may be expressed with a 0b prefix.  A hexadecimal value may  be  expressed  using  a  0x  prefix.   Negative
    -              type/data values must appear at the end of the command line, after option "--", to avoid parsing errors.  The off‐
    -              set increments by 1 prior to the next insertion.
    -
    -       word integer
    -              A signed or unsigned integer stored as 16 bits or 2 bytes.  The value is  expressed  in  decimal  by  default.   A
    -              binary value may be expressed with a 0b prefix.  A hexadecimal value may be expressed using a 0x prefix.  Negative
    -              type/data values must appear at the end of the command line, after option "--", to avoid parsing errors.  The off‐
    -              set increments by 2 prior to the next insertion.
    -
    -       long integer
    -              A  signed  or  unsigned  integer  stored  as 32 bits or 4 bytes.  The value is expressed in decimal by default.  A
    -              binary value may be expressed with a 0b prefix.  A hexadecimal value may be expressed using a 0x prefix.  Negative
    -              type/data values must appear at the end of the command line, after option "--", to avoid parsing errors.  The off‐
    -              set increments by 4 prior to the next insertions.
    -
    -       huge integer
    -              A signed or unsigned integer stored as 64 bits or 8 bytes.  The value is  expressed  in  decimal  by  default.   A
    -              binary value may be expressed with a 0b prefix.  A hexadecimal value may be expressed using a 0x prefix.  The off‐
    -              set increments by 8 prior to the next insertion.  Negative type/data values must appear at the end of the  command
    -              line, after option "--", to avoid parsing errors.  This format is only available on hosts that support 64 bit data
    -              values.
    -
    -       data hex
    -              A sequence of hexadecimal octets.  Octets may be separated by a colon for clarity.  The number  of  octets  deter‐
    -              mines  the  number  of  bytes  written.  The offset increments by the number of bytes written.  This is similar to
    -              "key" and "mac" below but accepts variable length input.
    -
    -       key hex
    -              A sequence of hexadecimal octets.  Octets may be separated by a colon for clarity.  The number of octets must con‐
    -              vert  to 16 bytes or an error will occur.  The offset increments by 16 prior to the next insertion.  This is simi‐
    -              lar "data" above but accepts only fixed length input.  This option may be used to set the DAK, NMK or NVAK values.
    -
    -       mac hex
    -              A sequence of hexadecimal octets.  Octets may be separated by a colon for clarity.  The number of octets must con‐
    -              vert  to 6 bytes or an error will occur.  The offset increments by 6 prior to the next insertion.  This is similar
    -              "data" above but accepts only fixed length input.  This option may be used to set the DAK, NMK or NVAK values.
    -
    -       text string
    -              An ASCII character string.  The string string length determines the number of bytes stored.  The string is  stored
    -              with NUL terminator included.  It is not padded or truncated.  The offset increments by the number of bytes stored
    -              prior to the next insertion.  This option may be used to enter a variable length string.
    -
    -       hfid string
    -              An ASCII character string.  The string is always stored as 64 bytes.  Short strings are padded on the  right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 64 bytes prior to the next insertion.  This option may be used to enter user, network  and   manufacturer
    -              identification strings.
    -
    -       zero count
    -              An  unsigned integer representing the number of consecutive bytes to fill with 0x00.  The offset increments by the
    -              number of bytes written.  This option may be used to erase regions of the PIB.
    -
    -       fill count
    -              An unsigned integer representing the number of consecutive bytes to fill with 0xFF.  The offset increments by  the
    -              number of bytes written.  This option may be used to erase regions of the PIB.
    -
    -       skip count
    -              An  unsigned  integer indicating the number of bytes to skip over before staring another change.  Intervening data
    -              data locations are unchanged.
    -
    -TR69 DATA TYPES
    -       accesspassword string
    -              An ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 257 prior to the next insertion.
    -
    -       accessusername string
    -              An ASCII character string.  The string is always stored as 33 bytes.  Short strings are padded on the  right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 33 prior to the next insertion.
    -
    -       adminpassword string
    -              An ASCII character string.  The string is always stored as 33 bytes.  Short strings are padded on the  right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 33 prior to the next insertion.
    -
    -       adminusername string
    -              An ASCII character string.  The string is always stored as 33 bytes.  Short strings are padded on the  right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 33 prior to the next insertion.
    -
    -       password string
    -              An ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 257 prior to the next insertion.
    -
    -       url string
    -              An ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 257 prior to the next insertion.
    -
    -       username string
    -              An ASCII character string.  The string is always stored as 257 bytes.  Short strings are padded on the right  with
    -              NUL  characters.   Long  strings are truncated on the right and the last byte is forced to NUL.  The offset incre‐
    -              ments by 257 prior to the next insertion.
    -
    -EXAMPLES
    -       The following example edits file abc.pib by writing decimal  value  1  at  offset  01F7  followed  by  hexadecimal  value
    -       00B052BABE01.   A partial dump is printed showing 16 bytes before and 16 bytes after the changed data because the default
    -       display windows is 16 bytes.  Unless the change occurs right at the start or end of the file, it will appear in the  cen‐
    -       ter of the display window.
    -
    -          # setpib -v abc.pib 01F7 byte 1 data 00:B0:52:BA:BE:01
    -          000001D0                       00 00 00 00 00 00 00 00 00         .........
    -          000001E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    -          000001F0  00 00 00 00 00 00 00 01 00 B0 52 BA BE 01 00 00  ..........R.....
    -          00000200  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    -          00000210  00 00 00 00 00 00 00 00 00 00 00 00 00 00        ..............
    -
    -       The  following  example  sets  the manufacturer HFID string in PIB file def.pib.  HFID strings are 64 characters long and
    -       either truncated or padded on the right with NUL characters.  You may need to enclose the string in quotes it it contains
    -       spaces.
    -
    -          # setpib -v def.pib 24 hfid "Galactic Software Pirates, Inc."
    -          00000000              38 1F 00 00 30 1B EB 04 00 B0 52 00      8...0.....R.
    -          00000010  00 66 50 D3 E4 93 3F 85 5B 70 40 78 4D F8 15 AA  .fP...?.[p@xM...
    -          00000020  8D B7 00 00 47 61 6C 61 63 74 69 63 20 53 6F 66  ....Galactic Sof
    -          00000030  74 77 61 72 65 20 50 69 72 61 74 65 73 2C 20 49  tware Pirates, I
    -          00000040  6E 63 2E 00 00 00 00 00 00 00 00 00 00 00 00 00  nc..............
    -          00000050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    -          00000060  00 00 00 00 50 D3 E4 93 3F 85 5B 70 40 78 4D F8  ....P...?.[p@xM.
    -          00000070  15 AA 8D B7 49 6E 74 65 6C 6C 6F 6E 20 45 6E 61  ....Atheros Ena
    -          00000080  62 6C 65 64                                      bled
    -
    -       The  following  example  displays the contents of PIB file abc.pib without changing any data.  The region displayed is 24
    -       bytes starting at offset 0x24.  The format skip specifies the region but does not change it.  By default,  the  32  bytes
    -       before and 32 bytes after are included in the display.  This technique can be used to inspect a specific portion of a PIB
    -       file.
    -
    -          # setpib -v abc.pib 24 skip 64
    -          00000000              38 1F 00 00 30 1B EB 04 00 B0 52 00      8...0.....R.
    -          00000010  00 66 50 D3 E4 93 3F 85 5B 70 40 78 4D F8 15 AA  .fP...?.[p@xM...
    -          00000020  8D B7 00 00 47 61 6C 61 63 74 69 63 20 53 6F 66  ....Galactic Sof
    -          00000030  74 77 61 72 65 20 50 69 72 61 74 65 73 2C 20 49  tware Pirates, I
    -          00000040  6E 63 2E 00 00 00 00 00 00 00 00 00 00 00 00 00  nc..............
    -          00000050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    -          00000060  00 00 00 00 50 D3 E4 93 3F 85 5B 70 40 78 4D F8  ....P...?.[p@xM.
    -          00000070  15 AA 8D B7 49 6E 74 65 6C 6C 6F 6E 20 45 6E 61  ....Atheros Ena
    -          00000080  62 6C 65 64                                      bled
    -
    -       The next example does the same thing for a negative value.  This is tricky because the minus sign will be interpreted  as
    -       the start of another option.  We must use "--" to end normal option parsing.  This is a POSIX standard feature.  See IEEE
    -       Std 1002.1-2001, Section 12.2, Utility Syntax Guidelines for more an explanation.
    -
    -          # setpib -v abc.pib 1471 -- long -50
    -          00001450    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ...............
    -          00001460 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    -          00001470 00 CE FF FF FF 00 00 00 00 00 00 00 00 00 00 00 ................
    -          00001480 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    -          00001490 00 00 00 00 00                                  .....
    -
    -       The following example computes a new checksum without changing any data.  The filename and an offset are required but  no
    -       other  values  are  needed.  This technique can be used to compute a new checksum after modifying the file using software
    -       that does not update the checksum.
    -
    -          # setpib abc.pib 0 -x
    -
    -DISCLAIMER
    -       PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.  Consequently, public information is not
    -       available.  Qualcomm Atheros reserves the right to modify PIB file structure or content in future firmware releases with‐
    -       out any obligation to notify or compensate users of this program.
    -
    -SEE ALSO
    -       chkpib(7), chkpib2(7), getpib(7), modpib(1), pib2xml(1), pibcomp(1), pibdump(1), xml2pib(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com> ]
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   setpib(1)
    -
    - - - diff --git a/docbook/setpib.c.html b/docbook/setpib.c.html deleted file mode 100644 index 995fd54f..00000000 --- a/docbook/setpib.c.html +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - setpib.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   setpib.c -
    - *
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <string.h>
    -#include <ctype.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/memory.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/files.h"
    -#include "../pib/pib.h"
    -#include "../nvm/nvm.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/basespec.c"
    -#include "../tools/dataspec.c"
    -#include "../tools/bytespec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/hexdump.c"
    -#include "../tools/hexpeek.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/memencode.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nvm/nvmseek2.c"
    -#endif
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define SETPIB_VERBOSE (1 << 0)
    -#define SETPIB_SILENCE (1 << 1)
    -#define SETPIB_HEADERS (1 << 2)
    -#define SETPIB_CHANGED (1 << 3)
    -#define SETPIB_WINDOW 32
    -
    -/*====================================================================*
    - *   variables;
    - *--------------------------------------------------------------------*/
    -
    -static flag_t flags = (flag_t)(0);
    -
    -/*====================================================================*
    - *
    - *   signed modify (void * memory, size_t extent, int argc, char const * argv [], unsigned window)
    - *
    - *   apply a series of edits to a memory region; edits are specified
    - *   in string vector argv [] which must follow rules understood by
    - *   function memencode(); this function merely walks the vector and
    - *   deals with error and display options;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed modify (void * memory, size_t extent, int argc, char const * argv [], unsigned window)
    -
    -{
    -	uint32_t origin;
    -	uint32_t offset;
    -	if (!argc)
    -	{
    -		error (1, ENOTSUP, "Need an offset");
    -	}
    -	origin = offset = (size_t)(basespec (* argv, 16, sizeof (offset)));
    -	if (offset >= extent)
    -	{
    -		error (1, ECANCELED, "Offset %X exceeds file length of " SIZE_T_SPEC, offset, extent);
    -	}
    -	argc--;
    -	argv++;
    -	if (!argc)
    -	{
    -		_setbits (flags, SETPIB_VERBOSE);
    -	}
    -	while ((argc > 1) && (* argv))
    -	{
    -		_setbits (flags, SETPIB_CHANGED);
    -		offset += (unsigned)(memencode ((byte *)(memory) + offset, extent - offset, argv [0], argv [1]));
    -		argc -= 2;
    -		argv += 2;
    -	}
    -	if (argc)
    -	{
    -		error (1, ECANCELED, "object %s needs a value", *argv);
    -	}
    -	if (_anyset (flags, SETPIB_VERBOSE))
    -	{
    -		hexpeek (memory, origin, offset, extent, window, stdout);
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed pibimage1 (signed fd, char const * filename, int argc, char const * argv [], unsigned window);
    - *
    - *   read an entire flat parameter file into memory, edit it, save
    - *   it and display it;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibimage1 (signed fd, char const * filename, int argc, char const * argv [], unsigned window)
    -
    -{
    -	off_t extent;
    -	void * memory;
    -	if ((extent = lseek (fd, 0, SEEK_END)) == -1)
    -	{
    -		error (1, errno, FILE_CANTSIZE, filename);
    -	}
    -	if (!(memory = malloc (extent)))
    -	{
    -		error (1, errno, FILE_CANTLOAD, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (read (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (modify (memory, extent, argc, argv, window))
    -	{
    -		error (1, errno, FILE_CANTEDIT, filename);
    -	}
    -	if (_anyset (flags, SETPIB_CHANGED))
    -	{
    -		struct pib_header * pib_header = (struct pib_header *)(memory);
    -		pib_header->CHECKSUM = checksum32 (memory, extent, pib_header->CHECKSUM);
    -		if (write (fd, memory, extent) != extent)
    -		{
    -			error (1, errno, FILE_CANTSAVE, filename);
    -		}
    -		if (lseek (fd, (off_t)(0) - extent, SEEK_CUR) == -1)
    -		{
    -			error (1, errno, FILE_CANTHOME, filename);
    -		}
    -	}
    -	free (memory);
    -	close (fd);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed pibimage2 (signed fd, char const * filename, int argc, char const * argv [], unsigned window);
    - *
    - *   read an entire flat parameter file into memory, edit it, save
    - *   it and display it;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibimage2 (signed fd, char const * filename, struct nvm_header2 * nvm_header, int argc, char const * argv [], unsigned window)
    -
    -{
    -	void * memory;
    -	off_t extent = LE32TOH (nvm_header->ImageLength);
    -	if (!(memory = malloc (extent)))
    -	{
    -		error (1, errno, FILE_CANTLOAD, filename);
    -	}
    -	if (read (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	if (lseek (fd, (off_t)(0) - extent, SEEK_CUR) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (modify (memory, extent, argc, argv, window))
    -	{
    -		error (1, errno, FILE_CANTEDIT, filename);
    -	}
    -	if (_anyset (flags, SETPIB_CHANGED))
    -	{
    -		nvm_header->ImageChecksum = checksum32 (memory, extent, 0);
    -		if (write (fd, memory, extent) != extent)
    -		{
    -			error (1, errno, FILE_CANTSAVE, filename);
    -		}
    -		if (lseek (fd, (off_t)(0) - extent, SEEK_CUR) == -1)
    -		{
    -			error (1, errno, FILE_CANTHOME, filename);
    -		}
    -		nvm_header->HeaderChecksum = checksum32 (nvm_header, sizeof (* nvm_header), nvm_header->HeaderChecksum);
    -		if (lseek (fd, (off_t)(0) - sizeof (* nvm_header), SEEK_CUR) == -1)
    -		{
    -			error (1, errno, FILE_CANTHOME, filename);
    -		}
    -		if (write (fd, nvm_header, sizeof (* nvm_header)) != sizeof (* nvm_header))
    -		{
    -			error (1, errno, FILE_CANTSAVE, filename);
    -		}
    -		if (lseek (fd, (off_t)(0) - sizeof (* nvm_header), SEEK_CUR) == -1)
    -		{
    -			error (1, errno, FILE_CANTHOME, filename);
    -		}
    -	}
    -	free (memory);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed function (int argc, char const * argv [], unsigned window);
    - *
    - *   call an appropriate parameter edit function based on the file
    - *   header;
    - *
    - *   older parameter files are flat with their own header; newer ones
    - *   are image chains where one of image contains the parameter block;
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed function (int argc, char const * argv [], unsigned window)
    -
    -{
    -	uint32_t version;
    -	char const * filename = * argv;
    -	signed status = -1;
    -	signed fd;
    -	if ((fd = open (filename, O_BINARY|O_RDWR)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, filename);
    -	}
    -	if (read (fd, &version, sizeof (version)) != sizeof (version))
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	argc--;
    -	argv++;
    -	if (LE32TOH (version) == 0x00010001)
    -	{
    -		struct nvm_header2 nvm_header;
    -		if (!nvmseek2 (fd, filename, &nvm_header, NVM_IMAGE_PIB))
    -		{
    -			status = pibimage2 (fd, filename, &nvm_header, argc, argv, window);
    -		}
    -	}
    -	else
    -	{
    -		status = pibimage1 (fd, filename, argc, argv, window);
    -	}
    -	close (fd);
    -	return (status);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"qvw:x",
    -		"file base [type data] [type data] [...]\n\n\tstandard-length types are 'byte'|'word'|'long'|'huge'|'hfid'|'mac'|'key'\n\tvariable-length types are 'data'|'text'|'fill'|'skip'",
    -		"Qualcomm Atheros PIB File Editor",
    -		"q\tquiet mode",
    -		"v[v]\tverbose mode",
    -		"w n\twindow size is (n) [" LITERAL (SETPIB_WINDOW) "]",
    -		"x\trepair checksum",
    -		(char const *) (0)
    -	};
    -	unsigned window = SETPIB_WINDOW;
    -	signed c;
    -	optind = 1;
    -	opterr = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'q':
    -			_setbits (flags, SETPIB_SILENCE);
    -			break;
    -		case 'v':
    -			if (_anyset (flags, SETPIB_VERBOSE))
    -			{
    -				_setbits (flags, SETPIB_HEADERS);
    -			}
    -			_setbits (flags, SETPIB_VERBOSE);
    -			break;
    -		case 'w':
    -			window = (unsigned)(uintspec (optarg, 0, UINT_MAX));
    -			_setbits (flags, SETPIB_VERBOSE);
    -			break;
    -		case 'x':
    -			_setbits (flags, SETPIB_CHANGED);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if ((argc) && (* argv))
    -	{
    -		function (argc, argv, window);
    -	}
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/sizes.h.html b/docbook/sizes.h.html deleted file mode 100644 index 9710deb0..00000000 --- a/docbook/sizes.h.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - sizes.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   sizes.h - common data size definitions and declarations;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SIZES_HEADER
    -#define SIZES_HEADER
    -
    -#define _ADDRSIZE 0x0008
    -#define _NAMESIZE 0x0100
    -#define _LINESIZE 0x1000
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/slac-config.xml b/docbook/slac-config.xml deleted file mode 100644 index b0a12294..00000000 --- a/docbook/slac-config.xml +++ /dev/null @@ -1,227 +0,0 @@ -
    - - SLAC Configuration - - - Avitar can be used to configure a PLC device as either a normal PLC station or a SLAC PEV-PLC or SLAC EVSE-PLC station. In doing so, Avitar changes several PIB values at the same time. This section illustrates how to configurat a PIB the same way using the toolkit. - - - The HomePlug Green PHY Specification refers to the APCM_SET_CCO.REQ and APCM_CONF_SLAC primatives in the SLAC protocol description. These are virtual operations to be implemented by the user. In both cases, one must read the PIB from the PLC device, edit the PIB, recompute PIB checksums and write the PIB back to the PLC device. This can be done manually, using Avitar, or in a script, using the Powerline Toolkit as shown below, or programatically, using custom software. - - - - PEV-PLC PIB Settings - - - - - - - - - - OFFSET - - - LENGTH - - - SYMBOL - - - DESCRIPTION - - - - - - - 0000F4 - - - 1 - - - CCoSelection - - - 1: This sets CCo Selection to Never; - - - - - 001653 - - - 1 - - - SLAC_EnableMode - - - 1: This sets SLAC Selection to PEV; - - - - - 001C98 - - - 4 - - - LowLinkSpeed_kbps - - - 10240 - - - - - 001C9C - - - 4 - - - HighLinkSpeed_kbps - - - 102400 - - - - -
    - - - - The following shell script converts a factory PIB to a SLAC PEV by setting the CCO Mode to Never and the SLAC Mode to PEV. The User HFID is set to PEV for role identification, optionally. This PIB must be written into PEV-PLC flash memory for proper operation. - - -#!/bin/sh -# file: pev.sh -# ======================================================================== -# convert a factory PIB to a SLAC PEV PIB by changing these PIB settings; -# ------------------------------------------------------------------------ -setpib ${1} 74 hfid "PEV" -setpib ${1} F4 byte 1 -setpib ${1} 1653 byte 1 -setpib ${1} 1C98 long 10240 long 102400 - - - - PEV-EVSE PIB Settings - - - - - - - - - - OFFSET - - - LENGTH - - - SYMBOL - - - DESCRIPTION - - - - - - - 0000F4 - - - 1 - - - CcoSelection - - - 2: This sets CCo Mode to Always; - - - - - 001653 - - - 1 - - - SLAC_EnableMode - - - 2: This sets SLAC Mode to EVSE; - - - - - 001C98 - - - 4 - - - LowLinkSpeed_kbps - - - 10240 - - - - - 001C9C - - - 4 - - - HighLinkSpeed_kbps - - - 102400 - - - - -
    - - The following shell script converts a factory PIB to a SLAC EVSE by setting the CCO Mode to Always and the SLAC Mode to EVSE. The User HFID is set to EVSE for role identification, optionally. This PIB must be written into EVSE-PLC flash memory for proper operation. - - -#!/bin/sh -# file: evse.sh -# ======================================================================== -# convert a factory PIB to a SLAC EVSE PIB by changing these PIB settings; -# ------------------------------------------------------------------------ -setpib ${1} 74 hfid "EVSE" -setpib ${1} F4 byte 2 -setpib ${1} 1653 byte 2 -setpib ${1} 1C98 long 10240 long 102400 - - -
    - - APCM_SET_CCO Primative - - - This primative configures a PLC state by reading PIB from PLC, changing CCoSelection, computing new PIB checksum then writing the PIB back to PLC. It can be performed manually using Avitar, in a script using the Powerline Toolkit or programatically using custom software. - -
    -
    - - APCM_CONFIG_SLAC Primative - - - -
    -
    diff --git a/docbook/slac-demo.xml b/docbook/slac-demo.xml deleted file mode 100644 index f8749775..00000000 --- a/docbook/slac-demo.xml +++ /dev/null @@ -1,77 +0,0 @@ -
    - - SLAC Demonstration - - - This page explains how to install and use two Qualcomm Atheros Powerline Toolkit programs, pev and evse, to demonstrate the HomePlug AV Signal Level Attenuation Characterization (SLAC) protocol. - - - On Microsoft Windows, the two programs are distributed in a seperate Microsoft installation file slac-utils-x.x.x.msi. To install them on Microsoft Windows, double-click on the installation file. The programs will be installed in folder c:\Program Files (x86)\Qualcomm Atheros\Powerline Toolkit unless the user overrides the default settings durin installation. New users should add this folder to the PATH environment variable and define environment variable PLC to reference the Ethernet interface connected to their PLC device. - - - On Linux, the two programs are distibuted inside the full toolkit tarball plc-utils-x.x.x. To install them on Linux, unpack the tarball and change directory to the package folder. Type "sudo make install" to compile and install the toolkit. Type type "sudo make manuals" to install man pages. New users should define environment variable PLC to reference the inteface connected to their PLC device. - - - - Exception! - - - In some cases QCA will distribute two Windows .exe files and two monolithic .c files. On Windows, copy the executable files to folder c:\Program Files (x86)\Qualcomm Atheros\Powerline Toolkit and update the system PATH and PLC environment variables. On Linux, compile the two source files using "gcc -o pev pev.c" and "gcc -o evse evse.c" and copy the two binary files to /usr/local/bin then update the system PLC environment variable. You will need root priviledge to copy the binary files to the system folder and you must change the binary file permissions to 4555 in order to execute them as a non-root user. - - - - Each program reads an optional configuration file on start-up. Program pev reads pev.ini and program evse reads evse.ini. Qualcomm Atheros does not provide these files but option -c, on each program, can be used to print a template configuration file on stdout. Once a user settles on a convenient working folder, they should run command "pev -c > pev.ini" to create the configuration file for program pev and "evse -c > evse.ini" to create the configuration file for program evse. - - - A SLAC demonstration can be setup using two Qualcomm Atheros PL16 boards, two personal computers, a power strip and a powerline impairment of some kind. One PL16 board must be configured as a PEV and the other must be configured as an EVSE. Plug both PL16 boards into the powerstrip and connect each board to a different computer via Ethernet. Run program pev on the computer connected to the PEV configured board. Run program evse on the computer connected to the EVSE configured board. Program evse runs continuously waiting to service pev programs running on other computers. Program pev runs until charging occurs then exits. - - - On the EVSE host, start program evse as shown below. It will run until cancelled. - - -# evse -evse: UnoccupiedState: Listening ... - - - Messages will appear on the console as events occur. The first field is the program name, in this case evse. The second field is the function name, in this case UnoccupiedState. In this case, program evse does nothing until some PEV trys to associate. - - - On the EVSE host, run program evse as shown below. It will run until it detects and connects to an available EVSE-HLE. Use option -w to vary probe timeouts. - - -# pev -pev: DisconnectedState: Probing ... -pev: pev_cm_slac_param: --> CM_SLAC_PARAM.REQ -pev: pev_cm_slac_param: <-- CM_SLAC_PARAM.CNF - - - Messages will appear on the console as events occur. The first field is the program name, in this case pev. The second field is the function name, in this case DisconnectedState and pev_cm_slac_param. The right arrow indicates that function pev_cm_slac_param is sending a CM_SLAC_PARAM.REQ message. If things work properly, you will see a another message indicating that function pev_cm_slac_param is receiving a CM_SLAC_PARAM.CNF message. - - - - - - - IMG_20130227_145749.jpg - - - - Unimpaired SLAC configuration. Result should be below threshold and PEV should connect. - - - - - - - - - IMG_20130227_151458.jpg - - - - Impaired SLAC configuration. Result should be above threshold and PEV should not connect. - - - -
    - diff --git a/docbook/slac.h.html b/docbook/slac.h.html deleted file mode 100644 index 261d63de..00000000 --- a/docbook/slac.h.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - slac.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   slac.h - 
    - *
    - *   this file contains defintions for the HomePlug Green PHY SLAC
    - *   protocol;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SLAC_HEADER
    -#define SLAC_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -#include "../tools/endian.h"
    -#include "../ether/ether.h"
    -#include "../mme/mme.h"
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define SLAC_DEBUG 1
    -
    -/*
    - * The following two constants control whether or not the PEV or EVSE
    - * change AVLN on SLAC protocol cycle; The recommended setting is PEV
    - * changes with each pass and the EVSE does not;
    - */
    -
    -#define SLAC_AVLN_PEV 1
    -#define SLAC_AVLN_EVSE 0
    -
    -#define SLAC_APPLICATION_PEV_EVSE 0x00
    -
    -#define SLAC_SECURITY_NONE 0x00
    -#define SLAC_SECURITY_PUBLIC_KEY 0x01
    -
    -#define SLAC_RUNID_LEN 8
    -#define SLAC_UNIQUE_ID_LEN 17
    -#define SLAC_RND_LEN 16
    -#define SLAC_NID_LEN 7
    -#define SLAC_NMK_LEN 16
    -
    -#define SLAC_MSOUNDS 8
    -#define SLAC_TIMETOSOUND 8 
    -#define SLAC_TIMEOUT 1000
    -#define SLAC_APPLICATION_TYPE 0
    -#define SLAC_SECURITY_TYPE 0
    -#define SLAC_RESPONSE_TYPE 0
    -#define SLAC_MSOUND_TARGET "FF:FF:FF:FF:FF:FF"
    -#define SLAC_FORWARD_STATION "00:00:00:00:00:00"
    -#define SLAC_GROUPS 58
    -
    -#define SLAC_LIMIT 40 
    -#define SLAC_PAUSE 20 
    -#define SLAC_SETTLETIME 10
    -#define SLAC_CHARGETIME 2
    -#define SLAC_FLAGS 0 
    -
    -#define SLAC_SILENCE (1 << 0)
    -#define SLAC_VERBOSE (1 << 1)
    -#define SLAC_SESSION (1 << 2)
    -#define SLAC_COMPARE (1 << 3)
    -
    -#define SLAC_CM_SETKEY_KEYTYPE 0x01
    -#define SLAC_CM_SETKEY_PID 0x02
    -#define SLAC_CM_SETKEY_PRN 0x00
    -#define SLAC_CM_SETKEY_PMN 0x00
    -#define SLAC_CM_SETKEY_CCO 0x00
    -#define SLAC_CM_SETKEY_EKS 0x01
    -
    -/*====================================================================*
    - *   messages;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed session 
    -
    -{ 
    -	struct session * next; 
    -	struct session * prev; 
    -	byte RunID [SLAC_RUNID_LEN]; 
    -	byte APPLICATION_TYPE; 
    -	byte SECURITY_TYPE; 
    -	byte RESP_TYPE; 
    -	byte NUM_SOUNDS; 
    -	byte TIME_OUT; 
    -	byte AAG [SLAC_GROUPS]; 
    -	byte NumGroups; 
    -	byte MSOUND_TARGET [ETHER_ADDR_LEN]; 
    -	byte FORWARDING_STA [ETHER_ADDR_LEN]; 
    -	byte PEV_ID [SLAC_UNIQUE_ID_LEN]; 
    -	byte PEV_MAC [ETHER_ADDR_LEN]; 
    -	byte EVSE_ID [SLAC_UNIQUE_ID_LEN]; 
    -	byte EVSE_MAC [ETHER_ADDR_LEN]; 
    -	byte RND [SLAC_UNIQUE_ID_LEN]; 
    -	byte NMK [SLAC_NMK_LEN]; 
    -	byte NID [SLAC_NID_LEN]; 
    -	byte original_nmk [SLAC_NMK_LEN]; 
    -	byte original_nid [SLAC_NID_LEN]; 
    -	unsigned state; 
    -	unsigned sounds; 
    -	unsigned limit; 
    -	unsigned pause; 
    -	unsigned chargetime; 
    -	unsigned settletime; 
    -	unsigned counter; 
    -	unsigned flags; 
    -	signed exit; 
    -} 
    -
    -session; 
    -typedef struct __packed cm_sta_identity_request 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -} 
    -
    -cm_sta_identity_request; 
    -typedef struct __packed cm_sta_identity_confirm 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t GREEN_PHY_CAPABILITY; 
    -	uint8_t POWER_SAVE_CAPABILITY; 
    -	uint8_t GREEN_PHY_PREFERRED_ALLOCATION_CAPABILITY; 
    -	uint8_t REPEATING_AND_ROUTING_CAPABILITY; 
    -	uint8_t HOMEPLUG_AV_VERSION; 
    -	uint8_t EFL; 
    -	uint8_t EF [1]; 
    -} 
    -
    -cm_sta_identity_confirm; 
    -typedef struct __packed cm_slac_param_request 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	uint8_t RunID [SLAC_RUNID_LEN]; 
    -	uint8_t CipherSuiteSetSize; 
    -	uint16_t CipherSuite [1]; 
    -} 
    -
    -cm_slac_param_request; 
    -typedef struct __packed cm_slac_param_confirm 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t MSOUND_TARGET [ETHER_ADDR_LEN]; 
    -	uint8_t NUM_SOUNDS; 
    -	uint8_t TIME_OUT; 
    -	uint8_t RESP_TYPE; 
    -	uint8_t FORWARDING_STA [ETHER_ADDR_LEN]; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	uint8_t RunID [SLAC_RUNID_LEN]; 
    -	uint16_t CipherSuite; 
    -} 
    -
    -cm_slac_param_confirm; 
    -typedef struct __packed cm_start_atten_char_indicate 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	struct __packed 
    -	{ 
    -		uint8_t NUM_SOUNDS; 
    -		uint8_t TIME_OUT; 
    -		uint8_t RESP_TYPE; 
    -		uint8_t FORWARDING_STA [ETHER_ADDR_LEN]; 
    -		uint8_t RunID [SLAC_RUNID_LEN]; 
    -	} 
    -	ACVarField; 
    -} 
    -
    -cm_start_atten_char_indicate; 
    -typedef struct __packed cm_start_atten_char_response 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -} 
    -
    -cm_start_atten_char_response; 
    -typedef struct __packed cm_atten_char_indicate 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	struct __packed 
    -	{ 
    -		uint8_t SOURCE_ADDRESS [ETHER_ADDR_LEN]; 
    -		uint8_t RunID [SLAC_RUNID_LEN]; 
    -		uint8_t SOURCE_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t RESP_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t NUM_SOUNDS; 
    -		struct __packed 
    -		{ 
    -			uint8_t NumGroups; 
    -			uint8_t AAG [255]; 
    -		} 
    -		ATTEN_PROFILE; 
    -	} 
    -	ACVarField; 
    -} 
    -
    -cm_atten_char_indicate; 
    -typedef struct __packed cm_atten_char_response 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	struct __packed 
    -	{ 
    -		uint8_t SOURCE_ADDRESS [ETHER_ADDR_LEN]; 
    -		uint8_t RunID [SLAC_RUNID_LEN]; 
    -		uint8_t SOURCE_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t RESP_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t Result; 
    -	} 
    -	ACVarField; 
    -} 
    -
    -cm_atten_char_response; 
    -typedef struct __packed cm_mnbc_sound_indicate 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	struct __packed 
    -	{ 
    -		uint8_t SenderID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t CNT; 
    -		uint8_t RunID [SLAC_RUNID_LEN]; 
    -		uint8_t RND [SLAC_UNIQUE_ID_LEN]; 
    -	} 
    -	MSVarField; 
    -} 
    -
    -cm_mnbc_sound_indcate; 
    -typedef struct __packed cm_validate_request 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t SignalType; 
    -	struct __packed 
    -	{ 
    -		uint8_t Timer; 
    -		uint8_t Result; 
    -	} 
    -	VRVarField; 
    -} 
    -
    -cm_validate_request; 
    -typedef struct __packed cm_validate_confirm 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t SignalType; 
    -	struct __packed 
    -	{ 
    -		uint8_t ToggleNum; 
    -		uint8_t Result; 
    -	} 
    -	VCVarField; 
    -} 
    -
    -cm_validate_confirm; 
    -typedef struct __packed cm_slac_match_request 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	uint16_t MVFLength; 
    -	struct __packed 
    -	{ 
    -		uint8_t PEV_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t PEV_MAC [ETHER_ADDR_LEN]; 
    -		uint8_t EVSE_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t EVSE_MAC [ETHER_ADDR_LEN]; 
    -		uint8_t RunID [SLAC_RUNID_LEN]; 
    -		uint8_t RSVD [8]; 
    -	} 
    -	MatchVarField; 
    -} 
    -
    -cm_slac_match_request; 
    -typedef struct __packed cm_slac_match_confirm 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t APPLICATION_TYPE; 
    -	uint8_t SECURITY_TYPE; 
    -	uint16_t MVFLength; 
    -	struct __packed 
    -	{ 
    -		uint8_t PEV_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t PEV_MAC [ETHER_ADDR_LEN]; 
    -		uint8_t EVSE_ID [SLAC_UNIQUE_ID_LEN]; 
    -		uint8_t EVSE_MAC [ETHER_ADDR_LEN]; 
    -		uint8_t RunID [SLAC_RUNID_LEN]; 
    -		uint8_t RSVD1 [8]; 
    -		uint8_t NID [SLAC_NID_LEN]; 
    -		uint8_t RSVD2; 
    -		uint8_t NMK [SLAC_NMK_LEN]; 
    -	} 
    -	MatchVarField; 
    -} 
    -
    -cm_slac_match_confirm; 
    -typedef struct __packed cm_atten_profile_indicate 
    -
    -{ 
    -	struct ethernet_hdr ethernet; 
    -	struct homeplug_fmi homeplug; 
    -	uint8_t PEV_MAC [ETHER_ADDR_LEN]; 
    -	uint8_t NumGroups; 
    -	uint8_t RSVD; 
    -	uint8_t AAG [255]; 
    -} 
    -
    -cm_atten_profile_indicate; 
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -signed pev_cm_slac_param (struct session *, struct channel *, struct message *); 
    -signed pev_cm_start_atten_char (struct session *, struct channel *, struct message *); 
    -signed pev_cm_atten_char (struct session *, struct channel *, struct message *); 
    -signed pev_cm_mnbc_sound (struct session *, struct channel *, struct message *); 
    -signed pev_cm_slac_match (struct session *, struct channel *, struct message *); 
    -signed pev_cm_set_key (struct session *, struct channel *, struct message *); 
    -signed evse_cm_slac_param (struct session *, struct channel *, struct message *); 
    -signed evse_cm_start_atten_char (struct session *, struct channel *, struct message *); 
    -signed evse_cm_atten_char (struct session *, struct channel *, struct message *); 
    -signed evse_cm_mnbc_sound (struct session *, struct channel *, struct message *); 
    -signed evse_cm_slac_match (struct session *, struct channel *, struct message *); 
    -signed evse_cm_set_key (struct session *, struct channel *, struct message *); 
    -signed slac_connect (struct session *); 
    -void slac_session (struct session *); 
    -void slac_structs ();
    -signed slac_debug (struct session * session, signed status, char const * string, char const * format, ...);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/slac_connect.c.html b/docbook/slac_connect.c.html deleted file mode 100644 index d0114f1d..00000000 --- a/docbook/slac_connect.c.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - slac_connect.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void slac_connect (struct session * session);
    - *   
    - *   slac.h
    - *
    - *   compute the arithmetic mean of session attenuation values and
    - *   compare to the session limit; average attenuation greater than
    - *   the session limit is considered a bad connection;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SLAC_AVERAGE_SOURCE
    -#define SLAC_AVERAGE_SOURCE
    -
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../tools/memory.h"
    -#include "../iso15118/slac.h"
    -
    -signed slac_connect (struct session * session) 
    -
    -{ 
    -	unsigned group = 0; 
    -	unsigned total = 0; 
    -	if (session->NumGroups > SIZEOF (session->AAG)) 
    -	{ 
    -		return (slac_debug (session, session->exit, __func__, "Too much data to analyse!")); 
    -	} 
    -	if (session->NumGroups > 0) 
    -	{ 
    -		char string [512]; 
    -		while (group < session->NumGroups) 
    -		{ 
    -			total += session->AAG [group]; 
    -			group++; 
    -		} 
    -		total /= group; 
    -		if (total > session->limit) 
    -		{ 
    -			char string [512]; 
    -			slac_debug (session, 0, __func__, "Average attenuation (%u) more than limit (%u) frow %d groups", total, session->limit, group); 
    -			slac_debug (session, 0, __func__, "%s", HEXSTRING (string, session->AAG)); 
    -			return (- 1); 
    -		} 
    -		if (total > 0) 
    -		{ 
    -			slac_debug (session, 0, __func__, "Average attenuation (%u) less than limit (%u) from %d groups", total, session->limit, group); 
    -			slac_debug (session, 0, __func__, "%s", HEXSTRING (string, session->AAG)); 
    -			return (0); 
    -		} 
    -	} 
    -	return (slac_debug (session, session->exit, __func__, "Nothing to analyse")); 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/slac_debug.c.html b/docbook/slac_debug.c.html deleted file mode 100644 index 42afa950..00000000 --- a/docbook/slac_debug.c.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - slac_debug.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *   Copyright (c) 2013 I2SE GmbH
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    - 
    -/*====================================================================*
    - *
    - *   signed slac_debug (struct session * session, signed status, char const * string, char const * format, ...);
    - *
    - *   slac.h
    - *
    - *   variation of the GNU error() function that accepts a message in
    - *   place of an error code and always returns -1;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SLAC_DEBUG_SOURCE
    -#define SLAC_DEBUG_SOURCE
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <stdarg.h>
    -#include <string.h>
    -
    -#include "../iso15118/slac.h"
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -
    -#ifdef __GNUC__
    -
    -__attribute__ ((format (printf, 4, 5)))
    -
    -#endif
    -
    -signed slac_debug (struct session * session, signed status, char const * string, char const * format, ...)
    -
    -{
    -	extern char const * program_name;
    -	
    -	if (_allclr (session->flags, SLAC_SILENCE))
    -	{
    -		if ((program_name) && (* program_name))
    -		{
    -			fprintf (stderr, "%s: ", program_name);
    -		}
    -		if ((string) && (* string))
    -		{
    -			fprintf (stderr, "%s: ", string);
    -		}
    -		if ((format) && (*format))
    -		{
    -			va_list arglist;
    -			va_start (arglist, format);
    -			vfprintf (stderr, format, arglist);
    -			va_end (arglist);
    -		}
    -		fprintf (stderr, "\n");
    -		fflush (stderr);
    -	}
    -	if (status)
    -	{
    -		exit (status);
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/slac_session.c.html b/docbook/slac_session.c.html deleted file mode 100644 index bf1dfa93..00000000 --- a/docbook/slac_session.c.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - slac_session.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void slac_session (struct session * session);
    - *
    - *   slac.h
    - *
    - *   print the SLAC session variable if the SLAC_SESSION bit is set 
    - *   in the sesssion variable flagword;
    - *
    - *   macro HEXSTRING is defined in memory.h and is used to reduce the
    - *   number of arguments one must type to invoke function hexstring;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SLAC_SESSION_SOURCE
    -#define SLAC_SESSION_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../tools/flags.h"
    -#include "../iso15118/slac.h"
    -
    -void slac_session (struct session * session) 
    -
    -{ 
    -	if (_anyset (session->flags, SLAC_SESSION)) 
    -	{ 
    -		char string [256]; 
    -		slac_debug (session, 0, __func__, "session.RunID %s", HEXSTRING (string, session->RunID)); 
    -		slac_debug (session, 0, __func__, "session.APPLICATION_TYPE %d", session->APPLICATION_TYPE); 
    -		slac_debug (session, 0, __func__, "session.SECURITY_TYPE %d", session->SECURITY_TYPE); 
    -		slac_debug (session, 0, __func__, "session.RESP_TYPE %d", session->RESP_TYPE); 
    -		slac_debug (session, 0, __func__, "session.NUM_SOUNDS %d", session->NUM_SOUNDS); 
    -		slac_debug (session, 0, __func__, "session.TIME_OUT %d", session->TIME_OUT); 
    -		slac_debug (session, 0, __func__, "session.NumGroups %d", session->NumGroups); 
    -		slac_debug (session, 0, __func__, "session.AAG %s", hexstring (string, sizeof (string), session->AAG, sizeof (session->AAG))); 
    -		slac_debug (session, 0, __func__, "session.MSOUND_TARGET %s", HEXSTRING (string, session->MSOUND_TARGET)); 
    -		slac_debug (session, 0, __func__, "session.FORWARDING_STA %s", HEXSTRING (string, session->FORWARDING_STA)); 
    -		slac_debug (session, 0, __func__, "session.PEV_ID %s", HEXSTRING (string, session->PEV_ID)); 
    -		slac_debug (session, 0, __func__, "session.PEV_MAC %s", HEXSTRING (string, session->PEV_MAC)); 
    -		slac_debug (session, 0, __func__, "session.EVSE_ID %s", HEXSTRING (string, session->EVSE_ID)); 
    -		slac_debug (session, 0, __func__, "session.EVSE_MAC %s", HEXSTRING (string, session->EVSE_MAC)); 
    -		slac_debug (session, 0, __func__, "session.RND %s", HEXSTRING (string, session->RND)); 
    -		slac_debug (session, 0, __func__, "session.NMK %s", HEXSTRING (string, session->NMK)); 
    -		slac_debug (session, 0, __func__, "session.NID %s", HEXSTRING (string, session->NID)); 
    -		slac_debug (session, 0, __func__, "session.original_nmk %s", HEXSTRING (string, session->original_nmk)); 
    -		slac_debug (session, 0, __func__, "session.original_nid %s", HEXSTRING (string, session->original_nid)); 
    -		slac_debug (session, 0, __func__, "session.state %d", session->state); 
    -		slac_debug (session, 0, __func__, "session.sounds %d", session->sounds); 
    -		slac_debug (session, 0, __func__, "session.limit %d", session->limit); 
    -		slac_debug (session, 0, __func__, "session.pause %d", session->pause); 
    -		slac_debug (session, 0, __func__, "session.chargetime %d", session->chargetime); 
    -		slac_debug (session, 0, __func__, "session.settletime %d", session->settletime); 
    -		slac_debug (session, 0, __func__, "session.counter %d", session->counter); 
    -		slac_debug (session, 0, __func__, "session.flags 0x%04X", session->flags); 
    -	} 
    -	return; 
    -} 
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/slac_structs.c.html b/docbook/slac_structs.c.html deleted file mode 100644 index df2d0899..00000000 --- a/docbook/slac_structs.c.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - slac_structs.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   void slac_structs ()
    - *
    - *   slac.h
    - *
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -
    -#include "../iso15118/slac.h"
    -
    -void slac_structs () 
    -
    -{ 
    -	fprintf (stderr, "sizeof struct cm_sta_identity_request %d\n", sizeof (struct cm_sta_identity_request)); 
    -	fprintf (stderr, "sizeof struct cm_sta_identity_confirm %d\n", sizeof (struct cm_sta_identity_confirm)); 
    -	fprintf (stderr, "sizeof struct cm_slac_param_request %d\n", sizeof (struct cm_slac_param_request)); 
    -	fprintf (stderr, "sizeof struct cm_slac_param_confirm %d\n", sizeof (struct cm_slac_param_confirm)); 
    -	fprintf (stderr, "sizeof struct cm_start_atten_char_indicate %d\n", sizeof (struct cm_start_atten_char_indicate)); 
    -	fprintf (stderr, "sizeof struct cm_start_atten_char_response %d\n", sizeof (struct cm_start_atten_char_response)); 
    -	fprintf (stderr, "sizeof struct cm_atten_char_indicate %d\n", sizeof (struct cm_atten_char_indicate)); 
    -	fprintf (stderr, "sizeof struct cm_atten_char_response %d\n", sizeof (struct cm_atten_char_response)); 
    -	fprintf (stderr, "sizeof struct cm_mnbc_sound_indicate %d\n", sizeof (struct cm_mnbc_sound_indicate)); 
    -	fprintf (stderr, "sizeof struct cm_validate_request %d\n", sizeof (struct cm_validate_request)); 
    -	fprintf (stderr, "sizeof struct cm_validate_confirm %d\n", sizeof (struct cm_validate_confirm)); 
    -	fprintf (stderr, "sizeof struct cm_slac_match_request %d\n", sizeof (struct cm_slac_match_request)); 
    -	fprintf (stderr, "sizeof struct cm_slac_match_confirm %d\n", sizeof (struct cm_slac_match_confirm)); 
    -	return; 
    -} 
    -
    -
    -
    - - - diff --git a/docbook/sll.h.html b/docbook/sll.h.html deleted file mode 100644 index d2c5e57d..00000000 --- a/docbook/sll.h.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - sll.h - - - - - - - - - -
    -/*-
    - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
    - *	The Regents of the University of California.  All rights reserved.
    - *
    - * This code is derived from the Stanford/CMU enet packet filter,
    - * (net/enet.c) distributed as part of 4.3BSD, and code contributed
    - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
    - * Berkeley Laboratory.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - * 1. Redistributions of source code must retain the above copyright
    - *    notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - *    notice, this list of conditions and the following disclaimer in the
    - *    documentation and/or other materials provided with the distribution.
    - * 3. All advertising materials mentioning features or use of this software
    - *    must display the following acknowledgement:
    - *      This product includes software developed by the University of
    - *      California, Berkeley and its contributors.
    - * 4. Neither the name of the University nor the names of its contributors
    - *    may be used to endorse or promote products derived from this software
    - *    without specific prior written permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    - * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    - * SUCH DAMAGE.
    - *
    - * @(#) $Header: /tcpdump/master/libpcap/pcap/sll.h,v 1.2.2.1 2008-05-30 01:36:06 guy Exp $ (LBL)
    - */
    -
    -/*
    - * For captures on Linux cooked sockets, we construct a fake header
    - * that includes:
    - *
    - *	a 2-byte "packet type" which is one of:
    - *
    - *		LINUX_SLL_HOST		packet was sent to us
    - *		LINUX_SLL_BROADCAST	packet was broadcast
    - *		LINUX_SLL_MULTICAST	packet was multicast
    - *		LINUX_SLL_OTHERHOST	packet was sent to somebody else
    - *		LINUX_SLL_OUTGOING	packet was sent *by* us;
    - *
    - *	a 2-byte Ethernet protocol field;
    - *
    - *	a 2-byte link-layer type;
    - *
    - *	a 2-byte link-layer address length;
    - *
    - *	an 8-byte source link-layer address, whose actual length is
    - *	specified by the previous value.
    - *
    - * All fields except for the link-layer address are in network byte order.
    - *
    - * DO NOT change the layout of this structure, or change any of the
    - * LINUX_SLL_ values below.  If you must change the link-layer header
    - * for a "cooked" Linux capture, introduce a new DLT_ type (ask
    - * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it
    - * a value that collides with a value already being used), and use the
    - * new header in captures of that type, so that programs that can
    - * handle DLT_LINUX_SLL captures will continue to handle them correctly
    - * without any change, and so that capture files with different headers
    - * can be told apart and programs that read them can dissect the
    - * packets in them.
    - */
    -
    -#ifndef lib_pcap_sll_h
    -#define lib_pcap_sll_h
    -
    -/*
    - * A DLT_LINUX_SLL fake link-layer header.
    - */
    -#define SLL_HDR_LEN	16		/* total header length */
    -#define SLL_ADDRLEN	8		/* length of address field */
    -
    -struct sll_header {
    -	u_int16_t sll_pkttype;		/* packet type */
    -	u_int16_t sll_hatype;		/* link-layer address type */
    -	u_int16_t sll_halen;		/* link-layer address length */
    -	u_int8_t sll_addr[SLL_ADDRLEN];	/* link-layer address */
    -	u_int16_t sll_protocol;		/* protocol */
    -};
    -
    -/*
    - * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the
    - * PACKET_ values on Linux, but are defined here so that they're
    - * available even on systems other than Linux, and so that they
    - * don't change even if the PACKET_ values change.
    - */
    -#define LINUX_SLL_HOST		0
    -#define LINUX_SLL_BROADCAST	1
    -#define LINUX_SLL_MULTICAST	2
    -#define LINUX_SLL_OTHERHOST	3
    -#define LINUX_SLL_OUTGOING	4
    -
    -/*
    - * The LINUX_SLL_ values for "sll_protocol"; these correspond to the
    - * ETH_P_ values on Linux, but are defined here so that they're
    - * available even on systems other than Linux.  We assume, for now,
    - * that the ETH_P_ values won't change in Linux; if they do, then:
    - *
    - *	if we don't translate them in "pcap-linux.c", capture files
    - *	won't necessarily be readable if captured on a system that
    - *	defines ETH_P_ values that don't match these values;
    - *
    - *	if we do translate them in "pcap-linux.c", that makes life
    - *	unpleasant for the BPF code generator, as the values you test
    - *	for in the kernel aren't the values that you test for when
    - *	reading a capture file, so the fixup code run on BPF programs
    - *	handed to the kernel ends up having to do more work.
    - *
    - * Add other values here as necessary, for handling packet types that
    - * might show up on non-Ethernet, non-802.x networks.  (Not all the ones
    - * in the Linux "if_ether.h" will, I suspect, actually show up in
    - * captures.)
    - */
    -#define LINUX_SLL_P_802_3	0x0001	/* Novell 802.3 frames without 802.2 LLC header */
    -#define LINUX_SLL_P_802_2	0x0004	/* 802.2 frames (not D/I/X Ethernet) */
    -
    -#endif
    -
    - - - diff --git a/docbook/socket.h.html b/docbook/socket.h.html deleted file mode 100644 index 88e9f111..00000000 --- a/docbook/socket.h.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - socket.h - - - - - - - - - -
    -/*====================================================================*
    - *   
    - *   Copyright (c) 2011 by Qualcomm Atheros.
    - *   
    - *   Permission to use, copy, modify, and/or distribute this software 
    - *   for any purpose with or without fee is hereby granted, provided 
    - *   that the above copyright notice and this permission notice appear 
    - *   in all copies.
    - *   
    - *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
    - *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
    - *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
    - *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
    - *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
    - *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
    - *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    - *   
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   socket.h - substitute sys/socket.h for systems without one;
    - *
    - *   include Microsoft equivalent definitions and declarations;
    - * 
    - *.  Intellon INT6000 Linux Toolkit for HomePlug AV;
    - *:  Published 2006-2009 by Intellon Corp. ALL RIGHTS RESERVED;
    - *;  For demonstration; Not for production use;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SOCKET_HEADER
    -#define SOCKET_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#if defined (WIN32)
    -#include <winsock2.h>
    -#endif
    -
    -/*====================================================================*
    - *   end;
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/software.xml b/docbook/software.xml deleted file mode 100644 index debf835c..00000000 --- a/docbook/software.xml +++ /dev/null @@ -1,843 +0,0 @@ - - - Software - -
    - - Introduction - - - The Open Powerline Toolkit is designed to support hardware engineers and embedded software developers working on GNU/Linux and Linux-like systems. Debian GNU/Linux is the platform of choice because it is open source and has extensive cross-platform support. The toolkit has been compiled and executed on several platforms but Qualcomm Atheros does not necessarily support the toolkit on those platforms. Qualcomm Atheros has made every effort to enable cross-platform compatibility by conforming to POSIX standards and following good programming practice but there are limitations on any such effort. - -
    -
    - - Security Considerations - - - Toolkit programs are installed in /usr/local/bin with owner root and group root (chown root:root) and with read and execute permissions for owner, group and others (chmod 0555). This lets anyone execute these programs even though they are owned by user root. - - - Additionally, programs that send raw Ethernet frames are installed with seteuid owner (chmod 4555) so that they will execute with root user privileges, regardless of the user executing them. This lets any user send raw Ethernet frames but it also presents a security risk on the host computer. For example, program int6k is intended to read and write .nvm and .pib files but a malicious user could use it to overwrite other files normally protected by standard file permissions. - - - You can change the default file permissions by changing the -m 4555 option on the install command in various Makefiles. Be aware that doing so will restrict program access to the the root user. - -
    -
    - - Platform Options - - - Qualcomm Atheros makes no claim that the Open Powerline Toolkit will compile and link in all environments without generating warnings or errors. Different compilers, and compiler versions, treat certain conditions differently and different distributions include different header files or define standard constants and macros differently. Developers should expect to make some source code and makefile modifications to match their environment. - - - The principle consideration is support for raw Ethernet frames. Other considerations include POSIX compliance, system header file locations, compiler version and library support. This section discusses some of these considerations. - -
    - - <application>GNU/Linux</application> - - - The toolkit will compile and execute on GNU/Linux systems without modification by using standard Linux header files and native Linux libraries. Raw socket support is native to the Linux Kernel. This is the preferred environment due to cost, networking speed and ease of access to Layer 2 networking. - - - Qualcomm Atheros has cross-compiled and executed versions of the toolkit on MontaVista and AMiLDA Linux both for MIPSEL processors. Most toolkit makefiles have symbolic hooks for cross-compilers but Qualcomm Atheros does not support cross-compilation efforts on any platform. - -
    -
    - - GNU/Linux with Libpcap - - - The toolkit can compile and will execute on GNU/Linux systems having the libpcap development package and runtime libraries installed; however, this feature is disabled by default because it is not needed on Linux and offers no benefits over native Linux sockets. - -
    -
    - - GNU/Linux with BPF - - - The toolkit should compile and execute on GNU/Linux systems having BPF compiled into the kernel but modifications would be needed to toolkit source code. This configuration has not been tested but the source code is present to support it. Consult Qualcomm Atheros if this option is of interest to you. - -
    -
    - - <productname>Mac OS X</productname> with BPF - - - The toolkit will compile and execute on Mac OS X without modification by using native BPF support compiled into the Darwin kernel. Compilation is clean on Leopard and should be fairly clean on Tiger. - - - You may observe compiler warnings concerning the size_t data type and print statements. These warning occur because Mac OS X defined the size_t data type as a 64-bit integer while most other systems define it as a 32-bit integer. Ignore the warnings. We will eventually eliminate them all. - - - You may observe a compiler warning concerning the definition of intrinsic function snprinf. We are not sure what causes this warning but it will be corrected eventually. - -
    -
    - - <productname>Windows XP</productname> with Winpcap - - - The toolkit will compile and execute on Microsoft Windows XP having WinPcap 4.0.1 runtime libraries installed. To assist windows developers, the toolkit includes a Microsoft Visual Studio .NET 2003 solution file plus required WinPcap 4.0.1 header files and libraries. The resulting programs should execute on any Microsoft Windows computer having WinPcap 4.0.1 runtime libraries installed. Qualcomm Atheros does not support the toolkit under any Microsoft Windows operating system at this time. - - - Recent versions of the toolkit include self-extracting file .\VisualStudioNET\WinPcap4_0_1.exe that installs WinPcap 4.0.1 libraries on your system in cases where you have another version installed. If this creates a conflict the you must resolve it to satisfy your system requirements. - - - This is not the preferred Toolkit environment due to cost, networking overhead, difficulty accessing Layer network support and lack of a powerful native scripting language. Qualcomm Atheros has not implemented all Toolkit programs on Windows for technical reasons. - -
    -
    -
    - - GNU Makefiles on Linux - - - The toolkit includes recursive GNU makefiles for Linux. The Makefile in the root folder calls Makefiles in subordinate folders. Makefiles in subordinate folders can be run independently to produce individual toolkit components. Developers can control which components are compiled and installed by editing the FOLDERS symbol in the main Makefile. - - - Component Makefiles have a standard format that includes the following targets: - - - - - compile - - - - Compiles source code files prior to installation. Intermmediate files and target files are created in the same folder as the Makefile. This is the default target. That means that typing make or make compile have the same result. - - - - - - library - - - - Creates any special folders that are needed for installation. This target is built by the install target but it can be built independently. - - - - - - scripts - - - - Installs scripts required for proper toolkit operation. This target must be built explicitly to prevent accidental loss of changes made to existing scripts. This target may be built at any time, before or after the install target. - - - - - - manuals - - - - Creates manuals, documents or html pages. Documentation files are not automatically installed by any target. Installation is left to the user. - - - - - - install - - - - Installs executable files in folder /usr/local/bin. This target automatically builds the compile target before installation. This means that make install will compile and install in one step. - - - - - - uninstall - - - - Removes installed components. This target does nothing for Makefiles that have install targets defined. - - - - - - clean - - - - Removes intermmediate and temporary files. Temporary files are defined by variable TRASH at the start of each Makefile. - - - - - - fresh - - - - Removes intermmediate and temporary then re-compiles local targets. It is normally equivalent to make clean followed by make compile. - - - - - - Developers wanting to compile the toolkit under Windows should use Visual Studio .NET solution files instead of makefiles. - - - Developers wanting to compile the toolkit under OpenBSD must make changes to accommodate variations in make program syntax. - -
    -
    - - Stand-alone Compiling on GNU/Linux - - - You do not need makefiles to build toolkit programs because source files explicitly include all required components using include statement blocks like that shown below. You will see similar blocks near the top of most programs. - - - - The <constant>MAKEFILE</constant> constant - - -#ifndef MAKEFILE -#include "../tools/getoptv.c" -#include "../tools/putoptv.c" -#include "../tools/version.c" -... -#endif - - - - This mechanism has several advantages. First, the preprocessor include statements form a complete inventory of required files. Secondly, the relative pathnames help developers locate needed source files. Third, the complete program can be compiled with one gcc command, like the one shown below. This allows program compilation in environments where the GNU make program or the Atheros Makefiles are not available. - - - - Stand-alone Compiling on GNU/Linux - - - - - Most toolkit makefiles define the preprocessor constant MAKEFILE as a compiler option using CFLAGS= ... -DMAKEFILE .... When this constant is defined, the compiler will not include components inside an include block like that shown above and so the Makefile is responsible for compiling and linking all components. If the constant is not defined, because no Makefile was used, the compiler will merely include everything needed. - -
    -
    - - Cross-Compiling on GNU/Linux - - - Makefiles are setup for cross-compilation using custom toolchains. File make.def, in the main toolkit folder, defines cross-comilation symbols referenced in lower-level makefiles. Lower-level makefiles include make.def before building their targets. The following is an example make.def file used when cross-compiling for the ADM5120 MIPSEL-based gateway. - - - - Cross-compiling with make.def - - -# file: make.def - -# ==================================================================== -# Edimax Hardware; -# -------------------------------------------------------------------- - -PLATFORM=-D_ADM5120_ -MODEL=-D_6104KP_ -ENDIAN=-D_LITTLE_ENDIAN_ -GATEWAY=y - -# ==================================================================== -# AMiLDA Software; uncomment these lines when cross-compiling; -# -------------------------------------------------------------------- - -# CROSS=/export/tools/mipsel-linux-uclibc/bin/mipsel-uclibc- -# CROSS_LINUX=/export/tools/bin/mipsel-linux- - -# ==================================================================== -# toolchain; -# -------------------------------------------------------------------- - -CC=$(CROSS)gcc -STRIP=$(CROSS)strip -LD=$(CROSS)ld -AR=$(CROSS)ar -RANLIB=$(CROSS)ranlib -CAS=$(CROSS)gcc -c -CPP=$(CROSS)gcc -E - -# ==================================================================== -# folders; -# -------------------------------------------------------------------- - -BIN=/usr/local/bin -MAN=/usr/share/man/man7 -WWW=/home/www -DOC=/home/www/software/plc-utils/ - -# ==================================================================== -# permissions; -# -------------------------------------------------------------------- - -OWNER=0 -GROUP=0 - - - - - Developers are encouraged to make changes in this file rather than adding additional variables to the lower-level makefiles. For example, you can edit variable BIN to install toolkit programs in some location other than /usr/local/bin or variable WWW to install HTML documentation on your local website. - -
    -
    - - Compilation with Visual Studio .NET 2003 - - - To build the Open Powerline Toolkit on Windows XP, you must have access to a Windows computer with Visual Studio .NET 2003 and WinPcap runtime libraries installed. WinPcap is an open source version of the packet capture library, libpcap, widely used on Linux and OpenBSD systems. It is readily available on the Internet. Installation of these components is beyond the scope of this document. - - - The Windows and Linux versions of the Open Powerline Toolkit use the same code base but the Windows version requires a Microsoft solution file that includes special compiler settings and specific POSIX header files. The solution file and header files are included in the same archive as Linux version. - - - - Microsoft Visual Studio .NET 2003 - - - - - - - - - Use an application like WinZip to extract archived files into a build folder of your choice. Use Windows Explorer to locate solution file .\VisualStudioNET\plc-utils.sln under the toolkit root folder. Double-click the file to open it with Visual Studio .NET. In Visual Studio .NET, open the window and observe a display similar to that shown above. - - - Figure 1 illustrates a Visual Studio .NET window with the pane exposed. In the Solution Explorer window, right-click the plc-utils solution and select the menu option. Compiliation should begin. Watch for comilation errors. - - - On successful compilation of all projects in this solution, you should find executable programs in the Release folder under each project folder. If not then look in the Debug folder, instead. You can now open a console window, change to each Release or Debug folder in turn and run the programs located there. Instead, we recommend that you create a Windows Installer package by right-clicking on the Install project in the Solution Explorer window and selecting the menu option. Compilation should resume. - - - On successful completion of the install project build, you should find the Windows Installer file plc-utils.msi in the VisualStudioNET folder above the install project folder. Double-clicking on this file will start the Windows Installer program. - - - To distribute the toolkit package to other Windows computers, copy the Windows Installer file to a public network share or some type of portable media. - - -
    -
    - - Microsoft Solution Files - - - The Atheros Open Powerline Toolkit includes a Visual Studio .NET solution file, ./VisualStudioNET/plc-utils.sln, that will build the toolkit on Windows XP SP2 from the Linux code base. The following information may be helpful to developers wanting to modify or extend the solution or port it to another version of Microsoft Visual Studio: - - - - - All projects are WIN32 Console Projects. - - - - - All projects have pre-compiled headers suppressed. - - - - - All projects should globally define preprocessor constant MAKEFILE to prevent proliferation of "already defined" link errors. See Stand-alone Compiling on GNU/Linux for an explanation of this constant. - - - - - All projects search folder ..\include for stdint.h and unistd.h because Microsoft does not provide them. These header files are customized or abbreviated versions of their POSIX counterparts and should be used when originals are available. - - - - - Projects that perform raw Ethernet I/O should globally define preprocessor constant WINPCAP to enable appropriate code segments. Preprocessor error statements should (but may not) alert you if WINPCAP is not defined on Windows platforms. - - - - Projects that perform raw Ethernet I/O search folder ..\include for WinPcap header files. These files are taken from the WinPcap development package and may require periodic updates. Header files pcap.h, pca-stdinc.h, pcap-bpf.h, ipv6_misc.h and bittypes.h belong in folder VisualStudioNET\include. Other header files belong in folder VisualStudioNET\include\pcap. - - - - - Projects that perform raw Ethernet I/O should include folder ..\library for core WinPcap libraries. - - - - - Projects that perform raw Ethernet I/O should link to libraries ws2_32.lib, packet.lib and wpcap.lib. The first library is the Microsoft Winsock2 library. The others are core WinPcap libraries. - - - -
    -
    - - Header Files - - - Atheros Open Powerline Toolkit programs reference POSIX functions and constants where possible. Specifically, they make wide use of the data types uint8_t, uint16_t and uint32_t which are defined in file stdint.h. Microsoft Visual C and .NET environments do not include this file. Consequently, Atheros provides an alternative in folder ../Windows/include. This file is open source and was designed to be compatible with the Microsoft development environments; however, you may occassionally experience warnings about the "benign redefinition" for some of these data types. - - - Where possible, this toolkit includes OpenBSD network constants because the OpenBSD project pioneered many of the common network protocols and applications used today. Some systems do not include all OpenBSD network header files or do not define all OpenBSD network constants. Specifically, Microsoft systems do not provide file netinet/if_ether.h and so an alternative is included in folder ../Windows/include/netinet and Windows applications should include it. - - - When the gcc -std=iso9899:1999 option is enabled, some OpenBSD header files found on GNU/Linux systems will exclude required constant definitions because they do not conform to that standard. Atheros is investigating the best way to address this problem. - - - On some systems, such as OpenBSD, FreeBSD and Mac OS X, header files must be included in specific order to avoid compilation errors. We have done our best to deal with this problem. Visit the GNU Autocnf Project for more information about this. - -
    -
    - - Compiler Constants - -
    - - Platform Constants - - - Platform constants conditionaly compile source code blocks based on the hardware architecture and host operating system. Hardware architecture constants are normally defined in system header files. Operating system constants are often compiler intrinsic or defined in system header files. - - - - - __APPLE__ - - - - A intrinsic compiler constant indicating Mac OS X operating system support. - - - - - - __BYTE_ORDER - - - - A standard constant indicating big or little endian host architecture. Some systems may not define this constant and so an alternative should be used. - - - - - - LIBPCAP - - - - An Atheros constant, that must be manually defined in your makefile or solution file, to indicate that the target host will have LibPcap support. It is not used by the toolkit, at this time, and so the associated code has not been tested. - - - - - - __linux__ - - - - A standard constant indicating GNU/Linux kernel support. It is automatically defined on GNU/Linux systems. - - - - - - __OpenBSD__ - - - - A standard constant indicating OpenBSD kernel support. It is automatically define on OpenBSD systems. It is not used by the toolkit, at this time, and so the associated code has not been extensively tested. - - - - - - WIN32 - - - - A standard constant indicating Microsoft Windows support. It is automatically defined in Microsoft Windows environments. - - - - - - WINPCAP - - - - An Atheros constant, that must be manually defined in your makefile or solution file, to indicate that the target host will have WinPcap support. The toolkit only defines this constant in Windows Microsoft project files for programs that perform raw Ethernet I/O. - - - - -
    -
    - - Ethernet Constants - - - The toolkit attempts to use existing definitions for Ethernet related constants where possible. This has been problematic due to inconsistencies in the way different systems structure their header files. Most of the following definitions already exist on Linux, OpenBSD and OS X but there are still some differences between Linux distributions and many constants are undefined on Windows. - - - The Windows version of the toolkit includes an abbreviated net/ethernet.h that provides constant definitions mentioned in this section. - - - - - ETHER_ADDR_LEN - - - - The length of an Ethernet hardware address in bytes. The value is 6 bytes. On Linux and OS X, this is defined in net/ethernet.h. - - - - - - ETHER_CRC_LEN - - - - The length of an Ethernet frame FCS trailer. The value is 4 bytes. On Linux and OS X, this is defined in net/ethernet.h. Atheros also includes a conditional definition in int6k/int6k.h because some Linux system do not define it anywhere. - - - - - - ETHER_HDR_LEN - - - - The length of an Ethernet frame header including the source address, destination address and type/length field. The value is 14 bytes or ETHER_ADDR_LEN + ETHER_ADDR_LEN + ETHER_TYPE_LEN. On Linux and OS X, this is defined in net/ethernet.h. - - - - - - ETHER_MAX_LEN - - - - The maximum length of an Ethernet frame in bytes. The value is 1518 bytes of ETHER_HDR_LEN + ETHERMTU + ETHER_CRC_LEN. On Linux and OS X, this is defined in net/ethernet.h. - - - - - - ETHER_MIN_LEN - - - - The minimum length of an Ethernet frame in bytes. The value is 64 bytes. On Linux and OS X this is defined in net/ethernet.h - - - - - - ETHER_TYPE_LEN - - - - The length of Ethernet type/length, or ethertype, field in bytes. The value is 2. On Linux and OS X, it is defined in net/ethernet.h. - - - - - - ETHERMTU - - - - The maximum transfer unit (ie; data handling capacity) for an Ethernet frame in bytes. The value is 1500 bytes. On Linux and OS X, this is defined in net/ethernet.h - - - - -
    -
    -
    - - <application>LibPcap</application>, <application>WinPcap</application> and <application>BPF</application> - - - LibPcap is an open source Ethernet packet capture library that is widely used. It provides core functionality for the Wireshark packet sniffer, formerly known as Ethereal. -LibPcap libraries are available for Linux and OpenBSD. On Linux and OpenBSD you must link applications to libpcap.a and libwpcap.a. The toolkit does not use either of these libraries on Linux because they are not needed there. - - - WinPcap is an open source version of LibPcap written for Microsoft Windows. The WinPcap libraries let Windows applications send and receive raw packets. On Windows you must link applications to Packet.lib and wpcap.lib. - - - In principle, the LibPcap and WinPcap library implementations should function identically but they do not; however, they are similar enough to provide a useful degree of platform independence. Defining preprocessor constants LIBPCAP or WINPCAP when compiling the toolkit will enable the corresponding source code. This can be done by adding "-DLIBPCAP" or "-DWINPCAP" to variable LFLAGS in file Makefile in folders int6k, int6k2, efsu and hpav. Constant WINPCAP need only be defined this way when compiling the toolkit using cygwin or mingw environments. Do not define both constants LIBPCAP and WINPCAP at the same time or compiler errors will occur. - - - Berkeley Packet Filters (BPF) is an open source Ethernet packet capture mechanism available on many UNIX-like systems. Native BPF is supported on some systems but must be explicitly compiled into the kernel on other systems. Linux systems normally do not support BPF by default but Mac OS X does and so we automatically use it whenever compiler constant __APPLE__ is defined. In principle, one could compile a custom Linux kernel with BPF enabled. - -
    -
    - - Structure Packing - - Programs in this toolkit make extensive use of packed data structures to simplify source code and guarantee reliability; however, this creates portability issues because different compilers implement structure packing in different ways. Three common structure packing mechanisms are: - - - - _packed - - - - The __packed keyword is not part of any C or C++ standard but it is recognized by some compilers, such as the ARM C/C++ and OpenBSD C compiler. This keyword only affects the data structure that it prefaces and it is an ideal way to selectively pack structures. It can be easily defined and undefined using a preprocessor macro. Atheros has elected to insert this keyword wherever it might be appropriate. The ARM C compilers accept this keyword. - - - - Packing Structures with keyword <quote>__packed</quote> - - -typedef struct __packed header_eth -{ - uint8_t source [ETHER_ADDR_LEN]; - uint8_t target [ETHER_ADDR_LEN]; - uint16_t protocol; -} -header_eth; - - - - - - - __attribute__ ((packed)) - - - - Attributes are not part of any C or C++ standard but they are recognized by the gcc and Sun Microsystems C compiler. Attributes only affect structures and functions that reference them in their declaration. This is convenient because we can use a preprocessor macro to define the keyword __packed, mentioned above, to be __attribute__ ((packed)). Atheros includes this definition in tools/types.h and OpenBSD does this in their system header files. - - - - Packing Structures with Attribute <quote>packed</quote> - - -typedef struct __attribute__ ((packed)) header_eth -{ - uint8_t source [ETHER_ADDR_LEN]; - uint8_t target [ETHER_ADDR_LEN]; - uint16_t protocol; -} -header_eth; - - - - - - - #pragrma pack - - - - Pragmas are part of most C and C++ language standards but some compilers do not recognize or implement the pack pragma. In addition, different compilers implement it in different ways. The pack pragma affects all data structures up the next pack pragma or end of compile unit. Most pragma implementations accept the push and pop option for pragma nesting. Some pragma pack implementations accept no arguments, most permit either one or two arguments while others allow three arguments. OpenBSD does not recognize this pragma and generates warnings in all cases. Aside from all that, the pack pragma is the most widely supported method for declaring packed structures. - - - - Packing Structures with the Pragma <quote>pack</quote> - - -#pragma pack (push, 1) -struct header_eth -{ - uint8_t source [ETHER_ADDR_LEN]; - uint8_t target [ETHER_ADDR_LEN]; - uint16_t protocol; -} -header_eth; -#pragma pack (pop) - - - - - - - The Atheros Way - - - - Toolkit programs declares packed structures using all three methods, as shown below. - - - - Packing Structures the Atheros Way - - - - - - -
    -
    - - Endian-ness - - - Atheros vendor-specific messages contain information in mixed endian format. The Ethernet header portion is sent big endian but the Atheros header and payload are sent in little endian . The traditional endian converstion functions htons(), htonl(), ntohs() and ntohl() can be used to perform platform independent conversions on the Ethernet header but not the Atheros header payload. - - - The Open Powerline Toolkit includes similar macros HTOLE16, HTOLE32, LE16TOH and LE32TOH in endian.h which serve the same function but conform to recommendations for standarized byte order function on Linux, OpenBSD and FreeBSD. Observe that the names are independent of any network implications. - - - - In addition, the Open Powerline Toolkit includes function endian that reverses byte order over a variable-length memory region. - -
    -
    - - Packet Basics - - - Local and remote HomePlug AV powerline devices are managed by sending Ethernet frames that contain HomePlug AV formatted management messages. These frames have an 802.3 Ethernet header and a payload that contains the Management Message (MM). - - - The Ethernet header must be transmitted in newtwork byte order which is big-endian. The Ethernet payload must be sent in ARM host byte order which is little endian. You should use standard network functions htons() and htonl() to write Ethernet headers and ntohs() and ntohl() to read them. You should use function HTOLE16() and HTOLE32() to write integer payload values and LE26TOH() and LE32TOH() to read them. - - - - - - Ethernet headers consist of a destination address (ODA), a source address (OSA) and an ethertype (MTYPE). The ethertype is always 0x88E1 for Homeplug frames of any type. Programmers may use either function EthernetHeader.c or EncodeEthernetHeader to encode a buffer with the ODA and OSA and the HomePlug ethertype. An example appears later on. Structure header_eth is defined in ihp.h for this purpose. - - - - - - Management messages consist of a message header (MMHEADER) and a message entry (MMENTRY). The message header identifies the nature of the message entry that follows it. The acronyms MME and MMENTRY both mean Management Message Entry but they are often used to mean the entire management message or Ethernet frame. This imprecise usage can be confusing at times. Structure header_mme is defined in ihp.h for this purpose. - - - - - - The message header contains message protocol version (MMV), message type (MMTYPE) and vendor identifier (OUI). The management message entry (MMENTRY) that follows the header contains information unique to a the request (REQ), confirmation (CNF), response (RSP) or indication (IND). Programmers may use the Atheros EncodeAtherosHeader function to encode a buffer with a specific MMTYPE and the Atheros MMV and OUI. AN example appears later on. - - - - - - The MMV value, within MMHEADER, indicates the Homeplug AV Management Message protocol version which determines how the message should be interpreted. The protocol version is defined in the HomePlug AV Specification and may change from time to time. One notable change is the recent insertion of an FMI (Fragment Management Information ) field between MMTYPE and OUI , as shown below. - - - In most cases, protocol changes are hidden from the application by the Atheros API functions; however, software developers should set the HOMEPLUG_MMV constant, defined in ihp.h, to the version appropriate for their firmware or application. The value of this constant enables or disables conditional compilation statements throughout the HomePlug API code base. - - - To send an MME, you must encode an Ethernet frame buffer with information and transmit it. To read an MME, you must read an Ethernet frame buffer and decode it. The information necessary to encode or decode Atheros vendor-specific Ethernet frames is covered in the INT6000 Firmware Technical Reference Manual; however, the Atheros HomePlug API includes many buffer encode and decode functions that support basic operational requirements. - -
    -
    - - Frame Encoding - - - The following technique illustrates one way to encode a frame buffer with an Ethernet header followed by an Atheros message header. We first declare the frame buffer then a length variable to keep track of how many bytes have actually been encoded. At any time, the value 'buffer + length' is the address of the next buffer position to encode and the expression 'sizeof (buffer) - length' is the number of un-encoded bytes remaining in the buffer. Each call to an encoding function will increment the length for the next operation. This technique minimizes the number of intermmediate application variables and makes maximum use of compiler generated constants. - - - - Frame Encoding by Offset - - - - - - - For those who prefer to use pointers, the following technique accomplishes the same thing because. At any given time, the value bp - buffer is the encoded length. - - - - Frame Encoding by Address - - - -
    -
    diff --git a/docbook/start.sh.html b/docbook/start.sh.html deleted file mode 100644 index 5870c1fb..00000000 --- a/docbook/start.sh.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - start.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: scripts/start.sh
    -
    -# use int6kf to start firmware on a device having a blank or corrupted
    -# NVRAM; this is a standard Intellon script that has proven useful but
    -# feel free to make changes;
    -
    -# ====================================================================
    -# host symbols;
    -# --------------------------------------------------------------------
    -
    -. /etc/enfironment
    -. ${SCRIPTS}/hardware.sh
    -. ${SCRIPTS}/firmware.sh
    -
    -# ====================================================================
    -# query connection;
    -# --------------------------------------------------------------------
    -
    -echo -n "Interface [${ETH}]: "; read  
    -if [ ! -z ${REPLY} ]; then
    -	ETH=${REPLY}
    -fi
    -
    -# ====================================================================
    -# define random DAK and NMK;
    -# --------------------------------------------------------------------
    -
    -MAC=auto
    -DAK=$(rkey secret.key -D)
    -NMK=$(rkey secret.key -M)
    -
    -# ====================================================================
    -# update PIB file with MAC, DAK and NMK;
    -# --------------------------------------------------------------------
    -
    -modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB} -v
    -if [ ${?} != 0 ]; then
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# write CFG, FW and PIB to device and start FW execution;
    -# --------------------------------------------------------------------
    -
    -int6kf -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM} 
    -if [ ${?} != 0 ]; then
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# confirm device identity;
    -# --------------------------------------------------------------------
    -
    -int6k -i ${ETH} -I
    -
    -# ====================================================================
    -# 
    -# --------------------------------------------------------------------
    -
    -exit 0   
    -
    -
    -
    - - - diff --git a/docbook/stdint.h.html b/docbook/stdint.h.html deleted file mode 100644 index 75ab8662..00000000 --- a/docbook/stdint.h.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - stdint.h - - - - - - - - - -
    -/*====================================================================*
    - *      
    - *   Copyright (c) 2011 by Qualcomm Atheros.
    - *   
    - *   Permission to use, copy, modify, and/or distribute this software 
    - *   for any purpose with or without fee is hereby granted, provided 
    - *   that the above copyright notice and this permission notice appear 
    - *   in all copies.
    - *   
    - *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
    - *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
    - *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
    - *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
    - *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
    - *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
    - *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    - *   
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    -
    - *
    - *   stdint.h - substitute stdint.h file for Windows;
    - *
    - *   this is an important POSIX header that Microsoft ommits;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef STDINT_HEADER
    -#define STDINT_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <limits.h>
    -
    -/*====================================================================*
    - *   variable types;
    - *--------------------------------------------------------------------*/
    -
    -#ifdef _MSC_VER 
    -typedef __int8 int8_t;
    -typedef __int16 int16_t;
    -typedef __int32 int32_t;
    -typedef __int64 int64_t;
    -typedef unsigned __int8 uint8_t;
    -typedef unsigned __int16 uint16_t;
    -typedef unsigned __int32 uint32_t;
    -typedef unsigned __int64 uint64_t;
    -typedef long off_t;
    -#endif
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/strdecr.c.html b/docbook/strdecr.c.html deleted file mode 100644 index 465f9e81..00000000 --- a/docbook/strdecr.c.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - strdecr.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   signed strdecr (void * memory, size_t extent, byte min, byte max);
    - *
    - *   memory.h
    - *
    - *   decrement a multi-byte memory region; start at max and reset at
    - *   min; return -1 if all bytes are min;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef STRDECR_SOURCE
    -#define STRDECR_SOURCE
    -
    -#include "../tools/memory.h"
    -
    -signed strdecr (void * memory, register size_t extent, register byte min, register byte max)
    -
    -{
    -	register byte * offset = (byte *)(memory);
    -	while (extent--)
    -	{
    -		if (-- offset [extent] >= min)
    -		{
    -			return (0);
    -		}
    -		offset [extent] = max;
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/strfbits.c.html b/docbook/strfbits.c.html deleted file mode 100644 index ba5ec31d..00000000 --- a/docbook/strfbits.c.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - strfbits.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   size_t strfbits (char  buffer [], size_t length, char const * operands [], char const * operator, unsigned flagword);
    - *
    - *   format.h
    - *
    - *   format buffer with an enumerated list of the bits in a flagword;
    - *   each flagword bit position corresponds to a string in operands[]
    - *   and operator is the string separating formatted operands;
    - *
    - *   enumeration continues until all bits are enumerated or operands
    - *   are exhausted or the buffer fills;
    - *
    - *   for example, the following formats buffer with the literal string
    - *   "one, three, five, six" since those bits are set;
    - *
    - *   char buffer[100];
    - *   char const operator = ", ";
    - *   char const *operands[] =
    - *   {
    - *      "zero",
    - *      "one",
    - *      "two",
    - *      "three",
    - *      "four",
    - *      "five",
    - *      "six",
    - *      "seven",
    - *      "eight",
    - *      "nine",
    - *      "ten",
    - *      (char *)(0)
    - *   };
    - *   flag_t flags = 0x006C;
    - *
    - *   strfbits (buffer, sizeof(buffer), operands, operator, flags);
    - *
    - *   we decrement length before starting to reserve room for the NUL
    - *   terminator; not room ... no write; we then add length to buffer
    - *   before to compute the terminator address then subtract it after
    - *   to compute the buffer start; this minimizes indexing and offset
    - *   calculations within the loop;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef STRFBITS_SOURCE
    -#define STRFBITS_SOURCE
    -
    -#include <unistd.h>
    -
    -#include "../tools/memory.h"
    -#include "../tools/flags.h"
    -
    -size_t strfbits (char buffer [], size_t length, char const * operands [], char const * operator, unsigned flagword)
    -
    -{
    -	char * string = (char *)(buffer);
    -	char const *separator = "";
    -	if (length--)
    -	{
    -		buffer += length;
    -		while ((*operands) && (flagword))
    -		{
    -			if (flagword & 1)
    -			{
    -				char const *symbol;
    -				for (symbol = separator; (*symbol) && (string < buffer); symbol++)
    -				{
    -					*string++ = *symbol;
    -				}
    -				for (symbol = *operands; (*symbol) && (string < buffer); symbol++)
    -				{
    -					*string++ = *symbol;
    -				}
    -				separator = operator;
    -			}
    -			flagword >>= 1;
    -			operands++;
    -		}
    -		*string = (char) (0);
    -		buffer -= length;
    -	}
    -	return (string - (char *)(buffer));
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/strincr.c.html b/docbook/strincr.c.html deleted file mode 100644 index f610134f..00000000 --- a/docbook/strincr.c.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - strincr.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   signed strincr (void * memory, size_t extent, byte min, byte max);
    - *
    - *   memory.h
    - *
    - *   increment a multi-byte memory region; start at min and reset at
    - *   max; return -1 if all bytes are max;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef STRINCR_SOURCE
    -#define STRINCR_SOURCE
    -
    -#include "../tools/memory.h"
    -
    -signed strincr (void * memory, register size_t extent, register byte min, register byte max)
    -
    -{
    -	register byte * offset = (byte *)(memory);
    -	while (extent--)
    -	{
    -		if (++ offset [extent] <= max)
    -		{
    -			return (0);
    -		}
    -		offset [extent] = min;
    -	}
    -	return (-1);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/strnpwd.c.html b/docbook/strnpwd.c.html deleted file mode 100644 index 7b932585..00000000 --- a/docbook/strnpwd.c.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - strnpwd.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2015 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -/*====================================================================*
    - *
    - *   char * strnpwd (char buffer [], unsigned length, unsigned count, unsigned group, char space);
    - *
    - *   keys.h
    - *
    - *   encode a buffer with a password containing the specified number
    - *   of random letters and digits; optionally, group the letters and
    - *   digits and separate groups with a space character; return the
    - *   address of the byte following the encoded password;
    - *
    - *   alphabet is an array of 32 printable password characters; 
    - *   count is the number of characters to be selected from alphabet; 
    - *   group is the grouping factor; 
    - *   space is the group separator;
    - *
    - *   grouping is suppressed when group is zero or greater than or
    - *   equal to count;
    - *
    - *   Contributors:
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef STRNPWD_SOURCE
    -#define STRNPWD_SOURCE
    -
    -#include <unistd.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -
    -#include "../tools/types.h"
    -#include "../tools/error.h"
    -#include "../key/keys.h"
    -
    -char * strnpwd (char buffer [], unsigned length, unsigned count, unsigned group, char space)
    -
    -{
    -	signed fd;
    -	if ((fd = open ("/dev/urandom", O_RDONLY)) == -1)
    -	{
    -		error (1, errno, "can't open /dev/urandom");
    -	}
    -	while (count--)
    -	{
    -		static const char alphabet [] =
    -		{
    -			'2',
    -			'3',
    -			'4',
    -			'5',
    -			'6',
    -			'7',
    -			'8',
    -			'9',
    -			'A',
    -			'B',
    -			'C',
    -			'D',
    -			'E',
    -			'F',
    -			'G',
    -			'H',
    -			'J',
    -			'K',
    -			'L',
    -			'M',
    -			'N',
    -			'P',
    -			'Q',
    -			'R',
    -			'S',
    -			'T',
    -			'U',
    -			'V',
    -			'W',
    -			'X',
    -			'Y',
    -			'Z'
    -		};
    -		unsigned member;
    -		if (read (fd, & member, sizeof (member)) != sizeof (member))
    -		{
    -			error (1, errno, "can't read /dev/urandom");
    -		}
    -		if (length)
    -		{
    -			*buffer = alphabet [member % sizeof (alphabet)];
    -			buffer++;
    -			length--;
    -		}
    -		if ((count) && (group) && ! (count % group))
    -		{
    -			if (length)
    -			{
    -				*buffer = space;
    -				buffer++;
    -				length--;
    -			}
    -		}
    -	}
    -	close (fd);
    -	return (buffer);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/support.xml b/docbook/support.xml deleted file mode 100644 index 7f7bf21a..00000000 --- a/docbook/support.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - Support Function Reference - -
    - - Introduction - - - The Open Powerline Toolkit includes many general-purpose or multi-purpose functions that may appear in other Qualcomm Atheros applications or in third party packages. Consequently, we describe them separately and store them in separate folders withing the toolkit. - -
    - &command; - ðernet; - &network; - &generic; - &message; - &keys; - &xml; - &download; - &procrastinate; - &traffic; - &slac; -
    diff --git a/docbook/support1.xml b/docbook/support1.xml deleted file mode 100644 index 8b6a32c0..00000000 --- a/docbook/support1.xml +++ /dev/null @@ -1,264 +0,0 @@ -
    - - Command Line Functions - - - Command line functions are used by all toolkit programs. They are generic functions but we include them in a special section because they collectively co-operate to convert command line options and arguments into appropriate binary representations and provide concise but meaningful feedback when that is not possible. - -
    - - assist - - - - void assist - char const * name - char const * type - const struct _code_ list [] - size_t size - FILE * fp - - - - Show why a symbolic name was rejected by function lookup or similar functions. Argument type contains a title for the class of names stored in list. This function prints an error message on file stream fp showing the program name, the type string, the symbolic name and all names stored in the list. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in assist.c. Function expect is used to print list names. - -
    -
    - - basespec - - - - uint64_t basespec - char const * string - unsigned base - unsigned size - - - - Return the unsigned integer equivalent of a numeric string. Print an error message on stderr and exit the program with status 1 if a syntax error occurs or the result exceeds the capacity of the requested integer size in bytes. If base is 0, numeric values may be expressed in decimal, hexadecimal or binary notation where hexadecimal values start with "0x" and binary values start with "0b". When base is non-zero, the notation in string must conform to the corresponding number base rules. Applications should cast the return value to the appropriate data type prevent loss-of-data compiler warnings. This function is typically used to convert and length-check integers entered as command line arguments. The function is declared in number.h and defined in basespec.c. - - - Like function uintspec, this function both converts and range checks numeric string values, but the minimum and maximum value are implicit in the size of the integer. The minimum value is always 0 and the maximum value can be computed by ((1 << size << 3) - 1). - -
    -
    - - bytespec - - - - void bytespec - char const * string - void * memory - size_t extent - - - - Encode a memory region with the binary equivalent of a fixed-length hexadecimal string. Print an error message on stderr and exit the program with status 1 if a syntax error occurs or the number of octets does not equal extent. Hexadecimal octets may be separated by colons for readability but colons are not required. Empty octets are illegal. The function is declared in memory.h and defined in bytespec.c. - - - This function is typically used to enter fixed-length data, like hardware addresses and encryption keys, on the command line. - -
    -
    - - checkfilename - - - - bool checkfilename - char const * filename - - - - Return logical true if the filename argument contains only letters, digits, slashes, periods, underscores and hyphens. This function can be used to detect cases where a user accidentally entered an Ethernet address in place of a filename on the command line. Ethernet address strings are, as it happens, also valid filenames. The function is declared in files.h and defined in checkfilename.c. - -
    -
    - - dataspec - - - - void dataspec - char const * string - void * memory - size_t extent - - - - Encode a memory region with the binary equivalent of a variable-length hexadecimal string. Print an error message on stderr and exit the program with the status 1 if a syntax error occurs or the number of octets exceeds extent. The number of octets may, however, be less than extent. Unlike function bytespec, hexadecimal octets may not be separated by colons. This function is typically used to enter variable-length data from the command line. The function is declared in memory.h and defined in dataspec.c. - -
    -
    - - error - - - - void error - intexitcode - errno_t number - char const * format - ... - - - - This function works like printf except that printed messages appear on stderr and are prefixed with the program name and error information. If argument errno is non-zero then messages are prefixed with the system error description. If argument exitcode is non-zero then function error exits the program with value exitcode after printing the message and does not return to the caller. The function is declared in error.h and defined in error.c. - - - This function is used to print informative error messages on the console and prevent program execution from proceeding when input is invalid or some error condition exists. - -
    -
    - - expect - - - - void expect - const struct _code_ list [] - size_t size - FILE * fp - - - - Display all names in argument list on file stream fp. This function is called by runction assist to print the list of symbolic names but other function may have use for it. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in expect.c. - -
    -
    - - getoptv - - - - int getoptv - int argc - char const * argv [] - char const * optv [] - - - - A custom version of the POSIX function getopt. It supports standard global variables optind, opterr, optopt and optarg and the non-standard variable optmin. It extracts the program name from argv[0] and sets global string pointer program_name for use by functions alert, error and others. Options -? and --help both display program information on stdout. Options -! and --version both display program version information on stdout. String vector optv includes both the standard argument optstring and usage text found in many programs. The function is declared in getoptv.h and defined in getoptv.c. - -
    -
    - - ipv4spec - - - - size_t ipv4spec - char const * string - void * memory - - - - Encode a 4-byte memory region with an IPv4 dotted-decimal string and return the number of bytes encoded. Terminate the program with an error message and exitcode of 1 on conversion error. The value returned by this function is always 4 and memory is always encoded in network byte order. This function is typically used to convert IPv4 strings entered as command line arguments. The function is declared in memory.h and defined in ipv4spec.c. - - - Dotted-decimal format consists of decimal values in the range 0 through 255. Each value represents one octet or 8-bit value. IPv4 addresses require 4 such values separated by one decimal point. This function permits empty octets and leading zeros within octets. For example, ... is equivalent to 0.0.0.0 and 127.0.000.001 is equivalent to 127.0.0.1. The second example will encode memory as follows { 0x7F, 0x00, 0x00, 0x01 } which is in network byte order, or big endian. - -
    -
    - - ipv6spec - - - - size_t ipv6spec - char const * string - void * memory - - - - Encode a 16-byte memory region with an IPv6 colon-separated hexadecimal quartet string and return the number of bytes encoded. Terminate the program with an error message and exitcode of 1 on conversion error. The value returned by this function is always 16 and memory is always encoded in network byte order. This function is typically used to convert IPv6 strings entered as command line arguments. The function is declared in memory.h and defined in ipv6spec.c. - - - Colon-separated hexadecimal quartet notation consists of hexadecimal values in the range 0 through FFFF. Each value represents a quartet or a 32-bit value. IPv6 addresses require 8 quartets separated by one colon. By convention, an empty quartet expands with enough zeros to right-justify the remainder of the address. This function permits multiple empty quartets and leading zeros within quartets. When multiple empty quartets appear, only the right-most occurance expands to zeros. For example, AA12::BB34::CC56::DD78 is equivalent to AA12:0000:BB34:0000:CC56:0000:0000:DD78 because only the right-most empty field expands. This will encode memory as follows { 0xAA, 0x12, 0x00, 0x00, 0xBB, 0x34, 0x00, 0x00, 0xCC, 0x56, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x78 } which is in network byte order, or big-endian. - -
    -
    - - lookup - - - - signed lookup - char const * name - const struct _code_ list [] - size_t size - - - - Lookup a symbolic name in a list and return an associated integer or -1 if the name does not appear in the list. A typical use is the translation of symbolic command line arguments to integer codes. For example, some Toolkit programs assign symbolic names to field codes so that users can enter names instead of numbers. This approach becomes more useful as the number of permitted codes increases. The _code_ structure is declared in types.h. The function is declared in symbol.h and defined in lookup.c. - - - This function offers two benefits: 1) multiple symbols can translate to one code and 2) names can be changed or new names added without affecting program logic. This function is similar to but different from function synonym which returns a character string instead of an integer. - -
    -
    - - putoptv - - - - void putoptv - char const * optv [] - - - - Print program information on stdout. Program information is stored in string vector optv. String indexes are defined in file putoptv.h. String optv[0] is the POSIX standard argument optstring. This function is called by function getoptv whenever option -? or --help is detected on the command line. There is virtually no need to call this function directly. The function is declared in putoptv.h and defined in putoptv.c. - -
    -
    - - synonym - - - - char const * synonym - char const * string - const struct _term_ list [] - size_t size - - - - Lookup a symbolic name in a list and return an associated string or the original string if the name does not appear in the list. A typical use is the translation of symbolic command line arguments to their equivalent numeric strings before encoding them. For example, many Toolkit programs convert the command line argument local to 00:B0:52:00:00:01 before encoding the device MAC address. The _term_ structure is declared in types.h. The function is declared in symbol.h and defined in synonym.c. - - - This function is similar to but different from function lookup which returns an integer instead of a character string. - -
    -
    - - uintspec - - - - uint64_t uintspec - char const * string - uint64_t minimum - uint64_t maximum - - - - Return the unsigned integer equivalent of a numeric string. Print an error message on stderr and exit the program with the value 1 when a syntax error occurs or the result exceeds the specified minimum or maximum value. Numeric values may be expressed in decimal, hexadecimal or binary notation where hexadecimal values start with "0x" and binary values start with "0b". Applications should cast the return value to the appropriate data type to avoid loss-of-data warnings on some compilers. This function is typically used to convert and range-check integer values entered as command-line arguments. The function is declared in number.h and defined in uintspec.c. - -
    -
    - - version - - - - void version - - - - - Print package and program version information on stdout. This function is called by function getoptv whenever option -! or --version is detected on the command line. There is no need to call this function directly. The function is declared in version.h and defined in version.c. Constants PACKAGE and VERSION define the information that is displayed. They are defined in file version.h and must be maintained by developers. - -
    -
    diff --git a/docbook/support10.xml b/docbook/support10.xml deleted file mode 100644 index a7be3bcc..00000000 --- a/docbook/support10.xml +++ /dev/null @@ -1,129 +0,0 @@ -
    - - Traffic Functions - - - Traffic functions generate powerline traffic in various ways. Some send traffic direct from the host to each device while others use the VS_FR_LBK message to echo Ethernet frames back to the sender. - -
    - - CrossTraffic1 - - - - signed CrossTraffic1 - struct plc * plc - - - - Instruct a powerline device to send a generic Ethernet frame to another powerline device for a fixed period of time in order to set the TX rate on the source device and the RX rate on the destination device. The source and destination address are specified in plc->MAC and plc->RDA, respectively, and the duration is specified in plc->timeperiod. This function is similar to function CrossTraffic2 but the source and destination addresses are reversed. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file CrossTraffic1.c. - -
    -
    - - CrossTraffic2 - - - - signed CrossTraffic2 - struct plc * plc - - - - Instruct a powerline device to send a generic Ethernet frame to another powerline device for a fixed period of time in order to set the TX rate on the source device and the RX rate on the destination device. The source and destination address are specified in plc->RDA and plc->MAC, respectively, and the duration is specified in plc->timeperiod. This function is similar to function CrossTraffic1 but the source and destination addresses are reversed. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file CrossTraffic2.c. - -
    -
    - - LocalTraffic1 - - - - signed LocalTraffic1 - struct plc * plc - - - - Send a fixed number of generic frames from the local host a remote powerline device in order to set the TX rate on the local powerline device and the RX rate on the remote powerline device. The local and remote device address are specified in plc->MAC and plc->RDA, respectively, and the count is specified in plc->count. This function is similar to function LocalTraffic2 which instructs a remote device to echo frames back to the local device. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file LocalTraffic1.c. - -
    -
    - - LocalTraffic2 - - - - signed LocalTraffic2 - struct plc * plc - - - - Instruct a remote powerline device to echo generic Ethernet frames back to the local host for a fixed period of time in order to set the TX rate on the remote powerline device and the RX rate on the local powerline device. The local and remote device address are specified in plc->MAC and plc->RDA, respectively, and the count is specified in plc->count. This function is useful when there is no easy way to send traffic from the remote host. This function complements function LocalTraffic1 which send frames from the local device to a remote device. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file LocalTraffic2.c. - -
    -
    - - NetworkTraffic1 - - - - signed NetworkTraffic1 - struct plc * plc - - - - This function is an alternative to function NetworkTraffic2 which uses Qualcomm Version 1 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file NetworkTraffic1.c. - - - This function use VS_SW_INFO and VS_NW_INFO messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic1, it does not generate traffic between various remote devices. - -
    -
    - - NetworkTraffic2 - - - - signed NetworkTraffic2 - struct plc * plc - - - - This function is an alternative to function NetworkTraffic1 which uses Qualcomm Version 0 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file NetworkTraffic2.c. - -
    -
    - - Traffic1 - - - - signed Traffic1 - struct plc * plc - - - - This function is an alternative to function Traffic2 which uses Qualcomm Version 1 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file Traffic1.c. - - - This function use VS_SW_INFO and VS_NW_INFO messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic1, it does not generate traffic between remote devices. - -
    -
    - - Traffic2 - - - - signed Traffic2 - struct plc * plc - - - - This function is an alternative to function Traffic1 which uses Qualcomm Version 0 management messages to determine network topology. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file Traffic2.c. - - - This function use VS_SW_INFO and VS_NW_INFO messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic2, it does not generate traffic between remote devices. - -
    -
    diff --git a/docbook/support11.xml b/docbook/support11.xml deleted file mode 100644 index 64c6ce32..00000000 --- a/docbook/support11.xml +++ /dev/null @@ -1,605 +0,0 @@ -
    - - SLAC Functions and Variables - - - The functions described in this chapter implement SLAC protocol building blocks. Essentially, there is one function for each dataflow shown on the SLAC interface diagram. The implementations are not sophisticated. Customers must adapt them their own run-time environments. - - - To assist in adapting functions fo various environments, SLAC functions all accept three arguments. The first is a session variable that references information that supports a single PEV-EVSE SLAC interaction. The second is a channel variable that references information that supports ISO Layer 2 network communications. The third is a message variable that references an IEEE 802.3 frame buffer used to format, transmit, receive and interpret SLAC messages. Applications may create lists, stacks, queues or heaps of session variables to support multiple PEV-EVSE conversations. That has not been done here but may be done in the future. - - - PEV-HLE determines the application type and security type and stores them in the session variable before attempting a new SLAC session. PEV-HLE also generates and stores the run identifier in the session variable before attempting a new SLAC session. The run identifier is included in messages so that the EVSE-HLE can distinguish frames from different PEV-HLEs when transmitted in broadcast. - -
    - - The Session Variable - - - The session variable is a structure defined in slac.h. It stores the information needed to manage a single SLAC protocol session between PEV-HLE and EVSE-HLE. It is necessary because there are cases where multiple PEV-HLE attempt to communicate with one EVSE-HLE or vice verse and each communication involves multiple steps and some steps will fail or be abandoned. - - - - - session.RunID - - - -A session identifier used to support multiple PEV-EVSE sessions. -The PEV-HLE defines a new value with each associateion attempt and broadcasts it to EVSE-HLE in CM_SLAC_PARAM.REQ RunID. -EVSE-HLE receive it and store it in their session variable. -Once association starts, subsequent messages, in both directions, include this identifier so that PEV-HLE and EVSE-HLE can detect and collate messages from the same conversation. - - - - - - session.APPLICATION_TYPE - - - -Indicates the context in which the SLAC process is being carried out. -Currently, the only context is PEV-EVSE association. -The PEV-HLE sends this value to the EVSE-HLE in EVSE-HLE in CM_SLAC_PARAM.REQ message APPLICATION_TYPE field. -EVSE-HLE receive it and store it in their session variable. - - - - - - session.SECURITY_TYPE - - - -Indicates that the sender prefers Secure SLAC for PEV-EVSE matching. -Currently, the only value used in SLAC demonstration software is 0 for No Security. -The PEV-HLE defines this value as 0 on startup and broadcasts it to EVSE-HLE in in CM_SLAC_PARAM.REQ message SECURITY_TYPE field. -EVSE-HLE receive it and store it in their session variable for later use when sending SLAC messages. - - - - - - session.RESP_TYPE - - - -The EVSE-HLE defines this value and sends it to the PEV-HLE in CM_SLAC_PARAM.CNF message RESP_TYPE field. -THe default is 0 but this can be changed using response type = in profile evse.ini. - - - - - - session.NUM_SOUNDS - - - -The number of CM_MNBC_SOUND.IND messages that the PEV-HLE should send during sounding. -The EVSE-HLE defines this value and sends it to PEV-HLE in CM_SLAC_PARAM.CNF message NUM_SOUNDS field. -The default is 10 but this can be changed using time to soundi = in profile evse.ini. - - - - - - session.TIME_OUT - - - -The total time allowed for all session sounding to complete. -Any msounds arriving after the timeout will be lost. -The time is expressed in 100 msec increments. -The EVSE-HLE defines this value and sends it to PEV_HLE in CM_SLAC_PARAM.CNF. -The default is 8 but this can be changed using number of sounds = in profile evse.ini. - - - - - - session.AAG [] - - - -The cumulative average attenuation across 58 groups of 16 carriers. -The EVSE-HLE computes these averages from multiple CM_ATTEN_PROFILE.IND and forwards them to PEV-HLE in CM_ATTEN_CHAR.IND. -PEV_HLE populates array from CM_ATTEN_CHAR.IND message ACVarField.ATTEN_PROFILE.AAG field and evaluates it by averaging all values in the array to determine the overall average attenuation. -If that values is less than or equal to session.limit then a match may be attempted. - - - - - - session.NumGroups - - - -The number of elements in array session.AAG. -This EVSE-HLE defines this number and sends it to PEV-HLE in CM_ATTEN_CHAR.IND ACVarField.NumGroups. -For practical purposes, this value of this variable is constant at 58. - - - - - - session.MSOUND_TARGET - - - -MAC address of EVSE-HLE that will receive CM_MNBC_SOUND.IND messages. -The EVSE-HLE defines this address and broadcasts it to PEV-HLE in CM_SLAC_PARAM.CNF message M-SOUND_TRAGET field. -THe PEV-HLE stores this address in its session variable. -The default is FF:FF:FF:FF:FF:FF and remains constant. -This value is not used at this time. - - - - - - session.FORWARDING_STA - - - -MAC address of PEV-HLE to receive CM_SLAC_PROFILE.IND messages. -The EVSE-HLE defines this address and sends it to PEV-HLE in CM_SLAC_PARAM.CNF message FORWARDING_STA field. -THe PEV-HLE stores this address in its session variable. -The default is FF:FF:FF:FF:FF:FF and remains constant. -This value is ignored when RESP_TYPE=0. - - - - - - session.PEV_ID - - - -The vehicle identification number. -The PEV-HLE sends this value to the EVSE-HLE in CM_SLAC_MATCH.REQ MatchVarField.PEV_ID field. -The default is AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA but is can be changed using vehicle identifier = in profile pev.ini. -The MatchVarField portion of the message forms the transaction record and may be encrypted. - - - - - - session.PEV_MAC - - - -PEV-HLE MAC address. -The PEV-HLE sends this address to the EVSE-HLE in CM_SLAC_MATCH.REQ MatchVarField.PEV_MAC field. -The MatchVarField portion of the message forms the transaction record and may be encrypted. - - - - - - session.EVSE_ID - - - -The station identification number. -The EVSE-HLE sends this value to PEV-HLE in CM_SLAC_MATCH.CNF message MatchVarField.EVSE_ID field. -The default is BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB but is can be changed using station identifier = in profile evse.ini. -The MatchVarField portion of the message forms the transaction record and may be encrypted. - - - - - - session.EVSE_MAC - - - -EVSE-HLE MAC address. -The EVSE-HLE sends this value to PEV-HLE in CM_SLAC_MATCH.CNF message MatchVarField.EVSE_MAC field. -The MatchVarField portion of the message forms the transaction record and may be encrypted. - - - - - - session.NMK - - - -The EVSE-PLC Network Membership Key. -The EVSE-HLE defines this value when the station powers on. -The EVSE-HLE sends the NMK to the PEV-HLE in CM_SLAC_MATCH.CNF message MatchField.NMK field. -The PEV-HLE uses this value to form a network with the EVSE-PLC during charging. -The MatchVarField portion of the message forms the transaction record and may be encrypted. - - -The default for PEV-HLE is 50D3E4933F855B7040784DF815AA8DB7, which is the key derived from network password HomePlugAV, but that can be changed using nwtwork membership key = in profile pev.ini. - - -The default for EVSE-HLE is B59319D7E8157BA001B018669CCEE30D, which is the key derived from network password HomePlugAV0123, but that can be changed using nwtwork membership key = in profile evse.ini. - - - - - - - session.NID - - - -The EVSE-PLC Network Identifier. -The EVSE-HLE defines this value when the station powers. -The EVSE-HLE sends the NID to the PEV-HLE in CM_SLAC_MATCH.CNF message MatchField.NID field. -The PEV-HLE uses this value to form a network with the EVSE-PLC during charging. -The MatchVarField portion of the message forms the transaction record and may be encrypted. - - -The default for PEV-HLE is B0F2E695666B03, which is the key derived from network password HomePlugAV, but that can be changed using nwtwork membership key = in profile pev.ini. - - -The default for EVSE-HLE is 026BCBA5354E08, which is the key derived from network password HomePlugAV0123, but that can be changed using nwtwork membership key = in profile evse.ini. - - - - - - session.RND - - - -A random value. -PEV-HLE computes this value and sends it to EVSE-HLE in CM_MNBC_SOUND.IND. -This value is not used at this time. - - - - - - session.original_nmk - - - -The original PEV-PLC Network Membership Key. -This is the original NMK of the PEV-HLE. -The PEV-HLE preserves this value before, and restores it after, the charging cycle. -The Qualcomm Atheros PEV-HLE and EVSE-HLE demonstration software reads these values from profile pev.ini and evse.ini, respectively, by network membership key = . - - - - - - session.original_nid - - - -The PLC Network Identifier (NID). -PEV-PLC and EVSE-PLC will each have a different NID at the start of the SLAC process. -This value must be preserved before, and restored after, charging. -Once charging is complete, PEV-HLE and EVSE-HLE restore this value to their respective PLC using CM_SET_KEY. -In a real world implementation, PEV-HLE and EVSE-HLE would read this value from their repective PLC and save it in session.nmk and session.NMK. -The Qualcomm Atheros PEV-HLE and EVSE-HLE demonstration software reads these values from profile pev.ini and evse.ini, respectively, by network identifier = . - - - - - - session.state - - - -The current SLAC protocol session state. Qualcomm Atheros PEV-HLE and EVSE-HLE demonstration programs use this value to direct internal state transitions. -Values range from 0 through 3. - - - - - - session.sounds - - - -The number of MSounds captured received by EVSE-HLE. -This value may be less that NUM_SOUNDS the requested by the EVSE_HLE due to network interruptions or EVSE-HLE overloading. -This is the denominator used when computing the average attenuation in array session.AAG. -The values is set by PEV_HLE from CM_ATTEN_CHAR.IND message NUM_SOUNDS field. - - - - - - session.limit - - - -The attenuation threshold. -If the average attenuation value in session.AAG exceeds this value the PEV-HLE will make no attempt to connect the PEV-PLC to the EVSE-PLC. -The default value is 10 but this can be re-defined in profile pev.ini by attenuation threshold = . - - - - - - session.pause - - - -The time in milliseconds between MSounds. -Sounding too frequently does not allow enough time for the EVSE-PLC to sample and compute values. -Sounding too infrequently wastes time. -The maximum sample rate may be limited by the quality of the powerline media and traffic passwing through the EVSE-PLC. -The default is 10 but can be re-defined in profile pev.ini by msound pause = . - - - - - - session.chargetime - - - -The time in milliseconds allowed for the charging cycle to complete. -The default is 10 but this can be changed using charge time = in profile pev.ini and evse.ini. -The charge time should be the same for PEV-HLE and EVSE-HLE when running long tests. - - - - - - session.settletime - - - -The time in milliseconds allowed for the charging cycle to complete. -The default is 10 but this can be changed using settle time = in profile pev.ini and evse.ini. -The settle time should be the same for PEV-HLE and EVSE-HLE when running long tests. - - - - - - session.counter - - - -The number of chaging session that have take place. -This variable is not part of the SLAC protocol. -The PEV-HLE and EVSE-HLE increment this counter each time they enter the Charging state and exchange this value in the unused CM_SLAC_PARAM.REW and CM_SLAC_PARAM.CNF message CipherSuite field. -Runtime options can be used to instruct either the PEV-HLE or EVSE-HLE to terminate if their counts are out-of-sync. - - - - - - session.flags - - - -A bit-mapped flagword used to control program flow based on user-specified command line options. - - - - -
    - - - - - - -
    - - pev_cm_slac_param - - - - signed pev_cm_slac_param - struct session * session - struct channel * channel - struct message * message - - - -PEV-HLE broadcasts CM_SLAC_PARAM.REQ messages and waits for a CM_SLAC_PARAM.CNF from EVSE-HLEs. -This is the first message sent and it initiates SLAC session one some EVSE-HLE responds. -Function pev_cm_slac_param copies session.APPLICATION_TYPE, session.SECURITY_TYPE and session.RunID into CM_SLAC_PARAM.REQ and broadcasts it to listening EVSE-HLE. - - -It is possible that multiple EVSE-HLEs will respond but one response is sufficient to proceed. -If a CM_SLAC_PARAM.CNF is not received within a reasonable time, PEV-HLE sends another another CM_SLAC_PARAM.REQ message. -PEV-HLE should compare the run identifier in the CM_SLAC_PARAM.CNF to that stored in the session variable to ensure that it is not processing CM_SLAC_PARAM.CNF messages from some other session. -PEV-HLE compares RunID, APPLICATION_TYPE and SECURITY_TYPE from CM_SLAC_PARAM.CNF to that stored in the session variable to ensure they have not changed. -PEV-HLE stores MSOUND_TARGET, NUM_SOUNDS and TIME_OUT in the session variable for later use. - -
    -
    - - evse_cm_slac_param - - - - signed evse_cm_slac_param - struct session * session - struct channel * channel - struct message * message - - - -EVSE-HLE receives a CM_SLAC_PARAM.REQ and responds with a CM_SLAC_PARAM.CNF message. -This function waits indefinitly for CM_SLAC_PARAM.REQ then copies RunID, APPLICATION_TYPE and SECURITY_TYPE from CM_SLAC_PARAM.REQ to the session variable for later use. -It then copies session.MSOUND_TARGET, session.NUM_SOUNDS, session.TIME_OUT, session.RESP_TYPE, session.FORWARDING_STA, session.APPLICATION_TYPE, session.SECURITY_TYPE and session.RunID to CM_SLAC_PARAM.CNF and sends it unicast to the requesting PEV-HLE. - -
    - -
    - - pev_cm_start_atten_char - - - - signed evse_cm_start_atten_char - struct session * session - struct channel * channel - struct message * message - - - -PEV-HLE informs listening EVSE-HLE that sounding is about to start by broadcasting CM_START_ATTEN_CHAR.IND. -Function pev_cm_start_char copies session.NUM_SOUNDS, session.TIME_OUT, session.RESP_TYPE, session.FORWARDING_STA and session.RunID to CM_START_ATTEN_CHAR.IND. - - - The standard recommends that this message be sent three times. Our demonstration software does not do this. - -
    -
    - - evse_cm_start_atten_char - - - - signed evse_cm_start_atten_char - struct session * session - struct channel * channel - struct message * message - - - -EVSE-HLE receives CM_START_ATTEN_CHAR from PEV-HLE and prepares to receive sounds by initializing msound counters and starting a timer. -This function compares RunID from CM_START_ATTEN_CHAR to session.RunID to ensure that this message belongs to a known session. -This function compares APPLICATION_TYPE, SECURITY_TYPE, NUM_SOUNDS, TIME_OUT, RESP_TYPE and FORWARDING_STA to the session variable to ensure that values have not changed. - -
    -
    - - pev_cm_mnbc_sound - - - - signed pev_cm_mnbc_sound - struct session * session - struct channel * channel - struct message * message - - - -PEV-HLE sends periodic CM_MNBC_SOUND.IND to EVSE-HLE. - -
    -
    - - evse_cm_mnbc_sound - - - - signed evse_cm_mnbc_sound - struct session * session - struct channel * channel - struct message * message - - - -EVSE-HLE receives interleaved CM_MNBC_SOUND.IND from PEV-HLE and CM_ATTEN_PROFILE.IND messages from EVSE-PLC. -This function maintains a running average of attenuation values across each carrier group in array session.AAG. - -
    -
    - - evse_cm_atten_char - - - - signed evse_cm_atten_char - struct session * session - struct channel * channel - struct message * message - - - -EVSE-HLE sends CM_ATTEN_CHAR.IND to PEV-HLE. -This function copies session.AAG to CM_ATTEN_CHAR.IND. - -
    -
    - - pev_cm_atten_char - - - - signed pev_cm_atten_char - struct session * session - struct channel * channel - struct message * message - - - -PEV-HLE receives CM_ATTEN_CHAR.IND from EVSE-HLE and acknwoledges with CM_ATTEN_CHAR.RSP. - -
    -
    - - pev_cm_slac_match - - - - signed pev_cm_slac_match - struct session * session - struct channel * channel - struct message * message - - - -PEV-HLE sends CM_SLAC_MATCH.REQ to selected EVSE-HLE and waits for CM_SLAC_MATCH.CNF. -This function evaluates sounds across all carrier groups and compares result to some threshold and selects one EVSE-HLE. -This function copies session.APPLICAION_TYPE, session.SECURITY_TYPE, session.PEV_ID, session.PEV_MAC and session.RunID to CM_SLAC_PARAM.REQ and sends it unicast to the selected EVSE-HLE. - -
    -
    - - evse_cm_slac_match - - - - signed evse_cm_slac_match - struct session * session - struct channel * channel - struct message * message - - - -EVSE-HLE listens for CM_SLAC_MATCH.REQ from PEV-HLE and abandons the session if no indication is received within a reasonable time. -If an indication is received then this function compares RunID from CM_SLAC_MATCH.REQ to the session.RunID to ensure the message is part of the current session. -This function compares APPLICATION_TYPE and SECURITY_TYPE to the session.APPLICATION_TYPE and session.SECURITY_TYPE to ensure that they have not changed. -This function copies PEV_ID and PEV_MAC from CM_SLAC_MATCH.REQ to the session variable for later use. -This function updates session.NMK and session.NID with random values. -This function copies session.EVSE_ID, session.EVSE_MAC, session.NMK and session.NID to CM_SLAC_MATCH.RSP and sends it unicast to the selecing PEV-HLE. - -
    - -
    - - evse_cm_set_key - - - - signed evse_cm_mnbc_sound - struct session * session - struct channel * channel - struct message * message - - - - -
    -
    - - pev_cm_set_key - - - - signed pev_cm_mnbc_sound - struct session * session - struct channel * channel - struct message * message - - - - -
    -
    diff --git a/docbook/support2.xml b/docbook/support2.xml deleted file mode 100644 index c6bd923d..00000000 --- a/docbook/support2.xml +++ /dev/null @@ -1,187 +0,0 @@ -
    - - Ethernet Functions - - - The Open Powerline Toolkit supports raw Ethernet I/O on several popular operating systems, including Linux, Mac OS X and Microsoft Windows. Other operating systems will probably be added over time. These functions are found in the ether folder. - - - Each operating system has a different raw Ethernet interface and so some abstraction was needed to support the toolkit for all environments. Our solution was the channel which is implemented like a FILE pointer but is used like a file descriptor. All toolkit programs, with a few exceptions, perform raw Ethernet I/O by opening a channel, reading and writing to it and then closing it. - -
    - - channel - - - The channel structure contains enough information to perform raw Ethernet I/O in several common runtime environments; however, portions of the structure vary depending on the environment. These differences are appled by compile time constants that include required structure members and exclude others. The common structure members are identified and described below. The others elements are not discussed because they may change. - - -typedef struct __packed channel -{ - signed fd; - signed ifindex; - char const * ifname; - uint8_t peer [ETHER_ADDR_LEN]; - uint8_t host [ETHER_ADDR_LEN]; - uint16_t type; - - ... <operating system dependent data> ... - - signed timeout; - flag_t flags; -} CHANNEL; - - - - - .fd - - - - Socket file descriptor. - - - - - - .ifindex - - - - Ethernet device index. The index only applies when the toolkit is compiled for LibPcap or WinPcap. This value is the same as that returned in the .ifr_ifindex member of the ifreq structure available on most operating systems. - - - - - - .ifname - - - - The interface name. On Linux, ethernet names are typically eth0, eth1 and so on. On Mac OS X, interface names are en0, en1 and so on. This string is the same as that returned by the ifr_ifname member of the ifreq structure available on most operating systems. - - - - - - .peer - - - - The Ethernet hardware address of some remote device. It is used to encode the ODA field of outgoing Ethernet frames and format some console messages. It is initialized to the Atheros Local Management Address, 00:B0:52:00:00:01 for HomePlug AV applications. Application programs can, and often do, replace this value at runtime. - - - - - - .host - - - - The Ethernet hardware address of the host computer. It is used to encode the OSA field of outgoing Ethernet frames and format some console messages. This address is initialized to the hardware address assigned to the interface by the host operating system. The value should not change. - - - - - - .type - - - - The Ethernet type/length field. It is used to encode the MTYPE field of outgoing Ethernet frames. The values is initialized to 0x88E1 for HomePlug AV application and 0x887B for HomePlug 1.0 application. The value should not change. - - - - - - .timeout - - - - A time interval. On Linux and Mac OS X, it is the maximum time that the application will wait for a device to respond when a response is expected. With LibPcap and WinPcap it the mininum time the application will wait. It is initialized to 50 milliseconds which is a reasonable compromise but most toolkit programs allow the user to change this value. - - - - - - .flags - - - - A bitmap where each bit enables a special behavior during channel open or close or packet read or write. Of general interest is the CHANNEL_VERBOSE bit which prints outgoing and incoming frames on stderr in hexadecimal dump format. The verbose feature is implemented in for all toolkit programs that perform raw Ethernet I/O and is helpful when debugging device behavior. - - - - - - Since toolkit applications typically communicate with one powerline device at a time, this structure is statically initialized in a stand-alone module that is linked into each application. It is possible to dynamically initialize it, if needed. The structure is declared in channel.h and statically defined in channel.c. - -
    -
    - - closechannel - - - - signed closechannel - struct channel * channel - - - - Close the Ethernet socket associated with a channel and free associated memory and data structures. Return 0 on success. Return -1 on failure. This function is declared in channel.h and defined in closechannel.c. - -
    -
    - - openchannel - - - - signed openchannel - struct channel * channel - uint16_t protocol - - - - Open an Ethernet socket that supports the specified protocol and associate it with the interface referenced by the channel structure .name member. Initialize the interface as needed. The protocol effectively filters incoming frames for the application. - - - Interface initialization differs significantly from environment to environment. The socket descriptor is stored in the channel structure .fd member and the interface hardware address is stored in the channel structure .host member. Return 0 on success. Terminate the program with an error message on failure. This function is declared in channel.h and defined in openchannel.c. - -
    -
    - - readpacket - - - - signed readpacket - struct channel * channel - void * packet - signed length - - - - Read one Ethernet frame from the specified channel. The frame is written into memory starting at address packet and is truncated to the specified length, if necessary. Return the actual number of bytes read on success. Return 0 on timeout. Return -1 on network error. This function behaves like the standard library read function. The target memory region remains unchanged on timeout or error. This function is declared in channel.h and defined in readpacket.c. - - - On systems using Berkeley Packet Filters, such as MacOS X, the ODA field is automatically replaced on transmission to prevent Ethernet address spoofing. This may not be true on other systems but the practice is becoming more common. - -
    -
    - - sendpacket - - - - signed sendpacket - struct channel * channel - void * packet - signed length - - - - Write one Ethernet frame to the specified channel. The frame is read from memory starting at address packet and ending at the specified length. Return the actual number of bytes sent on success. Return 0 on timeout. Return -1 on network error. The frame should be properly formatted as an ethernet frame and must be at least 60 bytes long or it will not be sent. This function behaves like the standard library write function. The source memory region is not modified. This function is declared in channel.h and defined in sendpacket.c. - -
    -
    diff --git a/docbook/support3.xml b/docbook/support3.xml deleted file mode 100644 index de38b653..00000000 --- a/docbook/support3.xml +++ /dev/null @@ -1,82 +0,0 @@ -
    - - Network Functions - -
    - - NetworkBridges - - - - size_t NetworkBridges - struct channel * channel - void * memory - size_t extent - - - - Search a channel for local powerline devices (bridges) and store their Ethernet hardware in consecutive memory locations. The memory extent is specified in bytes. The number of devices found is returned as the function value, provided enough space is available to store all addressed. Unlike function NetworkDevices, the channel peer address is ignored. - - - We call local devices bridges because each serves as an Ethernet-to-Powerline bridge for the local host. - - - - Enumerating Local Devices - - -#include <net/if.h> -#include "../ether/channel.h" -extern struct channel channel; -uint8_t address [255][ETHER_ADDR_LEN]; -size_t bridges = NetworkBridges (&channel, address, sizeof (address)); -size_t bridge = 0; -while (bridge < bridges) -{ - binout (address [bridge], ETHER_ADDR_LEN, ':', stdout); - putc ('\n', stdout); -} - - - The code segment shown above illustrates how to use function NetworkBridges to identify all local devices. We do not need to set the channel peer because NetworkBridges always uses the Atheros localcast address. Array address is declared with two dimensions to simplify access to individual addresses on return. - - -
    -
    - - NetworkDevices - - - - size_t NetworkDevices - struct channel * channel - void * memory - size_t extent - - - - Query a powerline device, specified by channel, for neighboring network devices and store their Ethernet addresses in consecutive memory locations. The memory extent is specified in bytes. The number of devices found is returned as the function value, provided sufficient space is available to store all addresses. Unlike function NetworkBridges, the channel peer address is identifies the device to be queried. - - - - Enumerating Network Devices - - -#include <net/if.h> -#include "../ether/channel.h" -extern struct channel channel; -uint8_t address [255][ETHER_ADDR_LEN]; -size_t devices = NetworkDevices (&channel, address, sizeof (address)); -size_t device = 0; -while (device < devices) -{ - binout (address [device], ETHER_ADDR_LEN, ':', stdout); - putc ('\n';, stdout); -} - - - The code segment shown above illustrates how to use function NetworkDevices to identify all devices on a specific network. You must set the channel peer address before calling NetworkDevices. Array address is declared with two dimensions to simplify access to individual addresses on return. If the channel peer address is not the Ethernet broadcast or Atheros localcast address then the first address returned will be the channel peer address. - - -
    -
    diff --git a/docbook/support4.xml b/docbook/support4.xml deleted file mode 100644 index 3fba6f8c..00000000 --- a/docbook/support4.xml +++ /dev/null @@ -1,435 +0,0 @@ -
    - - Generic Functions - - - The functions in this chapter are generic and may have application beyond the Open Powerline Toolkit. In some cases, these functions appear in other Atheros or Open Source software packages. In a few cases, the Toolkit may include complementary or supplementary support functions but only use one or two of them. For example, functions memincr and memdecr are both included but memdecr is not used. - -
    - - binout - - - - void binout - void const * memory - size_t extent - char c - char e - FILE * fp - - - - Print a memory region as a series of binary octets separated by character c and terminated by character e. Normally, character c will be BIN_EXTENDER, defined in file number.h, but it could be any character value. Normally, character e will be a space or newline, but it could be any character value. A typical use might be to print a register in readable format. For example, specifying c as '-', e as ';' and extent as 4 would produce output looking something like "10101010-1111111-00000000-11001100;" where each octet is expressed as a binary integer. The function is declared in memory.h and defined in binout.c. - -
    -
    - - checksum32 - - - - unint32_t checksum32 - const uint32_t memory [] - size_t extent - uint32_t checksum - - - - Return the 32 bit checksum of a memory region. The checksum is the one's complement of the XOR of all 32 bit words in the region. Argument extent is the region extent in 32 bit words. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate PIB and NVM files or compute new checksums when these files are created or modified. The function is declared in memory.h and defined in checksum32.c. - - - This function is similar to checksum_32 but is used exclusively by API functions. It may be deprecated at some point in the future. - -
    -
    - - checksum_32 - - - - unint32_t checksum_32 - void const * memory - size_t extent - uint32_t checksum - - - - Return the 32 bit checksum of a memory region. The checksum is the one's complement of the XOR of all 32 bit words in the region. The region extent is specified in bytes but it will be rounded down to the nearest multiple of 4 bytes. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate PIB and NVM files or compute new checksums when these files are created or modified. The function is declared in memory.h and defined in checksum_32.c. - - - This function is similar to function checksum32 however there is no need to cast memory to uint32_t and there is no need to round extent down to a multiple of 4 bytes before calling the function because both operations are performed internally. Also, there is no unecessary endian manipulation of the checksum. It is the prefered method of computing a checksum. - -
    -
    - - chrout - - - - void chrout - void const * memory - size_t extent - char c - char e - FILE * fp - - - - Print a memory region as a string of printable ASCII characters terminated by character e. Character c is printed in place of non-printable characters. The string is terminated by character e. Normally, character c is '.' but it could be any character value. Normally, character e is space or newline but it could be any charcter value. A typical use might be to print a memory region that may (or may not) contain an HFID or other printable text. The function is declared in memory.h and defined in chrout.c. - -
    -
    - - decout - - - - void decout - void const * memory - size_t extent - char c - char e - FILE * fp - - - - Print a memory region as a series of decimal octets separated by character c and terminated by character e. Normally, character c will be DEC_EXTENDER, defined in file number.h, but it could be any character value. Normally, character e will be a space or newline but it could be any character value. A typical use might be to print an IP address in readable format. For example, specifying c as '.', character e as '/' and extent as 4 would produce output looking something like "192.168.099.001/" where each octet is expressed as a decimal integer. The function is declared in memory.h and defined in decout.c. - -
    -
    - - endian - - - - void endian - void * memory - size_t extent - - - - Reverse the byte order of a memory region. It is a variable extent version of functions like __bswap_16, __bswap_32 and __bswap_64. The function is declared in memory.h and defined in endian.c. - -
    -
    - - fdchecksum32 - - - - unit32_t fdchecksum32 - int fd - size_t extent - unit32_t checksum - - - - Return the 32 bit checksum of a file region starting from the current file position. The checksum is the one's complement of the XOR or of all 32 bit words in the region. Argument extent must be specified in 32 bit words, not bytes. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate NVM files header by header or section by section. The function is declared in memory.h and defined in fdchecksum32.c. - -
    -
    - - fdchecksum_32 - - - - unit32_t fdchecksum_32 - int fd - size_t extent - unit32_t checksum - - - - Return the 32 bit checksum of a file region starting from the current file position. The checksum is the one's complement of the XOR or of all 32 bit words in the region. Argument extent is specified in bytes but is rounded down to the nearest multiple of 4 bytes. Argument checksum is the reference checksum. The function will return the computed checksum when referencechecksum is 0 and will return 0 if reference checksum equals the computed checksum. A typical use is to validate NVM files header by header or section by section. The function is declared in memory.h and defined in fdchecksum_32.c. - - - This function is similar to function fdchecksum32 but there is no need to round extent down to the nearest multiple of 4 bytes before calling the function because that is done internally. Also, there is no unecessary endian manuipulation of the checksum. - -
    -
    - - filepart - - - - char const * filepart - char const * pathname - - - - Return the address of the filename portion of a pathname string. The filename portion is everything after the rightmost path separator. If a path separator is not present then the address of the pathname string is returned. This function is similar to the POSIX basename function but it returns an empty string whenever the rightmost character is a path separator. The path separator can be either slash ('/') or backslash ('\\'). The function is declared in files.h and defined in filepart.c. - -
    -
    - - hexdecode - - - - signed hexdecode - void * memory - size_t extent - char const buffer [] - size_t extent - - - - Decode a memory region as a string of ASCII hexadecimal digits. Convert memory until the buffer or memory exhausts and return the string extent. Allow three (3) string characters for each memory byte to be decoded. The number of bytes decoded will be the lesser of argument extent divided by 3 or argument extent. The function is declared in memory.h and defined in hexdecode.c. - -
    -
    - - hexdump - - - - void hexdump - void const * memory - size_t offset - size_t extent - FILE * fp - - - - Print a full or partial memory region in hexadecimal format showing memory offsets, hexadecimal byte values and ASCII character values. Argument memory contains some memory region. Argument extent is the region extent. Argument offset is the starting display location. Locations memory [offset] up to memory [extent] are displayed, allowing a partial dump of the memory region. An offset of 0 will display the entire region. The function is declared in memory.h and defined in hexdump.c. - - - This function is similar to but different from function hexview . - -
    -
    - - hexencode - - - - signed hexencode - void * memory - size_t extent - char const * string - - - - Encode a memory region with the binary equivalent of an ASCII hexadecimal string. Return the number of bytes encoded or 0 on error. The value of errno is set to EINVAL if the number of bytes encoded is less than extent or the entire string cannot be converted due to illegal digits or excessive digits. Ignore optional HEX_EXTENDER characters separating octets in argument string. Constant HEX_EXTENDER is defined in file number.h. The function is declared in memory.h and defined in hexencode.c. - -
    -
    - - hexin - - - - ssize_t hexin - void const * memory - size_t extent - FILE * fp - - - - This function is similar to hexencode but it reads from file, instead of a string and ignores non-hexadecimal text and comments within the input stream. Incoming text is binary encoded and written to the specified memory region. The actual number of bytes encoded is returned or -1 on error. See the efsu man page for a thorough explanation of function behavior. The function is declared in memory.h and defined in hexin.c. - -
    -
    - - hexout - - - - void hexout - void const * memory - size_t extent - char c - char e - FILE * fp - - - - Print a memory region as a series of hexdecimal octets separated by character c and termianted by character e. Normally, character c will be HEX_EXTENDER, defined in file number.h, but it could be any character value. Normally, character e will be a space or newline but it could be any character value. A typical use might be to print a MAC or Ethernet address in readable format. For example, specifying c as ':', character e as ',' and extent as 6 would produce output looking something like "00:B0:52:DA:DA:01," where each octet is expressed as a hexadecimal integer. The function is declared in memory.h and defined in hexout.c. - -
    -
    - - hexstring - - - - char * hexstring - char buffer [] - size_t length - void const * memory - size_t extent - - - - Convert a memory region to a NUL terminated string and return the string address. This function is identical to function hexdecode but it return the string address instead of the number of characters decoded. The function is declared in memory.h and defined in hexstring.c. - -
    -
    - - hexview - - - - void hexview - void const * memory - size_t offset - size_t extent - FILE * fp - - - - Print a partial memory region in hexadecimal format showing memory offsets, hexadecimal byte values and ASCII character values. Argument memory contains part of a larger memory region, much like a file window. Argument extent is the window length. Argument offset is the relative offset of the window within the region. Locations memory [0] up to but excluding memory [extent] are displayed as a partial dump, providing a window into the region. The function is declared in memory.h and defined in hexview.c. - - This function is similar to but different from function hexdump. - -
    -
    - - memdecr - - - - signed memdecr - void * memory - size_t extent - - - - Decrement a multi-byte memory region. Return 0 on success or -1 if all bytes have decremented to 0x00. For example, { 0xFF, 0xFF, 0xFF } decrements to { 0xFF, 0xFF, 0xFE } and { 0xFF, 0x00, 0x00 } decrements to { 0xFE, 0xFF, 0xFF }. A typical use is to iterate through a range if IP or MAC address values. The function is declared in memory.h and defined in memdecr.c. - -
    -
    - - memincr - - - - signed memincr - void * memory - size_t extent - - - - Increment a multi-byte memory region. Return 0 on success or -1 once all bytes have been incremented to 0xFF. For example { 0x00, 0x00, 0x00 } increments to { 0x00, 0x00, 0x01 } and { 0x00, 0xFF, 0xFF } increments to { 0x01, 0x00, 0x00 }. A typical use is to iterate through a range of IP or MAC address values. The function is declared in memory.h and defined in memincr.c. - -
    -
    - - memout - - - - void memout - void const * memory - size_t extent - char const * format - unsigned group - signed c - FILE * fp - - - - Print a memory region as a series of octet groups wach separated by character c. The group argument specifies the number of octets per group. The format argument determines how each octet is displayed. Normally, character c will be one of BIN_EXTENDER, DEC_EXTENDER or HEX_EXTENDER as defined in file number.h, but it could be any character value. The function is declared in memory.h and defined in memout.c. - -
    -
    - - memswap - - - - void memswap - void * buffer1 - void * buffer2 - size_t length - - - - Exchange the contents of one buffer with that of another. No provision is made for buffer overlap. No value is returned. A typical use might be to exchange source and destination addresses in an ethernet packet. The function is declared in memory.h and defined in memswap.c. - -
    -
    - - strdecr - - - - signed strdecr - void * memory - size_t extent - byte min - byte max - - - - Decrement a multi-byte memory region using only ASCII character values in the range min through max. Return 0 on success or -1 once all characters have been decremented to the value of argument min. For example, if argument min is 'A' and argument max is 'Z' then { 'A', 'B', 'C' } decrements to { 'A', 'B', 'B' } and { 'B', 'Z', 'Z' } decrements to { 'A', 'A', 'A' }. A typical use is to generate a sequence of distinct character strings to seed encryption key functions. The function is declared in memory.h and defined in strdecr.c. - -
    -
    - - strfbits - - - - size_t strfbits - char const buffer [] - size_t length - char const * operands [] - char const * operator - unsigned flagword - - - - Encode a buffer with an enumerated list of the operands associated with the corresponding bits in flagword. separate enumerated operands with an operator string. For example, given char const *operands [] = { "loop", "wait", "busy" } and unsigned flagword = 0x05 then strfbits (buffer, length, operands, "|", flagword) would encode buffer with "loop|busy". Observe that each bit set in flagword appears in buffer as the corresponding string from operands. A typical application for this function is the enumeration of flagword states. The function is declared in format.h and defined in strfbits.c. - -
    -
    - - strincr - - - - signed strincr - void * memory - size_t extent - byte min - byte max - - - - Increment a multi-byte memory region using only ASCII character values in the range min through max. Return 0 on success or -1 once all characters have been incremented to the value of argument max. For example, if argument min is 'A' and argument max is 'Z' then { 'A', 'B', 'C' } increments to { 'A', 'B', 'D' } and { 'A', 'Z', 'Z' } increments to { 'B', 'A', 'A' }. A typical use is to generate a sequence of distinct character strings to seed encryption key functions. The function is declared in memory.h and defined in strincr.c. - -
    -
    - - todigit - - - - unsigned todigit - unsigned c - - - - Return the integer value of character c interpreted as digit in the base 36 number system. It is called by many encode functions to support number base conversion. If the value of c is '0' through '9' then integer 0 through 9 is returned. If the value of c is 'A' through 'Z' or 'a' through 'z' then integer 10 through 35 is returned. The function is declared in number.h and defined in todigit.c. - -
    -
    - - typename - - - - char const * typename - const struct _type_ list [] - size_t size - type_t type - char const * name - - - - Return the name associated with a message type by searching a list arranged in ascending order by message type. Return argument name as the function value if the message type is not present in the list. Data types struct _type_ and type_t are defined in file types.h. A typical use might be to return the name of message based on the message type. The function is declared in symbol.h and defined in typename.c. - -
    -
    diff --git a/docbook/support5.xml b/docbook/support5.xml deleted file mode 100644 index b0d2482a..00000000 --- a/docbook/support5.xml +++ /dev/null @@ -1,76 +0,0 @@ -
    - - Message Debug Functions - - - Message debug functions are not needed for proper toolkit operation but they can be useful during development, debugging and testing phases of product development. They are specific to HomePlug AV messages only. - -
    - - MMECode - - - - char const * MMECode - uint16_t MMTYPE - uint8_t MSTATUS - - - - Return text that explains the status code for a given Atheros vendor-specific management message. Argument MMTYPE is an unsigned integer in the range 0xA000 through 0xAFFF and must exactly match the MMTYPE of the message returning the status code. For example, the CNF variant of a message is currently the only variant that has an MSTATUS field and so other variants return a default string. The function is declared in mme.h and defined in MMECode.c. - - - Inclusion of this function can increase application size by 3kb because the text associated with all Atheros vendor-specific management messages and errors are included whether needed or not. Conditional compilation statements are provided internally to suppress the full table with a terse substitute. - - - Although the Bootloader and firmware share some common Vendor Specific Management Messages, the two programs may return different codes for a given message and error condition. Where there are conflicts, Bootloader codes take precedence over firmware codes because it is unlikely that users will .issue the same messages to a device running firmware. - -
    -
    - - MMEMode - - - - char const * MMEMode - uint16_t MMTYPE - - - - Return the mode of a given management message type as a string. The mode is determined by the two least significant bits of argument MMTYPE. The mode string will be one of REQ, CNF, IND or RSP. The function is declared in ihp.h and defined in MMEMode.c. - - - Most management messages have a request and a confirmation variant while a few have an indication and a response variant. Requests originate from the host and are acknolwedged by a confirmation from the device. Indications originate from a device and are acknowledged by a response from the host. - -
    -
    - - MMEName - - - - char const * MMEName - uint16_t MMTYPE - - - - Return the name associated with a given management message type. The name is the mnemonic used to distinguish one message type from another in the HomePlug AV Specification or Atheros Firwmare Technical Reference Manual. Argument MMTYPE is an unsigned integer in the range 0x0000 through 0xAFFF. The request, confirmation, indication and response variants of a management message will all return the same message name. The function is declared in mme.h and defined in MMEName.c. - -
    -
    - - MMEPeek - - - - void MMEPeek - void const * memory - size_t extent - FILE *fp - - - - Prints an Atheros vendor-specific management message to stream fp in human readable format. Argument buffer is the message address and argument extent is the message extent in bytes. Output consists of a formatted header showing decoded header. The function is declared in mme.h and defined in MMEPeek.c. - -
    -
    diff --git a/docbook/support6.xml b/docbook/support6.xml deleted file mode 100644 index 1a521052..00000000 --- a/docbook/support6.xml +++ /dev/null @@ -1,242 +0,0 @@ -
    - - Key Generation Functions - - - Atheros applications use the SHA256 algorithm to compute unique HomePlug AV keys, including the Device Access Key (DAK), Network Membership Key (NMK) and Network Identifier (NID). The SHA256 algorithm is seeded, salted and rehashed differently for each type of HomePlug AV key. A different function is used to compute each type of HomePlug AV key but all of them call the SHA256 functions. The SHA256 algorithm returns a 256 bit (32 byte) digest but only the upper 128 bits (16 bytes) are used for HomePlug AV keys. - - - - SHA256 Digest Computation - - - The following code example illustrates how to generate, rehash and print an SHA256 digest, or key, from a user-defined seed string and salt string. This logic is typical of that used to generate HomePlug AV compliant keys. See the HomePlug AV Specification for the specific rules used to generate each type of key. - - - -#include "../crypt/SHA256.h" - -#include "../crypt/SHA256Reset.c" -#include "../crypt/SHA256Block.c" -#include "../crypt/SHA256Write.c" -#include "../crypt/SHA256Fetch.c" - -struct sha256 sha256; -char * seed = "ForMeToKnowAndYouToFindOut"; -char * salt = "X$z@p"; -byte digest [SHA256_DIGEST_SIZE]; -int i; - -SHA256Reset (&sha256); -SHA256Write (&sha256, (byte *)(seed), strlen (seed)); -SHA256Write (&sha256, (byte *)(salt), strlen (salt)); -SHA256Fetch (&sha256, digest); - -for (i = 0; i < 999; i++) -{ - SHA256Reset (&sha256); - SHA256Write (&sha256, digest, sizeof (digest)); - SHA256Fetch (&sha256, digest); -} -for (i = 0; i < 16; i++) -{ - printf ("%02x", digest [i]); -} -printf ("\n"); -]]> - - Above, we declare struct sha256 and initialize it using function SHA256Reset. We then write a user-defined seed string (or password) followed by an optional salt string to the digest using function SHA256Write. The resulting digest (or key) is obtained by calling function SHA256Fetch. Constant SHA256_DIGEST_SIZE is defined in SHA256.h. Although the digest is probably secure enough at this point, we rehash it 999 times for good measure. We then print the first 16 bytes of the result because HomePlug AV keys are always 16 bytes long. - - -
    - - MACPasswords - - - - void MACPasswords - uint32_tvendor - uint32_tdevice - uint32_tnumber - unsigned count - unsigned bunch - unsigned space - flag_t flags - - - - Print a range of device addresses and user passwords on stdout. The calling application must split the starting device address into a three-byte OUI and three-byte device number and pass them as the unsigned 32-bit integers vendor and device, respectively. Argument device is the first device number in the range and number is the final device number. Argument count is the number of uppercase letters comprising a password. Passwords contain this many letters but the letters are grouped for easy reading. Letter groups are separated by hyphens. Argument bunch defines how many letters form each group. Argument space is the character used to separate groups of letters. Argument flags enables or disables function features such as insertion of a used flag for use by the Atheros Production Test System or the omission of the device address on output. The output of this function is similar to that produced by the DB Builder utility distributed with the PTS. This function is declared in keys.h and defined in MACPasswords.c. -
    -
    - - HPAVKeyDAK - - - - void HPAVKeyDAK - byte DAK [] - char const string - - - - Encode buffer DAK with the Device Access Key (DAK) derived from the NUL terminated string. The string is salted, hashed and re-hashed using the SHA256 algorithm. The DAK is always HPAVKEY_DAK_LEN bytes, defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyDAK.c. - -
    -
    - - HPAVKeyNMK - - - - void HPAVKeyNMK - byte digest [] - char const string - - - - Encode buffer NMK with the Network Membership Key (NMK) derived from the NUL terminated string. The string is salted, hashed and re-hashed using the SHA256 algorithm. The DAK is always HPAVKEY_NMK_LEN bytes, as defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyNMK.c. - -
    -
    - - HPAVKeyNID - - - - void HPAVKeyNID - byte NID [] - byte const NMK [] - signed level - - - - Encode buffer NID with the Network Identification Key (NID) derived from the 16-byte Network Membership Key (NMK). The NMK is hashed and re-hashed using the SHA256 algorithm then encoded with the security level. The NID is always HPAVKEY_NID_LEN bytes, as defined in HPAVKey.h, so no length argument is needed. See the HomePlug AV Specification for more information. This function is declared in HPAVKey.h and defined in HPAVKeyNID.c. - -
    -
    - - HPAVKeyOut - - - - void HPAVKeyOut - byte const digest [] - size_t length - char const * phrase - flag_t flags - - - - Decode and print up to length bytes from buffer digest on stdout. Print NUL terminated phrase on the same line following the digest when bit HPAVKEY_VERBOSE, defined in HPAVKey.h, is set in flags. This procedure prints keys and phrases in a standard column-oriented format that other applications can easily read and use. This function is declared in HPAVKey.h and defined in HPAVKeyOut.c. - -
    -
    - - SHA256Block - - - - void SHA256Block - struct sha256 * sha256 - void const * memory - - - - Merge 64 bytes of memory into the current SHA256 digest. This function performs the core computations required by the SHA256 algoithm. It is called by function SHA256Fetch and so there is no reason to call this function directly. The sha256 structure is defined in SHA256.h. The function is declared in SHA256.h and defined in SHA256Block.c. - -
    -
    - - SHA256Fetch - - - - void SHA256Fetch - struct sha256 * sha256 - byte digest [] - - - - Conclude SHA256 computation and transfer the result to the named 32-byte digest then flush the sha256 structure. The digest is always 32 bytes long regardless of the amount of information that has been written using function SHA256Write. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Fetch.c. - - - Once this function is called, the sha256 structure is purged for security reasons. You must call SHA256Reset again before starting another hash or subsequent calls to this function or SHA256Write will have unpredictable results. . - -
    -
    - - SHA256Ident - - - - void SHA256Ident - int fd - byte digest [] - - - - Compute the SHA256 digest from the content of a file. The digest serves as the file fingerprint and can be used to identify identical content despite filename changes. File descriptor fd is the subject file which must be positioned to the start befor calling this function. Buffer digest will be written with the computed 256-digest and must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Ident.c. - -
    -
    - - SHA256Match - - - - void SHA256Match - int fd - byte const digest [] - - - - Search a registry file for a known SHA256 digest. Return true on success or false on failure. File descriptor fd is the registry file which must be positioned to the start before calling this function. Buffer digest contains the known 256-bit digest and must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h. A registry file consists of 64-digit hexadecimal strings that represent SHA256 digest values. Optional text may be appear between the digest and newline to document digest significance. This function ignores such text. This function is declared in SHA256.h and defined in SHA256Match.c. - -
    -
    - - SHA256Print - - - - void SHA256Print - byte const digest [] - char const * string - - - - Print an SHA256 digest and optional string on stdout. Buffer digest must be SHA256_DIGEST_SIZE bytes long, as defined in SHA256.h, which results in 64 hexadecimal digits on output. Variable length string is NUL terminated but may be NULL. If string is not NULL and is not empty then a space is inserted between the digest and the string on output. This function may be used to print SHA256 digests and optional strings in standard format, such as a registry file. This function is declared in SHA256.h and defined in SHA256Print.c. - -
    -
    - - SHA256Reset - - - - void SHA256Reset - struct sha256 * sha256 - - - - Initialize a sha256 structure before computing a new SHA256 digest. This function should be called once before calling SHA256Write for the first time for a given digest. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Reset.c. - -
    -
    - - SHA256Write - - - - void SHA256Write - struct sha256 * sha256 - void const * memory - size_t extent - - - - Writes a region of memory to the current SHA256 digest contained in an sha256 structure. An application may call this function any number of times to concatinate multiple memory regions before fetching the digest with function SHA256Fetch. The sha256 structure is defined in SHA256.h. This function is declared in SHA256.h and defined in SHA256Write.c. - -
    -
    diff --git a/docbook/support7.xml b/docbook/support7.xml deleted file mode 100644 index 3187e4fd..00000000 --- a/docbook/support7.xml +++ /dev/null @@ -1,307 +0,0 @@ -
    - - XML Editing Functions - - - Atheros provides support for remote PIB management using XML instruction files. The concept is based on an XML schema that defines the elements and attributes needed to edit a PIB file. The schema is located in file piboffset.xsd. In practice, this schema could be used to edit any buffer containing data but we are only interested in editing PIB files here. - - - Users may create XML files that conform to the schema and specify the PIB objects they want to change and how they want each to change. In brief, the files specify an offset, a data length and a data value. A data value has type dataString, dataHex or dataByte and may be a single data item or an array of data items. Each XML file should include a reference to the Atheros schema and be submitted to a validating XML parser, such as Internet Explorer or Firefox, to ensure that file structure and syntax are correct before use. An example XML file can be seen in piboffset.xml. - - - Editing involves the following steps. An example of these steps can be seen in the pxe program source code and in function RdModWrPib2.c which is a component of the int6k2 program. - - - - Obtain a copy of the PIB to be edited. This can be done by opening a PIB file and reading the entire file into memory or by requesting the PIB directly from an active Atheros powerline device. The PIB length can be determined from the PIB header. - - - - - Open the XML file, generate an XML parse tree and close the file. This can be done by passing the filename to function xmlopen. It will perform all these steps and return the parse tree root node. - - - - - Modify the PIB based to instructions stored in the parse tree. This is done by passing the parse tree, PIB buffer and PIB length to function xmledit. It will traverse the parse tree and apply changes to the buffer as defined in the parse tree. - - - - - Discard the parse tree. This can be done by passing the parse tree to function xmlfree. - - - - - Compute a new PIB checksum. This can be done by clearing the PIB checksum then passing the PIB buffer and PIB length to function checksum32 with a checksum value of 0. - - - - - Write the PIB to file or transmit it over the network to an Atheros powerline device. - - - - -
    - - xmledit - - - - signed xmledit - struct node * node - void *memory - unsigned extent - - - - Write data into memory based on the data offset and length defined in XML parse tree, node. This function will not apply modifications having malformed structure or having an invalid or illegal offset, length or data value. Use function xmlschema to print the current schema. The function is declared in node.h and defined in xmledit.c. The node structure is defined in node.h. - -
    -
    - - xmlfree - - - - void xmlfree - struct node * node - - - - Release memory associated with an XML parse tree. The function is declared in node.h and defined in xmlfree.c. The node structure is defined in node.h. - - - The text member if the parse tree root node points to memory allocated by xmlscan to store the original XML string. The application must either deallocate that memory before calling this function or store the text address and deallocate that memory after calling this function; otherwise, memory leaks will result. - -
    -
    - - xmlnode - - - - struct node *xmlnode - struct node *node - - - - Create an empty node blow the specified node and return a pointer to it. A typical application can be seen in function xmlscan.c. The function is declared in node.h and defined in xmlnode.c. The node structure is defined in node.h. - -
    -
    - - xmlopen - - - - struct node * xmlopen - char const * filename - - - - Open the named XML file, parse it and return the XML parse tree. The parse tree contains, among other things, all XML elements, attributes and values specified in the file. The function is declared in node.h and defined in xmlopen.c. The node structure is defined in node.h. - - - The returned parse tree is ready to traverse using struct node members above, below, prior and after. Each node has a line, type and test member. This function calls function xmlscan to parse the file and generate the tree. The parse tree can be inspected by passing the root node to function xmltree. - -
    -
    - - xmlscan - - - - signed xmlscan - struct node * node - - - - Scan the XML string attached to the specified node and create a parse tree below it. Return 0 if parsing is successrul or -1 if not. The function is declared in node.h and defined in xmlscan.c. The node structure is defined in node.h. - - - The application must point the text member to a copy of the XML string before calling this function because parsing is destructive and requires write access to the string. The application can search and manipulate the tree on return. The application should deallocate string memory before calling xmlfree. - - - - XML Source File - - - The following is sample input to function xmlscan. The element and attribute names shown are for illustration and were selected to that they can be easily identified in the output. The parse tree from this file can be seen in the example for function xmltree. - - - - - - 1234567890 - - - The quick brown fox jumped over the lazy dog. - - - - - - - The quick brown - fox jumped over - the lazy dog. - - - - - - - value2 - - - -]]> - -
    -
    - - xmlschema - - - - void xmlschema - - - - - Print an XML schema that supports function xmledit on stdout. This function has no argument. The schema produced by this function is guaranteed to support the parse logic implemented by function xmledit. Scheme element names are defined as constants in node.h so that they can be referenced by applications that create their own XML edit instructions. The function is declared in node.h and defined in xmlschema.c. - - - The text member in the parse tree root node points to memory allocated by xmlscan to store the original XML string. The application must either deallocate that memory before calling this function or store the text address and deallocate that memory after calling this function; otherwise, memory leaks will result. - - - - XML Edit Schema - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]> - - The schema shown above was produced by function xmlschema. It is should be used to validate XML edit instructions before submitting them to program pxe. - - -
    -
    - - xmltree - - - - void xmltree - struct node * node - - - - Print the XML parse tree on stdout. The function is declared in node.h and defined in xmltree.c. - - - - XML Parse Tree - - - The following is sample output from function xmltree. The XML source is shown in the example for function xmlscan . The numbers appearing down the left margin indicate the input line number from the XML source file parsed by function xmlscan . The character codes indicate the node type and are defined in node.h. The node structure is defined in node.h. - -] [1234567890] -006 [/] [attribute] -007 [<] [attribute] -007 [ ] [name] -007 [=] [Attribute2] -008 [>] [The quick brown fox jumped over the lazy dog.] -009 [/] [attribute] -010 [/] [element] -011 [<] [element] -011 [ ] [name] -011 [=] [Element2] -012 [<] [attribute] -012 [ ] [name] -012 [=] [Attribute1] -013 [/] [attribute] -014 [<] [attribute] -014 [ ] [name] -014 [=] [Attribute2] -015 [>] [The quick brown fox jumped over the lazy dog.azy] -018 [/] [attribute] -019 [/] [element] -020 [!] [-- comments can go anywhere --] -021 [<] [element] -021 [ ] [name] -021 [=] [Element2] -022 [<] [attribute] -022 [ ] [name] -022 [=] [Attribute1] -023 [<] [attribute] -023 [ ] [name] -023 [=] [Attribute2] -024 [>] [value2] -025 [/] [attribute] -026 [/] [element] -027 [/] [xmlfile] -]]> - -
    -
    diff --git a/docbook/support8.xml b/docbook/support8.xml deleted file mode 100644 index de75a405..00000000 --- a/docbook/support8.xml +++ /dev/null @@ -1,53 +0,0 @@ -
    - - Download Functions - - - Download function write applets, parameters and runtime firmware to device SDRAM or NVRAM. - -
    - - WriteExecuteApplet - - - - signed WriteExecuteApplet - struct plc * plc - void const * header - - - - Write an NVM image directly into SDRAM using VS_WRITE_AND_EXECUTE messages. This function calls either WriteExecuteApplet1 or WriteExecuteApplet2 based on the NVM header version. The function is declared in plc.h and defined in WriteExecuteApplet.c. The plc structure is defined in plc.h. - -
    -
    - - WriteExecuteApplet1 - - - - signed WriteExecuteApplet1 - struct plc * plc - struct nvm_header1 * header - - - - Write an NVM image directly into SDRAM using VS_WRITE_AND_EXECUTE messages. This function is similar to WriteExecuteApplet2 but expects a structure nvm_header1 pointer instead of a structure nvm_header2 pointer. The function is declared in plc.h and defined in WriteExecuteApplet.c. Structure plc is defined in file plc.h. Structure nvm_header1 is defined in file nvm.h. - -
    -
    - - WriteExecuteApplet2 - - - - signed WriteExecuteApplet2 - struct plc * plc - struct nvm_header2 * header - - - - Write an NVM image directly into SDRAM using VS_WRITE_AND_EXECUTE messages. This function is similar to WriteExecuteApplet1 but expects a structure nvm_header2 pointer instead of a structure nvm_header1 pointer. The function is declared in plc.h and defined in WriteExecuteApplet.c. Structure plc is defined in file plc.h. Structure nvm_header1 is defined in file nvm.h. - -
    -
    diff --git a/docbook/support9.xml b/docbook/support9.xml deleted file mode 100644 index 9604a2ce..00000000 --- a/docbook/support9.xml +++ /dev/null @@ -1,80 +0,0 @@ -
    - - Procrastination Functions - - - Procrastinations functions wait for specific events to occur or fail to occur. - -
    - - WaitForAssoc - - - - signed WaitForAssoc - struct plc * plc - - - - Poll a powerline device using VS_NW_INFO messages until the device forms or joins a network. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. It calls either WaitForAssoc1 or WaitForAssoc2 to procrastinate based on the hardwareID member of structure plc. The function is declared in plc.h and defined in file WaitForAssoc.c. Struct plc is declared in file plc.h and defined in file plc.c. - -
    -
    - - WaitForAssoc1 - - - - signed WaitForAssoc1 - struct plc * plc - - - - Poll a 200mbs powerline device using VS_NW_INFO version 0 messages until the device joins or forms a network. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. The function is declared in file plc.h and defined in file WaitForAssoc1.c. Struct plc is declared in file plc.h and defined in file plc.c. - -
    -
    - - WaitForAssoc2 - - - - signed WaitForAssoc2 - struct plc * plc - - - - Poll a 1000mbs powerline device using VS_NW_INFO version 1 messages until the device joins or forms a network. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in file plc.h and defined in file WaitForAssoc2.c. - -
    -
    - - WaitForReset - - - - signed WaitForReset - struct plc * plc - - - - Poll a powerline device using VS_SW_VER messages until the device stops responding. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. Structure plc is declared in file plc.h and define in file plc.c. The function is declared in plc.h and defined in file WaitForReset.c. - -
    -
    - - WaitForStart - - - - signed WaitForStart - struct plc * plc - char firmware - size_t length - - - - Poll a powerline device using VS_SW_VER messages until the device responds. The host ethernet interface, destination hardware address and source hardware address are specified in structure plc. Update the hardwareID member of the plc structure. Return the firmware revision string contained in the confirmation message. Structure plc is declared in file plc.h and defined in file plc.c. The function is declared in file plc.h and defined in file WaitForStart.c. - -
    -
    diff --git a/docbook/symbol.h.html b/docbook/symbol.h.html deleted file mode 100644 index 66170f5c..00000000 --- a/docbook/symbol.h.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - symbol.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   symbol.h - symbol table definitions and declarations;
    - *
    - *   this file is a subset of the original with some additions not in
    - *   the original;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SYMBOL_HEADER
    -#define SYMBOL_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/types.h"
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -char const * synonym (char const * term, const struct _term_ list [], size_t size);
    -void assist (char const * name, char const * type, const struct _code_ list [], size_t size);
    -signed lookup (char const * name, struct _code_ const list [], size_t size);
    -char const * reword (code_t code, struct _code_ const list [], size_t size);
    -void expect (const struct _code_ list [], size_t size, FILE *);
    -char const * typename (struct _type_ const list [], size_t size, type_t type, char const * name);
    -char const * codename (struct _code_ const list [], size_t size, code_t code, char const * name);
    -void codelist (const struct _code_ list [], size_t size, char const * comma, char const * quote, FILE *);
    -void typelist (const struct _type_ list [], size_t size, char const * comma, char const * quote, FILE *);
    -void termlist (const struct _term_ list [], size_t size, char const * comma, char const * quote, FILE *);
    -signed getargv (signed argc, char const * argv []);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/synonym.c.html b/docbook/synonym.c.html deleted file mode 100644 index 63658195..00000000 --- a/docbook/synonym.c.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - synonym.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   char const * synonym (char const * term, const struct _term_ list [], size_t size);
    - *
    - *   symbol.h
    - *
    - *   lookup term and return corresponding text; return the original
    - *   term if lookup fails; the list must be in lexographic order by
    - *   term or lookups may fail; struct _term_ is defined in types.h;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef SYNONYM_SOURCE
    -#define SYNONYM_SOURCE
    -
    -#include <string.h>
    -
    -#include "../tools/types.h"
    -
    -char const * synonym (char const * term, const struct _term_ list [], size_t size)
    -
    -{
    -	size_t lower = 0;
    -	size_t upper = size;
    -	while (lower < upper)
    -	{
    -		size_t index = (lower + upper) >> 1;
    -		signed order = strcmp (term, list [index].term);
    -		if (order < 0)
    -		{
    -			upper = index - 0;
    -			continue;
    -		}
    -		if (order > 0)
    -		{
    -			lower = index + 1;
    -			continue;
    -		}
    -		return (list [index].text);
    -	}
    -	return (term);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/synop.xsl b/docbook/synop.xsl deleted file mode 100644 index 71aaaee2..00000000 --- a/docbook/synop.xsl +++ /dev/null @@ -1,1322 +0,0 @@ - - -]> - - - - - - - - - - - -
    -

    - - -

    -
    -
    - - -
    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - - - - - - -  ( - - ) - -   - - - - - - - - - - - - -

    - -  ( - - ) - - - -

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

    - - -
    - -
    -

    -
    - - - - -  ( - - - - - - - - - - - - - - - - ); - - - ...); - - - - - - - , - - - ); - - - - - - - - - - - - - - - - - - -
    - - ; -
    - - - - - - - - - - - - - - - - - - - - - - -
    - -
     
    - - - - padding-bottom: 1em - - -
    -
    -
    - - - - -  ( - - - - - - - - - - - - - - - - ); -   - - - - ...); -   - - - - - - - - , - - - ); - - - -   - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - -   - - - - - ; - - - - - - - - - - - - - - - - - - - - -  ( - ); - - - - - - -

    -
    - - - - -  ( - - - - - - - - - - - - - - - - void); - - - - ...); - - - - - - - , - - - ); - - - - - - - - - - - - - - - - - - -  () - - - - - - - - - padding-bottom: 1em - - - - - - - - - - - -
     
    -
    - - -  ( - - - - - - - - - - - - - - - void); -   - - - - ...); -   - - - - - - - - - -   - - - - - - - - - - - - -   - - - - - - - , - - - ); - - - - - - - - - - - - - - - - - - - -  () - - - - -java - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Unrecognized language on - - : - - - - - - - - - - - -
    -
    -
    - - - - - -
    -    
    -    
    -       extends
    -      
    -      
    -        
    -      -
    -
    - - implements - - -
    -      -
    -
    - - throws - - -  { -
    - - } -
    -
    - - - - - - - - - , - - - - - - - - - - - - - -   - - - - - - , - - - - - - - - - , - - - - - - - - - , - - - - - - - - - -    - - - ; - - - - - - - -   - - - - - - -   - - - - - - - - - - - - - void  - - - - - - - - - - - 0 - - , -
    - - -   - - - -
    - - - -
    - - - - - - - - - - - - -    - - - - - - - - - - - - - -  ( - - - - ) - -
    -     throws  - -
    - ; -
    - -
    - - - - -
    -    
    -    
    -      : 
    -      
    -      
    -        
    -      -
    -
    - - implements - - -
    -      -
    -
    - - throws - - -  { -
    - - } -
    -
    - - - - - - - - , - - - - - - - - - -   - - - - - - , - - - - - - - - - , - - - - - - - - - , - - - - - - - - - -    - - - ; - - - - - - - -   - - - - - - -   - - - - - - - - - - - - - void  - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -  ( - - ) - -
    -     throws  - -
    - ; -
    - -
    - - - - -
    -    interface 
    -    
    -    
    -      : 
    -      
    -      
    -        
    -      -
    -
    - - implements - - -
    -      -
    -
    - - throws - - -  { -
    - - } -
    -
    - - - - - - - - , - - - - - - - - - -   - - - - - - , - - - - - - - - - , - - - - - - - - - , - - - - - - - - - -    - - - ; - - - - - - - -   - - - - - - -   - - - - - - - - - - - - - void  - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -  ( - - ) - -
    -     raises( - - ) -
    - ; -
    - -
    - - - - -
    -    package 
    -    
    -    ;
    -    
    - - - @ISA = ( - - ); -
    -
    - - -
    -
    - - - - - - - - , - - - - - - - - - -   - - - - - - , - - - - - - - - - , - - - - - - - - - , - - - - - - - - - -    - - - ; - - - - - - - -   - - - - - - -   - - - - - - - - - - - - - void  - - - - - - - - - - - - , - - - - - - - - - - - - - - - - - - sub - - - { ... }; - - - - - - -
    diff --git a/docbook/termlist.c.html b/docbook/termlist.c.html deleted file mode 100644 index f0652de1..00000000 --- a/docbook/termlist.c.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - termlist.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void termlist (struct _term_ const list [], size_t size, char const * comma, FILE * fp);
    - *
    - *   symbol.h
    - *
    - *   print a list of term names on the specified output stream;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TERMLIST_SOURCE
    -#define TERMLIST_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../tools/symbol.h"
    -
    -void termlist (struct _term_ const list [], size_t size, char const * comma, char const * quote, FILE * fp)
    -
    -{
    -	struct _term_ const * item = list;
    -	if (list) while ((size_t)(item - list) < size)
    -	{
    -		if (item > list)
    -		{
    -			fputs (comma, fp);
    -		}
    -		if ((quote) && (*quote))
    -		{
    -			fputc (uote++, fp);
    -		}
    -		fputs (item->name, fp);
    -		if ((quote) && (*quote))
    -		{
    -			fputc (uote++, fp);
    -		}
    -		item++;
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/time.h.html b/docbook/time.h.html deleted file mode 100644 index 6dced599..00000000 --- a/docbook/time.h.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - time.h - - - - - - - - - -
    -/*====================================================================*
    - *   
    - *   Copyright (c) 2011 by Qualcomm Atheros.
    - *   
    - *   Permission to use, copy, modify, and/or distribute this software 
    - *   for any purpose with or without fee is hereby granted, provided 
    - *   that the above copyright notice and this permission notice appear 
    - *   in all copies.
    - *   
    - *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
    - *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
    - *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
    - *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
    - *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
    - *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
    - *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    - *   
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TIME_HEADER
    -#define TIME_HEADER
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
    -#	define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
    -#else
    -#	define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
    -#endif
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -struct timezone 
    -
    -{
    -
    -/* minutes W of Greenwich */
    -
    -	int tz_minuteswest;
    -
    -/* type of dst correction */
    -
    -	int tz_dsttime;
    -};
    -
    -int gettimeofday (struct timeval *, struct timezone *);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/timer.h.html b/docbook/timer.h.html deleted file mode 100644 index 95b52f3d..00000000 --- a/docbook/timer.h.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - timer.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   timer.h - custom data type definitions and declarations;
    - *
    - *   this file is a subset of the original that includes only those
    - *   definitions and declaration needed for toolkit programs;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TIMER_HEADER
    -#define TIMER_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#ifdef WIN32
    -#define SLEEP(n) Sleep(n)
    -#else
    -#define SLEEP(n) usleep((n)*1000)
    -#endif
    -
    -/*====================================================================*
    - *   macros;
    - *--------------------------------------------------------------------*/
    -
    -#define MILLISECONDS(start,timer) ((((timer).tv_sec - (start).tv_sec) * 1000) + ((timer).tv_usec - (start).tv_usec) / 1000)
    -#define SECONDS(start,timer) (MILLISECONDS(start,timer) / 1000)
    -
    -/*====================================================================*
    - *   end definitions and declarations;
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/tlv.h.html b/docbook/tlv.h.html deleted file mode 100644 index 68a8d436..00000000 --- a/docbook/tlv.h.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - tlv.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   tlv.h - nvm file format definitions and declarations;
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TLV_HEADER
    -#define TLV_HEADER
    -
    -/*====================================================================*
    - *   macros;
    - *--------------------------------------------------------------------*/
    -
    -#define TLVSPAN(node) (sizeof(*(node))-sizeof((node)->data)+ LE32TOH((node)->size)) 
    -#define TLVDUMP(node) hexdump(&(node)->data,0,(node)->size,stderr) 
    -
    -/*====================================================================*
    - *   variables;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __GNUC__
    -#pragma pack (push,1)
    -#endif
    -
    -typedef struct __packed TLVNode
    -
    -{
    -	uint32_t type;
    -	uint32_t size;
    -	uint32_t data;
    -}
    -
    -TLVNode;
    -
    -#ifndef __GNUC__
    -#pragma pack (pop)
    -#endif
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/todigit.c.html b/docbook/todigit.c.html deleted file mode 100644 index 6636e510..00000000 --- a/docbook/todigit.c.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - todigit.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   unsigned todigit (unsigned c);
    - *
    - *   number.h
    - *
    - *   return the unsigned integer equivalent of an ASCII digit or the
    - *   value UCHAR_MAX on error;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TODIGIT_SOURCE
    -#define TODIGIT_SOURCE
    -
    -#include <limits.h>
    -
    -#include "../tools/number.h"
    -
    -unsigned todigit (unsigned c)
    -
    -{
    -	if ((c >= '0') && (c <= '9'))
    -	{
    -		return (c - '0');
    -	}
    -	if ((c >= 'A') && (c <= 'Z'))
    -	{
    -		return (c - 'A' + 10);
    -	}
    -	if ((c >= 'a') && (c <= 'z'))
    -	{
    -		return (c - 'a' + 10);
    -	}
    -	return (UCHAR_MAX);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/toolkit.css b/docbook/toolkit.css deleted file mode 100644 index 43e62de7..00000000 --- a/docbook/toolkit.css +++ /dev/null @@ -1,721 +0,0 @@ - -.alert - -{ - color: #0000ff; - font: normal 10pt courier; -} - -.error - -{ - color: #ff0000; - font: normal 10pt courier; -} - -.small - -{ - font: normal 8pt verdana; -} - -.title - -{ - font: bold italic 10pt verdana; -} - -.typewriter - -{ - font: normal 10pt courier; - color: black; -} - -a.index - -{ - text-decoration: none; -} - - -a:active - -{ -} - -a:hover - -{ -} - -a:link - -{ -} - -a:visited - -{ -} - -abbr - -{ - font: italic bold 10pt verdana; -} - -acronym - -{ - font: italic 10pt verdana; -} - -body - -{ - background: white; - margin: 10px 20px 10px 20px; - font: normal 10pt courier; -} - -body.admin - -{ -} - -body.company - -{ -} - -body.contact - -{ -} - -body.document - -{ -} - -body.engineer - -{ -} - -body.event - -{ -} - -body.faedb - -{ -} - -body.product - -{ -} - -body.unit - -{ -} - -br - -{ - clear: both; -} - -cite - -{ - font: italic 10pt verdana; -} - -code - -{ - font: normal 10pt courier; -} - -dd - -{ - margin: 05px 00px 05px 50px; -} - -del - -{ - background-color: lime; -} - -dfn - -{ - font: italic bold 10pt verdana; -} - -div.button - -{ - margin: 10px 00px 00px 00px; -} - -div.failure - -{ - margin: 100px 0px; - text-align: center; - font: bold 18pt verdana; - color: red; -} - -div.footer - -{ - font: normal 7pt verdana; - margin: 20px 30px 20px 30px; - text-align: center; -} - -div.footerlinks - -{ - font: normal 7pt verdana; - margin: 20px 30px 20px 30px; - text-align: right; -} - -div.header - -{ - text-align: center; -} - -div.headerlinks - -{ - font: normal 7pt verdana; - margin: 00px 00px 00px 00px; - text-align: left; -} - -div.notice - -{ - background: silver; - border: solid 1px #800000; - font: normal 10pt courier; - margin: 20px 30px 20px 30px; - padding: 10px; -} - -div.problem - -{ - margin: 100px 0px; - text-align: center; - font: bold 18pt verdana; - color: green; -} - -div.source - -{ - background: silver; - border: solid 1px #000000; - font: normal 10pt courier; - margin: 20px 30px 20px 30px; - padding: 10px; -} - -dt - -{ - margin: 10px 00px 05px 00px; - font: bold 10pt verdana; - color: Blue; -} - -em - -{ - font: italic bold 10pt verdana; -} - -h1 - -{ - color: maroon; - font: bold 10pt verdana; - text-align: center; -} - -h2 - -{ - color: maroon; - font: bold 10pt verdana; - text-align: left; -} - -h3 - -{ - color: navy; - font: italic bold 10pt verdana; - text-align: left; -} - -h4 - -{ - color: navy; - font: bold 10pt verdana; - text-align: center; -} - -h5 - -{ - color: maroon; - font: bold 10pt verdana; - text-align: left; -} - -h6 - -{ - color: maroon; - font: italic bold 10pt verdana; - text-align: left; -} - -hr - -{ - color: #000080; - text-align: center; - width: 65%; -} - -img.paragraph - -{ - float: left; - margin: 3px 8px 0px 0px; -} - -input.date - -{ - width: 100%; -} - -input.half - -{ - width: 050%; -} - -input.identity - -{ - width: 180px; -} - -input.mailbox - -{ - width: 180px; -} - -input.password - -{ - width: 180px; -} - -input.text - -{ - width: 100%; -} - -input.username - -{ - width: 180px; -} - -ins - -{ - background-color: yellow; -} - -li.index - -{ - color: black; - padding: 00px 00px 00px 05px; -} - -li.paragraph - -{ - padding: 05px 00px 05px 00px; -} - -li.point - -{ - color: black; - list-style: outside; - padding: 05px 00px 05px 05px; -} - -li.tight - -{ - color: black; - list-style: outside; - padding: 00px 00px 00px 05px; -} - -ol - -{ - font: normal 10pt verdana; -} - -option - -{ - color: blue; - font: normal 10pt courier; -} - -pre - -{ - font: normal 10pt courier; -} - -pre.notice - -{ - background: #c0c0c0; - border: solid 1px #800000; - color: #800000; - font: normal 10pt courier; - margin: 20px 00px 20px 00px; - padding: 10px; -} - -pre.sample - -{ - background: #c0c0c0; - border: solid 1px #000080; - border: none; - color: #000080; - font: normal 10pt courier; - margin: 20px 00px 20px 00px; - padding: 10px; -} - -pre.screen - -{ - background: #000000; - border: solid 1px #800000; - border: none; - color: #00ff00; - font: normal 10pt courier; - margin: 20px 00px 20px 00px; - padding: 10px; -} - -pre.source - -{ - background: #c0c0c0; - border: solid 1px #000080; - border: none; - color: #000000; - font: normal 10pt courier; - margin: 20px 00px 20px 00px; - padding: 10px; -} - -samp - -{ - font: normal 10pt courier; -} - -select.menubar - -{ - color: maroon; - width: 100%; -} - -select.text - -{ - width: 100%; -} - -strong - -{ - font: italic bold 10pt verdana; -} - -table - -{ - table-layout: fixed; - background: white; - border-collapse: separate; - border-spacing: 1px; - font: normal 10pt monospace; - width: 100%; -} - -table.box - -{ - border: solid 1pt black; -} - -table.input - -{ - background: inherit; - border: solid 1pt navy; - border-collapse: separate; - border-spacing: 0px; - font: normal 10pt verdana; - margin: 5px 0px; - padding: 5px; - table-layout: fixed; - width: 100%; -} - -table.login - -{ - table-layout: fixed; - background: transparent; - border: solid 1pt navy; - border-collapse: separate; - border-spacing: 1px; - font: normal 10pt verdana; - color: maroon; - margin: 10px; - padding: 5px; - width: 360px; -} - -td - -{ - background: inherit; - padding: 2px 5px; - text-align: left; - vertical-align: top; -} - -td.box - -{ - border: solid 1pt silver; -} - -td.dark - -{ - background: #f0f0f0; -} - -td.form - -{ - padding: 02px 10px; -} - -td.label - -{ - color: maroon; - width: 25%; -} - -td.lite - -{ - background: #f0f0f0; -} - -td.map - -{ - text-align: center; - vertical-align: middle; -} - -td.task - -{ - text-align: center; - vertical-align: middle; -} - -td.value - -{ -} - -textarea.note - -{ - width: 100%; - height: 100px; -} - -th - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: middle; - padding: 2px 5px; -} - -th.box - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: middle; -} - -th.call - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: 150px; -} - -th.code - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: 150px; -} - -th.date - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: 100px; -} - -th.link - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: 070px; -} - -th.name - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: auto; -} - -th.serial - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: 075px; -} - -th.time - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: 150px; -} - -th.type - -{ - border: solid 1pt silver; - text-align: center; - vertical-align: top; - width: 060px; -} - -td.include { background: #FFFF00; } -td.exclude { background: #FFFFFF; } -tr - -{ - background: inherit; - vertical-align: top; -} - -tt - -{ - font: normal 10pt courier; -} - -ul - -{ - font: normal 10pt verdana; -} - -ul - -{ - list-style-type: square; -} - -ul.check - -{ - font: normal 10pt verdana; -} - -var - -{ - font: italic bold 10pt verdana; -} - diff --git a/docbook/toolkit.html b/docbook/toolkit.html deleted file mode 100644 index 3ddec435..00000000 --- a/docbook/toolkit.html +++ /dev/null @@ -1,2028 +0,0 @@ - - - - - Qualcomm Atheros Open Powerline Toolkit - - - - - -

    - Qualcomm Atheros Open Powerline Toolkit -

    -

    The following is an alphabetical index of the manual pages, header files, source files, scripts and applets that comprise the Qualcomm Atheros Open Powerline Toolkit. It is provided for those who do not have access to on-line manual pages or want to browse through the software.

    -

    - Manual Pages -

    - - - - - - - -
    -
      -
    1. - ampboot.1 -
    2. -
    3. - amphost.1 -
    4. -
    5. - ampID.1 -
    6. -
    7. - amplist.1 -
    8. -
    9. - amprate.1 -
    10. -
    11. - amprule.1 -
    12. -
    13. - ampstat.1 -
    14. -
    15. - amptest.1 -
    16. -
    17. - amptone.1 -
    18. -
    19. - amptool.1 -
    20. -
    21. - ampwait.1 -
    22. -
    23. - chknvm.1 -
    24. -
    25. - chknvm2.1 -
    26. -
    27. - chkpib.1 -
    28. -
    29. - chkpib2.1 -
    30. -
    31. - CMEncrypt.1 -
    32. -
    33. - config2cfg.1 -
    34. -
    35. - coqos_add.1 -
    36. -
    37. - coqos_info.1 -
    38. -
    39. - coqos_man.1 -
    40. -
    41. - coqos_mod.1 -
    42. -
    43. - coqos_rel.1 -
    44. -
    45. - edru.1 -
    46. -
    47. - edsu.1 -
    48. -
    49. - efbu.1 -
    50. -
    51. - efeu.1 -
    52. -
    53. - efru.1 -
    54. -
    55. - efsu.1 -
    56. -
    -
    -
      -
    1. - evse.1 -
    2. -
    3. - getpib.1 -
    4. -
    5. - hpav.1 -
    6. -
    7. - hpavkey.1 -
    8. -
    9. - hpavkeys.1 -
    10. -
    11. - int64host.1 -
    12. -
    13. - int6k.1 -
    14. -
    15. - int6kbaud.1 -
    16. -
    17. - int6kboot.1 -
    18. -
    19. - int6kdetect.1 -
    20. -
    21. - int6keth.1 -
    22. -
    23. - int6kf.1 -
    24. -
    25. - int6khost.1 -
    26. -
    27. - int6kid.1 -
    28. -
    29. - int6klist.1 -
    30. -
    31. - int6klog.1 -
    32. -
    33. - int6kmdio.1 -
    34. -
    35. - int6kmdio2.1 -
    36. -
    37. - int6kmod.1 -
    38. -
    39. - int6krate.1 -
    40. -
    41. - int6krule.1 -
    42. -
    43. - int6kstat.1 -
    44. -
    45. - int6ktest.1 -
    46. -
    47. - int6ktone.1 -
    48. -
    49. - int6kuart.1 -
    50. -
    51. - int6kwait.1 -
    52. -
    53. - mac2pw.1 -
    54. -
    55. - mac2pwd.1 -
    56. -
    -
    -
      -
    1. - mdioblock.1 -
    2. -
    3. - mdioblock2.1 -
    4. -
    5. - mdiodump.1 -
    6. -
    7. - mdustats.1 -
    8. -
    9. - mme.1 -
    10. -
    11. - modpib.1 -
    12. -
    13. - nics.1 -
    14. -
    15. - nvmmerge.1 -
    16. -
    17. - nvmsplit.1 -
    18. -
    19. - pcapdevs.1 -
    20. -
    21. - pev.1 -
    22. -
    23. - pib2xml.1 -
    24. -
    25. - pibcomp.1 -
    26. -
    27. - pibdump.1 -
    28. -
    29. - pibruin.1 -
    30. -
    31. - pibrump.1 -
    32. -
    33. - plc.1 -
    34. -
    35. - plcboot.1 -
    36. -
    37. - plcdevs.1 -
    38. -
    39. - plcfwd.1 -
    40. -
    41. - plcget.1 -
    42. -
    43. - plchost.1 -
    44. -
    45. - plchostd.1 -
    46. -
    47. - plchostd2.1 -
    48. -
    49. - plcID.1 -
    50. -
    51. - plclist.1 -
    52. -
    53. - plclog.1 -
    54. -
    55. - plcmdio16.1 -
    56. -
    -
    -
      -
    1. - plcmdio32.1 -
    2. -
    3. - plcotst.1 -
    4. -
    5. - plcrate.1 -
    6. -
    7. - plcrule.1 -
    8. -
    9. - plcset.1 -
    10. -
    11. - plcstat.1 -
    12. -
    13. - plctest.1 -
    14. -
    15. - plctone.1 -
    16. -
    17. - plctool.1 -
    18. -
    19. - plcwait.1 -
    20. -
    21. - psgraph.1 -
    22. -
    23. - psin.1 -
    24. -
    25. - pskey.1 -
    26. -
    27. - psnotch.1 -
    28. -
    29. - psout.1 -
    30. -
    31. - ptsctl.1 -
    32. -
    33. - rkey.1 -
    34. -
    35. - sada.1 -
    36. -
    37. - sdram.1 -
    38. -
    39. - setpib.1 -
    40. -
    41. - ttycat.1 -
    42. -
    43. - ttyrecv.1 -
    44. -
    45. - ttysend.1 -
    46. -
    47. - ttysig.1 -
    48. -
    49. - weeder.1 -
    50. -
    51. - xml2pib.1 -
    52. -
    -
    -

    - Header Files -

    - - - - - - - -
    -
      -
    1. - base64.h -
    2. -
    3. - bittypes.h -
    4. -
    5. - bluetooth.h -
    6. -
    7. - bpf.h -
    8. -
    9. - channel.h -
    10. -
    11. - chars.h -
    12. -
    13. - chipset.h -
    14. -
    15. - config.h -
    16. -
    17. - coqos.h -
    18. -
    19. - debug.h -
    20. -
    21. - endian.h -
    22. -
    23. - error.h -
    24. -
    25. - ether.h -
    26. -
    27. - ethernet.h -
    28. -
    29. - files.h -
    30. -
    31. - flags.h -
    32. -
    -
    -
      -
    1. - format.h -
    2. -
    3. - getoptv.h -
    4. -
    5. - homeplug.h -
    6. -
    7. - HPAVKey.h -
    8. -
    9. - if_arp.h -
    10. -
    11. - if_ether.h -
    12. -
    13. - if.h -
    14. -
    15. - inet.h -
    16. -
    17. - in.h -
    18. -
    19. - inttypes.h -
    20. -
    21. - ip6_misc.h -
    22. -
    23. - keys.h -
    24. -
    25. - mdio.h -
    26. -
    27. - memory.h -
    28. -
    29. - mme.h -
    30. -
    31. - namedb.h -
    32. -
    -
    -
      -
    1. - node.h -
    2. -
    3. - number.h -
    4. -
    5. - nvm.h -
    6. -
    7. - nvram.h -
    8. -
    9. - Packet32.h -
    10. -
    11. - pcap-bpf.h -
    12. -
    13. - pcap.h -
    14. -
    15. - pcap-int.h -
    16. -
    17. - pcap-stdinc.h -
    18. -
    19. - pib.h -
    20. -
    21. - plc.h -
    22. -
    23. - putoptv.h -
    24. -
    25. - qualcomm.h -
    26. -
    27. - rules.h -
    28. -
    29. - sdram.h -
    30. -
    31. - serial.h -
    32. -
    -
    -
      -
    1. - SHA256.h -
    2. -
    3. - sizes.h -
    4. -
    5. - slac.h -
    6. -
    7. - sll.h -
    8. -
    9. - socket.h -
    10. -
    11. - stdint.h -
    12. -
    13. - symbol.h -
    14. -
    15. - time.h -
    16. -
    17. - timer.h -
    18. -
    19. - tlv.h -
    20. -
    21. - types.h -
    22. -
    23. - unistd.h -
    24. -
    25. - usb.h -
    26. -
    27. - version.h -
    28. -
    29. - vlan.h -
    30. -
    -
    -

    - Source Files -

    - - - - - - - -
    -
      -
    1. - ampboot.c -
    2. -
    3. - amphost.c -
    4. -
    5. - ampID.c -
    6. -
    7. - amplist.c -
    8. -
    9. - amprate.c -
    10. -
    11. - amprule.c -
    12. -
    13. - ampstat.c -
    14. -
    15. - amptest.c -
    16. -
    17. - amptone.c -
    18. -
    19. - amptool.c -
    20. -
    21. - ampwait.c -
    22. -
    23. - Antiphon.c -
    24. -
    25. - ARPCPeek.c -
    26. -
    27. - ARPCPrint.c -
    28. -
    29. - ARPCWrite.c -
    30. -
    31. - assist.c -
    32. -
    33. - Attributes1.c -
    34. -
    35. - Attributes2.c -
    36. -
    37. - Attributes.c -
    38. -
    39. - b64dump.c -
    40. -
    41. - basespec.c -
    42. -
    43. - baudrate.c -
    44. -
    45. - binout.c -
    46. -
    47. - BootDevice1.c -
    48. -
    49. - BootDevice2.c -
    50. -
    51. - BootDevice.c -
    52. -
    53. - BootFirmware1.c -
    54. -
    55. - BootFirmware2.c -
    56. -
    57. - BootParameters1.c -
    58. -
    59. - BootParameters2.c -
    60. -
    61. - __bswap.c -
    62. -
    63. - bytespec.c -
    64. -
    65. - ChangeIdent.c -
    66. -
    67. - channel.c -
    68. -
    69. - checkfilename.c -
    70. -
    71. - checksum32.c -
    72. -
    73. - chipset.c -
    74. -
    75. - chknvm2.c -
    76. -
    77. - chknvm.c -
    78. -
    79. - chkpib2.c -
    80. -
    81. - chkpib.c -
    82. -
    83. - chrout.c -
    84. -
    85. - closechannel.c -
    86. -
    87. - closeport.c -
    88. -
    89. - clr32bitmap.c -
    90. -
    91. - CMEncrypt.c -
    92. -
    93. - codelist.c -
    94. -
    95. - codename.c -
    96. -
    97. - config2cfg.c -
    98. -
    99. - config.c -
    100. -
    101. - Confirm.c -
    102. -
    103. - coqos_add.c -
    104. -
    105. - coqos_info.c -
    106. -
    107. - coqos_man.c -
    108. -
    109. - coqos_mod.c -
    110. -
    111. - coqos_rel.c -
    112. -
    113. - dataspec.c -
    114. -
    115. - debug.c -
    116. -
    117. - decdecode.c -
    118. -
    119. - decout.c -
    120. -
    121. - decstring.c -
    122. -
    123. - DeviceIdent.c -
    124. -
    125. - Devices.c -
    126. -
    127. - Display.c -
    128. -
    129. - edru.c -
    130. -
    131. - edsu.c -
    132. -
    133. - efbu.c -
    134. -
    135. - efeu.c -
    136. -
    137. - efreopen.c -
    138. -
    139. - efru.c -
    140. -
    141. - efsu.c -
    142. -
    143. - emalloc.c -
    144. -
    145. - EmulateHost64.c -
    146. -
    147. - EmulateHost.c -
    148. -
    149. - error.c -
    150. -
    151. - EthernetHeader.c -
    152. -
    153. - evse.c -
    154. -
    155. - evse_cm_atten_char.c -
    156. -
    157. - evse_cm_mnbc_sound.c -
    158. -
    159. - evse_cm_set_key.c -
    160. -
    161. - evse_cm_slac_match.c -
    162. -
    163. - evse_cm_slac_param.c -
    164. -
    165. - evse_cm_start_atten_char.c -
    166. -
    167. - ExecuteApplets1.c -
    168. -
    169. - ExecuteApplets2.c -
    170. -
    171. - ExecuteApplets.c -
    172. -
    173. - extra.c -
    174. -
    175. - FactoryDefaults.c -
    176. -
    177. - FactoryReset.c -
    178. -
    179. - Failure.c -
    180. -
    181. - fcs.c -
    182. -
    183. - fdchecksum32.c -
    184. -
    185. - fdmanifest.c -
    186. -
    187. - FirmwareMessage.c -
    188. -
    189. - FlashDevice1.c -
    190. -
    191. - FlashDevice2.c -
    192. -
    193. - FlashFirmware.c -
    194. -
    195. - FlashMOD.c -
    196. -
    197. - FlashNVM.c -
    198. -
    199. - FlashParameters.c -
    200. -
    201. - FlashSoftloader.c -
    202. -
    203. - FragmentHeader.c -
    204. -
    205. - getargv.c -
    206. -
    207. - gethwaddr.c -
    208. -
    209. - getifname.c -
    210. -
    211. - getoptv.c -
    212. -
    213. - getpib.c -
    214. -
    215. - GetProperty.c -
    216. -
    217. - gettimeofday.c -
    218. -
    219. - gpioinfo.c -
    220. -
    221. - hexdecode.c -
    222. -
    -
    -
      -
    1. - hexdump.c -
    2. -
    3. - hexencode.c -
    4. -
    5. - hexload.c -
    6. -
    7. - hexoffset.c -
    8. -
    9. - hexout.c -
    10. -
    11. - hexpeek.c -
    12. -
    13. - hexstring.c -
    14. -
    15. - hexview.c -
    16. -
    17. - hexwrite.c -
    18. -
    19. - HomePlugHeader1.c -
    20. -
    21. - HomePlugHeader.c -
    22. -
    23. - HostActionIndicate.c -
    24. -
    25. - HostActionResponse.c -
    26. -
    27. - hostnics.c -
    28. -
    29. - hpav.c -
    30. -
    31. - hpavd.c -
    32. -
    33. - hpavkey.c -
    34. -
    35. - HPAVKeyDAK.c -
    36. -
    37. - HPAVKeyNID.c -
    38. -
    39. - HPAVKeyNMK.c -
    40. -
    41. - HPAVKeyOut.c -
    42. -
    43. - hpavkeys.c -
    44. -
    45. - HPAVKeySHA.c -
    46. -
    47. - HPAVKeySpec.c -
    48. -
    49. - Identity1.c -
    50. -
    51. - Identity2.c -
    52. -
    53. - Identity.c -
    54. -
    55. - InitDevice1.c -
    56. -
    57. - InitDevice2.c -
    58. -
    59. - InitDevice.c -
    60. -
    61. - int64host.c -
    62. -
    63. - int6kbaud.c -
    64. -
    65. - int6kboot.c -
    66. -
    67. - int6k.c -
    68. -
    69. - int6kdetect.c -
    70. -
    71. - int6keth.c -
    72. -
    73. - int6kf.c -
    74. -
    75. - int6khost.c -
    76. -
    77. - int6kid.c -
    78. -
    79. - int6klist.c -
    80. -
    81. - int6klog.c -
    82. -
    83. - int6kmdio2.c -
    84. -
    85. - int6kmdio.c -
    86. -
    87. - int6kmod.c -
    88. -
    89. - int6krate.c -
    90. -
    91. - int6krule.c -
    92. -
    93. - int6kstat.c -
    94. -
    95. - int6ktest.c -
    96. -
    97. - int6ktone.c -
    98. -
    99. - int6kuart.c -
    100. -
    101. - int6kwait.c -
    102. -
    103. - ipv4spec.c -
    104. -
    105. - ipv6spec.c -
    106. -
    107. - keys.c -
    108. -
    109. - LinkStatistics.c -
    110. -
    111. - LinkStatus.c -
    112. -
    113. - ListLocalDevices.c -
    114. -
    115. - ListRemoteDevices1.c -
    116. -
    117. - ListRemoteDevices2.c -
    118. -
    119. - ListRemoteDevices.c -
    120. -
    121. - LocalDeviceList.c -
    122. -
    123. - LocalDevices.c -
    124. -
    125. - lookup.c -
    126. -
    127. - mac2pw.c -
    128. -
    129. - mac2pwd.c -
    130. -
    131. - MACPasswords.c -
    132. -
    133. - _main.c -
    134. -
    135. - MakeRule.c -
    136. -
    137. - manifest.c -
    138. -
    139. - manifetch.c -
    140. -
    141. - mdioblock2.c -
    142. -
    143. - mdioblock.c -
    144. -
    145. - mdiodump.c -
    146. -
    147. - mdiogen.c -
    148. -
    149. - mdustats.c -
    150. -
    151. - MDUTrafficStats.c -
    152. -
    153. - memdecr.c -
    154. -
    155. - memencode.c -
    156. -
    157. - memincr.c -
    158. -
    159. - memout.c -
    160. -
    161. - memswap.c -
    162. -
    163. - mme.c -
    164. -
    165. - MMECode.c -
    166. -
    167. - MMEMode.c -
    168. -
    169. - MMEName.c -
    170. -
    171. - MMEPeek.c -
    172. -
    173. - modpib.c -
    174. -
    175. - ModuleCommit.c -
    176. -
    177. - ModuleDump.c -
    178. -
    179. - ModuleRead.c -
    180. -
    181. - ModuleSession.c -
    182. -
    183. - ModuleSpec.c -
    184. -
    185. - ModuleWrite.c -
    186. -
    187. - NetInfo1.c -
    188. -
    189. - NetInfo2.c -
    190. -
    191. - NetInfo.c -
    192. -
    193. - NetworkDevices1.c -
    194. -
    195. - NetworkDevices2.c -
    196. -
    197. - NetworkDevices.c -
    198. -
    199. - NetworkInformation1.c -
    200. -
    201. - NetworkInformation2.c -
    202. -
    203. - NetworkInformation.c -
    204. -
    205. - NetworkInfoStats.c -
    206. -
    207. - NetworkTraffic1.c -
    208. -
    209. - NetworkTraffic2.c -
    210. -
    211. - NetworkTraffic.c -
    212. -
    213. - nics.c -
    214. -
    215. - nvm.c -
    216. -
    217. - nvmfile1.c -
    218. -
    219. - nvmfile2.c -
    220. -
    221. - nvmfile.c -
    222. -
    -
    -
      -
    1. - nvmlock2.c -
    2. -
    3. - nvmmerge.c -
    4. -
    5. - nvmpeek1.c -
    6. -
    7. - nvmpeek2.c -
    8. -
    9. - nvmpeek.c -
    10. -
    11. - nvmseek1.c -
    12. -
    13. - nvmseek2.c -
    14. -
    15. - NVMSelect.c -
    16. -
    17. - nvmsplit.c -
    18. -
    19. - nvram.c -
    20. -
    21. - NVRAMInfo.c -
    22. -
    23. - nvrampeek.c -
    24. -
    25. - openchannel.c -
    26. -
    27. - openport.c -
    28. -
    29. - output.c -
    30. -
    31. - ParseRule.c -
    32. -
    33. - pcapdevs.c -
    34. -
    35. - pcap_freenameindex.c -
    36. -
    37. - pcap_indextoname.c -
    38. -
    39. - pcap_nameindex.c -
    40. -
    41. - pcap_nametoindex.c -
    42. -
    43. - pev.c -
    44. -
    45. - pev_cm_atten_char.c -
    46. -
    47. - pev_cm_mnbc_sound.c -
    48. -
    49. - pev_cm_set_key.c -
    50. -
    51. - pev_cm_slac_match.c -
    52. -
    53. - pev_cm_slac_param.c -
    54. -
    55. - pev_cm_start_atten_char.c -
    56. -
    57. - PhyRates1.c -
    58. -
    59. - PhyRates2.c -
    60. -
    61. - PhyRates.c -
    62. -
    63. - pib2xml.c -
    64. -
    65. - pibcomp.c -
    66. -
    67. - pibdump.c -
    68. -
    69. - pibfile1.c -
    70. -
    71. - pibfile2.c -
    72. -
    73. - pibfile.c -
    74. -
    75. - piblock.c -
    76. -
    77. - piboffset.c -
    78. -
    79. - pibpeek1.c -
    80. -
    81. - pibpeek2.c -
    82. -
    83. - pibruin1.c -
    84. -
    85. - pibruin.c -
    86. -
    87. - pibrump.c -
    88. -
    89. - pibscalers.c -
    90. -
    91. - Platform.c -
    92. -
    93. - plcboot.c -
    94. -
    95. - plc.c -
    96. -
    97. - plcdevs.c -
    98. -
    99. - plcfwd.c -
    100. -
    101. - plcget.c -
    102. -
    103. - PLCHostBoot.c -
    104. -
    105. - plchost.c -
    106. -
    107. - plchostd2.c -
    108. -
    109. - plchostd.c -
    110. -
    111. - plcID.c -
    112. -
    113. - plclist.c -
    114. -
    115. - plclog.c -
    116. -
    117. - plcmdio16.c -
    118. -
    119. - plcmdio32.c -
    120. -
    121. - PLCNetworkInfo.c -
    122. -
    123. - plcotst.c -
    124. -
    125. - PLCPhyRates.c -
    126. -
    127. - plcrate.c -
    128. -
    129. - PLCReadParameterBlock.c -
    130. -
    131. - plcrule.c -
    132. -
    133. - PLCSelect.c -
    134. -
    135. - plcset.c -
    136. -
    137. - plcstat.c -
    138. -
    139. - plctest.c -
    140. -
    141. - plctone.c -
    142. -
    143. - plctool.c -
    144. -
    145. - PLCTopology.c -
    146. -
    147. - PLCTopologyPrint.c -
    148. -
    149. - plcwait.c -
    150. -
    151. - PrintRule.c -
    152. -
    153. - pseudo.c -
    154. -
    155. - psgraph.c -
    156. -
    157. - psin.c -
    158. -
    159. - pskey.c -
    160. -
    161. - psnotch.c -
    162. -
    163. - psout.c -
    164. -
    165. - psread.c -
    166. -
    167. - ptsctl.c -
    168. -
    169. - PushButton.c -
    170. -
    171. - putoptv.c -
    172. -
    173. - putpwd.c -
    174. -
    175. - qosinfo.c -
    176. -
    177. - QualcommHeader1.c -
    178. -
    179. - QualcommHeader.c -
    180. -
    181. - ReadFirmware1.c -
    182. -
    183. - ReadFirmware2.c -
    184. -
    185. - ReadFirmware.c -
    186. -
    187. - ReadFMI.c -
    188. -
    189. - readmessage.c -
    190. -
    191. - ReadMFG.c -
    192. -
    193. - ReadMME.c -
    194. -
    195. - ReadNVM.c -
    196. -
    197. - readpacket.c -
    198. -
    199. - ReadParameterBlock.c -
    200. -
    201. - ReadParameters1.c -
    202. -
    203. - ReadParameters2.c -
    204. -
    205. - ReadParameters.c -
    206. -
    207. - ReadRules.c -
    208. -
    209. - regview32.c -
    210. -
    211. - RemoteDeviceList1.c -
    212. -
    213. - RemoteDeviceList2.c -
    214. -
    215. - RemoteDeviceList.c -
    216. -
    217. - RemoteHosts.c -
    218. -
    219. - Request.c -
    220. -
    221. - ResetAndWait.c -
    222. -
    -
    -
      -
    1. - ResetDevice.c -
    2. -
    3. - reverse.c -
    4. -
    5. - reword.c -
    6. -
    7. - rkey.c -
    8. -
    9. - RNDPasswords.c -
    10. -
    11. - ruledump.c -
    12. -
    13. - rules.c -
    14. -
    15. - RxRates1.c -
    16. -
    17. - RxRates2.c -
    18. -
    19. - sada.c -
    20. -
    21. - sdram.c -
    22. -
    23. - sdramfileA.c -
    24. -
    25. - sdramfile.c -
    26. -
    27. - SDRAMInfo.c -
    28. -
    29. - sdrampeek.c -
    30. -
    31. - sdramtext.c -
    32. -
    33. - sendmessage.c -
    34. -
    35. - SendMME.c -
    36. -
    37. - sendpacket.c -
    38. -
    39. - serial.c -
    40. -
    41. - set32bitmap.c -
    42. -
    43. - SetNMK.c -
    44. -
    45. - setpib.c -
    46. -
    47. - SetProperty.c -
    48. -
    49. - SHA256Block.c -
    50. -
    51. - SHA256.c -
    52. -
    53. - SHA256Fetch.c -
    54. -
    55. - SHA256Ident.c -
    56. -
    57. - SHA256Match.c -
    58. -
    59. - SHA256Print.c -
    60. -
    61. - SHA256Reset.c -
    62. -
    63. - SHA256Write.c -
    64. -
    65. - SignalToNoise1.c -
    66. -
    67. - SignalToNoise2.c -
    68. -
    69. - slac_connect.c -
    70. -
    71. - slac_debug.c -
    72. -
    73. - slac_session.c -
    74. -
    75. - slac_structs.c -
    76. -
    77. - SlaveMembership.c -
    78. -
    79. - StartDevice1.c -
    80. -
    81. - StartFirmware1.c -
    82. -
    83. - StartFirmware2.c -
    84. -
    85. - StartFirmware.c -
    86. -
    87. - StationRole.c -
    88. -
    89. - strdecr.c -
    90. -
    91. - strfbits.c -
    92. -
    93. - strincr.c -
    94. -
    95. - strnpwd.c -
    96. -
    97. - synonym.c -
    98. -
    99. - termlist.c -
    100. -
    101. - todigit.c -
    102. -
    103. - ToneMaps1.c -
    104. -
    105. - ToneMaps2.c -
    106. -
    107. - Topology1.c -
    108. -
    109. - Topology2.c -
    110. -
    111. - Topology.c -
    112. -
    113. - Traffic1.c -
    114. -
    115. - Traffic2.c -
    116. -
    117. - Traffic.c -
    118. -
    119. - Transmit.c -
    120. -
    121. - ttycat.c -
    122. -
    123. - ttyrecv.c -
    124. -
    125. - ttysend.c -
    126. -
    127. - ttysig.c -
    128. -
    129. - typelist.c -
    130. -
    131. - typename.c -
    132. -
    133. - uintspec.c -
    134. -
    135. - UnwantedMessage.c -
    136. -
    137. - UpgradeDevice1.c -
    138. -
    139. - version.c -
    140. -
    141. - VersionInfo1.c -
    142. -
    143. - VersionInfo2.c -
    144. -
    145. - WaitForReset.c -
    146. -
    147. - WaitForRestart.c -
    148. -
    149. - WaitForStart.c -
    150. -
    151. - WatchdogReport.c -
    152. -
    153. - weeder.c -
    154. -
    155. - WriteCFG.c -
    156. -
    157. - WriteExecuteApplet2.c -
    158. -
    159. - WriteExecuteFirmware1.c -
    160. -
    161. - WriteExecuteFirmware2.c -
    162. -
    163. - WriteExecuteFirmware.c -
    164. -
    165. - WriteExecuteParameters1.c -
    166. -
    167. - WriteExecuteParameters2.c -
    168. -
    169. - WriteExecuteParameters.c -
    170. -
    171. - WriteExecutePIB.c -
    172. -
    173. - WriteFirmware1.c -
    174. -
    175. - WriteFirmware2.c -
    176. -
    177. - WriteFirmware.c -
    178. -
    179. - WriteMEM.c -
    180. -
    181. - WriteMOD.c -
    182. -
    183. - WriteNVM.c -
    184. -
    185. - WriteParameters1.c -
    186. -
    187. - WriteParameters2.c -
    188. -
    189. - WriteParameters.c -
    190. -
    191. - WritePIB.c -
    192. -
    193. - xml2pib.c -
    194. -
    195. - xmlattribute.c -
    196. -
    197. - xmldata.c -
    198. -
    199. - xmledit.c -
    200. -
    201. - xmlelement.c -
    202. -
    203. - xmlfree.c -
    204. -
    205. - xmlnode.c -
    206. -
    207. - xmlopen.c -
    208. -
    209. - xmlread.c -
    210. -
    211. - xmlscan.c -
    212. -
    213. - xmlschema.c -
    214. -
    215. - xmlselect.c -
    216. -
    217. - xmltree.c -
    218. -
    219. - xmlvalue.c -
    220. -
    -
    -

    - Script Files -

    - - - - - - - -
    -
      -
    1. - baud.sh -
    2. -
    3. - bootp.sh -
    4. -
    5. - boot.sh -
    6. -
    7. - CM_ENCRYPTED.sh -
    8. -
    9. - firmware.sh -
    10. -
    -
    -
      -
    1. - flashp.sh -
    2. -
    3. - flash.sh -
    4. -
    5. - fresh.sh -
    6. -
    7. - hardware.sh -
    8. -
    9. - host64.sh -
    10. -
    -
    -
      -
    1. - host.sh -
    2. -
    3. - psnotch.sh -
    4. -
    5. - pts.sh -
    6. -
    7. - pushbutton.sh -
    8. -
    9. - replace-softloader.sh -
    10. -
    -
    -
      -
    1. - start.sh -
    2. -
    3. - tr069prog.sh -
    4. -
    5. - traffic.sh -
    6. -
    7. - upgradep.sh -
    8. -
    9. - upgrade.sh -
    10. -
    -
    - - - - diff --git a/docbook/tr069prog.sh.html b/docbook/tr069prog.sh.html deleted file mode 100644 index 1051049f..00000000 --- a/docbook/tr069prog.sh.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - tr069prog.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: tr069prog.sh
    -
    -# ====================================================================
    -#
    -# This script programs a unique TR-069 ACS Username and ACS Password 
    -# into a INT6400 powerline device and updates the Mfg feed file; 
    -# the original MAC, DAK and NMK are preserved; the MFG, NET and USR
    -# HFIDs are set to the values defined in this file; the ACS Username
    -# is derived from the original MAC; the ACS Password is derived from
    -# the local host random number generator;
    -#
    -# devices should be programmed and tested using the PTS then updated
    -# using his script; Atheros Powerline Toolkit 1.3.1 is needed;
    -#
    -# --------------------------------------------------------------------
    -
    -#
    -# Define environment;
    -#
    -
    -ETH=eth0                # PC ethernet port 
    -NVMFILE=tr069.nvm       # This is the NVM file to program
    -REFPIB=tr069.pib        # This is the PIB template to use
    -PIBFILE=tmp.pib         # Temp PIB to modify
    -MFGFILE=mfgfeed.txt     # Manufacturing Feed File
    -
    -#
    -# Determine device identity;
    -#
    -
    -MAC=$(int6kid -Ai ${ETH})
    -DAK=$(int6kid -Di ${ETH})
    -NMK=$(int6kid -Mi ${ETH})
    -
    -#
    -# Define default HFIDs;
    -#
    -
    -MFG="MANUFACTURER MODEL-AB-02-01"
    -NET="MANUFACTURER MODEL-AB-02-01"
    -USR="MANUFACTURER MODEL-AB-02-01"
    -
    -#
    -# Make a copy of PIB to edit
    -#
    -
    -cp ${REFPIB} ${PIBFILE}
    -
    -#
    -# Set MAC, DAK, NMK, MFG_HFID, NET_HFID and USR_HFID in PIB file
    -#
    -
    -modpib ${PIBFILE} -M ${MAC} -D ${DAK} -N ${NMK} -S "${MFG}" -T "${NET}" -U "${USR}" 
    -
    -UMAC=$(echo $MAC | sed 'y/abcdef/ABCDEF/' | sed 's/://g' | sed 's/ //g') 
    -OUI=$(echo $UMAC | cut -c 1-6)
    -
    -#
    -# Build the ACS Username
    -#
    -
    -UNAME="$OUI"-"$UMAC"
    -
    -#
    -# Generate a 16 character lower case random ACS password
    -#
    -
    -RANDOMPWORD=$(</dev/urandom tr -dc a-z0-9| (head -c $1 > /dev/null 2>&1 || head -c 16))
    -
    -#
    -# Set Username and Password in PIB file
    -#
    -
    -setpib ${PIBFILE} 2DCC username ${UNAME}
    -setpib ${PIBFILE} 2ECD password ${RANDOMPWORD}
    -setpib ${PIBFILE} 2FCE byte 01
    -
    -#
    -# Write NVM and PIB
    -#
    -
    -int6kp -i ${ETH} -P ${PIBFILE} -N ${NVMFILE} -FF -D ${DAK}
    -FW=$(int6k -qri ${ETH} | rev | cut -d " " -f1 | rev)
    -
    -#
    -# Write the record to Mfg feed file
    -#
    -
    -echo $UMAC"|"$FW"|"$RANDOMPWORD"|1.0|"$RANDOMPWORD"|000000" >> ${MFGFILE}
    -
    -
    -
    - - - diff --git a/docbook/traffic.sh.html b/docbook/traffic.sh.html deleted file mode 100644 index f41656f4..00000000 --- a/docbook/traffic.sh.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - traffic.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: scripts/traffic.sh
    -
    -# this script attempts to send traffic between NIC1 and NIC2 in both
    -# directions to establish a PHY Rate; the frame file can contain any 
    -# valid Ethernet frame;
    -
    -# ====================================================================
    -# host symbols;
    -# --------------------------------------------------------------------
    -
    -. /etc/environment
    -. ${SCRIPTS}/hardware.sh
    -
    -# ====================================================================
    -# file symbols;
    -# --------------------------------------------------------------------
    -
    -COUNT=10000
    -FRAME=frame.hex
    -
    -# ====================================================================
    -# create dummy ethernet frame;
    -# --------------------------------------------------------------------
    -
    -cat > ${FRAME} << EOF
    -FF FF FF FF FF FF FF FF FF FF FF FF 08 00 FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    -EOF
    -
    -# ====================================================================
    -# check environment; 
    -# --------------------------------------------------------------------
    -
    -if [ ! -f ${FRAME} ]; then
    -	echo "File ${FRAME} is missing or misplaced"
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# send traffic in both directions;
    -# --------------------------------------------------------------------
    -
    -efsu -i ${ETH1} -hd ${NIC2} ${FRAME} -l ${COUNT}          
    -efsu -i ${ETH2} -hd ${NIC1} ${FRAME} -l ${COUNT}
    -efsu -i ${ETH1} -hd ${NIC2} ${FRAME} -l ${COUNT}
    -efsu -i ${ETH2} -hd ${NIC1} ${FRAME} -l ${COUNT} 
    -
    -# ====================================================================
    -# echo device TX/RX PHY Rates;        
    -# --------------------------------------------------------------------
    -
    -int6krate -ni ${ETH2}
    -
    -
    -
    - - - diff --git a/docbook/trouble-shooting.xml b/docbook/trouble-shooting.xml deleted file mode 100644 index 69228fee..00000000 --- a/docbook/trouble-shooting.xml +++ /dev/null @@ -1,66 +0,0 @@ -
    - - Trouble-shooting Problems - - - The following steps may help determine why two devices cannot communicate via ethernet over the powerline. They assume that you have successfully installed the Powerline Toolkit but are having trouble forming a powerline network. - - - - - On Linux, run program ifconfig to determine available interface names as described earlier. The default interface name is eth1 on Linux. You must use interface names, not numbers, on the Linux command line. - - - On Windows, run program pcapdevs to determine available interface numbers as described earlier. The default interface number is 2 on Windows. You must use interface numbers, not names, on Windows command lines, even under Cygwin. - - - In either case, Linux or Windows, if a powerline device is connected to any interface other than the default interface then you must specify the name or number on the command line each time you run int6k. In the following examples, we will use device numbers 3 and 4 to indicate two different interfaces on the same host. - - - - - Make sure both devices respond to int6k -ri3 and int6k -ri4 as described earlier. They should each display the software revision information. If you get no response then check your connections and network configuration. If you see Bootloader then the connection is good but the firmware is not running. If the firmware versions are different then make them the same. - - - You must have running firmware to continue and the firmware revisions should be the same. - - - - - Make sure both devices respond to int6k -Ii3 then int6k -Ii4 as described earlier. They should display about 10 lines of information showing their MAC, DAK and NMK. - - - If the MAC is 00:B0:52:00:00:01 then either the default Atheros PIB was stored in NVRAM or you downloaded and flashed the generic Atheros PIB without changing the MAC address beforehand. - - - If the MAC is 00:B0:52:00:00:03 then either no PIB was stored in NVRAM or you downloaded and attempted to flashed an invalid PIB. The firmware will disable powerline communications in this case. - - - - - If the devices have different NMKs they will not form a network. - - - One way to form a network is to manually set the NMK on each device to a known value with int6k -Mi3 then int6k -Mi4. Each device will reset afterwards and may reset again when the other device is changed. Repeat Step 3 and confirm that both devices have the same NMK and that (HomePlugAV) appears next to the NMK. - - - Another way to form a network is to physically press the push-button on each device for 2 to 3 seconds or simulate a push-button press on each device with int6k -B1 -i3 then int6k -B1 -i4. The devices should reset several times and then form a network. - - - - - Make sure each device knows the other one is present on the network with int6k -mi3 then int6k -Mi4. Each device should show that a network exists and identify the other device as a station on that network. It may take up to 120 seconds for one device to find another and up to 5 minutes to recognise that the other device has left the network. - - - - - Step 5 should also show the TX and RX PHY rates for each device. Ping each host Interface from the other several times to generate traffic. The PHY Rates should then be non-zero. We use efsu to generate traffic inside our own scripts. You may elect to use another method. - - - - - Power down both devices then power them up. Wait about 20 seconds and confirm that you can ping in either direction. - - - -
    diff --git a/docbook/ttycat.1.html b/docbook/ttycat.1.html deleted file mode 100644 index 96e5d075..00000000 --- a/docbook/ttycat.1.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - ttycat.1 - - - - - - - - - -
    -ttycat(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   ttycat(1)
    -
    -NAME
    -       ttycat - Serial Line Output Utility
    -
    -SYNOPSIS
    -       ttycat [options] [file] [file] [>stdout]
    -
    -       ttycat [options] [<stdin] [>stdout]
    -
    -DESCRIPTION
    -       Copy one or more files to a serial device.  This program is similar to traditional cat utility but expects stdout to be a
    -       serial tty device.  It will configure stdout before writing and will restore the original configuration  afterwards.   It
    -       can be used to send data to the local Atheros UART-enabled powerline device.  If the remote powerline device is not UART-
    -       enabled, use program edru to capture and display arriving at the remote host and program edsu to send files in the  oppo‐
    -       site direction.
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -COMMENTS
    -       This program only supports the Linux and MacOSX  platforms, at present.
    -
    -OPTIONS
    -       -s speed
    -              The serial baud rate.  Supported baud rates are 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800,  2400,  4800,
    -              9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000 and 921600.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       file   The  name  of  an  input  file.  No assumptions are made about the file based on the filename or extension.  Input
    -              files are not modified.
    -
    -       stdout The name of a serial output device.  A error will occur if the device is not a true tty device according as deter‐
    -              mined  by  the  isatty  function.  Depending on the amount of input data and the baud rate, serial output may take
    -              several seconds or several minutes.
    -
    -EXAMPLES
    -       The following command copies files abc.txt and def.bin to stdout which must be an active serial device or an  error  will
    -       occur.
    -
    -          # ttycat abc.txt def.bin > /dev/ttyUSB1
    -
    -SEE ALSO
    -       amp(1), edru(1), edsu(1), int6kuart(1),
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   ttycat(1)
    -
    - - - diff --git a/docbook/ttycat.c.html b/docbook/ttycat.c.html deleted file mode 100644 index 08e242bb..00000000 --- a/docbook/ttycat.c.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - ttycat.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ttycat.c - serial port test program;
    - *
    - *   write one or more files to a serial device;
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdlib.h>
    -#include <limits.h>
    -#include <memory.h>
    -#include <signal.h>
    -#include <termios.h>
    -#include <unistd.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../serial/serial.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/efreopen.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *   program warnings;
    - *--------------------------------------------------------------------*/
    -
    -#if defined (WIN32)
    -#error "This program does not support Windows platforms"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   signed copy (signed ifd, signed ofd, void * memory, signed extent)
    - *
    - *   copy ifd to ofd using a buffer of specified size;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed copy (signed ifd, signed ofd, void * memory, signed extent)
    -
    -{
    -	while ((extent = read (ifd, memory, extent)) > 0)
    -	{
    -		if (write (ofd, memory, extent) < extent)
    -		{
    -			return (-1);
    -		}
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"s:",
    -		PUTOPTV_S_FUNNEL,
    -		"copy one or more files to a  serial device",
    -		"s n\tline speed is (n) [115200]",
    -		(char const *)(0)
    -	};
    -	struct termios restore;
    -	struct termios current;
    -	speed_t speed = B115200;
    -	byte buffer [512];
    -	signed c;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 's':
    -			if (baudrate (uintspec (optarg, 0, UINT_MAX), &speed))
    -			{
    -				error (1, 0, "could not set baud rate");
    -			}
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (!isatty (STDOUT_FILENO))
    -	{
    -		error (1, ENOTSUP, "stdout must be a serial line device");
    -	}
    -	tcflush (STDOUT_FILENO, TCIFLUSH);
    -	tcgetattr (STDOUT_FILENO, &restore);
    -	memset (&current, 0, sizeof (current));
    -	current.c_cflag = speed | CS8 | CLOCAL | CREAD;
    -	current.c_iflag = IGNPAR;
    -	current.c_oflag = 0;
    -	current.c_lflag = 0;
    -	current.c_cc [VTIME] = 0;
    -	current.c_cc [VMIN] = 5;
    -	tcsetattr (STDOUT_FILENO, TCSANOW, &current);
    -	if (!argc)
    -	{
    -		copy (STDIN_FILENO, STDOUT_FILENO, buffer, sizeof (buffer));
    -	}
    -	while ((argc) && (* argv))
    -	{
    -		if (efreopen (* argv, "rb", stdin))
    -		{
    -			copy (STDIN_FILENO, STDOUT_FILENO, buffer, sizeof (buffer));
    -		}
    -		argc--;
    -		argv++;
    -	}
    -	tcsetattr (STDOUT_FILENO, TCSANOW, &restore);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/ttyrecv.1.html b/docbook/ttyrecv.1.html deleted file mode 100644 index 4e9ddb5a..00000000 --- a/docbook/ttyrecv.1.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - ttyrecv.1 - - - - - - - - - -
    -ttyrecv(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  ttyrecv(1)
    -
    -NAME
    -       ttyrecv - Serial Line Rate Tester (Receive)
    -
    -SYNOPSIS
    -       ttyrecv [options] [>stdout]
    -
    -DESCRIPTION
    -       Receive data from a serial device.  The primary purpose of this program is to receive data over a serial port for a spec‐
    -       ified time duration.
    -
    -       The ttyrecv program exits after the receive time (see -t) has elapsed.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -COMMENTS
    -       This program does not yet support Windows platforms.
    -
    -OPTIONS
    -       -c     Consume all data received (do not print to standard output).
    -
    -       -l file
    -              The serial port file to read data from.  The default is /dev/ttyS0.
    -
    -       -r     Print the receive rate to standard output after the receive time has elapsed.
    -
    -       -s speed
    -              The  serial  baud rate.  Supported baud rates are 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
    -              9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000 and 921600.
    -
    -       -t time
    -              Receive for time seconds.  The default is 10 seconds.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -EXAMPLES
    -       None.
    -
    -SEE ALSO
    -       amp(1), int6kuart(1), ttysend(1),
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  ttyrecv(1)
    -
    - - - diff --git a/docbook/ttyrecv.c.html b/docbook/ttyrecv.c.html deleted file mode 100644 index fc7afd42..00000000 --- a/docbook/ttyrecv.c.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - ttyrecv.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ttyrecv.c
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <sys/time.h>
    -#include <sys/types.h>
    -
    -#include <fcntl.h>
    -#include <limits.h>
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <unistd.h>
    -#include <termios.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/error.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/getoptv.h"
    -#include "../tools/number.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../serial/serial.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/error.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../serial/baudrate.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define SERIAL_PORT "/dev/ttyS0"
    -
    -#define TTYRECV_VERBOSE (1 << 0)
    -
    -/*====================================================================*
    - *
    - *   double ttyrecv (int ifd, int ofd, size_t time, size_t chunk_size, flag_t flags) ;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static double ttyrecv (int ifd, int ofd, size_t time, size_t chunk_size, flag_t flags)
    -
    -{
    -	char *buf;
    -	char *p;
    -	ssize_t r;
    -	ssize_t w;
    -	size_t bytes_read;
    -	struct timeval tv_start,
    -	tv_now,
    -	tv_result;
    -	struct timeval tv_timeout;
    -	double bytes_sec;
    -	fd_set rfd;
    -	buf = malloc (chunk_size);
    -	if (buf == NULL)
    -	{
    -		error (1, errno, "could not allocate memory");
    -	}
    -	tcflush (ifd, TCIFLUSH);
    -	FD_ZERO (&rfd);
    -	FD_SET (ifd, &rfd);
    -	tv_timeout.tv_sec = 5;
    -	tv_timeout.tv_usec = 0;
    -	if (select (ifd + 1, &rfd, NULL, NULL, &tv_timeout) != 1)
    -	{
    -		error (1, errno, "timed out waiting for data");
    -	}
    -	if (gettimeofday (&tv_start, NULL) == -1)
    -	{
    -		error (1, errno, "could not get time");
    -	}
    -	if (_anyset (flags, TTYRECV_VERBOSE))
    -	{
    -		fprintf (stderr, "Started receive timer.\n");
    -	}
    -	bytes_read = 0;
    -	do
    -	{
    -		FD_ZERO (&rfd);
    -		FD_SET (ifd, &rfd);
    -		tv_timeout.tv_sec = 1;
    -		tv_timeout.tv_usec = 0;
    -		if (select (ifd + 1, &rfd, NULL, NULL, &tv_timeout) == 1)
    -		{
    -			r = read (ifd, buf, chunk_size);
    -			if (r == -1)
    -			{
    -				error (1, 0, "could not read");
    -			}
    -			bytes_read += r;
    -			if (ofd != -1)
    -			{
    -				p = buf;
    -				while (r)
    -				{
    -					w = write (ofd, p, r);
    -					if (w == -1)
    -					{
    -						error (1, errno, "could not write");
    -					}
    -					p += w;
    -					r -= w;
    -				}
    -			}
    -		}
    -		if (gettimeofday (&tv_now, NULL) == -1)
    -		{
    -			error (1, errno, "could not get time");
    -		}
    -		timersub (&tv_now, &tv_start, &tv_result);
    -	}
    -	while (tv_result.tv_sec < (signed)(time));
    -	bytes_sec = bytes_read / (tv_result.tv_sec + tv_result.tv_usec / 1000000.0);
    -	free (buf);
    -	return (bytes_sec * 8 / 1000.0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"cl:rs:t:qv",
    -		"",
    -		"Serial Line Rate Tester",
    -		"c\tconsume received data (do not output to stdout)",
    -		"l f\tserial port is (f) [" SERIAL_PORT "]",
    -		"r\tprint the receive data rate to stdout",
    -		"s n\tport speed [ 115200 ]",
    -		"t n\treceive for (n) seconds [ 10 ]",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	struct termios termios;
    -	char * line = SERIAL_PORT;
    -	double rate = 0;
    -	speed_t speed = B115200;
    -	size_t time = 10;
    -	size_t chunk_size = 256;
    -	flag_t flags = 0;
    -	signed consume = 0;
    -	signed rflag = 0;
    -	signed fd;
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'c':
    -			consume = 1;
    -			break;
    -		case 'r':
    -			rflag = 1;
    -			break;
    -		case 'l':
    -			line = optarg;
    -			break;
    -		case 's':
    -			if (baudrate (uintspec (optarg, 0, UINT_MAX), &speed))
    -			{
    -				error (1, 0, "could not set baud rate");
    -			}
    -			break;
    -		case 't':
    -			time = uintspec (optarg, 0, SIZE_MAX);
    -			break;
    -		case 'v':
    -			_setbits (flags, TTYRECV_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	fd = open (line, O_RDWR | O_NONBLOCK | O_NOCTTY);
    -	if (fd == - 1)
    -	{
    -		error (1, errno, "could not open %s", line);
    -	}
    -	if (fcntl(fd, F_SETFL, 0) == -1)
    -	{
    -		error (1, errno, "failed to set tty flags");
    -	}
    -	if (tcgetattr (fd, & termios) == - 1)
    -	{
    -		error (1, errno, "could not get tty attributes");
    -	}
    -	cfmakeraw (& termios);
    -	termios.c_cflag = CS8 | CREAD | CLOCAL;
    -	if (cfsetspeed (& termios, speed) == - 1)
    -	{
    -		error (1, errno, "could not set tty speed");
    -	}
    -	if (tcsetattr (fd, TCSANOW, &termios) == -1)
    -	{
    -		error (1, errno, "could not set tty attributes");
    -	}
    -	if (!consume)
    -	{
    -		rate = ttyrecv (fd, STDOUT_FILENO, time, chunk_size, flags);
    -	}
    -	else
    -	{
    -		rate = ttyrecv (fd, -1, time, chunk_size, flags);
    -	}
    -	if (rflag)
    -	{
    -		fprintf (stderr, "%.02f Kbps\n", rate);
    -	}
    -	close (fd);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/ttysend.1.html b/docbook/ttysend.1.html deleted file mode 100644 index 1fbf8118..00000000 --- a/docbook/ttysend.1.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - ttysend.1 - - - - - - - - - -
    -ttysend(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  ttysend(1)
    -
    -NAME
    -       ttysend - Serial Line Rate Tester (Send)
    -
    -SYNOPSIS
    -       ttysend [options] [<stdin]
    -
    -DESCRIPTION
    -       Send  data  to  a serial device.  The primary purpose of this program is to send data over a serial port that can then be
    -       received with the ttyrecv utility.
    -
    -       The ttysend program exits when either one of the following conditions are met:
    -           1.  The file specified on the command line (see -f) is sent in its entirety.
    -           2.  The send time specified on the command line (see -t) has elapsed.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -COMMENTS
    -       This program does not yet support Windows platforms.
    -
    -OPTIONS
    -       -f file
    -              The  file  to  send.   If  this option is not specified, the values 0x00 to 0xFF are sent in a loop.  Instead of a
    -              filename, a '-' may be specified.  This is similar to the tar utility, and instructs ttysend to read from standard
    -              input.
    -
    -       -l file
    -              The serial port file to send data to.  The default is /dev/ttyS0.
    -
    -       -s speed
    -              The  serial  baud rate.  Supported baud rates are 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
    -              9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000 and 921600.
    -
    -       -t time
    -              Transmit for a maximum of time seconds.  The default is 15 seconds.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -EXAMPLES
    -       None.
    -
    -SEE ALSO
    -       amp(1), int6kuart(1), ttyrecv(1)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  ttysend(1)
    -
    - - - diff --git a/docbook/ttysend.c.html b/docbook/ttysend.c.html deleted file mode 100644 index 7b37361f..00000000 --- a/docbook/ttysend.c.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - ttysend.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ttysend.c
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <sys/time.h>
    -#include <sys/types.h>
    -
    -#include <fcntl.h>
    -#include <limits.h>
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <unistd.h>
    -#include <termios.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/getoptv.h"
    -#include "../tools/number.h"
    -#include "../serial/serial.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../serial/baudrate.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define SERIAL_PORT "/dev/ttyS0"
    -
    -void ttysend (int ifd, int ofd, size_t time, size_t chunk_size)
    -
    -{
    -	char *buf;
    -	char *p;
    -	ssize_t r;
    -	ssize_t w;
    -	struct timeval tv_start,
    -	tv_now,
    -	tv_result;
    -	buf = malloc (chunk_size);
    -	if (buf == NULL)
    -	{
    -		error (1, errno, "could not allocate memory");
    -	}
    -	if (ifd == - 1)
    -	{
    -		unsigned i;
    -		for (i = 0; i < chunk_size; ++ i)
    -		{
    -			buf [i] = i % 256;
    -		}
    -	}
    -	if (gettimeofday (& tv_start, NULL) == - 1)
    -	{
    -		error (1, errno, "could not get time");
    -	}
    -	do
    -	{
    -		if (ifd == -1)
    -		{
    -			r = chunk_size;
    -		}
    -		else
    -		{
    -			r = read (ifd, buf, chunk_size);
    -			if (r == - 1)
    -			{
    -				error (1, errno, "could not read");
    -			}
    -			if (r == 0)
    -			{
    -				free (buf);
    -				return;
    -			}
    -		}
    -		p = buf;
    -		while (r)
    -		{
    -			w = write (ofd, p, r);
    -			if (w == - 1)
    -			{
    -				error (1, errno, "could not write");
    -			}
    -			p += w;
    -			r -= w;
    -		}
    -		if (gettimeofday (& tv_now, NULL) == - 1)
    -		{
    -			error (1, errno, "could not get time");
    -		}
    -		timersub (& tv_now, & tv_start, & tv_result);
    -	}
    -	while (tv_result.tv_sec < (signed)(time));
    -	free (buf);
    -}
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"f:l:s:t:qv",
    -		"",
    -		"Serial Line Rate Tester",
    -		"f f\tsend file (f)",
    -		"l f\tserial port is (f) [" SERIAL_PORT "]",
    -		"s n\tport speed [ 115200 ]",
    -		"t n\ttransmit for (n) seconds [ 15 ]",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	int fd;
    -	signed c;
    -	optind = 1;
    -	char const *line = SERIAL_PORT;
    -	struct _file_ file =
    -	{
    -		-1,
    -		NULL
    -	};
    -	speed_t speed = B115200;
    -	size_t time = 15;
    -	size_t chunk_size = 256;
    -	struct termios termios;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'f':
    -			file.name = optarg;
    -			if (!strcmp (file.name, "-")) file.file = STDIN_FILENO;
    -			else
    -			{
    -				file.file = open (file.name, O_BINARY | O_RDONLY);
    -				if (file.file == - 1)
    -				{
    -					error (1, errno, "could not open %s", file.name);
    -				}
    -			}
    -			break;
    -		case 'l':
    -			line = optarg;
    -			break;
    -		case 's':
    -			if (baudrate (uintspec (optarg, 0, UINT_MAX), & speed))
    -			{
    -				error (1, 0, "could not set baud rate");
    -			}
    -			break;
    -		case 't':
    -			time = uintspec (optarg, 0, SIZE_MAX);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	fd = open (line, O_RDWR | O_NONBLOCK | O_NOCTTY);
    -	if (fd == - 1)
    -	{
    -		error (1, errno, "could not open %s", line);
    -	}
    -	if (fcntl(fd, F_SETFL, 0) == -1)
    -	{
    -		error (1, errno, "failed to set tty flags");
    -	}
    -	if (tcgetattr (fd, & termios) == - 1)
    -	{
    -		error (1, errno, "could not get tty attributes");
    -	}
    -	cfmakeraw (& termios);
    -	termios.c_cflag = CS8 | CREAD | CLOCAL;
    -	if (cfsetspeed (& termios, speed) == - 1)
    -	{
    -		error (1, errno, "could not set tty speed");
    -	}
    -	if (tcsetattr (fd, TCSANOW, & termios) == - 1)
    -	{
    -		error (1, errno, "could not set tty attributes");
    -	}
    -	ttysend (file.file, fd, time, chunk_size);
    -	close (fd);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/ttysig.1.html b/docbook/ttysig.1.html deleted file mode 100644 index d6c5b5d5..00000000 --- a/docbook/ttysig.1.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - ttysig.1 - - - - - - - - - -
    -ttysig(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   ttysig(1)
    -
    -NAME
    -       ttysig - Serial Line Signal Controller
    -
    -SYNOPSIS
    -       ttysig [options]
    -
    -DESCRIPTION
    -       Interactively  control  serial  line output signals (Request To Send, Data Terminal Ready), and read the current value of
    -       all control signals (Request To Send, Clear To Send, Data Set Ready, Data Terminal Ready, Data Carrier Detect, Ring Indi‐
    -       cator).
    -
    -       This  program  is  part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an overview and installation
    -       instructions.
    -
    -OPTIONS
    -       -s device
    -              Specify the serial device used.  The default is serial console device "/dev/ttyS0".
    -
    -       -D value
    -              Set the serial control line DTR high if value is non-zero, low otherwise.
    -
    -       -I     Interactive mode.
    -
    -       -R value
    -              Set the serial control line RTS high if value is non-zero, low otherwise.
    -
    -       -r     Print serial control line status on stdout.  This is performed after -R and -D.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -?,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use  this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of
    -              the Linux Toolkit you are using.
    -
    -EXAMPLES
    -       The following example sets DTR high and RTS low at program start.  The user then interactively prints the current control
    -       signal values, and then sets DTR low.  Since no serial devices are specified, program defaults are used.
    -
    -         $ ./ttysig -I -D 1 -R 0
    -         command (D #, R #, r, q): r
    -         RTS: -V
    -         CTS: -V
    -         DSR: -V
    -         DTR: +V
    -         DCD: -V
    -         RI : -V
    -         command (D #, R #, r, q): D 0
    -         command (D #, R #, r, q):
    -
    -SEE ALSO
    -       amp(1), int6kdetect(1), int6kuart(1)
    -
    -CREDITS
    -        Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   ttysig(1)
    -
    - - - diff --git a/docbook/ttysig.c.html b/docbook/ttysig.c.html deleted file mode 100644 index 1eb876e6..00000000 --- a/docbook/ttysig.c.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - ttysig.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   ttysig.c - Serial Line Signal Controller;
    - *
    - *   This program is for Linux only;
    - *
    - *   Contributor(s):
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   kernel header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <sys/ioctl.h>
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <ctype.h>
    -#include <errno.h>
    -#include <fcntl.h>
    -#include <termios.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <unistd.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/types.h"
    -#include "../tools/flags.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define SERIAL_PORT "/dev/ttyS0"
    -#define TTYSIG_SET_DTR       (1 << 0)
    -#define TTYSIG_SET_RTS       (1 << 1)
    -#define TTYSIG_READ_STATUS   (1 << 2)
    -#define TTYSIG_INTERACTIVE   (1 << 3)
    -#define TTYSIG_NOPROMPT      (1 << 4)
    -
    -void set_status (int fd, int flag, int value)
    -
    -{
    -	int status;
    -	if (ioctl (fd, TIOCMGET, &status) == -1) error (1, errno, "TIOCMGET failed");
    -	if (value) status |= flag;
    -	else status &= ~flag;
    -	if (ioctl (fd, TIOCMSET, &status) == -1) error (1, errno, "TIOCMSET failed");
    -}
    -
    -void print_status (int fd)
    -
    -{
    -	int status;
    -	if (ioctl (fd, TIOCMGET, &status) == -1) error (1, errno, "TIOCMGET failed");
    -	printf ("--> DTR: %s\n", (status & TIOCM_DTR)? "+V": "-V");
    -	printf ("--> RTS: %s\n", (status & TIOCM_RTS)? "+V": "-V");
    -	printf ("<-- CTS: %s\n", (status & TIOCM_CTS)? "+V": "-V");
    -	printf ("<-- DSR: %s\n", (status & TIOCM_DSR)? "+V": "-V");
    -	printf ("<-- DCD: %s\n", (status & TIOCM_CD)? "+V": "-V");
    -	printf ("<-- RI : %s\n", (status & TIOCM_RI)? "+V": "-V");
    -}
    -
    -void comment (void)
    -
    -{
    -	int c;
    -	while ((c = getchar ()) != EOF)
    -	{
    -		if (c == '\n')
    -		{
    -			ungetc (c, stdin);
    -			break;
    -		}
    -	}
    -}
    -
    -int number (char *buf, int *val)
    -
    -{
    -	char *p;
    -	while (isspace (*buf)) ++buf;
    -	if (!isdigit (*buf))
    -	{
    -		error (0, 0, "\"%s\" is not a number", buf);
    -		return (-1);
    -	}
    -	*val = atoi (buf);
    -	p = buf;
    -	while (isdigit (*buf)) ++buf;
    -	if (*buf != '\0')
    -	{
    -		error (0, 0, "\"%s\" is not a number", p);
    -		return (-1);
    -	}
    -	return (0);
    -}
    -
    -void interactive (int fd, flag_t flags)
    -
    -{
    -	char buf [32];
    -	int i,
    -	c;
    -	int value;
    -	char *p;
    -	for (; ; )
    -	{
    -		if (!_anyset (flags, TTYSIG_NOPROMPT))
    -		{
    -			printf ("command (D #, R #, e, r, s, q): ");
    -			fflush (stdout);
    -		}
    -		i = 0;
    -		while ((c = getchar ()) != EOF)
    -		{
    -			if (c == '#')
    -			{
    -				comment ();
    -				continue;
    -			}
    -			if (c == '\n') break;
    -			if (i == sizeof (buf) - 1) error (1, 0, "input too large");
    -			buf [i++] = c;
    -		}
    -		if (c == EOF) return;
    -		if (i == 0) continue;
    -		buf [i] = '\0';
    -		switch (buf [0])
    -		{
    -		case 'D':
    -			if (number (buf + 1, &value)) break;
    -			set_status (fd, TIOCM_DTR, value);
    -			break;
    -		case 'e':
    -			p = buf + 1;
    -			if (*p == ' ') ++p;
    -			printf ("%s\n", p);
    -			fflush (stdout);
    -			break;
    -		case 'R':
    -			if (number (buf + 1, &value)) break;
    -			set_status (fd, TIOCM_RTS, value);
    -			break;
    -		case 'r':
    -			print_status (fd);
    -			break;
    -		case 's':
    -			if (number (buf + 1, &value)) break;
    -			sleep (value);
    -			break;
    -		case 'q':
    -		case 'Q':
    -			return;
    -			break;
    -		case '\0':
    -			break;
    -		default:
    -			error (0, 0, "invalid command");
    -		}
    -	}
    -}
    -
    -int main (int argc, char const ** argv)
    -
    -{
    -	int fd;
    -	static char const * optv [] =
    -	{
    -		"s:D:IR:rqv",
    -		"[ttysig script filename]",
    -		"Serial Line Signal Controller",
    -		"D n\tset DTR (0 = -V, 1 = +V) at startup",
    -		"I\tInteractive mode",
    -		"R n\tset RTS (0 = -V, 1 = +V) at startup",
    -		"r\tread current RTS/DTR values at startup",
    -		"s f\tserial port is (f) [" SERIAL_PORT "]",
    -		"q\tquiet mode",
    -		"v\tverbose mode",
    -		(char const *) (0)
    -	};
    -	signed c;
    -	optind = 1;
    -	flag_t flags = 0;
    -	uint8_t dtr_value;
    -	uint8_t rts_value;
    -	char *device = SERIAL_PORT;
    -	int input = -1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch ((char) (c))
    -		{
    -		case 'D':
    -			dtr_value = uintspec (optarg, 0, 1);
    -			_setbits (flags, TTYSIG_SET_DTR);
    -			break;
    -		case 'I':
    -			_setbits (flags, TTYSIG_INTERACTIVE);
    -			break;
    -		case 'R':
    -			rts_value = uintspec (optarg, 0, 1);
    -			_setbits (flags, TTYSIG_SET_RTS);
    -			break;
    -		case 'r':
    -			_setbits (flags, TTYSIG_READ_STATUS);
    -			break;
    -		case 's':
    -			device = optarg;
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if (argc == 1)
    -	{
    -		input = open (* argv, O_RDONLY);
    -		if (input == -1) error (1, errno, "%s", * argv);
    -		if (dup2 (input, STDIN_FILENO) == -1) error (1, errno, "%s", * argv);
    -		_setbits (flags, TTYSIG_INTERACTIVE | TTYSIG_NOPROMPT);
    -	}
    -	else if (argc > 0) error (1, 0, "Invalid arguments");
    -	fd = open (device, O_RDONLY);
    -	if (fd == -1) error (1, errno, "could not open %s", device);
    -	if (_anyset (flags, TTYSIG_SET_DTR)) set_status (fd, TIOCM_DTR, dtr_value);
    -	if (_anyset (flags, TTYSIG_SET_RTS)) set_status (fd, TIOCM_RTS, rts_value);
    -	if (_anyset (flags, TTYSIG_READ_STATUS)) print_status (fd);
    -	if (_anyset (flags, TTYSIG_INTERACTIVE)) interactive (fd, flags);
    -	close (fd);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/typelist.c.html b/docbook/typelist.c.html deleted file mode 100644 index bf936cf4..00000000 --- a/docbook/typelist.c.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - typelist.c - - - - - - - - - -
    -/* ===================================================================*
    - *
    - *   void typelist (struct _type_ const list [], size_t size, char const * comma, FILE * fp);
    - *
    - *   symbol.h
    - *
    - *   print a list of type names on the specified output stream;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TYPELIST_SOURCE
    -#define TYPELIST_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../tools/symbol.h"
    -
    -void typelist (struct _type_ const list [], size_t size, char const * comma, char const * quote, FILE * fp)
    -
    -{
    -	struct _type_ const * item = list;
    -	if (list) while ((size_t)(item - list) < size)
    -	{
    -		if (item > list)
    -		{
    -			fputs (comma, fp);
    -		}
    -		if ((quote) && (*quote))
    -		{
    -			fputc (*quote++, fp);
    -		}
    -		fputs (item->name, fp);
    -		if ((quote) && (*quote))
    -		{
    -			fputc (*quote++, fp);
    -		}
    -		item++;
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/typename.c.html b/docbook/typename.c.html deleted file mode 100644 index fd16bce1..00000000 --- a/docbook/typename.c.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - typename.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   char const * typename (struct _type_ const list [], size_t size, type_t type, char const * name);
    - *
    - *   symbol.h
    - *
    - *   return the name associated with a given type by searching a name
    - *   table arranged in ascending order by type; return the table name
    - *   if the type is found or argument name if not;
    - *
    - *   typedefs type_t and struct _type_ are defined in types.h;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TYPENAME_SOURCE
    -#define TYPENAME_SOURCE
    -
    -#include <unistd.h>
    -
    -#include "../tools/symbol.h"
    -
    -char const * typename (struct _type_ const list [], size_t size, type_t type, char const * name)
    -
    -{
    -	size_t lower = 0;
    -	size_t upper = size;
    -	while (lower < upper)
    -	{
    -		size_t index = (lower + upper) >> 1;
    -		signed order = type - list [index].type;
    -		if (order < 0)
    -		{
    -			upper = index - 0;
    -			continue;
    -		}
    -		if (order > 0)
    -		{
    -			lower = index + 1;
    -			continue;
    -		}
    -		return (list [index].name);
    -	}
    -	return (name);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/types.h.html b/docbook/types.h.html deleted file mode 100644 index 54a5351f..00000000 --- a/docbook/types.h.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - types.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   types.h - custom data type definitions and declarations;
    - *
    - *   this file is a subset of the original that includes only those
    - *   definitions and declaration needed for toolkit programs;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *   Contributor(s):
    - *
    - *   Werner Henze <w.henze@avm.de>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef TYPES_HEADER
    -#define TYPES_HEADER
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#if defined (_WIN64)
    -	#define SIZE_T_SPEC "%I64d"
    -	#define OFF_T_SPEC "%ld"
    -#elif defined (WIN32)
    -	#define SIZE_T_SPEC "%d"
    -	#define OFF_T_SPEC "%ld"
    -#elif defined (__APPLE__)
    -	#define SIZE_T_SPEC "%zu"
    -	#define OFF_T_SPEC "%lld"
    -#elif defined (__OpenBSD__)
    -	#define SIZE_T_SPEC "%zu"
    -	#define OFF_T_SPEC "%lld"
    -#elif defined (__linux__)
    -	#define SIZE_T_SPEC "%zu"
    -	#define OFF_T_SPEC "%ld"
    -#else
    -error "Unknown environment."
    -#endif
    -
    -/*====================================================================*
    - *   macros;
    - *--------------------------------------------------------------------*/
    -
    -#define MONIKER(x) #x
    -#define LITERAL(x) MONIKER(x)
    -#define SIZEOF(array) (sizeof(array)/sizeof(array[0]))
    -
    -/*====================================================================*
    - *   new POSIX types;
    - *--------------------------------------------------------------------*/
    -
    -typedef signed errno_t;
    -typedef signed signo_t;
    -typedef unsigned char byte;
    -
    -/*====================================================================*
    - *   define C++ style true and false for use in standard C programs;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __cplusplus
    -
    -typedef enum
    -
    -{
    -	false,
    -	true
    -}
    -
    -bool;
    -
    -#endif
    -
    -/*====================================================================*
    - *   cope with structure packing vagaries;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef __packed
    -#ifdef __GNUC__
    -#define __packed __attribute__ ((packed))
    -#else
    -#define __packed
    -#endif
    -#endif
    -
    -/*====================================================================*
    - *   define flagword (bitmap) variable type for clarity;
    - *--------------------------------------------------------------------*/
    -
    -typedef signed file_t;
    -typedef signed sock_t;
    -typedef signed code_t;
    -typedef unsigned char byte_t;
    -typedef unsigned type_t;
    -typedef unsigned flag_t;
    -typedef struct _file_
    -
    -{
    -	file_t file;
    -	char const *name;
    -}
    -
    -file;
    -typedef struct _term_
    -
    -{
    -	char const * term;
    -	char const * text;
    -}
    -
    -TERM;
    -typedef struct _type_
    -
    -{
    -	type_t type;
    -	char const * name;
    -}
    -
    -TYPE;
    -typedef struct _code_
    -
    -{
    -	code_t code;
    -	char const * name;
    -}
    -
    -CODE;
    -
    -/*====================================================================*
    - *   end definitions and declarations;
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/uintspec.c.html b/docbook/uintspec.c.html deleted file mode 100644 index 3cc3e7b4..00000000 --- a/docbook/uintspec.c.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - uintspec.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   uint64_t uintspec (char const * string, uint64_t minimum, uint64_t maximum);
    - *
    - *   number.h
    - *
    - *   convert a numeric string to an unsigned integer; confirm that
    - *   the result does not exceed the specified range; report errors
    - *   and terminate the program on error;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef UINTSPEC_SOURCE
    -#define UINTSPEC_SOURCE
    -
    -#include <stdlib.h>
    -#include <inttypes.h>
    -#include <ctype.h>
    -#include <errno.h>
    -
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -#include "../tools/types.h"
    -
    -uint64_t uintspec (char const * string, uint64_t minimum, uint64_t maximum)
    -
    -{
    -	char const * number = string;
    -	unsigned radix = RADIX_DEC;
    -	uint64_t value = 0;
    -	unsigned digit;
    -	if (*number == '0')
    -	{
    -		number++;
    -		if ((*number == 'b') || (*number == 'B'))
    -		{
    -			radix = RADIX_BIN;
    -			number++;
    -		}
    -		else if ((*number == 'x') || (*number == 'X'))
    -		{
    -			radix = RADIX_HEX;
    -			number++;
    -		}
    -	}
    -	while ((digit = todigit (*number)) < radix)
    -	{
    -		value *= radix;
    -		value += digit;
    -		number++;
    -	}
    -	if (*number)
    -	{
    -		error (1, EINVAL, "Have '%s' but want base %d integer", string, radix);
    -	}
    -	if ((value < minimum) || (value > maximum))
    -	{
    -		error (1, ERANGE, "Have %s but want %" PRId64 " thru %" PRId64, string, minimum, maximum);
    -	}
    -	return (value);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/unistd.h.html b/docbook/unistd.h.html deleted file mode 100644 index c339c169..00000000 --- a/docbook/unistd.h.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - unistd.h - - - - - - - - - -
    -/*====================================================================*
    - *      
    - *   Copyright (c) 2011 by Qualcomm Atheros.
    - *   
    - *   Permission to use, copy, modify, and/or distribute this software 
    - *   for any purpose with or without fee is hereby granted, provided 
    - *   that the above copyright notice and this permission notice appear 
    - *   in all copies.
    - *   
    - *   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 
    - *   WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL  
    - *   THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR 
    - *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
    - *   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 
    - *   NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
    - *   CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    - *   
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    -
    - *
    - *   unistd.h - substitute unistd.h file for Windows;
    - *
    - *   this is an important POSIX header that Microsoft ommits; 
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *	Abdel Younes <younes@leacom.fr>
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef UNISTD_HEADER
    -#define UNISTD_HEADER
    - 
    -/*====================================================================*
    - *   system header files
    - *--------------------------------------------------------------------*/
    -
    -#if defined (WIN32)
    -#include <io.h>
    -#endif
    -
    - /*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#define STDIN_FILENO 0
    -#define STDOUT_FILENO 1
    -#define STDERR_FILENO 2
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#if defined (WIN32)
    -#define sleep(x) Sleep(1000*(x))
    -#define strcasecmp(a,b) stricmp(a,b)
    -typedef signed ssize_t;
    -#endif
    - 
    -#if !defined (_MSC_VER) || _MSC_VER < 1500
    -#define vsnprintf _vsnprintf
    -#endif
    -
    -#define snprintf _snprintf
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    - 
    -
    -
    -
    - - - diff --git a/docbook/upgrade.sh.html b/docbook/upgrade.sh.html deleted file mode 100644 index 01632c29..00000000 --- a/docbook/upgrade.sh.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - upgrade.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: scripts/upgrade.sh
    -
    -# ====================================================================
    -# host symbols;
    -# --------------------------------------------------------------------
    -
    -. ${SCRIPTS}/hardware.sh
    -. ${SCRIPTS}/firmware.sh
    -
    -# ====================================================================
    -# confirm connection;
    -# --------------------------------------------------------------------
    -
    -echo -n "Interface [${ETH}]: "; read  
    -if [ ! -z ${REPLY} ]; then
    -	ETH=${REPLY}
    -fi
    -
    -# ====================================================================
    -# check connection;
    -# --------------------------------------------------------------------
    -
    -int6kwait -xqsi ${ETH} 
    -if [ ${?} != 0 ]; then
    -	echo "Device is not connected"
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# determine identity;
    -# --------------------------------------------------------------------
    -
    -MAC=$(int6kid -Ai ${ETH})
    -DAK=$(int6kid -Di ${ETH})
    -NMK=$(int6kid -Mi ${ETH})
    -
    -# ====================================================================
    -# confirm identity;
    -# --------------------------------------------------------------------
    -
    -echo -n "MAC [${MAC}]: "; read
    -if [ ! -z ${REPLY} ]; then
    -	MAC="${REPLY}"                  
    -fi
    -
    -echo -n "DAK [${DAK}]: "; read
    -if [ ! -z ${REPLY} ]; then
    -	DAK="${REPLY}"                  
    -fi
    -
    -echo -n "NMK [${NMK}]: "; read
    -if [ ! -z ${REPLY} ]; then
    -	NMK="${REPLY}"                  
    -fi
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    -modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB}
    -if [ ${?} != 0 ]; then
    -	exit 1
    -fi
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    -int6k -i ${ETH} -P ${PIB} -N ${NVM} -F
    -if [ ${?} != 0 ]; then
    -	exit 1
    -fi
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    -int6k -i ${ETH} -I
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    - exit 0
    -
    -
    -
    - - - diff --git a/docbook/upgradep.sh.html b/docbook/upgradep.sh.html deleted file mode 100644 index 18ce84c4..00000000 --- a/docbook/upgradep.sh.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - upgradep.sh - - - - - - - - - -
    -#!/bin/sh
    -# file: scripts/upgradep.sh
    -
    -# ====================================================================
    -# host symbols;
    -# --------------------------------------------------------------------
    -
    -. ${SCRIPTS}/hardware.sh
    -. ${SCRIPTS}/firmware.sh
    -
    -# ====================================================================
    -# confirm connection;
    -# --------------------------------------------------------------------
    -
    -echo -n "Interface [${ETH}]: "; read  
    -if [ ! -z ${REPLY} ]; then
    -	ETH=${REPLY}
    -fi
    -
    -# ====================================================================
    -# check connection;
    -# --------------------------------------------------------------------
    -
    -int6kwait -xqsi ${ETH} 
    -if [ ${?} != 0 ]; then
    -	echo "Device is not connected"
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# file symbols;
    -# --------------------------------------------------------------------
    -
    -MAC=$(int6kid -Ai ${ETH})
    -DAK=$(int6kid -Di ${ETH})
    -NMK=$(int6kid -Mi ${ETH})
    -
    -# ====================================================================
    -# confirm MAC;
    -# --------------------------------------------------------------------
    -
    -echo -n "MAC [${MAC}]: "; read
    -if [ ! -z ${REPLY} ]; then
    - 	MAC="${REPLY}"                  
    -fi
    -
    -echo -n "DAK [${DAK}]: "; read
    -if [ ! -z ${REPLY} ]; then
    - 	DAK="${REPLY}"                  
    -fi
    -
    -echo -n "NMK [${NMK}]: "; read
    -if [ ! -z ${REPLY} ]; then
    - 	NMK="${REPLY}"                  
    -fi
    -
    -# ====================================================================
    -# 
    -# --------------------------------------------------------------------
    -
    -modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB}  
    -if [ ${?} != 0 ]; then
    -	exit 1
    -fi
    -
    -# ====================================================================
    -# 
    -# --------------------------------------------------------------------
    -
    -# flash PIB only
    -# int6kp -i ${ETH} -P ${PIB} -D ${DAK} -C2
    -
    -# flash FW and PIB
    -int6kp -i ${ETH} -P ${PIB} -N ${NVM} -D ${DAK} -F
    -
    -if [ ${?} != 0 ]; then
    -	exit 1
    -fi
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    -int6k -i ${ETH} -I
    -
    -# ====================================================================
    -#  
    -# --------------------------------------------------------------------
    -
    -exit 0
    -
    -
    -
    - - - diff --git a/docbook/usb.h.html b/docbook/usb.h.html deleted file mode 100644 index 41560e2b..00000000 --- a/docbook/usb.h.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - usb.h - - - - - - - - - -
    -/*
    - * Copyright (c) 2006 Paolo Abeni (Italy)
    - * All rights reserved.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - *
    - * 1. Redistributions of source code must retain the above copyright
    - * notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - * notice, this list of conditions and the following disclaimer in the
    - * documentation and/or other materials provided with the distribution.
    - * 3. The name of the author may not be used to endorse or promote 
    - * products derived from this software without specific prior written 
    - * permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    - *
    - * Basic USB data struct
    - * By Paolo Abeni <paolo.abeni@email.it>
    - *
    - * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $
    - */
    - 
    -#ifndef _PCAP_USB_STRUCTS_H__
    -#define _PCAP_USB_STRUCTS_H__
    -
    -/* 
    - * possible transfer mode
    - */
    -#define URB_TRANSFER_IN   0x80
    -#define URB_ISOCHRONOUS   0x0
    -#define URB_INTERRUPT     0x1
    -#define URB_CONTROL       0x2
    -#define URB_BULK          0x3
    -
    -/*
    - * possible event type
    - */
    -#define URB_SUBMIT        'S'
    -#define URB_COMPLETE      'C'
    -#define URB_ERROR         'E'
    -
    -/*
    - * USB setup header as defined in USB specification.
    - * Appears at the front of each packet in DLT_USB captures.
    - */
    -typedef struct _usb_setup {
    -	u_int8_t bmRequestType;
    -	u_int8_t bRequest;
    -	u_int16_t wValue;
    -	u_int16_t wIndex;
    -	u_int16_t wLength;
    -} pcap_usb_setup;
    -
    -/*
    - * Header prepended by linux kernel to each event.
    - * Appears at the front of each packet in DLT_USB_LINUX captures.
    - */
    -typedef struct _usb_header {
    -	u_int64_t id;
    -	u_int8_t event_type;
    -	u_int8_t transfer_type;
    -	u_int8_t endpoint_number;
    -	u_int8_t device_address;
    -	u_int16_t bus_id;
    -	char setup_flag;/*if !=0 the urb setup header is not present*/
    -	char data_flag; /*if !=0 no urb data is present*/
    -	int64_t ts_sec;
    -	int32_t ts_usec;
    -	int32_t status;
    -	u_int32_t urb_len;
    -	u_int32_t data_len; /* amount of urb data really present in this event*/
    -	pcap_usb_setup setup;
    -} pcap_usb_header;
    -
    -#endif
    -
    - - - diff --git a/docbook/version.c.html b/docbook/version.c.html deleted file mode 100644 index 9258c895..00000000 --- a/docbook/version.c.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - version.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void version();
    - *
    - *   version.h
    - *
    - *   print program and package version information on stdout;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef VERSION_SOURCE
    -#define VERSION_SOURCE
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -
    -#include "../tools/version.h"
    -
    -void version ()
    -
    -{
    -	extern char const * program_name;
    -	printf ("%s ", program_name);
    -	printf (PROJECT "-");
    -	printf (VERSION " ");
    -	printf (RELEASE " ");
    -	printf ("ISO C ");
    -	printf (COMPANY " ");
    -	printf (COMPILE "\n");
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/version.h.html b/docbook/version.h.html deleted file mode 100644 index 06d46672..00000000 --- a/docbook/version.h.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - version.h - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   version.h - package version definitions and declarations;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef VERSION_HEADER
    -#define VERSION_HEADER
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define COMPANY "Qualcomm Atheros, San Jose CA, USA"
    -#define PACKAGE "Qualcomm Atheros Open Powerline Toolkit"
    -#define PROJECT "open-plc-utils"
    -#define VERSION "0.0.6"
    -#define RELEASE "OSRQCA-929"
    -#define COMPILE __TIME__ " " __DATE__
    -#define CONTACT "cmaier@qca.qualcomm.com"
    -#define LICENSE "Clear BSD"
    -
    -/*====================================================================*
    - *   functions;
    - *--------------------------------------------------------------------*/
    -
    -void version (void);
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/vlan.h.html b/docbook/vlan.h.html deleted file mode 100644 index 23a5a661..00000000 --- a/docbook/vlan.h.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - vlan.h - - - - - - - - - -
    -/*-
    - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
    - *	The Regents of the University of California.  All rights reserved.
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - * 1. Redistributions of source code must retain the above copyright
    - *    notice, this list of conditions and the following disclaimer.
    - * 2. Redistributions in binary form must reproduce the above copyright
    - *    notice, this list of conditions and the following disclaimer in the
    - *    documentation and/or other materials provided with the distribution.
    - * 3. All advertising materials mentioning features or use of this software
    - *    must display the following acknowledgement:
    - *      This product includes software developed by the University of
    - *      California, Berkeley and its contributors.
    - * 4. Neither the name of the University nor the names of its contributors
    - *    may be used to endorse or promote products derived from this software
    - *    without specific prior written permission.
    - *
    - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    - * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    - * SUCH DAMAGE.
    - *
    - * @(#) $Header: /tcpdump/master/libpcap/pcap/vlan.h,v 1.1.2.2 2008-08-06 07:45:59 guy Exp $
    - */
    -
    -#ifndef lib_pcap_vlan_h
    -#define lib_pcap_vlan_h
    -
    -struct vlan_tag {
    -	u_int16_t	vlan_tpid;		/* ETH_P_8021Q */
    -	u_int16_t	vlan_tci;		/* VLAN TCI */
    -};
    -
    -#define VLAN_TAG_LEN	4
    -
    -#endif
    -
    - - - diff --git a/docbook/weeder.1.html b/docbook/weeder.1.html deleted file mode 100644 index 456fd6b7..00000000 --- a/docbook/weeder.1.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - weeder.1 - - - - - - - - - -
    -weeder(1)                                    Qualcomm Atheros Open Powerline Toolkit                                   weeder(1)
    -
    -NAME
    -       weeder - Weeder Solid State Relay Module Controller
    -
    -SYNOPSIS
    -       weeder [options] [attenuation]
    -
    -DESCRIPTION
    -       Set  or get the attenuation level on the Qualcomm Atheros Production Test System using a local RS-232 communication port.
    -       Attenuator settings are changed if an attenuation value is specified.  Attenuator settings are read and displayed  if  no
    -       attenuation  value  is specified.  The serial port settings must be configured before running this program.  Settings are
    -       9600 baud, no parity, 8 data and 1 stop bit.  See datasheet http://www.weedtech.com/wtssr-m.pdf for more information.
    -
    -OPTIONS
    -       -e echo
    -              Enable or disable echo mode.  The value of echo can be 1=on or 0=off.  Alternately, keywords "on" and "off" can be
    -              used.  Atheros recommends that you always disable echo when using this program to speed relay switching.
    -
    -       -m mode
    -              Turn  on  or off the Device Under Test power.  The value of mode can be 1=on or 0=off.  Alternately, keywords "on"
    -              and "off" can be used.
    -
    -       -o units
    -              Change relay control module order.  Individual relay control modules are assigned a digital address  that  can  be
    -              referenced  using  the  UTF-8  letters  "[A-P]" then "[a-p]".  The Atheros PTS is configured so that module "B" is
    -              activated before module "A".  This options lets you specify some other module order.  The default value is "BA" to
    -              indicate "B" before "A".
    -
    -       -p port
    -              The  name  of  the  serial  port.   On  Linux, the name is usually "/dev/ttyS[0-4]".  On OS/X, the name is usually
    -              "/dev/cua[0-4]".  On Windows, the name is "com[0-9]:".  The default is "/dev/ttyS0" on Linux and "com1:"  on  Win‐
    -              dows.   If  environment  string  "WEEDER"  is defined then it takes precedence over the default serial port.  This
    -              option then takes precedence over either default.  Belkin USB-to-serial cables are named "/dev/ttyUSB0" on Linux.
    -
    -       -w wait
    -              Wait time in milliseconds.  Serial I/O operation are slow and a  delay  is  needed  after  each  write  operation.
    -              Unfortunately,  different  operating systems require different wait times.  This options lets you adjust the time.
    -              The default is 10 milliseconds which should be adequate on most systems.
    -
    -ARGUMENTS
    -       attenuation
    -              The attenuation in decibels.  The attenuation may be expressed in decimal,  binary  or  hexadecimal  when  setting
    -              attenuator but is displayed in decimal when reading the attenuator.  Binary values start with "0b" and hexadecimal
    -              values start with "0x".
    -
    -EXAMPLES
    -       The following example turns the Device Under Test power on and configures the attenuator for 72db attenuation.  Option -m
    -       is not necessary if the Device Under Test power is already on.
    -
    -          # weeder -m 1 72
    -
    -       The  next  example  configures  the controller for 42db attenuation.  There is no needed to turn the Device Under Test on
    -       again because it remains on until turned off.
    -
    -          # weeder 42
    -
    -       The next example configures the controller for 56db attenuation and turns the Device Under Test off.
    -
    -          # weeder -m off 56
    -
    -       The next example displays the current attenuation on the console because no attenuation value was specified.
    -
    -          # weeder
    -
    -REFERENCES
    -       Information shown above applies to WTSSR-M Solid State Relay Module by Weeder Technologies, 90-A Beal Pkwy NW, Fort  Wal‐
    -       ton Beach FL 32548 USA; Tel +44 850 863 5723.
    -
    -SEE ALSO
    -       amp(1), ptsctl(1), WTSSR-M(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                   weeder(1)
    -
    - - - diff --git a/docbook/weeder.c.html b/docbook/weeder.c.html deleted file mode 100644 index f6f16a10..00000000 --- a/docbook/weeder.c.html +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - weeder.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *
    - *   weeder.c - Weeder Solid State Relay Module Controller;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *	Nathaniel Houghton <nhoughto@qca.qualcomm.com>
    - *	Mathieu Olivari <mathieu@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <string.h>
    -#include <ctype.h>
    -
    -#if defined (__linux__)
    -#	include <termios.h>
    -#elif defined (__APPLE__)
    -#	include <termios.h>
    -#elif defined (__OpenBSD__)
    -#	include <termios.h>
    -#elif defined (WIN32)
    -#	include <windows.h>
    -#else
    -#error "Unknown Environment"
    -#endif
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/putoptv.h"
    -#include "../tools/version.h"
    -#include "../tools/number.h"
    -#include "../tools/symbol.h"
    -#include "../tools/timer.h"
    -#include "../tools/files.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/uintspec.c"
    -#include "../tools/synonym.c"
    -#include "../tools/todigit.c"
    -#include "../tools/error.c"
    -#endif
    -
    -/*====================================================================*
    - *   program constants;
    - *--------------------------------------------------------------------*/
    -
    -#define WEEDER_UNITS "BA"
    -#define WEEDER_LEDS 5
    -#define WEEDER_BITS 7
    -#define WEEDER_WAIT 25
    -#define WEEDER_ECHO 0
    -#define WEEDER_MODE 1
    -
    -#define WEEDER_BUFFER_LENGTH 10
    -#define WEEDER_STRING_LENGTH 15
    -
    -#ifdef WIN32
    -#	define WEEDER_PORT "com1:"
    -#else
    -#	define WEEDER_PORT "/dev/ttyS0"
    -#endif
    -
    -#define WEEDER_SILENCE (1 << 0)
    -#define WEEDER_VERBOSE (1 << 1)
    -#define WEEDER_DISPLAY (1 << 2)
    -#define WEEDER_NEWLINE (1 << 2)
    -
    -/*====================================================================*
    - *   program variables;
    - *--------------------------------------------------------------------*/
    -
    -static struct _term_ const modes [] =
    -
    -{
    -	{
    -		"off",
    -		"0"
    -	},
    -	{
    -		"on",
    -		"1"
    -	}
    -};
    -
    -static char buffer [WEEDER_BUFFER_LENGTH];
    -static char string [WEEDER_STRING_LENGTH];
    -static signed length = 0;
    -static signed offset = 0;
    -
    -/*====================================================================*
    - *
    - *   void function1 (struct _file_ * port, char const * units, unsigned wait, unsigned echo);
    - *
    - *   send echo command to Weeder Solid State Relay modules B then A;
    - *   Standard Atheros relay modules were wired in reverse order for
    - *   some reason;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function1 (struct _file_ * port, char const * units, unsigned wait, unsigned echo)
    -
    -{
    -	extern char buffer [];
    -	extern signed length;
    -	while (*units)
    -	{
    -		length = 0;
    -		buffer [length++] = *units++;
    -		buffer [length++] = 'X';
    -		buffer [length++] = '0' + (echo & 1);
    -		buffer [length++] = '\r';
    -		if (write (port->file, buffer, length) != length)
    -		{
    -			error (1, errno, FILE_CANTSAVE, port->name);
    -		}
    -		SLEEP (wait);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function2 (struct _file_ * port, char const * units, unsigned wait, unsigned mode, unsigned data);
    - *
    - *   send write command to Weeder Solid State Relay modules B then A
    - *   because Qualcomm Atheros relay modules are wired in reverse order
    - *   for some reason;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function2 (struct _file_ * port, char const * units, unsigned wait, unsigned mode, unsigned data)
    -
    -{
    -	extern char buffer [WEEDER_BUFFER_LENGTH];
    -	extern signed length;
    -	length = 0;
    -	buffer [length++] = *units++;
    -	buffer [length++] = 'W';
    -	buffer [length++] = '0' + (mode & 1);
    -	buffer [length++] = '0';
    -	buffer [length++] = '0';
    -	while (length < WEEDER_BITS)
    -	{
    -		buffer [length++] = '0' + (data & 1);
    -		data >>= 1;
    -	}
    -	buffer [length++] = '\r';
    -	if (write (port->file, buffer, length) != length)
    -	{
    -		error (1, errno, FILE_CANTSAVE, port->name);
    -	}
    -	SLEEP (wait);
    -	length = 0;
    -	buffer [length++] = *units++;
    -	buffer [length++] = 'W';
    -	while (length < WEEDER_BITS)
    -	{
    -		buffer [length++] = '0' + (data & 1);
    -		data >>= 1;
    -	}
    -	buffer [length++] = '\r';
    -	if (write (port->file, buffer, length) != length)
    -	{
    -		error (1, errno, FILE_CANTSAVE, port->name);
    -	}
    -	SLEEP (wait);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void function3 (struct _file_ * port, char const * units, unsigned wait);
    - *
    - *   read weeder solid state controller and display settings on the
    - *   console as attenuation;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void function3 (struct _file_ * port, char const * units, unsigned wait)
    -
    -{
    -	extern char buffer [WEEDER_BUFFER_LENGTH];
    -	extern char string [WEEDER_STRING_LENGTH];
    -	extern signed length;
    -	extern signed offset;
    -	unsigned number = 0;
    -	memset (string, 0, sizeof (string));
    -	for (offset = 0; *units; offset += WEEDER_LEDS)
    -	{
    -		length = 0;
    -		buffer [length++] = *units++;
    -		buffer [length++] = 'R';
    -		buffer [length++] = '\r';
    -		if (write (port->file, buffer, length) != length)
    -		{
    -			error (1, errno, FILE_CANTSAVE, port->name);
    -		}
    -		SLEEP (wait);
    -		memset (buffer, 0, sizeof (buffer));
    -		if (read (port->file, buffer, WEEDER_LEDS + 2) == -1)
    -		{
    -			error (1, errno, FILE_CANTREAD, port->name);
    -		}
    -		SLEEP (wait);
    -		memcpy (&string [offset], &buffer [1], WEEDER_LEDS);
    -	}
    -	while (offset-- > 3)
    -	{
    -		number <<= 1;
    -		number |= string [offset] - '0';
    -	}
    -	printf ("%d\n", number);
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"e:m:o:p:iqrvw:",
    -		"",
    -		"Weeder Solid State Relay Module Controller",
    -		"e n\techo is (n) [" LITERAL (WEEDER_ECHO) "]",
    -		"m n\tmode is (n) [" LITERAL (WEEDER_MODE) "]",
    -		"o s\tunit order is (s) [" WEEDER_UNITS "]",
    -		"p f\tport is (f) [" WEEDER_PORT "]",
    -		"q\tquiet mode",
    -		"r\tread attenuator value",
    -		"v\tverbose mode",
    -		"w n\twait (n) millseconds [" LITERAL (WEEDER_WAIT) "]",
    -		(char const *) (0)
    -	};
    -	struct _file_ port =
    -	{
    -		-1,
    -		WEEDER_PORT
    -	};
    -
    -#if defined (WIN32)
    -
    -	HANDLE hSerial;
    -	DCB dcbSerial =
    -	{
    -		0
    -	};
    -
    -#else
    -
    -	struct termios termios;
    -
    -#endif
    -
    -	char const * units = WEEDER_UNITS;
    -	unsigned wait = WEEDER_WAIT;
    -	unsigned echo = WEEDER_ECHO;
    -	unsigned mode = WEEDER_MODE;
    -	unsigned data = 0;
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	if (getenv ("WEEDER"))
    -	{
    -		port.name = strdup (getenv ("WEEDER"));
    -	}
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'e':
    -			echo = (unsigned)(uintspec (synonym (optarg, modes, SIZEOF (modes)), 0, 1));
    -			break;
    -		case 'm':
    -			mode = (unsigned)(uintspec (synonym (optarg, modes, SIZEOF (modes)), 0, 1));
    -			break;
    -		case 'n':
    -			_setbits (flags, WEEDER_NEWLINE);
    -			break;
    -		case 'o':
    -			units = optarg;
    -			break;
    -		case 'p':
    -			port.name = optarg;
    -			break;
    -		case 'w':
    -			wait = (unsigned)(uintspec (optarg, 5, 100));
    -			break;
    -		case 'q':
    -			_setbits (flags, WEEDER_SILENCE);
    -			break;
    -		case 'r':
    -			_setbits (flags, WEEDER_DISPLAY);
    -			break;
    -		case 'v':
    -			_setbits (flags, WEEDER_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	if ((argc) && (* argv))
    -	{
    -		data = (unsigned)(uintspec (* argv, 0, 0x7F));
    -	}
    -
    -#if defined (WIN32)
    -
    -	hSerial = CreateFile (port.name, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
    -	if (hSerial == INVALID_HANDLE_VALUE)
    -	{
    -		error (1, errno, FILE_CANTOPEN, port.name);
    -	}
    -	dcbSerial.DCBlength = sizeof (dcbSerial);
    -	if (!GetCommState (hSerial, &dcbSerial))
    -	{
    -		error (1, 0, FILE_CANTREAD " state", port.name);
    -	}
    -	dcbSerial.BaudRate = CBR_9600;
    -	dcbSerial.ByteSize = 8;
    -	dcbSerial.StopBits = ONESTOPBIT;
    -	dcbSerial.Parity = NOPARITY;
    -	if (!SetCommState (hSerial, &dcbSerial))
    -	{
    -		error (1, 0, FILE_CANTSAVE, port.name);
    -	}
    -	CloseHandle (hSerial);
    -	if ((port.file = open (port.name, O_BINARY | O_RDWR)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN " state", port.name);
    -	}
    -
    -#else
    -
    -	if ((port.file = open (port.name, O_RDWR|O_NOCTTY|O_NDELAY)) == -1)
    -	{
    -		error (1, 0, FILE_CANTOPEN, port.name);
    -	}
    -	tcgetattr (port.file, &termios);
    -	termios.c_cflag = CS8;
    -	cfsetospeed (&termios, B9600);
    -	tcsetattr (port.file, TCSANOW, &termios);
    -
    -#endif
    -
    -	function1 (&port, units, wait, echo);
    -	if ((argc) && (* argv))
    -	{
    -		function2 (&port, units, wait, mode, data);
    -	}
    -	if (_anyset (flags, WEEDER_DISPLAY))
    -	{
    -		function3 (&port, units, wait);
    -	}
    -	close (port.file);
    -	exit (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/xml2pib.1.html b/docbook/xml2pib.1.html deleted file mode 100644 index f30ebdb8..00000000 --- a/docbook/xml2pib.1.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - xml2pib.1 - - - - - - - - - -
    -xml2pib(1)                                   Qualcomm Atheros Open Powerline Toolkit                                  xml2pib(1)
    -
    -NAME
    -       xml2pib - Qualcomm Atheros XML driven PIB editor
    -
    -SYNOPSIS
    -       xml2pib [options] pib-file [pib-file] [...]
    -
    -DESCRIPTION
    -       The  Atheros  PIB  XML  Editor  modifies an Atheros PIB file based on XML instructions defined in one or more instruction
    -       files.  Instruction files must be valid XML and conform to schema file piboffset.xsd or errors will occur.  Always  vali‐
    -       date  XML files against this schema with a validating parser before submitting them to this program.  Firefox or Internet
    -       Explorer are suitable for validation purposes purpose.
    -
    -       This program is part of the Qualcomm Atheros Powerline Toolkit.  See the AMP man page for an  overview  and  installation
    -       instructions.
    -
    -OPTIONS
    -       -f filename
    -              The  XML  instruction  file.   XML instruction files must conform to the Qualcomm Atheros scheme designed for this
    -              purpose.  If more that one .xml file is specified then edits are applied in order of filename such that later edit
    -              instructions  can  over-write eariler instructions.  Instruction files usually have a .xml extension but this pro‐
    -              gram makes no assumption based on filename and does not enforce any filename conventions.
    -
    -       -o     Print the appropriate XML schema on stdout.  This schema should be used to validate XML instructions using a vali‐
    -              dating parser such as Firefox or Microsoft Internet Explorer.
    -
    -       -q     Suppresses printing of progress messages.  This option has no effect at this time.
    -
    -       -v     Print additional information.  This option has no effect at this time.
    -
    -       -?,--help
    -              Print program help summary on stdout.  This option takes precedence over other options on the command line.
    -
    -       -!,--version
    -              Print program version information on stdout.  This option takes precedence over other options on the command line.
    -              Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version  of
    -              the Linux Toolkit you are using.
    -
    -ARGUMENTS
    -       pib-file
    -              An Atheros parameter filename.  Only one parameter file can be edited at a time and so care must be taken to avoid
    -              the use of wildcard filenames.  Parameter files usually have a .pib extension but this program makes no assumption
    -              based on filename and does not enforce any filename conventions.
    -
    -SCHEMA
    -       The official Atheros XML PIB Edit schema follows.  It defines general instruction file structure and the elements used to
    -       edit PIB files.  This file should be a controlled document and instruction files should always be  validated  against  it
    -       before using them to edit a PIB file.  An explanation of this file appears below.
    -
    -          <?xml version='1.0' encoding='iso-8859-1'?>
    -          <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' elementFormDefault='qualified'>
    -               <xs:element name='pib'>
    -                       <xs:complexType>
    -                               <xs:sequence>
    -                                       <xs:element maxOccurs='unbounded' ref='object'/>
    -                                       </xs:sequence>
    -                               </xs:complexType>
    -                       </xs:element>
    -               <xs:element name='object'>
    -                       <xs:complexType>
    -                               <xs:attribute name='name' use='required' type='xs:NCName'/>
    -                               <xs:sequence>
    -                                       <xs:sequence>
    -                                               <xs:element ref='offset'/>
    -                                               <xs:element ref='length'/>
    -                                               </xs:sequence>
    -                                       <xs:choice>
    -                                               <xs:element ref='array'/>
    -                                               <xs:element ref='dataString'/>
    -                                               <xs:element ref='dataHuge'/>
    -                                               <xs:element ref='dataLong'/>
    -                                               <xs:element ref='dataWord'/>
    -                                               <xs:element ref='dataByte'/>
    -                                               </xs:choice>
    -                                       </xs:sequence>
    -                               </xs:complexType>
    -                       </xs:element>
    -               <xs:element name='length' type='xs:positiveInteger'/>
    -               <xs:element name='offset' type='xs:hexBinary'/>
    -               <xs:element name='array'>
    -                       <xs:complexType>
    -                               <xs:choice maxOccurs='unbounded'>
    -                                       <xs:element ref='dataByte'/>
    -                                       <xs:element ref='dataHex'/>
    -                                       </xs:choice>
    -                               </xs:complexType>
    -                       </xs:element>
    -               <xs:element name='dataString' type='xs:string'/>
    -               <xs:element name='dataHuge' type='xs:unsignedLong'/>
    -               <xs:element name='dataLong' type='xs:unsignedInt'/>
    -               <xs:element name='dataWord' type='xs:unsignedShort'/>
    -               <xs:element name='dataByte' type='xs:unsignedByte'/>
    -               <xs:element name='dataHex' type='xs:hexBinary'/>
    -               </xs:schema>
    -
    -ELEMENTS
    -       <pib>  The Parameter Information Block subject to edit.  There is exactly one pib defined in an instruction file.
    -
    -       <object>
    -              A  data region withn a pib.  There must be at least one object defined inside a pib.  Each object has an offset, a
    -              length and data where data is expressed as one dataString, a dataByte, a dataHex or an array as  described  below.
    -              The name attribute optional but may be used for clarity or for reporting purposes.
    -
    -       <offset>
    -              The  relative  position  of the object in bytes expressed in hexadecimal.  The offset plus the length of an object
    -              cannot exceed PIB length or an error will occur.  The offset and length element can appear  in  either  order  but
    -              both must appear before the data element.  The offset element is required.
    -
    -       <length>
    -              The  extent  of  the  object  expressed  in  decimal bytes.  The offset plus length of an object cannot exceed PIB
    -              length.  The the offset and length elements can occur in either order but both must precede the data element.  The
    -              length  element  is required for elements array and dataString but may be omitted for elements dataHuge, dataLong,
    -              dataWord and dataByte.
    -
    -       <array>
    -              A sequence of dataByte and/or dataHex elements.  The implied length is determined by array members but must  equal
    -              the object length attribute or an error will occur.  A dataString is illegal inside an array.
    -
    -       <dataString>
    -              Any  sequence  of  printable  characters.  The implied length is 1 byte longer than the number of characters.  The
    -              string will be truncated or padded with NUL bytes  to  match  the  object  length  attribute.   An  object  length
    -              attribute of 0 stores one NUL byte.  A dataString element is illegal within an array block.
    -
    -       <dataHuge>
    -              A  unsigned  decimal  integer string that represents any 64 bit binary value.  The implied length is 8 bytes.  The
    -              object length attribute is ignored and may be omitted.
    -
    -       <dataLong>
    -              A unsigned decimal integer string that represents any 32 bit binary value.  The implied length is  4  bytes.   The
    -              object length attribute is ignored and may be omitted.
    -
    -       <dataWord>
    -              A  unsigned  decimal  integer string that represents any 16 bit binary value.  The implied length is 2 bytes.  The
    -              object length attribute is ignored and may be omitted.
    -
    -       <dataByte>
    -              An unsigned  decimal digit string that represents any 8 bit binary value.  The implied  length  is  1  byte.   The
    -              object length attribute is ignored and may be omitted.
    -
    -       <dataHex>
    -              A  hexadecimal  digit  string that represents one byte for each digit pair (octet) present.  There must be an even
    -              number of digits or an error will occur.  The resulting length must equal  the  object  length  unless  the  value
    -              appears inside an array.  Inside an array, the resulting length must not exceed the remaining array length.
    -
    -PROCESS
    -       The  program  reads  one PIB file and replaces selected values with new ones, computes the new checksum and re-writes the
    -       file.  New values are defined by offset, length, format and value.  The object name  is  actually  irrelevant.   Critical
    -       values  are the offset, length and data type/value.  Obviously, care must be taken when specifying offsets and lengths to
    -       avoid editing objects incorrectly.
    -
    -INSTRUCTIONS
    -       An example instruction file follows.  It references the Qualcomm Atheros XML PIB Edit schema file, piboffset.xsd, that is
    -       shown  above  so  that  a  validating  parser can find the schema and perform document checks.  The remainder of the file
    -       describes a series of object names, offsets, lengths and values that describe the edits to be performed.
    -
    -          <pib xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    -               xsi:noNamespaceSchemaLocation="piboffset.xsd">
    -               <object name="HFID_Manufacturer">
    -                       <offset>0024</offset>
    -                       <length>64</length>
    -                       <dataString>Atheros HomePlug AV Device</dataString>
    -               </object>
    -               <object name="HFID_User">
    -                       <length>64</length>
    -                       <offset>0074</offset>
    -                       <dataString>Atheros</dataString>
    -               </object>
    -               <object name="MDURole">
    -                       <offset>0101</offset>
    -                       <dataByte>0</dataByte>
    -               </object>
    -               <object name="PriorityTTl">
    -                       <offset>0210</offset>
    -                       <length>16</length>
    -                       <array>
    -                               <dataHex>80841E008084</dataHex>
    -                               <dataHex>1e</dataHex>
    -                               <dataByte>0</dataByte>
    -                               <dataHex></dataHex>
    -                               <dataHex></dataHex>
    -                               <dataHex></dataHex>
    -                               <dataHex></dataHex>
    -                               <dataHex>C0</dataHex>
    -                               <dataByte>198</dataByte>
    -                               <dataHex>2d</dataHex>
    -                               <dataHex>00</dataHex>
    -                       </array>
    -               </object>
    -               <object name="VLANPrioTOSPrecMatrix">
    -                       <length>4</length>
    -                       <offset>0224</offset>
    -                       <array>
    -                               <dataByte>65</dataByte>
    -                               <dataByte>250</dataByte>
    -                               <dataHex></dataHex>
    -                               <dataHex>Fa</dataHex>
    -                       </array>
    -               </object>
    -               <object name="EnableLEDThroughputIndicate">
    -                       <length>1</length>
    -                       <offset>1E94</offset>
    -                       <dataByte>0</dataByte>
    -               </object>
    -               <object name="HFID_AVLN">
    -                       <length>64</length>
    -                       <offset>00B4</offset>
    -                       <dataString>Atheros-Net</dataString>
    -               </object>
    -          </pib>
    -
    -EXAMPLES
    -       The following example reads PIB file abc.pib and edits it according to instructions found in XML file local.xml.  The PIB
    -       file is always specified first, followed by one or more XML instruction files.
    -
    -               # xml2pib abc.pib local.xml
    -
    -       The  following  example reads PIB file abc.pib and edits it according to three XML instruction files, in the order speci‐
    -       fied.  Order can be critical since later edits could over-write earlier edits.
    -
    -               # xml2pib abc.pib standard.xml custom.xml errata.xml
    -
    -       The following example does nothing because no instruction files are specified.
    -
    -               # xml2pib abc.pib
    -
    -SEE ALSO
    -       chkpib(7), chkpib2(7), getpib(7), modpib(1), pib2xml(1), pibcomp(1), pibdump(1), setpib(1)
    -
    -CREDITS
    -        Charles Maier <cmaier@qca.qualcomm.com>
    -
    -open-plc-utils-0.0.3                                        Mar 2014                                                  xml2pib(1)
    -
    - - - diff --git a/docbook/xml2pib.c.html b/docbook/xml2pib.c.html deleted file mode 100644 index caec0568..00000000 --- a/docbook/xml2pib.c.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - xml2pib.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   Copyright (c) 2013 Qualcomm Atheros, Inc.
    - *
    - *   All rights reserved.
    - *
    - *   Redistribution and use in source and binary forms, with or 
    - *   without modification, are permitted (subject to the limitations 
    - *   in the disclaimer below) provided that the following conditions 
    - *   are met:
    - *
    - *   * Redistributions of source code must retain the above copyright 
    - *     notice, this list of conditions and the following disclaimer.
    - *
    - *   * Redistributions in binary form must reproduce the above 
    - *     copyright notice, this list of conditions and the following 
    - *     disclaimer in the documentation and/or other materials 
    - *     provided with the distribution.
    - *
    - *   * Neither the name of Qualcomm Atheros nor the names of 
    - *     its contributors may be used to endorse or promote products 
    - *     derived from this software without specific prior written 
    - *     permission.
    - *
    - *   NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 
    - *   GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE 
    - *   COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
    - *   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    - *   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    - *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
    - *   OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    - *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
    - *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
    - *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
    - *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    - *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
    - *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    - *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*"
    - *
    - *   xml2pib.c -
    - *
    - *   Contributor(s):
    - *      Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdio.h>
    -#include <stdlib.h>
    -#include <unistd.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *   custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/getoptv.h"
    -#include "../tools/flags.h"
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../nodes/node.h"
    -#include "../key/HPAVKey.h"
    -#include "../nvm/nvm.h"
    -#include "../pib/pib.h"
    -
    -/*====================================================================*
    - *   custom source files;
    - *--------------------------------------------------------------------*/
    -
    -#ifndef MAKEFILE
    -#include "../tools/getoptv.c"
    -#include "../tools/putoptv.c"
    -#include "../tools/version.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/fdchecksum32.c"
    -#include "../tools/checksum32.c"
    -#include "../tools/hexstring.c"
    -#include "../tools/hexdecode.c"
    -#include "../tools/strfbits.c"
    -#include "../tools/todigit.c"
    -#include "../tools/output.c"
    -#include "../tools/emalloc.c"
    -#include "../tools/error.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../key/SHA256Reset.c"
    -#include "../key/SHA256Block.c"
    -#include "../key/SHA256Write.c"
    -#include "../key/SHA256Fetch.c"
    -#include "../key/HPAVKeyNID.c"
    -#include "../key/keys.c"
    -#endif
    -
    -#ifndef MAKEFILE
    -#include "../nodes/xmlopen.c"
    -#include "../nodes/xmlnode.c"
    -#include "../nodes/xmlscan.c"
    -#include "../nodes/xmledit.c"
    -#include "../nodes/xmltree.c"
    -#include "../nodes/xmlfree.c"
    -#endif
    -
    -/*====================================================================*
    - *
    - *   signed pibedit1 (struct node const * node, void * memory, size_t extent);
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibedit1 (struct node const * node, void * memory, size_t extent)
    -
    -{
    -	struct simple_pib * simple_pib = (struct simple_pib *)(memory);
    -	xmledit (node, memory, extent);
    -	checksum32 (memory, extent, simple_pib->CHECKSUM);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed pibedit2 (char const * filename, struct node const * node, char * memory, size_t extent);
    - *
    - *   search a panther/lynx image chain looking for PIB images and
    - *   verify each one; return 0 on success or -1 on error; errors
    - *   occur due to an invalid image chain or a bad parameter block;
    - *
    - *   this implementation reads the parameter block from file into
    - *   into memory and checks it there;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed pibedit2 (char const * filename, struct node const * node, char * memory, size_t extent)
    -
    -{
    -	struct nvm_header2 * nvm_header;
    -	uint32_t origin = ~0;
    -	uint32_t offset = 0;
    -	unsigned length = 0;
    -	unsigned module = 0;
    -	do
    -	{
    -		nvm_header = (struct nvm_header2 *)(memory + offset);
    -		if (LE16TOH (nvm_header->MajorVersion) != 1)
    -		{
    -			error (1, 0, NVM_HDR_VERSION, filename, module);
    -		}
    -		if (LE16TOH (nvm_header->MinorVersion) != 1)
    -		{
    -			error (1, 0, NVM_HDR_VERSION, filename, module);
    -		}
    -		if (LE32TOH (nvm_header->PrevHeader) != origin)
    -		{
    -			error (1, 0, NVM_HDR_LINK, filename, module);
    -		}
    -		if (checksum32 (nvm_header, sizeof (* nvm_header), 0))
    -		{
    -			error (1, 0, NVM_HDR_CHECKSUM, filename, module);
    -		}
    -		origin = offset;
    -		offset += sizeof (* nvm_header);
    -		extent -= sizeof (* nvm_header);
    -		length = LE32TOH (nvm_header->ImageLength);
    -		if (checksum32 (memory + offset, length, nvm_header->ImageChecksum))
    -		{
    -			error (1, 0, NVM_IMG_CHECKSUM, filename, module);
    -		}
    -		if (LE32TOH (nvm_header->ImageType) == NVM_IMAGE_PIB)
    -		{
    -			xmledit (node, memory + offset, length);
    -			nvm_header->ImageChecksum = checksum32 (memory + offset, length, 0);
    -			nvm_header->HeaderChecksum = checksum32 (nvm_header, sizeof (* nvm_header), nvm_header->HeaderChecksum);
    -			return (0);
    -		}
    -		offset += length;
    -		extent -= length;
    -		module++;
    -	}
    -	while (~nvm_header->NextHeader);
    -	return (-1);
    -}
    -
    -/*====================================================================*
    - *
    - *   signed function (char const * filename);
    - *
    - *   determine the type of file and call appropriate functions;
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -static signed function (char const * filename, struct node const * node)
    -
    -{
    -	char * memory = 0;
    -	signed extent = 0;
    -	signed fd;
    -	if ((fd = open (filename, O_BINARY | O_RDWR)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, filename);
    -	}
    -	if ((extent = lseek (fd, 0, SEEK_END)) == -1)
    -	{
    -		error (1, errno, FILE_CANTSIZE, filename);
    -	}
    -	if (!(memory = (char *)(malloc (extent))))
    -	{
    -		error (1, errno, FILE_CANTLOAD, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (read (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	if (LE32TOH (* (uint32_t *)(memory)) == 0x60000000)
    -	{
    -		error (1, 0, FILE_WONTREAD, filename);
    -	}
    -	if (LE32TOH (* (uint32_t *)(memory)) == 0x00010001)
    -	{
    -		pibedit2 (filename, node, memory, extent);
    -	}
    -	else
    -	{
    -		pibedit1 (node, memory, extent);
    -	}
    -	if (lseek (fd, 0, SEEK_SET))
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	if (write (fd, memory, extent) != extent)
    -	{
    -		error (1, errno, FILE_CANTSAVE, filename);
    -	}
    -	close (fd);
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *   int main (int argc, char const * argv []);
    - *
    - *
    - *   Contributor(s):
    - *	Charles Maier <cmaier@qca.qualcomm.com>
    - *
    - *--------------------------------------------------------------------*/
    -
    -int main (int argc, char const * argv [])
    -
    -{
    -	static char const * optv [] =
    -	{
    -		"f:qv",
    -		"pib-file [pib-file] [...]",
    -		"Qualcomm Atheros PLC Parameter File Editor",
    -		"f f\txmlfile is (f)",
    -		"q\tquiet",
    -		"v\tverbose",
    -		(char const *) (0)
    -	};
    -	struct node * node = (struct node *)(0);
    -	flag_t flags = (flag_t)(0);
    -	signed c;
    -	optind = 1;
    -	while ((c = getoptv (argc, argv, optv)) != -1)
    -	{
    -		switch (c)
    -		{
    -		case 'f':
    -			node = xmlopen (optarg);
    -			break;
    -		case 'm':
    -			_setbits (flags, PIB_MANIFEST);
    -			break;
    -		case 'q':
    -			_setbits (flags, PIB_SILENCE);
    -			break;
    -		case 'v':
    -			_setbits (flags, PIB_VERBOSE);
    -			break;
    -		default:
    -			break;
    -		}
    -	}
    -	argc -= optind;
    -	argv += optind;
    -	while ((argc) && (* argv))
    -	{
    -		function (* argv, node);
    -		argc--;
    -		argv++;
    -	}
    -	if (_anyset (flags, PIB_VERBOSE))
    -	{
    -		xmltree (node);
    -	}
    -	xmlfree (node);
    -	return (0);
    -}
    -
    -
    -
    - - - diff --git a/docbook/xmlattribute.c.html b/docbook/xmlattribute.c.html deleted file mode 100644 index 0617652a..00000000 --- a/docbook/xmlattribute.c.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - xmlattribute.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   struct node * xmlattribute (struct node const * node, char const * name);
    - *
    - *   node.h
    - *
    - *   search an element node for the named attribute node; return the
    - *   attribute node address;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLATTRIBUTE_SOURCE
    -#define XMLATTRIBUTE_SOURCE
    -
    -#include <string.h>
    -
    -#include "../nodes/node.h"
    -
    -struct node const * xmlattribute (struct node const * node, char const * name)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_ATTR)
    -		{
    -			if (!strcmp (node->text, name))
    -			{
    -				break;
    -			}
    -		}
    -		node=node->after;
    -	}
    -	return (node);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmldata.c.html b/docbook/xmldata.c.html deleted file mode 100644 index e960d856..00000000 --- a/docbook/xmldata.c.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - xmldata.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   struct node const * xmldata (struct node const * node);
    - *
    - *   node.h
    - *
    - *   search an element node for the next data node and return the
    - *   data node address;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLDATA_SOURCE
    -#define XMLDATA_SOURCE
    -
    -#include <string.h>
    -
    -#include "../nodes/node.h"
    -
    -struct node const * xmldata (struct node const * node)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_DATA)
    -		{
    -			break;
    -		}
    -		node=node->after;
    -	}
    -	return (node);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmledit.c.html b/docbook/xmledit.c.html deleted file mode 100644 index d477b5a5..00000000 --- a/docbook/xmledit.c.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - - xmledit.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   xmledit.c -
    - *
    - *   node.h
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLEDIT_SOURCE
    -#define XMLEDIT_SOURCE
    -
    -/*====================================================================*
    - *   system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <stdint.h>
    -#include <string.h>
    -#include <limits.h>
    -#include <ctype.h>
    -#include <errno.h>
    -
    -/*====================================================================*
    - *  custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../tools/number.h"
    -#include "../tools/memory.h"
    -#include "../tools/error.h"
    -#include "../nodes/node.h"
    -
    -/*====================================================================*
    - *   constants;
    - *--------------------------------------------------------------------*/
    -
    -#define XML_BAD_NUMBER 1
    -#define XML_BAD_OFFSET 2
    -#define XML_BAD_EXTENT 3
    -
    -/*====================================================================*
    - *   variables;
    - *--------------------------------------------------------------------*/
    -
    -static char const * member = "";
    -static char const * string = "";
    -static unsigned offset = 0;
    -static unsigned length = 0;
    -static bool series = false;
    -
    -/*====================================================================*
    - *
    - *   void position (size_t extent);
    - *
    - *   sanity check offset and extent before editing memory;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void position (size_t extent)
    -
    -{
    -	if (!length)
    -	{
    -		error (XML_BAD_EXTENT, EPERM, "%s has no length", member);
    -	}
    -	if (offset > extent)
    -	{
    -		error (XML_BAD_OFFSET, EPERM, "%s offset of 0x%04X exceeds " DATA_OBJECT " offset of 0x%04X", member, offset, (unsigned int) extent);
    -	}
    -	if ((offset + length) > extent)
    -	{
    -		error (XML_BAD_EXTENT, EPERM, "%s length of %u bytes exceeds " DATA_OBJECT " length of " SIZE_T_SPEC " bytes", member, length, extent); 
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   signed xmlinteger (NODE const * node, unsigned radix);
    - *
    - *   convert numeric string to an unsigned integer; all string digits
    - *   string digits must be valid for the specifid radix; radix can be
    - *   1 through 16 but 2, 8, 10 and 16 are the only sensible choices;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static unsigned xmlinteger (NODE const * node, unsigned radix)
    -
    -{
    -	unsigned digit;
    -	unsigned value = 0;
    -	while ((digit = todigit (*string)) < radix)
    -	{
    -		value *= radix;
    -		value += digit;
    -		string++;
    -	}
    -	if (*string)
    -	{
    -		error (XML_BAD_NUMBER, EPERM, "%s %s is not numeric", member, node->text);
    -	}
    -	return (value);
    -}
    -
    -/*====================================================================*
    - *
    - *   void xmlstring (void * memory, size_t extent);
    - *
    - *   xmlstring is expressed as character text;  truncate string and
    - *   pad memory with NULs as needed;
    - *
    - *   per the schema, an series cannot have a string member;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void xmlstring (void * memory, size_t extent)
    -
    -{
    -	char * buffer = (char *)(memory);
    -	if (series)
    -	{
    -		error (XML_BAD_NUMBER, ENOTSUP, "%s found inside struct", member);
    -	}
    -	if (length)
    -	{
    -		while (length > 1)
    -		{
    -			if (isprint (*string))
    -			{
    -				buffer [offset] = *string++;
    -			}
    -			else
    -			{
    -				buffer [offset] = (char)(0);
    -			}
    -			offset++;
    -			length--;
    -		}
    -		buffer [offset] = (char)(0);
    -		offset++;
    -		length--;
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void xmlmemory (void * memory, size_t extent);
    - *
    - *   xmlmemory is a hexadecimal string of variable extent; an empty
    - *   string increments offset and decrements length but nothing is
    - *   written to the memory;
    - *
    - *   per the schema, if xmlmemory is not inside an series then it must
    - *   match the object extent;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void xmlmemory (void * memory, size_t extent)
    -
    -{
    -	uint8_t * buffer = (uint8_t *)(memory);
    -	if (!*string)
    -	{
    -		offset++;
    -		length--;
    -	}
    -	while ((*string) && (length))
    -	{
    -		uint8_t msb = todigit (*string++);
    -		uint8_t lsb = todigit (*string++);
    -		if ((msb > 0x0F) || (lsb > 0x0F))
    -		{
    -			error (XML_BAD_NUMBER, EINVAL, "%s value is not hexadecimal", member);
    -		}
    -		buffer [offset] = (msb << 4) + lsb;
    -		offset++;
    -		length--;
    -	}
    -	if ((length) && (!series))
    -	{
    -		error (XML_BAD_NUMBER, EINVAL, "%s value is too short", member);
    -	}
    -	if (*string)
    -	{
    -		error (XML_BAD_NUMBER, EINVAL, "%s value is too long", member);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void xmlnumber (void * memory, size_t extent);
    - *
    - *   xmlnumber is a decimal integer string of variable length; the
    - *   value cannot exceed length bytes and offset is incremented by
    - *   length bytes;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void xmlnumber (void * memory, size_t extent)
    -
    -{
    -	uint64_t number = 0;
    -	uint64_t maximum = 0;
    -	maximum = ~maximum;
    -	if (length < sizeof (number))
    -	{
    -		maximum <<= (length << 3);
    -		maximum = ~maximum;
    -	}
    -	while (isdigit (*string))
    -	{
    -		number *= 10;
    -		number += *string - '0';
    -		if (number > maximum)
    -		{
    -			error (XML_BAD_NUMBER, EINVAL, "%s value exceeds %u bytes", member, length); 
    -		}
    -		string++;
    -	}
    -	if (*string)
    -	{
    -		error (XML_BAD_NUMBER, EINVAL, "%s value is not decimal", member);
    -	}
    -	memcpy ((uint8_t *)(memory) + offset, &number, length);
    -	offset += length;
    -	length -= length;
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   void xmlbyte (void * memory, unsigned extent);
    - *
    - *   xmlbyte is a decimal integer string of variable extent; the
    - *   value cannot exceed 255; an empty string increments offset and
    - *   decrements length but nothing is written to the memory;
    - *
    - *   per the schema, if xmlbyte is not inside an series then it must
    - *   it must match the object extent which must be 1 by implication;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static void xmlbyte (void * memory, size_t extent)
    -
    -{
    -	if (*string)
    -	{
    -		uint16_t number = 0;
    -		while (isdigit (*string))
    -		{
    -			number *= 10;
    -			number += *string - '0';
    -			if (number > 0xFF)
    -			{
    -				error (XML_BAD_NUMBER, EINVAL, "%s value exceeds 8 bits", member);
    -			}
    -			string++;
    -		}
    -		if (*string)
    -		{
    -			error (XML_BAD_NUMBER, EINVAL, "%s value is not decimal", member);
    -		}
    -		memcpy ((uint8_t *)(memory) + offset, &number, sizeof (uint8_t));
    -	}
    -	offset++;
    -	length--;
    -	if ((length) && (!series))
    -	{
    -		error (XML_BAD_NUMBER, EINVAL, "%s is too short", member);
    -	}
    -	return;
    -}
    -
    -/*====================================================================*
    - *
    - *   static char const * xmlcontent1 (struct node const * node);
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char const * xmlcontent1 (struct node const * node)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_DATA)
    -		{
    -			return (node->text);
    -		}
    -		node = node->after;
    -	}
    -	return ("");
    -}
    -
    -/*====================================================================*
    - *
    - *   char const * xmlvalue1 (struct node const * node);
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -char const * xmlvalue1 (struct node const * node)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_VALU)
    -		{
    -			return (node->text);
    -		}
    -		node = node->after;
    -	}
    -	return ("");
    -}
    -
    -/*====================================================================*
    - *
    - *   static char const * xmlattribute1 (struct node const * node, char const * name);
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char const * xmlattribute1 (struct node const * node, char const * name)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_ATTR)
    -		{
    -			if (!strcmp (node->text, name))
    -			{
    -				name = xmlvalue1 (node);
    -				return (name);
    -			}
    -		}
    -		node=node->after;
    -	}
    -	return ("");
    -}
    -
    -/*====================================================================*
    - *
    - *   signed xmledit (struct node const * node, void * memory, size_t extent);
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed xmledit (struct node const * node, void * memory, size_t extent)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_ELEM)
    -		{
    -			if (!strcmp (node->text, DATA_MEMBER))
    -			{
    -				member = xmlattribute1 (node, DATA_NAME);
    -				offset = (unsigned)(-1);
    -				length = (unsigned)(-1);
    -				series = false;
    -			}
    -			else if (!strcmp (node->text, DATA_OFFSET))
    -			{
    -				string = xmlcontent1 (node);
    -				offset = xmlinteger (node, 16);
    -			}
    -			else if (!strcmp (node->text, DATA_LENGTH))
    -			{
    -				string = xmlcontent1 (node);
    -				length = xmlinteger (node, 10);
    -			}
    -			else if (!strcmp (node->text, DATA_STRUCT))
    -			{
    -				series = true;
    -			}
    -			else if (!strcmp (node->text, DATA_STRING))
    -			{
    -				string = xmlcontent1 (node);
    -				position (extent);
    -				xmlstring (memory, extent);
    -			}
    -			else if (!strcmp (node->text, DATA_MEMORY))
    -			{
    -				string = xmlcontent1 (node);
    -				position (extent);
    -				xmlmemory (memory, extent);
    -			}
    -			else if (!strcmp (node->text, DATA_HUGE))
    -			{
    -				length = sizeof (uint64_t);
    -				position (extent);
    -				string = xmlcontent1 (node);
    -				xmlnumber (memory, extent);
    -			}
    -			else if (!strcmp (node->text, DATA_LONG))
    -			{
    -				length = sizeof (uint32_t);
    -				position (extent);
    -				string = xmlcontent1 (node);
    -				xmlnumber (memory, extent);
    -			}
    -			else if (!strcmp (node->text, DATA_WORD))
    -			{
    -				length = sizeof (uint16_t);
    -				position (extent);
    -				string = xmlcontent1 (node);
    -				xmlnumber (memory, extent);
    -			}
    -			else if (!strcmp (node->text, DATA_BYTE))
    -			{
    -				position (extent);
    -				string = xmlcontent1 (node);
    -				xmlbyte (memory, extent);
    -			}
    -			xmledit (node, memory, extent);
    -		}
    -		node = node->after;
    -	}
    -	return (0);
    -}
    -
    -/*====================================================================*
    - *
    - *--------------------------------------------------------------------*/
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlelement.c.html b/docbook/xmlelement.c.html deleted file mode 100644 index 3ce3f45b..00000000 --- a/docbook/xmlelement.c.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - xmlelement.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   struct node * xmlelement (struct node const * node, char const * name);
    - *
    - *   node.h
    - *
    - *   search node for the named element node; return the node address;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLELEMENT_SOURCE
    -#define XMLELEMENT_SOURCE
    -
    -#include <string.h>
    -
    -#include "../nodes/node.h"
    -
    -struct node const * xmlelement (struct node const * node, char const * name)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_ELEM)
    -		{
    -			struct node const * temp;
    -			if (!strcmp (node->text, name))
    -			{
    -				break;
    -			}
    -			temp = xmlelement (node, name);
    -			if (temp)
    -			{
    -				return (temp);
    -			}
    -		}
    -		node=node->after;
    -	}
    -	return (node);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlfree.c.html b/docbook/xmlfree.c.html deleted file mode 100644 index cef53dc1..00000000 --- a/docbook/xmlfree.c.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - xmlfree.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   NODE * xmlfree (NODE * node);
    - *
    - *   node.h
    - *
    - *   recursively free child nodes; minimize recursion by following
    - *   node->after at each level;
    - *
    - *   the caller must free the root node; this allows that the root
    - *   to be statically declared, if desired;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLFREE_SOURCE
    -#define XMLFREE_SOURCE
    -
    -#include <stdlib.h>
    -#include <memory.h>
    -
    -#include "../nodes/node.h"
    -
    -void xmlfree (NODE * node)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		NODE * temp = node;
    -		if (node->above)
    -		{
    -			node->above->below = (NODE *)(0);
    -		}
    -		if (node->prior)
    -		{
    -			node->prior->after = (NODE *)(0);
    -		}
    -		xmlfree (node);
    -		node = node->after;
    -		free (temp);
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlnode.c.html b/docbook/xmlnode.c.html deleted file mode 100644 index 896e3a60..00000000 --- a/docbook/xmlnode.c.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - xmlnode.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   NODE * xmlnode (NODE * root);
    - *
    - *   node.h
    - *
    - *   create an empty node and attach it as the last child below the
    - *   root node;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLNODE_SOURCE
    -#define XMLNODE_SOURCE
    -
    -#include <memory.h>
    -
    -#include "../nodes/node.h"
    -#include "../tools/memory.h"
    -
    -NODE * xmlnode (NODE * root)
    -
    -{
    -	NODE * node = NEW (NODE);
    -	memset (node, 0, sizeof (NODE));
    -	if (!root)
    -	{
    -		return (node);
    -	}
    -	if (root->below)
    -	{
    -		NODE * temp = root->below;
    -		while (temp->after)
    -		{
    -			temp = temp->after;
    -		}
    -		node->above = root;
    -		temp->after = node;
    -		node->prior = temp;
    -		return (node);
    -	}
    -	root->below = node;
    -	node->above = root;
    -	return (node);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlopen.c.html b/docbook/xmlopen.c.html deleted file mode 100644 index 1c8d5f10..00000000 --- a/docbook/xmlopen.c.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - xmlopen.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   NODE * xmlopen (char const * filename);
    - *
    - *   node.h
    - *
    - *   open an XML file and return the parse tree root;
    - *
    - *   the entire file is read into a buffer associated with the text
    - *   member in the root node; the buffer is then split into strings
    - *   referenced by child nodes, forming a hierarchial string vector;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLOPEN_SOURCE
    -#define XMLOPEN_SOURCE
    -
    -#include <unistd.h>
    -#include <memory.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -
    -#include "../nodes/node.h"
    -#include "../tools/memory.h"
    -#include "../tools/files.h"
    -#include "../tools/error.h"
    -
    -NODE * xmlopen (char const * filename)
    -
    -{
    -	ssize_t length;
    -	NODE * node = NEW (NODE);
    -	signed fd = open (filename, O_BINARY|O_RDONLY);
    -	if (fd == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, filename);
    -	}
    -	length = lseek (fd, 0, SEEK_END);
    -	if (length == -1)
    -	{
    -		error (1, errno, FILE_CANTSEEK, filename);
    -	}
    -	if (lseek (fd, 0, SEEK_SET) == -1)
    -	{
    -		error (1, errno, FILE_CANTHOME, filename);
    -	}
    -	memset (node, 0, sizeof (NODE));
    -	node->text = STR (length);
    -	if (read (fd, node->text, length) < length)
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	node->text [length] = (char)(0);
    -	close (fd);
    -	xmlscan (node);
    -	return (node);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlread.c.html b/docbook/xmlread.c.html deleted file mode 100644 index 54c74640..00000000 --- a/docbook/xmlread.c.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - xmlread.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   NODE * xmlread (NODE * node, char const * filename);
    - *
    - *   node.h
    - *
    - *   open an XML file and return the parse tree root;
    - *
    - *   the entire file is read into a buffer associated with the text
    - *   member in the root node; the buffer is then split into strings
    - *   referenced by child nodes, forming a hierarchial string vector;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLREAD_SOURCE
    -#define XMLREAD_SOURCE
    -
    -#include <unistd.h>
    -#include <stdlib.h>
    -#include <sys/stat.h>
    -#include <memory.h>
    -#include <fcntl.h>
    -#include <errno.h>
    -
    -#include "../tools/error.h"
    -#include "../tools/files.h"
    -#include "../nodes/node.h"
    -
    -signed xmlread (NODE * node, char const * filename)
    -
    -{
    -	struct stat stat;
    -	signed fd;
    -	memset (node, 0, sizeof (NODE));
    -	if (lstat (filename, &stat))
    -	{
    -		error (1, errno, FILE_CANTSTAT, filename);
    -	}
    -	if (!(node->text = malloc (stat.st_size + 1)))
    -	{
    -		error (1, errno, FILE_CANTLOAD, filename);
    -	}
    -	if ((fd = open (filename, O_BINARY|O_RDONLY)) == -1)
    -	{
    -		error (1, errno, FILE_CANTOPEN, filename);
    -	}
    -	if (read (fd, node->text, stat.st_size) != stat.st_size)
    -	{
    -		error (1, errno, FILE_CANTREAD, filename);
    -	}
    -	node->text [stat.st_size] = (char)(0);
    -	close (fd);
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlscan.c.html b/docbook/xmlscan.c.html deleted file mode 100644 index efcc19b4..00000000 --- a/docbook/xmlscan.c.html +++ /dev/null @@ -1,553 +0,0 @@ - - - - - - xmlscan.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   xmlscan.c - markup scanner;
    - *
    - *   node.h
    - *
    - *   scan XML source and create a parse tree;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLSCAN_SOURCE
    -#define XMLSCAN_SOURCE
    -
    -/*====================================================================*
    - *  system header files;
    - *--------------------------------------------------------------------*/
    -
    -#include <string.h>
    -#include <ctype.h>
    -
    -/*====================================================================*
    - *  custom header files;
    - *--------------------------------------------------------------------*/
    -
    -#include "../nodes/node.h"
    -#include "../tools/number.h"
    -#include "../tools/error.h"
    -
    -/*====================================================================*
    - *
    - *   char * advance (char * string, unsigned * line);
    - *
    - *   discard whitespace and count newlines up to the next meaningful
    - *   character;
    - *
    - *   this function is critical to the XML parsing engine because it
    - *   ensures that node strings are NUL terminated and line counts
    - *   are accurate;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * advance (char * string, unsigned * lineno)
    -
    -{
    -	while (isspace (*string))
    -	{
    -		if (*string == '\n')
    -		{
    -			(*lineno)++;
    -		}
    -		*string++ = (char)(0);
    -	}
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   char * discard (char * string, unsigned * line);
    - *
    - *   discard current character; advance to next character;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * discard (char * string, unsigned * lineno)
    -
    -{
    -	*string++ = (char)(0);
    -	string = advance (string, lineno);
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   char * nmtoken (char * string);
    - *
    - *   collect nmtoken as per w3c xml 1.0 specification;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * nmtoken (char * string)
    -
    -{
    -	while (isalnum (*string) || (*string == '-') || (*string == '_') || (*string == '.') || (*string == ':'))
    -	{
    -		string++;
    -	}
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   char * content (char * string, char quote, unsigned * line);
    - *
    - *   collect literal string; discard quotes; preserve whitespace;
    - *   count newlines;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * content (char * string, char quote, unsigned * lineno)
    -
    -{
    -	if (*string == quote)
    -	{
    -		*string++ = (char)(0);
    -	}
    -	while (*string)
    -	{
    -		if (*string == quote)
    -		{
    -			break;
    -		}
    -		if (*string++ == '\n')
    -		{
    -			(*lineno)++;
    -		}
    -	}
    -	if (*string == quote)
    -	{
    -		*string++ = (char)(0);
    -	}
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   char * collect (char * string);
    - *
    - *   collect entity; an entity consists of non-blank characters
    - *   excluding common tag punctuation;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * collect (char * string)
    -
    -{
    -	while (*string)
    -	{
    -		if (*string == '<')
    -		{
    -			break;
    -		}
    -		if (*string == '=')
    -		{
    -			break;
    -		}
    -		if (*string == '/')
    -		{
    -			break;
    -		}
    -		if (*string == '?')
    -		{
    -			break;
    -		}
    -		if (*string == '>')
    -		{
    -			break;
    -		}
    -		if (isspace (*string))
    -		{
    -			break;
    -		}
    -		string++;
    -	}
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   static char * comment (char * string, unsigned * line);
    - *
    - *   collect comment;
    - *   preserve delimiters;
    - *   preserve whitespace;
    - *   count newlines;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * comment (char * string, unsigned * lineno)
    -
    -{
    -	string++;
    -	if (*string == '-')
    -	{
    -		while (*string == '-')
    -		{
    -			string++;
    -		}
    -		while ((*string) && (*string != '-'))
    -		{
    -			while ((*string) && (*string != '-'))
    -			{
    -				if (*string == '\n')
    -				{
    -					(*lineno)++;
    -				}
    -				string++;
    -			}
    -			string++;
    -		}
    -		while (*string == '-')
    -		{
    -			string++;
    -		}
    -	}
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   char * literal (char * string, char quote, unsigned * line);
    - *
    - *   collect literal;
    - *   preserve delimiters;
    - *   preserve whitespace;
    - *   count newlines;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * literal (char *string, char quote, unsigned * lineno)
    -
    -{
    -	if (*string == quote)
    -	{
    -		*string++ = (char)(0);
    -	}
    -	while (*string)
    -	{
    -		if (*string == quote)
    -		{
    -			break;
    -		}
    -		if (*string == '\n')
    -		{
    -			(*lineno)++;
    -		}
    -		string++;
    -	}
    -	if (*string == quote)
    -	{
    -		*string++ = (char)(0);
    -	}
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   char * context (char * string, signed c, unsigned *line);
    - *
    - *   collect context;
    - *   preserve delimiters;
    - *   preserve whitespace;
    - *   count newlines;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -static char * context (char *string, signed c, unsigned * lineno)
    -
    -{
    -	string++;
    -	while (*string)
    -	{
    -		if (*string == (char)(c))
    -		{
    -			string++;
    -			break;
    -		}
    -		if (*string == '{')
    -		{
    -			string = context (string, '}', lineno);
    -			continue;
    -		}
    -		if (*string == '(')
    -		{
    -			string = context (string, ')', lineno);
    -			continue;
    -		}
    -		if (*string == '[')
    -		{
    -			string = context (string, ']', lineno);
    -			continue;
    -		}
    -		if ((*string == '\"') || (*string == '\''))
    -		{
    -			string = literal (string, *string, lineno);
    -			continue;
    -		}
    -		if (*string == '\n')
    -		{
    -			(*lineno)++;
    -		}
    -		string++;
    -	}
    -	return (string);
    -}
    -
    -/*====================================================================*
    - *
    - *   void xmlscan (NODE * node);
    - *
    - *   node.h
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -signed xmlscan (NODE * node)
    -
    -{
    -	NODE * section = node;
    -	NODE * element;
    -	NODE * attribute;
    -	NODE * value;
    -	char prefix = (char)(0);
    -	char suffix = (char)(0);
    -	char * string = node->text;
    -	unsigned lineno = 1;
    -	if (!section)
    -	{
    -		error (1, EFAULT, "section is null");
    -	}
    -	if (!string)
    -	{
    -		error (1, EFAULT, "string is null");
    -	}
    -	while (*string)
    -	{
    -		if (*string == '<')
    -		{
    -			prefix = '<';
    -			suffix = '>';
    -			string = discard (string, &lineno);
    -			if ((*string == '/') || (*string == '?') || (*string == '!'))
    -			{
    -				prefix = *string;
    -				string = discard (string, &lineno);
    -			}
    -			element = xmlnode (section);
    -			element->line = lineno;
    -			element->type = NODE_ELEM;
    -			element->text = string;
    -			if (isalpha (*string))
    -			{
    -				string = nmtoken (string);
    -			}
    -			else if (*string == '-')
    -			{
    -				string = comment (string, &lineno);
    -			}
    -			else if (*string == '[')
    -			{
    -				string = context (string, ']', &lineno);
    -			}
    -			else
    -			{
    -				string = collect (string);
    -			}
    -			string = advance (string, &lineno);
    -			while ((*string) && (*string != '<') && (*string != '/') && (*string != '?') && (*string != '>'))
    -			{
    -				attribute = xmlnode (element);
    -				attribute->line = lineno;
    -				attribute->type = NODE_ATTR;
    -				attribute->text = string;
    -				if (isalpha (*string))
    -				{
    -					string = nmtoken (string);
    -				}
    -				else if (*string == '-')
    -				{
    -					string = comment (string, &lineno);
    -				}
    -				else if (*string == '[')
    -				{
    -					string = context (string, ']', &lineno);
    -				}
    -				else if ((*string == '\"') || (*string == '\''))
    -				{
    -					string = content (string, *string, &lineno);
    -					attribute->text++;
    -				}
    -				else
    -				{
    -					string = collect (string);
    -				}
    -				string = advance (string, &lineno);
    -				if (*string == '=')
    -				{
    -					string = discard (string, &lineno);
    -					value = xmlnode (attribute);
    -					value->line = lineno;
    -					value->type = NODE_VALU;
    -					value->text = string;
    -					if ((*string == '\"') || (*string == '\''))
    -					{
    -						string = content (string, *string, &lineno);
    -						value->text++;
    -					}
    -					else
    -					{
    -						string = collect (string);
    -					}
    -					string = advance (string, &lineno);
    -				}
    -			}
    -			if ((*string == '/') || (*string == '?'))
    -			{
    -				suffix = *string;
    -				string = discard (string, &lineno);
    -			}
    -		}
    -		else if (*string == '>')
    -		{
    -			string = discard (string, &lineno);
    -			if (prefix == '!')
    -			{
    -				element->type = NODE_SGML;
    -			}
    -			else if (prefix == '?')
    -			{
    -				element->type = NODE_INST;
    -			}
    -			else if (suffix == '?')
    -			{
    -			}
    -			else if (prefix == '/')
    -			{
    -				element->type = NODE_ETAG;
    -				if (element->below)
    -				{
    -					error (1, 0, "Element </%s> on line %d has attributes or content.", element->text, element->line);
    -				}
    -				if (strcmp (section->text, element->text))
    -				{
    -					error (1, 0, "Element <%s> on line %d teminated by </%s> on line %d", section->text, section->line, element->text, element->line);
    -				}
    -				if (section->above)
    -				{
    -					section = section->above;
    -				}
    -			}
    -			else if (suffix == '/')
    -			{
    -			}
    -			else
    -			{
    -				section = element;
    -			}
    -		}
    -		else
    -		{
    -			signed space = 0;
    -			char * output = string;
    -			NODE * segment = xmlnode (section);
    -			segment->line = lineno;
    -			segment->type = NODE_DATA;
    -			segment->text = string;
    -			while (*string)
    -			{
    -				if (*string == '<')
    -				{
    -					break;
    -				}
    -				if (isspace (*string))
    -				{
    -					string = advance (string, &lineno);
    -					space++;
    -					continue;
    -				}
    -				if (space)
    -				{
    -					*output++ = ' ';
    -					space--;
    -				}
    -				*output++ = *string++;
    -			}
    -			if (output < string)
    -			{
    -				*output = (char)(0);
    -			}
    -		}
    -	}
    -	return (0);
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlschema.c.html b/docbook/xmlschema.c.html deleted file mode 100644 index efeafb70..00000000 --- a/docbook/xmlschema.c.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - xmlschema.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void xmlschema ();
    - *
    - *   node.h
    - *
    - *   print an XML schema on stdout that is compatible with function
    - *   xmledit; the schema should be used to validate files before any
    - *   attempt is make to parse them;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLSCHEMA_SOURCE
    -#define XMLSCHEMA_SOURCE
    -
    -#include "../nodes/node.h"
    -#include "../tools/format.h"
    -
    -void xmlschema ()
    -
    -{
    -	unsigned margin = 0;
    -	output (margin, "<?xml version='%s' encoding='%s'?>", XML_VERSION, XML_CHARSET);
    -	output (margin++, "<xs:schema xmlns:xs='%s' elementFormDefault='%s'>", XML_SCHEMA, "qualified");
    -	output (margin++, "<xs:element name='%s'>", DATA_OBJECT);
    -	output (margin++, "<xs:complexType>");
    -
    -#if 0
    -
    -	output (margin, "<xs:attribute name='%s' use='optional' type='xs:NCName'/>", DATA_NAME);
    -	output (margin, "<xs:attribute name='%s' use='optional' type='xs:string'/>", DATA_TEXT);
    -
    -#endif
    -
    -	output (margin++, "<xs:sequence>");
    -	output (margin, "<xs:element maxOccurs='unbounded' ref='%s'/>", DATA_MEMBER);
    -	output (margin--, "</xs:sequence>");
    -	output (margin--, "</xs:complexType>");
    -	output (margin--, "</xs:element>");
    -	output (margin++, "<xs:element name='%s'>", DATA_MEMBER);
    -	output (margin++, "<xs:complexType>");
    -	output (margin, "<xs:attribute name='%s' use='required' type='xs:NCName'/>", DATA_NAME);
    -
    -#if 0
    -
    -	output (margin, "<xs:attribute name='%s' use='optional' type='xs:string'/>", DATA_TEXT);
    -
    -#endif
    -
    -	output (margin++, "<xs:sequence>");
    -	output (margin++, "<xs:sequence>");
    -	output (margin, "<xs:element ref='%s'/>", DATA_OFFSET);
    -	output (margin, "<xs:element ref='%s'/>", DATA_LENGTH);
    -	output (margin--, "</xs:sequence>");
    -	output (margin++, "<xs:choice>");
    -	output (margin, "<xs:element ref='%s'/>", DATA_STRUCT);
    -	output (margin, "<xs:element ref='%s'/>", DATA_STRING);
    -	output (margin, "<xs:element ref='%s'/>", DATA_HUGE);
    -	output (margin, "<xs:element ref='%s'/>", DATA_LONG);
    -	output (margin, "<xs:element ref='%s'/>", DATA_WORD);
    -	output (margin, "<xs:element ref='%s'/>", DATA_BYTE);
    -	output (margin--, "</xs:choice>");
    -	output (margin--, "</xs:sequence>");
    -	output (margin--, "</xs:complexType>");
    -	output (margin--, "</xs:element>");
    -	output (margin, "<xs:element name='%s' type='xs:positiveInteger'/>", DATA_LENGTH);
    -	output (margin, "<xs:element name='%s' type='xs:hexBinary'/>", DATA_OFFSET);
    -	output (margin++, "<xs:element name='%s'>", DATA_STRUCT);
    -	output (margin++, "<xs:complexType>");
    -
    -#if 0
    -
    -	output (margin, "<xs:attribute name='%s' use='optional' type='xs:NCName'/>", DATA_NAME);
    -	output (margin, "<xs:attribute name='%s' use='optional' type='xs:string'/>", DATA_TEXT);
    -
    -#endif
    -
    -	output (margin++, "<xs:choice maxOccurs='unbounded'>");
    -	output (margin, "<xs:element ref='%s'/>", DATA_BYTE);
    -	output (margin, "<xs:element ref='%s'/>", DATA_MEMORY);
    -	output (margin--, "</xs:choice>");
    -	output (margin--, "</xs:complexType>");
    -	output (margin--, "</xs:element>");
    -	output (margin, "<xs:element name='%s' type='xs:string'/>", DATA_STRING);
    -	output (margin, "<xs:element name='%s' type='xs:hexBinary'/>", DATA_MEMORY);
    -	output (margin, "<xs:element name='%s' type='xs:unsignedLong'/>", DATA_HUGE);
    -	output (margin, "<xs:element name='%s' type='xs:unsignedInt'/>", DATA_LONG);
    -	output (margin, "<xs:element name='%s' type='xs:unsignedShort'/>", DATA_WORD);
    -	output (margin, "<xs:element name='%s' type='xs:unsignedByte'/>", DATA_BYTE);
    -	output (margin--, "</xs:schema>");
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlselect.c.html b/docbook/xmlselect.c.html deleted file mode 100644 index c8af000f..00000000 --- a/docbook/xmlselect.c.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - xmlselect.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   char const * xmlselect (struct node const * node, char const * element, char const * attribute);
    - *
    - *   node.h
    - *
    - *   search node for the named element and attribute and return the
    - *   attribute value;
    - *
    - *   if the attribute argument is null or nil then return the element
    - *   content string;
    - *
    - *   if the element does not exist or the attribute does not exist
    - *   for that element or the attribute has no value then an empty
    - *   string is returned;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLSELECT_SOURCE
    -#define XMLSELECT_SOURCE
    -
    -#include <string.h>
    -
    -#include "../nodes/node.h"
    -
    -char const * xmlselect (struct node const * node, char const * element, char const * attribute)
    -
    -{
    -	node = xmlelement (node, element);
    -	if ((attribute) && (* attribute))
    -	{
    -		node = xmlattribute (node, attribute);
    -		node = xmlvalue (node);
    -	}
    -	else
    -	{
    -		node = xmldata (node);
    -	}
    -	return (node? node->text: "");
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmltree.c.html b/docbook/xmltree.c.html deleted file mode 100644 index d22a5188..00000000 --- a/docbook/xmltree.c.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - xmltree.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   void xmltree (NODE const * node);
    - *
    - *   node.h
    - *
    - *   print node structure on stdout;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLTREE_SOURCE
    -#define XMLTREE_SOURCE
    -
    -#include <stdio.h>
    -
    -#include "../nodes/node.h"
    -#include "../tools/format.h"
    -
    -void xmltree (NODE const * node)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		static unsigned level = 0;
    -		printf ("%03d ", node->line);
    -		printf ("(%c) ", node->type);
    -		output (level, "[%s]", node->text);
    -		level++;
    -		xmltree (node);
    -		level--;
    -		node = node->after;
    -	}
    -	return;
    -}
    -
    -#endif
    -
    -
    -
    - - - diff --git a/docbook/xmlvalue.c.html b/docbook/xmlvalue.c.html deleted file mode 100644 index 7d13da80..00000000 --- a/docbook/xmlvalue.c.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - xmlvalue.c - - - - - - - - - -
    -/*====================================================================*
    - *
    - *   struct node const * xmlvalue (struct node const * node);
    - *
    - *   node.h
    - *
    - *   search an attribute node for the value node; return the value
    - *   node address;
    - *
    - *   Motley Tools by Charles Maier <cmaier@cmassoc.net>;
    - *   Copyright (c) 2001-2006 by Charles Maier Associates;
    - *   Licensed under the Internet Software Consortium License;
    - *
    - *--------------------------------------------------------------------*/
    -
    -#ifndef XMLVALUE_SOURCE
    -#define XMLVALUE_SOURCE
    -
    -#include <string.h>
    -
    -#include "../nodes/node.h"
    -
    -struct node const * xmlvalue (struct node const * node)
    -
    -{
    -	if (node)
    -	{
    -		node = node->below;
    -	}
    -	while (node)
    -	{
    -		if (node->type == NODE_VALU)
    -		{
    -			break;
    -		}
    -		node = node->after;
    -	}
    -	return (node);
    -}
    -
    -#endif
    -
    -
    -
    - - -