Notes on Hagelslag.

1. Introduction

Hagelslag is an implementation of Gnutella. For information, see inernet.
The specifications used were downloaded from :
http://capnbry.dyndns.org/gnutella
These are the specs to which Hagelslag complies.

Hagelslag is complety implemented on Debian Linux/GNU 2.2 in C++, by 
F.P.Beekhof, luciferNO@tiefighter.MOREet.SPAM.tudelft.nl (remove capitals
from address).


2. License

GPL!
This software is released under Gnu Public License. For details, see any
of the source files. This license applies to every part and file of this
package, even if the file or directory does not contain the label that
the source files have.


3. Credits

Have a look at the website, http://TieFighter.et.tudelft.nl/hagelslag

4. What is this ?

Hagelslag was designed to be flexible. You can run it in 3 different modes :

ROUTER 	: Accept and route gnutella packets, share files.
CONSOLE : terminal client.
DAEMON 	: identical to CONSOLE, except that you must open a tcp connection
	  to a control port to access the program. Telnet will do this.

Router mode is usefull to build a gnutella-network backbone. It still has
file-sharing capabilties, so you may use it as a kind of file-server. It
could also be used to provide a fixed entry-point on the
gnutella-network. That's what I don't like about gnutella. It is so
difficult to log on for the first time.

Console mode is just a commandline oriented client. Nothing fancy, very
powerfull and of course you need to learn the commands.

Daemon mode is where the fun starts. Of course it is lots of fun to telnet to
the daemon and start using the command line. But this option was really
intended to allow independend development for Gui's, which I can't do. Yes, I
don't know how (yet). You could even buildt a web interface with CGI or
something similar (PHP perhaps?).

To compile a specific target :

CONSOLE :
make all
make install (as root)

ROUTER :
open the Makefile in the src directory in your favorite editor, and change 
CXX_FLAGS=$(CONSOLE_FLAGS) to CXX_FLAGS=$(ROUTER_FLAGS)
make clean; make depend; make hagelslagrouter
make install (as root)

DAEMON :
open the Makefile in the src directory in your favorite editor, and change
CXX_FLAGS=$(CONSOLE_FLAGS) to CXX_FLAGS=$(DAEMON_FLAGS)
make clean; make depend; make hagelslagd
make install (as root)

To obtain a host database, which is required to connect to other hosts,
enter the name of a host cache as a host. I.e. :
host add gnutellahosts.com
or
h a gnutellacache.com
ought to do the trick


mkdir ~/.hagelslag
cp hosts.txt ~/.hagelslag/hagelslag.hosts

 
5. GUI

Well, none so far. To create one, follow these instructions.
Read the Users Manual. 
Read the Programmers Manual.
You might want to read the gnutella specs from http://gnutella.wego.com

compile as daemon mode. Telnet to it (default port 1414)
type 'help' and read all help. Note that the 'holdon' command is only
available in daemon mode. Try the commands.

Create a nice gui. Accessing hagelslag is done by creating a tcp 
connection to a daemon process created by you gui program. Commands are
given by pumping proper strings into hagelslagd. Feedback is obtained by
reading strings from the tcp/ip connection and parsing them. There is an
API definition in the Programmers Manual and an implementation in the
gui-api directory to make sure this is not reimplemented for each new
GUI. Read the Programmers Manual for more information.


6. Hagelslag - Why that name.

GNUtella is obvliously a pun on GNU and Nutella. Nutella is a chocalate-like
stuff to smear on your bread. Hagelslag is the dutch word for chocolate chips
that go on your bread as well.


7. Stability and Bugs

Hagelslag is fully UN-tested. Well, that is somewhat exagerated, but as long
as hagelslag still has 0.x version numbers, it is not officially stable. Thank 
goodness there are never any bugs in my source code or that might be a problem.
Might hagelslag perfom any different than expected, or you think you have found
other nasty things in the source, please mail to 
luciferNO@tiefighterMORE.etSPAM.tudelft.nl (remove capitals from address).

The home page for this project is "http://TieFighter.et.tudelft.nl/hagelslag"


Good luck & have fun.

	Fokko Beekhof

