Gammu internals
1.38.0
|
#include "../../gsmstate.h"
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include "../../gsmcomon.h"
#include "../devfunc.h"
#include "proxy.h"
#include "../../../helper/string.h"
Go to the source code of this file.
Macros | |
#define | _GNU_SOURCE /* For asprintf */ |
#define | _PATH_BSHELL "/bin/sh" |
Functions | |
static char * | expand_proxy_command (const char *proxy_command) |
static GSM_Error | proxy_connect (GSM_StateMachine *s, GSM_Device_ProxyData *proxydata, const char *proxy_command) |
void | kill_proxy_command (pid_t proxy_command_pid) |
GSM_Error | proxy_open (GSM_StateMachine *s) |
int | proxy_read (GSM_StateMachine *s, void *buf, size_t nbytes) |
static ssize_t | write_nosigpipe (int fd, const void *buf, size_t len) |
int | proxy_write (GSM_StateMachine *s, const void *buf, size_t nbytes) |
GSM_Error | proxy_close (GSM_StateMachine *s) |
Variables | |
GSM_Device_Functions | ProxyDevice |
#define _PATH_BSHELL "/bin/sh" |
Definition at line 32 of file proxy.c.
Referenced by proxy_connect().
|
static |
Definition at line 20 of file proxy.c.
Referenced by proxy_connect().
void kill_proxy_command | ( | pid_t | proxy_command_pid | ) |
Definition at line 119 of file proxy.c.
Referenced by proxy_close().
GSM_Error proxy_close | ( | GSM_StateMachine * | s | ) |
Definition at line 203 of file proxy.c.
References GSM_Device::Data, _GSM_StateMachine::Device, ERR_NONE, GSM_Device_ProxyData::hProcess, GSM_Device_ProxyData::hRead, GSM_Device_ProxyData::hWrite, kill_proxy_command(), and GSM_Device::Proxy.
|
static |
Definition at line 39 of file proxy.c.
References _PATH_BSHELL, dbgprintf, ERR_DEVICEOPENERROR, ERR_MOREMEMORY, ERR_NONE, expand_proxy_command(), GSM_OSErrorInfo(), GSM_Device_ProxyData::hProcess, GSM_Device_ProxyData::hRead, and GSM_Device_ProxyData::hWrite.
Referenced by proxy_open().
GSM_Error proxy_open | ( | GSM_StateMachine * | s | ) |
Definition at line 130 of file proxy.c.
References _GSM_StateMachine::CurrentConfig, GSM_Device::Data, GSM_Config::Device, _GSM_StateMachine::Device, GSM_Device::Proxy, and proxy_connect().
int proxy_read | ( | GSM_StateMachine * | s, |
void * | buf, | ||
size_t | nbytes | ||
) |
Definition at line 135 of file proxy.c.
References GSM_Device::Data, _GSM_StateMachine::Device, GSM_OSErrorInfo(), GSM_Device_ProxyData::hRead, and GSM_Device::Proxy.
int proxy_write | ( | GSM_StateMachine * | s, |
const void * | buf, | ||
size_t | nbytes | ||
) |
Definition at line 175 of file proxy.c.
References _GSM_StateMachine::ConnectionType, GSM_Device::Data, _GSM_StateMachine::Device, GCT_FBUS2PL2303, GSM_OSErrorInfo(), GSM_Device_ProxyData::hWrite, GSM_Device::Proxy, smprintf(), and write_nosigpipe().
|
static |