FreeRDP
tcp.c File Reference
#include <freerdp/config.h>
#include "settings.h"
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <winpr/crt.h>
#include <winpr/platform.h>
#include <winpr/winsock.h>
#include "rdp.h"
#include "utils.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)
 
static 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)
 
static 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, UINT32 timeout)
 
static void peer_free (t_peer *peer)
 
static int freerdp_tcp_connect_multi (rdpContext *context, char **hostnames, UINT32 *ports, UINT32 count, UINT16 port, UINT32 timeout)
 
BOOL freerdp_tcp_set_keep_alive_mode (const rdpSettings *settings, int sockfd)
 
int freerdp_tcp_connect (rdpContext *context, const char *hostname, int port, DWORD timeout)
 
int freerdp_tcp_default_connect (rdpContext *context, rdpSettings *settings, const char *hostname, int port, DWORD timeout)
 

Macro Definition Documentation

◆ SOL_TCP

#define SOL_TCP   6

◆ TAG

#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_s_buffered_socket()

BIO_METHOD* BIO_s_buffered_socket ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BIO_s_simple_socket()

BIO_METHOD* BIO_s_simple_socket ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_tcp_address_to_string()

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:

◆ freerdp_tcp_connect()

int freerdp_tcp_connect ( rdpContext *  context,
const char *  hostname,
int  port,
DWORD  timeout 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_tcp_connect_multi()

static int freerdp_tcp_connect_multi ( rdpContext *  context,
char **  hostnames,
UINT32 *  ports,
UINT32  count,
UINT16  port,
UINT32  timeout 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_tcp_connect_timeout()

static BOOL freerdp_tcp_connect_timeout ( rdpContext *  context,
int  sockfd,
struct sockaddr *  addr,
socklen_t  addrlen,
UINT32  timeout 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_tcp_default_connect()

int freerdp_tcp_default_connect ( rdpContext *  context,
rdpSettings *  settings,
const char *  hostname,
int  port,
DWORD  timeout 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_tcp_get_ip_address()

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:

◆ freerdp_tcp_get_peer_address()

char* freerdp_tcp_get_peer_address ( SOCKET  sockfd)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_tcp_is_hostname_resolvable()

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:

◆ freerdp_tcp_resolve_host()

struct addrinfo* freerdp_tcp_resolve_host ( const char *  hostname,
int  port,
int  ai_flags 
)
Here is the caller graph for this function:

◆ freerdp_tcp_set_keep_alive_mode()

BOOL freerdp_tcp_set_keep_alive_mode ( const rdpSettings *  settings,
int  sockfd 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freerdp_uds_connect()

static int freerdp_uds_connect ( const char *  path)
static
Here is the caller graph for this function:

◆ peer_free()

static void peer_free ( t_peer *  peer)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transport_bio_buffered_callback()

static long transport_bio_buffered_callback ( BIO *  bio,
int  mode,
const char *  argp,
int  argi,
long  argl,
long  ret 
)
static

◆ transport_bio_buffered_ctrl()

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:

◆ transport_bio_buffered_free()

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:

◆ transport_bio_buffered_gets()

static int transport_bio_buffered_gets ( BIO *  bio,
char *  str,
int  size 
)
static
Here is the caller graph for this function:

◆ transport_bio_buffered_new()

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:

◆ transport_bio_buffered_puts()

static int transport_bio_buffered_puts ( BIO *  bio,
const char *  str 
)
static
Here is the caller graph for this function:

◆ transport_bio_buffered_read()

static int transport_bio_buffered_read ( BIO *  bio,
char *  buf,
int  size 
)
static
Here is the caller graph for this function:

◆ transport_bio_buffered_write()

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:

◆ transport_bio_simple_callback()

static long transport_bio_simple_callback ( BIO *  bio,
int  mode,
const char *  argp,
int  argi,
long  argl,
long  ret 
)
static

◆ transport_bio_simple_ctrl()

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:

◆ transport_bio_simple_free()

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:

◆ transport_bio_simple_gets()

static int transport_bio_simple_gets ( BIO *  bio,
char *  str,
int  size 
)
static
Here is the caller graph for this function:

◆ transport_bio_simple_init()

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:

◆ transport_bio_simple_new()

static int transport_bio_simple_new ( BIO *  bio)
static
Here is the caller graph for this function:

◆ transport_bio_simple_puts()

static int transport_bio_simple_puts ( BIO *  bio,
const char *  str 
)
static
Here is the caller graph for this function:

◆ transport_bio_simple_read()

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:

◆ transport_bio_simple_uninit()

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:

◆ transport_bio_simple_write()

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: