/[rdesktop]/sourceforge.net/trunk/rdesktop/rdpdr.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/rdpdr.c

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

revision 627 by n-ki, Thu Mar 4 08:24:40 2004 UTC revision 650 by astrand, Thu Apr 15 20:11:19 2004 UTC
# Line 5  Line 5 
5  #include <time.h>  #include <time.h>
6  #include "rdesktop.h"  #include "rdesktop.h"
7    
 #define IRP_MJ_CREATE           0x00  
 #define IRP_MJ_CLOSE            0x02  
 #define IRP_MJ_READ             0x03  
 #define IRP_MJ_WRITE            0x04  
 #define IRP_MJ_DEVICE_CONTROL   0x0e  
   
8  #define IRP_MJ_CREATE                   0x00  #define IRP_MJ_CREATE                   0x00
9  #define IRP_MJ_CLOSE                    0x02  #define IRP_MJ_CLOSE                    0x02
10  #define IRP_MJ_READ                     0x03  #define IRP_MJ_READ                     0x03
# Line 20  Line 14 
14  #define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a  #define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a
15  #define IRP_MJ_DIRECTORY_CONTROL        0x0c  #define IRP_MJ_DIRECTORY_CONTROL        0x0c
16  #define IRP_MJ_DEVICE_CONTROL           0x0e  #define IRP_MJ_DEVICE_CONTROL           0x0e
17    #define IRP_MJ_LOCK_CONTROL             0x11
18    
19  #define IRP_MN_QUERY_DIRECTORY          0x01  #define IRP_MN_QUERY_DIRECTORY          0x01
20  #define IRP_MN_NOTIFY_CHANGE_DIRECTORY  0x02  #define IRP_MN_NOTIFY_CHANGE_DIRECTORY  0x02
# Line 39  uint32 g_num_devices; Line 34  uint32 g_num_devices;
34    
35  /* Table with information about rdpdr devices */  /* Table with information about rdpdr devices */
36  RDPDR_DEVICE g_rdpdr_device[RDPDR_MAX_DEVICES];  RDPDR_DEVICE g_rdpdr_device[RDPDR_MAX_DEVICES];
37    char * g_rdpdr_clientname = NULL;
38    
39  /* Used to store incoming io request, until they are ready to be completed */  /* Used to store incoming io request, until they are ready to be completed */
40  /* using a linked list ensures that they are processed in the right order, */  /* using a linked list ensures that they are processed in the right order, */
# Line 168  void Line 164  void
164  rdpdr_send_name(void)  rdpdr_send_name(void)
165  {  {
166          uint8 magic[4] = "rDNC";          uint8 magic[4] = "rDNC";
         uint32 hostlen = (strlen(hostname) + 1) * 2;  
167          STREAM s;          STREAM s;
168            uint32 hostlen;
169    
170            if (NULL == g_rdpdr_clientname) {
171              g_rdpdr_clientname = hostname;
172            }
173            hostlen = (strlen(g_rdpdr_clientname) + 1) * 2;
174    
175          s = channel_init(rdpdr_channel, 16 + hostlen);          s = channel_init(rdpdr_channel, 16 + hostlen);
176          out_uint8a(s, magic, 4);          out_uint8a(s, magic, 4);
# Line 177  rdpdr_send_name(void) Line 178  rdpdr_send_name(void)
178          out_uint16_le(s, 0x72);          out_uint16_le(s, 0x72);
179          out_uint32(s, 0);          out_uint32(s, 0);
180          out_uint32_le(s, hostlen);          out_uint32_le(s, hostlen);
181          rdp_out_unistr(s, hostname, hostlen - 2);          rdp_out_unistr(s, g_rdpdr_clientname, hostlen - 2);
182          s_mark_end(s);          s_mark_end(s);
183          channel_send(s, rdpdr_channel);          channel_send(s, rdpdr_channel);
184  }  }

Legend:
Removed from v.627  
changed lines
  Added in v.650

  ViewVC Help
Powered by ViewVC 1.1.26