/[rdesktop]/sourceforge.net/trunk/rdesktop/rdp.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/rdp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 64 by astrand, Thu Jul 18 16:38:31 2002 UTC revision 176 by n-ki, Tue Sep 17 09:55:03 2002 UTC
# Line 120  rdp_send_data(STREAM s, uint8 data_pdu_t Line 120  rdp_send_data(STREAM s, uint8 data_pdu_t
120          out_uint32_le(s, rdp_shareid);          out_uint32_le(s, rdp_shareid);
121          out_uint8(s, 0);        /* pad */          out_uint8(s, 0);        /* pad */
122          out_uint8(s, 1);        /* streamid */          out_uint8(s, 1);        /* streamid */
123          out_uint16(s, (length - 14));          out_uint16_le(s, (length - 14));
124          out_uint8(s, data_pdu_type);          out_uint8(s, data_pdu_type);
125          out_uint8(s, 0);        /* compress_type */          out_uint8(s, 0);        /* compress_type */
126          out_uint16(s, 0);       /* compress_len */          out_uint16(s, 0);       /* compress_len */
# Line 155  rdp_send_logon_info(uint32 flags, char * Line 155  rdp_send_logon_info(uint32 flags, char *
155          int len_password = 2 * strlen(password);          int len_password = 2 * strlen(password);
156          int len_program = 2 * strlen(program);          int len_program = 2 * strlen(program);
157          int len_directory = 2 * strlen(directory);          int len_directory = 2 * strlen(directory);
158          uint32 sec_flags = encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT)          uint32 sec_flags = encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO;
                 : SEC_LOGON_INFO;  
159          STREAM s;          STREAM s;
160    
161          s = sec_init(sec_flags, 18 + len_domain + len_user + len_password          s = sec_init(sec_flags, 18 + len_domain + len_user + len_password
# Line 212  rdp_send_synchronise() Line 211  rdp_send_synchronise()
211    
212  /* Send a single input event */  /* Send a single input event */
213  void  void
214  rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags,  rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2)
                uint16 param1, uint16 param2)  
215  {  {
216          STREAM s;          STREAM s;
217    
# Line 276  rdp_out_bitmap_caps(STREAM s) Line 274  rdp_out_bitmap_caps(STREAM s)
274          out_uint16_le(s, RDP_CAPLEN_BITMAP);          out_uint16_le(s, RDP_CAPLEN_BITMAP);
275    
276          out_uint16_le(s, 8);    /* Preferred BPP */          out_uint16_le(s, 8);    /* Preferred BPP */
277          out_uint16(s, 1);       /* Receive 1 BPP */          out_uint16_le(s, 1);    /* Receive 1 BPP */
278          out_uint16(s, 1);       /* Receive 4 BPP */          out_uint16_le(s, 1);    /* Receive 4 BPP */
279          out_uint16_le(s, 1);    /* Receive 8 BPP */          out_uint16_le(s, 1);    /* Receive 8 BPP */
280          out_uint16_le(s, 800);  /* Desktop width */          out_uint16_le(s, 800);  /* Desktop width */
281          out_uint16_le(s, 600);  /* Desktop height */          out_uint16_le(s, 600);  /* Desktop height */
# Line 300  rdp_out_order_caps(STREAM s) Line 298  rdp_out_order_caps(STREAM s)
298          order_caps[0] = 1;      /* dest blt */          order_caps[0] = 1;      /* dest blt */
299          order_caps[1] = 1;      /* pat blt */          order_caps[1] = 1;      /* pat blt */
300          order_caps[2] = 1;      /* screen blt */          order_caps[2] = 1;      /* screen blt */
301            order_caps[3] = 1;      /* required for memblt? */
302          order_caps[8] = 1;      /* line */          order_caps[8] = 1;      /* line */
303          order_caps[9] = 1;      /* line */          order_caps[9] = 1;      /* line */
304          order_caps[10] = 1;     /* rect */          order_caps[10] = 1;     /* rect */
# Line 321  rdp_out_order_caps(STREAM s) Line 320  rdp_out_order_caps(STREAM s)
320          out_uint8p(s, order_caps, 32);  /* Orders supported */          out_uint8p(s, order_caps, 32);  /* Orders supported */
321          out_uint16_le(s, 0x6a1);        /* Text capability flags */          out_uint16_le(s, 0x6a1);        /* Text capability flags */
322          out_uint8s(s, 6);       /* Pad */          out_uint8s(s, 6);       /* Pad */
323          out_uint32(s, desktop_save == False ? 0 : 0x38400);     /* Desktop cache size */          out_uint32_le(s, desktop_save == False ? 0 : 0x38400);  /* Desktop cache size */
324          out_uint32(s, 0);       /* Unknown */          out_uint32(s, 0);       /* Unknown */
325          out_uint32(s, 0x4e4);   /* Unknown */          out_uint32_le(s, 0x4e4);        /* Unknown */
326  }  }
327    
328  /* Output bitmap cache capability set */  /* Output bitmap cache capability set */
# Line 442  rdp_send_confirm_active() Line 441  rdp_send_confirm_active()
441                  RDP_CAPLEN_GENERAL + RDP_CAPLEN_BITMAP + RDP_CAPLEN_ORDER +                  RDP_CAPLEN_GENERAL + RDP_CAPLEN_BITMAP + RDP_CAPLEN_ORDER +
442                  RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE +                  RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE +
443                  RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL +                  RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL +
444                  RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE + RDP_CAPLEN_UNKNOWN                  RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE + RDP_CAPLEN_UNKNOWN + 4 /* w2k fix, why? */ ;
                 + 4 /* w2k fix, why? */ ;  
