r100: remember the user session key during session setup so it can be used in various...
[samba.git] / source4 / include / cli_context.h
index 184327e7d36b9edbf8f6d4caaa134dd59194ec62..0e817c3cb0704e48c5bd4b47850c0a882f669d73 100644 (file)
@@ -62,10 +62,14 @@ struct cli_negotiate {
        
        int server_zone;
        time_t server_time;
-       int readbraw_supported:1;
-       int writebraw_supported:1;
+       unsigned int readbraw_supported:1;
+       unsigned int writebraw_supported:1;
 
        const char *server_domain;
+
+       /* remember the session key for data encryption in various sub-protocols
+          such as LSA */
+       uint8 user_session_key[16];
 };
        
 /* this is the context for a SMB socket associated with the socket itself */
@@ -99,9 +103,9 @@ struct cli_socket {
   client library
 */
 struct cli_options {
-       int use_oplocks:1;
-       int use_level2_oplocks:1;
-       int use_spnego:1;
+       unsigned int use_oplocks:1;
+       unsigned int use_level2_oplocks:1;
+       unsigned int use_spnego:1;
 };
 
 /* this is the context for the client transport layer */
@@ -126,7 +130,7 @@ struct cli_transport {
 
        /* is a readbraw pending? we need to handle that case
           specially on receiving packets */
-       int readbraw_pending:1;
+       unsigned int readbraw_pending:1;
        
        /* an idle function - if this is defined then it will be
           called once every period milliseconds while we are waiting
@@ -161,6 +165,10 @@ struct cli_transport {
 
        /* a list of async requests that are pending on this connection */
        struct cli_request *pending_requests;
+
+       /* remember the called name - some sub-protocols require us to
+          know the server name */
+       struct nmb_name called;
 };
 
 /* this is the context for the user */
@@ -180,7 +188,7 @@ struct cli_session {
        uint16 vuid;
 
        /* default pid for this session */
-       uint16 pid;
+       uint32 pid;
 };
 
 /* 
@@ -230,7 +238,7 @@ struct cli_request {
 
        /* set if this is a one-way request, meaning we are not
           expecting a reply from the server. */
-       int one_way_request:1;
+       unsigned int one_way_request:1;
 
        /* the mid of this packet - used to match replies */
        uint16 mid;