Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rdp.cpp File Reference

#include "rdesktop.h"

Include dependency graph for rdp.cpp:

Go to the source code of this file.

Functions

static STREAM rdp_init (int maxlen)
static void rdp_send (STREAM s, uint8 pdu_type)
STREAM rdp_recv (uint8 *type)
static STREAM rdp_init_data (int maxlen)
static void rdp_send_data (STREAM s, uint8 data_pdu_type)
void rdp_out_unistr (STREAM s, char *string, int len)
static void rdp_send_logon_info (uint32 flags, char *domain, char *user, char *password, char *program, char *directory)
static void rdp_send_control (uint16 action)
static void rdp_send_synchronise (void)
void rdp_send_input (uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
static void rdp_send_fonts (uint16 seq)
static void rdp_out_general_caps (STREAM s)
static void rdp_out_bitmap_caps (STREAM s)
static void rdp_out_order_caps (STREAM s)
static void rdp_out_bmpcache_caps (STREAM s)
static void rdp_out_control_caps (STREAM s)
static void rdp_out_activate_caps (STREAM s)
static void rdp_out_pointer_caps (STREAM s)
static void rdp_out_share_caps (STREAM s)
static void rdp_out_colcache_caps (STREAM s)
static void rdp_out_unknown_caps (STREAM s)
static void rdp_send_confirm_active (void)
void process_demand_active (STREAM s)
static void process_pointer_pdu (STREAM s)
static void process_bitmap_updates (STREAM s)
static void process_palette (STREAM s)
static void process_update_pdu (STREAM s)
void process_data_pdu (STREAM s)
BOOL rdp_main_loop (void)
BOOL rdp_connect (char *server, uint32 flags, char *domain, char *password, char *command, char *directory)
void rdp_disconnect (void)

Variables

uint16 mcs_userid
char username [16]
BOOL bitmap_compression
BOOL orders
BOOL encryption
BOOL desktop_save
uint8next_packet
uint32 rdp_shareid
static uint8 canned_caps []


Function Documentation

static void process_bitmap_updates STREAM  s  )  [static]
 

Definition at line 552 of file rdp.cpp.

References bitmap_decompress(), bufsize, data, DEBUG, height, i, in_uint16_le, in_uint8a, in_uint8p, in_uint8s, size, ui_paint_bitmap(), width, xfree(), xmalloc(), and Opie::MM::y.

Referenced by process_update_pdu().

void process_data_pdu STREAM  s  ) 
 

Definition at line 668 of file rdp.cpp.

References in_uint8, in_uint8s, process_pointer_pdu(), process_update_pdu(), RDP_DATA_PDU_BELL, RDP_DATA_PDU_LOGON, RDP_DATA_PDU_POINTER, RDP_DATA_PDU_UPDATE, ui_bell(), and unimpl().

Referenced by rdp_main_loop().

void process_demand_active STREAM  s  ) 
 

Definition at line 482 of file rdp.cpp.

References DEBUG, in_uint32_le, RDP_CTL_COOPERATE, RDP_CTL_REQUEST_CONTROL, RDP_INPUT_SYNCHRONIZE, rdp_recv(), rdp_send_confirm_active(), rdp_send_control(), rdp_send_fonts(), rdp_send_input(), rdp_send_synchronise(), rdp_shareid, reset_order_state(), and type.

Referenced by rdp_main_loop().

static void process_palette STREAM  s  )  [static]
 

Definition at line 610 of file rdp.cpp.

References _COLOURENTRY::blue, _COLOURMAP::colours, data, _COLOURENTRY::green, i, in_uint16_le, in_uint8, in_uint8s, _COLOURMAP::ncolours, _COLOURENTRY::red, ui_create_colourmap(), and ui_set_colourmap().

Referenced by process_update_pdu().

static void process_pointer_pdu STREAM  s  )  [static]
 

Definition at line 506 of file rdp.cpp.

