matthias.christian@tiscali.de
2005-Jul-28 00:10 UTC
Need help with the rsync library and the communication protocol
Hey, I'm currently adding rsync to pacman (http://archlinux.org/pacman). A static version of the program is used for rescue operations. Because of this it is impossible to use the rsync client programm via an execve call and we need a version implemented in C. So I started implementing it. But the rsync source isn't beautiful or structured - it's just a big hunk of code. I spent nearly 4 hours in reading it. Ok, first you transmit your version, e.g. "@RSYNCD: 29"; then you select the module, e.g. "ftp", or list the modules via "#list". But how to select the directory in the module? And how to download a file/produce the xdelta. Is there maybe a paper or something similar describing this protocol? My other Problem is librsync -- the header file is unreadable. Is there maybe a doucmentation about this? Thanks for any help Matthias-Christian Ott __________________________________________________________________ Der Tiscali DVD-Verleih: Viele Heimkino-Highlights bequem frei Haus. Jetzt informieren und anmelden! http://www.tiscali.de/kino/kino_netleih.php
Wayne Davison
2005-Jul-28 11:12 UTC
Need help with the rsync library and the communication protocol
On Thu, Jul 28, 2005 at 02:09:31AM +0200, matthias.christian@tiscali.de wrote:> But the rsync source isn't beautiful or structured - it's just a big > hunk of code.Right -- it's a utility, not a library (though someone is working on making it a library). I'd recommend looking into the librsync project instead, which implements the rsync algorithm in a way that can be used by any program: http://librsync.sourceforge.net/ This will not allow you to build something that is wire-compatible with rsync, though. For an example file-transfer program that uses librsync, see the rZync link on the above page (and keep in mind that was merely a test-bed, so it's mainly useful for seeing how someone integrated librsync into an rsync-like program). ..wayne..