diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-12 03:59:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-12 03:59:09 +0000 |
commit | 16309de71d6c8de96e869aeaab0b879185991d87 (patch) | |
tree | d122fe6bd25cd87df5422b0af661c9e93db31ef8 /source4/rpc_server/dcerpc_server.h | |
parent | fcc4efd1ea637c810eed8444080b87d7f92c837a (diff) | |
download | samba-16309de71d6c8de96e869aeaab0b879185991d87.tar.gz samba-16309de71d6c8de96e869aeaab0b879185991d87.tar.bz2 samba-16309de71d6c8de96e869aeaab0b879185991d87.zip |
* the RPC-ECHO pipe now works in smbd, as long as the data sizes
don't cause fragmented pdus (I'll add fragments shortly)
* change data_blob_talloc() to not zero memory when the 2nd argument
is NULL. The zeroing just masks bugs, and can't even allow a DOS
attack
* modified pidl to ensure that [ref] arguments to the out side of
functions are allocated when parsing the in side. This allows rpc
backends to assume that [ref] variables are all setup. Doesn't work
correctly for [ref] arrays yet
* changed DLIST_ADD_END() to take the type instead of a tmp
variable. This means you don't need to declare a silly tmp variable in
the caller
(This used to be commit 46e0a358198eeb9af1907ee2a29025d3ab23b6d1)
Diffstat (limited to 'source4/rpc_server/dcerpc_server.h')
-rw-r--r-- | source4/rpc_server/dcerpc_server.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h index b28f40768a..9895254cad 100644 --- a/source4/rpc_server/dcerpc_server.h +++ b/source4/rpc_server/dcerpc_server.h @@ -32,6 +32,19 @@ struct dcesrv_endpoint { } info; }; +struct dcesrv_state; + +/* the dispatch functions for an interface take this form */ +typedef NTSTATUS (*dcesrv_dispatch_fn_t)(struct dcesrv_state *, TALLOC_CTX *, void *); + +/* the state of an ongoing dcerpc call */ +struct dcesrv_call_state { + struct dcesrv_call_state *next, *prev; + struct dcesrv_state *dce; + TALLOC_CTX *mem_ctx; + struct dcerpc_packet pkt; + DATA_BLOB data; +}; /* the state associated with a dcerpc server connection */ struct dcesrv_state { @@ -43,15 +56,29 @@ struct dcesrv_state { /* endpoint operations provided by the endpoint server */ const struct dcesrv_endpoint_ops *ops; + /* the ndr function table for the chosen interface */ + const struct dcerpc_interface_table *ndr; + + /* the dispatch table for the chosen interface. Must contain + enough entries for all entries in the ndr table */ + const dcesrv_dispatch_fn_t *dispatch; + + /* the state of the current calls */ + struct dcesrv_call_state *call_list; + /* private data for the endpoint server */ void *private; }; struct dcesrv_endpoint_ops { - /* the query function is used to ask an endpoint server if it + /* this function is used to ask an endpoint server if it handles a particular endpoint */ - BOOL (*query)(const struct dcesrv_endpoint *); + BOOL (*query_endpoint)(const struct dcesrv_endpoint *); + + /* this function sets up the dispatch table for this + connection */ + BOOL (*set_interface)(struct dcesrv_state *, const char *, uint32); /* connect() is called when a connection is made to an endpoint */ NTSTATUS (*connect)(struct dcesrv_state *); |