lspci.c revision 6e9aa255e3376b2da5824c09c4c62bc233463bfe
/* -*- c-basic-offset: 8 -*-
rdesktop: A Remote Desktop Protocol client.
Support for the Matrox "lspci" channel
Copyright (C) 2005 Matrox Graphics Inc.
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the General Public License version 2 (GPLv2) at this time for any software where
* a choice of GPL license versions is made available with the language indicating
* that GPLv2 or any later version may be used, or where a choice of which version
* of the GPL is applied is otherwise unspecified.
*/
#include "rdesktop.h"
#include <unistd.h>
static VCHANNEL *lspci_channel;
typedef struct _pci_device
{
} pci_device;
static pci_device current_device;
static void lspci_send(const char *output);
/* Handle one line of output from the lspci subprocess */
static RD_BOOL
{
const char *val;
char buf[1024];
{
/* Skip whitespace and second Class: occurance */
}
{
}
{
/* Sigh, there are *two* lines tagged as Device:. We
}
{
}
{
}
{
}
{
}
{
/* Blank line. Send collected information over channel */
}
else
{
}
return True;
}
/* Process one line of input from virtual channel */
static RD_BOOL
{
{
/* Send single dot to indicate end of enumeration */
lspci_send(".\n");
}
else
{
}
return True;
}
/* Process new data from the virtual channel */
static void
{
unsigned int pkglen;
char *buf;
/* str_handle_lines requires null terminated strings */
#if 0
printf("lspci recv:\n");
#endif
}
/* Initialize this module: Register the lspci channel */
lspci_init(void)
{
return (lspci_channel != NULL);
}
/* Send data to channel */
static void
lspci_send(const char *output)
{
STREAM s;
#if 0
printf("lspci send:\n");
#endif
}