It appears that name_resolve_bcast() does not find hosts in a workgroup if there are only win98 or win95 machines in the workgroup. The request sent to 192.168.1.255 receives no response. If there is a win2000 machine in the workgroup (and thus it is the master browser), a proper response is received to the request sent to 192.168.1.255. Here's a trace with only a win98 machine in the workgroup, showing the lack of response.
I would greatly appreciate hearing how to browse for servers in a workgroup with only win98 or win95 machines in the workgroup! In this trace, the workgroup in question is LIPMAN. Although I'm doing this with smbsh, client debugging is enabled and the calls to name_resolve_bcast() are shown... ------------------------------------------------------------------------------ smbsh$ smbsh -n -d 9 smbw_path(.) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/. smbw_path(.) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/. smbw_path(./smbsh) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/./smbsh cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/smbsh smbw_path(./smbsh) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/./smbsh cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/smbsh fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful Initial cwd is /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1304) fcntl_lock 8191 14 0 1 1 [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1342) fcntl_lock: Lock call successful [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1304) fcntl_lock 8191 13 0 1 2 [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1342) fcntl_lock: Lock call successful [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1304) fcntl_lock 8191 14 0 1 1 [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1342) fcntl_lock: Lock call successful [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1304) fcntl_lock 8191 13 0 1 2 [2003/02/26 09:31:39, 8] lib/util.c:fcntl_lock(1342) fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful Initial cwd is /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin smbw_path(.) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/. smbw_path(.) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/. smbw_path(.) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/. smbw_path(./smbsh) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/./smbsh cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/smbsh smbw_path(./smbsh) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/./smbsh cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/smbsh smbsh$ ls /smb/LIPMAN smbw_path(.) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/. smbw_path(.) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/. smbw_path(./ls) cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/./ls cleaning /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin/ls fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful Initial cwd is /fiona/home/derrell/samba-2.2.7.sandbox-djl/source/bin smbw_path(/smb/LIPMAN) cleaning /smb/LIPMAN stat(/smb/LIPMAN) cleaning /smb/LIPMAN fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful server_n=[LIPMAN#1D] server=[LIPMAN#1D] fcntl_lock 8191 14 0 1 1 fcntl_lock: Lock call successful fcntl_lock 8191 13 0 1 2 fcntl_lock: Lock call successful resolve_lmhosts: Attempting lmhosts lookup for name LIPMAN<0x1d> startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was No such file or directory name_resolve_bcast: Attempting broadcast lookup for name LIPMAN<0x1d> bind succeeded on port 0 socket option SO_KEEPALIVE = 0 socket option SO_REUSEADDR = 1 socket option SO_BROADCAST = 1 Could not test socket option TCP_NODELAY. socket option IPTOS_LOWDELAY = 0 socket option IPTOS_THROUGHPUT = 0 socket option SO_SNDBUF = 65535 socket option SO_RCVBUF = 65535 socket option SO_SNDLOWAT = 1 socket option SO_RCVLOWAT = 1 socket option SO_SNDTIMEO = 0 socket option SO_RCVTIMEO = 0 Sending a packet of len 50 to (192.168.1.255) on port 137 Sending a packet of len 50 to (192.168.1.255) on port 137 Sending a packet of len 50 to (192.168.1.255) on port 137 resolve_lmhosts: Attempting lmhosts lookup for name LIPMAN<0x1b> startlmhosts: Can't open lmhosts file /etc/samba/lmhosts. Error was No such file or directory resolve_wins: Attempting wins lookup for name LIPMAN<0x1b> wins_srv_count: WINS status: 0 servers. resolve_wins: WINS server resolution selected and no WINS servers listed. name_resolve_bcast: Attempting broadcast lookup for name LIPMAN<0x1b> bind succeeded on port 0 socket option SO_KEEPALIVE = 0 socket option SO_REUSEADDR = 1 socket option SO_BROADCAST = 1 Could not test socket option TCP_NODELAY. socket option IPTOS_LOWDELAY = 0 socket option IPTOS_THROUGHPUT = 0 socket option SO_SNDBUF = 65535 socket option SO_RCVBUF = 65535 socket option SO_SNDLOWAT = 1 socket option SO_RCVLOWAT = 1 socket option SO_SNDTIMEO = 0 socket option SO_RCVTIMEO = 0 Sending a packet of len 50 to (192.168.1.255) on port 137 Sending a packet of len 50 to (192.168.1.255) on port 137 Sending a packet of len 50 to (192.168.1.255) on port 137 ls: /smb/LIPMAN: No such file or directory smbsh$
