Move DSGETDC_VALID_FLAGS to IDL.
[ira/wip.git] / source3 / include / ntdomain.h
index 82e212c0ca0a966abcf8b31f9afc594a7688be62..b89b0fea3a605098d5d81e21e3ca1c48ac591e69 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -17,8 +17,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */
  */
  
 typedef struct _prs_struct {
-       BOOL io; /* parsing in or out of data stream */
+       bool io; /* parsing in or out of data stream */
        /* 
         * If the (incoming) data is big-endian. On output we are
         * always little-endian.
         */ 
-       BOOL bigendian_data;
+       bool bigendian_data;
        uint8 align; /* data alignment */
-       BOOL is_dynamic; /* Do we own this memory or not ? */
+       bool is_dynamic; /* Do we own this memory or not ? */
        uint32 data_offset; /* Current working offset into data. */
        uint32 buffer_size; /* Current allocated size of the buffer. */
        uint32 grow_size; /* size requested via prs_grow() calls */
@@ -136,20 +135,20 @@ struct handle_list {
 /* Domain controller authentication protocol info */
 struct dcinfo {
        uint32 sequence; /* "timestamp" from client. */
-       DOM_CHAL seed_chal; 
-       DOM_CHAL clnt_chal; /* Client credential */
-       DOM_CHAL srv_chal;  /* Server credential */
+       struct netr_Credential seed_chal;
+       struct netr_Credential clnt_chal; /* Client credential */
+       struct netr_Credential srv_chal;  /* Server credential */
  
-       uchar  sess_key[16]; /* Session key - 8 bytes followed by 8 zero bytes */
-       uchar  mach_pw[16];   /* md4(machine password) */
+       unsigned char  sess_key[16]; /* Session key - 8 bytes followed by 8 zero bytes */
+       unsigned char  mach_pw[16];   /* md4(machine password) */
 
        fstring mach_acct;  /* Machine name we've authenticated. */
 
        fstring remote_machine;  /* Machine name we've authenticated. */
        fstring domain;
 
-       BOOL challenge_sent;
-       BOOL authenticated;
+       bool challenge_sent;
+       bool authenticated;
 };
 
 typedef struct pipe_rpc_fns {
@@ -187,7 +186,7 @@ struct kerberos_auth_struct {
 
 /* auth state for schannel. */
 struct schannel_auth_struct {
-       uchar sess_key[16];
+       unsigned char sess_key[16];
        uint32 seq_num;
 };
 
@@ -252,25 +251,31 @@ typedef struct pipes_struct {
         * Set to true when an RPC bind has been done on this pipe.
         */
        
-       BOOL pipe_bound;
+       bool pipe_bound;
        
        /*
         * Set to true when we should return fault PDU's for everything.
         */
        
-       BOOL fault_state;
+       bool fault_state;
 
        /*
         * Set to true when we should return fault PDU's for a bad handle.
         */
 
-       BOOL bad_handle_fault_state;
+       bool bad_handle_fault_state;
+
+       /*
+        * Set to true when the backend does not support a call.
+        */
+
+       bool rng_fault_state;
        
        /*
         * Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
         */
        
-       BOOL endian;
+       bool endian;
        
        /*
         * Struct to deal with multiple pdu inputs.
@@ -298,10 +303,10 @@ typedef struct smb_np_struct {
        int pnum;
        connection_struct *conn;
        uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
-       BOOL open; /* open connection */
+       bool open; /* open connection */
        uint16 device_state;
        uint16 priority;
-       fstring name;
+       char *name;
 
        /* When replying to an SMBtrans, this is the maximum amount of
            data that can be sent in the initial reply. */
@@ -324,7 +329,7 @@ typedef struct smb_np_struct {
         * returns: state information representing the connection.
         *          is stored in np_state, above.
         */
-       void *   (*namedpipe_create)(char *pipe_name, 
+       void *   (*namedpipe_create)(const char *pipe_name, 
                                          connection_struct *conn, uint16 vuid);
 
        /* call to perform a write / read namedpipe transaction.
@@ -336,7 +341,7 @@ typedef struct smb_np_struct {
        ssize_t  (*namedpipe_transact)(void *np_state,
                                       char *data, int len,
                                       char *rdata, int rlen,
-                                      BOOL *pipe_outstanding);
+                                      bool *pipe_outstanding);
 
        /* call to perform a write namedpipe operation
         */
@@ -356,7 +361,7 @@ typedef struct smb_np_struct {
         */
        ssize_t  (*namedpipe_read)(void * np_state,
                                   char *data, size_t max_len,
-                                  BOOL *pipe_outstanding);
+                                  bool *pipe_outstanding);
 
        /* call to close a namedpipe.
         * function is expected to perform all cleanups
@@ -365,14 +370,14 @@ typedef struct smb_np_struct {
         * returns True if cleanup was successful (not that
         * we particularly care).
         */
-       BOOL     (*namedpipe_close)(void * np_state);
+       bool     (*namedpipe_close)(void * np_state);
 
 } smb_np_struct;
 
 struct api_struct {  
        const char *name;
        uint8 opnum;
-       BOOL (*fn) (pipes_struct *);
+       bool (*fn) (pipes_struct *);
 };
 
 typedef struct {