References cache_get_cursor(), cache_put_cursor(), data, datalen, DEBUG, height, in_uint16_le, in_uint8p, in_uint8s, RDP_POINTER_CACHED, RDP_POINTER_COLOR, RDP_POINTER_MOVE, s_check, ui_create_cursor(), ui_move_pointer(), ui_set_cursor(), width, Opie::MM::x, and Opie::MM::y.

Referenced by process_data_pdu().

static void process_update_pdu STREAM  s  )  [static]
 

Definition at line 637 of file rdp.cpp.

References in_uint16_le, process_bitmap_updates(), process_orders(), process_palette(), RDP_UPDATE_BITMAP, RDP_UPDATE_ORDERS, RDP_UPDATE_PALETTE, RDP_UPDATE_SYNCHRONIZE, ui_begin_update(), ui_end_update(), and unimpl().

Referenced by process_data_pdu().

BOOL rdp_connect char *  server,
uint32  flags,
char *  domain,
char *  password,
char *  command,
char *  directory
 

Definition at line 733 of file rdp.cpp.

References False, rdp_send_logon_info(), sec_connect(), True, and username.

Referenced by QMyScrollView::timerEvent().

void rdp_disconnect void   ) 
 

Definition at line 745 of file rdp.cpp.

References sec_disconnect().

static STREAM rdp_init int  maxlen  )  [static]
 

Definition at line 35 of file rdp.cpp.

References encryption, stream::rdp_hdr, s, s_push_layer, SEC_ENCRYPT, and sec_init().

Referenced by rdp_send_confirm_active().

static STREAM rdp_init_data int  maxlen  )  [static]
 

Definition at line 104 of file rdp.cpp.

References encryption, stream::rdp_hdr, s, s_push_layer, SEC_ENCRYPT, and sec_init().

Referenced by rdp_send_control(), rdp_send_fonts(), rdp_send_input(), and rdp_send_synchronise().

BOOL rdp_main_loop void   ) 
 

Definition at line 701 of file rdp.cpp.

References stream::end, False, next_packet, NULL, process_data_pdu(), process_demand_active(), RDP_PDU_DATA, RDP_PDU_DEACTIVATE, RDP_PDU_DEMAND_ACTIVE, rdp_recv(), s, True, type, and unimpl().

Referenced by QMyMainWindow::dataReceived().

static void rdp_out_activate_caps STREAM  s  )  [static]
 

Definition at line 367 of file rdp.cpp.

References out_uint16, out_uint16_le, RDP_CAPLEN_ACTIVATE, and RDP_CAPSET_ACTIVATE.

Referenced by rdp_send_confirm_active().

static void rdp_out_bitmap_caps STREAM  s  )  [static]
 

Definition at line 278 of file rdp.cpp.

References bitmap_compression, out_uint16, out_uint16_le, RDP_CAPLEN_BITMAP, and RDP_CAPSET_BITMAP.

Referenced by rdp_send_confirm_active().

static void rdp_out_bmpcache_caps STREAM  s  )  [static]
 

Definition at line 338 of file rdp.cpp.

References out_uint16_le, out_uint8s, RDP_CAPLEN_BMPCACHE, and RDP_CAPSET_BMPCACHE.

Referenced by rdp_send_confirm_active().

static void rdp_out_colcache_caps STREAM  s  )  [static]
 

Definition at line 402 of file rdp.cpp.

References out_uint16, out_uint16_le, RDP_CAPLEN_COLCACHE, and RDP_CAPSET_COLCACHE.

Referenced by rdp_send_confirm_active().

static void rdp_out_control_caps STREAM  s  )  [static]
 

Definition at line 354 of file rdp.cpp.

References out_uint16, out_uint16_le, RDP_CAPLEN_CONTROL, and RDP_CAPSET_CONTROL.

Referenced by rdp_send_confirm_active().

static void rdp_out_general_caps STREAM  s  )  [static]
 

Definition at line 259 of file rdp.cpp.

References out_uint16, out_uint16_le, RDP_CAPLEN_GENERAL, and RDP_CAPSET_GENERAL.

Referenced by rdp_send_confirm_active().

