/[muddleftpd]/muddleftpd/modules/auth/authlibsmb/smbval/byteorder.h
ViewVC logotype

Diff of /muddleftpd/modules/auth/authlibsmb/smbval/byteorder.h

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

revision 1.1 by rugger, Sun Oct 20 12:00:41 2002 UTC revision 1.1.4.1 by ganneff, Mon Oct 21 19:52:58 2002 UTC
# Line 1  Line 1 
1    
2  /*  /*
3     Unix SMB/Netbios implementation.     Unix SMB/Netbios implementation.
4     Version 1.9.     Version 1.9.
# Line 40  Line 41 
41  #define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))  #define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))
42  #define SCVAL(buf,pos,val) (CVAL(buf,pos) = (val))  #define SCVAL(buf,pos,val) (CVAL(buf,pos) = (val))
43    
   
44  #if CAREFUL_ALIGNMENT  #if CAREFUL_ALIGNMENT
45  #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)  #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
46  #define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)  #define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
# Line 53  Line 53 
53  #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))  #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
54  #define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))  #define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
55  #else  #else
56    
57  /* this handles things for architectures like the 386 that can handle  /* this handles things for architectures like the 386 that can handle
58     alignment errors */     alignment errors */
59    
60  /*  /*
61     WARNING: This section is dependent on the length of int16 and int32     WARNING: This section is dependent on the length of int16 and int32
62     being correct     being correct
# Line 69  Line 71 
71  #define SIVALS(buf,pos,val) IVALS(buf,pos)=((int32)(val))  #define SIVALS(buf,pos,val) IVALS(buf,pos)=((int32)(val))
72  #endif  #endif
73    
   
74  /* now the reverse routines - these are used in nmb packets (mostly) */  /* now the reverse routines - these are used in nmb packets (mostly) */
75  #define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))  #define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
76  #define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))  #define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.4.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26