Hi Nag,
> The fields *[ server_type, server_os ] *are getting filled when connection
> establishment with ms-servers. But there was a check saying that don't send
> details if the max_protocol was greater than "NT1" which means SMB1. *So is
> there a way to get these fields in string format* or an API call by using
> max_protocol = SMB2.
>
> - I checked few API's but there are giving the server_type as uint.
> - I want the data from ms_server as *server_type = "Windows Server 2012". *
>
> Any help will be so helpful.
>
>
> struct cli_state {
> /* The following strings are the
> * ones returned by the server if
> * the protocol > NT1.
> */
> char *server_type;
> char *server_os;
> char *server_domain; ....... }
>
That information is not available with SMB2.
The server domain might be retrieved using wkssvc_NetWkstaGetInfo(),
but that's currently not used.
I already thought about filling the server_os or server_type with
the protocol string, e.g. "SMB3_11 Server".
There's also a bug in 4.6 and master where we fail to fill in this
fields even with NT1 and older protocols (I'll post patches for this soon).
metze