static void rdp_out_order_caps STREAM  s  )  [static]
 

Definition at line 299 of file rdp.cpp.

References desktop_save, False, out_uint16, out_uint16_le, out_uint32, out_uint32_le, out_uint8p, out_uint8s, RDP_CAPLEN_ORDER, and RDP_CAPSET_ORDER.

Referenced by rdp_send_confirm_active().

static void rdp_out_pointer_caps STREAM  s  )  [static]
 

Definition at line 380 of file rdp.cpp.

References out_uint16, out_uint16_le, RDP_CAPLEN_POINTER, and RDP_CAPSET_POINTER.

Referenced by rdp_send_confirm_active().

static void rdp_out_share_caps STREAM  s  )  [static]
 

Definition at line 391 of file rdp.cpp.

References out_uint16, out_uint16_le, RDP_CAPLEN_SHARE, and RDP_CAPSET_SHARE.

Referenced by rdp_send_confirm_active().

void rdp_out_unistr STREAM  s,
char *  string,
int  len
 

Definition at line 140 of file rdp.cpp.

References i, and stream::p.

Referenced by rdp_send_logon_info(), and sec_out_mcs_data().

static void rdp_out_unknown_caps STREAM  s  )  [static]
 

Definition at line 435 of file rdp.cpp.

References canned_caps, out_uint16_le, out_uint8p, RDP_CAPLEN_UNKNOWN, and RDP_CAPSET_UNKNOWN.

Referenced by rdp_send_confirm_active().

STREAM rdp_recv uint8 type  ) 
 

Definition at line 63 of file rdp.cpp.

References DEBUG, stream::end, hexdump(), in_uint16_le, in_uint8s, next_packet, NULL, stream::p, and sec_recv().

Referenced by process_demand_active(), and rdp_main_loop().

static void rdp_send STREAM  s,
uint8  pdu_type
[static]
 

Definition at line 47 of file rdp.cpp.

References encryption, stream::end, mcs_userid, out_uint16_le, stream::p, stream::rdp_hdr, s_pop_layer, SEC_ENCRYPT, and sec_send().

Referenced by rdp_send_confirm_active().

static void rdp_send_confirm_active void   )  [static]
 

Definition at line 445 of file rdp.cpp.

References out_uint16_le, out_uint32_le, out_uint8p, out_uint8s, RDP_CAPLEN_ACTIVATE, RDP_CAPLEN_BITMAP, RDP_CAPLEN_BMPCACHE, RDP_CAPLEN_COLCACHE, RDP_CAPLEN_CONTROL, RDP_CAPLEN_GENERAL, RDP_CAPLEN_ORDER, RDP_CAPLEN_POINTER, RDP_CAPLEN_SHARE, RDP_CAPLEN_UNKNOWN, rdp_init(), rdp_out_activate_caps(), rdp_out_bitmap_caps(), rdp_out_bmpcache_caps(), rdp_out_colcache_caps(), rdp_out_control_caps(), rdp_out_general_caps(), rdp_out_order_caps(), rdp_out_pointer_caps(), rdp_out_share_caps(), rdp_out_unknown_caps(), RDP_PDU_CONFIRM_ACTIVE, rdp_send(), rdp_shareid, RDP_SOURCE, s, and s_mark_end.

Referenced by process_demand_active().

static void rdp_send_control uint16  action  )  [static]
 

Definition at line 190 of file rdp.cpp.

References out_uint16, out_uint16_le, out_uint32, RDP_DATA_PDU_CONTROL, rdp_init_data(), rdp_send_data(), s, and s_mark_end.

Referenced by process_demand_active().

static void rdp_send_data STREAM  s,
uint8  data_pdu_type
[static]
 

Definition at line 116 of file rdp.cpp.

References encryption, stream::end, mcs_userid, out_uint16, out_uint16_le, out_uint32_le, out_uint8, stream::p, stream::rdp_hdr, RDP_PDU_DATA, rdp_shareid, s_pop_layer, SEC_ENCRYPT, and sec_send().

