Implementing BCAST ================== The accompanying gzipped tar file contains the source code of the BCAST implementation based on XORP. When unpacking the TAR file, it should generate two directories: APPLICATIONS and XORP-BCAST. The code was developed and tested on Redhat Linux 9 (Linux kernel 2.4.20, gcc 3.2.2). The BCAST implementation is based on XORP version 0.5. XOPR-BCAST ========== The implementation of BCAST is spread over multiple files and subdirectories. The subdirectory BCAST contains the core implementation of the protocol. Issues related to XRLs and interfaces are found in the XRL subdirectory. The BCAST interface is defined in XRL/INTERFACES/BCAST.XIF, the base protocol class (in BCAST_XIF.CC and BCAST_XIF.HH) is derived by the XORP tools from this interface definition. The target definition for BCAST is in XRL/TARGETS/BCAST.TGT, from which the appropriate source files BCAST.XRLS, BCAST_BASE.CC, and BCAST_BASE.HH are derived by the XORP tools. The subdirectory XRL/BCAST_TEST contains a simple application that creates a "BCAST" target and a client, invoking XRLs and printing the results of the invocations. This is not a full implementation of the protocol, but rather tests the XRLs that BCAST will handle. The template describing BCAST configuration options is defined in ETC/TEMPLATES/BCAST.TP. This file is read by the XORP_RTRMGR at startup and determines what configuration options are accepted in the configuration file, typically in RTRMGR/CONFIG.BOOT (can be overwritten by command-line options when XORP_RTRMGR is started). Example Applications ==================== The APPLICATION directory contains two sample applications, bcastSender and bcastReceiver. These implement a multicast sender and receiver, respectively, exchanging packets that have the BCAST protocol header. bcastSender expects 4 command-line parameters: the IPv4 multicast group address, the time (in ms) between consecutive multicast packets, the total number of multicast packets to be send, and the size of a multicast packet (not including the BCAST header, which by itself is 16 bytes long). As such, the bcastSender implements a CBR traffic source. For example, the following invovation will cause bcastSender to generate traffic of 1 kBytes/s for 100 seconds, sending it to multicast group 224.1.1.1: ./bcastSender 224.1.1.1 1000 100 1024 (send a 1 kByte packet every 1000 ms, for a total of 100 packets) bcastReceiver expects one command-line parameter, the IPv4 multicast address. Every time it receives a multicast packet destined to that address it will print relevant information from the BCAST header, together with information about what time the packet is received and from what sender. ./bcastSender 224.1.1.1 Sample output: From 192.168.17.5:32780: (192.168. 17. 5:0) at 1077982101,495795 From 192.168.17.5:32780: (192.168. 17. 5:1) at 1077982101,594582 From 192.168.17.5:32780: (192.168. 17. 5:2) at 1077982101,710793 From 192.168.17.5:32780: (192.168. 17. 5:3) at 1077982101,810405 From 192.168.17.5:32780: (192.168. 17. 5:4) at 1077982101,910014 From 192.168.17.5:32780: (192.168. 17. 5:5) at 1077982102,9632 From 192.168.17.4:32781: (192.168. 17. 4:0) at 1077982102,76040 From 192.168.17.5:32780: (192.168. 17. 5:6) at 1077982102,109236 From 192.168.17.4:32781: (192.168. 17. 4:1) at 1077982102,175641 From 192.168.17.5:32780: (192.168. 17. 5:7) at 1077982102,208844 From 192.168.17.4:32781: (192.168. 17. 4:2) at 1077982102,269719 From 192.168.17.5:32780: (192.168. 17. 5:8) at 1077982102,308455 From 192.168.17.4:32781: (192.168. 17. 4:3) at 1077982102,374861 From 192.168.17.5:32780: (192.168. 17. 5:9) at 1077982102,408064 From 192.168.17.4:32781: (192.168. 17. 4:4) at 1077982102,474480 From 192.168.17.5:32780: (192.168. 17. 5:10) at 1077982102,495687 The receiver received 11 multicast packets from machine 192.168.17.5 (sent by an application on that machine with sequence numbers 0 through 10), spaced roughly 100 ms apart. The receiver also received multicast packets from machine 192.168.17.4, sent by an application on that machine, with sequence numbers from 0 through 4, spaced roughly 100 ms apart. To compile these sample applications, simply type MAKE in the APPLICATION directory. Compiling BCAST =============== All Makefiles etc. have been modified appropriately, so configuring and compiling XORP, including BCAST, should be as easy as compiling the original XORP distribution. First, at the top level, run ./CONFIGURE, then run GMAKE (see also the README file for XORP). Based on the version of Linux used, the internal tests (GMAKE CHECK) should also succeed, see BUILD_NOTES for OS-specific comments. As BCAST uses PCAP, some changes to the MAKEFILEs in BCAST may be necessary to reflect the location of the PCAP library on a specific installation. This distribution assumes that PCAP is installed in /usr/lib. If this is wrong, the most appropriate way to change that information is to edit MAKEFILE.AM, run AUTOMAKE in the top-level directory (which will generate MAKEFILE.IN), and then re-run ./CONFIGURE, creating a correct MAKEFILE. Ottawa, March 2004 Thomas Kunz