The code is very stable, and i have it running on several of our systems including my own workstation since fall'99. However, the usual disclaimer applies - use this code at your own risk!
The most recent version (released 11 february 2000) has the following features:
pgmcat -s -ttl TTL group/port < source_file # on the sender pgmcat group/port > dest_file # on the receivers.
You should be able to put them into /usr/ports/net/ns/patches and use "make" to rebuild NS If you want to apply the patches manually, here is the content of the files:
aa - ... ba - Makefile changes ca..ch - PGM stuff (sender, receiver and network element) da..db - pgmcc stuff ea..ef - network element changes fa..fd - changes related to xplot and tcp
kpgm-991009.tgz sample-991009.tgz doc-991009.tgzrespectively for kernel source, sample code and documentation (none at the moment!). Should some archive be specific for a particular version of the operating system, the OS name/release is included in the filename.
The kpgm archive generally contains a patchfile to update a few kernel files, the four new files containing the full PGM host implementation, and basic documentation (install instructions, manual page, code architecture).
The new files are
/usr/src/sys/netinet/pgm.h /usr/src/sys/netinet/pgm_var.h /usr/src/sys/netinet/pgm_timer.c /usr/src/sys/netinet/pgm_usrreq.c /usr/src/sys/netinet/pgm.4whereas the patchfile (there are a few different versions depending on the OS release you are using) updates at most the following files
/usr/src/sys/netinet/in.h /usr/src/sys/netinet/in_proto.c /usr/src/sys/conf/files /usr/src/sys/conf/optionsThe patches merely provide the glue to recognize the new files and include them in the kernel compile, so they are not going to change over time. You are encouraged to have a look at them to verify that they are "safe".
While the PGM implementation is experimental, the kernel build process is totally unaffected if you don't have "options PGM" in your kernel configuration file -- in other words, don't be afraid of destroying your system's sources.
To install this code, read the detailed instructions in the INSTALL file part of the kpgm archive -- the install process is as simple as running patch, copying the new files to their locations, and build a new kernel which includes the line options PGM in the kernel configuration file.
Check the pgm(4) manpage for a detailed description
of the socket API and of sysctl variables which let you
set PGM operating parameters.
To test the recovery process, it is very convenient to use
a standard piece of FreeBSD called
dummynet, a flexible bandwidth manager/delay emulator/link
emulator (another one of my babies...).
To include dummynet in your kernel you have to include just a few options in your kernel config file, then you can write things like this
ipfw add pipe 1 113 from any to any in ipfw add pipe 2 113 from any to any out ipfw pipe 1 config bw 100Kbit/s queue 20 delay 300ms plr 0.4 ipfw pipe 2 config bw 120Kbit/s queue 20 delay 100ms plr 0.1(where 113 is the protocol number associated with PGM). This specific example will route inbound and outbound PGM traffic to two different pipes whose parameters are shown in the configuration line.
3. A demo version.
For those who want to try PGM without having to install FreeBSD
or patch their system, I provide a
floppy image of a system with FreeBSD, PGM, pgmcat,
and test tools such as ipfw, dummynet, tcpdump.
The disk has drivers for a few interfaces, and accessible via telnet.
To setup this system, download the 1.44MB image, picopgm.000216.bin and copy it to a floppy using dd under FreeBSD, or rawrite under DOS/Windows.
Then put the floppy into a machine with hopefully at least one ethernet interface, and wait for it to boot. When the system comes up, it will ask for the hostname and ip for the machine. After that you can login as root, password "setup" and you can run pgmcat, dummynet etc.
Simone Bertoni, Lorenzo Conti and Gianluca Iannaccone have helped writing and testing this code. Gianluca and Valentina Benucci are the main authors of the NS code.