summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/ntdomain.h66
-rw-r--r--source3/include/proto.h2
2 files changed, 53 insertions, 15 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index c1b966aa59..7f3d4b4950 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 ee0de29eb6..837eb27eda 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);