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

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

revision 25 by matty, Sat Jan 6 03:47:04 2001 UTC revision 207 by matthewc, Thu Sep 26 14:26:46 2002 UTC
# Line 1  Line 1 
1  /*  /*
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Protocol services - Multipoint Communications Service     Protocol services - Multipoint Communications Service
4     Copyright (C) Matthew Chapman 1999-2000     Copyright (C) Matthew Chapman 1999-2002
5        
6     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 38  ber_parse_header(STREAM s, int tagval, i Line 38  ber_parse_header(STREAM s, int tagval, i
38    
39          if (tag != tagval)          if (tag != tagval)
40          {          {
41                  ERROR("expected tag %d, got %d\n", tagval, tag);                  error("expected tag %d, got %d\n", tagval, tag);
42                  return False;                  return False;
43          }          }
44    
# Line 89  ber_out_integer(STREAM s, int value) Line 89  ber_out_integer(STREAM s, int value)
89    
90  /* Output a DOMAIN_PARAMS structure (ASN.1 BER) */  /* Output a DOMAIN_PARAMS structure (ASN.1 BER) */
91  static void  static void
92  mcs_out_domain_params(STREAM s, int max_channels, int max_users,  mcs_out_domain_params(STREAM s, int max_channels, int max_users, int max_tokens, int max_pdusize)
                       int max_tokens, int max_pdusize)  
93  {  {
94          ber_out_header(s, MCS_TAG_DOMAIN_PARAMS, 32);          ber_out_header(s, MCS_TAG_DOMAIN_PARAMS, 32);
95          ber_out_integer(s, max_channels);          ber_out_integer(s, max_channels);
# Line 161  mcs_recv_connect_response(STREAM mcs_dat Line 160  mcs_recv_connect_response(STREAM mcs_dat
160          in_uint8(s, result);          in_uint8(s, result);
161          if (result != 0)          if (result != 0)
162          {          {
163                  ERROR("MCS connect: %d\n", result);                  error("MCS connect: %d\n", result);
164                  return False;                  return False;
165          }          }
166    
# Line 172  mcs_recv_connect_response(STREAM mcs_dat Line 171  mcs_recv_connect_response(STREAM mcs_dat
171          ber_parse_header(s, BER_TAG_OCTET_STRING, &length);          ber_parse_header(s, BER_TAG_OCTET_STRING, &length);
172          if (length > mcs_data->size)          if (length > mcs_data->size)
173          {          {
174                  WARN("MCS data length %d\n", length);                  error("MCS data length %d\n", length);
175                  length = mcs_data->size;                  length = mcs_data->size;
176          }          }
177    
# Line 185  mcs_recv_connect_response(STREAM mcs_dat Line 184  mcs_recv_connect_response(STREAM mcs_dat
184    
185  /* Send an EDrq message (ASN.1 PER) */  /* Send an EDrq message (ASN.1 PER) */
186  static void  static void
187  mcs_send_edrq()  mcs_send_edrq(void)
188  {  {
189          STREAM s;          STREAM s;
190    
# Line 201  mcs_send_edrq() Line 200  mcs_send_edrq()
200    
201  /* Send an AUrq message (ASN.1 PER) */  /* Send an AUrq message (ASN.1 PER) */
202  static void  static void
203  mcs_send_aurq()  mcs_send_aurq(void)
204  {  {
205          STREAM s;          STREAM s;
206    
# Line 215  mcs_send_aurq() Line 214  mcs_send_aurq()
214    
215  /* Expect a AUcf message (ASN.1 PER) */  /* Expect a AUcf message (ASN.1 PER) */
216  static BOOL  static BOOL
217  mcs_recv_aucf(uint16 *mcs_userid)  mcs_recv_aucf(uint16 * mcs_userid)
218  {  {
219          uint8 opcode, result;          uint8 opcode, result;
220          STREAM s;          STREAM s;
# Line 227  mcs_recv_aucf(uint16 *mcs_userid) Line 226  mcs_recv_aucf(uint16 *mcs_userid)
226          in_uint8(s, opcode);          in_uint8(s, opcode);
227          if ((opcode >> 2) != MCS_AUCF)          if ((opcode >> 2) != MCS_AUCF)
228          {          {
229                  ERROR("expected AUcf, got %d\n", opcode);                  error("expected AUcf, got %d\n", opcode);
230                  return False;                  return False;
231          }          }
232    
233          in_uint8(s, result);          in_uint8(s, result);
234          if (result != 0)          if (result != 0)
235          {          {
236                  ERROR("AUrq: %d\n", result);                  error("AUrq: %d\n", result);
237                  return False;                  return False;
238          }          }
239    
# Line 262  mcs_send_cjrq(uint16 chanid) Line 261  mcs_send_cjrq(uint16 chanid)
261    
262  /* Expect a CJcf message (ASN.1 PER) */  /* Expect a CJcf message (ASN.1 PER) */
263  static BOOL  static BOOL
264  mcs_recv_cjcf()  mcs_recv_cjcf(void)
265  {  {
266          uint8 opcode, result;          uint8 opcode, result;
267          STREAM s;          STREAM s;
# Line 274  mcs_recv_cjcf() Line 273  mcs_recv_cjcf()
273          in_uint8(s, opcode);          in_uint8(s, opcode);
274          if ((opcode >> 2) != MCS_CJCF)          if ((opcode >> 2) != MCS_CJCF)
275          {          {
276                  ERROR("expected CJcf, got %d\n", opcode);                  error("expected CJcf, got %d\n", opcode);
277                  return False;                  return False;
278          }          }
279    
280          in_uint8(s, result);          in_uint8(s, result);
281          if (result != 0)          if (result != 0)
282          {          {
283                  ERROR("CJrq: %d\n", result);                  error("CJrq: %d\n", result);
284                  return False;                  return False;
285          }          }
286    
# Line 325  mcs_send(STREAM s) Line 324  mcs_send(STREAM s)
324    
325  /* Receive an MCS transport data packet */  /* Receive an MCS transport data packet */
326  STREAM  STREAM
327  mcs_recv()  mcs_recv(void)
328  {  {
329          uint8 opcode, appid, length;          uint8 opcode, appid, length;
330          STREAM s;          STREAM s;
# Line 340  mcs_recv() Line 339  mcs_recv()
339          {          {
340                  if (appid != MCS_DPUM)                  if (appid != MCS_DPUM)
341                  {                  {
342                          ERROR("expected data, got %d\n", opcode);                          error("expected data, got %d\n", opcode);
343                  }                  }
344                  return NULL;                  return NULL;
345          }          }
# Line 387  mcs_connect(char *server, STREAM mcs_dat Line 386  mcs_connect(char *server, STREAM mcs_dat
386    
387  /* Disconnect from the MCS layer */  /* Disconnect from the MCS layer */
388  void  void
389  mcs_disconnect()  mcs_disconnect(void)
390  {  {
391          iso_disconnect();          iso_disconnect();
392  }  }

Legend:
Removed from v.25  
changed lines
  Added in v.207

  ViewVC Help
Powered by ViewVC 1.1.26