[patch] SLP support (+ question)

Brad Hards bhards at bigpond.net.au
Sun Sep 22 14:45:00 EST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

G'day

The attached patch adds "first draft" support for service location protocol, 
using OpenSLP  (http://www.openslp.org). This allows you to automagically 
discover all the rsync servers on your network (which is defined in terms of 
your SLP configuration - typically equal to multicast scope, but you can 
change it around with Directory agents).
Here is an example:
bradh at squirt rsync-2.5.5 $ slptool findsrvs service:rsync
service:rsync://192.168.0.22:873:/,65535
service:rsync://192.168.0.22:873:,65535
service:rsync://squirt.cuneata.net.(none):873:,65535
service:rsync://squirt.cuneata.net:873:,65535

[OK, so these are really all the same server, but there is no reason why a 
real network wouldn't have a selection]

It has at least one major problem - Doesn't report name and comment 
attributes. I don't think I understand when the config file is being read. 
AFAICT, lp_numservices should be set up when I'm running the SLP routines in 
clientserver.c (see patch, with // style comment lines), but it isn't. If 
anyone can find a better spot to do the service registration, please hack 
away, or let me know.

Other known problems:
* shouldn't hardwire the portnum, instead should read from rsync_port. 
* needs to have a standard set of attributes defined. I'll chase this up with 
Erik Guttman.
* Needs to do smarter things if hostname or domainname are broken.
* Probably needs to do smarter things for multi-homed hosts.

If anyone was in doubt after all that: DON"T APPLY THIS TO A PRODUCTION BOX.

Any comments - let me know.

Brad

- -- 
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9jdXbW6pHgIdAuOMRAkNGAJ9JcyAK2JNyNqVOOWY30mwwjaW+rgCgr5kh
ax9uEHJ+BssRWUW0mglWe8I=
=C0Bl
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsync-slp-20020923.patch
Type: text/x-diff
Size: 5566 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20020922/e262b07f/rsync-slp-20020923.bin


More information about the rsync mailing list