Merge Samba3 and Samba4 together
[nivanova/samba-autobuild/.git] / source3 / include / ntdomain.h
index 46842c8b97df41a4f78b18622f89f61c069e7f96..de0a31360985f73c54c2694437b53ec01c4cb6d6 100644 (file)
@@ -157,7 +157,7 @@ typedef struct pipe_rpc_fns {
        
        /* RPC function table associated with the current rpc_bind (associated by context) */
        
-       struct api_struct *cmds;
+       const struct api_struct *cmds;
        int n_cmds;
        uint32 context_id;
        
@@ -211,8 +211,9 @@ struct pipe_auth_data {
 typedef struct pipes_struct {
        struct pipes_struct *next, *prev;
 
-       connection_struct *conn;
-       uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
+       char client_address[INET6_ADDRSTRLEN];
+
+       struct auth_serversupplied_info *server_info;
 
        fstring name;
        fstring pipe_srv_name;
@@ -234,7 +235,6 @@ typedef struct pipes_struct {
         */
 
        struct current_user pipe_user;
-       DATA_BLOB session_key;
  
        /*
         * Set to true when an RPC bind has been done on this pipe.
@@ -303,10 +303,8 @@ typedef struct smb_np_struct {
 
        /*
         * NamedPipe state information.
-        *
-        * (e.g. typecast a np_struct, above).
         */
-       void *np_state;
+       struct pipes_struct *np_state;
 
        /*
         * NamedPipe functions, to be called to perform
@@ -318,13 +316,16 @@ typedef struct smb_np_struct {
         * returns: state information representing the connection.
         *          is stored in np_state, above.
         */
-       void *   (*namedpipe_create)(const char *pipe_name, 
-                                         connection_struct *conn, uint16 vuid);
+       struct pipes_struct *(*namedpipe_create)(
+               const char *pipe_name,
+               const char *client_address,
+               struct auth_serversupplied_info *server_info,
+               uint16_t vuid);
 
        /* call to perform a write namedpipe operation
         */
-       ssize_t  (*namedpipe_write)(void * np_state,
-                                   char *data, size_t n);
+       ssize_t (*namedpipe_write)(struct pipes_struct *p,
+                                  char *data, size_t n);
 
        /* call to perform a read namedpipe operation.
         *
@@ -337,18 +338,9 @@ typedef struct smb_np_struct {
         * when samba is modified to use namedpipe_transact,
         * the pipe_outstanding argument may be removed.
         */
-       ssize_t  (*namedpipe_read)(void * np_state,
-                                  char *data, size_t max_len,
-                                  bool *pipe_outstanding);
-
-       /* call to close a namedpipe.
-        * function is expected to perform all cleanups
-        * necessary, free all memory etc.
-        *
-        * returns True if cleanup was successful (not that
-        * we particularly care).
-        */
-       bool     (*namedpipe_close)(void * np_state);
+       ssize_t (*namedpipe_read)(struct pipes_struct *p,
+                                 char *data, size_t max_len,
+                                 bool *pipe_outstanding);
 
 } smb_np_struct;