diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-10 12:15:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:38 -0500 |
commit | 577218b2aded7adb367f3f33bcc5560f3d4c0ec2 (patch) | |
tree | 353a1cad1840485225b0d25d08eae5ae4aa27e5c /source4/rpc_server/dcerpc_server.h | |
parent | 3136462ea9d2b97e5385386e2c37b1ac403db6ca (diff) | |
download | samba-577218b2aded7adb367f3f33bcc5560f3d4c0ec2.tar.gz samba-577218b2aded7adb367f3f33bcc5560f3d4c0ec2.tar.bz2 samba-577218b2aded7adb367f3f33bcc5560f3d4c0ec2.zip |
r4640: first stage in the server side support for multiple context_ids on one pipe
this stage does the following:
- simplifies the dcerpc_handle handling, and all the callers of it
- split out the context_id depenent state into a linked list of established contexts
- fixed some talloc handling in several rpc servers that i noticed while doing the above
(This used to be commit fde042b3fc609c94e2c7eedcdd72ecdf489cf63b)
Diffstat (limited to 'source4/rpc_server/dcerpc_server.h')
-rw-r--r-- | source4/rpc_server/dcerpc_server.h | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h index c919476d1b..49fbd4477b 100644 --- a/source4/rpc_server/dcerpc_server.h +++ b/source4/rpc_server/dcerpc_server.h @@ -44,8 +44,7 @@ struct dcesrv_interface { NTSTATUS (*bind)(struct dcesrv_call_state *, const struct dcesrv_interface *); /* this function is called when the client disconnects the endpoint */ - void (*unbind)(struct dcesrv_connection *, const struct dcesrv_interface *); - + void (*unbind)(struct dcesrv_connection_context *, const struct dcesrv_interface *); /* the ndr_pull function for the chosen interface. */ @@ -67,6 +66,7 @@ struct dcesrv_interface { struct dcesrv_call_state { struct dcesrv_call_state *next, *prev; struct dcesrv_connection *conn; + struct dcesrv_connection_context *context; struct dcerpc_packet pkt; DATA_BLOB input; @@ -85,9 +85,10 @@ struct dcesrv_call_state { /* a dcerpc handle in internal format */ struct dcesrv_handle { struct dcesrv_handle *next, *prev; + struct dcesrv_connection_context *context; struct policy_handle wire_handle; void *data; - void (*destroy)(struct dcesrv_connection *, struct dcesrv_handle *); + void (*destroy)(struct dcesrv_connection_context *, struct dcesrv_handle *); }; /* hold the authentication state information */ @@ -98,6 +99,24 @@ struct dcesrv_auth { NTSTATUS (*session_key)(struct dcesrv_connection *, DATA_BLOB *session_key); }; +struct dcesrv_connection_context { + struct dcesrv_connection_context *next, *prev; + uint32_t context_id; + + /* the connection this is on */ + struct dcesrv_connection *conn; + + /* the ndr function table for the chosen interface */ + const struct dcesrv_interface *iface; + + /* private data for the interface implementation */ + void *private; + + /* current rpc handles - this is really the wrong scope for + them, but it will do for now */ + struct dcesrv_handle *handles; +}; + /* the state associated with a dcerpc server connection */ struct dcesrv_connection { @@ -107,8 +126,8 @@ struct dcesrv_connection { /* the endpoint that was opened */ const struct dcesrv_endpoint *endpoint; - /* the ndr function table for the chosen interface */ - const struct dcesrv_interface *iface; + /* a list of established context_ids */ + struct dcesrv_connection_context *contexts; /* the state of the current calls */ struct dcesrv_call_state *call_list; @@ -116,13 +135,6 @@ struct dcesrv_connection { /* the maximum size the client wants to receive */ uint32_t cli_max_recv_frag; - /* private data for the interface implementation */ - void *private; - - /* current rpc handles - this is really the wrong scope for - them, but it will do for now */ - struct dcesrv_handle *handles; - DATA_BLOB partial_input; /* the current authentication state */ |