diff options
author | Jeremy Allison <jra@samba.org> | 2000-02-23 02:02:33 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-02-23 02:02:33 +0000 |
commit | 9db96b7646aa36aa5b4ff309419235fe20bef78a (patch) | |
tree | 9d545a8cfd5029dae7f984e760ed0d78dd2e8db5 /source3/include | |
parent | f7324464b1adcac67e620a75f2fd51ef8e615173 (diff) | |
download | samba-9db96b7646aa36aa5b4ff309419235fe20bef78a.tar.gz samba-9db96b7646aa36aa5b4ff309419235fe20bef78a.tar.xz samba-9db96b7646aa36aa5b4ff309419235fe20bef78a.zip |
lib/system.c: Fixed gcc warnings.
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0.
Others - preparing for multiple pdu write code.
Jeremy.
(This used to be commit 9f879ec396230deba34fbe5e82d8a65f92137c54)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/ntdomain.h | 66 | ||||
-rw-r--r-- | source3/include/proto.h | 2 |
2 files changed, 53 insertions, 15 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index c1b966aa592..7f3d4b49503 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -63,6 +63,52 @@ typedef struct _prs_struct #define MARSHALLING(ps) (!(ps)->io) #define UNMARSHALLING(ps) ((ps)->io) +typedef struct _input_data { + /* + * This is the current incoming pdu. The data here + * is collected via multiple writes until a complete + * pdu is seen, then the data is copied into the in_data + * structure. The maximum size of this is 64k (2 byte length). + */ + prs_struct in_pdu; + + /* + * The amount of data needed to complete the in_pdu. + * If this is zero, then we are at the start of a new + * pdu. + */ + uint32 in_pdu_needed_len; + + /* + * This is the collection of input data with all + * the rpc headers and auth footers removed. + * The maximum length of this is strictly enforced. + */ + prs_struct in_data; +} input_data; + +typedef struct _output_data { + /* + * Raw RPC output data. This does not include RPC headers or footers. + */ + prs_struct rdata; + + /* The amount of data sent from the current rdata struct. */ + uint32 data_sent_length; + + /* + * The current PDU being returned. This inclues + * headers, data and authentication footer. + */ + unsigned char current_pdu[MAX_PDU_FRAG_LEN]; + + /* The amount of data in the current_pdu buffer. */ + uint32 current_pdu_len; + + /* The amount of data sent from the current PDU. */ + uint32 current_pdu_sent; +} output_data; + typedef struct pipes_struct { struct pipes_struct *next, *prev; @@ -99,25 +145,17 @@ typedef struct pipes_struct uid_t uid; gid_t gid; - /* - * Raw RPC output data. This does not include RPC headers or footers. + /* + * Struct to deal with multiple pdu inputs. */ - prs_struct rdata; - /* The amount of data sent from the current rdata struct. */ - uint32 data_sent_length; + input_data in_data; - /* - * The current PDU being returned. This inclues - * headers, data and authentication footer. + /* + * Struct to deal with multiple pdu outputs. */ - unsigned char current_pdu[MAX_PDU_FRAG_LEN]; - /* The amount of data in the current_pdu buffer. */ - uint32 current_pdu_len; - - /* The amount of data sent from the current PDU. */ - uint32 current_pdu_sent; + output_data out_data; /* When replying to an SMBtrans, this is the maximum amount of data that can be sent in the initial reply. */ diff --git a/source3/include/proto.h b/source3/include/proto.h index ee0de29eb63..837eb27eda0 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2577,7 +2577,7 @@ int read_pipe(pipes_struct *p, char *data, int n); void set_pipe_handle_offset(int max_open_files); void reset_chain_p(void); void init_rpc_pipe_hnd(void); -BOOL pipe_init_outgoing_data( pipes_struct *p); +BOOL pipe_init_outgoing_data(output_data *out_data); pipes_struct *open_rpc_pipe_p(char *pipe_name, connection_struct *conn, uint16 vuid); ssize_t write_to_pipe(pipes_struct *p, char *data, size_t n); |