Referenced by rdp_send_control(), rdp_send_fonts(), rdp_send_input(), and rdp_send_synchronise().

static void rdp_send_fonts uint16  seq  )  [static]
 

Definition at line 242 of file rdp.cpp.

References out_uint16, out_uint16_le, RDP_DATA_PDU_FONT2, rdp_init_data(), rdp_send_data(), s, and s_mark_end.

Referenced by process_demand_active().

void rdp_send_input uint32  time,
uint16  message_type,
uint16  device_flags,
uint16  param1,
uint16  param2
 

Definition at line 221 of file rdp.cpp.

References out_uint16, out_uint16_le, out_uint32_le, RDP_DATA_PDU_INPUT, rdp_init_data(), rdp_send_data(), s, and s_mark_end.

Referenced by QMyScrollView::keyPressEvent(), QMyScrollView::keyReleaseEvent(), QMyMainWindow::MemuClicked(), QMyMainWindow::mouseMoveEvent(), QMyMainWindow::mousePressEvent(), QMyMainWindow::mouseReleaseEvent(), process_demand_active(), QMyMainWindow::timerEvent(), and QMyMainWindow::wheelEvent().

static void rdp_send_logon_info uint32  flags,
char *  domain,
char *  user,
char *  password,
char *  program,
char *  directory
[static]
 

Definition at line 157 of file rdp.cpp.

References encryption, out_uint16_le, out_uint32, out_uint32_le, rdp_out_unistr(), s, s_mark_end, SEC_ENCRYPT, sec_init(), SEC_LOGON_INFO, and sec_send().

Referenced by rdp_connect().

static void rdp_send_synchronise void   )  [static]
 

Definition at line 206 of file rdp.cpp.

References out_uint16_le, RDP_DATA_PDU_SYNCHRONISE, rdp_init_data(), rdp_send_data(), s, and s_mark_end.

Referenced by process_demand_active().


Variable Documentation

BOOL bitmap_compression
 

Definition at line 59 of file rdesktop.cpp.

Referenced by rdp_out_bitmap_caps().

uint8 canned_caps[] [static]
 

Initial value:

 {
        0x01, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x0C, 0x00, 0x08, 0x00, 0x01,
        0x00, 0x00, 0x00, 0x0E, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00,
        0x10, 0x00, 0x34, 0x00, 0xFE,
        0x00, 0x04, 0x00, 0xFE, 0x00, 0x04, 0x00, 0xFE, 0x00, 0x08, 0x00,
        0xFE, 0x00, 0x08, 0x00, 0xFE,
        0x00, 0x10, 0x00, 0xFE, 0x00, 0x20, 0x00, 0xFE, 0x00, 0x40, 0x00,
        0xFE, 0x00, 0x80, 0x00, 0xFE,
        0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x01,
        0x02, 0x00, 0x00, 0x00
}

Definition at line 411 of file rdp.cpp.

Referenced by rdp_out_unknown_caps().

BOOL desktop_save
 

Definition at line 63 of file rdesktop.cpp.

Referenced by rdp_out_order_caps().

BOOL encryption
 

Definition at line 62 of file rdesktop.cpp.

uint16 mcs_userid
 

Definition at line 23 of file mcs.cpp.

Referenced by mcs_connect(), mcs_send(), mcs_send_cjrq(), rdp_send(), and rdp_send_data().

uint8* next_packet
 

Definition at line 30 of file rdp.cpp.

Referenced by process_orders(), rdp_main_loop(), and rdp_recv().

BOOL orders
 

Definition at line 61 of file rdesktop.cpp.

Referenced by CSoundFile::ReadAMS(), and CSoundFile::ReadAMS2().

uint32 rdp_shareid
 

Definition at line 31 of file rdp.cpp.

Referenced by process_demand_active(), rdp_send_confirm_active(), and rdp_send_data().

char username[16]
 

Definition at line 49 of file rdesktop.cpp.


Generated on Sat Nov 5 17:04:14 2005 for OPIE by  doxygen 1.4.2