445    
446          s = rdp_init(14 + caplen + sizeof(RDP_SOURCE));          s = rdp_init(14 + caplen + sizeof(RDP_SOURCE));
447    
# Line 526  process_pointer_pdu(STREAM s) Line 524  process_pointer_pdu(STREAM s)
524                          in_uint16_le(s, datalen);                          in_uint16_le(s, datalen);
525                          in_uint8p(s, data, datalen);                          in_uint8p(s, data, datalen);
526                          in_uint8p(s, mask, masklen);                          in_uint8p(s, mask, masklen);
527                          cursor = ui_create_cursor(x, y, width, height, mask,                          cursor = ui_create_cursor(x, y, width, height, mask, data);
                                                   data);  
528                          ui_set_cursor(cursor);                          ui_set_cursor(cursor);
529                          cache_put_cursor(cache_idx, cursor);                          cache_put_cursor(cache_idx, cursor);
530                          break;                          break;
# Line 578  process_bitmap_updates(STREAM s) Line 575  process_bitmap_updates(STREAM s)
575                          bmpdata = xmalloc(width * height);                          bmpdata = xmalloc(width * height);
576                          for (y = 0; y < height; y++)                          for (y = 0; y < height; y++)
577                          {                          {
578                                  in_uint8a(s,                                  in_uint8a(s, &bmpdata[(height - y - 1) * width], width);
                                           &bmpdata[(height - y - 1) * width],  
                                           width);  
579                          }                          }
580                          ui_paint_bitmap(left, top, cx, cy, width, height,                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);
                                         bmpdata);  
581                          xfree(bmpdata);                          xfree(bmpdata);
582                          continue;                          continue;
583                  }                  }
# Line 596  process_bitmap_updates(STREAM s) Line 590  process_bitmap_updates(STREAM s)
590                  bmpdata = xmalloc(width * height);                  bmpdata = xmalloc(width * height);
591                  if (bitmap_decompress(bmpdata, width, height, data, size))                  if (bitmap_decompress(bmpdata, width, height, data, size))
592                  {                  {
593                          ui_paint_bitmap(left, top, cx, cy, width, height,                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);
                                         bmpdata);  
594                  }                  }
595    
596                  xfree(bmpdata);                  xfree(bmpdata);
# Line 722  rdp_connect(char *server, uint32 flags, Line 715  rdp_connect(char *server, uint32 flags,
715          if (!sec_connect(server))          if (!sec_connect(server))
716                  return False;                  return False;
717    
718          rdp_send_logon_info(flags, domain, username, password,          rdp_send_logon_info(flags, domain, username, password, command, directory);
                             command, directory);  
719          return True;          return True;
720  }  }
721    

Legend:
Removed from v.64  
changed lines
  Added in v.176

  ViewVC Help
Powered by ViewVC 1.1.26