@eskimo,
There's a new problem I just ran into:
If the host is a Windows server, the domain name of the mounted volume resolve to a name that I cannot use - neither directly nor with the proposed SRVResolver.
For instance, I set up a Windows server with the netbios(?) name "win-serv", and a volume named "WinServer". When I Get Info on the mounted volume, it shows as:
smb://win-serv/WinServer
When I retrieve the domain name, e.g. with statfs, the name I get is just "win-serv", but that can't be used as an IP address.
I found that I can resolve this name with the shell cmd smbutil lookup win-serv, though.
So my questions are:
Is there an API for doing what smbutil lookup does?
How do I tell that I need to use this method? I guess I could just always fall back to it when I cannot reach the server via its given name, but is there a clearer indicator that this is a WINS(?) and not a usual DNS name?
I have a related question on StackOverflow but that hasn't gotten me anywhere, either. This entire WINS/NetBIOS thing is a mystery on macOS, it seems.
Topic:
App & System Services
SubTopic:
Core OS
Tags: