/* $XORP: xorp/etc/templates/rib.tp,v 1.20 2006/04/19 19:59:26 pavlin Exp $ */

plumbing {
    rib {
	targetname:	txt = "rib";
    }
}

policy {
    /* Nothing to declare */
}

plumbing {
    rib {
	%help:		short		"Configure the Routing Information Base module";
	%modinfo:	provides	rib;
	%modinfo:	depends		fea;
	%modinfo:	path		"rib/xorp_rib";
	%modinfo:	default_targetname "rib";
	%modinfo:	status_method	xrl "$(rib.targetname)/common/0.1/get_status->status:u32&reason:txt";
	%modinfo:	shutdown_method xrl "$(rib.targetname)/common/0.1/shutdown";

	%mandatory:	$(@.targetname);

	targetname {
	    %user-hidden: "XRL target name";
	    %help:	short "XRL target name";
	    %set:;
	}
    }
}

policy {
    %create: xrl "$(policy.targetname)/policy/0.1/set_proto_target?protocol:txt=connected&target:txt=rib";
    /*
     * A temporary hack to allow import of directly connected routes.
     * This MUST be fixed at some other place (where?).
     */
    %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=connected&variable:txt=DUMMY_DIRTY_HACK&type:txt=u32&access:txt=r&id:u32=9";

    %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=connected&variable:txt=network4&type:txt=ipv4net&access:txt=r&id:u32=10";
    %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=connected&variable:txt=network6&type:txt=ipv6net&access:txt=r&id:u32=12";
}
