
#include <xorp_config.h>

/*
 * Routing Information Base XRL interface, client interface for
 * callbacks from the RIB.
 */

interface rib_client/0.1 {
	/**
	 * Route Info Changed
         *
         * route_info_changed is called by the RIB on the RIB client
         * (typically a routing protocol) that had registered an
         * interest in the routing of an address.  This can be because
         * the metric and/or nexthop changed.  
	 *
	 * @param addr base address of the subnet that was registered
	 *
	 * @param prefix_len prefix length of the subnet that was registered
	 * @param metric the routing metric toward the address.
	 * @param admin_distance the administratively defined distance
	 * toward the address.
	 * @param protocol_origin the name of the protocol that originated
	 * this routing entry.
	 */
	route_info_changed4 ? addr:ipv4 & prefix_len:u32 &		\
			      nexthop:ipv4 & metric:u32 &		\
			      admin_distance:u32 & protocol_origin:txt;

	/**
         * Route Info Invalid
         *
         * route_info_invalid is called by the RIB on the RIB client 
         * (typically a routing protocol) that had registere	d an
         * interest in the routing of an address. This can be because
         * the information 
         * previously reported as applying no longer applies for any
         * number of reasons.
         * When the RIB sends this message, it has automatically de-registered
         * interest in the route, and the client will normally need to
         * send a register_interest request again.
         */
	route_info_invalid4 ? addr:ipv4 & prefix_len:u32;

#ifdef HAVE_IPV6
	route_info_changed6 ? addr:ipv6 & prefix_len:u32 &		\
			      nexthop:ipv6 & metric:u32 &		\
			      admin_distance:u32 & protocol_origin:txt;
	route_info_invalid6 ? addr:ipv6 & prefix_len:u32;
#endif
}    

