FreeRDP
tcp.c File Reference
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <winpr/crt.h>
#include <winpr/platform.h>
#include <winpr/winsock.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <net/if.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <sys/select.h>
#include <freerdp/log.h>
#include <winpr/stream.h>
#include "tcp.h"
#include "../crypto/opensslcompat.h"

Macros

#define TAG   FREERDP_TAG("core")
 
#define SOL_TCP   6
 

Functions

static int transport_bio_simple_init (BIO *bio, SOCKET socket, int shutdown)
 
static int transport_bio_simple_uninit (BIO *bio)
 
long transport_bio_simple_callback (BIO *bio, int mode, const char *argp, int argi, long argl, long ret)
 
static int transport_bio_simple_write (BIO *bio, const char *buf, int size)
 
static int transport_bio_simple_read (BIO *bio, char *buf, int size)
 
static int transport_bio_simple_puts (BIO *bio, const char *str)
 
static int transport_bio_simple_gets (BIO *bio, char *str, int size)
 
static long transport_bio_simple_ctrl (BIO *bio, int cmd, long arg1, void *arg2)
 
static int transport_bio_simple_new (BIO *bio)
 
static int transport_bio_simple_free (BIO *bio)
 
BIO_METHOD * BIO_s_simple_socket (void)
 
long transport_bio_buffered_callback (BIO *bio, int mode, const char *argp, int argi, long argl, long ret)
 
static int transport_bio_buffered_write (BIO *bio, const char *buf, int num)
 
static int transport_bio_buffered_read (BIO *bio, char *buf, int size)
 
static int transport_bio_buffered_puts (BIO *bio, const char *str)
 
static int transport_bio_buffered_gets (BIO *bio, char *str, int size)
 
static long transport_bio_buffered_ctrl (BIO *bio, int cmd, long arg1, void *arg2)
 
static int transport_bio_buffered_new (BIO *bio)
 
static int transport_bio_buffered_free (BIO *bio)
 
BIO_METHOD * BIO_s_buffered_socket (void)
 
char * freerdp_tcp_address_to_string (const struct sockaddr_storage *addr, BOOL *pIPv6)
 
static char * freerdp_tcp_get_ip_address (int sockfd, BOOL *pIPv6)
 
char * freerdp_tcp_get_peer_address (SOCKET sockfd)
 
static int freerdp_uds_connect (const char *path)
 
struct addrinfo * freerdp_tcp_resolve_host (const char *hostname, int port, int ai_flags)
 
static BOOL freerdp_tcp_is_hostname_resolvable (rdpContext *context, const char *hostname)
 
static BOOL freerdp_tcp_connect_timeout (rdpContext *context, int sockfd, struct sockaddr *addr, socklen_t addrlen, int timeout)
 
static void peer_free (t_peer *peer)
 
static int freerdp_tcp_connect_multi (rdpContext *context, char **hostnames, UINT32 *ports, UINT32 count, int port, int timeout)
 
BOOL freerdp_tcp_set_keep_alive_mode (int sockfd)
 
int freerdp_tcp_connect (rdpContext *context, rdpSettings *settings, const char *hostname, int port, int timeout)
 

Macro Definition Documentation

#define SOL_TCP   6
#define TAG   FREERDP_TAG("core")

FreeRDP: A Remote Desktop Protocol Implementation Transmission Control Protocol (TCP)

Copyright 2011 Vic Lee Copyright 2011 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

BIO_METHOD* BIO_s_buffered_socket ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

BIO_METHOD* BIO_s_simple_socket ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

char* freerdp_tcp_address_to_string ( const struct sockaddr_storage *  addr,
BOOL *  pIPv6 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int freerdp_tcp_connect ( rdpContext *  context,
rdpSettings *  settings,
const char *  hostname,
int  port,
int  timeout 
)

Here is the call graph for this function:

Here is the caller graph for this function:

static int freerdp_tcp_connect_multi ( rdpContext *  context,
char **  hostnames,
UINT32 ports,
UINT32  count,
int  port,
int  timeout 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL freerdp_tcp_connect_timeout ( rdpContext *  context,
int  sockfd,
struct sockaddr *  addr,
socklen_t  addrlen,
int  timeout 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static char* freerdp_tcp_get_ip_address ( int  sockfd,
BOOL *  pIPv6 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

char* freerdp_tcp_get_peer_address ( SOCKET  sockfd)

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL freerdp_tcp_is_hostname_resolvable ( rdpContext *  context,
const char *  hostname 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

struct addrinfo* freerdp_tcp_resolve_host ( const char *  hostname,
int  port,
int  ai_flags 
)

Here is the caller graph for this function:

BOOL freerdp_tcp_set_keep_alive_mode ( int  sockfd)

Here is the caller graph for this function:

static int freerdp_uds_connect ( const char *  path)
static

Here is the caller graph for this function:

static void peer_free ( t_peer *  peer)
static

Here is the call graph for this function:

Here is the caller graph for this function:

long transport_bio_buffered_callback ( BIO *  bio,
int  mode,
const char *  argp,
int  argi,
long  argl,
long  ret 
)
static long transport_bio_buffered_ctrl ( BIO *  bio,
int  cmd,
long  arg1,
void arg2 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_buffered_free ( BIO *  bio)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_buffered_gets ( BIO *  bio,
char *  str,
int  size 
)
static

Here is the caller graph for this function:

static int transport_bio_buffered_new ( BIO *  bio)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_buffered_puts ( BIO *  bio,
const char *  str 
)
static

Here is the caller graph for this function:

static int transport_bio_buffered_read ( BIO *  bio,
char *  buf,
int  size 
)
static

Here is the caller graph for this function:

static int transport_bio_buffered_write ( BIO *  bio,
const char *  buf,
int  num 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

long transport_bio_simple_callback ( BIO *  bio,
int  mode,
const char *  argp,
int  argi,
long  argl,
long  ret 
)
static long transport_bio_simple_ctrl ( BIO *  bio,
int  cmd,
long  arg1,
void arg2 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_simple_free ( BIO *  bio)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_simple_gets ( BIO *  bio,
char *  str,
int  size 
)
static

Here is the caller graph for this function:

static int transport_bio_simple_init ( BIO *  bio,
SOCKET  socket,
int  shutdown 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_simple_new ( BIO *  bio)
static

Here is the caller graph for this function:

static int transport_bio_simple_puts ( BIO *  bio,
const char *  str 
)
static

Here is the caller graph for this function:

static int transport_bio_simple_read ( BIO *  bio,
char *  buf,
int  size 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_simple_uninit ( BIO *  bio)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int transport_bio_simple_write ( BIO *  bio,
const char *  buf,
int  size 
)
static

Here is the call graph for this function:

Here is the caller graph for this function: