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

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

revision 28 by matty, Wed Jun 20 13:54:48 2001 UTC revision 828 by stargo, Sun Mar 6 21:11:18 2005 UTC
# Line 1  Line 1 
1  /*  /*
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Parsing primitives     Parsing primitives
4     Copyright (C) Matthew Chapman 1999-2000     Copyright (C) Matthew Chapman 1999-2005
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 31  typedef struct stream Line 31  typedef struct stream
31          unsigned char *mcs_hdr;          unsigned char *mcs_hdr;
32          unsigned char *sec_hdr;          unsigned char *sec_hdr;
33          unsigned char *rdp_hdr;          unsigned char *rdp_hdr;
34            unsigned char *channel_hdr;
35    
36  } *STREAM;  }
37     *STREAM;
38    
39  #define s_push_layer(s,h,n)     { (s)->h = (s)->p; (s)->p += n; }  #define s_push_layer(s,h,n)     { (s)->h = (s)->p; (s)->p += n; }
40  #define s_pop_layer(s,h)        (s)->p = (s)->h;  #define s_pop_layer(s,h)        (s)->p = (s)->h;
# Line 68  typedef struct stream Line 70  typedef struct stream
70  #define out_uint32(s,v)         out_uint32_be(s,v)  #define out_uint32(s,v)         out_uint32_be(s,v)
71    
72  #else  #else
 #define next_be(s,v)            v = ((v) << 8) + *((s)->p++);  
73  #define in_uint16_be(s,v)       { v = *((s)->p++); next_be(s,v); }  #define in_uint16_be(s,v)       { v = *((s)->p++); next_be(s,v); }
74  #define in_uint32_be(s,v)       { in_uint16_be(s,v); next_be(s,v); next_be(s,v); }  #define in_uint32_be(s,v)       { in_uint16_be(s,v); next_be(s,v); next_be(s,v); }
75  #define out_uint16_be(s,v)      { *((s)->p++) = ((v) >> 8) & 0xff; *((s)->p++) = (v) & 0xff; }  #define out_uint16_be(s,v)      { *((s)->p++) = ((v) >> 8) & 0xff; *((s)->p++) = (v) & 0xff; }
# Line 90  typedef struct stream Line 91  typedef struct stream
91  #define out_uint8p(s,v,n)       { memcpy((s)->p,v,n); (s)->p += n; }  #define out_uint8p(s,v,n)       { memcpy((s)->p,v,n); (s)->p += n; }
92  #define out_uint8a(s,v,n)       out_uint8p(s,v,n);  #define out_uint8a(s,v,n)       out_uint8p(s,v,n);
93  #define out_uint8s(s,n)         { memset((s)->p,0,n); (s)->p += n; }  #define out_uint8s(s,n)         { memset((s)->p,0,n); (s)->p += n; }
94    
95    #define next_be(s,v)            v = ((v) << 8) + *((s)->p++);

Legend:
Removed from v.28  
changed lines
  Added in v.828

  ViewVC Help
Powered by ViewVC 1.1.26