#include "rdesktop.h"
#include <sys/types.h>
#include <unistd.h>
Go to the source code of this file.
◆ pci_device
◆ handle_child_line()
Definition at line 45 of file lspci.c.
46{
49
51 {
53
56 }
58 {
61 }
63 {
65
66
69 }
71 {
72 val =
line +
sizeof(
"SVendor:");
74 }
76 {
77 val =
line +
sizeof(
"SDevice:");
79 }
81 {
84 }
86 {
89 }
91 {
92
99 }
100 else
101 {
103 }
105}
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
RD_BOOL str_startswith(const char *s, const char *prefix)
GLenum GLuint GLenum GLsizei const GLchar * buf
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
static void lspci_send(RDPCLIENT *This, const char *output)
static pci_device current_device
_Check_return_ _CRTIMP size_t __cdecl strspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
Referenced by lspci_process_line().
◆ lspci_init()
Definition at line 152 of file lspci.c.
153{
158}
VCHANNEL * channel_register(char *name, uint32 flags, void(*callback)(STREAM))
#define CHANNEL_OPTION_ENCRYPT_RDP
#define CHANNEL_OPTION_INITIALIZED
static void lspci_process(RDPCLIENT *This, STREAM s)
static VCHANNEL * lspci_channel
◆ lspci_process()
Definition at line 131 of file lspci.c.
132{
133 unsigned int pkglen;
134 static char *rest =
NULL;
136
137 pkglen =
s->end -
s->p;
138
141#if 0
144#endif
145
148}
RD_BOOL str_handle_lines(const char *input, char **rest, str_handle_lines_t linehandler, void *data)
void hexdump(unsigned char *p, unsigned int len)
#define STRNCPY(dst, src, n)
static BOOL lspci_process_line(RDPCLIENT *This, const char *line, void *data)
Referenced by lspci_init().
◆ lspci_process_line()
Definition at line 110 of file lspci.c.
111{
112 char *lspci_command[5] = {
"lspci",
"-m",
"-n",
"-v",
NULL };
113
115 {
118
120 }
121 else
122 {
123 error(
"lspci protocol error: Invalid line '%s'\n",
line);
124 }
126}
int strcmp(const char *String1, const char *String2)
RD_BOOL subprocess(char *const argv[], str_handle_lines_t linehandler, void *data)
static BOOL handle_child_line(RDPCLIENT *This, const char *line, void *data)
Referenced by lspci_process().
◆ lspci_send()
Definition at line 162 of file lspci.c.
163{
166
170
171#if 0
173 hexdump(
s->channel_hdr + 8,
s->end -
s->channel_hdr - 8);
174#endif
175
177}
STREAM channel_init(VCHANNEL *channel, uint32 length)
void channel_send(STREAM s, VCHANNEL *channel)
#define out_uint8p(s, v, n)
Referenced by handle_child_line(), and lspci_process_line().
◆ current_device
◆ lspci_channel