This file explains how to setup and use Beagle 0.1. This is updated Beagle 0.1 that works with DARWIN.06 kernel. For old DARWIN.05 kernel the binaries are in DARWIN.05 directory. This directory contains the following files: README This file. BUGS List of known bugs at this time. TO_DO Some things on my to do list. DARWIN.05/ Old binaries and libraries. beagled.* Beagle daemon for various OSes libbeagle.a.* Beagle API library for various OSes beagle_apilib.h Beagle API include files beagle_opaque.h This include file is also required deltest.c Example program showing the use of delegate setup calls. delruntime.c Example program showning how to register a delegate runtime service and receive delegates. flowtest.c Example program showing how to setup a point- to-point flow. deltest.* deltest executables for various OSes flowtest.* flowtest executables for various Oses delruntime.* delruntime executables for various Oses Setting up Beagle ================= This step requires running the Beagle daemon on all the machines (routers and end hosts) that you want to use. On every machine on the Darwin testbed (both routers and end-hosts) the Beagle daemon should be run from /etc/beagled. On routers, this is a file with setuid root to get required root previliges and on end-hosts this is a symbolic link to the appropriate beagled file in this AFS directory. beagled can be invoked as follows: Windows NT and Windows 95 users see note below. #/etc/beagled -D -d -R -D This flag puts beagled into debug mode and prints debug messages to the console. The daemon does not disconnect from the terminal. If this flag is not specified, beagled becomes a daemon. In either case, a log file (/var/tmp/beagle/beagled.log) is written. -d This sets the debug level. Default level is 7 and prints all Beagle messages received in gory detail. You can instead just print the type of the message receieved by setting this to 6. Setting debug level to 0 suppresses all output. -R This sets the default router and is only required on end hosts. This parameter should not be specified on routers. For end hosts default route should be the IP address of the router interface to which the machine is connected. For e.g. for manchester-3, the default router would be 192.168.3.2. Example programs ================ The following programs demonstrate the use of the Beagle API to setup flows and delegates. Setting up a flow (flowtest.c) ============================== The flowtest program can be used to setup a flow. This program basically creates a mesh by issuing a beagle_createMesh call and then issues a beagle_createFlow call to setup the flow. The syntax of the program is: flowtest beginIP endIP srcIP srcMask destIP destMask srcPort destPort protId appId appIdMask The first 2 parameters (beginIP, endIP) identify the start and end points of the flow you are going to reserve. The next 9 parameters identify the flow descriptor. Note, that the MSB of the appId must be 0. The acceptable values for appId are 0x0000 to 0x7fff. flowtest can initiate flow setup from either a sender or a receiver or a third party --- i.e it can be run from either a sender host, receiver host or some other host. The sender traffic spec and qos spec are hard-coded into the program (ts and qos variables in main) Registering a delegate runtime (delruntime.c) ============================================= The example program delruntime demonstrates how to register and listen for incoming delegates. This program just registers a "pseudo" runtime and shows the use of beagle_listenDelegate and beagle_acceptDelegate calls. Eduarado Takahasi (takahasi+@cs) has a better program which implements a Java runtime that can accept Java delegates and run them. The syntax of this program is: delruntime codeType runtimeType Look at the library header file beagle_apilib.h for defined values of codeType and runtimeType. The beagle_apiFlowHandle_t object returns LRM handles for the flow. The member 'lrmHandle' is the class id returned by the packet classifier and the string 'lrmInf' is the name of the network interface (e.g. ep0, de5, etc) over which the reservation is set up. lrmHandle is -1 if the flow does not exist at the delegate execution node and 0 if the kernel does not support QoS. Setting up a delegate (delsetup.c) ================================== The example program deltest demonstrates how to setup a delegate. The syntax is: deltest serv The 'serv' parameter is the delegate execution node. For delegates running on routers, the IP address of one of the router interfaces can be used. This program demonstrates the use of the beagle_createDelegate call. Note that a delegate setup only succeeds if an appropriate runtime environment is registered at the receiving end (the serv node) as shown in delruntime.c. Note for Windows users ====================== Beagle also runs on Windows NT 4.0 and Windows 95. Windows 95 requires Winsock 2 SDK to be installed. The latest version of the SDK can be downloaded from http://www.microsoft.com/win32dev/netwrk/winsock2/ws295sdk.html Running the beagled.exe is exactly same as described above. However, there must exist a "\temp" directory in the drive from which you run beagled.exe. beagleapi.lib is the static win32 library that has the Beagle API calls. beagled should be run with the -R flag as in the case of other unix end-hosts.