remote announce
+remote browse sync
+
root
root dir
This option replaces similar functionality from the nmbd lmhosts file.
+.SS remote browse sync (G)
+
+This option allows you to setup nmbd to periodically request synchronisation
+of browse lists with the master browser of a samba server that is on a remote
+segment. This option will allow you to gain browse lists for multiple
+workgroups across routed networks. This is done in a manner that does not work
+with any non-samba servers.
+
+This is useful if you want your Samba server and all local clients
+to appear in a remote workgroup for which the normal browse propagation
+rules don't work. The remote workgroup can be anywhere that you can send IP
+packets to.
+
+For example:
+
+ remote browse sync = 192.168.2.255 192.168.4.255
+
+the above line would cause nmbd to request the master browser on the
+specified subnets or addresses to synchronise their browse lists with
+the local server.
+
+The IP addresses you choose would normally be the broadcast addresses
+of the remote networks, but can also be the IP addresses of known
+browse masters if your network config is that stable. If a machine IP
+address is given Samba makes NO attempt to validate that the remote
+machine is available, is listening, nor that it is in fact the browse
+master on it's segment.
+
+
.SS revalidate (S)
This options controls whether Samba will allow a previously validated
char *lp_logon_drive(void);
char *lp_logon_home(void);
char *lp_remote_announce(void);
+char *lp_remote_browse_sync(void);
char *lp_wins_server(void);
char *lp_interfaces(void);
char *lp_socket_address(void);
void reset_announce_timer();
void announce_master(time_t t);
void announce_remote(time_t t);
+void browse_sync_remote(time_t t);
/*The following definitions come from namebrowse.c */
name,stype,comment);
}
}
+}
+
+/****************************************************************************
+ do all the "remote" browse synchronisation stuff.
+ These are used to put our browse lists into remote browse lists.
+ **************************************************************************/
+void browse_sync_remote(time_t t)
+{
+ char *s,*ptr;
+ static time_t last_time = 0;
+ pstring s2;
+ struct in_addr addr;
+
+ if (last_time && t < last_time + REMOTE_ANNOUNCE_INTERVAL)
+ return;
+
+ last_time = t;
+ s = lp_remote_browse_sync();
+ if (!*s) return;
+
+ for (ptr=s; next_token(&ptr,s2,NULL); )
+ {
+ /* the entries are of the form a.b.c.d */
+ int n;
+
+ addr = *interpret_addr2(s2);
+
+ /* Announce all our names including aliases */
+ for (n=0; my_netbios_names[n]; n++)
+ {
+ char *name = my_netbios_names[n];
+ do_announce_request(name, "*", ANN_MasterAnnouncement, 0x20, 0, addr);
+ }
+ }
}
announce_host(t);
announce_master(t);
announce_remote(t);
+ browse_sync_remote(t);
query_refresh_names(t);
char *szWINSserver;
char *szInterfaces;
char *szRemoteAnnounce;
+ char *szRemoteBrowseSync;
char *szSocketAddress;
char *szNISHomeMapName;
char *szAnnounceVersion; /* This is initialised in init_globals */
{"logon drive", P_STRING, P_GLOBAL, &Globals.szLogonDrive, NULL},
{"logon home", P_STRING, P_GLOBAL, &Globals.szLogonHome, NULL},
{"remote announce", P_STRING, P_GLOBAL, &Globals.szRemoteAnnounce, NULL},
+ {"remote browse sync", P_STRING, P_GLOBAL, &Globals.szRemoteBrowseSync, NULL},
{"socket address", P_STRING, P_GLOBAL, &Globals.szSocketAddress, NULL},
{"homedir map", P_STRING, P_GLOBAL, &Globals.szNISHomeMapName, NULL},
{"announce version", P_STRING, P_GLOBAL, &Globals.szAnnounceVersion, NULL},
FN_GLOBAL_STRING(lp_logon_drive,&Globals.szLogonDrive)
FN_GLOBAL_STRING(lp_logon_home,&Globals.szLogonHome)
FN_GLOBAL_STRING(lp_remote_announce,&Globals.szRemoteAnnounce)
+FN_GLOBAL_STRING(lp_remote_browse_sync,&Globals.szRemoteBrowseSync)
FN_GLOBAL_STRING(lp_wins_server,&Globals.szWINSserver)
FN_GLOBAL_STRING(lp_interfaces,&Globals.szInterfaces)
FN_GLOBAL_STRING(lp_socket_address,&Globals.szSocketAddress)