Determining capabilities of peer computer in samba4

derrell at samba.org derrell at samba.org
Sun Aug 28 03:20:02 GMT 2005


derrell at samba.org writes:

> In samba4, how might one discover the capabilities of a peer, to select
> which of the various "raw" functions to use?  For example, if I want to open
> a file, is there a way to determine whether I should be using t2open,
> openold or openx (a few of my choices in union smb_open)?  Similarly for
> other raw facilities where multiple functions exist.  We clearly want to use
> the most "recent" or complete function that the peer will accept, but it'd
> be nice not to have to try them in descending order of preference if there's
> some better way to figure out which should be used.

I see that the smbcli_state has an smbcli_transport which has an
smbcli_negotiate which has a "protocol" which is an enum protocol_types.  It
looks like I might be able to select the appropriate function based on this
"protocol" field.  (It's just a lot of levels of indirection into structures
that I don't feel I should really be looking at when I'm just a client
library...???)

Derrell


More information about the samba-technical mailing list