[Xorp-users] Defining a new module, xorp 0.3

Thomas Kunz tkunz@sce.carleton.ca
Wed, 20 Aug 2003 11:38:15 -0400


This is a multi-part message in MIME format.
--------------D4316E12AC8EE315E0E5A49F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am trying to define a new module (routing protocol) in Xorp and am
running into the following problem. The module is called BCAST, and I
defined a template description in etc/templates, attached to this
e-mail... I then define an instance of the protocol in a very minimal
config.boot, also attached. When running rtrmgr, the module dependencies
are discovered correctly, and I get a line that says 
Module Order: fea rib bcast

Rtrmgr then goes about creating a new module fea. Eventually rtrmgr
abort with an error message:
[ 2003/08/20 11:33:10  FATAL rtrmgr:9023 RTRMGR +939 task.cc find task ]
Assertion (_module_commands.find(modname) != _module_commands.end())
failed

While I think I understand what that means (module bcast has not been
created yet), what do I have to do in the config file (or elsewhere) to
get bcast (or anything else besides fea) created. If I take the
parameters to bcast out of the template file (and the config.boot file),
rtrmgr does not abort, but it only seems to start fea, not RIB or BCAST
(and there are executables for both modules in the indicated locations
in the template file).

In case it makes a difference, these results were obtained under Linux
Redhat 7.2,  kernel 2.4.7-10

Thomas Kunz
--------------D4316E12AC8EE315E0E5A49F
Content-Type: text/plain; charset=us-ascii;
 name="bcast.tp"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="bcast.tp"

protocols {
  bcast {
    hello-int: uint = 1;    /* by default, send hello message every second */
    buffer-size: uint = 10; /* by default, buffer last 10 packets */
  }
}
		

protocols {
  bcast {
    %modinfo: provides bcast;
    %modinfo: depends rib;
    %modinfo: path "../bcast/bcast";
    %modinfo: statusmethod xrl;
    %modinfo: shutdownmethod xrl;
    hello-int {
      %set: xrl "bcast/bcast/1.0/set_hello_interval?int:u32=$(@)";
      %get: xrl "bcast/bcast/1.0/get_hello_interval->int:u32";
    }
    buffer-size {
      %set: xrl "bcast/bcast/1.0/set_buffer_size?buf:u32=$(@)";
      %get: xrl "bcast/bcast/1.0/get_buffer_size->buf:u32";
    }
  }
}


--------------D4316E12AC8EE315E0E5A49F
Content-Type: text/plain; charset=us-ascii;
 name="config.boot"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="config.boot"

interfaces {
  interface eth0 {
    description: "routing interface"
  }
}

protocols {
  bcast {
    hello-int: 1
    buffer-size: 10
  }
}


--------------D4316E12AC8EE315E0E5A49F--