r21991: I hate Steve French :-). Add support for encryption
[nivanova/samba-autobuild/.git] / source3 / lib / util.c
index 45d3916ebe684489f92e4825479ce481a159cdb7..e9c2d372276d36189960df9d97cc4f513aefad34 100644 (file)
@@ -516,6 +516,19 @@ void show_msg(char *buf)
        dump_data(10, smb_buf(buf), bcc);       
 }
 
+/*******************************************************************
+ Set the length and marker of an encrypted smb packet.
+********************************************************************/
+
+void smb_set_enclen(char *buf,int len,uint16 enc_ctx_num)
+{
+       _smb_setlen(buf,len);
+
+       SCVAL(buf,4,0xFF);
+       SCVAL(buf,5,'S');
+       SSVAL(buf,6,enc_ctx_num);
+}
+
 /*******************************************************************
  Set the length and marker of an smb packet.
 ********************************************************************/