[jcifs] Samba4 IDL, RPCs, NDR Slight-of-hand, NdrBuffer, ...

Eric Glass eric.glass at gmail.com
Tue Jul 13 10:11:20 GMT 2004

> The getDeferred method is where the slight-of-hand occurs. So the current
> position and the deferred position are encoded at the same time but are
> largely independent of one another. Simple!

The current way that Jarapac does this (badly) is in
NetworkDataRepresentation.readElement/writeElement.  The pointer
wrapper classes register with the ndr object, which maintains a map of
identifier->referent and a list of encountered pointers; after
reading/writing the "core" pieces, the deferred referents are
processed to populate/output the pointer wrappers.  This doesn't
currently work properly, however, due largely to my aforementioned
fuzzy understanding of RPC pointers ;).

The reason I did it this way was I wasn't sure how to cleanly
determine the size of the pre-deferred content prior to processing;
i.e., I wasn't sure how to find the deferred index without
preprocessing beforehand.  The above was basically intended to skip
the deferred stuff and then write it after finishing the pre-deferred

> Does Jarapac support server-side routines? Currently the idl compiler
> generates server stubs but should I bother with the Java server stubs?

The original intent was to do both.  The server-side framework is
currently non-existent, though, so realistically it is just
client-side for now.  The server-side needs an equivalent to rpc.Stub
and rpc.TransportFactory to install server handlers.  This is also
blocking connectionless RPC, as the connectionless authentication
process requires clients to also be servers.


More information about the jcifs mailing list