help constructing event_ctx for dcerpc handler

Amin Azez azez at
Wed Jan 16 14:04:02 GMT 2008

* Amin Azez wrote, On 16/01/08 11:35:
> I'm struggling to find examples populating the event_ctx struct passed
> to dcerpc_pipe_connect_b() and dcerpc_pipe_connect().
> I want to be able to use async handlersin vfs_proxy for the proxy rpc
> and also for it's smb connection without one blocking the other.
> I've read events.[ch], composite.[ch] (and most files that use
> dcerpc_pipe_connect* with non-null event context, but that is generally
> provided through too many levels of indirection by the caller) and
> although very interesting it's hard to draw the final understanding
> needed from those.
> I've been able to conclude that there is or ought to be a generic rpc
> event handler which relates incoming packets to queued async structs and
> then calls a specific callback to match the specific responded RPC. (And
> this is what the smb handlers do)... and yet although vfs_proxy.h
> (copied from vfs_cifs.h) has a ntvfs->ctx->event_ctx, but again the path
> from the packet being received to an async handler is such that I've not
> been able to relate the call-stack to anything in ntvfs->ctx->event_ctx
> (yet).
> I've been at this for a few hours, and I'm still going but thought it
> worth the time to ask.
Well.... I feel a bit dumb, but for the record, I just had to send a
callback handler in:

  struct rpc_request *rpcreq->async.callback

During my debug session I found out that a new tcp or smb connection is
NOT made to handle the rpc, but it is wrapped with "trans" operations,
which I found interesting.


More information about the samba-technical mailing list